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/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