From f14f98a263141d2f8ec0079866a758cc7a1c38d1 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期一, 22 八月 2022 03:20:29 +0800
Subject: [PATCH] 添加用户删除功能

---
 src/views/personalCenter/components/AddBox.vue |  155 ++++++++++++++++-----------------------------------
 1 files changed, 49 insertions(+), 106 deletions(-)

diff --git a/src/views/personalCenter/components/AddBox.vue b/src/views/personalCenter/components/AddBox.vue
index c3433c8..f9a5cdd 100644
--- a/src/views/personalCenter/components/AddBox.vue
+++ b/src/views/personalCenter/components/AddBox.vue
@@ -5,10 +5,7 @@
     <div class="close iconfont" @click="close()">&#xe60f;</div>
 
     <div class="search">
-      <el-input
-        v-model="searchContent"
-        placeholder="璇疯緭鍏ラ泦缇P/闆嗙兢鍚嶇О/璁惧IP/璁惧鍚嶇О"
-      ></el-input>
+      <el-input v-model="searchContent" placeholder="璇疯緭鍏ラ泦缇P/闆嗙兢鍚嶇О/璁惧IP/璁惧鍚嶇О"></el-input>
       <div class="button" @click="listType = 'cluster'">鎼滅储闆嗙兢</div>
       <div class="button" @click="listType = 'equipment'">鎼滅储璁惧</div>
     </div>
@@ -16,11 +13,7 @@
     <div class="clusterList">
       <div class="tableList" v-if="listType == 'cluster'">
         <div class="header">
-          <div
-            class="label"
-            v-for="(item, index) in clusterHeader"
-            :key="index"
-          >
+          <div class="label" v-for="(item, index) in clusterHeader" :key="index">
             {{ item }}
           </div>
         </div>
@@ -36,49 +29,20 @@
               </div>
               <div class="rowItem options">
                 <!-- 娣诲姞 -->
-                <span class="iconfont option" @click="showPasswordBox = true"
-                  >&#xe63f;</span
-                >
+                <span class="iconfont option" @click="showPasswordBox = true">&#xe63f;</span>
                 <!-- 闆嗙兢璇︽儏  -->
-                <span class="iconfont option" @click="showChildrenLIst(index)"
-                  >&#xe63e;</span
-                >
+                <span class="iconfont option" @click="showChildrenLIst(index)">&#xe63e;</span>
               </div>
             </div>
 
-            <div
-              class="overList"
-              :class="{ isShow: showClusterChild == index }"
-            >
-              <el-table
-                :data="overList"
-                :fit="true"
-                header-row-class-name="overList-head"
-              >
-                <el-table-column
-                  label="搴忓彿"
-                  type="index"
-                  width="146"
-                  class-name="index "
-                >
-                </el-table-column>
-                <el-table-column
-                  prop="id"
-                  label="璁惧ID"
-                  width="146"
-                ></el-table-column>
+            <div class="overList" :class="{ isShow: showClusterChild == index }">
+              <el-table :data="overList" :fit="true" header-row-class-name="overList-head">
+                <el-table-column label="搴忓彿" type="index" width="146" class-name="index "> </el-table-column>
+                <el-table-column prop="id" label="璁惧ID"></el-table-column>
 
-                <el-table-column
-                  prop="ip"
-                  label="璁惧IP"
-                  width="146"
-                ></el-table-column>
+                <el-table-column prop="ip" label="璁惧IP" width="146"></el-table-column>
 
-                <el-table-column
-                  prop="name"
-                  label="璁惧鍚嶇О"
-                  width="240"
-                ></el-table-column>
+                <el-table-column prop="name" label="璁惧鍚嶇О" width="240"></el-table-column>
               </el-table>
 
               <div class="iconfont" @click="showClusterChild = null">
@@ -89,30 +53,12 @@
         </div>
       </div>
 
-      <el-table
-        :data="equipmentList"
-        :fit="true"
-        v-if="listType == 'equipment'"
-      >
-        <el-table-column
-          label="搴忓彿"
-          type="index"
-          width="72"
-          class-name="index"
-        >
-        </el-table-column>
+      <el-table :data="equipmentList" :fit="true" v-if="listType == 'equipment'">
+        <el-table-column label="搴忓彿" type="index" width="72" class-name="index"> </el-table-column>
         <el-table-column prop="id" label="璁惧ID" width="107"></el-table-column>
