From dc04c05b22a5323925218092a0687555a2a5c9c1 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期四, 29 九月 2022 18:39:31 +0800
Subject: [PATCH] 上报管理界面,案件池的违规、违建登记页面

---
 src/views/systemSetting/baseSetting/role/index.vue |   39 ++++++++++++++++++++++++++++-----------
 1 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/src/views/systemSetting/baseSetting/role/index.vue b/src/views/systemSetting/baseSetting/role/index.vue
index fceb8a6..1eca7a3 100644
--- a/src/views/systemSetting/baseSetting/role/index.vue
+++ b/src/views/systemSetting/baseSetting/role/index.vue
@@ -57,7 +57,7 @@
                                 <span class="line">|</span>
                                 <span @click="handleStop(scope.row)">鍋滅敤</span>
                                 <span class="line">|</span>
-                                <span @click="handleDelete(scope.row)">鍒犻櫎</span>
+                                <span @click="handleDelete([scope.row.id])">鍒犻櫎</span>
                             </div>
                         </template>
                     </el-table-column>
@@ -118,6 +118,7 @@
             all: false,
             unsame: false,
             myIdx: 0,
+            preMyIdx: 0,
             options: [
                 {
                     value: 0,
@@ -145,11 +146,25 @@
     },
     methods: {
         selectChange(list) {
-            console.log(list);
             console.log(this.tempList);
+            if (this.tempList.length !== 0) {
+                if (list === 3) {
+                    this.preMyIdx = list;
+                    this.handleDelete(this.tempList);
+                }
+            } else {
+                this.myIdx = this.preMyIdx;
+                this.$message({
+                    type: 'warning',
+                    message: '鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁',
+                })
+            }
         },
         tableChange(list) {
-            this.tempList = list;
+            this.tempList = [];
+            list.forEach(item => {
+                this.tempList.push(item.id);
+            })
             if (list.length === this.tableData.length) {
                 this.all = true;
             } else {
@@ -160,27 +175,26 @@
             return helper(createTime);
         },
         selectAll() {
-
             this.$refs.multipleTable.toggleAllSelection();
         },
         disSame(list) {
-            // console.log(this.$refs.multipleTable);
-            // const row = this.$refs.table.data
             list.forEach(row => {
                 this.$refs.multipleTable.toggleRowSelection(row)
             })
         },
-        handleDelete({ id }) {
+        handleDelete(id) {
             const that = this;
-            let arr = [];
-            arr.push(id);
+            // let arr = [];
+            // arr.push(id);
             this.$confirm('纭鍒犻櫎锛�')
                 .then(_ => {
                     that.$axios({
                         method: 'post',
-                        url: 'sccg/role/delete?ids=' + arr,
+                        url: 'sccg/role/delete?ids=' + id,
                     })
                         .then(res => {
+                            this.myIdx = 0;
+                            this.preMyIdx = 0;
                             console.log(res);
                             this.$message({
                                 type: 'success',
@@ -295,7 +309,10 @@
         },
         changeDialog(val) {
             this.dialogUpdate = val.dialogUpdate;
-            console.log(val);
+            this.$message({
+                type:'success',
+                message:'鏇存敼鎴愬姛',
+            })
         },
         handleClose(done) {
             this.$confirm('纭鍏抽棴锛�')

--
Gitblit v1.8.0