设备列表
This commit is contained in:
@@ -62,28 +62,34 @@
|
||||
</picker> -->
|
||||
</view>
|
||||
<view class="content device" :style="{ minHeight: minHeight }">
|
||||
<uni-card
|
||||
:title="item.equipmentName"
|
||||
:sub-title="item.projectName"
|
||||
:extra="item.mac"
|
||||
padding="0"
|
||||
v-for="(item, index) in deviceListFilter"
|
||||
:key="index"
|
||||
@click="jump(item)"
|
||||
:thumbnail="deviceIcon(item.runStatus)"
|
||||
>
|
||||
<!-- <text>{{ item.project }} {{ item.type }}</text> -->
|
||||
<Cn-device-card v-for="(item, index) in deviceListFilter" :device="item" :key="index">
|
||||
<template v-slot:title v-if="transfer || share">
|
||||
<view class="switch-title">
|
||||
<view class="switch-title-left">{{ item.equipmentName }}</view>
|
||||
<switch
|
||||
:checked="checkList.indexOf(item.equipmentId) > -1"
|
||||
style="transform: scale(0.8)"
|
||||
@change="switchChange(item)"
|
||||
/>
|
||||
<!-- 卡片标题 -->
|
||||
<view class="uni-card__header">
|
||||
<view class="uni-card__header-box">
|
||||
<view class="uni-card__header-avatar">
|
||||
<image class="uni-card__header-avatar-image" :src="deviceIcon(item.runStatus)"
|
||||
mode="aspectFit"/>
|
||||
</view>
|
||||
<view class="uni-card__header-content">
|
||||
<text class="uni-card__header-content-title uni-ellipsis">
|
||||
{{ item.equipmentName }}
|
||||
</text>
|
||||
<text class="uni-card__header-content-subtitle uni-ellipsis">
|
||||
{{ item.mac }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-card__header-extra" style="position: relative">
|
||||
<switch
|
||||
:checked="checkList.indexOf(item.equipmentId) > -1"
|
||||
style="transform: scale(0.8);position: relative;left: 20rpx;"
|
||||
@change="switchChange(item)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</uni-card>
|
||||
</Cn-device-card>
|
||||
<uni-load-more
|
||||
v-if="store.status == 'loading' || deviceListFilter.length > 0"
|
||||
:status="store.status"
|
||||
@@ -255,6 +261,7 @@ export default {
|
||||
}),
|
||||
]
|
||||
this.projectList = arr
|
||||
uni.setStorageSync('projectList', arr)
|
||||
})
|
||||
},
|
||||
queryDictData() {
|
||||
@@ -331,14 +338,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
/deep/ .switch-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
|
||||
&-left {
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user