|
@@ -27,20 +27,50 @@
|
|
|
<span>{{item.count}}</span>
|
|
|
</div>
|
|
|
<!-- 第1页 -->
|
|
|
- <van-cell is-link v-for='detail in item.data.slice(0,4) || []' @click='goToDetail(detail)' :key='detail.classstructureid'>
|
|
|
- <!-- 使用 title 插槽来自定义标题 -->
|
|
|
- <template #title>
|
|
|
- <span class='number'>{{detail.classstructureid}}</span>
|
|
|
- <span class='name'>{{detail.sbjc}}</span>
|
|
|
- </template>
|
|
|
- <template #right-icon>
|
|
|
- <span class='wx' v-if='detail._type === "维修"'>维修</span>
|
|
|
- <span class='wb' v-else-if='detail._type === "维保"'>维保</span>
|
|
|
- <van-icon name='arrow' class='arrow-icon' />
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <!-- 加载更多 -->
|
|
|
- <div class='load-more' v-show='item.loadMore && item.count>=5' @click='locationLoadMore(item,index)'>加载更多</div>
|
|
|
+ <div class='info-container'>
|
|
|
+ <van-cell
|
|
|
+ class='info'
|
|
|
+ is-link
|
|
|
+ v-for='detail in item.data.slice(0,4) || []'
|
|
|
+ @click='goToDetail(detail)'
|
|
|
+ :key='detail.classstructureid'
|
|
|
+ >
|
|
|
+ <!-- 使用 title 插槽来自定义标题 -->
|
|
|
+ <template #title>
|
|
|
+ <span class='number'>{{detail.classstructureid}}</span>
|
|
|
+ <span class='name'>{{detail.sbjc}}</span>
|
|
|
+ </template>
|
|
|
+ <template #right-icon>
|
|
|
+ <span class='wx' v-if='detail._type === "维修"'>维修</span>
|
|
|
+ <span class='wb' v-else-if='detail._type === "维保"'>维保</span>
|
|
|
+ <van-icon name='arrow' class='arrow-icon' />
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ <!-- 加载更多 -->
|
|
|
+ <div class='load-more' v-show='item.loadMore && item.count>=5' @click='locationLoadMore(item,index)'>加载更多</div>
|
|
|
+ <!-- 后续页面 -->
|
|
|
+ <van-list
|
|
|
+ v-model='item.loading'
|
|
|
+ v-show='!item.loadMore && item.list && item.list.length'
|
|
|
+ :finished='item.finished'
|
|
|
+ :immediate-check='false'
|
|
|
+ @load='locationOnLoad(item,index)'
|
|
|
+ finished-text='没有更多了'
|
|
|
+ >
|
|
|
+ <van-cell is-link class='info' v-for='detail in item.list' @click='goToDetail(detail)' :key='detail.classstructureid'>
|
|
|
+ <!-- 使用 title 插槽来自定义标题 -->
|
|
|
+ <template #title>
|
|
|
+ <span class='number'>{{detail.classstructureid}}</span>
|
|
|
+ <span class='name'>{{detail.sbjc}}</span>
|
|
|
+ </template>
|
|
|
+ <template #right-icon>
|
|
|
+ <span class='wx' v-if='detail._type === "维修"'>维修</span>
|
|
|
+ <span class='wb' v-else-if='detail._type === "维保"'>维保</span>
|
|
|
+ <van-icon name='arrow' class='arrow-icon' />
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-list>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</van-list>
|
|
|
<!-- 点击头部筛选,出现的右侧弹窗 -->
|
|
@@ -177,7 +207,7 @@ export default {
|
|
|
page: this.page,
|
|
|
size: this.size,
|
|
|
subPage: 1,
|
|
|
- subSize: 10 || this.innerSize,
|
|
|
+ subSize: this.innerSize,
|
|
|
plazaId: this.plazaId,
|
|
|
onlyMainAsset: true,
|
|
|
}
|
|
@@ -200,7 +230,6 @@ export default {
|
|
|
if (!res?.data?.data) {
|
|
|
return false
|
|
|
}
|
|
|
- console.log(res?.data)
|
|
|
res.data.data.map((item, index, arr) => {
|
|
|
// console.log(item)
|
|
|
if (item?.count >= 4 || item?.data?.length >= 4) {
|
|
@@ -227,7 +256,7 @@ export default {
|
|
|
this.count = res.data.count
|
|
|
// 是否显示无数据的标志
|
|
|
let noDataFlag = !Boolean(this.list.filter((v) => v.data.length).length)
|
|
|
- console.log(noDataFlag)
|
|
|
+ // console.log(noDataFlag)
|
|
|
this.noDataFlag = noDataFlag
|
|
|
},
|
|
|
async onLoad() {
|
|
@@ -276,6 +305,7 @@ export default {
|
|
|
currentItem.finished = true
|
|
|
}
|
|
|
this.$set(this.list, index, currentItem)
|
|
|
+ console.log(this.list[index])
|
|
|
},
|
|
|
/**
|
|
|
* 查询一个设备类下的设备
|
|
@@ -302,6 +332,23 @@ export default {
|
|
|
console.log(item)
|
|
|
console.log(currentList)
|
|
|
console.log(queryData)
|
|
|
+ let res
|
|
|
+ try {
|
|
|
+ res = await queryEquipmentList(queryData)
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ console.log('=============')
|
|
|
+ console.log(res)
|
|
|
+ console.log('=============')
|
|
|
+ if (!res?.data?.data) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ currentList.list = [...currentList.list, ...res.data.data]
|
|
|
+ this.$set(this.list, index, currentList)
|
|
|
+ console.log('====================')
|
|
|
+ console.log(this.list)
|
|
|
+ console.log('====================')
|
|
|
},
|
|
|
/**
|
|
|
* 跳转设备详情页
|
|
@@ -351,7 +398,6 @@ export default {
|
|
|
})
|
|
|
// 弹窗选中的系统
|
|
|
// TODO: 111
|
|
|
- console.log(data)
|
|
|
this.$set(this.modalDataBak, 'sbss', data.code)
|
|
|
},
|
|
|
/**
|
|
@@ -458,6 +504,7 @@ export default {
|
|
|
.switch-room {
|
|
|
width: 100%;
|
|
|
max-height: 390px;
|
|
|
+ overflow: auto;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
// 浅蓝色title
|
|
@@ -473,6 +520,24 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
+ // 每个配电室出线明细信息
|
|
|
+ .info-container {
|
|
|
+ width: 100%;
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ // 每个配电室出线明细
|
|
|
+ .info {
|
|
|
+ }
|
|
|
+ .load-more {
|
|
|
+ width: 80px;
|
|
|
+ height: 25px;
|
|
|
+ line-height: 25px;
|
|
|
+ text-align: center;
|
|
|
+ margin: 10px auto;
|
|
|
+ color: #025baa;
|
|
|
+ background: #e5eef6;
|
|
|
+ }
|
|
|
+ }
|
|
|
/deep/ .van-cell {
|
|
|
display: flex;
|
|
|
align-items: center;
|