Hwt 3 gadi atpakaļ
vecāks
revīzija
1798ef139c

+ 26 - 2
operationSupport/src/views/ownerManagement/houselessHolds/index.vue

@@ -103,7 +103,7 @@ export default {
   methods: {
 
     deleteOne (row) {
-      this.$confirm('此操作将永久删除该用户, 是否继续?', '提示', {
+      this.$confirm('此操作将永久删除, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
@@ -126,7 +126,31 @@ export default {
       // var res = [];
       // res.push(row.id)
     },
-
+    // 删除
+    deleteRow () {
+      // 获取选中列表的ids
+      let ids = [];
+      if (!this.selectRow.length) {
+        this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+        return;
+      }
+      this.selectRow.forEach((v) => {
+        ids.push(v.id);
+      });
+      this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+        .then((_) => {
+          this.$http.post('/sc-community-web/scResident/unboundHouse/batchDelete', ids).then(({ status, data, msg }) => {
+            if (0 === status) {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              });
+              this.mixins_search();
+            }
+          });
+        })
+        .catch(() => { });
+    },
     selectionChange (val) {
       this.selectRow = val;
     },