|
@@ -271,7 +271,7 @@ export default {
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
this.getSource();
|
|
this.getSource();
|
|
- this.getTableData();
|
|
|
|
|
|
+ this.getTableData('init');
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
getSource() {
|
|
getSource() {
|
|
@@ -282,7 +282,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- getTableData(type='filter') {
|
|
|
|
|
|
+ getTableData(type='pageChange') {
|
|
this.tableLoading = true;
|
|
this.tableLoading = true;
|
|
|
|
|
|
const { frequency,page_no,pageSize,keyWord,source,sortParam,sortType } = this.filterObj;
|
|
const { frequency,page_no,pageSize,keyWord,source,sortParam,sortType } = this.filterObj;
|
|
@@ -305,11 +305,11 @@ export default {
|
|
this.tableData = Data.List || [];
|
|
this.tableData = Data.List || [];
|
|
this.total = Data.Paging.Totals;
|
|
this.total = Data.Paging.Totals;
|
|
|
|
|
|
- if(type==='pageChange'){
|
|
|
|
|
|
+ if(type==='filter'){
|
|
|
|
+ this.listCheckAllChange(true)
|
|
|
|
+ }else {
|
|
//页码变化 选中项不做清空
|
|
//页码变化 选中项不做清空
|
|
this.checkedSomeSelection()
|
|
this.checkedSomeSelection()
|
|
- }else {
|
|
|
|
- this.listCheckAllChange(true)
|
|
|
|
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -348,10 +348,9 @@ export default {
|
|
listCheckAllChange(value){
|
|
listCheckAllChange(value){
|
|
this.checkedList = []
|
|
this.checkedList = []
|
|
this.isSelectAll = value
|
|
this.isSelectAll = value
|
|
-
|
|
|
|
- value
|
|
|
|
- ? (this.$refs.table && this.$refs.table.toggleAllSelection())
|
|
|
|
- : (this.$refs.table && this.$refs.table.clearSelection())
|
|
|
|
|
|
+ this.$refs.table && this.$refs.table.clearSelection()
|
|
|
|
+
|
|
|
|
+ value && this.$refs.table && this.$refs.table.toggleAllSelection()
|
|
},
|
|
},
|
|
|
|
|
|
selectionChange() {
|
|
selectionChange() {
|
|
@@ -432,9 +431,15 @@ export default {
|
|
this.getTableData('pageChange')
|
|
this.getTableData('pageChange')
|
|
},
|
|
},
|
|
|
|
|
|
- filterChange() {
|
|
|
|
- this.filterObj.page_no = 1
|
|
|
|
- this.getTableData('optionChange')
|
|
|
|
|
|
+ filterChange(val) {
|
|
|
|
+ this.filterObj.page_no = 1;
|
|
|
|
+ if(!val) {
|
|
|
|
+ this.isSelectAll = false
|
|
|
|
+ this.checkedList = []
|
|
|
|
+ this.filterObj.checkAll = false
|
|
|
|
+ this.filterObj.checkSome = false
|
|
|
|
+ }
|
|
|
|
+ this.getTableData(val?'filter':'')
|
|
},
|
|
},
|
|
|
|
|
|
/* 查看数据 */
|
|
/* 查看数据 */
|