|
@@ -23,6 +23,8 @@
|
|
|
<!-- 操作按钮区域 -->
|
|
|
<div class="table-operator">
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
+ <!-- <a-button @click="expandClose" type="primary" :icon="tableTreeStatus == 1 ? 'down-circle' : 'up-circle'">{{tableTreeStatus == 1 ? '一键展开':'一键折叠'}}</a-button> -->
|
|
|
+ <a-button @click="expandClose" type="primary">{{tableTreeStatus == 1 ? '一键展开':'一键折叠'}}</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>
|
|
@@ -192,6 +194,8 @@
|
|
|
dictOptions: {},
|
|
|
loadParent: false,
|
|
|
superFieldList:[],
|
|
|
+ // 展开/折叠
|
|
|
+ tableTreeStatus: 1,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -400,6 +404,16 @@
|
|
|
fieldList.push({type:'int',value:'aircondarea',text:'空调面积',dictCode:''})
|
|
|
fieldList.push({type:'int',value:'heatarea',text:'采暖面积',dictCode:''})
|
|
|
this.superFieldList = fieldList
|
|
|
+ },
|
|
|
+ expandClose(){
|
|
|
+ this.tableTreeStatus = - this.tableTreeStatus
|
|
|
+ if (this.tableTreeStatus == 1) {
|
|
|
+ this.expandedRowKeys = []
|
|
|
+ } else {
|
|
|
+ this.expandedRowKeys = this.dataSource.map(item =>{
|
|
|
+ return item.id
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|