Explorar el Código

左侧树功能完善

wyh hace 9 meses
padre
commit
a37e2fdad9

+ 6 - 0
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -317,12 +317,18 @@
       getDataList(){
         console.log(111,this.selectData)
         if (this.selectData.num == 5) {
+          this.queryParam.interlockApparatusId = ''
           this.queryParam.interlockSystemId = this.selectData.id
         } else {
+          this.queryParam.interlockSystemId = ''
           this.queryParam.interlockApparatusId = this.selectData.id
         }
         this.loadData()
       },
+      searchReset() {
+        this.queryParam = {}
+        this.loadData(1);
+      },
       loadData(arg) {
         let that = this
         if(!this.url.list){

+ 8 - 4
src/views/module_interLock/InterlockSummary/index.vue

@@ -24,15 +24,19 @@ import InterlockSummaryList from './InterlockSummaryList.vue';
         methods: {
             selectEquipment(selectedKeys,e){
                 console.log(99,selectedKeys,e)
-                let str = selectedKeys[0].length
-                // console.log(88,str)
-                // if (str == 5) {
+                if (selectedKeys.length == 0) {
+                    this.$nextTick(()=>{
+                        this.$refs.realForm.searchReset();
+                    })
+                } else {
+                    let str = selectedKeys[0].length
+                    // console.log(88,str)
                     this.selectData.num = str
                     this.selectData.id = e.selectedNodes[0].data.props.id
                     this.$nextTick(()=>{
                         this.$refs.realForm.getDataList();
                     })
-                // }
+                }
             }
         },
     })