|
|
@ -10,6 +10,8 @@ import { |
|
|
|
listUser, |
|
|
|
} from "@/api/management"; |
|
|
|
|
|
|
|
import { deleteProjectCheckingPlan } from "@/api/dike"; |
|
|
|
|
|
|
|
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|
|
|
|
|
|
|
import { uploadFileData } from "@/api/system/upload"; |
|
|
@ -237,6 +239,31 @@ export default { |
|
|
|
this.pageData.total = res.total; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 批量删除 |
|
|
|
handleDelAll() { |
|
|
|
if (this.tableCheckData.length === 0) { |
|
|
|
this.$message.warning("请选择要删除的数据"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$confirm("是否删除选中的记录?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
console.log("删除"); |
|
|
|
const ids = this.tableCheckData.map((item) => item.id); |
|
|
|
deleteProjectCheckingPlan(ids.join(",")).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.getTableData(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
console.log("取消删除"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 上传前 |
|
|
|
beforeUpload(e) { |
|
|
@ -399,7 +426,7 @@ export default { |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
<!-- <el-button size="small">编辑</el-button> --> |
|
|
|
<el-button type="danger" size="small">删除</el-button> |
|
|
|
<el-button type="danger" size="small" @click="handleDelAll">删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|