From 2bdbe42d8d4b03b46d2066e50e595a06cebd43c2 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期六, 13 四月 2024 22:34:05 +0800
Subject: [PATCH] 1

---
 src/views/console/system/component-classification.vue |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/src/views/console/system/component-classification.vue b/src/views/console/system/component-classification.vue
index 52f2fa9..27f8f4c 100644
--- a/src/views/console/system/component-classification.vue
+++ b/src/views/console/system/component-classification.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-04-09 22:18:47
  * @LastEditors: Sneed
- * @LastEditTime: 2024-04-10 20:40:09
+ * @LastEditTime: 2024-04-11 21:36:58
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/system/component-classification.vue
  * 鍒嗙被缁存姢
 -->
@@ -12,14 +12,15 @@
             <el-button @click="del" plain type="danger" :disabled="selection.length == 0">鍒犻櫎</el-button>
         </el-header>
         <el-main>
-            <el-table @selection-change="handleSelectionChange" :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="id" border
-                :tree-props="{ hasChildren: 'has' }">
+            <el-table @selection-change="handleSelectionChange" :data="tableData"
+                style="width: 100%;margin-bottom: 20px;" row-key="id" border :tree-props="{ hasChildren: 'has' }">
                 <el-table-column type="selection" width="55" />
                 <el-table-column prop="name" label="鍒嗙被鍚嶇О" />
                 <el-table-column prop="parentId" label="涓婄骇鍒嗙被" />
                 <el-table-column prop="icon" label="鍒嗙被鍥炬爣">
                     <template #default="scope">
-                        <component v-if="icons.includes(scope.row.icon)" style="width: 20px;height: 20px;" :is='scope.row.icon'></component>
+                        <component v-if="icons.includes(scope.row.icon)" style="width: 20px;height: 20px;"
+                            :is='scope.row.icon'></component>
                     </template>
                 </el-table-column>
                 <el-table-column prop="type" label="鍒嗙被缂栧彿" />
@@ -63,8 +64,8 @@
                     </el-col>
                     <el-col :span="12">
                         <el-form-item label="鍒嗙被鍥炬爣" prop="icon">
-                            <el-input @click="showIconDialog = true" style="width: 240px" v-model="row.icon" placeholder="璇烽�夋嫨鍒嗙被鍥炬爣"
-                                clearable></el-input>
+                            <el-input @click="showIconDialog = true" style="width: 240px" v-model="row.icon"
+                                placeholder="璇烽�夋嫨鍒嗙被鍥炬爣" clearable></el-input>
                         </el-form-item>
                     </el-col>
                     <el-col :span="12">
@@ -82,7 +83,8 @@
                     <el-col :span="12">
                         <el-form-item label="鐘舵��" prop="status">
                             <el-radio-group style="width: 240px" v-model="row.status">
-                                <el-radio v-for="item in statusList" :label="item.value" :key="item.value">{{ item.label }}</el-radio>
+                                <el-radio v-for="item in statusList" :label="item.value" :key="item.value">{{ item.label
+                                    }}</el-radio>
                             </el-radio-group>
                         </el-form-item>
                     </el-col>
@@ -99,9 +101,9 @@
         </el-dialog>
         <el-dialog v-model="showIconDialog" title="鍒嗙被鍥炬爣" width="750">
             <div class="icons">
-                <component @click="setIcon(item)" class="icon" v-for="item in icons" :is='item' :key="item"></component>    
+                <component @click="setIcon(item)" class="icon" v-for="item in icons" :is='item' :key="item"></component>
             </div>
-            
+
         </el-dialog>
     </el-container>
 </template>
@@ -139,7 +141,7 @@
                 ]
             },
             options: [],
-            statusList:[
+            statusList: [
                 {
                     label: '鍚敤',
                     value: 1
@@ -181,7 +183,7 @@
             })
         },
         del() {
-            this.$API.setting.del.delete({},{data: this.selection.map(v => v.id)}).then(res => {
+            this.$API.setting.del.delete({}, { data: this.selection.map(v => v.id) }).then(res => {
                 this.queryList()
             })
         },
@@ -195,9 +197,9 @@
             })
         },
         table_edit(row) {
-            this.row = {...row}
+            this.row = { ...row }
             console.log(this.row)
-            this.dialogTitle = '鏂板'
+            this.dialogTitle = '缂栬緫'
             this.dialogVisible = true
         },
         table_del(row) {
@@ -210,7 +212,7 @@
             this.selection = selection;
         },
         setIcon(icon) {
-            console.log('>>>>>>',icon)
+            console.log('>>>>>>', icon)
             this.row.icon = icon
             this.showIconDialog = false
         }
@@ -219,14 +221,15 @@
 </script>
 
 <style lang="scss" scoped>
-    .icons {
-        display: flex;
-        flex-wrap: wrap;
-    }
-    .icon {
-        margin: 10px;
-        width: 20px;
-        height: 20px;
-        cursor: pointer;
-    }
+.icons {
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.icon {
+    margin: 10px;
+    width: 20px;
+    height: 20px;
+    cursor: pointer;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3