From dc861690e468ed4c7123673dca6415581ce2cbb0 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 16 十二月 2024 16:39:15 +0800 Subject: [PATCH] 日志管理模块页面按钮权限 --- Source/plt-web/plt-web-ui/src/views/system/log/index.vue | 38 ++++++++++++++++++++++++++++++++------ 1 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/system/log/index.vue b/Source/plt-web/plt-web-ui/src/views/system/log/index.vue index cf0cfe1..6172a24 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/log/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/log/index.vue @@ -15,7 +15,9 @@ @current-change="currentChange" > <template slot="menuLeft" slot-scope="scope"> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> + <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" + @click="exportClickHandler">瀵煎嚭 + </el-button> </template> </avue-crud> </basic-container> @@ -23,8 +25,9 @@ <script> import basicOption from "@/util/basic-option"; -import {getLogListByContion,getOperatingUsers,exportLog} from "@/api/system/log/logBasic"; +import {getLogListByContion, getOperatingUsers, exportLog} from "@/api/system/log/logBasic"; import func from "@/util/func"; +import {mapGetters} from "vuex"; export default { name: "index", @@ -111,11 +114,25 @@ this.getTableList(); } }, + computed: { + ...mapGetters(["permission"]), + permissionList() { + return { + exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), + }; + }, + }, + created() { + console.log(this.$route.query.id) + }, methods: { // 琛ㄦ牸璇锋眰 getTableList() { this.tableLoading = true; - getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType': this.$route.query.logType,'roleType':this.$route.query.roleType, ...this.searchParams}).then(res => { + getLogListByContion(this.page.currentPage, this.page.pageSize, { + 'logType': this.$route.query.logType, + 'roleType': this.$route.query.roleType, ...this.searchParams + }).then(res => { this.tableData = res.data.data; this.page.total = res.data.total; this.tableLoading = false; @@ -157,7 +174,12 @@ // 瀵煎嚭 exportClickHandler() { const loading = this.$loading({}); - exportLog({'pageNo':1,'pageSize':-1,'logType': this.$route.query.logType,'roleType':this.$route.query.roleType, ...this.searchParams}).then(res => { + exportLog({ + 'pageNo': 1, + 'pageSize': -1, + 'logType': this.$route.query.logType, + 'roleType': this.$route.query.roleType, ...this.searchParams + }).then(res => { func.downloadFileByBlobHandler(res); this.createdLoading = false this.$message.success('瀵煎嚭鎴愬姛'); @@ -170,8 +192,12 @@ row, this.$refs.logCrud, this.lastIndex, - (newIndex) => { this.lastIndex = newIndex; }, - () => { this.selectList = []; } + (newIndex) => { + this.lastIndex = newIndex; + }, + () => { + this.selectList = []; + } ); }, } -- Gitblit v1.9.3