|
|
@@ -528,18 +528,21 @@ export default {
|
|
|
async onDel(id, name) {
|
|
|
this.$modal
|
|
|
.confirm('是否确认删除名称为"' + name + '"的数据项?')
|
|
|
- .then(function () {
|
|
|
- this.loading=true;
|
|
|
- return api.delelte(id);
|
|
|
- })
|
|
|
.then(() => {
|
|
|
- this.getList();
|
|
|
- this.loading=false;
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
+ // 用户点击了确认按钮
|
|
|
+ console.log("执行操作...");
|
|
|
+ this.loading = true;
|
|
|
+ api.delelte(id).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.loading = false;
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+
|
|
|
+ });
|
|
|
})
|
|
|
- .catch(() => {});
|
|
|
- // await api.delelte(id);
|
|
|
- // this.getList();
|
|
|
+ .catch(() => {
|
|
|
+ // 用户点击了取消按钮
|
|
|
+ console.log("取消操作...");
|
|
|
+ });
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|