From 2ad2a3cdd0df63b6557789ba8a9d968984fe5da3 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期二, 26 十一月 2024 16:25:31 +0800
Subject: [PATCH] 调整页面

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue |   48 +++++++++++++++++++++++++++++++-----------------
 1 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
index 797cd39..e890aff 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
@@ -31,6 +31,15 @@
         <el-button icon="el-icon-delete" plain size="small" type="text" @click="delRowClickHandler(row)">鍒犻櫎
         </el-button>
       </template>
+
+      <template #icon="{ row }">
+          <span class="avue-icon avue-icon--small">
+            <svg v-if="row.icon && row.icon.indexOf('#')==-1" aria-hidden="true">
+              <use :xlink:href="row.icon"></use>
+            </svg>
+            <i v-else :class="row.icon"></i>
+          </span>
+      </template>
     </avue-crud>
 
     <!-- 鏂板 淇敼 -->
@@ -56,6 +65,12 @@
             </el-form-item>
           </el-col>
           <el-col :span="24">
+            <el-form-item label="鍥炬爣锛�" prop="icon">
+              <avue-input-icon v-model="form.icon" :icon-list="iconList" placeholder="璇烽�夋嫨鍥炬爣">
+              </avue-input-icon>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
             <el-form-item label="鎻忚堪锛�" prop="description">
               <el-input v-model="form.description" :rows="2" type="textarea"></el-input>
             </el-form-item>
@@ -70,7 +85,7 @@
 
     <!-- 瀵煎叆 -->
     <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
-                 @updata="getTreeList"></upload-file>
+                 @updata="getList"></upload-file>
 
     <!-- 鏌ョ湅浣跨敤鑼冨洿 -->
     <el-dialog
@@ -92,18 +107,19 @@
       </avue-crud>
     </el-dialog>
   </basic-container>
-
 </template>
 
 <script>
 import {gridStatus, addSave, editSave, deleteStatus, exportStatus, listUsed} from "@/api/modeling/statusPool/api";
 import func from "@/util/func";
 import basicOption from "@/util/basic-option";
+import iconList from "@/config/iconList";
 
 export default {
   name: "index",
   data() {
     return {
+      iconList: iconList,
       loading: false,
       data: [],
       option: {
@@ -117,6 +133,10 @@
             label: '鍚嶇О',
             prop: 'id',
             sortable: true,
+          },
+          {
+            label: '鍥炬爣',
+            prop: 'icon'
           },
           {
             label: '鏍囩',
@@ -187,24 +207,21 @@
     }
   },
   created() {
-    this.getTreeList();
+    this.getList();
   },
   methods: {
-    // 宸︿晶鏍戣姹�
-    getTreeList() {
+    getList() {
       gridStatus(this.page.currentPage, this.page.pageSize).then(res => {
         const data = res.data.data;
         this.data = data;
         this.page.total = res.data.total;
         this.loading = false;
-      }).catch(err => {
-        this.$message.error(err);
       });
     },
 
     // 琛ㄦ牸鍒锋柊
     handleRefresh() {
-      this.getTreeList();
+      this.getList();
     },
 
     // 琛ㄦ牸澶氶��
@@ -215,13 +232,13 @@
     //  鏉℃暟
     sizeChange(val) {
       this.page.pageSize = val;
-      this.getTreeList();
+      this.getList();
     },
 
     // 椤电爜
     currentChange(val) {
       this.page.currentPage = val;
-      this.getTreeList();
+      this.getList();
     },
 
     // 琛屽崟閫�
@@ -267,7 +284,7 @@
         deleteStatus(this.selectList).then(res => {
           if (res.data.code === 200) {
             this.$message.success(res.data.obj);
-            this.getTreeList();
+            this.getList();
           }
         })
       }).catch(() => {
@@ -290,7 +307,7 @@
         deleteStatus(list).then(res => {
           if (res.data.code === 200) {
             this.$message.success(res.data.obj);
-            this.getTreeList();
+            this.getList();
           }
         })
       }).catch(() => {
@@ -323,14 +340,12 @@
             if (res.data.code === 200) {
               this.$message.success(res.data.obj);
               this.loading = true;
-              this.getTreeList();
+              this.getList();
               this.visible = false;
             } else {
               this.$message.error(res.data.obj);
             }
-          }).catch(error => {
-            this.$message.error(error);
-          });
+          })
         } else {
           return false;
         }
@@ -389,7 +404,6 @@
         this.checkViewData = this.checkViewDataSearch;
         return done();
       }
-      ;
 
       this.checkViewData = this.checkViewData.filter(item => {
         return item.name && item.name.includes(name);

--
Gitblit v1.9.3