From 7577e0d40354021d70b78d58b712ff8c2e8ad485 Mon Sep 17 00:00:00 2001
From: ludc <ludc@vci-tech.com>
Date: 星期五, 03 一月 2025 10:47:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue |   90 +++++++++++++++++++--------------------------
 1 files changed, 38 insertions(+), 52 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
index 0bf39a8..035317e 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
@@ -5,9 +5,9 @@
         <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
           <!-- 宸︿晶鏍�         -->
           <div style="height:  calc(100vh - 190px);">
-            <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
+            <avue-tree v-loading="loading" :data="treeData" :option="treeOption" @node-click="nodeClick">
               <span slot-scope="{ node, data }" class="el-tree-node__label">
-               <span style="font-size: 15px">
+               <span>
                   <i class="el-icon-s-promotion"></i>
                     {{ (node || {}).label }}
                 </span>
@@ -33,21 +33,30 @@
           @search-reset="handleReset"
           @row-click="rowClickHandler">
           <template slot="menuLeft">
-            <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button>
+            <el-button v-if="permissionList.addBtn" icon="el-icon-plus" size="small" type="primary" @click="addHandler">
+              鍒涘缓
+            </el-button>
             <!--<el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button>
             <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button>-->
-            <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
+            <el-button v-if="!permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary"
+                       @click="upLoadClickHandler">瀵煎叆
             </el-button>
-            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆
+            <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary"
+                       @click="exportClickHandler">瀵煎嚭
             </el-button>
-            <el-button icon="el-icon-place" plain size="small" type="primary" @click="uiAuthorHandler">鎺堟潈</el-button>
+            <el-button v-if="permissionList.RIGHTBtn" icon="el-icon-place" plain size="small" type="primary"
+                       @click="uiAuthorHandler">鎺堟潈
+            </el-button>
           </template>
           <template slot="menu" slot-scope="scope">
-            <el-button icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">缂栬緫
+            <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text"
+                       @click="rowEditBtnClick(scope.row)">缂栬緫
             </el-button>
-            <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+            <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text"
+                       @click="rowDeleteHandler(scope.row)">鍒犻櫎
             </el-button>
-            <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">鍏嬮殕
+            <el-button v-if="permissionList.cloneBtn" icon="el-icon-document-copy" size="small" type="text"
+                       @click="rowCloneHandler(scope.row)">鍏嬮殕
             </el-button>
           </template>
           <template slot="plName" slot-scope="{row}">
@@ -164,12 +173,14 @@
 import func from "@/util/func";
 import plShow from "@/views/modelingMenu/ui/uiDefine/rightRegion/plShow";
 import uiAuthor from "@/views/authority/ui/uiAuthorization/UIDialog"
+import {mapGetters} from "vuex";
 
 export default {
   name: "index",
   components: {plShow, uiAuthor},
   data() {
     return {
+      loading: false,
       dialog: {
         showDialog: false,
         title: "涓婁笅鏂囪鎯�",
@@ -212,7 +223,6 @@
         addBtn: false,
         editBtn: false,
         delBtn: false,
-        tip: false,
         searchMenuSpan: 6,
         align: 'left',
         column: [{
@@ -357,13 +367,27 @@
       }
     }
   },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
+        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+        importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
+        cloneBtn: this.vaildData(this.permission[this.$route.query.id].clone, false),
+        RIGHTBtn: this.vaildData(this.permission[this.$route.query.id].RIGHT, false),
+      };
+    },
+  },
   created() {
     this.getTreeList();
   },
   methods: {
     //鏍戣〃鏌ヨ
     getTreeList() {
-      const loading = this.$loading({});
+      this.loading = true;
       getBizTree().then(res => {
         this.treeData = [res.data.obj];
         const dicData = res.data.obj.children.map(item => {
@@ -377,9 +401,9 @@
           disabled: true,
           children: dicData
         }];
-        loading.close();
+        this.loading = false;
       }).catch(error => {
-        loading.close();
+        this.loading = false;
       })
     },
     // 鏍戠偣鍑�
@@ -447,7 +471,7 @@
           this.lastIndex = newIndex;
         },
         () => {
-          this.selectList = [];
+          this.selectList = [row];
         }
       );
     },
@@ -582,8 +606,6 @@
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
         this.expDialogVisible = false;
-      }).catch(err => {
-        this.$message.error(err);
       });
     },
 
@@ -689,41 +711,5 @@
   .el-scrollbar__wrap {
     overflow: auto !important;
   }
-
-  .headerCon {
-    .el-button {
-      width: 82px;
-    }
-  }
 }
-
-.headerCon {
-  display: flex;
-  flex-wrap: wrap;
-  margin-bottom: 5px;
-
-  .el-button + .el-button {
-    margin-left: 5px;
-  }
-
-  .el-button {
-    margin-top: 5px;
-  }
-}
-
-.headerCon > .el-button:nth-child(4) {
-  margin-left: 0;
-}
-
-.headerCon > .el-button:nth-child(7) {
-  margin-left: 0;
-}
-
-
-.smallBtn {
-  width: 82px;
-  text-align: center;
-  padding-left: 4.5px;
-}
-
 </style>

--
Gitblit v1.9.3