diff --git a/src/components/table/TableList.vue b/src/components/table/TableList.vue index f568657..c6f0793 100644 --- a/src/components/table/TableList.vue +++ b/src/components/table/TableList.vue @@ -66,10 +66,12 @@ @@ -124,30 +126,35 @@ export default { data() { return { tableMaxHeight: document.documentElement.clientHeight, - multipleSelection: [], - newPagination: { - pageIndex: 0, - pageSize: 15, - pageTotal: 0 - }, + multipleSelection: [] }; }, mounted() { - this.setMaxHeight() + this.setMaxHeight(true) let that = this window.onresize = function (){ that.setMaxHeight() } }, methods: { - setMaxHeight(){ + setMaxHeight(init) { this.tableMaxHeight = document.documentElement.clientHeight - this.lessClientHeight + if (init) { + this.$set(this.pagination, 'pageSize', 10 + Math.round((this.tableMaxHeight - 500) / 45)); + } }, // 多选操作 handleSelectionChange(val) { this.multipleSelection = val; this.$emit('selectFun', { backData: this.multipleSelection }); }, + initPageIndex() { + this.$set(this.pagination, 'pageIndex', 1); + }, + handleSizeChange(val) { + this.$set(this.pagination, 'pageSize', val); + this.$emit('sizeChange', { backData: this.pagination}); + }, // 分页导航 handlePageChange(val) { this.$set(this.pagination, 'pageIndex', val); diff --git a/src/views/setting/sys/cusomerManager.vue b/src/views/setting/sys/cusomerManager.vue index c70a0f4..c42f3d5 100644 --- a/src/views/setting/sys/cusomerManager.vue +++ b/src/views/setting/sys/cusomerManager.vue @@ -72,6 +72,7 @@ :tableHeader="tableHeader" :pagination="pagination" @pageChange="pageChange" + @sizeChange="pageChange" @selectFun="selectFun" @sortChange="sortChange" > diff --git a/src/views/setting/sys/logList.vue b/src/views/setting/sys/logList.vue index 68b8186..be52cfb 100644 --- a/src/views/setting/sys/logList.vue +++ b/src/views/setting/sys/logList.vue @@ -25,8 +25,8 @@ - - + + @@ -45,8 +45,12 @@
+ + 所有人 + 其他人 + 查询 + @click="queryLogList">查询
@@ -55,13 +59,16 @@ @@ -93,9 +100,10 @@ export default { dataList: [], loading: false, // 分页信息 + pageIndex: 1, pagination: { pageIndex: 1, - pageSize: 12, + pageSize: 10, pageTotal: 0 }, options: [{ @@ -118,8 +126,9 @@ export default { isLoginType: this.type === 'LOGIN', // 查询条件 queryCondition: { + excludeUsername: 'other', username: undefined, - operationModule: undefined, + ip: undefined, type: this.type, startTime: undefined, endTime: undefined @@ -163,7 +172,7 @@ export default { let column = data.backData; this.queryCondition.sortProp = column.prop this.queryCondition.sortOrder = column.order - this.getLogList() + this.queryLogList() }, //分页导航 pageChange(data) { @@ -183,6 +192,10 @@ export default { this.tableHeader[3].disabled = false this.tableHeader[5].minWidth = 105 } + this.queryLogList() + }, + queryLogList() { + this.$refs.tableList.initPageIndex() this.getLogList() }, getLogList() { diff --git a/src/views/setting/sys/logOperation.vue b/src/views/setting/sys/logOperation.vue index 287d51c..c8f528d 100644 --- a/src/views/setting/sys/logOperation.vue +++ b/src/views/setting/sys/logOperation.vue @@ -1,52 +1,60 @@