From 1116a0ec92c773078e9274a0c8df9c49d9d77389 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 25 Dec 2023 14:07:29 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E5=88=B6=E4=BF=AE=E8=AE=A2=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnterpriseStandardRevisionFlow.vue | 59 +++++++++---- .../modules/CommentObjectEnterBaseInfo.vue | 4 +- .../modules/ConfirmWhetherCommentBaseInfo.vue | 84 +++++++++---------- .../modules/DepartLiaisonIssueBaseInfo.vue | 2 +- ...MainDrafterCollectUploadMinuteBaseInfo.vue | 11 ++- .../modules/MainDrafterSentBaseInfo.vue | 4 +- .../OtherDrafterUploadStandardBaseInfo.vue | 4 +- .../modules/ScorerMarkBaseInfo.vue | 12 ++- 8 files changed, 110 insertions(+), 70 deletions(-) diff --git a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue index 3c69924a..8bcca041 100644 --- a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue +++ b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue @@ -384,12 +384,26 @@ export default { this.$nextTick(() => { // 初始化流程信息 this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes')) - // 初始化流程审批信息,草稿进来的才回显审批信息 + // 草稿进来的回显 if (type === 'draft') { - this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile')) + // 初始化流程信息 + const prcObj = Object.assign({}, this.model) + prcObj.dueTime = this.model.processDueDate + prcObj.prcMes = this.model.processDescription + this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes')) + // 初始化流程审批信息 + prcObj.commitText = this.model.handleText + prcObj.commitFile = this.model.handleFile + this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile')) + this.model.data = JSON.parse(this.model.infoJsonStr).data + // 如果是节点1的保存回显人员信息 + if (this.currentNode === 1) { + this.draftInitPersonInfo(JSON.parse(this.model.infoJsonStr).personnelObj) + } + } + if (this.$refs.baseInfoRef) { + this.$refs.baseInfoRef.initData(this.model.data) } - // 初始化业务基本信息中组件内容 - this.$refs.baseInfoRef.initData(this.model.data) }) } else { this.$message.warning(res.message) @@ -438,26 +452,43 @@ export default { const personnelObj = this.$refs.personnelInfo.getDataObj() // 需要传给后端的 const paramObj = {} - paramObj.common = { ...processInfoForm, ...approvalInfoForm } - paramObj.flowUser = personnelObj + // 流程信息 + paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm) + paramObj.basicProcessInfoDTO.processName = paramObj.basicProcessInfoDTO.prcName + paramObj.basicProcessInfoDTO.processDueDate = paramObj.basicProcessInfoDTO.dueTime + paramObj.basicProcessInfoDTO.processDescription = paramObj.basicProcessInfoDTO.prcMes + paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId + // 流程审批信息 + paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm) + paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText + paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile + paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId + // paramObj.common = { ...processInfoForm, ...approvalInfoForm } + // paramObj.flowUser = personnelObj // 业务基本信息 if (this.$refs.baseInfoRef) { // 业务基本信息 const baseInfo = this.$refs.baseInfoRef.getData() - const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...baseInfo.formInline } + const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...baseInfo } const flag = Object.values(param).some(v => !!v || v === 0) - if (!flag || (baseInfo.dataSource && baseInfo.dataSource.length <= 0)) { + if (!flag) { // 提示至少填写一项 this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) return - } - if (baseInfo.dataSource) { - paramObj.dataList = baseInfo.dataSource.map(item => { - return { ...item, ...baseInfo.formInline } - }) } else { - paramObj.dataList = [baseInfo.formInline] + // 业务基本信息和人员信息 + paramObj.infoJsonStr = JSON.stringify({ + data: Object.assign({}, baseInfo), + personnelObj: personnelObj + }) } + // if (baseInfo.dataSource) { + // paramObj.dataList = baseInfo.dataSource.map(item => { + // return { ...item, ...baseInfo.formInline } + // }) + // } else { + // paramObj.dataList = [baseInfo.formInline] + // } } else { // 需要外层信息至少填了一项 const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue index efb301d9..a5749ae3 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue @@ -122,14 +122,14 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.dataSource = this.dataSource + data.advices = this.dataSource return data }, // 外层获取数据要过校验,返回false表示没有通过校验 getDataValidate () { if (this.dataSource && this.dataSource.length > 0) { const data = {} - data.dataSource = this.dataSource + data.advices = this.dataSource return data } else { this.$message.warning(this.$t('addAtLeastOneRowOfData')) diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue index 0d34f515..f3701ec2 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue @@ -2,59 +2,57 @@
-
-
- -
-
+
+ +
+
{{ $t('workCenter.enStandardRevision.standardText') }} -
- -
- -

企业标准

- {{ $t('workCenter.enStandardRevision.onLineEditing') }} -
-
- -
-
+ +
+ +

企业标准

+ {{ $t('workCenter.enStandardRevision.onLineEditing') }} +
+
+
+ +
+
{{ $t('workCenter.enStandardRevision.isOpenComment') }} -
- - - - {{ $t('yes') }} - - - {{ $t('not') }} - - -
- -
-
- * - + + + + {{ $t('yes') }} + + + {{ $t('not') }} + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.departmentalLiaison') }} -
- - -
+ + +
@@ -123,7 +121,7 @@ export default { let data = {} await this.$refs.ruleForm.validate(valid => { if (valid) { - const data = Object.assign({}, this.formInline) + data = Object.assign({}, this.formInline) } else { data = false } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue index 312fc305..e6d4bbe2 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue @@ -101,7 +101,7 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表单赋值,在线编辑不知道要怎么赋值? - this.formInline = Object.assign(data) + this.formInline = Object.assign({}, data) // 给表单赋值 this.$nextTick(() => { this.$refs.baseInfoForm.initData(data) diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue index 6a113bff..5b354b22 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue @@ -292,8 +292,8 @@ export default { initData (data) { // 给表格赋值,在线编辑不知道要怎么赋值? this.drafterDataSource = data.otherDraftUserVOS - // this.dataSource = - // this.formInline = + this.dataSource = data.inspectContents || [] + this.formInline = Object.assign({}, data) // 给表单赋值 this.$nextTick(() => { this.$refs.baseInfoForm.initData(data) @@ -302,9 +302,8 @@ export default { // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 - const data = {} - data.dataSource = this.dataSource - data.formInline = this.formInline + const data = Object.assign({}, this.formInline) + data.inspectContents = this.dataSource || [] return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -317,7 +316,7 @@ export default { // 每一个的整改部门都填了 // 有数据可以抛出 data = Object.assign({}, this.formInline) - data.inspectContents = this.dataSource + data.inspectContents = this.dataSource || [] } else { this.$message.warning(this.$t('pleaseCompleteTableInfo')) data = false diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue index 0531687f..3cff55a9 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterSentBaseInfo.vue @@ -124,8 +124,8 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.dataSource = this.dataSource - data.formInline = this.$refs.baseInfoForm.formInline + data.otherDraftUserVOS = this.dataSource + data.businessJson = JSON.stringify(this.$refs.baseInfoForm.formInline) return data }, // 外层获取数据要过校验,返回false表示没有通过校验 diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue index e96432be..e37792a4 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue @@ -119,6 +119,8 @@ export default { // 外层要获取数据 getData () { // 把数据抛出 + const data = {} + data.otherDraftUserVOS = this.dataSource return this.dataSource }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -138,7 +140,7 @@ export default { this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseUploadStandard')) data = false } else { - data.dataSource = this.dataSource + data.otherDraftUserVOS = this.dataSource } } else { data = false diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue index e165f7d7..c897579b 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue @@ -299,7 +299,17 @@ export default { getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.reviewMeetingDetails = this.dataSource + const arr = [] + for (const item in this.dataSource) { + if (item % 3 === 0 && this.dataSource[item].evaluateScore && this.dataSource[item].deductionScoreReason) { + // 是有评分和扣分理由的行 + arr.push({ + ...this.dataSource[item], + evaluateItem: ((item % 3) + 1) + '' + }) + } + } + data.reviewMeetingDetails = arr return data }, // 外层获取数据要过校验,返回false表示没有通过校验