From 370b6abef685337d04c8bd8e388e62e97fc8508d Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 22 Dec 2023 16:23:06 +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 | 15 +- .../modules/BaseInfoForm.vue | 7 +- .../modules/CommentModal.vue | 10 +- .../modules/CommentObjectEnterBaseInfo.vue | 14 +- .../modules/ConfirmWhetherCommentBaseInfo.vue | 37 ++- .../modules/DepartLiaisonCollectBaseInfo.vue | 33 +- .../modules/DepartLiaisonIssueBaseInfo.vue | 13 +- .../DepartLiaisonLeaderApproveBaseInfo.vue | 18 +- .../modules/MainDrafterCollectBaseInfo.vue | 23 +- ...MainDrafterCollectUploadMinuteBaseInfo.vue | 11 +- .../modules/MainDrafterPublishBaseInfo.vue | 6 +- .../MainDrafterUploadMinuteBaseInfo.vue | 287 +++++++++--------- .../OtherDrafterUploadStandardBaseInfo.vue | 19 +- .../modules/ScorerMarkBaseInfo.vue | 20 +- .../modules/StandardizationAuditBaseInfo.vue | 199 ++++++------ 15 files changed, 360 insertions(+), 352 deletions(-) diff --git a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue index e6efa854..d6acafed 100644 --- a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue +++ b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue @@ -377,6 +377,7 @@ export default { func = enStandardEditGetDataDraft params = param } + this.loading = true func(params).then(res => { if (res.success) { this.model = res.result @@ -393,6 +394,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.loading = false }) }, switchChange (value) { @@ -492,6 +495,7 @@ export default { this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => { const data = await this.$refs.baseInfoRef.getDataValidate() if (!err && !approvalErr && data) { + this.loading = true const param = {} // 需要传给后端的数据 param.common = { ...values, ...approvalValues } param.flowUser = personnelObj @@ -558,14 +562,9 @@ export default { const data = await this.$refs.baseInfoRef.getDataValidate() if (!approvalErr && data) { const param = {} // 需要传给后端的数据 - param.common = approvalValues - if (data.dataSource && data.dataSource.length > 0) { - param.dataList = data.dataSource.map(item => { - return { ...item, ...data.formInline } - }) - } else { - param.dataList = [data.formInline] - } + param.common = Object.assign({}, approvalValues) + param.common.taskId = this.$route.query.taskId + param.data = data enStandardEditAgree(param).then(res => { if (res.success) { this.$message.success(res.message) diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue b/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue index 05e8d15d..02b161b7 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue @@ -180,7 +180,7 @@ - + @@ -216,6 +216,11 @@ export default { type: String, required: false, default: '' + }, + disabled: { + type: Boolean, + required: false, + default: false } }, watch: { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue index c2dcc0bf..022bbb84 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue @@ -22,7 +22,7 @@ + v-decorator.trim="[ 'clauseNum', validatorRules.clauseNum ]" /> @@ -36,7 +36,7 @@ + v-decorator.trim="[ 'editAdvice', validatorRules.editAdvice ]" /> @@ -87,7 +87,7 @@ export default { }, validatorRules: { // 条款号 - clauseNumber: { + clauseNum: { rules: [ { required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseNumber') } ], @@ -101,7 +101,7 @@ export default { validateTrigger: 'blur' }, // 修改意见内容(包括修改理由和依据) - contentOfRevisedOpinion: { + editAdvice: { rules: [ { required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion') } ], @@ -129,7 +129,7 @@ export default { this.form.resetFields() this.model = Object.assign({}, record) this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model, 'clauseNumber', 'clauseName', 'contentOfRevisedOpinion')) + this.form.setFieldsValue(pick(this.model, 'clauseNum', 'clauseName', 'editAdvice')) }) }, getFileInfo (fileId) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue index f88bdc00..efb301d9 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue @@ -39,7 +39,7 @@
{{ $t('edit') }} - {{ $t('delete') }} + {{ $t('delete') }}
@@ -81,7 +81,7 @@ export default { title: this.$t('workCenter.enStandardRevision.clauseNumber'), align: 'center', width: 180, - dataIndex: 'clauseNumber', + dataIndex: 'clauseNum', scopedSlots: { customRender: 'text' } }, { // 条款名称 @@ -95,7 +95,7 @@ export default { title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), align: 'center', width: 300, - dataIndex: 'contentOfRevisedOpinion', + dataIndex: 'editAdvice', scopedSlots: { customRender: 'text' } }, { @@ -112,11 +112,11 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表格赋值,在线编辑不知道要怎么赋值? - // this.dataSource = + this.dataSource = data.advices // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue index 1252fffb..0d34f515 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue @@ -26,12 +26,12 @@ {{ $t('workCenter.enStandardRevision.isOpenComment') }} - - + + {{ $t('yes') }} - + {{ $t('not') }} @@ -40,18 +40,18 @@
- * + * {{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
- - +
@@ -79,7 +79,7 @@ export default { formInline: {}, rules: { // 部门联络人 - departmentalLiaison: [ + contactUser: [ { required: true, message: this.$t('workCenter.enStandardRevision.departmentalLiaison') + this.$t('cannotEmpty'), @@ -91,13 +91,13 @@ export default { }, watch: { // 是否开启征求意见 - 'formInline.isOpenComment': { + 'formInline.adviceFlag': { handler (val) { if (val && val === 1) { // 开启征求意见,部门联络人必填 - this.rules.departmentalLiaison[0].required = true + this.rules.contactUser[0].required = true } else { - this.rules.departmentalLiaison[0].required = false + this.rules.contactUser[0].required = false } } } @@ -106,17 +106,16 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表单赋值,在线编辑不知道要怎么赋值? - // this.formInline = + this.formInline = Object.assign({}, data) // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 - const data = {} - data.formInline = this.formInline + const data = Object.assign({}, this.formInline) return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -124,7 +123,7 @@ export default { let data = {} await this.$refs.ruleForm.validate(valid => { if (valid) { - data.formInline = this.formInline + const data = Object.assign({}, this.formInline) } else { data = false } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue index 1e308e6f..597a8306 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue @@ -50,13 +50,13 @@ {{ $t('workCenter.enStandardRevision.departLiaisonLeader') }} - - + @@ -101,7 +101,7 @@ export default { title: this.$t('workCenter.enStandardRevision.clauseNumber'), align: 'center', width: 180, - dataIndex: 'clauseNumber', + dataIndex: 'clauseNum', scopedSlots: { customRender: 'text' } }, { // 条款名称 @@ -115,14 +115,14 @@ export default { title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), align: 'center', width: 300, - dataIndex: 'contentOfRevisedOpinion', + dataIndex: 'editAdvice', scopedSlots: { customRender: 'text' } }, { // 意见提出人 title: this.$t('workCenter.enStandardRevision.proposer'), align: 'center', width: 180, - dataIndex: 'proposer', + dataIndex: 'createUserId_dictText', scopedSlots: { customRender: 'text' } }, { @@ -136,7 +136,7 @@ export default { formInline: {}, rules: { // 部门联络人主管级领导 - departLiaisonLeader: [ + contactUserLeader: [ { required: true, message: this.$t('workCenter.enStandardRevision.departLiaisonLeader') + this.$t('cannotEmpty'), @@ -150,17 +150,18 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表格赋值,在线编辑不知道要怎么赋值? - // this.dataSource = + this.dataSource = data.advices + this.formInline = Object.assign({}, data) // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 - const data = {} - data.dataSource = this.dataSource + const data = Object.assign({}, this.formInline) + data.advices = this.dataSource return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -169,8 +170,8 @@ export default { await this.$refs.ruleForm.validate(valid => { if (valid) { if (this.dataSource && this.dataSource.length > 0) { - data.dataSource = this.dataSource - data.formInline = this.formInline + data = Object.assign({}, this.formInline) + data.advices = this.dataSource } else { this.$message.warning(this.$t('addAtLeastOneRowOfData')) data = false diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue index 1b26800a..00d4f80f 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue @@ -101,17 +101,16 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表单赋值,在线编辑不知道要怎么赋值? - // this.formInline = + this.formInline = Object.assign(data) // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 - const data = {} - data.formInline = this.formInline + const data = Object.assign({}, this.formInline) return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -119,7 +118,7 @@ export default { let data = {} await this.$refs.ruleForm.validate(valid => { if (valid) { - data.formInline = this.formInline + data = Object.assign({}, this.formInline) } else { data = false } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue index 351976c4..57dea3ff 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue @@ -81,7 +81,7 @@ export default { title: this.$t('workCenter.enStandardRevision.clauseNumber'), align: 'center', width: 180, - dataIndex: 'clauseNumber', + dataIndex: 'clauseNum', scopedSlots: { customRender: 'text' } }, { // 条款名称 @@ -95,14 +95,14 @@ export default { title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), align: 'center', width: 300, - dataIndex: 'contentOfRevisedOpinion', + dataIndex: 'editAdvice', scopedSlots: { customRender: 'text' } }, { // 意见提出人 title: this.$t('workCenter.enStandardRevision.proposer'), align: 'center', width: 180, - dataIndex: 'proposer', + dataIndex: 'createUserId_dictText', scopedSlots: { customRender: 'text' } }, { @@ -119,24 +119,24 @@ export default { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表格赋值,在线编辑不知道要怎么赋值? - // this.dataSource = + this.dataSource = data.advices // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 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/MainDrafterCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue index 84cb7ddf..b9c5d14f 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue @@ -74,7 +74,7 @@ export default { title: this.$t('workCenter.enStandardRevision.clauseNumber'), align: 'center', width: 180, - dataIndex: 'clauseNumber', + dataIndex: 'clauseNum', scopedSlots: { customRender: 'text' } }, { // 条款名称 @@ -88,24 +88,24 @@ export default { title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), align: 'center', width: 300, - dataIndex: 'contentOfRevisedOpinion', + dataIndex: 'editAdvice', scopedSlots: { customRender: 'text' } }, { // 意见提出人 title: this.$t('workCenter.enStandardRevision.proposer'), align: 'center', width: 180, - dataIndex: 'proposer', + dataIndex: 'createUserId_dictText', scopedSlots: { customRender: 'text' } }, { // 处理意见 title: this.$t('workCenter.enStandardRevision.handlingSuggestion'), align: 'center', width: 180, - dataIndex: 'handlingSuggestion', + dataIndex: 'handleAdvice', customRender: (text, row, index) => { const obj = { - children: , @@ -145,19 +145,18 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表格赋值,在线编辑不知道要怎么赋值? - // this.dataSource = + this.dataSource = data.advices // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.dataSource = this.dataSource + data.advices = this.dataSource return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -175,7 +174,7 @@ export default { this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem')) data = false } else { - data.dataSource = this.dataSource + data.advices = this.dataSource } return data }, diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue index c5ae83d2..9b853445 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue @@ -128,7 +128,7 @@ @@ -312,10 +312,13 @@ export default { let data = {} await this.$refs.ruleForm.validate(valid => { if (valid) { - if (this.dataSource && this.dataSource.length > 0) { + if (this.formInline.inspectFlag === 1 && this.dataSource && this.dataSource.length > 0) { // 有数据可以抛出 - data.dataSource = this.dataSource - data.formInline = this.formInline + data = Object.assign({}, this.formInline) + data.inspectContents = this.dataSource + } else if (this.formInline.inspectFlag === 0) { + // 有数据可以抛出 + data = Object.assign({}, this.formInline) } else { this.$message.warning(this.$t('addAtLeastOneRowOfData')) data = false diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue index 419e9490..6cadf4bf 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterPublishBaseInfo.vue @@ -102,9 +102,9 @@ export default { // 给表单赋值,在线编辑不知道要怎么赋值? // this.formInline = // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue index 66a8928f..1f4ff885 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterUploadMinuteBaseInfo.vue @@ -2,164 +2,162 @@
-
-
- -
-
- * - +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.meetingSummary') }} -
- - - {{ - (formInline.meetingSummary === 'null' || formInline.meetingSummary === '' - || formInline.meetingSummary === null || formInline.meetingSummary === undefined) - ? $t('uploadFile.clickUpload') - : $t('uploadFile.viewUploadedFiles') - }} - -
- -
-
- * - + + + {{ + (formInline.meetingSummary === 'null' || formInline.meetingSummary === '' + || formInline.meetingSummary === null || formInline.meetingSummary === undefined) + ? $t('uploadFile.clickUpload') + : $t('uploadFile.viewUploadedFiles') + }} + + +
+ +
+
+ * + {{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.conferee') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.proofreader') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.approverLeader') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.approverStandardization') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.countersign') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.approverHeadEngineer') }} -
- - -
- -
-
+ + + +
+ +
+
{{ $t('workCenter.enStandardRevision.standardText') }} -
- -
- -

企业标准

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

企业标准

+ {{ $t('workCenter.enStandardRevision.onLineEditing') }} +
+
@@ -205,7 +203,7 @@ export default { } ], // 参会人员 - conferee: [ + meetingUsers: [ { required: true, message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'), @@ -221,7 +219,7 @@ export default { } ], // 审批人(主管级领导) - approverLeader: [ + approvalUser: [ { required: true, message: this.$t('workCenter.enStandardRevision.approverLeader') + this.$t('cannotEmpty'), @@ -229,7 +227,7 @@ export default { } ], // 审批人(标准化) - approverStandardization: [ + approvalUserStandard: [ { required: true, message: this.$t('workCenter.enStandardRevision.approverStandardization') + this.$t('cannotEmpty'), @@ -237,7 +235,7 @@ export default { } ], // 会签(相关部门领导) - countersign: [ + relatedLeader: [ { required: true, message: this.$t('workCenter.enStandardRevision.countersign') + this.$t('cannotEmpty'), @@ -245,7 +243,7 @@ export default { } ], // 审批(总工程师) - approverHeadEngineer: [ + chiefEngineer: [ { required: true, message: this.$t('workCenter.enStandardRevision.approverHeadEngineer') + this.$t('cannotEmpty'), @@ -258,19 +256,17 @@ export default { methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { - this.data = data // 给表单赋值,在线编辑不知道要怎么赋值? - // this.formInline = + this.formInline = Object.assign({}, data) // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 - const data = {} - data.uploadMinuteFormInline = this.formInline + const data = Object.assign({}, this.formInline) return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -278,7 +274,7 @@ export default { let data = {} await this.$refs.ruleForm.validate(valid => { if (valid) { - data.formInline = this.formInline + data = Object.assign({}, this.formInline) } else { data = false } @@ -287,11 +283,6 @@ export default { }, // 点击文件上传 clickButtonToUpload (fieldName) { - if (fieldName === 'uploadAttachment') { - this.fileMaxSize = 10 - } else { - this.fileMaxSize = undefined - } this.$refs.uploadFile.open(this.formInline[fieldName]) this.uploadName = fieldName }, diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue index 7d588731..b20ac79a 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterUploadStandardBaseInfo.vue @@ -11,11 +11,18 @@ :dataSource="dataSource" :pagination="false" :loading="loading"> + +
- { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 const data = {} - data.dataSource = this.dataSource + data.reviewMeetingDetails = this.dataSource return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -311,7 +319,7 @@ export default { data.dataSource = this.dataSource } return data - }, + } } } diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue index 90589dd9..e82cdcb6 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue @@ -3,113 +3,111 @@ -
-
- -
-
+
+ +
+
{{ $t('workCenter.enStandardRevision.standardText') }} -
- -
- -

企业标准

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

企业标准

+ {{ $t('workCenter.enStandardRevision.onLineEditing') }} +
+
+
+ +
+
{{ $t('workCenter.enStandardRevision.isCanAuditMeeting') }} -
- - - - {{ $t('yes') }} - - - {{ $t('not') }} - - -
-
@@ -134,7 +132,7 @@ export default { formInline: {}, rules: { // 评审人 - assessor: [ + reviewUser: [ { required: true, message: this.$t('workCenter.enStandardRevision.assessor') + this.$t('cannotEmpty'), @@ -142,7 +140,7 @@ export default { } ], // 评分人 - scorer: [ + raters: [ { required: true, message: this.$t('workCenter.enStandardRevision.scorer') + this.$t('cannotEmpty'), @@ -158,7 +156,7 @@ export default { } ], // 评审地点 - judgingVenue: [ + reviewPlace: [ { required: true, message: this.$t('workCenter.enStandardRevision.judgingVenue') + this.$t('cannotEmpty'), @@ -170,25 +168,24 @@ export default { }, mounted () { const formInline = {} - formInline.isCanAuditMeeting = 1 + formInline.reviewMeetingFlag = 1 this.formInline = Object.assign({}, formInline) - this.isCanAuditMeetingChange() + this.reviewMeetingFlagChange() }, methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { // 给表格赋值,在线编辑不知道要怎么赋值? - // this.formInline = + this.formInline = Object.assign({}, data) // 给表单赋值 - // this.$nextTick(() => { - // this.$refs.baseInfoForm.formInline = - // }) + this.$nextTick(() => { + this.$refs.baseInfoForm.initData(data) + }) }, // 外层要获取数据 getData () { // 把数据抛出,在线编辑不知道要不要抛 - const data = {} - data.formInline = this.formInline + const data = Object.assign({}, this.formInline) return data }, // 外层获取数据要过校验,返回false表示没有通过校验 @@ -196,7 +193,7 @@ export default { let data = {} // 要返回的数据 this.$refs.ruleForm.validate(valid => { if (valid) { - data.formInline = this.formInline + data = Object.assign({}, this.formInline) } else { data = false } @@ -204,9 +201,9 @@ export default { return data }, // 是否可进行评审会 - isCanAuditMeetingChange () { + reviewMeetingFlagChange () { // 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击 - this.$emit('standardizationAuditIsMeeting', this.formInline.isCanAuditMeeting) + this.$emit('standardizationAuditIsMeeting', this.formInline.reviewMeetingFlag) } } }