Karsa 6 months ago
parent
commit
5d3b4aa005

+ 17 - 12
src/views/dataEntry_manage/thirdBase/selfDataBase.vue

@@ -271,7 +271,7 @@ export default {
   },
   mounted(){
     this.getSource();
-    this.getTableData();
+    this.getTableData('init');
   },
   methods:{
     getSource() {
@@ -282,7 +282,7 @@ export default {
       })
     },
 
-    getTableData(type='filter') {
+    getTableData(type='pageChange') {
       this.tableLoading = true;
 
       const { frequency,page_no,pageSize,keyWord,source,sortParam,sortType } = this.filterObj;
@@ -305,11 +305,11 @@ export default {
         this.tableData = Data.List || [];
         this.total = Data.Paging.Totals;
         
-        if(type==='pageChange'){
+        if(type==='filter'){
+          this.listCheckAllChange(true)
+        }else {
           //页码变化 选中项不做清空
           this.checkedSomeSelection()
-        }else {
-          this.listCheckAllChange(true)
 
         }
 			});
@@ -348,10 +348,9 @@ export default {
     listCheckAllChange(value){
       this.checkedList = []
       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() {
@@ -432,9 +431,15 @@ export default {
       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':'')
     },
 
     /* 查看数据 */

+ 4 - 2
src/views/system_manage/dataOperaAuth.vue

@@ -574,8 +574,10 @@ export default {
     listCheckAllChange(value){
       this.checkedList = []
       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()
     },
 
     //筛选改变