From 61d4f22dc08f66d7c04a0a83ff47419fecdf6cf9 Mon Sep 17 00:00:00 2001 From: danshihao Date: Wed, 22 Nov 2023 18:18:47 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=81=E6=A0=87=E7=A8=BD=E6=9F=A5?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workCenter.js | 2 +- src/views/system/UserAnnouncementDetail.vue | 4 +- .../EnterpriseStandardInspectionPlanFlow.vue | 60 ++++++++++++------- .../modules/InspectionPlanDrawer.vue | 2 +- .../modules/InspectionPlanTable.vue | 6 +- 5 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/api/workCenter.js b/src/api/workCenter.js index d5d9ea97..2603994b 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -212,7 +212,7 @@ const refusalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/fl // 审批 const approvalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowApproval', params) // 转办 -const transferInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowTransfer', params) +const transferInspectPlan = (params) => getAction('/process/esInspectPlanFlow/flowTransfer', params) // 保存 const saveInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowSave', params) // 稽查计划表-添加 diff --git a/src/views/system/UserAnnouncementDetail.vue b/src/views/system/UserAnnouncementDetail.vue index 2b4220d7..b955f34e 100644 --- a/src/views/system/UserAnnouncementDetail.vue +++ b/src/views/system/UserAnnouncementDetail.vue @@ -7,9 +7,7 @@ {{ $t('message.my.notificationTime') }}:{{ model.sendTime }} -
- {{ model.msgContent }} -
+
diff --git a/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue b/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue index dcf20d0c..fc2fd535 100644 --- a/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue +++ b/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue @@ -226,9 +226,8 @@ export default { // 查询人员信息 this.getPersonInfoStructure(ProcessKey.ES_Inspection_Plan.value) // 如果是待办进来,就获取详情数据 - const { projectId, taskId } = this.$route.query - if (projectId || taskId) { - this.loadPage({ projectId, taskId }) + if (this.$route.query.projectId) { + this.loadPage() return } this.getProjectId() @@ -253,9 +252,14 @@ export default { /** * 获取页面详情 */ - loadPage (params) { - this.currentNode = this.$route.query.nodeId - this.projectId = this.$route.query.projectId + loadPage () { + let { projectId, taskId, nodeId } = this.$route.query + // 草稿进来没有nodeId,就默认发起节点 + if (!nodeId) { + nodeId = EsInspectionPlan.initiate.value + } + this.currentNode = nodeId + this.projectId = projectId this.initPersonInfoData(this.currentNode === EsInspectionPlan.initiate.value) switch (this.currentNode) { case EsInspectionPlan.initiate.value: @@ -275,14 +279,25 @@ export default { break } this.loading = true - getInspectPlanDetail(params).then(res => { + getInspectPlanDetail({ + projectId, + taskId + }).then(res => { if (res.success) { const data = res.result || {} this.info = data - this.processInfoForm.setFieldsValue({ - prcName: data.processAll.prcName, - dueTime: data.processAll.dueTime, - prcMes: data.processAll.prcMes + this.$nextTick(() => { + this.processInfoForm.setFieldsValue({ + prcName: data.processAll.prcName, + dueTime: data.processAll.dueTime, + prcMes: data.processAll.prcMes + }) + }) + this.$nextTick(() => { + this.approvalInfoForm.setFieldsValue({ + commitText: data.processApprovalRecord.commitText, + commitFile: data.processApprovalRecord.commitFile + }) }) } }).finally(() => { @@ -334,6 +349,9 @@ export default { if (params.map.pass) { params.map.pass = params.map.pass + '' === '1' } + if (params.map.involveList && typeof params.map.involveList === 'string') { + params.map.involveList = params.map.involveList.split(',') + } resolve(params) }).catch(err => { reject(err) @@ -354,7 +372,7 @@ export default { personnelObj.opinionFillList = this.$refs.inspectionPlanTable.dataSource.map(item => item.objectOfConsultation) } params.processAll = Object.assign({}, this.info.processAll, this.processInfoForm.getFieldsValue()) - if (params.processAll.dueTime && params.processAll.dueTime.includes(' 00:00:00')) { + if (params.processAll.dueTime && !params.processAll.dueTime.includes(' 00:00:00')) { params.processAll.dueTime = params.processAll.dueTime + ' 00:00:00' } params.processAll.projectId = this.projectId @@ -365,6 +383,9 @@ export default { if (params.map.pass) { params.map.pass = params.map.pass + '' === '1' } + if (params.map.involveList && typeof params.map.involveList === 'string') { + params.map.involveList = params.map.involveList.split(',') + } resolve(params) } }) @@ -378,17 +399,14 @@ export default { /** * 转办 */ - continueTurnTo () { + continueTurnTo (userId) { if (this.loading) return this.loading = true - // const params = { - // taskId: this.$route.query.taskId, - // userId: this.$route.query.taskId, - // } - this.getPageParams().then(res => { - console.log(res) - return transferInspectPlan(res) - }).then(res => { + const params = { + taskId: this.$route.query.taskId, + userId + } + transferInspectPlan(params).then(res => { if (res.success) { this.$message.success(res.message) this.goBack() diff --git a/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanDrawer.vue b/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanDrawer.vue index 1d1803a4..1d75f0f5 100644 --- a/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanDrawer.vue +++ b/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanDrawer.vue @@ -52,7 +52,7 @@ diff --git a/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue b/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue index e1ca741f..bf48cda8 100644 --- a/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue +++ b/src/views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable.vue @@ -4,7 +4,7 @@ {{ $t('newlyAdded') }} - + {{ $t('import') }} @@ -45,14 +45,14 @@