From 584ae5476c319cd1551a97b64c01ee1e5e5ff5a6 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 25 十月 2023 15:46:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/integration/systemInfo.vue |  125 ++++++++++++++++++++++-------------------
 1 files changed, 68 insertions(+), 57 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/integration/systemInfo.vue b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
index f7e2560..f4978de 100644
--- a/Source/UBCS-WEB/src/views/integration/systemInfo.vue
+++ b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -7,7 +7,7 @@
       <template slot="menuLeft">
         <!-- <el-button icon="el-icon-search" size="small" type="primary" @click="handleStatus">鏌� 璇�
         </el-button> -->
-        <el-button icon="el-icon-delete" size="small" type="danger" @click="handleDeleteByIds">鍒� 闄�
+        <el-button icon="el-icon-delete" size="small" type="danger" @click="handleDeleteByIds" v-if="this.permission.systemInfo.systemInfo_remove">鍒� 闄�
         </el-button>
       </template>
       <template slot="search" slot-scope="{row,size}">
@@ -19,10 +19,11 @@
                   :size="size" clearable style="width:300px;margin-left: 10px;"
                   @clear="handleClear" @keyup.enter.native="handleEnter"></el-input>
       </template>
-      <template #menu="{row,index,size}">
+      <template #menu="{row,index,size}" v-if="this.permission.systemInfo.systemInfo_empower">
         <el-button icon="el-icon-menu" size="small" type="text" @click="classifyHandler(row)">鍒嗙被鎺堟潈</el-button>
-
       </template>
+
+
     </avue-crud>
     <el-dialog :visible.sync="dialogVisible" append-to-body class="avue-dialog avue-dialog--top" title="鍒嗙被鎺堟潈"
                top="-50px">
@@ -54,7 +55,7 @@
   sysInfoTree,
   batchAddSave
 } from '@/api/integration/sysInfo.js'
