|
@@ -9,6 +9,7 @@
|
|
|
:search.sync="search"
|
|
|
:table-loading="loading"
|
|
|
:summary-method="summaryMethod"
|
|
|
+ :cell-style="cellStyle"
|
|
|
@row-del="rowDel"
|
|
|
@size-change="sizeChange"
|
|
|
@search-change="searchChange"
|
|
@@ -17,6 +18,7 @@
|
|
|
@on-load="getList"
|
|
|
@saveColumn="saveColumn"
|
|
|
@resetColumn="resetColumn"
|
|
|
+ @search-criteria-switch="searchCriteriaSwitch"
|
|
|
>
|
|
|
<template slot="corpIdSearch">
|
|
|
<select-component
|
|
@@ -118,7 +120,7 @@ export default {
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
pageSize: 10,
|
|
|
- pageSizes: [10, 50, 100, 200, 300, 400, 500,1000]
|
|
|
+ pageSizes: [10,20, 50, 100, 200,400, 500]
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -204,6 +206,9 @@ export default {
|
|
|
getList(page.currentPage, page.pageSize,params).then(res =>{
|
|
|
this.data = res.data.data.records
|
|
|
this.page.total = res.data.data.total
|
|
|
+ if (this.page.total) {
|
|
|
+ this.optionTable.height = window.innerHeight - 240;
|
|
|
+ }
|
|
|
}).finally(()=>{
|
|
|
this.loading = false;
|
|
|
})
|
|
@@ -263,6 +268,14 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ searchCriteriaSwitch(type){
|
|
|
+ if (type){
|
|
|
+ this.optionTable.height = this.optionTable.height - 50
|
|
|
+ }else {
|
|
|
+ this.optionTable.height = this.optionTable.height + 50
|
|
|
+ }
|
|
|
+ this.$refs.crud.getTableHeight()
|
|
|
+ },
|
|
|
summaryMethod({ columns, data }) {
|
|
|
const sums = [];
|
|
|
if (columns.length > 0) {
|
|
@@ -301,6 +314,9 @@ export default {
|
|
|
this.show = true;
|
|
|
this.getList(this.page, this.search)
|
|
|
},
|
|
|
+ cellStyle() {
|
|
|
+ return "padding:0;height:40px;";
|
|
|
+ },
|
|
|
//列保存触发
|
|
|
async saveColumn() {
|
|
|
const inSave = await this.saveColumnData(
|