diff --git a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue index ce87930..e432e04 100644 --- a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue +++ b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue @@ -148,7 +148,8 @@ import { interpretFlowApproval, interpretFlowSave, interpretFlowReject, - interpretFlowTransfer + interpretFlowTransfer, + getLookData } from '@api/workCenter' import InterpretationInitiate from '@views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate' import UserSelectModal from '@comp/selection/UserSelectModal' @@ -245,7 +246,8 @@ export default { } }, created () { - const { projectId, nodeId, taskName } = this.$route.query + const { projectId, nodeId, taskName, snapshotId, isLook } = this.$route.query + this.isLook = isLook // 发起、草稿进来没有nodeId,就默认发起节点 this.currentNodeId = nodeId || StandardInterpretationNodes.initiated.value this.currentNodeName = taskName || StandardInterpretationNodes.initiated.text @@ -255,8 +257,8 @@ export default { this.getPersonInfoStructure(this.processKey, () => { this.initPersonInfoData(this.isInitiate) }) - // 如果是待办或草稿进来,就获取详情数据 - if (this.$route.query.projectId) { + // 如果是待办或草稿或快照进来,就获取详情数据 + if (projectId || snapshotId) { this.loadPage() return } @@ -278,13 +280,18 @@ export default { * 获取页面详情 */ loadPage () { - const { projectId, taskId, draftId } = this.$route.query + const { projectId, taskId, draftId, snapshotId } = this.$route.query this.loading = true - interpretGetDetail({ - projectId, - taskId - }).then(res => { + let requestPromise = interpretGetDetail({ projectId, taskId, snapshotId }) + // 快照单独请求 + if (snapshotId) { + requestPromise = getLookData({ snapshotId }) + } + requestPromise.then(res => { if (res.success) { + if (snapshotId) { + res.result = JSON.parse(res.result.infoJsonStr).pageData + } const data = res.result || {} const processAll = data.processAll || {} const processApprovalRecord = data.processApprovalRecord || {} diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue index 9df1e71..2406fbb 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue @@ -581,6 +581,8 @@ export default { } // 前端存储,没有id的数据,前端加上uuid const data = info.file.response.result || [] + // 删除之前的数据,覆盖重新导入的 + this.processAllDelIds.push(...this.dataSource.map(item => item[this.rowKey])) this.dataSource = data.map(item => { // 导入的时候生成前端id,不用索引防止禁用出错 item.id = randomUUID()