|
@@ -3,7 +3,21 @@ import RequestParamModel from '../viewmodel/RequestParamModel'
|
|
|
import WorkOrderSeq from '../viewmodel/WorkOrderSeq'
|
|
|
import promptAction from '@ohos.promptAction'
|
|
|
import ProcessInfo from '../viewmodel/process/ProcessInfo'
|
|
|
+import AntiWristStrap from '../viewmodel/device/AntiWristStrap';
|
|
|
+import ElectricScrewdriver from '../viewmodel/device/ElectricScrewdriver';
|
|
|
+import ElectricSolderingIron from '../viewmodel/device/ElectricSolderingIron';
|
|
|
+import ThreeColourLight from '../viewmodel/device/ThreeColourLight';
|
|
|
+import WeldFumeExtractor from '../viewmodel/device/WeldFumeExtractor'
|
|
|
+import Lighting from '../viewmodel/device/Lighting'
|
|
|
+import MqttDataItem from '../viewmodel/mqtt/MqttDataItem'
|
|
|
+import MqttCmdData from '../viewmodel/mqtt/MqttCmdData'
|
|
|
+import MqttManager from '../common/util/mqtt';
|
|
|
+import CommonConstants from '../common/constants/CommonConstants'
|
|
|
+import router from '@ohos.router'
|
|
|
+import CardReader from '../viewmodel/device/CardReader'
|
|
|
+import TempHumiditySensor from '../viewmodel/device/TempHumiditySensor'
|
|
|
|
|
|
+// 辅助操作弹窗
|
|
|
@CustomDialog
|
|
|
export struct AuxiliaryOperationDialog {
|
|
|
// 工单编号
|
|
@@ -22,6 +36,26 @@ export struct AuxiliaryOperationDialog {
|
|
|
|
|
|
//当前用户id
|
|
|
@Consume('currentUserId') currentUserId: number
|
|
|
+ //照明
|
|
|
+ @StorageProp('Lighting') lighting: Lighting = {}
|
|
|
+ //三色灯
|
|
|
+ @StorageProp('ThreeColourLight') threeColourLight: ThreeColourLight = {}
|
|
|
+ //焊烟排烟机/空气净化器
|
|
|
+ @StorageProp('WeldFumeExtractor') weldFumeExtractor: WeldFumeExtractor = { ExhaustFan: 0}
|
|
|
+ // 电烙铁
|
|
|
+ @StorageProp('ElectricSolderingIron') solderingIron: ElectricSolderingIron = { SolderingCurrTemp: 0}
|
|
|
+ // 电动螺丝刀
|
|
|
+ @StorageProp('ElectricScrewdriver') screwdriver: ElectricScrewdriver = { TorqueHoldTime:0 }
|
|
|
+ // 防静电手环
|
|
|
+ @StorageProp('AntiWristStrap') wristStrap: AntiWristStrap = { RingWearNormal: 0, RingWearStandby: 0, RingWearFault: 0, OnlineStatus: 0}
|
|
|
+ // 读卡器
|
|
|
+ @StorageProp('CardReader') cardReader: CardReader = {}
|
|
|
+ // 温湿度传感器
|
|
|
+ @StorageProp('TempHumiditySensor') tempHumiditySensor: TempHumiditySensor = {}
|
|
|
+ // 相机是否在线
|
|
|
+ @StorageProp('CameraStatus') cameraStatus: boolean = false
|
|
|
+ // 扫码枪是否在线
|
|
|
+ @StorageProp('ScanningGunStatus') scanningGunStatus: boolean = false
|
|
|
|
|
|
// 打开零星叫料弹窗
|
|
|
openLittleMaterialRequestDialog?: () => void = () => {}
|
|
@@ -73,7 +107,7 @@ export struct AuxiliaryOperationDialog {
|
|
|
.height($r('app.float.virtualSize_48'))
|
|
|
.fillColor($r('app.color.60FFFFFF'))
|
|
|
Circle()
|
|
|
- .width($r('app.float.virtualSize_12'))
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
.height($r('app.float.virtualSize_12'))
|
|
|
.fill($r('app.color.FF453A'))
|
|
|
}
|
|
@@ -513,34 +547,463 @@ export struct AuxiliaryOperationDialog {
|
|
|
.onClick(()=>{
|
|
|
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
.width('90%')
|
|
|
.height('6.6%')
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
Blank().height('4.7%')
|
|
|
- Row({space: 6}) {
|
|
|
- Column() {
|
|
|
- Row() {
|
|
|
- Circle()
|
|
|
- .width($r('app.float.virtualSize_12'))
|
|
|
- .height($r('app.float.virtualSize_12'))
|
|
|
- .fill($r('app.color.30D158'))
|
|
|
- Text('照明')
|
|
|
- .fontColor($r('app.color.0A84FF'))
|
|
|
- .fontSize($r('app.float.fontSize_24'))
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
+ // 设备列表和设备控制
|
|
|
+ Column() {
|
|
|
+ // 照明+空气净化器
|
|
|
+ Row({space: 6}) {
|
|
|
+ // 照明
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.lighting.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('照明')
|
|
|
+ .fontColor(this.lighting.lighting === 1 ? $r('app.color.90000000') : $r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
}
|
|
|
- .height('43.4%')
|
|
|
- .width('84.9%')
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor(this.lighting.lighting === 1 ? $r('app.color.E5E5E5') : $r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ let item: MqttDataItem = {
|
|
|
+ tag: 'lighting',
|
|
|
+ value: this.lighting?.lighting! === 1 ? 0 : 1
|
|
|
+ }
|
|
|
+ let mqttData: MqttCmdData = {
|
|
|
+ w: [item]
|
|
|
+ }
|
|
|
+ // 发送控制命令
|
|
|
+ MqttManager.publish(CommonConstants.mqttSubscribePublish, JSON.stringify(mqttData))
|
|
|
+ // if (this.lighting?.OnlineStatus! === 1) {
|
|
|
+ // this.lighting = {
|
|
|
+ // lighting: item.value,
|
|
|
+ // OnlineStatus: 1
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ // 排烟机
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.weldFumeExtractor.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('空气净化器')
|
|
|
+ .fontColor(this.weldFumeExtractor.ExhaustFan === 1 ? $r('app.color.90000000') : $r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor(this.weldFumeExtractor.ExhaustFan === 1 ? $r('app.color.E5E5E5') : $r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ let item: MqttDataItem = {
|
|
|
+ tag: 'ExhaustFan',
|
|
|
+ value: this.weldFumeExtractor?.ExhaustFan! === 1 ? 0 : 1
|
|
|
+ }
|
|
|
+ let mqttData: MqttCmdData = {
|
|
|
+ w: [item]
|
|
|
+ }
|
|
|
+ // 发送控制命令
|
|
|
+ MqttManager.publish(CommonConstants.mqttSubscribePublish, JSON.stringify(mqttData))
|
|
|
+ // if (this.weldFumeExtractor?.OnlineStatus! === 1) {
|
|
|
+ // this.weldFumeExtractor = {
|
|
|
+ // ExhaustFan: item.value,
|
|
|
+ // OnlineStatus: 1
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ })
|
|
|
}
|
|
|
- .height('100%')
|
|
|
- .width('44.2%')
|
|
|
+ .height('18.9%')
|
|
|
+ .width('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ // 工业相机+电烙铁
|
|
|
+ Row({space: 6}) {
|
|
|
+ // 工业相机
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.cameraStatus ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('工业相机')
|
|
|
+ .fontColor(this.cameraStatus ? $r('app.color.90000000') : $r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ // todo 打开拍照弹窗
|
|
|
+ })
|
|
|
+ // 电烙铁
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.solderingIron.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('电烙铁')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('设定温度 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.solderingIron.SolderingCurrTemp ? this.solderingIron.SolderingCurrTemp + '℃' : '-')
|
|
|
+ .fontColor(this.solderingIron.SolderingCurrTemp ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .height('56.6%')
|
|
|
+ .width('84.9%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ if (this.solderingIron?.OnlineStatus !== 1) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `设备不在线,请检查设备连接!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ router.pushUrl({
|
|
|
+ url: 'pages/DeviceControllerPage',
|
|
|
+ params: {
|
|
|
+ deviceType: 1,
|
|
|
+ onlineStatus: this.solderingIron?.OnlineStatus
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .height('18.9%')
|
|
|
+ .width('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ // 三色灯+电动螺丝刀
|
|
|
+ Row({space: 6}) {
|
|
|
+ // 三色灯
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.threeColourLight.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('三色灯')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('当前颜色 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.threeColourLight.LedRed! === 1 ? '红色' : (this.threeColourLight.LedOrange! === 1 ? '黄色' : (this.threeColourLight.LedGreen! === 1 ? '绿色' : '-')))
|
|
|
+ .fontColor(this.threeColourLight.LedRed! === 1 ? $r('app.color.FF453A') : (this.threeColourLight.LedOrange! === 1 ? $r('app.color.FFD60A') : (this.threeColourLight.LedGreen! === 1 ? $r('app.color.30D158') : $r('app.color.20FFFFFF'))))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ Row() {
|
|
|
+ Text(' 蜂鸣器 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.threeColourLight.Buzzer! === 1 ? '开启' : '关闭')
|
|
|
+ .fontColor(this.threeColourLight.Buzzer! === 1 ? $r('app.color.0A84FF') : $r('app.color.15FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .height('56.6%')
|
|
|
+ .width('84.9%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ if (this.threeColourLight?.OnlineStatus !== 1) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `设备不在线,请检查设备连接!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ router.pushUrl({
|
|
|
+ url: 'pages/DeviceControllerPage',
|
|
|
+ params: {
|
|
|
+ deviceType: 0,
|
|
|
+ onlineStatus: this.threeColourLight?.OnlineStatus
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // 电动螺丝刀
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.screwdriver.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('电动螺丝刀')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('预设转速 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.screwdriver.TighteRotationDirection ? this.solderingIron + '℃' : '-')
|
|
|
+ .fontColor(this.solderingIron.SolderingSetTemp ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ Row() {
|
|
|
+ Text('预设力矩 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.solderingIron.SolderingSetTemp ? this.solderingIron + '℃' : '-')
|
|
|
+ .fontColor(this.solderingIron.SolderingSetTemp ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ Row() {
|
|
|
+ Text('预设圈数 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.solderingIron.SolderingSetTemp ? this.solderingIron + '℃' : '-')
|
|
|
+ .fontColor(this.solderingIron.SolderingSetTemp ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .height('56.6%')
|
|
|
+ .width('84.9%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ if (this.solderingIron?.OnlineStatus !== 1) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `设备不在线,请检查设备连接!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ router.pushUrl({
|
|
|
+ url: 'pages/DeviceControllerPage',
|
|
|
+ params: {
|
|
|
+ deviceType: 2,
|
|
|
+ onlineStatus: this.screwdriver?.OnlineStatus
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .height('18.9%')
|
|
|
+ .width('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ // 读卡器+温湿度传感器
|
|
|
+ Row({space: 6}) {
|
|
|
+ // 读卡器
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.cardReader.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('读卡器')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('读到卡号 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.cardReader?.RfidCardNum1 && this.cardReader?.RfidCardNum2 ? this.cardReader.RfidCardNum1 + this.cardReader.RfidCardNum2 : '-')
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontColor(this.cardReader?.RfidCardNum1 && this.cardReader?.RfidCardNum2 ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .padding({left: '19.2%'})
|
|
|
+ }
|
|
|
+ .height('56.6%')
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ // 温湿度传感器
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.tempHumiditySensor.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('温湿度计')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('温度 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.tempHumiditySensor?.Temperature ? this.tempHumiditySensor.Temperature / 10 + '℃' : '-')
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontColor(this.tempHumiditySensor?.Temperature ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .padding({left: '19.2%'})
|
|
|
+ Row() {
|
|
|
+ Text('湿度 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.tempHumiditySensor?.Humidity ? this.tempHumiditySensor.Humidity / 10 + '%RH' : '-')
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontColor(this.tempHumiditySensor?.Temperature ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .padding({left: '19.2%'})
|
|
|
+ }
|
|
|
+ .height('56.6%')
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ }
|
|
|
+ .height('18.9%')
|
|
|
+ .width('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ // 扫码枪+防静电手环
|
|
|
+ Row({space: 6}) {
|
|
|
+ // 扫码枪
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.scanningGunStatus ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('扫码枪')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ // 防静电手环
|
|
|
+ Column() {
|
|
|
+ Row({space: 5}) {
|
|
|
+ Circle()
|
|
|
+ .width($r('app.float.virtualSize_14'))
|
|
|
+ .height($r('app.float.virtualSize_14'))
|
|
|
+ .fill(this.tempHumiditySensor.OnlineStatus === 1 ? $r('app.color.30D158') : $r('app.color.15FFFFFF'))
|
|
|
+ Text('防静电手环')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('43.4%')
|
|
|
+ .width('84.9%')
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('佩戴 ')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ Text(this.wristStrap?.RingWearNormal! === 1 ? '是' : '否')
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontColor(this.wristStrap?.RingWearNormal! === 1 ? $r('app.color.0A84FF') : $r('app.color.20FFFFFF'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .padding({left: '19.2%'})
|
|
|
+ }
|
|
|
+ .height('56.6%')
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('44.2%')
|
|
|
+ .backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_16'))
|
|
|
+ }
|
|
|
+ .height('18.9%')
|
|
|
+ .width('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
}
|
|
|
- .height('16%')
|
|
|
.width('100%')
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
+ .layoutWeight(1)
|
|
|
+ .justifyContent(FlexAlign.SpaceBetween)
|
|
|
}
|
|
|
.width('31.3%')
|
|
|
.height('100%')
|
|
@@ -563,6 +1026,4 @@ export struct AuxiliaryOperationDialog {
|
|
|
.combine(TransitionEffect.translate({ y: 300 })) // 初始位置在屏幕下方
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|