Explorar o código

元素库全局搜索修改

duy %!s(int64=2) %!d(string=hai) anos
pai
achega
f5dcbe6c9c

+ 26 - 8
src/views/manager/projectinfo/independent.vue

@@ -494,20 +494,34 @@ export default {
       })
     },
     searchChange(){
-         if(this.treeId){
-            this.onLoad2()
+        if(this.treeId){
+          this.page.current=1;
+          this.page.currentPage=1
+          this.page.size=10;
+          this.onLoad2()
           }else{
+            if(this.input3){
                 this.tabloading=true;
+                this.page.current=1;
+                this.page.currentPage=1
+                this.page.size=10;
                 this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
                 console.log(res.records);
                 this.loadData=res.records;
                 this.page.total=res.total;
                 this.tabloading=false;
                 })
-          }
+            }else{
+              this.$message.warning('请输入你想搜索的表单名称')
+            }
+              
+        }
+      
+
     },
     currentChange (currentPage) {
         this.page.current = currentPage;
+        
         //  this.searchChange();
 
     },
@@ -520,6 +534,7 @@ export default {
     },
     clearinput(){
       this.searchChange()
+    
     },
     onLoad2(){
 
@@ -574,13 +589,16 @@ export default {
       }
     },
      onLoad(page){
-        this.tabloading=true
-         this.tabTypeLazyTree(this.treeId,this.projectid, page.currentPage,page.pageSize,this.input3).then((res)=>{
-          this.loadData=res.records
-           this.page.total=res.total
+        if(this.input3||this.treeId){
+           this.tabloading=true;
+           this.tabTypeLazyTree(this.treeId,this.projectid, page.currentPage,page.pageSize,this.input3).then((res)=>{
+            this.loadData=res.records
+            this.page.total=res.total
             this.tabloading=false
 
-        })
+          })
+        }
+        
     },
 
 

+ 16 - 8
src/views/manager/projectinfo/qutediaolog/qute1.vue

@@ -200,12 +200,15 @@ export default {
 
   methods: {
     quteonLoad(page){
-        this.loading=true;
-        this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize,this.input3).then((res)=>{
+       if(this.input3||this.treeId){
+         this.loading=true;
+          this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize,this.input3).then((res)=>{
           this.loadData=res.records
           this.page.total=res.total;
           this.loading=false
         })
+       }
+        
       
     },
     selectionChange (list) {
@@ -258,12 +261,17 @@ export default {
         }
       }else{
         //  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
-        })
+        if(this.input3){
+           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
+          })
+        }else{
+            this.$message.warning("请输入你想搜索的表单名称");  
+        }
+       
       }
   
     },

+ 6 - 1
src/views/manager/wbsinfo/element.vue

@@ -975,12 +975,17 @@ export default {
         }
       }else{
         //  this.$message.warning("请选选择左侧节点");
-          this.tabloading=true;
+        if(this.input3){
+           this.tabloading=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.tabloading=false;
         })
+      }else{
+          this.$message.warning("请输入你想搜索的表单名称");
+      }
+         
       }
 
     },