From 3b02a02e6f615f167b06ca4d62d094cda777d862 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 22 一月 2024 09:55:35 +0800
Subject: [PATCH] 模具使用记录

---
 src/views/basic/staff/index.vue |   41 +++++++++++++++++++++++------------------
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/src/views/basic/staff/index.vue b/src/views/basic/staff/index.vue
index d9ad232..9442faf 100644
--- a/src/views/basic/staff/index.vue
+++ b/src/views/basic/staff/index.vue
@@ -10,7 +10,10 @@
         :ajaxFun="ajaxFun"
         ref="staffTable"
       >
-        <template #toolbar></template>
+        <template #toolbar>
+          <el-button type="primary" @click="addOrUpdateHandle"
+          v-if="permissions.basic_staff_add">鏂板</el-button>
+        </template>
       </ttable>
       <!-- 寮圭獥, 鏂板 / 淇敼 -->
       <table-form
@@ -40,7 +43,7 @@
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
         isShow: true,
         url: '/mes/staff/upload',
-        Download: true,
+        download: true,
         fileName: '鍛樺伐妯℃澘'
       },
       prelang: 'operation',
@@ -207,21 +210,8 @@
             searchInfoType: 'text'
           }
         ],
-        toolbar: [
-          {
-            text: '鏂板',
-            type: 'primary',
-            fun: this.addOrUpdateHandle
-          }
-        ],
-        operator: [
-          {
-            text: '鍒犻櫎',
-            type: 'text',
-            size: 'small',
-            fun: this.deleteHandle
-          }
-        ],
+        toolbar: [],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
@@ -237,7 +227,7 @@
     ttable
   },
   computed: {
-    ...mapGetters(['permissions'])
+    ...mapGetters(['permissions']),
   },
   methods: {
     // 鑾峰彇鏁版嵁鍒楄〃
@@ -246,6 +236,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.basic_staff_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(row == null ? null : row.id)
@@ -284,6 +278,17 @@
     }
   },
   created() {
+    this.uploadInfo.isShow = this.permissions.basic_staff_upload
+    if(this.permissions.basic_staff_del){
+      this.table.operator = [
+          {
+            text: '鍒犻櫎',
+            type: 'text',
+            size: 'small',
+            fun: this.deleteHandle
+          }
+        ]
+    }
     this.initPersonNatureSelect()
   }
 }

--
Gitblit v1.9.3