+
+ 批量删除
+
{
+ let serviceRecordIds = this.multiSelectedRows.map(item => item.serviceRecordId)
+ this.cancelFuwu(serviceRecordIds)
+ })
+ .catch((err) => {
+ if (err == "cancel") {
+ }
+ });
+ }
},
props: {
diff --git a/src/views/modules/communityService/policy/policyList.vue b/src/views/modules/communityService/policy/policyList.vue
index a5158707a..f1a36a2dc 100644
--- a/src/views/modules/communityService/policy/policyList.vue
+++ b/src/views/modules/communityService/policy/policyList.vue
@@ -125,7 +125,7 @@
批量删除
@@ -377,27 +377,21 @@ export default {
this.getTableData();
},
methods: {
- deleteBatch () {
+ onDeleteBatch () {
if (this.selection.length > 0) {
- this.$confirm("确认删除选择的楼栋?", "提示", {
+ this.$confirm("删除的数据无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
- .then(() => {
- this.delPolicy()
- })
- .catch(err => {
- if (err == "cancel") {
- // this.$message({
- // type: "info",
- // message: "已取消删除"
- // });
- }
-
- });
+ .then(() => {
+ this.delPolicyBatch(this.selection.map(i => i.id));
+ })
+ .catch(err => {
+ console.error(err)
+ });
} else {
- this.$message.warning('请先选择要删除的楼栋')
+ this.$message.warning('请先选择要删除的政策')
}
},
@@ -564,6 +558,20 @@ export default {
this.$message.error("操作失败!");
}
},
+
+ // 批量删除政策
+ async delPolicyBatch(policyIds) {
+ const url = `/governance/policy/deletePolicyBatch`;
+
+ const { data, code, msg } = await requestPost(url, policyIds);
+
+ if (code === 0) {
+ this.$message.success("删除成功!");
+ this.getTableData();
+ } else {
+ this.$message.error("操作失败!");
+ }
+ },
//写好的批量删除直接用
// async delPolicy() {
// if (this.selection.length === 0)