|
@@ -2,13 +2,17 @@
|
|
|
<div class='floor-function'>
|
|
|
<div class="floor-item" v-for="floor in floorData" :key="floor.FloorId">
|
|
|
<div class="floor-item-title">
|
|
|
- <span class="floor-item-text"><i class="iconfont wanda-louceng1"></i> {{floor.FloorName}}</span>
|
|
|
+ <span class="floor-item-text">
|
|
|
+ <i class="iconfont" @click="handleClickOpenFloor(floor)"
|
|
|
+ :class="{'wanda-right-mini': !floor.Open, 'wanda-bottom-mini': floor.Open, 'icon-disable': !((floor.Statistics && floor.Statistics.length) || (floor.Properties && floor.Properties.length))}"></i>
|
|
|
+ {{floor.FloorName}}
|
|
|
+ </span>
|
|
|
<p class="floor-item-goMap" @click='goToMapView(floor)'>
|
|
|
<span>查看平面图 </span>
|
|
|
<van-icon class='floor-item-arrow' name='arrow' />
|
|
|
</p>
|
|
|
</div>
|
|
|
- <div v-if="floor.Statistics && floor.Statistics.length" class="floor-item-table">
|
|
|
+ <div v-if="floor.Statistics && floor.Statistics.length && floor.Open" class="floor-item-table">
|
|
|
<table class="table-box">
|
|
|
<tr>
|
|
|
<th>
|
|
@@ -59,7 +63,7 @@
|
|
|
查看附加数据
|
|
|
</h2>
|
|
|
</div>
|
|
|
- <div v-else-if="floor.Properties && floor.Properties.length" class="floor-item-table">
|
|
|
+ <div v-else-if="floor.Properties && floor.Properties.length && floor.Open" class="floor-item-table">
|
|
|
<table class="table-box">
|
|
|
<tr>
|
|
|
<th colspan="3">
|
|
@@ -137,13 +141,17 @@ export default {
|
|
|
return item.ItemExplain && item.ItemExplain !== "";
|
|
|
})
|
|
|
floor.Properties = arr;
|
|
|
+ floor.Open = false;
|
|
|
}
|
|
|
return floor;
|
|
|
});
|
|
|
})
|
|
|
} else {
|
|
|
appGraphElementQuery(params).then(res => {
|
|
|
- this.floorData = res.Data;
|
|
|
+ this.floorData = res.Data.map(floor => {
|
|
|
+ floor.Open = false;
|
|
|
+ return floor;
|
|
|
+ });
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -166,6 +174,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 展开楼层数据
|
|
|
+ handleClickOpenFloor(floor) {
|
|
|
+ if ((floor.Statistics && floor.Statistics.length) || (floor.Properties && floor.Properties.length)) {
|
|
|
+ floor.Open = !floor.Open;
|
|
|
+ }
|
|
|
+ },
|
|
|
goToMapView(floor) {
|
|
|
if (floor.FloorId && floor.FloorName) {
|
|
|
let floorObj = {
|
|
@@ -206,6 +220,9 @@ export default {
|
|
|
font-size: 16px;
|
|
|
font-weight: 600;
|
|
|
display: inline-block;
|
|
|
+ .icon-disable {
|
|
|
+ color: rgba(2, 91, 170, 0.3);
|
|
|
+ }
|
|
|
}
|
|
|
.floor-item-goMap {
|
|
|
font-size: 14px;
|