¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | 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, |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | // è¡¨æ ¼è¯·æ± |
| | | 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; |
| | |
| | | // æç´¢æ¥è¯¢ |
| | | 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(); |
| | |
| | | this.page.currentPage = val; |
| | | }, |
| | | |
| | | handleRefresh(){ |
| | | handleRefresh() { |
| | | this.getTableList(); |
| | | }, |
| | | // å¯¼åº |