From 100ef1c097be26870f4f92fabf70f5b9b7e0f265 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期三, 25 十月 2023 18:19:35 +0800 Subject: [PATCH] 整合代码 --- Source/UBCS-WEB/src/views/code/Match.vue | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/Match.vue b/Source/UBCS-WEB/src/views/code/Match.vue index 9a98bd2..1713b75 100644 --- a/Source/UBCS-WEB/src/views/code/Match.vue +++ b/Source/UBCS-WEB/src/views/code/Match.vue @@ -6,6 +6,7 @@ :option="option" :page.sync="page" :table-loading="loading" + :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" @@ -18,6 +19,7 @@ <el-button icon="el-icon-search" plain size="small" + v-if="permissionList.search" type="primary" @click="searchHandler">鏌� 璇� </el-button> <advanced-query :options="options" :visible.sync="findvisible" @@ -25,16 +27,19 @@ <el-button icon="el-icon-delete" plain size="small" + v-if="permissionList.delBtn" type="danger" @click="deleteHandler">鍒� 闄� </el-button> <el-button icon="el-icon-edit" plain size="small" + v-if="permissionList.editBtn" type="success" @click="editHandler">淇� 鏀� </el-button> <el-button icon="el-icon-refresh-right" plain size="small" + v-if="permissionList.breakBtn" type="primary" @click="onLoad">鍒� 鏂� </el-button> </template> @@ -44,7 +49,7 @@ <script> import {getList, add, editSave, deleteData} from "@/api/code/codeMatch"; - +import {mapGetters} from "vuex"; export default { name: "Match", data() { @@ -212,6 +217,18 @@ created() { this.onLoad() }, + computed:{ + ...mapGetters(["permission"]), + permissionList(){ + return{ + search:this.vaildData(this.permission.match.math_search,false), + delBtn:this.vaildData(this.permission.match.math_delete,false), + addBtn:this.vaildData(this.permission.match.math_add,false), + editBtn:this.vaildData(this.permission.match.math_edit,false), + breakBtn:this.vaildData(this.permission.match.math_break,false), + } + }, + }, methods: { searchHandler() { this.findvisible = true; -- Gitblit v1.9.3