From 9441aa12b933f294287ac9a2a37953276c327d6b Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 18 一月 2024 17:29:48 +0800
Subject: [PATCH] 工序

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

diff --git a/src/views/basic/param/index.vue b/src/views/basic/param/index.vue
index 071af0d..7a5b4be 100644
--- a/src/views/basic/param/index.vue
+++ b/src/views/basic/param/index.vue
@@ -10,7 +10,10 @@
         :ajaxFun="ajaxFun"
         ref="paramTable"
       >
-        <template #toolbar></template>
+        <template #toolbar>
+          <el-button type="primary" @click="addOrUpdateHandle"
+          v-if="permissions.technology_param_add">鏂板</el-button>
+        </template>
       </ttable>
       <!-- 寮圭獥, 鏂板 / 淇敼 -->
       <table-form
@@ -36,7 +39,8 @@
       isShowQuery: false,
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
-        isShow: false,
+        isShow: true,
+        download:true,
         url: '/mes/param/upload'
       },
       prelang: 'operation',
@@ -148,22 +152,8 @@
             searchInfoType: 'datetimerange'
           }
         ],
-        toolbar: [
-          {
-            text: '鏂板',
-            type: 'primary',
-            fun: this.addOrUpdateHandle
-          }
-        ],
-        operator: [
-          {
-            text: '鍒犻櫎',
-            icon: 'el-icon-delete',
-            type: 'text',
-            size: 'small',
-            fun: this.deleteHandle
-          }
-        ],
+        toolbar: [],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
@@ -182,6 +172,17 @@
     ...mapGetters(['permissions'])
   },
   created() {
+    if(this.permissions.technology_param_del){
+      this.table.operator = [
+          {
+            text: '鍒犻櫎',
+            icon: 'el-icon-delete',
+            type: 'text',
+            size: 'small',
+            fun: this.deleteHandle
+          }
+        ]
+    }
     this.getParamType()
   },
   methods: {
@@ -191,6 +192,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.technology_param_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(row == null ? null : row.id)

--
Gitblit v1.9.3