From fe64b291642a008b4b2dd3f5a03befba2559c9a7 Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Thu, 15 Jul 2021 19:38:46 +0800 Subject: [PATCH] commit --- .../pages/creatProcess/bzjd/step1.vue | 3 +- .../pages/creatProcess/bzjd/step2.vue | 186 +++++++++++++----- .../pages/creatProcess/bzjd/step3.vue | 63 +++++- 3 files changed, 192 insertions(+), 60 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzjd/step1.vue b/src/pages/processCenter/pages/creatProcess/bzjd/step1.vue index 194ae0752..b6d86c38e 100644 --- a/src/pages/processCenter/pages/creatProcess/bzjd/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzjd/step1.vue @@ -136,7 +136,7 @@ @@ -526,6 +526,7 @@ }, choiceZRRS (row, type, index) { if (type === 1) { + this.nodeList2 = [] this.zrIndex= index this.zrType = type this.nodeList2.push(row) diff --git a/src/pages/processCenter/pages/creatProcess/bzjd/step2.vue b/src/pages/processCenter/pages/creatProcess/bzjd/step2.vue index e7904ad72..52ddae196 100644 --- a/src/pages/processCenter/pages/creatProcess/bzjd/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzjd/step2.vue @@ -9,7 +9,7 @@
基础信息
-
+
- - - -
+ + + +
+ 批量编辑 +
+ + + + + + + + + + + + + + + 数据获取中
@@ -76,28 +120,29 @@ > + ref="tree2"> - @@ -113,18 +158,22 @@ name: "bzjdStep2", data() { return { - commentText: '', - taskIds: this.$route.query.taskIds, - pId: this.$route.query.prcId, - roleRow: {}, - nodeList: [], - type: '', + zxIndex: '', + zxType: '', + zxIdList: [], + modalshowflag2: false, + treeData: [], + nodeList2: [], defaultProps: { children: 'children', label: 'name' }, - treeData: [], // 人员数据 - modalshowflag: false, // drawer开关 + loading: false, + commentText: '', + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId, + roleRow: {}, + type: '', drawerTitle: '', //drawer标题 textarea: '', // 意见 ListModel: false, // 新增编辑抽屉开关 @@ -142,7 +191,8 @@ { required: true, message: '请选择执行人', trigger: 'change' }, ] }, - json: {} + json: {}, + itemList: [] } }, components: { @@ -151,10 +201,37 @@ ProcessTitle }, methods: { - saveUserInfo () { + drawerCheck2 (data) { + var getlist = this.$refs.tree2.getCheckedNodes().concat(this.$refs.tree2.getHalfCheckedNodes()); + if(getlist.length == 1) { + this.roleRow = getlist[0] + }else { + this.$refs.tree2.setCheckedKeys([data.id]); + this.roleRow = this.$refs.tree2.getCheckedNodes()[0] + } + }, + choiceZRRS (row, type, index) { + if (type === 1) { + this.nodeList2 = [] + this.zxIndex= index + this.zxType = type + this.nodeList2.push(row) + this.modalshowflag2 = true + } else { + // 批量 + if (this.zxIdList.length > 0) { + this.zxType = type + this.nodeList2 = [] + this.modalshowflag2 = true + } else { + this.$message.warning('请选择要编辑的数据') + } + } + }, + saveUserInfo2 () { var idList = '' var nameList = '' - this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()).forEach( item => { + this.$refs.tree2.getCheckedNodes().concat(this.$refs.tree2.getHalfCheckedNodes()).forEach( item => { if (nameList.length > 0) { nameList += ',' idList += ',' @@ -162,19 +239,23 @@ idList += item.id nameList += item.name }) - this.form.zxUserId = idList - this.form.zxUserIdName = nameList - this.modalshowflag = false - }, - cancleUserInfo () { - this.modalshowflag = false - }, - choiceZRR () { - this.nodeList = [] - if (this.form.zxUserId.length > 0) { - this.nodeList = this.form.zxUserId.split(',') + if (this.zxType == 1) { + this.itemList[this.zxIndex].zxUserId = idList + this.itemList[this.zxIndex].zxUserIdName = nameList + } else { + this.itemList.forEach( item => { + this.zxIdList.forEach( items => { + if (item.id === items) { + item.zxUserId = idList + item.zxUserIdName = nameList + } + }) + }) } - this.modalshowflag = true + this.modalshowflag2 = false + }, + cancleUserInfo2 () { + this.modalshowflag2 = false }, getTree () { this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> { @@ -189,16 +270,8 @@ this.$refs['bzzqyjForm'].validate((valid) => { if (valid) { var json = this.json + json.itemList = this.itemList json.commentText = this.commentText - var arr = this.form.zxUserId.split(',') - var newArr = [] - arr.forEach(item => { - var json1 = {} - json1.id = item - newArr.push(json1) - }) - json.zxUserId = newArr - json.zxUserIdName = this.form.zxUserIdName this.$http.post('lawss/activiti/completeTask', { json: JSON.stringify(json), taskId: this.taskIds, @@ -214,6 +287,12 @@ } }) }, + handleSelectionChange (val){ + this.zxIdList = [] + val.forEach( item => { + this.zxIdList.push(item.id) + }) + }, getData() { return new Promise((resolve, reject) => { inboundLiaisonDetail({ @@ -224,6 +303,13 @@ this.form.number = data.number this.form.name = data.name this.json = data + var arr = [] + arr = JSON.parse(data.itemList) + arr.forEach(item => { + item.zxUserId = '' + item.zxUserIdName = '' + }) + this.itemList = arr }).catch(e => { }) }) diff --git a/src/pages/processCenter/pages/creatProcess/bzjd/step3.vue b/src/pages/processCenter/pages/creatProcess/bzjd/step3.vue index d0da3fac1..1a0e8ddb8 100644 --- a/src/pages/processCenter/pages/creatProcess/bzjd/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzjd/step3.vue @@ -9,7 +9,7 @@
基础信息
-
+
- - - -
+ + + +
+ 批量编辑 +
+ + + + + + + + + + + + + + 数据获取中
@@ -113,6 +154,8 @@ name: "bzjdStep3", data() { return { + itemList: [], + loading: false, commentText: '', taskIds: this.$route.query.taskIds, pId: this.$route.query.prcId, @@ -151,6 +194,7 @@ ProcessTitle }, methods: { + handleSelectionChange () {}, saveUserInfo () { var idList = '' var nameList = '' @@ -224,6 +268,7 @@ this.form.number = data.number this.form.name = data.name this.json = data + this.itemList = JSON.parse(data.itemList) }).catch(e => { }) })