feat:查询条件调整
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<u-popup :show="showAuncelSelector" closeable @close="close" @open="open" mode="right">
|
||||
<view class="p10">天平选择</view>
|
||||
<scroll-view scroll-y="true" class="content">
|
||||
<u-grid border :col="3" @click="doSelect">
|
||||
<u-grid :col="3" @click="doSelect" style="gap: 20px">
|
||||
<u-grid-item v-for="(auncel, index) in auncelList" :index="index" :key="index">
|
||||
<view class="auncel-item">
|
||||
<view class="auncel-name">
|
||||
@@ -18,6 +18,7 @@
|
||||
<view v-if="auncel.isConnected === 1" class="weight-unit">{{ auncel.weightUnit }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="auncel.isConnected != 1" class="shade">天平断开</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</scroll-view>
|
||||
@@ -164,7 +165,7 @@ const handleDeviceStatus = res => {
|
||||
if (item.id === res.deviceId) {
|
||||
item.isConnected = res.connected
|
||||
if (res.connected == 0) {
|
||||
item.weightData = '天平断开'
|
||||
item.weightData = ''
|
||||
item.weightUnit = ''
|
||||
item.weightStable = 0
|
||||
}
|
||||
@@ -199,7 +200,7 @@ onUnmounted(() => {
|
||||
})
|
||||
function getWeightText(auncel) {
|
||||
if (auncel.isConnected !== 1) {
|
||||
return '天平断开'
|
||||
return ''
|
||||
}
|
||||
return auncel.weightData || ''
|
||||
}
|
||||
@@ -227,8 +228,9 @@ function getWeightStyle(auncel) {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 80vw;
|
||||
width: 60vw;
|
||||
height: 90vh;
|
||||
padding: 0 20px 40px 20px;
|
||||
}
|
||||
.auncel-item {
|
||||
height: 180px;
|
||||
@@ -239,6 +241,22 @@ function getWeightStyle(auncel) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.shade {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #000;
|
||||
opacity: 0.6;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
z-index: 10;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.auncel-name {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user