From 7fca02745d606514a22dc2f4673e3ea1475495b6 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 30 一月 2024 16:54:52 +0800
Subject: [PATCH] 质检报告修改

---
 src/views/quality/processInspect/index.vue |   46 +++++++++++++++++++++++++++-------------------
 1 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/src/views/quality/processInspect/index.vue b/src/views/quality/processInspect/index.vue
index 2fddf58..5e630a0 100644
--- a/src/views/quality/processInspect/index.vue
+++ b/src/views/quality/processInspect/index.vue
@@ -21,6 +21,7 @@
     import * as fecha from 'element-ui/lib/utils/date'
 	import processInspectForm from './processInspect-form'
     import { transform } from '@/util/fileTransform'
+    import { mapGetters } from 'vuex'
     import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect'
 	export default {
 		components: {
@@ -89,7 +90,6 @@
                         },
                         {
                             minWidth: '130',
-                            width: '150',
                             prop: 'specs',
                             label: '瑙勬牸鍨嬪彿',
                             sort: true,
@@ -162,23 +162,8 @@
                             }
                         },
                     ],
-                    toolbar: [
-                    {
-                        text: '鏂板',
-                        type: 'primary',
-                        fun: this.addOrUpdateHandle
-                    },
-                    // {
-                    //     text: '瀵煎嚭',
-                    //     fun: this.exportExcel
-                    // }
-                    ],
-                    operator: [{
-                        text: '浣滃簾',
-                        type: 'text',
-                        size: 'small',
-                        fun: this.deleteHandle
-                    }],
+                    toolbar: [],
+                    operator: null,
                     operatorConfig: {
                     fixed: 'right',
                     label: '鎿嶄綔',
@@ -188,7 +173,26 @@
                 },
 			}
 		},
-		created() { },
+        computed: {
+            ...mapGetters(['permissions'])
+        },
+		created() { 
+            if(this.permissions.quality_processInspect_add){
+                this.table.toolbar.push({
+                        text: '鏂板',
+                        type: 'primary',
+                        fun: this.addOrUpdateHandle
+                    })
+            }
+            if(this.permissions.quality_processInspect_del){
+                this.table.operator = [{
+                        text: '浣滃簾',
+                        type: 'text',
+                        size: 'small',
+                        fun: this.deleteHandle
+                    }]
+            }
+         },
 		methods: {
             exportExcel(){
                 let queryParam=this.$refs.processInspect.getQueryParam();
@@ -215,6 +219,10 @@
 			},
 			// 鏂板 / 淇敼
 			addOrUpdateHandle(row) {
+                if(!this.permissions.quality_processInspect_edit && row){
+                    this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+                    return
+                }
 				this.$router.push({
 					name: 'processInspectForm',
 					query: { id: row == null ? null : row.id },

--
Gitblit v1.9.3