From 41d4c1482b03b57629dbece299dd2b328367bddc Mon Sep 17 00:00:00 2001 From: baoyu <102349094+Bytq@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:01:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=2083406=EF=BC=8C=E6=A0=87?= =?UTF-8?q?=E5=87=86=E8=B7=9F=E8=B8=AA=E6=B8=85=E5=8D=95--=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=B8=8B=E5=8F=91=E5=90=8E--=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standardTrackingList/index.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/pages/policyRegulation/standardTrackingList/index.vue b/src/pages/policyRegulation/standardTrackingList/index.vue index 2b9c70dc5..8ed6492de 100644 --- a/src/pages/policyRegulation/standardTrackingList/index.vue +++ b/src/pages/policyRegulation/standardTrackingList/index.vue @@ -275,6 +275,7 @@ export default { processDistributionForm, processDistributionRules, processDistributionLoading: false, + selectedListDel: [] } }, created () { @@ -310,8 +311,10 @@ export default { }, selectionChange (data) { this.selectedList = [] + this.selectedListDel = [] for (let i = 0; i < data.length; i++) { this.selectedList.push(data[i].id) + this.selectedListDel.push( { id: data[i].id, processStatus: data[i].processStatus } ) } }, sortChange ({ column, prop, order }) { @@ -374,7 +377,19 @@ export default { this.$message.warning('请选择要删除的数据') return } - const ids = this.selectedList.join(',') + let ids = [] + let underWayFlag = false + this.selectedListDel.forEach(item => { + if (item.processStatus === 1) { + underWayFlag = true + } + ids.push(item.id) + }) + if (underWayFlag) { + this.$message.warning('进行中的数据不能删除,请重新选择') + return + } + ids = ids.join(',') this.$confirm('确认删除这些数据?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -386,6 +401,8 @@ export default { if (res.ok) { this.$message.success('删除成功') this.getData() + }else { + this.$message.warning(res.message) } }) })