From 354cad3d3ab22ba147169beb6a0f6f51b9bab3a8 Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期三, 08 一月 2025 09:07:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue |   57 ++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
index 0f4c415..4bdb4a0 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
@@ -4,7 +4,7 @@
       <basic-container>
         <div style="display: flex;justify-content: space-between;flex-wrap: wrap">
           <div class="tag-group">
-            <span class="tag-group__title">鍒嗙粍</span>
+            <span class="tag-group__title" v-if="types.length>0">鍒嗙粍</span>
             <el-tag
               v-for="item in types"
               :key="item.key"
@@ -17,8 +17,14 @@
         </div>
         <div style="height: calc(100vh - 190px)">
           <div>
-            <el-button icon="el-icon-plus" type="primary" size="mini" @click="addHandler">娣诲姞</el-button>
-            <el-button icon="el-icon-upload" type="primary" size="mini" @click="uploadHandler">涓婁紶</el-button>
+            <el-button v-if="permissionList.addBtn" class="button-custom-icon" type="primary" size="small" @click="addHandler">
+              <icon-show :name="permissionList.addBtn.source"></icon-show>
+              娣诲姞
+            </el-button>
+            <el-button v-if="permissionList.uploadBtn" class="button-custom-icon" type="primary" size="small" @click="uploadHandler">
+              <icon-show :name="permissionList.uploadBtn.source"></icon-show>
+              涓婁紶
+            </el-button>
           </div>
 
           <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -48,17 +54,15 @@
           @close="visibleCloseHandler"
         >
           <avue-form ref="form" :option="option" v-model="form" :upload-after="uploadAfter" style="margin-bottom: 0;height:90px;overflow: hidden"> </avue-form>
-          <pre style="font-size: 12px;color: #b3b3b3;margin-top: 0;padding:5px;background-color: #f5f5f5">涓婁紶鏂囦欢涓簀son鏂囦欢锛岀ず渚嬪涓�
-[
-  {
-    "name": "iconoir:accessibility",
-    "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10M7 9l5 1m5-1l-5 1m0 0v3m0 0l-2 5m2-5l2 5\"/><path fill=\"currentColor\" d=\"M12 7a.5.5 0 1 1 0-1a.5.5 0 0 1 0 1\"/></g></svg>"
+          <pre style="font-size: 12px;color: #909399;margin-top: 0;padding:5px;background-color: #F5F7FA">涓婁紶鏂囦欢涓簀son鏂囦欢锛岀ず渚嬪涓�
+[{
+    "name": "鍥炬爣搴撳悕:鍥炬爣鍚嶇О",
+    "svg": "svg鐨刪tml浠g爜"
   },
   {
-    "name": "iconoir:accessibility-sign",
-    "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"m11.5 12.5l7-.5l-1.5 6.5m-5.5-6l4.5-5L12.5 5L10 7.5m8.5-1a2 2 0 1 1 0-4a2 2 0 0 1 0 4\"/><path d=\"M5.5 12.5a5 5 0 0 1 7.584 6M3.729 15A5 5 0 0 0 11 20.831\"/></g></svg>"
-  }
- ]
+    "name": "鍥炬爣搴撳悕:鍥炬爣鍚嶇О",
+    "svg": "svg鐨刪tml浠g爜"
+ }]
  鏂囦欢鍐呭椤讳弗鏍兼寜鐓хず渚嬫牸寮忥紝name涓哄浘鏍囧簱鍚�+鍥炬爣鍚嶇О锛屼互鈥�:鈥濆垎闅旓紝svg涓哄浘鏍噃tml浠g爜</pre>
         </el-dialog>
         <!-- 娣诲姞銆佷慨鏀� -->
@@ -89,6 +93,7 @@
 import {getStore} from "@/util/store";
 import store from "@/store";
 import {getToken} from "@/util/auth";
+import {mapGetters} from "vuex";
 
 export default {
 name: "index",
@@ -186,11 +191,11 @@
             value:'key'
           }
         }, {
-          label: "svg浠g爜",
+          label: "鍥炬爣浠g爜",
           prop: "content",
           type: "textarea",
           span: 24,
-          placeholder:'璇疯緭鍏ュ浘鏍噑vg浠g爜锛屾牸寮忕ず渚�<svg xmlns=\"http://www.w3.org/2000/svg\" ></svg>',
+          placeholder:'璇疯緭鍏ュ浘鏍噃tml浠g爜锛屾牸寮忕ず渚�<svg xmlns=\"http://www.w3.org/2000/svg\" ></svg>',
           rules: [{
             required: true,
             message: "璇疯緭鍏ュ浘鏍噑vg浠g爜",
@@ -217,6 +222,13 @@
         "Authorizationtoken":getToken(),
       };
     },
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+        uploadBtn: this.vaildData(this.permission[this.$route.query.id].UPLOAD, false),
+      };
+    },
   },
   watch:{
     'form.groups'(val){
@@ -228,7 +240,8 @@
   },
   created() {
     this.getGroups();
-    this.initList();  },
+    this.initList();
+  },
   methods:{
     getGroups() {
       getDicts('EnumIconGroups').then(res => {
@@ -474,7 +487,14 @@
 }
 </script>
 
-<style scoped>
+<style scoped lang="scss">
+::v-deep{
+  svg{
+    font-size: inherit;
+    height: 100%;
+    width:100%;
+  }
+}
 .tag-group{font-size: 14px;}
 .el-tag{
   margin: 0 0 10px 10px;
@@ -491,7 +511,10 @@
   text-align: center;
 }
 .iconList .iconItem .svgContent{
-  font-size: 26px;
+  font-size: 24px;
+  width: 24px;
+  height: 24px;
+  margin: 0 auto;
 }
 .iconList .iconItem .svgContent:hover{
   transform: scale(1.5);

--
Gitblit v1.9.3