Эх сурвалжийг харах

引用元素表全局搜索

duy 2 жил өмнө
parent
commit
76908721cc

+ 1 - 3
src/views/manager/projectinfo/independent.vue

@@ -508,7 +508,7 @@ export default {
     },
     currentChange (currentPage) {
         this.page.current = currentPage;
-         this.searchChange();
+        //  this.searchChange();
 
     },
     sizeChange (pageSize) {
@@ -574,7 +574,6 @@ export default {
       }
     },
      onLoad(page){
-      if(this.treeId){
         this.tabloading=true
          this.tabTypeLazyTree(this.treeId,this.projectid, page.currentPage,page.pageSize,this.input3).then((res)=>{
           this.loadData=res.records
@@ -582,7 +581,6 @@ export default {
             this.tabloading=false
 
         })
-      }
     },
 
 

+ 36 - 15
src/views/manager/projectinfo/qutediaolog/qute1.vue

@@ -27,6 +27,8 @@
                   @on-load="quteonLoad"
                   @selection-change="selectionChange"
                   :table-loading="loading"
+                  @current-change="currentChange"
+                  @size-change="sizeChange"
                   ref="crud"
                  class="tableclass">
                     <template slot="menuLeft" slot-scope="{size}">
@@ -196,17 +198,15 @@ export default {
     },
 
 
-    methods: {
+  methods: {
     quteonLoad(page){
-      console.log(page,'page');
-      if(this.treeId){
         this.loading=true;
-         this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize).then((res)=>{
+        this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize,this.input3).then((res)=>{
           this.loadData=res.records
-           this.page.total=res.total;
-           this.loading=false
+          this.page.total=res.total;
+          this.loading=false
         })
-      }
+      
     },
     selectionChange (list) {
       this.selectionList = list;
@@ -214,7 +214,18 @@ export default {
     selectionClear () {
         this.selectionList = [];
         this.$refs.crud.toggleSelection();
-      },
+    },
+    currentChange (currentPage) {
+    this.page.current = currentPage;
+    this.page.currentPage = currentPage;
+      //  this.searchChange();
+
+    },
+    sizeChange (pageSize) {
+        this.page.size = pageSize;
+      //  this.searchChange();
+
+    },
       //搜索
     searchChange(){
       if(this.treeId){
@@ -246,7 +257,13 @@ export default {
             }, 1000);
         }
       }else{
-         this.$message.warning("请先选择左侧节点");  
+        //  this.$message.warning("请先选择左侧节点");  
+        this.loading=true
+        this.tabTypeLazyTreeAll(this.curTreedata.id, this.page.current,this.page.size,this.input3).then((res)=>{
+        this.loadData=res.records
+        this.page.total=res.total
+        this.loading=false
+        })
       }
   
     },
@@ -270,14 +287,18 @@ export default {
         
       }
     },
-      nodeClick(data,node){
+    nodeClick(data,node){
           console.log(data,'treedata');
           this.treeId=data.id;
           this.curTreedata=data;
-          this.curTreeNode=node
+          this.curTreeNode=node;
+          this.page.current=1;
+          this.page.size=10;
+          this.page.pageSize=10;
+          this.page.currentPage=1;
           if(data.hasChildren){
             this.loading=true
-             this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size).then((res)=>{
+            this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size,this.input3).then((res)=>{
               this.loadData=res.records
               this.page.total=res.total
               this.loading=false
@@ -294,20 +315,20 @@ export default {
         }
          
       },
-      handleClose(done) {
+    handleClose(done) {
         this.$confirm('确认关闭?')
           .then(_ => {
             done();
           })
           .catch(_ => {});
       },
-      show(){
+    show(){
         this.dialogVisible=true;
         this.treeId=''
         this.loadData=[]
         
       },
-      submitQute(){
+    submitQute(){
         projecttabInfo(this.ids,this.projectid).then((res)=>{
           console.log(res,'res');
           if(res.data.code===200){