|
|
@@ -25,13 +25,18 @@
|
|
|
min-width="200"
|
|
|
/>
|
|
|
|
|
|
- <el-table-column label="资料类型" width="120" align="center">
|
|
|
+ <el-table-column label="资料类型" width="200" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
|
- :class="{
|
|
|
- 'template-tag': scope.row.templateId,
|
|
|
- }"
|
|
|
+ v-if="
|
|
|
+ Number(scope.row.formatRequired) === 3 && scope.row.templateId
|
|
|
+ "
|
|
|
+ :title="'点击查看模板'"
|
|
|
+ style="cursor: pointer"
|
|
|
>
|
|
|
+ {{ `预置模板(${getTemplateTypeName(scope.row.templateType)})` }}
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
{{ getFormatType(scope.row.formatRequired) }}
|
|
|
</span>
|
|
|
</template>
|
|
|
@@ -138,22 +143,57 @@
|
|
|
<el-button type="primary" @click="handleAuditSubmit">提交</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
|
|
|
-<style scoped>
|
|
|
- .result-pending {
|
|
|
- color: #909399;
|
|
|
- }
|
|
|
+ <survey-form-dialog
|
|
|
+ :visible.sync="singleDialogVisible"
|
|
|
+ :survey-data="{}"
|
|
|
+ :is-view-mode="true"
|
|
|
+ :audited-unit-id="
|
|
|
+ (currentTemplateRow && currentTemplateRow.auditedUnitId) || ''
|
|
|
+ "
|
|
|
+ :upload-id="(currentTemplateRow && currentTemplateRow.uploadId) || ''"
|
|
|
+ :survey-template-id="
|
|
|
+ (currentTemplateRow &&
|
|
|
+ (currentTemplateRow.templateId ||
|
|
|
+ currentTemplateRow.surveyTemplateId)) ||
|
|
|
+ ''
|
|
|
+ "
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
+ />
|
|
|
|
|
|
- .result-pass {
|
|
|
- color: #67c23a;
|
|
|
- }
|
|
|
+ <fixed-table-dialog
|
|
|
+ :visible.sync="fixedDialogVisible"
|
|
|
+ :is-view-mode="true"
|
|
|
+ :audited-unit-id="
|
|
|
+ (currentTemplateRow && currentTemplateRow.auditedUnitId) || ''
|
|
|
+ "
|
|
|
+ :upload-id="(currentTemplateRow && currentTemplateRow.uploadId) || ''"
|
|
|
+ :survey-template-id="
|
|
|
+ (currentTemplateRow &&
|
|
|
+ (currentTemplateRow.templateId ||
|
|
|
+ currentTemplateRow.surveyTemplateId)) ||
|
|
|
+ ''
|
|
|
+ "
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
+ />
|
|
|
|
|
|
- .result-fail {
|
|
|
- color: #f56c6c;
|
|
|
- }
|
|
|
-</style>
|
|
|
+ <dynamic-table-dialog
|
|
|
+ :visible.sync="dynamicDialogVisible"
|
|
|
+ :is-view-mode="true"
|
|
|
+ :audited-unit-id="
|
|
|
+ (currentTemplateRow && currentTemplateRow.auditedUnitId) || ''
|
|
|
+ "
|
|
|
+ :upload-id="(currentTemplateRow && currentTemplateRow.uploadId) || ''"
|
|
|
+ :survey-template-id="
|
|
|
+ (currentTemplateRow &&
|
|
|
+ (currentTemplateRow.templateId ||
|
|
|
+ currentTemplateRow.surveyTemplateId)) ||
|
|
|
+ ''
|
|
|
+ "
|
|
|
+ :catalog-id="(currentTemplateRow && currentTemplateRow.catalogId) || ''"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
@@ -164,9 +204,17 @@
|
|
|
getDataPreliminaryReviewButton,
|
|
|
doProcessBtn,
|
|
|
} from '@/api/dataPreliminaryReview'
|
|
|
+ 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: 'AuditReview',
|
|
|
+ components: {
|
|
|
+ SurveyFormDialog,
|
|
|
+ FixedTableDialog,
|
|
|
+ DynamicTableDialog,
|
|
|
+ },
|
|
|
props: {
|
|
|
id: {
|
|
|
type: [String, Number],
|
|
|
@@ -208,6 +256,10 @@
|
|
|
materialData: [],
|
|
|
// 按类型分组的材料数据
|
|
|
materialCategories: [],
|
|
|
+ currentTemplateRow: null,
|
|
|
+ singleDialogVisible: false,
|
|
|
+ fixedDialogVisible: false,
|
|
|
+ dynamicDialogVisible: false,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -282,12 +334,22 @@
|
|
|
},
|
|
|
// 获取格式类型
|
|
|
getFormatType(formatRequired) {
|
|
|
- const formatMap = {
|
|
|
+ const map = {
|
|
|
1: '文档文件',
|
|
|
- 2: '预置模板',
|
|
|
- 3: 'Excel文件',
|
|
|
+ 2: 'excel',
|
|
|
+ 3: '预置模板',
|
|
|
+ }
|
|
|
+ const k = Number(formatRequired)
|
|
|
+ return map[k] || '文档文件'
|
|
|
+ },
|
|
|
+ getTemplateTypeName(t) {
|
|
|
+ const map = {
|
|
|
+ 1: '单记录',
|
|
|
+ 2: '固定表',
|
|
|
+ 3: '动态表',
|
|
|
}
|
|
|
- return formatMap[formatRequired] || '文档文件'
|
|
|
+ const k = String(t || '').trim()
|
|
|
+ return map[k] || map[Number(k)] || ''
|
|
|
},
|
|
|
// 资料初审按钮点击事件
|
|
|
handleAuditPass(row) {
|
|
|
@@ -330,9 +392,7 @@
|
|
|
row?.path ||
|
|
|
''
|
|
|
if (!filePath) {
|
|
|
- this.$message &&
|
|
|
- this.$message.warning &&
|
|
|
- this.$message.warning('未找到可预览的文件路径')
|
|
|
+ this.handleViewTemplate(row)
|
|
|
return
|
|
|
}
|
|
|
const encodedUrl = encodeURIComponent(
|
|
|
@@ -346,6 +406,23 @@
|
|
|
// this.$message.error('文件预览失败')
|
|
|
}
|
|
|
},
|
|
|
+ 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('未知的模板类型,无法打开预置模板')
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查看报表
|
|
|
handleViewReport(row) {
|
|
|
this.$message.info(`查看报表:${row.name}`)
|