-
+import {mapGetters} from "vuex";
 export default {
   data() {
     return {
@@ -90,54 +91,63 @@
       search: {},
       delIds: [],
       data: [],
-      option: {
-        height: "auto",
-        tip: false,
-        border: true,
-        align: 'center',
-        menuAlign: 'center',
-        index: true,
-        searchMenuSpan: 8,
-        searchBtn: false,
-        emptyBtn: false,
-        columnBtn: false,
-        defaultSort: {
-          prop: 'id,name',
-          order: 'descending'
-        },
-        selection: true,
-        column: [
-          {
-            label: '绯荤粺缂栧彿',
-            prop: 'id',
-            sortable: true,
-            rules: [{
-              required: true,
-              message: '绯荤粺缂栧彿涓嶈兘涓虹┖',
-              trigger: 'blur'
-            }],
-            // maxlength: 30,    //瀛楁暟闄愬埗
-          }, {
-            label: '绯荤粺鍚嶇О',
-            prop: 'name',
-            sortable: true,
-            rules: [{
-              required: true,
-              message: '绯荤粺鍚嶇О涓嶈兘涓虹┖',
-              trigger: 'blur'
-            }],
-            // maxlength: 30,    //瀛楁暟闄愬埗
-          },
-          {
-            label: '绯荤粺鎻忚堪',
-            prop: 'description',
-            type: 'textarea'
-          }
-        ]
-      },
+
     }
   },
   created() {
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    option(){
+      return{
+          height: "auto",
+          tip: false,
+          border: true,
+          align: 'center',
+          menuAlign: 'center',
+          index: true,
+          searchMenuSpan: 8,
+          addBtn:this.permission.systemInfo.systemInfo_add,
+          editBtn:this.permission.systemInfo.systemInfo_edit,
+          delBtn:this.permission.systemInfo.systemInfo_remove,
+          searchBtn: false,
+          emptyBtn: false,
+          columnBtn: false,
+          defaultSort: {
+            prop: 'id,name',
+            order: 'descending'
+          },
+          selection: true,
+          column: [
+            {
+              label: '绯荤粺缂栧彿',
+              prop: 'id',
+              sortable: true,
+              rules: [{
+                required: true,
+                message: '绯荤粺缂栧彿涓嶈兘涓虹┖',
+                trigger: 'blur'
+              }],
+              // maxlength: 30,    //瀛楁暟闄愬埗
+            }, {
+              label: '绯荤粺鍚嶇О',
+              prop: 'name',
+              sortable: true,
+              rules: [{
+                required: true,
+                message: '绯荤粺鍚嶇О涓嶈兘涓虹┖',
+                trigger: 'blur'
+              }],
+              // maxlength: 30,    //瀛楁暟闄愬埗
+            },
+            {
+              label: '绯荤粺鎻忚堪',
+              prop: 'description',
+              type: 'textarea'
+            }
+          ]
+      }
+    }
   },
   methods: {
     //閲嶇疆
@@ -159,35 +169,35 @@
       if (checked) {
         this.addAllChildren(row.children);
         this.addToParentList(row);
-        // 鍕鹃�夎鏃讹紝灏嗗綋鍓嶈浠ュ強鍏舵墍鏈夊瓙鑺傜偣娣诲姞鍒癙arentList涓�
+        // 鍕鹃�夎鏃跺皢鎵�鏈夎妭鐐规坊鍔犲埌ParentList涓�
       } else {
         this.removeAllChildren(row.children);
         this.removeFromParentList(row);
-        // 鍙栨秷鍕鹃�夎鏃讹紝灏嗗綋鍓嶈浠ュ強鍏舵墍鏈夊瓙鑺傜偣浠嶱arentList涓Щ闄�
+        // 鍙栨秷鍕鹃�夊皢鎵�鏈夎妭鐐规坊鍔犱粠ParentList涓Щ闄�
       }
-
       // console.table(this.ParentList);
     },
+    //瀛愯妭鐐规坊鍔�
     addAllChildren(children) {
       for (let child of children) {
         this.addToParentList(child);
         // 灏嗗瓙鑺傜偣娣诲姞鍒� ParentList 涓�
         if (child.children && child.children.length > 0) {
           this.addAllChildren(child.children);
-          // 閫掑綊璋冪敤缁х画娣诲姞瀛愯妭鐐圭殑瀛愯妭鐐�
         }
       }
     },
+    //瀛愯妭鐐圭Щ闄�
     removeAllChildren(children) {
       for (let child of children) {
         this.removeFromParentList(child);
         // 灏嗗瓙鑺傜偣浠� ParentList 涓Щ闄�
         if (child.children && child.children.length > 0) {
           this.removeAllChildren(child.children);
-          // 閫掑綊璋冪敤缁х画绉婚櫎瀛愯妭鐐圭殑瀛愯妭鐐�
         }
       }
     },
+    //褰撳墠鐖惰妭鐐规坊鍔�
     addToParentList(item) {
       const classifyOid = item.attributes.classifyOid;
       if (!this.isClassifyOidExists(classifyOid)) {
@@ -197,9 +207,9 @@
           classifyOid: classifyOid,
         };
         this.ParentList.push(record);
-        // 灏嗚妭鐐规坊鍔犲埌ParentList涓�
       }
     },
+    //褰撳墠鐖惰妭鐐圭Щ闄�
     removeFromParentList(item) {
       const classifyOid = item.attributes.classifyOid;
       if (this.isClassifyOidExists(classifyOid)) {
@@ -207,12 +217,13 @@
         if (index !== -1) {
           this.ParentList.splice(index, 1);
         }
-        // 灏嗚妭鐐逛粠ParentList涓Щ闄�
       }
     },
+    //鍒ら噸-ParentList
     isClassifyOidExists(classifyOid) {
       return this.ParentList.some(item => item.classifyOid === classifyOid);
     },
+    //鏌ユ壘index浣嶇疆
     findIndexByClassifyOid(classifyOid) {
       return this.ParentList.findIndex(item => item.classifyOid === classifyOid);
     },
@@ -385,7 +396,7 @@
             type: 'success',
             message: '鍒犻櫎鎴愬姛!'
           });
-          this.getDataList()
+          await this.getDataList()
         }
       })
     },

--
Gitblit v1.9.3