From 50ba0927c9644b072928b83d91820719dcb13ec9 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期一, 18 三月 2024 17:03:41 +0800 Subject: [PATCH] tianjai remark --- src/views/basic/staff/index.vue | 41 +++++++++++++++++++++++------------------ 1 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/views/basic/staff/index.vue b/src/views/basic/staff/index.vue index d9ad232..9442faf 100644 --- a/src/views/basic/staff/index.vue +++ b/src/views/basic/staff/index.vue @@ -10,7 +10,10 @@ :ajaxFun="ajaxFun" ref="staffTable" > - <template #toolbar></template> + <template #toolbar> + <el-button type="primary" @click="addOrUpdateHandle" + v-if="permissions.basic_staff_add">鏂板</el-button> + </template> </ttable> <!-- 寮圭獥, 鏂板 / 淇敼 --> <table-form @@ -40,7 +43,7 @@ // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl isShow: true, url: '/mes/staff/upload', - Download: true, + download: true, fileName: '鍛樺伐妯℃澘' }, prelang: 'operation', @@ -207,21 +210,8 @@ searchInfoType: 'text' } ], - toolbar: [ - { - text: '鏂板', - type: 'primary', - fun: this.addOrUpdateHandle - } - ], - operator: [ - { - text: '鍒犻櫎', - type: 'text', - size: 'small', - fun: this.deleteHandle - } - ], + toolbar: [], + operator: null, operatorConfig: { fixed: 'right', label: '鎿嶄綔', @@ -237,7 +227,7 @@ ttable }, computed: { - ...mapGetters(['permissions']) + ...mapGetters(['permissions']), }, methods: { // 鑾峰彇鏁版嵁鍒楄〃 @@ -246,6 +236,10 @@ }, // 鏂板 / 淇敼 addOrUpdateHandle(row) { + if(!this.permissions.basic_staff_edit && row.id!=null){ + this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�") + return + } this.addOrUpdateVisible = true this.$nextTick(() => { this.$refs.addOrUpdate.init(row == null ? null : row.id) @@ -284,6 +278,17 @@ } }, created() { + this.uploadInfo.isShow = this.permissions.basic_staff_upload + if(this.permissions.basic_staff_del){ + this.table.operator = [ + { + text: '鍒犻櫎', + type: 'text', + size: 'small', + fun: this.deleteHandle + } + ] + } this.initPersonNatureSelect() } } -- Gitblit v1.9.3