From 0beab0eabfa2378345e8d22e441add48b4afdd44 Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Fri, 7 Jan 2022 15:49:18 +0800 Subject: [PATCH] feat: There is no way the, --- .../pages/creatProcess/qbrk/step1.vue | 56 ++- .../pages/creatProcess/qbrk/step10.vue | 2 + .../pages/creatProcess/qbrk/step11.vue | 2 + .../pages/creatProcess/qbrk/step12.vue | 2 + .../pages/creatProcess/qbrk/step2.vue | 2 + .../pages/creatProcess/qbrk/step3.vue | 30 +- .../pages/creatProcess/qbrk/step4.vue | 2 + .../pages/creatProcess/qbrk/step5.vue | 2 + .../pages/creatProcess/qbrk/step6.vue | 327 +++++++++++++++--- .../pages/creatProcess/qbrk/step7.vue | 2 + .../pages/creatProcess/qbrk/step8.vue | 214 +----------- .../pages/creatProcess/qbrk/step9.vue | 2 + .../pages/creatProcess/qbrk/stepC3.vue | 32 +- .../pages/creatProcess/qbrk/stepC6.vue | 32 +- 14 files changed, 409 insertions(+), 298 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue index 9a1736372..e9c47b61b 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue @@ -627,12 +627,22 @@ - + + + +

主起草人培训

+
+ +
+
+
+
+

标准法规部标准化工程师发布人员

