From 617d2ad422a2ae5badc0572b06f33c2791cb95ad Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 29 十二月 2023 14:38:45 +0800
Subject: [PATCH] 质检代码调整
---
src/views/basic/post/index.vue | 43 ++++++++++++++++++++++++-------------------
1 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/src/views/basic/post/index.vue b/src/views/basic/post/index.vue
index 8ca0d4a..4961601 100644
--- a/src/views/basic/post/index.vue
+++ b/src/views/basic/post/index.vue
@@ -13,7 +13,10 @@
:ajaxFun="ajaxFun"
ref="partFamilyTable"
>
- <template #toolbar></template>
+ <template #toolbar>
+ <el-button @click="addOrUpdateHandle" type="primary"
+ v-if="permissions.basic_post_add">鏂板</el-button>
+ </template>
</ttable>
</el-col>
<el-col :span="12" style="padding-left: 10px">
@@ -115,27 +118,13 @@
searchInfoType: 'text'
}
],
- 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: '鎿嶄綔',
- width: 60,
- minWidth: 60
+ width: 70,
+ minWidth: 70
}
},
@@ -202,6 +191,19 @@
TableForm,
ttable
},
+ created(){
+ if(this.permissions.basic_staff_del){
+ this.table.operator = [
+ {
+ text: '鍒犻櫎',
+ icon: 'el-icon-delete',
+ type: 'text',
+ size: 'small',
+ fun: this.deleteHandle
+ }
+ ]
+ }
+ },
computed: {
...mapGetters(['permissions'])
},
@@ -212,6 +214,9 @@
},
// 鏂板 / 淇敼
addOrUpdateHandle(row) {
+ if(!this.permissions.basic_post_edit && row.id!=null){
+ return
+ }
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(row == null ? null : row.id)
--
Gitblit v1.9.3