From ca24e514400e386de5066ec6e423d7fd2de43f65 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 31 一月 2024 16:30:17 +0800
Subject: [PATCH] 不合格状态

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

diff --git a/src/views/basic/param/index.vue b/src/views/basic/param/index.vue
index c3f0223..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
@@ -37,6 +40,7 @@
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
         isShow: true,
+        download:true,
         url: '/mes/param/upload'
       },
       prelang: 'operation',
@@ -51,6 +55,7 @@
         seqNo: true,
         isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳
         isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
+        isRefresh: true, // 鏄惁鏄剧ず鍒锋柊鎸夐挳
         defaultOrderBy: { column: 'createTime', direction: 'desc' }
       },
       table: {
@@ -147,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: '鎿嶄綔',
@@ -181,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: {
@@ -190,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