From 9ad65220ea3f8e1e422581acf0e4804dc010822c Mon Sep 17 00:00:00 2001 From: danshihao Date: Fri, 12 Jul 2024 20:07:07 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E6=A0=87=E5=87=86=E8=A7=A3=E8=AF=BB?= =?UTF-8?q?=E6=B5=81=E7=A8=8B]=20=E5=BF=AB=E7=85=A7=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E3=80=81=E5=AF=BC=E5=85=A5=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardInterpretationProcess.vue | 25 ++++++++++++------- .../modules/InterpretationClauseTable.vue | 2 ++ 2 files changed, 18 insertions(+), 9 deletions(-) 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()