From eb26e5293c50a21393701c086dede587054fb207 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Wed, 8 Dec 2021 15:21:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=88=A0=E9=99=A4=E7=9A=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Home.vue | 77 ++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index bed6138..93deec5 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -179,40 +179,49 @@ export default { lcIdList.push(this.multipleSelection[i].lcId) nameList.push(this.multipleSelection[i].name) } - this.$confirm(`此操作将永久删除【${nameList}】判分点, 是否继续?`, "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - center: true - }).then(() => { - if (this.systemId == 11) { - // 交易类 - this.$post(`${this.api.deleteJudgmentPoint}?ids=${lcIdList}`).then(res => { - if (res.status === 200) { - this.$message.success("删除成功"); - this.initData(); - } else { - this.$message.error(res.message); - } - }).catch(err => { - console.log(err); - }); - } else { - // 编程类 - this.$post(`${this.api.bcDeleteJudgmentPoint}?ids=${bcIdList}`).then(res => { - if (res.status === 200) { - this.$message.success("删除成功"); - this.initData(); - } else { - this.$message.error(res.message); - } - }).catch(err => { - console.log(err); - }); - } - }).catch(() => { - this.$message.info("已取消删除"); - }); + if (nameList.length > 0){ + this.$confirm(`此操作将永久删除【${nameList}】判分点, 是否继续?`, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + center: true + }).then(() => { + if (this.systemId == 11) { + // 交易类 + this.$post(`${this.api.deleteJudgmentPoint}?ids=${lcIdList}`).then(res => { + if (res.status === 200) { + this.$message.success("删除成功"); + this.initData(); + } else { + this.$message.error(res.message); + } + }).catch(err => { + console.log(err); + }); + } else { + // 编程类 + this.$post(`${this.api.bcDeleteJudgmentPoint}?ids=${bcIdList}`).then(res => { + if (res.status === 200) { + this.$message.success("删除成功"); + this.initData(); + } else { + this.$message.error(res.message); + } + }).catch(err => { + console.log(err); + }); + } + }).catch(() => { + this.$message.info("已取消删除"); + }); + }else{ + this.$alert('请选择需要删除的判分点', '提示', { + confirmButtonText: '好的', + callback: action => { + + } + }); + } }, getProgrammingClassData(params) { // 获取编程类判分点列表数据 this.$post(this.api.getBcJudgmentPoint, params).then(res => {