From 65786868115a527f76a7913f39e22d13f0a102a6 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期二, 22 十月 2024 18:17:53 +0800 Subject: [PATCH] 文件柜管理 --- /dev/null | 16 ---- Source/plt-web/plt-web-ui/src/views/system/fileManager/index.vue | 138 ++++++++++++++++++++++++++++++++++ Source/plt-web/plt-web-ui/src/views/system/log/index.vue | 64 ++++++++-------- 3 files changed, 170 insertions(+), 48 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/fileManage/index.vue b/Source/plt-web/plt-web-ui/src/views/fileManage/index.vue deleted file mode 100644 index 093967c..0000000 --- a/Source/plt-web/plt-web-ui/src/views/fileManage/index.vue +++ /dev/null @@ -1,16 +0,0 @@ -<template> - <!--鏂囦粨绠$悊椤甸潰--> - <basic-container> - - </basic-container> -</template> - -<script> -export default { - name: "index" -} -</script> - -<style scoped> - -</style> diff --git a/Source/plt-web/plt-web-ui/src/views/system/fileManager/index.vue b/Source/plt-web/plt-web-ui/src/views/system/fileManager/index.vue new file mode 100644 index 0000000..ae1270c --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/system/fileManager/index.vue @@ -0,0 +1,138 @@ +<template> + <!--鏂囦粨绠$悊椤甸潰--> + <basic-container> + <avue-crud + ref="logCrud" + :data="tableData" + :option="option" + :page.sync="page" + :table-loading="tableLoading" + @on-load="getTableList" + @refresh-change="handleRefresh" + @search-change="handleSearch" + @search-reset="handleReset" + @size-change="sizeChange" + @current-change="currentChange" + > + <template slot="menuLeft" slot-scope="scope"> + <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> + </template> + </avue-crud> + </basic-container> +</template> + +<script> +import {exportLog, getLogListByContion} from "@/api/system/log/logBasic"; +import func from "@/util/func"; +import basicOption from "@/util/basic-option"; + +export default { + name: "index", + data: function () { + return { + tableLoading: false, + tableData: [], + option: { + ...basicOption, + addBtn:false, + editBtn: false, + delBtn: false, + calcHeight: -60, + align:'left', + headerAlign:'center', + menu:false, + searchMenuSpan: 6, + searchIcon:false, + column: [ + { + label: '鍗峰悕', + prop: 'truename', + width: 300 + }, { + label: '鏈哄櫒绫诲瀷', + prop: 'username', + width: 150 + },{ + label: '璺緞鍚嶇О', + prop: 'userIp' + },{ + label: '棣栭�夎矾寰�', + prop: 'moduleName', + },{ + label: '鏈嶅姟鍣�', + prop: 'type', + width: 150 + },{ + label: '鍗锋湇鍔�', + prop: 'date', + }] + }, + page: { + currentPage: 1, + pageSize: 50, + total: 0, + pageSizes: [10, 30, 50, 100], + }, + searchParams: {} + } + }, + methods: { + // 琛ㄦ牸璇锋眰 + getTableList() { + this.tableLoading = true; + getLogListByContion(this.page.currentPage, this.page.pageSize, {'logType':this.$route.query.logType,...this.searchParams}).then(res => { + this.tableData = res.data.data; + this.page.total = res.data.total; + this.tableLoading = false; + }) + }, + + // 鎼滅储鏌ヨ + handleSearch(params, done) { + this.searchParams = { + userName:params.truename, + ipText:params.userIp, + startDate:params.date[0], + endDate:params.date[1] + }; + + this.getTableList(); + done(); + }, + + // 閲嶇疆鎼滅储鏉′欢 + handleReset() { + this.searchParams = {}; + this.getTableList(); + }, + + // 鏉℃暟 + sizeChange(val) { + this.page.pageSize = val; + }, + + // 椤电爜 + currentChange(val) { + this.page.currentPage = val; + }, + + handleRefresh(){ + this.getTableList(); + }, + // 瀵煎嚭 + exportClickHandler() { + const loading = this.$loading({}); + exportLog().then(res => { + func.downloadFileByBlobHandler(res); + this.createdLoading = false + this.$message.success('瀵煎嚭鎴愬姛'); + loading.close(); + }) + }, + } +} +</script> + +<style scoped> + +</style> 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 d025bfa..9b02091 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 @@ -26,71 +26,71 @@ import func from "@/util/func"; export default { -name: "index", + name: "index", data: function () { return { tableLoading: false, tableData: [], option: { ...basicOption, - addBtn:false, + addBtn: false, editBtn: false, delBtn: false, calcHeight: -60, - align:'left', - headerAlign:'center', - menu:false, + align: 'left', + headerAlign: 'center', + menu: false, searchMenuSpan: 6, - searchIcon:false, + searchIcon: false, column: [ { label: '鐢ㄦ埛鍚�', prop: 'truename', - search:true, + search: true, searchSpan: 4, - searchLabel:'鎿嶄綔鐢ㄦ埛', - type:'select', - dicUrl:'/api/loginBasicController/getOperatingUsers', - sortable:true, + searchLabel: '鎿嶄綔鐢ㄦ埛', + type: 'select', + dicUrl: '/api/loginBasicController/getOperatingUsers', + sortable: true, width: 150 }, { label: '濮撳悕', prop: 'username', - sortable:true, + sortable: true, width: 150 - },{ + }, { label: '鐢ㄦ埛IP', prop: 'userIp', - search:true, + search: true, searchSpan: 4, - sortable:true, + sortable: true, width: 150 - },{ + }, { label: '妯″潡', prop: 'moduleName', - sortable:true, + sortable: true, overHidden: true, - },{ + }, { label: '鎿嶄綔', prop: 'type', - sortable:true, + sortable: true, width: 150 - },{ + }, { label: '鏃堕棿', prop: 'date', - type:'date', - search:true, + type: 'date', + search: true, searchOrder: 1, searchSpan: 8, searchRange: true, - searchLabel:'鏌ヨ鏃ユ湡', - valueFormat:'yyyy-MM-dd', + searchLabel: '鏌ヨ鏃ユ湡', + valueFormat: 'yyyy-MM-dd', width: 160 - },{ + }, { label: '鎻忚堪', prop: 'result', overHidden: true, - width:380, + width: 380, }, ] }, @@ -112,7 +112,7 @@ // 琛ㄦ牸璇锋眰 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, ...this.searchParams}).then(res => { this.tableData = res.data.data; this.page.total = res.data.total; this.tableLoading = false; @@ -122,10 +122,10 @@ // 鎼滅储鏌ヨ handleSearch(params, done) { this.searchParams = { - userName:params.truename, - ipText:params.userIp, - startDate:params.date[0], - endDate:params.date[1] + userName: params.truename, + ipText: params.userIp, + startDate: params.date[0], + endDate: params.date[1] }; this.getTableList(); @@ -148,7 +148,7 @@ this.page.currentPage = val; }, - handleRefresh(){ + handleRefresh() { this.getTableList(); }, // 瀵煎嚭 -- Gitblit v1.9.3