|
@@ -4,11 +4,11 @@
|
|
:data="dataList"
|
|
:data="dataList"
|
|
style="width: 100%;z-index:1"
|
|
style="width: 100%;z-index:1"
|
|
:row-key="getRowKeys"
|
|
:row-key="getRowKeys"
|
|
- :expand-row-keys="expands"
|
|
|
|
|
|
+ :expand-row-keys="expands"
|
|
>
|
|
>
|
|
<el-table-column type="expand">
|
|
<el-table-column type="expand">
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
- <el-table :data="props.row.floorArr" style="width: 100%;">
|
|
|
|
|
|
+ <el-table :data="props.row.children" style="width: 100%;">
|
|
<el-table-column type="selection" width="50" align="right"></el-table-column>
|
|
<el-table-column type="selection" width="50" align="right"></el-table-column>
|
|
<el-table-column prop label align="right" width="150">
|
|
<el-table-column prop label align="right" width="150">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
@@ -35,7 +35,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="floor" label align="right" width="50"></el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="name" label align="right" width="50"></el-table-column>
|
|
<el-table-column prop label="位置详情" align="right" width="100"></el-table-column>
|
|
<el-table-column prop label="位置详情" align="right" width="100"></el-table-column>
|
|
<el-table-column prop label="温度要求范围(℃)" align="right"></el-table-column>
|
|
<el-table-column prop label="温度要求范围(℃)" align="right"></el-table-column>
|
|
<el-table-column prop label="平均温度(℃)" align="right"></el-table-column>
|
|
<el-table-column prop label="平均温度(℃)" align="right"></el-table-column>
|
|
@@ -51,18 +51,21 @@ export default {
|
|
return {
|
|
return {
|
|
getRowKeys(row) {
|
|
getRowKeys(row) {
|
|
return row.id;
|
|
return row.id;
|
|
- },
|
|
|
|
- expands: []
|
|
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
props: ["dataList"],
|
|
props: ["dataList"],
|
|
|
|
+ computed: {
|
|
|
|
+ expands() {
|
|
|
|
+ return this.dataList.map(i => {
|
|
|
|
+ // 增加 isExpand 属性
|
|
|
|
+ i.isExpand = i.children.some(c => c.isSatisfy == false)
|
|
|
|
+ return i
|
|
|
|
+ }).filter(j => j.isExpand).map(i => i.id)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
- this.dataList.forEach((item, index) => {
|
|
|
|
- if (item.floorArr[index].isSatisfy == false) {
|
|
|
|
- this.expands.push(item.id);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|