Browse Source

左侧树功能完善——点击右侧查询

wyh 9 months ago
parent
commit
cead3fceba

+ 12 - 8
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -39,26 +39,26 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('联锁总表')">导出</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('联锁总表')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+      </a-upload> -->
       <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
+      </a-dropdown> -->
     </div>
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+      </div> -->
 
       <a-table
         ref="table"
@@ -316,8 +316,12 @@
       // 处理父组件传过来的数据
       getDataList(){
         console.log(111,this.selectData)
-        // this.queryParam.interlockname = this.selectData.interlockname
-        // this.loadData()
+        if (this.selectData.num == 5) {
+          this.queryParam.interlockSystemId = this.selectData.id
+        } else {
+          this.queryParam.interlockApparatusId = this.selectData.id
+        }
+        this.loadData()
       },
       loadData(arg) {
         let that = this

+ 10 - 5
src/views/module_interLock/InterlockSummary/index.vue

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