diff --git a/src/api/workCenter.js b/src/api/workCenter.js
index 1f75ec67..f4d6e72a 100644
--- a/src/api/workCenter.js
+++ b/src/api/workCenter.js
@@ -257,6 +257,8 @@ const editInspectProcessTable = (params) => postAction('/esinspect/processEsInsp
const addInspectionContentTable = (params) => postAction('/enterprise/InspectContent/add', params)
// 稽查流程表-稽查内容-编辑
const editInspectionContentTable = (params) => postAction('/enterprise/InspectContent/edit', params)
+// 稽查流程表-稽查内容-通过稽查id获取预览文件id
+const getFileIdByInspectId = (params) => getAction('/esinspect/processEsInspect/queryFileByInspectId', params)
// 稽查流程表-稽查内容-列表(下拉)
const getInspectionContentTable = (params) => getAction('/enterprise/InspectContent/queryClauseByEsInspectId', params)
// 稽查流程表-稽查报告-添加
@@ -476,6 +478,7 @@ export {
editInspectProcessTable,
addInspectionContentTable,
editInspectionContentTable,
+ getFileIdByInspectId,
getInspectionContentTable,
addInspectionReportTable,
editInspectionReportTable,
diff --git a/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue b/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue
index 7735aba0..699a0fe6 100644
--- a/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue
+++ b/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue
@@ -300,7 +300,7 @@ export default {
},
// 显示意见
handleShowOpinion (record) {
- this.$refs.writeOpinionModal.show(record, true)
+ this.$refs.writeOpinionModal.show(record)
},
// 填写意见
handleWriteOpinion (record) {
diff --git a/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContentModal.vue b/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContentModal.vue
index 105a8c62..4a71df93 100644
--- a/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContentModal.vue
+++ b/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContentModal.vue
@@ -57,7 +57,7 @@ import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
-import { addInspectionContentTable, editInspectionContentTable } from '@api/workCenter'
+import { addInspectionContentTable, editInspectionContentTable, getFileIdByInspectId } from '@api/workCenter'
const Base64 = require('js-base64').Base64
@@ -104,15 +104,29 @@ export default {
methods: {
add (data) {
this.data = Object.assign({}, data)
- this.getFileInfo(data.file).then(res => {
- this.handlePreview(res)
+ // 后端获取预览文件id接口
+ getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
+ return res.success ? res.result.id : ''
+ }).then(fileId => {
+ this.getFileInfo(fileId).then(res => {
+ this.handlePreview(res)
+ })
+ }).catch(err => {
+ console.log(err)
})
this.visible = true
this.form.resetFields()
},
edit (data, record, index) {
- this.getFileInfo(data.file).then(res => {
- this.handlePreview(res)
+ // 后端获取预览文件id接口
+ getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
+ return res.success ? res.result.id : ''
+ }).then(fileId => {
+ this.getFileInfo(fileId).then(res => {
+ this.handlePreview(res)
+ })
+ }).catch(err => {
+ console.log(err)
})
this.visible = true
this.index = index
diff --git a/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlanModal.vue b/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlanModal.vue
index cf56a0dc..a60b9647 100644
--- a/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlanModal.vue
+++ b/src/views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlanModal.vue
@@ -61,7 +61,7 @@
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="evaluateScore">
-