فهرست منبع

设备点检和人员筛选

cjb 3 روز پیش
والد
کامیت
bb1d378f68

+ 1 - 0
entry/oh-package.json5

@@ -8,6 +8,7 @@
   "dependencies": {
     "@ohos/axios": "2.2.1-rc.0",
     "@ohos/commons-fileupload": "^1.0.0",
+    "pinyin-pro": "^3.18.3"
   }
 }
 

+ 1 - 0
entry/src/main/ets/view/CompleteReceiveDialog.ets

@@ -1,3 +1,4 @@
+//齐套接收
 import ProcessRequest from '../common/util/request/ProcessRequest'
 import MaterialInfo from '../viewmodel/MaterialInfo'
 import OperationInfo from '../viewmodel/process/OperationInfo'

+ 278 - 0
entry/src/main/ets/view/EquipmentInspectionDialog.ets

@@ -0,0 +1,278 @@
+//设备点检
+import ProcessRequest from '../common/util/request/ProcessRequest'
+import DeviceInfo from '../viewmodel/DeviceInfo'
+import RequestParamModel from '../viewmodel/RequestParamModel'
+import TimeUtil from "../common/util/TimeUtil"
+import PageInfo from '../viewmodel/PageInfo'
+
+//todo 需要后端接口
+@CustomDialog
+export struct EquipmentInspectionDialog {
+  private scrollerDevice: Scroller = new Scroller()
+  //查找设备编码
+  @State queryDeviceNo:string = ''
+  //当前日期
+  @State currentDate: string = ''
+  //设备列表
+  @State devicesList: DeviceInfo[] = [
+  ];
+  //选中设备索引
+  @State selectDeviceIndex:number=-1
+  controller: CustomDialogController
+  onConfirm: () => void = () => {}
+
+  onQueryDeviceCode = async ()=> {
+    let res = await ProcessRequest.post('/api/v1/device/page', {
+      deviceNo: this.queryDeviceNo
+    } as RequestParamModel) as PageInfo;
+    this.devicesList = res.records as DeviceInfo[] || []
+  }
+
+  //当前日期
+  updateCurrentDate() {
+    const now = new Date()
+    const year = now.getFullYear()
+    const month = (now.getMonth() + 1).toString().padStart(2, '0')
+    const day = now.getDate().toString().padStart(2, '0')
+    this.currentDate = `${year}/${month}/${day}`
+  }
+
+  //对比当前日期和有效期
+  private compareDates(currentDate: string, targetDate: string): number {
+    if (!targetDate) return -1; // 无效日期视为已过期
+    const normalizeDate = (dateStr: string) => {
+      let result = dateStr.split('/').join('-');
+      result = result.split('年').join('-')
+        .split('月').join('-')
+        .split('日').join('-');
+      return result;
+    };
+    try {
+      const current = new Date(normalizeDate(currentDate));
+      const target = new Date(normalizeDate(targetDate));
+      if (isNaN(current.getTime()) || isNaN(target.getTime())) {
+        return -1;
+      }
+      return target.getTime() - current.getTime();
+    } catch (e) {
+      return -1; // 日期解析异常视为已过期
+    }
+  }
+
+  aboutToAppear(): void {
+    this.updateCurrentDate();
+    this.onQueryDeviceCode();
+  }
+  build() {
+    Column() {
+      Column() {
+        Text("设备点检")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }
+      .height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+
+      Column() {
+        Text("扫描设备 ")
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_24'))
+        Row(){
+          Row() {
+            // 左侧二维码图标
+            Image($r('app.media.material_qr_code'))
+              .width($r('app.float.virtualSize_32'))
+              .height($r('app.float.virtualSize_32'))
+              .fillColor($r('app.color.FFFFFF'))
+              .objectFit(ImageFit.Contain)
+              .margin({left:'2%'})
+            // 扫码输入框
+            TextInput({text:this.queryDeviceNo, placeholder: '请扫描设备编码' })
+              .type(InputType.Normal)
+              .placeholderFont({ size: $r('app.float.fontSize_16') })
+              .placeholderColor($r('app.color.30FFFFFF'))
+              .fontSize($r('app.float.fontSize_16'))
+              .fontColor($r('app.color.FFFFFF'))
+              .enableKeyboardOnFocus(false)
+              .onSubmit(() => {
+                this.onQueryDeviceCode()
+              })
+              .onChange((value: string) => {
+                this.queryDeviceNo = value;
+                //this.onQueryDeviceCode()
+              })
+          }
+          .height('100%')
+          .width('65%')
+          .borderRadius($r('app.float.virtualSize_16'))
+          .backgroundColor($r('app.color.000000'))
+          Text(this.currentDate)
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_16'))
+            .margin({left:'3%'})
+        }
+        .height('8%')
+        .width('50%')
+        .margin({bottom:'1%',top:'1%'})
+        List({scroller: this.scrollerDevice }) {
+            ForEach(this.devicesList, (item: DeviceInfo, index) => {
+              ListItem() {
+                Row() {
+                  Column(){
+                    Text(`${item.deviceName}`)
+                      .fontSize($r('app.float.fontSize_24'))
+                      .fontColor($r('app.color.FFFFFF'))
+                    Text(`型号:${item.deviceType}`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .margin({top:'2%',bottom:'1%'})
+                    Text(`设备编码:${item.deviceNo}`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('30%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+                  .alignItems(HorizontalAlign.Start)
+                  .margin({right:'16%'})
+                  Column({space:5}){
+                    Text(`计量有效期:`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                    Row(){
+                      Image(this.compareDates(this.currentDate, item.meteringDate) > 0
+                      ?$r('app.media.device_normal') :$r('app.media.device_expire')
+                      )
+                        .width($r('app.float.virtualSize_24'))
+                        .height($r('app.float.virtualSize_24'))
+                        .margin({left:'2%'})
+                      Text(`${item.meteringDate}`)
+                        .fontSize($r('app.float.fontSize_16'))
+                        .fontColor(
+                          this.compareDates(this.currentDate, item.meteringDate) > 0
+                            ? $r('app.color.30D158')  // 有效期未过(绿色)
+                            : $r('app.color.FF453A')  // 已过期(红色)
+                        )
+                        .margin({left:'2%'})
+                    }
+                    .width('65%')
+                    .borderRadius($r('app.float.virtualSize_16'))
+                    .backgroundColor($r('app.color.000000'))
+                    .height('25%')
+                    .alignItems(VerticalAlign.Center)
+                  }
+                  .width('22%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+                  .alignItems(HorizontalAlign.Start)
+                  Column({space:5}){
+                    Text(`维保有效期:`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                    Row(){
+                      Image(this.compareDates(this.currentDate, item.updated) > 0
+                        ?$r('app.media.device_normal') :$r('app.media.device_expire')
+                      )
+                        .width($r('app.float.virtualSize_24'))
+                        .height($r('app.float.virtualSize_24'))
+                        .margin({left:'2%'})
+                      Text(`${item.updated}`)
+                        .fontSize($r('app.float.fontSize_16'))
+                        .fontColor(
+                          this.compareDates(this.currentDate, item.updated) > 0
+                            ? $r('app.color.30D158')
+                            : $r('app.color.FF453A')
+                        )
+                        .margin({left:'2%'})
+                    }
+                    .width('65%')
+                    .borderRadius($r('app.float.virtualSize_16'))
+                    .backgroundColor($r('app.color.000000'))
+                    .height('25%')
+                    .alignItems(VerticalAlign.Center)
+                  }
+                  .width('22%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+                  .alignItems(HorizontalAlign.Start)
+                  Column(){
+                   Image($r('app.media.process_delete_seq'))
+                     .width($r('app.float.virtualSize_48'))
+                     .height($r('app.float.virtualSize_48'))
+                     .fillColor($r('app.color.FF453A'))
+                     .onClick(()=>{
+                       this.devicesList.splice(index, 1);
+                     })
+                  }
+                  .width('10%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+
+                }
+                .height('90%')
+                .width('95%')
+                .justifyContent(FlexAlign.Start)
+              }
+              .height('18%')
+              .width('100%')
+              .margin({ bottom: 8})
+              .borderRadius($r('app.float.virtualSize_16'))
+              .backgroundColor($r('app.color.10FFFFFF'))
+            })
+          }.height('82%')
+        }
+        .width('96%')
+        .height('84%')
+        .alignItems(HorizontalAlign.Start)
+        .justifyContent(FlexAlign.Start)
+        .margin({left:'2%',right:'2%'})
+
+      Column() {
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row() {
+          Row() {
+            Text('取消')
+              .fontColor($r('app.color.60FFFFFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => this.controller.close())
+
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Text('确定')
+              .fontColor($r('app.color.007AFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => {
+            this.controller.close();
+          })
+        }
+      }
+      .width('100%')
+      .height('8%')
+    }
+    .height('71%')
+    .width('62%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}

+ 189 - 0
entry/src/main/ets/view/JoinPersonNameDialog.ets

@@ -0,0 +1,189 @@
+//参与人员
+import { pinyin } from "pinyin-pro";
+import ProcessRequest from '../common/util/request/ProcessRequest';
+import PageInfo from '../viewmodel/PageInfo';
+import RequestParamModel from '../viewmodel/RequestParamModel';
+import { UserInfo } from '../viewmodel/UserInfo';
+
+@CustomDialog
+export struct JoinPersonNameDialog{
+  controller: CustomDialogController
+  onConfirm: () => void = () => {}
+  scroller: Scroller = new Scroller()
+  @State nameList:UserInfo[]=[]
+  @State selectNameIndex:number=-1
+  @State selectName:string = ''
+  @State queryName:string = ''
+
+  private value: string[] = ['A', 'B', 'C', 'D', 'E', 'F', 'G',
+    'H', 'I', 'J', 'K', 'L', 'M', 'N',
+    'O', 'P', 'Q', 'R', 'S', 'T', 'U',
+    'V', 'W', 'X', 'Y', 'Z','#']
+
+  onSelectIndexItem(index:string) {
+    for (let i = 0; i < this.nameList.length; i++) {
+      console.log("名字:" + this.nameList[i].userName + " index1:" + this.nameList[i].nameInitial + " index2:" + index)
+      if (this.nameList[i].nameInitial == index) {
+        this.scroller.scrollToIndex(i) //滚动到索引位置
+        break;
+      }
+    }
+  }
+  private onSelectName(index: number) {
+    this.selectNameIndex = index
+    this.selectName = this.nameList[index].userName??""
+  }
+
+  loadPersonNameList = async ()=>{
+    let res = await ProcessRequest.post('/api/v1/sys/user/page', {
+      userName:this.queryName
+    } as RequestParamModel) as PageInfo;
+    this.nameList = res.records as UserInfo[] || []
+    for(let i = 0; i < this.nameList.length; i++) {
+      let pinyinStr = pinyin(this.nameList[i].userName, { toneType: "none" });
+      let index = pinyinStr.substring(0, 1).toUpperCase();
+      if (!(new RegExp("^[A-Z]$").test(index))) {
+        index = "#";
+      }
+      this.nameList[i].nameInitial = index
+    }
+    this.nameList.sort((a: UserInfo, b: UserInfo): number => {
+      const aInitial = a.nameInitial || "#";
+      const bInitial = b.nameInitial || "#";
+      const aName = a.userName || a.userName || "";
+      const bName = b.userName || b.userName || "";
+      if (aInitial === bInitial) {
+        return aName.localeCompare(bName);
+      }
+      if (aInitial === "#") {
+        return 1;
+      }
+      if (bInitial === "#") {
+        return -1;
+      }
+      return aInitial.localeCompare(bInitial);
+    });
+  }
+
+  aboutToAppear(): void {
+    this.loadPersonNameList()
+  }
+
+  build() {
+    Column(){
+      Column() {
+        Text("参与人员")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }
+      .height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+      Row() {
+        TextInput({  placeholder: '录入人员姓名' })
+          .type(InputType.Normal)
+          .placeholderFont({ size: $r('app.float.fontSize_16') })
+          .placeholderColor($r('app.color.30FFFFFF'))
+          .fontSize($r('app.float.fontSize_16'))
+          .fontColor($r('app.color.FFFFFF'))
+          .enableKeyboardOnFocus(false)
+          .width('84%')
+          .onChange((value: string) => {
+            this.queryName = value
+            this.loadPersonNameList()
+          })
+        Row() {
+          Image($r('app.media.process_search'))
+            .width($r('app.float.virtualSize_48'))
+            .height($r('app.float.virtualSize_48'))
+            .fillColor($r('app.color.0A84FF'))
+            .onClick(() => {
+              this.loadPersonNameList()
+            })
+        }
+        .width('16%')
+        .height('100%')
+        .justifyContent(FlexAlign.Center)
+        .borderRadius($r('app.float.virtualSize_16'))
+        .backgroundColor($r('app.color.20FFFFFF'))
+      }
+      .borderRadius($r('app.float.virtualSize_16'))
+      .backgroundColor($r('app.color.000000'))
+      .height('7%')
+      .width('60%')
+      .margin({bottom:'2%',left:'20%',right:'20%'})
+      Row() {
+        List({ space: 0, initialIndex: 0,scroller:this.scroller}){
+          ForEach(this.nameList, (item:UserInfo,index) => {
+            ListItem() {
+              Column(){
+                if (index==0||this.nameList[index-1].nameInitial != item.nameInitial){
+                  Row(){
+                    Text(item.nameInitial)
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontSize($r('app.float.fontSize_60'))
+                  }
+                  .width($r('app.float.virtualSize_80'))
+                  .height($r('app.float.virtualSize_80'))
+                  .backgroundColor($r('app.color.0A84FF'))
+                  .justifyContent(FlexAlign.Center)
+                  .alignItems(VerticalAlign.Center)
+                  .margin({left:'2%'})
+                }
+                Row(){
+                  Text(item.userName)
+                    .fontSize($r('app.float.fontSize_24'))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .margin({left:'2%'})
+                  Text(item.deptNames)
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontWeight(FontWeight.Lighter)
+                    .margin({left:'2%'})
+                }
+                .justifyContent(FlexAlign.Start)
+                .alignItems(VerticalAlign.Center)
+                .padding(20)
+                .width('100%')
+                .backgroundColor(this.selectNameIndex===index?$r('app.color.200A84FF'):'')
+                .onClick(()=>{
+                  this.onSelectName(index)
+                })
+              }
+              .alignItems(HorizontalAlign.Start)
+            }
+          })
+        }
+        .layoutWeight(1)
+        .scrollBar(BarState.Off)
+        .height('100%')
+        .width('90%')
+
+        AlphabetIndexer({ arrayValue: this.value, selected: 0})
+          .color($r('app.color.FFFFFF'))
+          .selectedColor($r('app.color.FFFFFF'))
+          .selectedBackgroundColor($r('app.color.20FFFFFF'))
+          .usingPopup(false)
+          .selectedFont({ size: 16, weight: FontWeight.Bolder })
+          .itemSize(25.2)
+          .alignStyle(IndexerAlign.Right)
+          .onSelect((index: number) => {
+            this.onSelectIndexItem(this.value[index]);
+          })
+
+      }
+      .height('83%')
+      .width('100%')
+    }
+    .height('71%')
+    .width('30%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}
+
+

+ 2 - 1
entry/src/main/ets/view/LittleMaterialRequestDialog.ets

@@ -1,3 +1,4 @@
+//零星叫料
 import ProcessRequest from '../common/util/request/ProcessRequest'
 import MaterialInfo from '../viewmodel/MaterialInfo'
 import PageInfo from '../viewmodel/PageInfo'
@@ -30,7 +31,7 @@ export struct LittleMaterialRequestDialog {
       {
         materialName: this.queryMaterialName
       }  as RequestParamModel) as PageInfo;
-    this.materialTypesList = res.records??[]
+    this.materialTypesList = res.records as MaterialInfo[] || []
     //初始所有物料数量为0
     this.materialTypesList.forEach(item => {
       this.materialNumMap[item.materialName??''] = 0;

+ 1 - 1
entry/src/main/ets/view/process/MaterialCollectView.ets

@@ -70,7 +70,7 @@ export struct MaterialCollectView {
         operationId: this.selectOperationId,
         pageNo: 1,
         pageSize: 999999} as RequestParamModel) as PageInfo
-      this.itemArray = res.records??[]
+      this.itemArray = res.records as OperationItem[] || []
     }
     if (this.itemArray) {
       for (const element of this.itemArray) {

+ 40 - 30
entry/src/main/ets/view/process/MultiMediaCollect.ets

@@ -20,30 +20,45 @@ export struct MultiMediaCollect {
   @State isExpanded: boolean = false
   //闪光模式 0:自动 1:开启 2:关闭
   @State selectedFlashMode:number = 0
+  //选择的照片索引
   @State selectedPhotoIndex:number = -1
+  //拍照按键缩放
   @State shootButtonClick:number =1
-  @State rotateAngle: number = 0 // 旋转角度
-  @State scaleValue: number = 1 // 缩放比例
-  @State offsetX: number = 0 // X轴偏移
-  @State offsetY: number = 0 // Y轴偏移
-  @State lastScale: number = 1 // 上次缩放值
-  @State lastOffsetX: number = 0 // 上次X偏移
-  @State lastOffsetY: number = 0 // 上次Y偏移
-
+  // 旋转角度
+  @State rotateAngle: number = 0
+  // 照片缩放比例
+  @State scaleValue: number = 1
+  // 照片X轴偏移
+  @State offsetX: number = 0
+  // 照片Y轴偏移
+  @State offsetY: number = 0
+  // 照片上次缩放值
+  @State lastScale: number = 1
+  // 照片上次X偏移
+  @State lastOffsetX: number = 0
+  // 照片上次Y偏移
+  @State lastOffsetY: number = 0
+  // 正在上传
   @State isUploading: boolean = false
+  // 照片列表
   @State photoList:DrawingInfo[]=[]
+  // 获取本地live照片
   @State commodityPixelMap: PixelMap | null = null;
-  @State pixelMap: PixelMap | null = null;
-  @State isButtonPressed: boolean = false;
+  // 拍照动作是否完成
   @State isCapturing: boolean = false;
+  // 是否停止预览
   @State isStopView: boolean = false;
-  @State reminds:string = ''
+  // 控制帧率
   @State readTimer:number = 0
+  // 预览操作
   private previewManager: PreviewManager | null = null;
 
+  //创建订阅者
   subscriber: CommonEventManager.CommonEventSubscriber | null = null;
+  //订阅相机回调
   subscribeInfo: CommonEventManager.CommonEventSubscribeInfo = { events: ["sonycamera_callback"] };
 
+  //提示确认弹窗
   commonDialogController: CustomDialogController | null = null;
   private showConfirmDialog(params: ConfirmDialogParams) {
     if (this.commonDialogController) {
@@ -66,6 +81,7 @@ export struct MultiMediaCollect {
 
     this.commonDialogController.open();
   }
+
   //订阅回调(code=3代表连接成功,code=2代表拍照成功)
   createSubscriber = async () => {
     this.subscriber = await CommonEventManager.createSubscriber(this.subscribeInfo);
@@ -132,7 +148,7 @@ export struct MultiMediaCollect {
   }
 
 
-
+  //旋转照片
   private rotateImage(angle: number) {
     this.offsetX = 0;
     this.offsetY = 0;
@@ -206,6 +222,7 @@ export struct MultiMediaCollect {
       }
     });
   }
+
   //重连相机
   reconnectCamera=async()=>{
     this.showConfirmDialog({
@@ -233,7 +250,7 @@ export struct MultiMediaCollect {
         });
         await sleep(3000);
         await this.connectCamera()
-        await this.liveShow()
+        //await this.liveShow()
       }
     });
   }
@@ -296,6 +313,7 @@ export struct MultiMediaCollect {
     });
   };
 
+  //设置闪光模式
   setFlashMode = (mode: 'openflash' | 'closeflash' | 'autoflash') => {
     this.isStopView = true;
     CommonEventManager.publish("stopview", (err) => {
@@ -341,7 +359,6 @@ export struct MultiMediaCollect {
     await this.createSubscriber();
     await this.connectCamera();
     await this.queryFlashMode();
-    await this.liveShow();
   }
 
   aboutToDisappear(): void {
@@ -524,20 +541,22 @@ export struct MultiMediaCollect {
                       this.scaleValue = this.lastScale * event.scale
                     })
                     .onActionEnd(() => {
+                      //缩放最小比例为1
                       if (this.scaleValue < 1) {
+                        //旋转90°或者270°的最小缩小比例为0.63
                         if(this.rotateAngle==90||this.rotateAngle==270) {
-                          this.scaleValue = 0.63
+                          if(this.scaleValue<0.63){
+                            this.scaleValue = 0.63
+                          }
                         } else {
                           this.scaleValue = 1
                         }
-                        // 缩放结束后检查边界
-
                       }
+                      //缩放最大比例为4
                       if (this.scaleValue > 4) this.scaleValue = 4
                     }),
 
                   // 单指滑动手势
-                  // 在PanGesture的onActionEnd中添加边界检查和回弹逻辑
                   PanGesture()
                     .onActionStart(() => {
                       if (this.scaleValue <= 1) return;
@@ -551,7 +570,7 @@ export struct MultiMediaCollect {
                       let dy = event.offsetY;
                       const sensitivity = 0.5 * this.scaleValue;
 
-                      // 临时计算新位置,不直接赋值给状态变量
+                      // 临时计算新位置
                       let newOffsetX = this.lastOffsetX;
                       let newOffsetY = this.lastOffsetY;
 
@@ -583,27 +602,22 @@ export struct MultiMediaCollect {
                         this.offsetY = 0;
                         return;
                       }
-
                       // 计算最大允许偏移量(基于缩放比例)
-                      const maxOffsetX = (this.scaleValue - 1) * 500; // 100是容器的半宽
-                      const maxOffsetY = (this.scaleValue - 1) * 345; // 100是容器的半高
-
+                      const maxOffsetX = (this.scaleValue - 1) * 500; //500是容器的半宽
+                      const maxOffsetY = (this.scaleValue - 1) * 345; //345是容器的半高
                       // 检查X轴边界
                       if (Math.abs(this.offsetX) > maxOffsetX) {
                         this.offsetX = this.offsetX > 0 ? maxOffsetX : -maxOffsetX;
                       }
-
                       // 检查Y轴边界
                       if (Math.abs(this.offsetY) > maxOffsetY) {
                         this.offsetY = this.offsetY > 0 ? maxOffsetY : -maxOffsetY;
                       }
-
                       // 添加回弹动画
                       animateTo({
                         duration: 300,
                         curve: Curve.EaseOut
                       }, () => {
-                        // 动画结束后确保位置正确
                         this.offsetX = this.offsetX;
                         this.offsetY = this.offsetY;
                       });
@@ -640,10 +654,6 @@ export struct MultiMediaCollect {
                 .height($r('app.float.virtualSize_80'))
                 .onClick(()=>{
                   this.rotateImage(-90)
-                  if(this.rotateAngle==90)
-                  {
-                    console.info("sssaaa"+this.rotateAngle)
-                  }
                 })
               Image($r('app.media.process_photo_turn_right'))
                 .width($r('app.float.virtualSize_80'))

+ 13 - 0
entry/src/main/ets/viewmodel/DeviceInfo.ets

@@ -0,0 +1,13 @@
+export default class DeviceInfo {
+  // 设备名字
+  deviceName?: string
+  // 设备型号
+  deviceType?: string
+  //设备编码
+  deviceNo?: string
+  //计量有效期
+  meteringDate?:string
+  //todo 暂时使用updated作为维保有效期
+  // 维保有效期
+  updated?:string
+}

+ 3 - 1
entry/src/main/ets/viewmodel/PageInfo.ets

@@ -1,9 +1,11 @@
+import DeviceInfo from './DeviceInfo'
 import MaterialInfo from './MaterialInfo'
 import OperationItem from './OperationItem'
+import { UserInfo } from './UserInfo'
 
 export default interface PageInfo {
   pageNo?:string,
   pageSize?:string,
   //消息记录
-  records?: MaterialInfo[] | OperationItem[]
+  records?: MaterialInfo[] | OperationItem[] | UserInfo[] | DeviceInfo[]
 }

+ 2 - 0
entry/src/main/ets/viewmodel/RequestParamModel.ets

@@ -86,4 +86,6 @@ export default class RequestParamModel {
   itemCode?:string
   //照片编码
   id?:string
+  //设备编号
+  deviceNo?:string
 }

+ 6 - 0
entry/src/main/ets/viewmodel/UserInfo.ets

@@ -20,6 +20,12 @@ export class UserInfo {
   updateTime?: number;
   stationCode?: string
   stationIp?: string
+  //昵称
+  nickName?:string
+  //部门名
+  deptNames?: string
+  //名字首字母
+  nameInitial?:string
 }
 
 // 用户登陆信息

+ 4 - 0
entry/src/main/resources/base/element/font_size.json

@@ -17,6 +17,10 @@
       "value": "21.6fp"
     },
     {
+      "name": "fontSize_60",
+      "value": "43.2fp"
+    },
+    {
       "name": "fontSize_24",
       "value": "17.28fp"
     },

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 0
entry/src/main/resources/base/media/device_expire.svg


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 0
entry/src/main/resources/base/media/device_normal.svg


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 2
entry/src/main/resources/base/media/process_photo_delete.svg