From 1160bcd2f4476ab87f1f4dbf277833aa928e82a5 Mon Sep 17 00:00:00 2001 From: baoyu <102349094+Bytq@users.noreply.github.com> Date: Sun, 28 Apr 2024 14:34:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E5=8D=8F=E4=BC=9A=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A4=87=E6=A1=88=E6=B5=81=E7=A8=8B=20=E6=9C=AA=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E5=B1=95=E7=A4=BA=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=92=8C=E8=AF=A5=E6=B5=81=E7=A8=8B=E6=9C=AC=E8=BA=AB=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/jrbzhxh/step2.vue | 64 ++++++++++++++++--- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue index 571142ff9..e06c84a7b 100644 --- a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue @@ -548,18 +548,16 @@ export default { parList.forEach(items => { if(items.name === item.workPeople){ this.$message.warning('请勿重复添加参与人') - return - }else{ + throw new Error('请勿重复添加参与人') } }) }) - }else{ - this.participantsData = data - this.participantsData.forEach(item => { + } + this.participantsData[this.selectedId] = data[0] + this.participantsData.forEach(item => { this.$set(item, "workPeople", item.name) }); - this.participantsData = JSON.parse(JSON.stringify(this.participantsData)); - } + this.participantsData = JSON.parse(JSON.stringify(this.participantsData)); }, handleTabs(type) { @@ -618,6 +616,33 @@ export default { //流程提交 handleSubmit() { this.isSubmit = true + let isValid1 = true + let isValid2 = true + this.participantsData.forEach(item => { + if (Array.isArray(item) && item.length === 0) { + this.isSubmit = false + isValid1 = false + }else if (typeof item === 'object') { + if (!item.accounts || !item.duties || !item.email || !item.passwords) { + this.isSubmit = false + isValid1 = false + } + } + }) + this.associationData.forEach(item => { + if (!item.contactPerson || !item.mailbox || !item.telephone) { + this.isSubmit = false + isValid2 = false + } + }) + if (!isValid1) { + this.$message.warning('请完善参与人信息') + return + } + if (!isValid2) { + this.$message.warning('请完善协会信息') + return + } this.wbbzform.dlFlag = '1' this.wbbzform.comityOptionsOne = this.comityOptionsOne this.wbbzform.comityOptionsTwo = this.comityOptionsTwo @@ -698,7 +723,30 @@ export default { }, //批量删除协会信息 deleteSociety(){ - + if(this.selectList2.length < 1){ + this.$message.warning('请选择一条数据进行删除') + }else{ + this.$confirm('您确认删除这些数据?', '提示', { + confirmButtonText: "确认", + confirmButtonClass: "common-button-primary", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + let exits = []; + this.selectList2.map(item => { + let index; + index = this.associationData.findIndex(items => { + return items.account === item; + }); + if (index > -1) { + this.associationData.splice(index, 1); + } + exits.push(item); + }); + this.selectList2 = []; + }).catch(() => { + }); + } }, // 删除上传的文件 delFileInfo(file, fileList) {