feat:天平连接
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
<view class="auncel-weight">
|
||||
<view class="weight">
|
||||
<view
|
||||
:style="{ textAlign: currentAuncel.isConnected != 1 ? 'center' : 'right' }"
|
||||
:class="
|
||||
currentAuncel.weightStable === 0
|
||||
? 'weight-data-yellow'
|
||||
@@ -89,7 +90,7 @@
|
||||
|
||||
<u-button
|
||||
class="btn-operation"
|
||||
v-if="currentAuncel.code === ''"
|
||||
v-if="currentAuncel.code !== ''"
|
||||
type="success"
|
||||
:disabled="confirmWeightDisabled"
|
||||
shape="circle"
|
||||
@@ -200,6 +201,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, nextTick, onMounted } from 'vue'
|
||||
import { onLoad, onBackPress, onShow, onHide, onUnload } from '@dcloudio/uni-app'
|
||||
import request from '@/nx/request'
|
||||
import { calcAnalysisValue } from '@/nx/helper/calcAnalysisValue'
|
||||
import { number } from 'mathjs'
|
||||
@@ -207,6 +209,7 @@ import AuncelSelectPopup from '@/components/sample/auncel-select-popup.vue'
|
||||
import { getTenantId } from '@/defaultBaseUrl'
|
||||
import { useScreenOrientation } from '@/nx/hooks/useScreenOrientation'
|
||||
import nx from '@/nx'
|
||||
import text from '@/uview-plus/components/u-text/text'
|
||||
|
||||
// 响应式数据定义
|
||||
const elId = nx.$helper.uuid()
|
||||
@@ -944,7 +947,7 @@ const listenDeviceData = () => {
|
||||
//设备数据
|
||||
uni.$on('deviceData', res => {
|
||||
switch (res.deviceType) {
|
||||
case 'auncel':
|
||||
case 'balance':
|
||||
if (currentAuncel.id === res.deviceId) {
|
||||
currentAuncel.weightData = res.weightData
|
||||
currentAuncel.weightUnit = res.weightUnit
|
||||
@@ -1233,7 +1236,7 @@ onBackPress(() => {
|
||||
}
|
||||
|
||||
.auncel {
|
||||
width: 100%;
|
||||
width: 90%;
|
||||
height: 55vh;
|
||||
background-image: url(/static/images/auncel.png);
|
||||
background-repeat: no-repeat;
|
||||
@@ -1263,31 +1266,29 @@ onBackPress(() => {
|
||||
.weight {
|
||||
font-size: 42px;
|
||||
width: 100%;
|
||||
padding-right: 10px;
|
||||
padding: 0 60px;
|
||||
}
|
||||
|
||||
.weight-data {
|
||||
color: #4cd964;
|
||||
text-align: right;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-data-yellow {
|
||||
color: #ffff00;
|
||||
text-align: center;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-data-warning {
|
||||
color: #ff3333;
|
||||
text-align: right;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-unit {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
color: #ffffff;
|
||||
font-size: 32px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.auncel {
|
||||
|
||||
Reference in New Issue
Block a user