联调app
This commit is contained in:
@@ -60,26 +60,28 @@
|
||||
</picker> -->
|
||||
</view>
|
||||
<view class="content device" :style="{ minHeight: minHeight }">
|
||||
<Cn-device-card v-for="(item, index) in deviceListFilter" :device="item" :key="index">
|
||||
<template v-slot:title>
|
||||
<!-- 卡片标题 -->
|
||||
|
||||
<switch
|
||||
v-if="transfer || share"
|
||||
:checked="checkList.indexOf(item.equipmentId) > -1"
|
||||
style="transform: scale(0.8); position: relative; left: 20rpx"
|
||||
@change="switchChange(item)"
|
||||
/>
|
||||
<view class="star-icon" v-else @click="toggleStar(item)">
|
||||
<uni-icons
|
||||
custom-prefix="custom-icon"
|
||||
:type="item.isTop == 1 ? 'star-filled' : 'star'"
|
||||
:color="item.isTop == 1 ? '#ffcc00' : ''"
|
||||
size="25"
|
||||
></uni-icons>
|
||||
</view>
|
||||
</template>
|
||||
</Cn-device-card>
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action-item
|
||||
v-for="(item, index) in deviceListFilter"
|
||||
:threshold="0"
|
||||
:right-options="item.isTop == 0 ? options1 : options12"
|
||||
@click="bindClick($event, item)"
|
||||
>
|
||||
<Cn-device-card :device="item" :key="index">
|
||||
<template v-slot:title>
|
||||
<!-- 卡片标题 -->
|
||||
|
||||
<switch
|
||||
v-if="transfer || share"
|
||||
:checked="checkList.indexOf(item.equipmentId) > -1"
|
||||
style="transform: scale(0.8); position: relative; left: 20rpx"
|
||||
@change="switchChange(item)"
|
||||
/>
|
||||
<view class="star-icon" v-else> <uni-icons type="search" size="25"></uni-icons> </view>
|
||||
</template>
|
||||
</Cn-device-card>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
<uni-load-more
|
||||
v-if="store.status == 'loading' || deviceListFilter.length > 0"
|
||||
:status="store.status"
|
||||
@@ -118,6 +120,22 @@ export default {
|
||||
projectType: [],
|
||||
userInfo: {},
|
||||
selectProject: false,
|
||||
options1: [
|
||||
{
|
||||
text: '置顶',
|
||||
style: {
|
||||
backgroundColor: '#376cf3',
|
||||
},
|
||||
},
|
||||
],
|
||||
options12: [
|
||||
{
|
||||
text: '取消',
|
||||
style: {
|
||||
backgroundColor: '#ccc',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -148,7 +166,7 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
toggleStar(item) {
|
||||
bindClick(e, item) {
|
||||
engineeringPinToTop({
|
||||
targetId: item.equipmentId,
|
||||
targetType: 1,
|
||||
@@ -162,6 +180,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
selectDevice(type) {
|
||||
if (this.deviceListFilter.findIndex((item) => item.isPrimaryUser === '1') === -1) {
|
||||
this.$util.toast('没有可操作的设备')
|
||||
@@ -351,4 +370,9 @@ export default {
|
||||
.nav-menu {
|
||||
}
|
||||
}
|
||||
/deep/ .button-group--right {
|
||||
padding: 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user