|
@@ -16,7 +16,7 @@
|
|
|
:form-fields="formFields"
|
|
:form-fields="formFields"
|
|
|
:is-view-mode="true"
|
|
:is-view-mode="true"
|
|
|
:audited-unit-id="auditedUnitId"
|
|
:audited-unit-id="auditedUnitId"
|
|
|
- :request-type="2"
|
|
|
|
|
|
|
+ :request-type="viewContext === 'costSurvey' ? 1 : 2"
|
|
|
:upload-id="
|
|
:upload-id="
|
|
|
(currentTemplateRow &&
|
|
(currentTemplateRow &&
|
|
|
(currentTemplateRow.uploadId || currentTemplateRow.id)) ||
|
|
(currentTemplateRow.uploadId || currentTemplateRow.id)) ||
|
|
@@ -29,10 +29,12 @@
|
|
|
<fixed-table-dialog
|
|
<fixed-table-dialog
|
|
|
:visible.sync="fixedTableDialogVisible"
|
|
:visible.sync="fixedTableDialogVisible"
|
|
|
:survey-data="{ ...(currentTemplateRow || {}), fixedHeaders }"
|
|
:survey-data="{ ...(currentTemplateRow || {}), fixedHeaders }"
|
|
|
|
|
+ :fixed-fields="fixedFields || ''"
|
|
|
|
|
+ :fixed-fieldids="fixedFieldids || ''"
|
|
|
:table-items="tableItems"
|
|
:table-items="tableItems"
|
|
|
:audit-periods="auditPeriods"
|
|
:audit-periods="auditPeriods"
|
|
|
:is-view-mode="true"
|
|
:is-view-mode="true"
|
|
|
- :request-type="2"
|
|
|
|
|
|
|
+ :request-type="viewContext === 'costSurvey' ? 1 : 2"
|
|
|
:audited-unit-id="auditedUnitId"
|
|
:audited-unit-id="auditedUnitId"
|
|
|
:upload-id="
|
|
:upload-id="
|
|
|
(currentTemplateRow &&
|
|
(currentTemplateRow &&
|
|
@@ -50,7 +52,7 @@
|
|
|
:table-data="dynamicTableData"
|
|
:table-data="dynamicTableData"
|
|
|
:table-items="tableItems"
|
|
:table-items="tableItems"
|
|
|
:is-view-mode="true"
|
|
:is-view-mode="true"
|
|
|
- :request-type="2"
|
|
|
|
|
|
|
+ :request-type="viewContext === 'costSurvey' ? 1 : 2"
|
|
|
:audited-unit-id="auditedUnitId"
|
|
:audited-unit-id="auditedUnitId"
|
|
|
:upload-id="
|
|
:upload-id="
|
|
|
(currentTemplateRow &&
|
|
(currentTemplateRow &&
|
|
@@ -1139,6 +1141,8 @@
|
|
|
surveyFormDialogVisible: false,
|
|
surveyFormDialogVisible: false,
|
|
|
fixedTableDialogVisible: false,
|
|
fixedTableDialogVisible: false,
|
|
|
dynamicTableDialogVisible: false,
|
|
dynamicTableDialogVisible: false,
|
|
|
|
|
+ // 视图上下文:'costSurvey' 或 'dataRequirements'
|
|
|
|
|
+ viewContext: 'dataRequirements',
|
|
|
formFields: [],
|
|
formFields: [],
|
|
|
surveyDetailData: {},
|
|
surveyDetailData: {},
|
|
|
tableItems: [],
|
|
tableItems: [],
|
|
@@ -1146,6 +1150,8 @@
|
|
|
dynamicTableData: [],
|
|
dynamicTableData: [],
|
|
|
dynamicDialogKey: 0,
|
|
dynamicDialogKey: 0,
|
|
|
fixedHeaders: null,
|
|
fixedHeaders: null,
|
|
|
|
|
+ fixedFields: '',
|
|
|
|
|
+ fixedFieldids: '',
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -1569,29 +1575,7 @@
|
|
|
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) {
|
|
async handleOnlineSubmission(row) {
|
|
|
if (!row) return
|
|
if (!row) return
|
|
@@ -1605,7 +1589,7 @@
|
|
|
const params = {
|
|
const params = {
|
|
|
uploadId: row.uploadId || row.id,
|
|
uploadId: row.uploadId || row.id,
|
|
|
auditedUnitId: this.auditedUnitId,
|
|
auditedUnitId: this.auditedUnitId,
|
|
|
- type: 2,
|
|
|
|
|
|
|
+ type: this.viewContext === 'costSurvey' ? 1 : 2,
|
|
|
}
|
|
}
|
|
|
const res = await getSurveyDetail(params)
|
|
const res = await getSurveyDetail(params)
|
|
|
if (res && res.code === 200 && res.value) {
|
|
if (res && res.code === 200 && res.value) {
|
|
@@ -1638,6 +1622,8 @@
|
|
|
(row && (row.templateType || row.templatetype)) || ''
|
|
(row && (row.templateType || row.templatetype)) || ''
|
|
|
).trim()
|
|
).trim()
|
|
|
if (t === '1' || t === '2' || t === '3') {
|
|
if (t === '1' || t === '2' || t === '3') {
|
|
|
|
|
+ // 报送资料查看
|
|
|
|
|
+ this.viewContext = 'dataRequirements'
|
|
|
this.handleOnlineSubmission(row)
|
|
this.handleOnlineSubmission(row)
|
|
|
} else {
|
|
} else {
|
|
|
this.$message &&
|
|
this.$message &&
|
|
@@ -1645,6 +1631,19 @@
|
|
|
this.$message.warning('未知的模板类型,无法打开预置模板')
|
|
this.$message.warning('未知的模板类型,无法打开预置模板')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ handleCostSurveyView(row) {
|
|
|
|
|
+ // 成本调查表查看
|
|
|
|
|
+ this.viewContext = 'costSurvey'
|
|
|
|
|
+ const templateRow = {
|
|
|
|
|
+ ...row,
|
|
|
|
|
+ uploadId: row.id,
|
|
|
|
|
+ surveyTemplateId: row.surveyTemplateId || row.templateId || '',
|
|
|
|
|
+ catalogId: row.catalogId || this.catalogId || '',
|
|
|
|
|
+ auditedUnitId: row.auditedUnitId || this.auditedUnitId || '',
|
|
|
|
|
+ informationName: row.name,
|
|
|
|
|
+ }
|
|
|
|
|
+ this.handleOnlineSubmission(templateRow)
|
|
|
|
|
+ },
|
|
|
async initDynamicTableData() {
|
|
async initDynamicTableData() {
|
|
|
try {
|
|
try {
|
|
|
const uploadId =
|
|
const uploadId =
|
|
@@ -1664,7 +1663,7 @@
|
|
|
auditedUnitId,
|
|
auditedUnitId,
|
|
|
catalogId,
|
|
catalogId,
|
|
|
surveyTemplateId,
|
|
surveyTemplateId,
|
|
|
- type: 2,
|
|
|
|
|
|
|
+ type: this.viewContext === 'costSurvey' ? 1 : 2,
|
|
|
}
|
|
}
|
|
|
const res = await getDynamicTableData(params)
|
|
const res = await getDynamicTableData(params)
|
|
|
if (res && res.code === 200) {
|
|
if (res && res.code === 200) {
|
|
@@ -1704,7 +1703,7 @@
|
|
|
surveyTemplateId: this.getSurveyTemplateId(
|
|
surveyTemplateId: this.getSurveyTemplateId(
|
|
|
this.currentTemplateRow
|
|
this.currentTemplateRow
|
|
|
),
|
|
),
|
|
|
- type: 2,
|
|
|
|
|
|
|
+ type: this.viewContext === 'costSurvey' ? 1 : 2,
|
|
|
}
|
|
}
|
|
|
const res = await getListBySurveyFdTemplateIdAndVersion(params)
|
|
const res = await getListBySurveyFdTemplateIdAndVersion(params)
|
|
|
if (res && res.code === 200) {
|
|
if (res && res.code === 200) {
|
|
@@ -1761,7 +1760,7 @@
|
|
|
surveyTemplateId: this.getSurveyTemplateId(
|
|
surveyTemplateId: this.getSurveyTemplateId(
|
|
|
this.currentTemplateRow
|
|
this.currentTemplateRow
|
|
|
),
|
|
),
|
|
|
- type: 2,
|
|
|
|
|
|
|
+ type: this.viewContext === 'costSurvey' ? 1 : 2,
|
|
|
}
|
|
}
|
|
|
const res = await getSingleRecordSurveyList(params)
|
|
const res = await getSingleRecordSurveyList(params)
|
|
|
if (res && res.code === 200 && res.value) {
|
|
if (res && res.code === 200 && res.value) {
|
|
@@ -1787,6 +1786,11 @@
|
|
|
children: item.children || [],
|
|
children: item.children || [],
|
|
|
...item,
|
|
...item,
|
|
|
}))
|
|
}))
|
|
|
|
|
+ // 如果接口返回 fixedFields/fixedFieldids,一并保存,供弹窗表头渲染
|
|
|
|
|
+ if (res.value.fixedFields && res.value.fixedFieldids) {
|
|
|
|
|
+ this.fixedFields = res.value.fixedFields
|
|
|
|
|
+ this.fixedFieldids = res.value.fixedFieldids
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
this.tableItems = this.getMockTableItems()
|
|
this.tableItems = this.getMockTableItems()
|
|
|
}
|
|
}
|
|
@@ -1816,7 +1820,7 @@
|
|
|
try {
|
|
try {
|
|
|
const headerRes = await getListBySurveyFdTemplateIdAndVersion({
|
|
const headerRes = await getListBySurveyFdTemplateIdAndVersion({
|
|
|
surveyTemplateId: this.getSurveyTemplateId(this.currentTemplateRow),
|
|
surveyTemplateId: this.getSurveyTemplateId(this.currentTemplateRow),
|
|
|
- type: 2,
|
|
|
|
|
|
|
+ type: this.viewContext === 'costSurvey' ? 1 : 2,
|
|
|
})
|
|
})
|
|
|
if (headerRes && headerRes.code === 200) {
|
|
if (headerRes && headerRes.code === 200) {
|
|
|
this.fixedHeaders = headerRes.value || null
|
|
this.fixedHeaders = headerRes.value || null
|