-        <el-table-column
-          prop="name"
-          label="璁惧鍚嶇О"
-          width="107"
-        ></el-table-column>
+        <el-table-column prop="name" label="璁惧鍚嶇О" width="107"></el-table-column>
         <el-table-column prop="ip" label="璁惧IP" width="107"></el-table-column>
-        <el-table-column
-          prop="cluster"
-          label="鎵�灞為泦缇�"
-          width="107"
-        ></el-table-column>
+        <el-table-column prop="cluster" label="鎵�灞為泦缇�" width="107"></el-table-column>
         <el-table-column label="鐘舵��" width="107">
           <template slot-scope="scope">
             <div v-if="scope.row.status == 1" class="status green">宸叉坊鍔�</div>
@@ -124,9 +70,7 @@
           <template slot-scope="scope">
             <div class="options" v-if="scope">
               <!-- 娣诲姞 -->
-              <span class="iconfont option" @click="showPasswordBox = true"
-                >&#xe63f;</span
-              >
+              <span class="iconfont option" @click="showPasswordBox = true">&#xe63f;</span>
             </div>
           </template>
         </el-table-column>
@@ -137,8 +81,7 @@
       <div class="title">鐢宠娣诲姞璁惧</div>
       <div class="des">
         <span class="iconfont">&#xe601;</span>
-        濡傝澶囧凡鍔犲叆闆嗙兢锛屾坊鍔犵鐞嗗悗闆嗙兢涓嬫墍鏈夎澶囧皢鍦ㄨ澶囩鐞�
-        椤甸潰鏄剧ず锛屽苟鏀寔淇℃伅鏌ョ湅鍙婄鐞嗐��
+        濡傝澶囧凡鍔犲叆闆嗙兢锛屾坊鍔犵鐞嗗悗闆嗙兢涓嬫墍鏈夎澶囧皢鍦ㄨ澶囩鐞� 椤甸潰鏄剧ず锛屽苟鏀寔淇℃伅鏌ョ湅鍙婄鐞嗐��
       </div>
       <div class="ask">瀵嗛挜淇℃伅璇疯闂澶囩鐞嗕汉鍛�</div>
       <el-input v-model="auth_password"></el-input>
@@ -163,23 +106,23 @@
         {
           name: "闆嗙兢1",
           ip: "192.168.7.45",
-          status: "1",
+          status: "1"
         },
         {
           name: "闆嗙兢1",
           ip: "192.168.7.45",
-          status: "1",
+          status: "1"
         },
         {
           name: "闆嗙兢1",
           ip: "192.168.7.45",
-          status: "0",
+          status: "0"
         },
         {
           name: "闆嗙兢1",
           ip: "192.168.7.45",
-          status: "0",
-        },
+          status: "0"
+        }
       ],
       equipmentList: [
         {
@@ -187,64 +130,64 @@
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
-        },
+          status: "1"
+        }
       ],
       overList: [
         {
@@ -252,51 +195,51 @@
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
+          status: "1"
         },
         {
           id: "BJS23123132",
           name: "鏈嶅姟鍣�20.10",
           ip: "192.168.7.45",
           cluster: "闆嗙兢1",
-          status: "1",
-        },
+          status: "1"
+        }
       ],
-      auth_password: "", //鎺堟潈绉橀挜
-    };
+      auth_password: "" //鎺堟潈绉橀挜
+    }
   },
   methods: {
     close() {
-      this.$emit("close");
+      this.$emit("close")
     },
     showChildrenLIst(index) {
       if (this.showClusterChild === index) {
-        this.showClusterChild = null;
-        return;
+        this.showClusterChild = null
+        return
       } else if (!index) {
-        this.showClusterChild = index;
+        this.showClusterChild = index
       }
-      this.showClusterChild = null;
+      this.showClusterChild = null
       setTimeout(() => {
-        this.showClusterChild = index;
-      }, 400);
-    },
-  },
-};
+        this.showClusterChild = index
+      }, 400)
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
@@ -595,4 +538,4 @@
     }
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0