|
|
@@ -148,6 +148,14 @@
|
|
|
<template v-else>
|
|
|
<!-- v-if="scope.row.isUpload === 1 || scope.row.isUpload === '1'" -->
|
|
|
<el-button
|
|
|
+ v-if="scope.row.isUpload === 1 || scope.row.isUpload === '1'"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="handleViewTemplate(scope.row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="handleTemplateDownload(scope.row)"
|
|
|
@@ -178,6 +186,37 @@
|
|
|
style="display: none"
|
|
|
@change="handleDataFileChange"
|
|
|
/>
|
|
|
+
|
|
|
+ <!-- 单记录弹窗(查看模式) -->
|
|
|
+ <survey-form-dialog
|
|
|
+ :visible.sync="singleDialogVisible"
|
|
|
+ :survey-data="{}"
|
|
|
+ :is-view-mode="true"
|
|
|
+ :audited-unit-id="auditedUnitId"
|
|
|
+ :upload-id="(currentTemplateRow && currentTemplateRow.uploadId) || ''"
|
|
|
+ :survey-template-id="getSurveyTemplateId(currentTemplateRow)"
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 固定表弹窗(查看模式) -->
|
|
|
+ <fixed-table-dialog
|
|
|
+ :visible.sync="fixedDialogVisible"
|
|
|
+ :is-view-mode="true"
|
|
|
+ :audited-unit-id="auditedUnitId"
|
|
|
+ :upload-id="(currentTemplateRow && currentTemplateRow.uploadId) || ''"
|
|
|
+ :survey-template-id="getSurveyTemplateId(currentTemplateRow)"
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 动态表弹窗(查看模式) -->
|
|
|
+ <dynamic-table-dialog
|
|
|
+ :visible.sync="dynamicDialogVisible"
|
|
|
+ :is-view-mode="true"
|
|
|
+ :audited-unit-id="auditedUnitId"
|
|
|
+ :upload-id="(currentTemplateRow && currentTemplateRow.uploadId) || ''"
|
|
|
+ :survey-template-id="getSurveyTemplateId(currentTemplateRow)"
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -186,8 +225,16 @@
|
|
|
downloadPresetTemplate,
|
|
|
uploadPresetTemplate,
|
|
|
} from '@/api/auditTaskProcessing'
|
|
|
+ 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'
|
|
|
export default {
|
|
|
name: 'DataRequirementsTab',
|
|
|
+ components: {
|
|
|
+ SurveyFormDialog,
|
|
|
+ FixedTableDialog,
|
|
|
+ DynamicTableDialog,
|
|
|
+ },
|
|
|
props: {
|
|
|
dataRequirements: {
|
|
|
type: Array,
|
|
|
@@ -218,6 +265,11 @@
|
|
|
return {
|
|
|
pendingUploadRow: null,
|
|
|
dataUploadAccept: '.xls,.xlsx',
|
|
|
+ // 模板查看相关
|
|
|
+ currentTemplateRow: null,
|
|
|
+ singleDialogVisible: false,
|
|
|
+ fixedDialogVisible: false,
|
|
|
+ dynamicDialogVisible: false,
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
|
@@ -256,6 +308,24 @@
|
|
|
this.$message.error('文件预览失败')
|
|
|
}
|
|
|
},
|
|
|
+ // 模版查看:与 submitData.vue 的 handleViewTemplate 保持一致
|
|
|
+ handleViewTemplate(row) {
|
|
|
+ this.currentTemplateRow = row || null
|
|
|
+ const t = String(
|
|
|
+ (row && (row.templateType || row.templatetype)) || ''
|
|
|
+ ).trim()
|
|
|
+ if (t === '1') {
|
|
|
+ this.singleDialogVisible = true
|
|
|
+ } else if (t === '2') {
|
|
|
+ this.fixedDialogVisible = true
|
|
|
+ } else if (t === '3') {
|
|
|
+ this.dynamicDialogVisible = true
|
|
|
+ } else {
|
|
|
+ this.$message &&
|
|
|
+ this.$message.warning &&
|
|
|
+ this.$message.warning('未知的模板类型,无法打开预置模板')
|
|
|
+ }
|
|
|
+ },
|
|
|
// 根据资料类型返回上传accept白名单
|
|
|
getUploadAccept(row) {
|
|
|
const fmt = row && row.formatRequired
|