From 81258e37f21261e317c9b3f360e20583d9193000 Mon Sep 17 00:00:00 2001 From: baoyu <102349094+Bytq@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E7=AD=96=E5=BE=81=E6=B1=82=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E6=B5=81=E7=A8=8B=20=E5=BE=81=E6=B1=82=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E5=88=97=E8=A1=A8=20=E5=A2=9E=E5=88=A0=E6=94=B9?= =?UTF-8?q?=E6=9F=A5=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/solicitationList.vue | 48 +++++++++++-------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/policyConsultation/components/solicitationList.vue b/src/pages/processCenter/pages/creatProcess/policyConsultation/components/solicitationList.vue index 0c58d86d0..0101ad57d 100644 --- a/src/pages/processCenter/pages/creatProcess/policyConsultation/components/solicitationList.vue +++ b/src/pages/processCenter/pages/creatProcess/policyConsultation/components/solicitationList.vue @@ -274,7 +274,7 @@ export default { return false } if (this.taskKey == 'PolicySolicitOpinionProcessKey8' || - this.taskKey == 'PolicySolicitOpinionProcessKey9') { + this.taskKey == 'PolicySolicitOpinionProcessKey9' || this.taskKey == 'PolicySolicitOpinionProcessKey11') { return true } return false @@ -328,25 +328,21 @@ export default { type: 'warning', roundButton: false }).then(() => { - this.selectList.forEach(val => { - if (val.id) { - this.deleteList.push(val.id) + const deleteIds = this.selectList.map(val => val.id) + this.$http.delete('/api/lawss/activiti/deletePolicitOpinionEOList', { ids: deleteIds }).then(res => { + if (res.ok) { + this.getData() + this.resetSelect() + } else { } - this.histortData = this.histortData.filter(res => { - if (res.id) { - return res.id != val.id - } else { - return res.dataId != val.dataId - } - }) - }) - this.histortData = [ ...this.histortData ] + }).catch(() => { + }); }).catch(() => { // 取消删除,清空选择 - this.$refs.selection.clearSelection() - }) + this.$refs.selection.clearSelection(); + }); } else { - this.$message.warning('请选择至少一条数据') + this.$message.warning('请选择至少一条数据'); } }, handleCommand (command) { @@ -381,11 +377,25 @@ export default { }, addModelForm (row) { if (this.addOrEdit == 'add') { - this.histortData.push(row) + this.$http.postData('/api/lawss/activiti/insertPolicitOpinionEOList', { row }, { _this: this }, res => { + if (res.ok) { + this.$message.success('操作成功') + }else { + this.$message.warning(res.message) + } + }, e => { + }) } else if (this.addOrEdit == 'edit') { - this.histortData[this.editNum] = row - this.histortData = [ ...this.histortData ] + this.$http.postData('/api/lawss/activiti/updatePolicitOpinionEOList', { row }, { _this: this }, res => { + if (res.ok) { + this.$message.success('操作成功') + }else { + this.$message.warning(res.message) + } + }, e => { + }) } + this.getData() }, fileClick (list) { if (list && list.length > 0) {