From 69425e4b837598c2463662726ae3b4d25eceae66 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期二, 31 十二月 2024 16:24:44 +0800
Subject: [PATCH] 1、修改多转一次list的问题
---
Source/plt-web/plt-web-ui/src/views/system/log/index.vue | 54 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 46 insertions(+), 8 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 9b02091..bb824f5 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
@@ -11,10 +11,13 @@
@search-change="handleSearch"
@search-reset="handleReset"
@size-change="sizeChange"
+ @row-click="rowClickHandler"
@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>
@@ -22,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",
@@ -45,17 +49,17 @@
column: [
{
label: '鐢ㄦ埛鍚�',
- prop: 'truename',
+ prop: 'username',
search: true,
searchSpan: 4,
searchLabel: '鎿嶄綔鐢ㄦ埛',
type: 'select',
dicUrl: '/api/loginBasicController/getOperatingUsers',
sortable: true,
- width: 150
+ width: 200
}, {
label: '濮撳悕',
- prop: 'username',
+ prop: 'truename',
sortable: true,
width: 150
}, {
@@ -100,7 +104,9 @@
total: 0,
pageSizes: [10, 30, 50, 100],
},
- searchParams: {}
+ searchParams: {},
+ selectList: [],
+
}
},
watch: {
@@ -108,11 +114,24 @@
this.getTableList();
}
},
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+ };
+ },
+ },
+ created() {
+ },
methods: {
// 琛ㄦ牸璇锋眰
getTableList() {
this.tableLoading = true;
- getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType': this.$route.query.logType, ...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;
@@ -154,13 +173,32 @@
// 瀵煎嚭
exportClickHandler() {
const loading = this.$loading({});
- exportLog().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('瀵煎嚭鎴愬姛');
loading.close();
})
},
+ // 琛屽崟閫�
+ rowClickHandler(row) {
+ func.rowClickHandler(
+ row,
+ this.$refs.logCrud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
}
}
</script>
--
Gitblit v1.9.3