update 流程完善

This commit is contained in:
danshihao
2023-12-12 14:03:16 +08:00
parent f24673868a
commit 7f9791c67c
10 changed files with 58 additions and 36 deletions
@@ -113,7 +113,7 @@ import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import {
approvalInspectProcess,
getInspectProcessDetail,
getInspectProcessProjectId, saveInspectProcess, startInspectProcess, transferInspectProcess
getInspectProcessProjectId, rejectInspectProcess, saveInspectProcess, startInspectProcess, transferInspectProcess
} from '@api/workCenter'
export default {
@@ -304,6 +304,7 @@ export default {
// 流程信息
params.processAll = Object.assign({}, this.info.processAll, formDataList[0], {
projectId: this.projectId,
nodeId: this.$route.query.nodeId,
taskId: this.$route.query.taskId
})
@@ -441,7 +442,7 @@ export default {
this.loading = true
this.getPageParams().then(res => {
res.map.pass = false
return approvalInspectProcess(res)
return rejectInspectProcess(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -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, getFileIdByInspectId } from '@api/workCenter'
import { addInspectionContentTable, editInspectionContentTable, getFileByInspectId } from '@api/workCenter'
const Base64 = require('js-base64').Base64
@@ -104,13 +104,11 @@ export default {
methods: {
add (data) {
this.data = Object.assign({}, data)
// 后端获取预览文件id接口
getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
return res.success ? res.result.id : ''
}).then(fileId => {
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
})
// 后端获取预览文件
getFileByInspectId({ inspectId: data.inspectId }).then(res => {
if (res.success) {
this.handlePreview(res.result.id)
}
}).catch(err => {
console.log(err)
})
@@ -118,13 +116,11 @@ export default {
this.form.resetFields()
},
edit (data, record, index) {
// 后端获取预览文件id接口
getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
return res.success ? res.result.id : ''
}).then(fileId => {
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
})
// 后端获取预览文件
getFileByInspectId({ inspectId: data.inspectId }).then(res => {
if (res.success) {
this.handlePreview(res.result.id)
}
}).catch(err => {
console.log(err)
})