From 7c014955ee7aaf5501c69ab5c8306bfebe9539d1 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 16 Jan 2024 15:17:33 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E4=BC=9A=E8=AE=B0=E5=BD=95=E5=92=8C=E4=BC=81?= =?UTF-8?q?=E6=A0=87=E8=AF=A6=E6=83=85=E6=80=BB=E5=88=86=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=EF=BC=8C=E4=BC=81=E6=A0=87=E5=88=B6=E4=BF=AE=E8=AE=A2=E6=B5=81?= =?UTF-8?q?=E7=A8=8B-=E9=83=A8=E6=89=80=E8=81=94=E7=BB=9C=E4=BA=BA?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E8=8A=82=E7=82=B9=E6=88=AA=E6=AD=A2=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=8F=AF=E4=BB=A5=E7=AD=89=E4=BA=8E=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=BD=93=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reviewMeeting/modules/ScoreDetail.vue | 115 ++---------------- .../EnterpriseStandardEvaluateModal.vue | 26 ++-- .../modules/DepartLiaisonIssueBaseInfo.vue | 4 +- 3 files changed, 28 insertions(+), 117 deletions(-) diff --git a/src/views/enterpriseStandardLibrary/reviewMeeting/modules/ScoreDetail.vue b/src/views/enterpriseStandardLibrary/reviewMeeting/modules/ScoreDetail.vue index 1f17ffa3..10ae0086 100644 --- a/src/views/enterpriseStandardLibrary/reviewMeeting/modules/ScoreDetail.vue +++ b/src/views/enterpriseStandardLibrary/reviewMeeting/modules/ScoreDetail.vue @@ -154,95 +154,6 @@ const fixDataSourse = [ project: '总分:0' } ] -const initData = { - '60.00': null, - 'test_chh(00712)': [ - { - id: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - orgCode: null, - reviewMeetingId: null, - evaluateItem: '1', - evaluateScore: '10', - adjudicatorId: null, - adjudicatorName: 'test_chh(00712)', - deductionScoreReason: '无' - }, - { - id: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - orgCode: null, - reviewMeetingId: null, - evaluateItem: '2', - evaluateScore: '11', - adjudicatorId: null, - adjudicatorName: 'test_chh(00712)', - deductionScoreReason: '无' - }, - { - id: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - orgCode: null, - reviewMeetingId: null, - evaluateItem: '3', - evaluateScore: '12', - adjudicatorId: null, - adjudicatorName: 'test_chh(00712)', - deductionScoreReason: '无' - }, - { - id: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - orgCode: null, - reviewMeetingId: null, - evaluateItem: '4', - evaluateScore: '13', - adjudicatorId: null, - adjudicatorName: 'test_chh(00712)', - deductionScoreReason: '无' - }, - { - id: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - orgCode: null, - reviewMeetingId: null, - evaluateItem: '5', - evaluateScore: '14', - adjudicatorId: null, - adjudicatorName: 'test_chh(00712)', - deductionScoreReason: '无' - }, - { - id: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null, - orgCode: null, - reviewMeetingId: null, - evaluateItem: '6', - evaluateScore: '15', - adjudicatorId: null, - adjudicatorName: 'test_chh(00712)', - deductionScoreReason: '无' - } - ] -} export default { name: 'ScoreDetail', data () { @@ -375,7 +286,8 @@ export default { } } ], - dataSource: [] + dataSource: [], + allScore: 0 } }, watch: { @@ -389,7 +301,7 @@ export default { if (dataArr) { for (const i in fixDataSourse) { this.dataSource[i] = { ...fixDataSourse[i] } - if (i % 3 === 0) { + if (i % 3 === 0 && Number(i) !== 18) { this.dataSource[i].evaluateScore = dataArr[Math.floor(i / 3)].evaluateScore || '' this.dataSource[i].deductionScoreReason = dataArr[Math.floor(i / 3)].deductionScoreReason || '' } @@ -397,26 +309,25 @@ export default { } else { this.dataSource = [...fixDataSourse] } + this.getAllScore() } } } }, - computed: { - // 总分 - allScore () { - const arr = [0, 3, 6, 9, 12, 15] - let score = 0 - for (const item of arr) { - score += Number(this.dataSource[item].evaluateScore) || 0 - } - return score - } - }, methods: { open (id) { this.visible = true this.initData(id) }, + // 获取总分 + getAllScore () { + const arr = [0, 3, 6, 9, 12, 15] + let score = 0 + for (const item of arr) { + score += Number(this.dataSource[item].evaluateScore) || 0 + } + this.allScore = score + }, initData (id) { this.confirmLoading = true getScoreDetail(id).then(res => { diff --git a/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue b/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue index 6b48dabc..74c3bb1b 100644 --- a/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue +++ b/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue @@ -286,7 +286,8 @@ export default { } } ], - dataSource: [] + dataSource: [], + allScore: 0 } }, watch: { @@ -300,7 +301,7 @@ export default { if (dataArr) { for (const i in fixDataSourse) { this.dataSource[i] = { ...fixDataSourse[i] } - if (i % 3 === 0) { + if (i % 3 === 0 && Number(i) !== 18) { this.dataSource[i].evaluateScore = dataArr[Math.floor(i / 3)].evaluateScore || '' this.dataSource[i].deductionScoreReason = dataArr[Math.floor(i / 3)].deductionScoreReason || '' } @@ -308,26 +309,25 @@ export default { } else { this.dataSource = [...fixDataSourse] } + this.getAllScore() } } } }, - computed: { - // 总分 - allScore () { - const arr = [0, 3, 6, 9, 12, 15] - let score = 0 - for (const item of arr) { - score += Number(this.dataSource[item].evaluateScore) || 0 - } - return score - } - }, methods: { open (standardId) { this.visible = true this.initData(standardId) }, + // 获取总分 + getAllScore () { + const arr = [0, 3, 6, 9, 12, 15] + let score = 0 + for (const item of arr) { + score += Number(this.dataSource[item].evaluateScore) || 0 + } + this.allScore = score + }, initData (standardId) { this.confirmLoading = true detailEvaluate(standardId).then(res => { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue index 775e6ba8..92b6a65d 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue @@ -116,12 +116,12 @@ export default { let data = {} await this.$refs.ruleForm.validate(valid => { if (valid) { - // 有征求意见稿计划完成日期和征求意见截止日期,需要征求意见截止日期比计划完成日期早 + // 有征求意见稿计划完成日期和征求意见截止日期,需要征求意见截止日期比计划完成日期早可以等于 if (JSON.parse(this.formInline.businessJson).solicitationDraftPlanCompleteDate && this.formInline.adviceDeadline) { console.log('征求意见稿计划完成日期', JSON.parse(this.formInline.businessJson).solicitationDraftPlanCompleteDate) const planDate = new Date(Date.parse(JSON.parse(this.formInline.businessJson).solicitationDraftPlanCompleteDate)) const deadlineDate = new Date(Date.parse(this.formInline.adviceDeadline)) - if (deadlineDate < planDate) { + if (deadlineDate <= planDate) { // 截止日期比完成日期早 data = Object.assign({}, this.formInline) } else {