|
@@ -9,6 +9,57 @@
|
|
|
class="task-info-dialog"
|
|
class="task-info-dialog"
|
|
|
>
|
|
>
|
|
|
<div class="task-info-container">
|
|
<div class="task-info-container">
|
|
|
|
|
+ <!-- 报送资料预置模版查看弹窗:复用 SurveyFormDialog / FixedTableDialog / DynamicTableDialog,只读模式 -->
|
|
|
|
|
+ <survey-form-dialog
|
|
|
|
|
+ :visible.sync="surveyFormDialogVisible"
|
|
|
|
|
+ :survey-data="{ ...(currentTemplateRow || {}), ...surveyDetailData }"
|
|
|
|
|
+ :form-fields="formFields"
|
|
|
|
|
+ :is-view-mode="true"
|
|
|
|
|
+ :audited-unit-id="auditedUnitId"
|
|
|
|
|
+ :request-type="2"
|
|
|
|
|
+ :upload-id="
|
|
|
|
|
+ (currentTemplateRow &&
|
|
|
|
|
+ (currentTemplateRow.uploadId || currentTemplateRow.id)) ||
|
|
|
|
|
+ ''
|
|
|
|
|
+ "
|
|
|
|
|
+ :survey-template-id="getSurveyTemplateId(currentTemplateRow)"
|
|
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <fixed-table-dialog
|
|
|
|
|
+ :visible.sync="fixedTableDialogVisible"
|
|
|
|
|
+ :survey-data="{ ...(currentTemplateRow || {}), fixedHeaders }"
|
|
|
|
|
+ :table-items="tableItems"
|
|
|
|
|
+ :audit-periods="auditPeriods"
|
|
|
|
|
+ :is-view-mode="true"
|
|
|
|
|
+ :request-type="2"
|
|
|
|
|
+ :audited-unit-id="auditedUnitId"
|
|
|
|
|
+ :upload-id="
|
|
|
|
|
+ (currentTemplateRow &&
|
|
|
|
|
+ (currentTemplateRow.uploadId || currentTemplateRow.id)) ||
|
|
|
|
|
+ ''
|
|
|
|
|
+ "
|
|
|
|
|
+ :survey-template-id="getSurveyTemplateId(currentTemplateRow)"
|
|
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <dynamic-table-dialog
|
|
|
|
|
+ :key="dynamicDialogKey"
|
|
|
|
|
+ :visible.sync="dynamicTableDialogVisible"
|
|
|
|
|
+ :survey-data="currentTemplateRow || {}"
|
|
|
|
|
+ :table-data="dynamicTableData"
|
|
|
|
|
+ :table-items="tableItems"
|
|
|
|
|
+ :is-view-mode="true"
|
|
|
|
|
+ :request-type="2"
|
|
|
|
|
+ :audited-unit-id="auditedUnitId"
|
|
|
|
|
+ :upload-id="
|
|
|
|
|
+ (currentTemplateRow &&
|
|
|
|
|
+ (currentTemplateRow.uploadId || currentTemplateRow.id)) ||
|
|
|
|
|
+ ''
|
|
|
|
|
+ "
|
|
|
|
|
+ :survey-template-id="getSurveyTemplateId(currentTemplateRow)"
|
|
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
|
|
+ />
|
|
|
<!-- 标签页容器 -->
|
|
<!-- 标签页容器 -->
|
|
|
<el-tabs
|
|
<el-tabs
|
|
|
v-model="activeTab"
|
|
v-model="activeTab"
|
|
@@ -507,6 +558,16 @@
|
|
|
<template v-if="scope.row.formatRequired == '3'">
|
|
<template v-if="scope.row.formatRequired == '3'">
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="
|
|
v-if="
|
|
|
|
|
+ scope.row.isUpload === 1 || scope.row.isUpload === '1'
|
|
|
|
|
+ "
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @click="handleViewTemplate(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 查看
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="
|
|
|
(scope.row.isUpload === 1 ||
|
|
(scope.row.isUpload === 1 ||
|
|
|
scope.row.isUpload === '1') &&
|
|
scope.row.isUpload === '1') &&
|
|
|
scope.row.templateType !== '1'
|
|
scope.row.templateType !== '1'
|
|
@@ -576,6 +637,7 @@
|
|
|
width="100"
|
|
width="100"
|
|
|
align="center"
|
|
align="center"
|
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
|
|
+
|
|
|
<el-table-column label="是否上传" width="100" align="center">
|
|
<el-table-column label="是否上传" width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
<span
|
|
@@ -588,6 +650,18 @@
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <!-- 操作列:查看单记录/固定表/动态表 -->
|
|
|
|
|
+ <el-table-column label="操作" width="120" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @click="handleCostSurveyView(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 查看
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
background
|
|
background
|
|
@@ -909,6 +983,15 @@
|
|
|
import TemplatePreviewEdit from '@/components/costAudit/TemplatePreviewEdit.vue'
|
|
import TemplatePreviewEdit from '@/components/costAudit/TemplatePreviewEdit.vue'
|
|
|
import MultiAttachmentDialog from '@/components/costAudit/MultiAttachmentDialog'
|
|
import MultiAttachmentDialog from '@/components/costAudit/MultiAttachmentDialog'
|
|
|
import { uploadFile } from '@/api/file'
|
|
import { uploadFile } from '@/api/file'
|
|
|
|
|
+ import SurveyFormDialog from '@/views/EntDeclaration/auditTaskManagement/components/SurveyFormDialog.vue'
|
|
|
|
|
+ import FixedTableDialog from '@/views/EntDeclaration/auditTaskManagement/components/FixedTableDialog.vue'
|
|
|
|
|
+ import DynamicTableDialog from '@/views/EntDeclaration/auditTaskManagement/components/DynamicTableDialog.vue'
|
|
|
|
|
+ import {
|
|
|
|
|
+ getSingleRecordSurveyList,
|
|
|
|
|
+ getSurveyDetail,
|
|
|
|
|
+ getDynamicTableData,
|
|
|
|
|
+ } from '@/api/audit/survey'
|
|
|
|
|
+ import { getListBySurveyFdTemplateIdAndVersion } from '@/api/costSurveyTemplateHeaders'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'TaskInfo',
|
|
name: 'TaskInfo',
|
|
|
components: {
|
|
components: {
|
|
@@ -917,6 +1000,9 @@
|
|
|
CostAuditDialog,
|
|
CostAuditDialog,
|
|
|
TemplatePreviewEdit,
|
|
TemplatePreviewEdit,
|
|
|
MultiAttachmentDialog,
|
|
MultiAttachmentDialog,
|
|
|
|
|
+ SurveyFormDialog,
|
|
|
|
|
+ FixedTableDialog,
|
|
|
|
|
+ DynamicTableDialog,
|
|
|
},
|
|
},
|
|
|
mixins: [dictMixin],
|
|
mixins: [dictMixin],
|
|
|
props: {
|
|
props: {
|
|
@@ -1025,6 +1111,18 @@
|
|
|
activeDocTab: 'preview', // 当前标签页,preview:预览,edit:修改
|
|
activeDocTab: 'preview', // 当前标签页,preview:预览,edit:修改
|
|
|
dialogMultiVisible: false,
|
|
dialogMultiVisible: false,
|
|
|
attachments: [],
|
|
attachments: [],
|
|
|
|
|
+ // 报送资料预置模版查看相关
|
|
|
|
|
+ currentTemplateRow: null,
|
|
|
|
|
+ surveyFormDialogVisible: false,
|
|
|
|
|
+ fixedTableDialogVisible: false,
|
|
|
|
|
+ dynamicTableDialogVisible: false,
|
|
|
|
|
+ formFields: [],
|
|
|
|
|
+ surveyDetailData: {},
|
|
|
|
|
+ tableItems: [],
|
|
|
|
|
+ auditPeriods: [],
|
|
|
|
|
+ dynamicTableData: [],
|
|
|
|
|
+ dynamicDialogKey: 0,
|
|
|
|
|
+ fixedHeaders: null,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -1448,6 +1546,334 @@
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 成本调查表-查看:复用报送资料预置模版查看的三种弹窗(只读)
|
|
|
|
|
+ handleCostSurveyView(row) {
|
|
|
|
|
+ if (!row) return
|
|
|
|
|
+ // 将成本调查表行映射为 currentTemplateRow 结构
|
|
|
|
|
+ const templateRow = {
|
|
|
|
|
+ uploadId: row.uploadId || row.id,
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ surveyTemplateId: row.surveyTemplateId,
|
|
|
|
|
+ templateType:
|
|
|
|
|
+ row.templateType ||
|
|
|
|
|
+ (row.tableType === '单记录'
|
|
|
|
|
+ ? '1'
|
|
|
|
|
+ : row.tableType === '固定表'
|
|
|
|
|
+ ? '2'
|
|
|
|
|
+ : row.tableType === '动态表'
|
|
|
|
|
+ ? '3'
|
|
|
|
|
+ : ''),
|
|
|
|
|
+ catalogId: row.catalogId || this.catalogId || '',
|
|
|
|
|
+ auditedUnitId: row.auditedUnitId || this.auditedUnitId || '',
|
|
|
|
|
+ informationName: row.name,
|
|
|
|
|
+ }
|
|
|
|
|
+ this.handleViewTemplate(templateRow)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 报送资料预置模版-查看:单记录/固定表/动态表只读查看并回显
|
|
|
|
|
+ async handleOnlineSubmission(row) {
|
|
|
|
|
+ if (!row) return
|
|
|
|
|
+ this.currentTemplateRow = row
|
|
|
|
|
+ this.surveyDetailData = {}
|
|
|
|
|
+
|
|
|
|
|
+ const t = String(row.templateType || row.templatetype || '').trim()
|
|
|
|
|
+ if (t === '1') {
|
|
|
|
|
+ if (row.uploadId || row.id) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ uploadId: row.uploadId || row.id,
|
|
|
|
|
+ auditedUnitId: this.auditedUnitId,
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await getSurveyDetail(params)
|
|
|
|
|
+ if (res && res.code === 200 && res.value) {
|
|
|
|
|
+ const detailData = {}
|
|
|
|
|
+ if (Array.isArray(res.value)) {
|
|
|
|
|
+ res.value.forEach((item) => {
|
|
|
|
|
+ if (item.rowid && item.rvalue !== undefined) {
|
|
|
|
|
+ detailData[item.rowid] = item.rvalue
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (res.value && typeof res.value === 'object') {
|
|
|
|
|
+ Object.assign(detailData, res.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.surveyDetailData = detailData
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.error('获取单记录详情失败', err)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ await this.initFormFields()
|
|
|
|
|
+ } else if (t === '2') {
|
|
|
|
|
+ await this.initFixedTableData()
|
|
|
|
|
+ } else if (t === '3') {
|
|
|
|
|
+ await this.initDynamicTableData()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ handleViewTemplate(row) {
|
|
|
|
|
+ this.currentTemplateRow = row || null
|
|
|
|
|
+ const t = String(
|
|
|
|
|
+ (row && (row.templateType || row.templatetype)) || ''
|
|
|
|
|
+ ).trim()
|
|
|
|
|
+ if (t === '1' || t === '2' || t === '3') {
|
|
|
|
|
+ this.handleOnlineSubmission(row)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message &&
|
|
|
|
|
+ this.$message.warning &&
|
|
|
|
|
+ this.$message.warning('未知的模板类型,无法打开预置模板')
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async initDynamicTableData() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const uploadId =
|
|
|
|
|
+ (this.currentTemplateRow &&
|
|
|
|
|
+ (this.currentTemplateRow.uploadId ||
|
|
|
|
|
+ this.currentTemplateRow.id)) ||
|
|
|
|
|
+ ''
|
|
|
|
|
+ const auditedUnitId = this.auditedUnitId || ''
|
|
|
|
|
+ const catalogId =
|
|
|
|
|
+ (this.currentTemplateRow && this.currentTemplateRow.catalogId) || ''
|
|
|
|
|
+ const surveyTemplateId = this.getSurveyTemplateId(
|
|
|
|
|
+ this.currentTemplateRow
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ uploadId,
|
|
|
|
|
+ auditedUnitId,
|
|
|
|
|
+ catalogId,
|
|
|
|
|
+ surveyTemplateId,
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await getDynamicTableData(params)
|
|
|
|
|
+ if (res && res.code === 200) {
|
|
|
|
|
+ const records = res.value?.records || res.value || []
|
|
|
|
|
+ this.dynamicTableData = Array.isArray(records) ? records : []
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.dynamicTableData =
|
|
|
|
|
+ this.currentTemplateRow?.dynamicTableData || []
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.currentTemplateRow &&
|
|
|
|
|
+ this.currentTemplateRow.tableItems &&
|
|
|
|
|
+ this.currentTemplateRow.tableItems.length > 0
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.tableItems = this.currentTemplateRow.tableItems
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.tableItems = this.getMockTableItems()
|
|
|
|
|
+ }
|
|
|
|
|
+ this.dynamicTableDialogVisible = true
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取动态表数据失败', error)
|
|
|
|
|
+ this.dynamicTableData =
|
|
|
|
|
+ this.currentTemplateRow?.dynamicTableData || []
|
|
|
|
|
+ this.tableItems =
|
|
|
|
|
+ this.currentTemplateRow?.tableItems || this.getMockTableItems()
|
|
|
|
|
+ this.dynamicTableDialogVisible = true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async initFormFields() {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.currentTemplateRow &&
|
|
|
|
|
+ this.getSurveyTemplateId(this.currentTemplateRow)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ surveyTemplateId: this.getSurveyTemplateId(
|
|
|
|
|
+ this.currentTemplateRow
|
|
|
|
|
+ ),
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await getListBySurveyFdTemplateIdAndVersion(params)
|
|
|
|
|
+ if (res && res.code === 200) {
|
|
|
|
|
+ let mapped = []
|
|
|
|
|
+ if (Array.isArray(res.value)) {
|
|
|
|
|
+ mapped = res.value
|
|
|
|
|
+ .map((item, index) =>
|
|
|
|
|
+ this.mapApiFieldToFormField(item, index)
|
|
|
|
|
+ )
|
|
|
|
|
+ .filter(Boolean)
|
|
|
|
|
+ } else if (res.value && typeof res.value === 'object') {
|
|
|
|
|
+ const { fixedFields, fixedFieldids } = res.value
|
|
|
|
|
+ if (fixedFields && fixedFieldids) {
|
|
|
|
|
+ const labels = fixedFields.split(',').map((i) => i.trim())
|
|
|
|
|
+ const ids = fixedFieldids.split(',').map((i) => i.trim())
|
|
|
|
|
+ mapped = labels.map((label, index) => ({
|
|
|
|
|
+ prop: ids[index] || `field_${index}`,
|
|
|
|
|
+ label,
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ colSpan: 12,
|
|
|
|
|
+ placeholder: `请输入${label}`,
|
|
|
|
|
+ rules: [],
|
|
|
|
|
+ defaultValue: '',
|
|
|
|
|
+ disabled: false,
|
|
|
|
|
+ clearable: true,
|
|
|
|
|
+ multiple: false,
|
|
|
|
|
+ required: false,
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.formFields =
|
|
|
|
|
+ mapped.length > 0 ? mapped : this.getMockFormFields()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.formFields = this.getMockFormFields()
|
|
|
|
|
+ }
|
|
|
|
|
+ this.surveyFormDialogVisible = true
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.error('获取单记录表单字段配置失败', err)
|
|
|
|
|
+ this.formFields = this.getMockFormFields()
|
|
|
|
|
+ this.surveyFormDialogVisible = true
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.formFields = this.getMockFormFields()
|
|
|
|
|
+ this.surveyFormDialogVisible = true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async initFixedTableData() {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.currentTemplateRow &&
|
|
|
|
|
+ this.getSurveyTemplateId(this.currentTemplateRow)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ surveyTemplateId: this.getSurveyTemplateId(
|
|
|
|
|
+ this.currentTemplateRow
|
|
|
|
|
+ ),
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await getSingleRecordSurveyList(params)
|
|
|
|
|
+ if (res && res.code === 200 && res.value) {
|
|
|
|
|
+ const { itemlist } = res.value
|
|
|
|
|
+ if (itemlist && Array.isArray(itemlist) && itemlist.length > 0) {
|
|
|
|
|
+ this.tableItems = itemlist.map((item) => ({
|
|
|
|
|
+ id: item.id || item.itemId || '',
|
|
|
|
|
+ rowid: item.rowid || item.id || item.itemId || '',
|
|
|
|
|
+ seq: item.序号,
|
|
|
|
|
+ itemName: item.项目 || '',
|
|
|
|
|
+ unit: item.unit || '',
|
|
|
|
|
+ isCategory: item.isCategory || false,
|
|
|
|
|
+ categorySeq: item.categorySeq || '',
|
|
|
|
|
+ categoryId: item.categoryId || '',
|
|
|
|
|
+ parentid:
|
|
|
|
|
+ item.parentid !== undefined
|
|
|
|
|
+ ? item.parentid
|
|
|
|
|
+ : item.parentId !== undefined
|
|
|
|
|
+ ? item.parentId
|
|
|
|
|
+ : '-1',
|
|
|
|
|
+ validateRules: item.validateRules || {},
|
|
|
|
|
+ linkageRules: item.linkageRules || {},
|
|
|
|
|
+ children: item.children || [],
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ }))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.tableItems = this.getMockTableItems()
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.tableItems = this.getMockTableItems()
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.error('获取固定表配置失败', err)
|
|
|
|
|
+ this.tableItems = this.getMockTableItems()
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ this.currentTemplateRow &&
|
|
|
|
|
+ this.currentTemplateRow.tableItems
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.tableItems = this.currentTemplateRow.tableItems
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.tableItems = this.getMockTableItems()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const currentYear = new Date().getFullYear()
|
|
|
|
|
+ this.auditPeriods = [
|
|
|
|
|
+ String(currentYear - 2),
|
|
|
|
|
+ String(currentYear - 1),
|
|
|
|
|
+ String(currentYear),
|
|
|
|
|
+ ]
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ const headerRes = await getListBySurveyFdTemplateIdAndVersion({
|
|
|
|
|
+ surveyTemplateId: this.getSurveyTemplateId(this.currentTemplateRow),
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ })
|
|
|
|
|
+ if (headerRes && headerRes.code === 200) {
|
|
|
|
|
+ this.fixedHeaders = headerRes.value || null
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.fixedHeaders = null
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.error('获取固定表表头配置失败', err)
|
|
|
|
|
+ this.fixedHeaders = null
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.fixedTableDialogVisible = true
|
|
|
|
|
+ },
|
|
|
|
|
+ getSurveyTemplateId(row) {
|
|
|
|
|
+ return (
|
|
|
|
|
+ row?.surveyTemplateId ||
|
|
|
|
|
+ row?.templateId ||
|
|
|
|
|
+ row?.surveyTemplateID ||
|
|
|
|
|
+ row?.templateID ||
|
|
|
|
|
+ ''
|
|
|
|
|
+ )
|
|
|
|
|
+ },
|
|
|
|
|
+ getMockFormFields() {
|
|
|
|
|
+ return []
|
|
|
|
|
+ },
|
|
|
|
|
+ getMockTableItems() {
|
|
|
|
|
+ return []
|
|
|
|
|
+ },
|
|
|
|
|
+ mapApiFieldToFormField(item, index = 0) {
|
|
|
|
|
+ if (!item) return null
|
|
|
|
|
+ const getVal = (keys, fallback) => {
|
|
|
|
|
+ for (const key of keys) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ key &&
|
|
|
|
|
+ item[key] !== undefined &&
|
|
|
|
|
+ item[key] !== null &&
|
|
|
|
|
+ item[key] !== ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return item[key]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return fallback
|
|
|
|
|
+ }
|
|
|
|
|
+ const prop =
|
|
|
|
|
+ getVal(
|
|
|
|
|
+ [
|
|
|
|
|
+ 'fieldName',
|
|
|
|
|
+ 'field_name',
|
|
|
|
|
+ 'columnName',
|
|
|
|
|
+ 'column_name',
|
|
|
|
|
+ 'fieldCode',
|
|
|
|
|
+ ],
|
|
|
|
|
+ undefined
|
|
|
|
|
+ ) || `field_${index}`
|
|
|
|
|
+ const label =
|
|
|
|
|
+ getVal(
|
|
|
|
|
+ [
|
|
|
|
|
+ 'columnComment',
|
|
|
|
|
+ 'column_comment',
|
|
|
|
|
+ 'fieldCname',
|
|
|
|
|
+ 'field_cname',
|
|
|
|
|
+ 'fieldLabel',
|
|
|
|
|
+ 'field_label',
|
|
|
|
|
+ ],
|
|
|
|
|
+ prop
|
|
|
|
|
+ ) || prop
|
|
|
|
|
+ return {
|
|
|
|
|
+ prop,
|
|
|
|
|
+ label,
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ colSpan: 12,
|
|
|
|
|
+ placeholder: `请输入${label}`,
|
|
|
|
|
+ rules: [],
|
|
|
|
|
+ defaultValue: '',
|
|
|
|
|
+ disabled: false,
|
|
|
|
|
+ clearable: true,
|
|
|
|
|
+ multiple: false,
|
|
|
|
|
+ required: false,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 加载监审文书
|
|
// 加载监审文书
|
|
|
async loadAuditDocument() {
|
|
async loadAuditDocument() {
|
|
|
try {
|
|
try {
|
|
@@ -1795,6 +2221,7 @@
|
|
|
surveyTemplateId: it.templateId || it.surveyTemplateId || '',
|
|
surveyTemplateId: it.templateId || it.surveyTemplateId || '',
|
|
|
catalogId: it.catalogId || this.catalogId || '',
|
|
catalogId: it.catalogId || this.catalogId || '',
|
|
|
auditedUnitId: it.auditedUnitId || this.auditedUnitId || '',
|
|
auditedUnitId: it.auditedUnitId || this.auditedUnitId || '',
|
|
|
|
|
+ templateType: t,
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
this.formData.costSurveyData = rows
|
|
this.formData.costSurveyData = rows
|