|
@@ -45,7 +45,8 @@
|
|
|
.fixedTablesTitle"
|
|
.fixedTablesTitle"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
:label="item.rkey"
|
|
:label="item.rkey"
|
|
|
- align="center"
|
|
|
|
|
|
|
+ header-align="center"
|
|
|
|
|
+ align="left"
|
|
|
>
|
|
>
|
|
|
<!-- <template slot-scope="scope">
|
|
<!-- <template slot-scope="scope">
|
|
|
{{
|
|
{{
|
|
@@ -67,19 +68,14 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
:row-class-name="getFixedPreviewRowClass"
|
|
:row-class-name="getFixedPreviewRowClass"
|
|
|
>
|
|
>
|
|
|
- <!-- <el-table-column label="序号" width="80" align="center">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- {{ scope.row._displaySeq || '-' }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
-
|
|
|
|
|
- <!-- 动态生成 fixedFields 中的列 -->
|
|
|
|
|
|
|
+ <!-- 动态生成 fixedFields 中的列(过滤掉 isAuditPeriod=true 的字段,避免与“监审期间+fieldName”重复) -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-for="field in contentEditForm.fixedTable.fixedTablesTitle"
|
|
|
|
|
|
|
+ v-for="field in fixedColumnsForDisplay"
|
|
|
:key="field.rkey"
|
|
:key="field.rkey"
|
|
|
:label="field.rkey"
|
|
:label="field.rkey"
|
|
|
min-width="150"
|
|
min-width="150"
|
|
|
- align="center"
|
|
|
|
|
|
|
+ header-align="center"
|
|
|
|
|
+ align="left"
|
|
|
:prop="field.rkey"
|
|
:prop="field.rkey"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -109,30 +105,28 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <!-- <el-table-column label="备注" min-width="160" align="left">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-if="!scope.row._isCategory"
|
|
|
|
|
- :value="scope.row._displayRemark || ''"
|
|
|
|
|
- placeholder="请输入备注"
|
|
|
|
|
- disabled
|
|
|
|
|
- />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
- <!-- <el-table-column label="指标编号" width="120" align="center">
|
|
|
|
|
|
|
+ <!-- 监审期间动态列:按 年份 + fieldName 展开(与 FixedTableDialog 一致) -->
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-for="col in auditPeriodColumns"
|
|
|
|
|
+ :key="col.key"
|
|
|
|
|
+ :label="col.label"
|
|
|
|
|
+ :prop="col.prop"
|
|
|
|
|
+ width="150"
|
|
|
|
|
+ header-align="center"
|
|
|
|
|
+ align="left"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="!scope.row._isCategory">
|
|
|
|
|
- {{ scope.row.cellCode || '-' }}
|
|
|
|
|
|
|
+ <span>
|
|
|
|
|
+ {{
|
|
|
|
|
+ scope.row[col.prop] !== undefined &&
|
|
|
|
|
+ scope.row[col.prop] !== null &&
|
|
|
|
|
+ String(scope.row[col.prop]) !== ''
|
|
|
|
|
+ ? scope.row[col.prop]
|
|
|
|
|
+ : '-'
|
|
|
|
|
+ }}
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="计算公式" min-width="150" align="left">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <span v-if="!scope.row._isCategory">
|
|
|
|
|
- {{ scope.row.calculationFormula || '-' }}
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -163,7 +157,8 @@
|
|
|
.dynamicTableHeaders"
|
|
.dynamicTableHeaders"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
:label="item.rkey"
|
|
:label="item.rkey"
|
|
|
- align="center"
|
|
|
|
|
|
|
+ header-align="center"
|
|
|
|
|
+ align="left"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{
|
|
{{
|
|
@@ -183,7 +178,8 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import CostAuditDialog from '@/components/costAudit/CostAuditDialog'
|
|
import CostAuditDialog from '@/components/costAudit/CostAuditDialog'
|
|
|
- import { listByCurrentTemplateId } from '@/api/catalogManage.js'
|
|
|
|
|
|
|
+ import { listByCurrentTemplateId as fetchTemplateItems } from '@/api/catalogManage.js'
|
|
|
|
|
+ import { getListBySurveyTemplateIdAndVersion as fetchHeaderMeta } from '@/api/costSurveyTemplateHeaders'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'SurveyDialog',
|
|
name: 'SurveyDialog',
|
|
|
components: {
|
|
components: {
|
|
@@ -378,6 +374,90 @@
|
|
|
}
|
|
}
|
|
|
return collectedYears
|
|
return collectedYears
|
|
|
},
|
|
},
|
|
|
|
|
+ // 监审期间字段(isAuditPeriod=true):来自固定表表头元数据 tableHeaders
|
|
|
|
|
+ auditPeriodFields() {
|
|
|
|
|
+ const headers =
|
|
|
|
|
+ (this.contentEditForm.fixedTable &&
|
|
|
|
|
+ this.contentEditForm.fixedTable.tableHeaders) ||
|
|
|
|
|
+ []
|
|
|
|
|
+ const toBool = (v) => {
|
|
|
|
|
+ if (v === true) return true
|
|
|
|
|
+ if (v === false) return false
|
|
|
|
|
+ const s = String(v == null ? '' : v)
|
|
|
|
|
+ .trim()
|
|
|
|
|
+ .toLowerCase()
|
|
|
|
|
+ return ['true', '1', 'y', 'yes', '是'].includes(s)
|
|
|
|
|
+ }
|
|
|
|
|
+ return (Array.isArray(headers) ? headers : [])
|
|
|
|
|
+ .filter((h) => h && toBool(h.isAuditPeriod))
|
|
|
|
|
+ .map((h, idx) => ({
|
|
|
|
|
+ ...h,
|
|
|
|
|
+ __key: String(h.fieldName || h.fieldCname || h.rkey || idx),
|
|
|
|
|
+ }))
|
|
|
|
|
+ },
|
|
|
|
|
+ // 期间字段在行对象上的 prop:ap_${year}__${fieldName}
|
|
|
|
|
+ auditPeriodColumns() {
|
|
|
|
|
+ const years = Array.isArray(this.auditPeriodYears)
|
|
|
|
|
+ ? this.auditPeriodYears
|
|
|
|
|
+ : []
|
|
|
|
|
+ const fields = Array.isArray(this.auditPeriodFields)
|
|
|
|
|
+ ? this.auditPeriodFields
|
|
|
|
|
+ : []
|
|
|
|
|
+ const cols = []
|
|
|
|
|
+ years.forEach((year) => {
|
|
|
|
|
+ fields.forEach((m) => {
|
|
|
|
|
+ const fieldName = String(
|
|
|
|
|
+ m.fieldName || m.fieldCname || m.rkey || m.name || ''
|
|
|
|
|
+ ).trim()
|
|
|
|
|
+ if (!fieldName) return
|
|
|
|
|
+ const prop = this.getAuditPeriodProp(year, fieldName)
|
|
|
|
|
+ cols.push({
|
|
|
|
|
+ key: `${year}__${m.__key}`,
|
|
|
|
|
+ label: `${year}${fieldName}`,
|
|
|
|
|
+ prop,
|
|
|
|
|
+ year,
|
|
|
|
|
+ fieldName,
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ return cols
|
|
|
|
|
+ },
|
|
|
|
|
+ // 固定表展示列:fixedTablesTitle 中剔除 isAuditPeriod=true 的字段(这些字段应仅通过“监审期间+fieldName”展示)
|
|
|
|
|
+ fixedColumnsForDisplay() {
|
|
|
|
|
+ const titles =
|
|
|
|
|
+ (this.contentEditForm.fixedTable &&
|
|
|
|
|
+ this.contentEditForm.fixedTable.fixedTablesTitle) ||
|
|
|
|
|
+ []
|
|
|
|
|
+ const metas = Array.isArray(this.auditPeriodFields)
|
|
|
|
|
+ ? this.auditPeriodFields
|
|
|
|
|
+ : []
|
|
|
|
|
+ if (!Array.isArray(titles) || titles.length === 0) return []
|
|
|
|
|
+ if (!Array.isArray(metas) || metas.length === 0) return titles
|
|
|
|
|
+
|
|
|
|
|
+ const periodNames = new Set(
|
|
|
|
|
+ metas
|
|
|
|
|
+ .map((m) =>
|
|
|
|
|
+ String(
|
|
|
|
|
+ m.fieldName || m.fieldCname || m.rkey || m.name || ''
|
|
|
|
|
+ ).trim()
|
|
|
|
|
+ )
|
|
|
|
|
+ .filter(Boolean)
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ // 只在固定表(templateType=2)时过滤,避免影响单记录/动态表
|
|
|
|
|
+ if (String(this.contentEditForm.templateType) !== '2') return titles
|
|
|
|
|
+
|
|
|
|
|
+ return titles.filter((t) => {
|
|
|
|
|
+ const name = String(
|
|
|
|
|
+ (t && (t.rkey || t.label || t.fieldName || t.name)) || ''
|
|
|
|
|
+ ).trim()
|
|
|
|
|
+ if (!name) return true
|
|
|
|
|
+ // 如果该列在 auditPeriodFields 中出现,则认为是期间字段,从固定表头移除
|
|
|
|
|
+ return !periodNames.has(name)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 固定表列名候选:用于从列名中兜底解析监审年份(auditPeriodYears 里会用到)
|
|
|
fixedTableColumnCandidates() {
|
|
fixedTableColumnCandidates() {
|
|
|
const labels = new Set()
|
|
const labels = new Set()
|
|
|
const addLabel = (value) => {
|
|
const addLabel = (value) => {
|
|
@@ -413,6 +493,7 @@
|
|
|
}
|
|
}
|
|
|
return Array.from(labels)
|
|
return Array.from(labels)
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
fixedTableDisplayData() {
|
|
fixedTableDisplayData() {
|
|
|
const rows =
|
|
const rows =
|
|
|
(this.contentEditForm.fixedTable &&
|
|
(this.contentEditForm.fixedTable &&
|
|
@@ -475,6 +556,8 @@
|
|
|
return level
|
|
return level
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const apCols = this.auditPeriodColumns
|
|
|
|
|
+
|
|
|
return rows.map((row, index) => {
|
|
return rows.map((row, index) => {
|
|
|
const rowId = normalizeId(row.rowid || row.itemId || index)
|
|
const rowId = normalizeId(row.rowid || row.itemId || index)
|
|
|
const fixedValues = row.fixedValues || {}
|
|
const fixedValues = row.fixedValues || {}
|
|
@@ -498,6 +581,32 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ // ===== 监审期间 + fieldName:补充到行上(prop 形如 ap_2023__收入) =====
|
|
|
|
|
+ ;(Array.isArray(apCols) ? apCols : []).forEach((col) => {
|
|
|
|
|
+ if (!col || !col.prop) return
|
|
|
|
|
+ const y = String(col.year)
|
|
|
|
|
+ const fn = String(col.fieldName || '').trim()
|
|
|
|
|
+ if (!y || !fn) return
|
|
|
|
|
+
|
|
|
|
|
+ // 兼容两种存储键:"2023收入" / "收入_2023"
|
|
|
|
|
+ const k1 = `${y}${fn}`
|
|
|
|
|
+ const k2 = `${fn}_${y}`
|
|
|
|
|
+ const v =
|
|
|
|
|
+ fixedValues[k1] !== undefined
|
|
|
|
|
+ ? fixedValues[k1]
|
|
|
|
|
+ : fixedValues[k2] !== undefined
|
|
|
|
|
+ ? fixedValues[k2]
|
|
|
|
|
+ : row[k1] !== undefined
|
|
|
|
|
+ ? row[k1]
|
|
|
|
|
+ : row[k2] !== undefined
|
|
|
|
|
+ ? row[k2]
|
|
|
|
|
+ : ''
|
|
|
|
|
+ return {
|
|
|
|
|
+ prop: col.prop,
|
|
|
|
|
+ v,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// 设置默认显示名称(使用第一个非序号字段)
|
|
// 设置默认显示名称(使用第一个非序号字段)
|
|
|
let displayName = ''
|
|
let displayName = ''
|
|
|
const nonSeqField = fixedFields.find((f) => f.rkey !== '序号')
|
|
const nonSeqField = fixedFields.find((f) => f.rkey !== '序号')
|
|
@@ -520,7 +629,7 @@
|
|
|
const indentLevel = Math.min(level, 5)
|
|
const indentLevel = Math.min(level, 5)
|
|
|
const isCategory = hasChildren || isChild
|
|
const isCategory = hasChildren || isChild
|
|
|
|
|
|
|
|
- return {
|
|
|
|
|
|
|
+ const out = {
|
|
|
...row,
|
|
...row,
|
|
|
_displaySeq: displaySeq,
|
|
_displaySeq: displaySeq,
|
|
|
_displayName: displayName,
|
|
_displayName: displayName,
|
|
@@ -532,6 +641,29 @@
|
|
|
_indentLevel: indentLevel,
|
|
_indentLevel: indentLevel,
|
|
|
_rowId: rowId,
|
|
_rowId: rowId,
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 把期间列值挂到 out 上
|
|
|
|
|
+ ;(Array.isArray(apCols) ? apCols : []).forEach((col) => {
|
|
|
|
|
+ if (!col || !col.prop) return
|
|
|
|
|
+ const y = String(col.year)
|
|
|
|
|
+ const fn = String(col.fieldName || '').trim()
|
|
|
|
|
+ if (!y || !fn) return
|
|
|
|
|
+ const k1 = `${y}${fn}`
|
|
|
|
|
+ const k2 = `${fn}_${y}`
|
|
|
|
|
+ const v =
|
|
|
|
|
+ fixedValues[k1] !== undefined
|
|
|
|
|
+ ? fixedValues[k1]
|
|
|
|
|
+ : fixedValues[k2] !== undefined
|
|
|
|
|
+ ? fixedValues[k2]
|
|
|
|
|
+ : row[k1] !== undefined
|
|
|
|
|
+ ? row[k1]
|
|
|
|
|
+ : row[k2] !== undefined
|
|
|
|
|
+ ? row[k2]
|
|
|
|
|
+ : ''
|
|
|
|
|
+ out[col.prop] = v !== undefined && v !== null ? v : ''
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ return out
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
@@ -557,6 +689,41 @@
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 期间字段在行对象上的 prop:ap_${year}__${fieldName}
|
|
|
|
|
+ getAuditPeriodProp(year, fieldName) {
|
|
|
|
|
+ const y = String(year)
|
|
|
|
|
+ const f = String(fieldName || '').trim()
|
|
|
|
|
+ return `ap_${y}__${f}`
|
|
|
|
|
+ },
|
|
|
|
|
+ // 尽可能从各种入参/回显结构中解析 surveyTemplateId
|
|
|
|
|
+ resolveSurveyTemplateId() {
|
|
|
|
|
+ const c = this.contentEditForm || {}
|
|
|
|
|
+ const d = c.data || {}
|
|
|
|
|
+ const fd = this.formData || {}
|
|
|
|
|
+ const fdd = fd.data || {}
|
|
|
|
|
+
|
|
|
|
|
+ return (
|
|
|
|
|
+ d.surveyTemplateId ||
|
|
|
|
|
+ d.surveyId ||
|
|
|
|
|
+ d.templateId ||
|
|
|
|
|
+ c.surveyTemplateId ||
|
|
|
|
|
+ c.surveyId ||
|
|
|
|
|
+ c.templateId ||
|
|
|
|
|
+ fdd.surveyTemplateId ||
|
|
|
|
|
+ fdd.surveyId ||
|
|
|
|
|
+ fd.surveyTemplateId ||
|
|
|
|
|
+ fd.surveyId ||
|
|
|
|
|
+ ''
|
|
|
|
|
+ )
|
|
|
|
|
+ },
|
|
|
|
|
+ // 解析版本ID(后端若需要版本维度时使用)
|
|
|
|
|
+ resolveVersionId() {
|
|
|
|
|
+ const c = this.contentEditForm || {}
|
|
|
|
|
+ const d = c.data || {}
|
|
|
|
|
+ const fd = this.formData || {}
|
|
|
|
|
+ const fdd = fd.data || {}
|
|
|
|
|
+ return c.versionId || d.versionId || fd.versionId || fdd.versionId || ''
|
|
|
|
|
+ },
|
|
|
// 初始化表单
|
|
// 初始化表单
|
|
|
initForm() {
|
|
initForm() {
|
|
|
if (Object.keys(this.formData).length > 0) {
|
|
if (Object.keys(this.formData).length > 0) {
|
|
@@ -565,32 +732,81 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
getData() {
|
|
getData() {
|
|
|
- listByCurrentTemplateId({
|
|
|
|
|
- surveyTemplateId:
|
|
|
|
|
- this.contentEditForm.data.surveyId ||
|
|
|
|
|
- this.contentEditForm.data.surveyTemplateId,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- // 根据模板类型解析并显示数据
|
|
|
|
|
- // if (this.contentEditForm.templateType === '1') {
|
|
|
|
|
- // if (res.value.fixedFields) {
|
|
|
|
|
- // console.log(this.contentEditForm)
|
|
|
|
|
- // this.contentEditForm.fixedTable.fixedTablesTitle =
|
|
|
|
|
- // this.stringToObjects(res.value.fixedFields || '')
|
|
|
|
|
- // this.contentEditForm.fixedTable.fixedTables = []
|
|
|
|
|
- // console.log(this.contentEditForm.fixedTable.fixedTablesTitle)
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- if (
|
|
|
|
|
- this.contentEditForm.templateType === '1' ||
|
|
|
|
|
- this.contentEditForm.templateType === '2'
|
|
|
|
|
- ) {
|
|
|
|
|
- // 解析并显示固定表项目数据
|
|
|
|
|
- this.parseAndDisplayFixedTableData(res)
|
|
|
|
|
- } else if (this.contentEditForm.templateType === '3') {
|
|
|
|
|
- // 解析并显示动态表项目数据
|
|
|
|
|
- this.parseAndDisplayDynamicTableData(res)
|
|
|
|
|
|
|
+ const surveyTemplateId = this.resolveSurveyTemplateId()
|
|
|
|
|
+ const versionId = this.resolveVersionId()
|
|
|
|
|
+
|
|
|
|
|
+ // 固定表:必须同时拉取
|
|
|
|
|
+ // 1) getListBySurveyTemplateIdAndVersion:拿表头元数据(含 isAuditPeriod)
|
|
|
|
|
+ // 2) listByCurrentTemplateId:拿 itemlist/fixedFields 预览数据
|
|
|
|
|
+ if (String(this.contentEditForm.templateType) === '2') {
|
|
|
|
|
+ if (surveyTemplateId) {
|
|
|
|
|
+ fetchHeaderMeta({
|
|
|
|
|
+ surveyTemplateId,
|
|
|
|
|
+ // 有些环境需要 versionId,不传也不影响其它环境;这里尽量带上
|
|
|
|
|
+ ...(versionId ? { versionId } : {}),
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res && res.code === 200 && Array.isArray(res.value)) {
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.contentEditForm.fixedTable,
|
|
|
|
|
+ 'tableHeaders',
|
|
|
|
|
+ res.value
|
|
|
|
|
+ )
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.contentEditForm.dynamicTable,
|
|
|
|
|
+ 'tableHeaders',
|
|
|
|
|
+ res.value
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {})
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (surveyTemplateId) {
|
|
|
|
|
+ fetchTemplateItems({ surveyTemplateId }).then((res) => {
|
|
|
|
|
+ this.parseAndDisplayFixedTableData(res)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 非固定表:保持原逻辑
|
|
|
|
|
+ if (surveyTemplateId) {
|
|
|
|
|
+ // 先取字段元数据(含 isAuditPeriod),用于后续展示/兼容
|
|
|
|
|
+ fetchHeaderMeta({
|
|
|
|
|
+ surveyTemplateId,
|
|
|
|
|
+ ...(versionId ? { versionId } : {}),
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res && res.code === 200 && Array.isArray(res.value)) {
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.contentEditForm.fixedTable,
|
|
|
|
|
+ 'tableHeaders',
|
|
|
|
|
+ res.value
|
|
|
|
|
+ )
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.contentEditForm.dynamicTable,
|
|
|
|
|
+ 'tableHeaders',
|
|
|
|
|
+ res.value
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {})
|
|
|
|
|
+
|
|
|
|
|
+ // 再取数据明细
|
|
|
|
|
+ fetchTemplateItems({ surveyTemplateId }).then((res) => {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.contentEditForm.templateType === '1' ||
|
|
|
|
|
+ this.contentEditForm.templateType === '2'
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.parseAndDisplayFixedTableData(res)
|
|
|
|
|
+ } else if (this.contentEditForm.templateType === '3') {
|
|
|
|
|
+ this.parseAndDisplayDynamicTableData(res)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 解析并回显固定表、单记录项目数据
|
|
* 解析并回显固定表、单记录项目数据
|
|
@@ -879,6 +1095,7 @@
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
@import '@/styles/costAudit.scss';
|
|
@import '@/styles/costAudit.scss';
|
|
|
|
|
+
|
|
|
.survey-dialog-container {
|
|
.survey-dialog-container {
|
|
|
.content-edit-container {
|
|
.content-edit-container {
|
|
|
.table-header-info {
|
|
.table-header-info {
|
|
@@ -888,45 +1105,56 @@
|
|
|
padding: 10px;
|
|
padding: 10px;
|
|
|
background-color: #f5f7fa;
|
|
background-color: #f5f7fa;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
|
|
+
|
|
|
.table-name {
|
|
.table-name {
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
color: #303133;
|
|
color: #303133;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.table-style {
|
|
.table-style {
|
|
|
.el-radio-group {
|
|
.el-radio-group {
|
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.table-edit-container {
|
|
.table-edit-container {
|
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
|
|
|
+
|
|
|
.format-input {
|
|
.format-input {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+
|
|
|
.format-prefix {
|
|
.format-prefix {
|
|
|
margin-right: 5px;
|
|
margin-right: 5px;
|
|
|
color: #606266;
|
|
color: #606266;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.bind-dict-column {
|
|
.bind-dict-column {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
|
|
+
|
|
|
.dict-select {
|
|
.dict-select {
|
|
|
margin-left: 0 !important;
|
|
margin-left: 0 !important;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
::v-deep .category-row {
|
|
::v-deep .category-row {
|
|
|
background-color: #f5f7fa !important;
|
|
background-color: #f5f7fa !important;
|
|
|
|
|
+
|
|
|
td {
|
|
td {
|
|
|
background-color: #f5f7fa !important;
|
|
background-color: #f5f7fa !important;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.category-name {
|
|
.category-name {
|
|
|
color: #409eff;
|
|
color: #409eff;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.table-item-text {
|
|
.table-item-text {
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
width: 100%;
|
|
width: 100%;
|