- +
@@ -1381,8 +1391,10 @@ hzUserName: this.$store.getters.userInfo.userName, xdUserId: this.$store.getters.userInfo.userId, xdUserName: this.$store.getters.userInfo.userName, - pxUserId: '', - pxUserName: '', + pxUserId: this.$store.getters.userInfo.userId, + pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', @@ -1738,6 +1750,19 @@ this.form.QCRBUSSID=idList; this.form.QCRBUSS=nameList; } + + if(data !== undefined && data && data.length > 0){ + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") + const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") + this.form.QCDWID = institutionIdList + this.form.QCDW = institutionNameList + } + + this.modalShowRoleFlag = false + }, + unique(newArr) { + const res = new Map(); + return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1)); }, checkedRole (data) { if (this.type === 0) { @@ -1780,6 +1805,9 @@ }else if(this.userType === 'pxUserId'){ this.roleForm.pxUserId = data[0].id this.roleForm.pxUserName = data[0].name + }else if(this.userType === 'fbUserId'){ + this.roleForm.fbUserId = data[0].id + this.roleForm.fbUserName = data[0].name } this.modalShowFlag = false }, @@ -2519,16 +2547,16 @@ this.form.QCDW = nameList this.form.QCDWID = idList - if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ - this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { - _this: this, - }, res=> { - if(res){ - this.form.QCRBUSSID = res.map(item => item.id).join(",") - this.form.QCRBUSS = res.map(item => item.name).join(",") - } - }) - } + // if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ + // this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { + // _this: this, + // }, res=> { + // if(res){ + // this.form.QCRBUSSID = res.map(item => item.id).join(",") + // this.form.QCRBUSS = res.map(item => item.name).join(",") + // } + // }) + // } }, popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step10.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step10.vue index 8928c6900..f16b90d2a 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step10.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step10.vue @@ -865,6 +865,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step11.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step11.vue index f1e508fcb..3ab0c4714 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step11.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step11.vue @@ -864,6 +864,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue index 704e7ff5e..13ca1f384 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue @@ -855,6 +855,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue index 031419dc9..c35fd6eac 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step2.vue @@ -855,6 +855,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step3.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step3.vue index 4c75ec4ce..2fd189adf 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step3.vue @@ -921,6 +921,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', @@ -1129,16 +1131,16 @@ }) this.form.QCDW = nameList this.form.QCDWID = idList - if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ - this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { - _this: this, - }, res=> { - if(res){ - this.form.QCRBUSSID = res.map(item => item.id).join(",") - this.form.QCRBUSS = res.map(item => item.name).join(",") - } - }) - } + // if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ + // this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { + // _this: this, + // }, res=> { + // if(res){ + // this.form.QCRBUSSID = res.map(item => item.id).join(",") + // this.form.QCRBUSS = res.map(item => item.name).join(",") + // } + // }) + // } this.formKey++ }, choiceQCDW(type, title, id) { @@ -1337,6 +1339,14 @@ this.form.QCRBUSS=nameList; this.formKey++ } + if(data !== undefined && data && data.length > 0){ + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") + const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") + this.form.QCDWID = institutionIdList + this.form.QCDW = institutionNameList + } + + this.modalShowRoleFlag = false }, checkedRole (data) { if (this.type === 0) { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step4.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step4.vue index 26d57c30a..bab22e13a 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step4.vue @@ -860,6 +860,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue index f1dfacc37..4bbee0e44 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step5.vue @@ -997,6 +997,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step6.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step6.vue index d43660e1d..728eb159d 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step6.vue @@ -5,7 +5,8 @@
-
基础信息
+
评审评分
+
基础信息
审批历史
@@ -17,7 +18,135 @@ class="label-input-form" label-width="210px" > -
+
+ +
+ + +
+ + + + + + + + + + + + + + +
+
+
+
+
+
-
- - -
- - - - - - - - - - - - - - -
-
-
-
@@ -696,6 +793,7 @@ import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail,processModelHisOneCount} from "api/process"; import TreeSelect from '@/components/treeSelect/treeSelect.vue'; import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue'; + import {getEvaluationIndex} from "api/businessApi"; let Base64 = require('js-base64').Base64; export default { @@ -718,6 +816,25 @@ } }, data () { + const numberCodeNot = (rule, value, callback) => { + let pattern = /^[1]*$/ + if (!pattern.test(value)) { + return callback(new Error('评分分值只可为1分')) + } else { + callback() + } + }; + const numberCode = (rule, value, callback) => { + if(value === undefined || value === ''){ + return callback(new Error('评分分值不可为空')) + } + let pattern = /^[0-9]*$/ + if (!pattern.test(value)) { + return callback(new Error('只能输入数字')) + } else { + callback() + } + }; const validateZrUserIdName = (rule, value, callback) => { if(this.FBGBUSSFileList.length === 0){ callback(new Error('请上传发布稿文件!')) @@ -925,6 +1042,7 @@ countryArr:'', commentCycleDate:'', form: { + evaluationData:[], planId:'', planStatus:'', reviseStatus:'', @@ -995,6 +1113,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', @@ -1055,6 +1175,15 @@ ], }, rules:{ + scoreNot:[ + {required: false, validator: numberCodeNot, trigger: 'blur'}, + ], + score: [ + {required: true, validator: numberCode, trigger: 'blur'}, + { type: 'number',min: 0, max: 10, message: '分值 0 ~ 10 分 ', trigger: 'blur' }, + ], + reason: [{ required: true, message: '请填写扣分理由', trigger: 'blur' }], + reasonNot:[], commentText: [{ required: true, message: '请输入意见', trigger: 'blur' }], approvalOpinion: [{ required: true, message: '请选择审批意见', trigger: 'change' }], zrUserIdName: [ @@ -1195,6 +1324,84 @@ }, }, methods: { + filterData2(){ + let spanOneArr = [] + let concatOne = 0 + this.form.evaluationData.forEach((item,index)=>{//循环后端查询出来的数据(orderdata) + if(index === 0){ + spanOneArr.push(1) + }else{ + //name 修改 + if(item.twoIndexTitle === this.form.evaluationData[index - 1].twoIndexTitle){ //第一列需合并相同内容的字段 + spanOneArr[concatOne] += 1 + spanOneArr.push(0) + }else{ + spanOneArr.push(1) + concatOne = index + } + } + }) + return { + one: spanOneArr, + } + }, + setScoreMin(row){ + return row.scoreMin = ((row.score === undefined || row.score === '') ? '' : row.valueType === 'add' ? row.score : (row.score / 10).toFixed(1)) + + }, + getSummaries(param) { + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 3) { + sums[index] = '合计:'; + return; + }else if(index === 6){ + sums[index] = ''; + return; + } + const values = data.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + sums[index] += ' '; + } else { + sums[index] = ''; + } + if(sums[index] !== '' && sums[index].indexOf(".") !== -1){ + sums[index] = parseFloat(sums[index]).toFixed(1); + } + }); + return sums; + }, + objectSpanMethod({ row, column, rowIndex, columnIndex },value) { + if (columnIndex === 0) { + if (rowIndex === 0) { + return { + rowspan: value.length, + colspan: 1 + }; + } else { + return { + rowspan: 0, + colspan: 0 + }; + } + }else if(columnIndex === 1 ) { + const _row = (this.filterData2(this.form.evaluationData).one)[rowIndex] + const _col = _row > 0 ? 1 : 0 + return { + rowspan: _row, + colspan: _col + } + } + }, drawerCheckZRBM(data) { let idList = '' let nameList = '' @@ -1210,16 +1417,16 @@ }) this.form.QCDW = nameList this.form.QCDWID = idList - if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ - this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { - _this: this, - }, res=> { - if(res){ - this.form.QCRBUSSID = res.map(item => item.id).join(",") - this.form.QCRBUSS = res.map(item => item.name).join(",") - } - }) - } + // if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ + // this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { + // _this: this, + // }, res=> { + // if(res){ + // this.form.QCRBUSSID = res.map(item => item.id).join(",") + // this.form.QCRBUSS = res.map(item => item.name).join(",") + // } + // }) + // } this.formKey++ }, choiceQCDW(type, title, id) { @@ -1418,6 +1625,14 @@ this.form.QCRBUSS=nameList; this.formKey++ } + if(data !== undefined && data && data.length > 0){ + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") + const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") + this.form.QCDWID = institutionIdList + this.form.QCDW = institutionNameList + } + + this.modalShowRoleFlag = false }, checkedRole (data) { if (this.type === 0) { @@ -2579,6 +2794,8 @@ getFormFieldList (item) { this.$nextTick(() => { this.form = JSON.parse(JSON.stringify(item)) + this.form.evaluationData = [] + this.getEvaluation() this.form.prcNum = this.prcNum this.form.prcName = this.prcName this.form['id'] = item.id @@ -2596,6 +2813,28 @@ } return list; }, + getEvaluation() { + return new Promise((resolve, reject) => { + getEvaluationIndex({ + indexType: 'quality' + }).then(res => { + if (res) { + const evalList = [] + res.data.forEach(item =>{ + item.score = '' + item.scoreMin = '' + item.reason = '' + item.userId = this.userId + item.processNode = this.taskInfo + evalList.push(item) + }) + this.form.evaluationData = evalList + this.$forceUpdate() + } + }).catch(e => { + }) + }) + }, getData() { if(this.taskIds && this.pId){ return new Promise((resolve, reject) => { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step7.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step7.vue index fa1eb901a..b6f30ab4c 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step7.vue @@ -983,6 +983,8 @@ xdUserName: this.$store.getters.userInfo.userName, pxUserId: this.$store.getters.userInfo.userId, pxUserName: this.$store.getters.userInfo.userName, + fbUserId: '', + fbUserName: '', qcUserId: '', // 多实例 qcUserName:'', // 多实例 bzhUserId:'', diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step8.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step8.vue index f4bfd3ed6..8fdd3e678 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step8.vue @@ -5,8 +5,7 @@
-
评审评分
-
基础信息
+
基础信息
审批历史
@@ -18,135 +17,7 @@ class="label-input-form" label-width="210px" > -
- -
- - -
- - - - - - - - - - - - - - -
-
-
-
-
-
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0){ - this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { - _this: this, - }, res=> { - if(res){ - this.form.QCRBUSSID = res.map(item => item.id).join(",") - this.form.QCRBUSS = res.map(item => item.name).join(",") - } - }) - } + // if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ + // this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { + // _this: this, + // }, res=> { + // if(res){ + // this.form.QCRBUSSID = res.map(item => item.id).join(",") + // this.form.QCRBUSS = res.map(item => item.name).join(",") + // } + // }) + // } this.formKey++ }, choiceQCDW(type, title, id) { @@ -1333,6 +1337,14 @@ this.form.QCRBUSS=nameList; this.formKey++ } + if(data !== undefined && data && data.length > 0){ + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") + const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") + this.form.QCDWID = institutionIdList + this.form.QCDW = institutionNameList + } + + this.modalShowRoleFlag = false }, checkedRole (data) { if (this.type === 0) { diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/stepC6.vue b/src/pages/processCenter/pages/creatProcess/qbrk/stepC6.vue index 6861e4649..36014868b 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/stepC6.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/stepC6.vue @@ -983,6 +983,10 @@ GLWJBUSS: '', GLWJBUSSName: '', XCSJBUSS: '', + CBCD:'', + CYBZ:'', + YYBZ:'', + standNum:'', }, // 标准信息 roleForm:{ hzUserId: this.$store.getters.userInfo.userId, @@ -1206,16 +1210,16 @@ }) this.form.QCDW = nameList this.form.QCDWID = idList - if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ - this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { - _this: this, - }, res=> { - if(res){ - this.form.QCRBUSSID = res.map(item => item.id).join(",") - this.form.QCRBUSS = res.map(item => item.name).join(",") - } - }) - } + // if(this.form.QCDWID !== undefined && this.form.QCDWID && this.form.QCDWID.length > 0){ + // this.$http.get('SarInstitution/institution/getInstitutionIdToDept', {institutionIds:this.form.QCDWID}, { + // _this: this, + // }, res=> { + // if(res){ + // this.form.QCRBUSSID = res.map(item => item.id).join(",") + // this.form.QCRBUSS = res.map(item => item.name).join(",") + // } + // }) + // } this.formKey++ }, choiceQCDW(type, title, id) { @@ -1414,6 +1418,14 @@ this.form.QCRBUSS=nameList; this.formKey++ } + if(data !== undefined && data && data.length > 0){ + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") + const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") + this.form.QCDWID = institutionIdList + this.form.QCDW = institutionNameList + } + + this.modalShowRoleFlag = false }, checkedRole (data) { if (this.type === 0) {