diff --git a/src/components/CustomFormComponents/SelectArray.vue b/src/components/CustomFormComponents/SelectArray.vue index d7ffd381a..e7be6f10c 100644 --- a/src/components/CustomFormComponents/SelectArray.vue +++ b/src/components/CustomFormComponents/SelectArray.vue @@ -16,6 +16,7 @@ multiple @change="handleChange" > +
企标评价 - - + - - - + + - + + + + - + + + + + + {{ businessCommentForm.averageScore * 2 }} + +
+ 提交 + + 取消 + +
@@ -1037,19 +1066,26 @@ export default { }, data () { return { - targetScore: '', + indexType: 'dynamic', + commentReason: '', // 评价理由 + commentReason1: '', // 评价理由 + commentReason2: '', // 评价理由 + commentReason3: '', // 评价理由 + commentReason4: '', // 评价理由 + commentSubmitLoading: false, + targetScore: '', // 指标分值 + targetScore1: '', + targetScore2: '', + targetScore3: '', + targetScore4: '', businessCommentDialog: false, - businessCommentForm: {}, - revise: '', - businessCommentTable: [{ - commentTarget: '企业标准内容完整、要求合理(指标、流程等。)', - }, { - commentTarget: '企业标准便于实施应用', - }, { - commentTarget: '标准编写规范,内容清晰易理解', - }, { - commentTarget: '标准对我的实际工作很有帮助', - }], + businessCommentForm: { + averageScore: '', // 平均分值 + revise: '', + reviseReason: '', // 修订理由 + }, + businessCommentTable: [], + commentTarget: '', // 评价指标 activeNames: ['基础信息','过程稿件','实施日期'], activeState: true, visiblePlanCheck: false, @@ -1258,7 +1294,99 @@ export default { }, methods: { targetScoreChange(row){ - console.log('1234',row) + if (this.targetScore1 === '') { + this.targetScore1 = 0 + } + if (this.targetScore2 === '') { + this.targetScore2 = 0 + } + if (this.targetScore3 === '') { + this.targetScore3 = 0 + } + if (this.targetScore4 === '') { + this.targetScore4 = 0 + } + switch (row.threeIndexTitle){ + case "企业标准内容完整、要求合理(指标、流程等。)": + this.targetScore1 = 0 + this.targetScore1 = row.targetScore + break + case "企业标准便于实施应用": + this.targetScore2 = 0 + this.targetScore2 = row.targetScore + break + case "标准编写规范,内容清晰易理解": + this.targetScore3 = 0 + this.targetScore3 = row.targetScore + break + case "标准对我的实际工作很有帮助": + this.targetScore4 = 0 + this.targetScore4 = row.targetScore + break + } + this.businessCommentForm.averageScore = (this.targetScore1 + this.targetScore2 + this.targetScore3 +this.targetScore4)/4 + + + }, + commentReasonChange(row){ + if (row.threeIndexTitle === '企业标准内容完整、要求合理(指标、流程等。)'){ + this.commentReason1 = row.commentReason + } + if (row.threeIndexTitle === '企业标准便于实施应用'){ + this.commentReason2 = row.commentReason + } + if (row.threeIndexTitle === '标准编写规范,内容清晰易理解'){ + this.commentReason3 = row.commentReason + } + if (row.threeIndexTitle === '标准对我的实际工作很有帮助'){ + this.commentReason4 = row.commentReason + } + + }, + commentSubmit(){ + //验证必填 + let submitFlag = true + if (this.targetScore1 === '' || this.targetScore1 === 0 || + this.targetScore2 === '' || this.targetScore2 === 0 || + this.targetScore3 === '' || this.targetScore3 === 0 || + this.targetScore4 === '' || this.targetScore4 === 0) { + submitFlag = false + this.$message.warning('请评价指标分值') + }else if ( + (this.commentReason1 === '' && this.targetScore1 < 3) || + (this.commentReason2 === '' && this.targetScore2 < 3) || + (this.commentReason3 === '' && this.targetScore3 < 3) || + (this.commentReason4 === '' && this.targetScore4 < 3) + ) { + submitFlag = false + this.$message.warning('请简述低分理由') + } else if (this.businessCommentForm.revise === ''){ + submitFlag = false + this.$message.warning('请选择是否需要修订') + }else if (this.businessCommentForm.revise === '1' && this.businessCommentForm.reviseReason === ''){ + submitFlag = false + this.$message.warning('请填写修订理由') + } + if (submitFlag === true) { + this.$message.success('通过') + + const allData = { + tableData: this.businessCommentTable, + formData: JSON.stringify(this.businessCommentForm), + standId: this.sarStandardsInfoEO.id, + userId: this.$store.getters.userInfo.userId + } + + console.log(allData) + this.$http.postData('sarEnterpriseStandardEvaluation/quality-evaluation/submitEvaluationForm', allData, { + _this: this + }, res => { + console.log(res) + }, e => { + }) + + + } }, child1Func(child1){ const list = [] @@ -2255,6 +2383,14 @@ export default { // } }, async mounted () { + this.$http.get('sarEnterpriseStandardEvaluation/evaluation-index/getEvaluationIndex', {indexType:this.indexType}, { + _this: this + }, res => { + console.log('2371',res) + this.businessCommentTable = res.data + console.log(this.businessCommentTable) + }, e => { + }) this.sarStandardsInfoEO.id = this.$route.params.id this.getOrgTreeSource() this.standItemEO.standId = this.$route.params.id diff --git a/src/pages/localTool/standAutoSplit/index.vue b/src/pages/localTool/standAutoSplit/index.vue index 8ebea20ce..86d86d981 100644 --- a/src/pages/localTool/standAutoSplit/index.vue +++ b/src/pages/localTool/standAutoSplit/index.vue @@ -50,6 +50,7 @@