ソースを参照

物料采集接口对接,多媒体采集接口对接

hh 1 年間 前
コミット
5a0f598950

+ 2 - 4
entry/src/main/ets/common/component/AddAndSubtractComp.ets

@@ -30,9 +30,8 @@ export struct AddAndSubtractComp {
         }
         if (this.subFunction) {
           this.subFunction()
-        } else {
-          this.inputNum --
         }
+        this.inputNum --
       })
       Row() {
         TextInput({text: this.inputNum.toString()})
@@ -91,9 +90,8 @@ export struct AddAndSubtractComp {
         }
         if (this.subFunction) {
           this.addFunction()
-        } else {
-          this.inputNum ++
         }
+        this.inputNum ++
       })
     }
     .width('100%')

+ 1 - 5
entry/src/main/ets/common/constants/CommonConstants.ets

@@ -1,14 +1,10 @@
 import StorageInfo from '../../model/StorageInfo'
 import MaterialInfo from '../../model/MaterialInfo'
-import OrderInfo from '../../model/OrderInfo'
 import ProcessAlarmData from '../../model/processmodel/ProcessAlarmData'
-import ProcessData from '../../viewmodel/ProcessData'
 import ProcessHandleData from '../../model/processmodel/ProcessHandleData'
 import ProcessStandardData from '../../model/processmodel/ProcessStandardData'
-import ProcessStep from '../../viewmodel/ProcessStep'
 import ProductInfo from '../../model/processmodel/ProductInfo'
 import RobotInfo from '../../model/RobotInfo'
-import UniversalCard from  '../../model/UniversalCard'
 
 export default class CommonConstants {
 
@@ -16,7 +12,7 @@ export default class CommonConstants {
   static readonly PRE_NAME : string = 'MyPreferences'
   static AUTH_TOKEN : string = ''
   // 附件地址前缀
-  static FILE_URL_PREFIX : string = 'http://192.168.101.4:9000/jgfile'
+  static FILE_URL_PREFIX : string = 'http://192.168.101.4:9000'
 
   // 当前登录用户id
   static USER_ID : number = 1

+ 3 - 3
entry/src/main/ets/pages/process/ProcessHome.ets

@@ -411,9 +411,9 @@ struct ProcessHome {
                   // "operationId": this.processes[this.selectProcess].operationId,
                   // "qrCode": "20240402000054",
                   // "workOrderCode": this.orderArray[this.selectOrder].workOrderCode
-                  "operationId": 170,
-                  "qrCode": "12020100000052404080014",
-                  "workOrderCode": "GD2404080001"
+                  "operationId": 234,
+                  "qrCode": "12020100000052404100018",
+                  "workOrderCode": "GD2404100007"
                 })
                 router.pushUrl({
                   url: 'pages/process/ProcessStepPage',

+ 14 - 27
entry/src/main/ets/pages/process/ProcessStepPage.ets

@@ -210,37 +210,36 @@ struct ProcessStepPage {
           .margin({left: '2%'})
 
           Column() {
-            if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 1) {
+            if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '1') {
               MaterialCollectView({
-                mainMaterial: this.startWorkInfo.materialCode,
-                process: $process,
+                startWorkInfo: this.startWorkInfo,
               })
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 2) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '2') {
               RecordItemView({
                 operationId: this.process.operationId,
                 processId: this.startWorkInfo.id
               })
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 3) {
-              MultimediaCollectView()
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 4) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '3') {
+              MultimediaCollectView({startWorkInfo: this.startWorkInfo})
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '4') {
               EsopView()
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 5) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '5') {
               SpotCheckView()
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 6) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '6') {
               EquipRecordView()
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 7) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '7') {
               FixtureView()
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 8) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '8') {
               DebugPairView()
-            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType === 9) {
+            } else if (this.processSteps && this.processSteps.length > 0 && this.processSteps[this.selectStep].compentType.toString() === '9') {
               NameplateBindView({mainMaterial: this.startWorkInfo.materialCode})
             }
           }
           .width('100%')
-          .layoutWeight(1)
+          .height('91%')
         }
         .height('100%')
-        .layoutWeight(1)
+        .width('85%')
       }
       .width('100%')
       .height('84%')
@@ -497,19 +496,7 @@ struct ReportFaultDialog {
             //   todo
           })
 
-        // Button('整批报故')
-        //   .fontSize($r('app.float.robot_set_font_size'))
-        //   .fontWeight(FontWeight.Medium)
-        //   .fontColor($r('app.color.general_font_white_color'))
-        //   .width('30%')
-        //   .height('66.5%')
-        //   .borderRadius($r('app.float.robot_set_radius'))
-        //   .backgroundColor($r('app.color.robot_set_card_blue'))
-        //   .onClick(() => {
-        //     //   todo
-        //   })
-
-        Button('单件报故')
+        Button('报故')
           .fontSize($r('app.float.robot_set_font_size'))
           .fontWeight(FontWeight.Medium)
           .fontColor($r('app.color.general_font_white_color'))

+ 287 - 77
entry/src/main/ets/view/processview/MaterialCollectView.ets

@@ -1,42 +1,37 @@
-import CommonConstants from '../../common/constants/CommonConstants'
-import MaterialInfo from '../../model/MaterialInfo'
-import HashMap from '@ohos.util.HashMap'
-import ProcessData from '../../viewmodel/ProcessData'
+import { AddAndSubtractComp } from '../../common/component/AddAndSubtractComp'
+import JGRequest from '../../common/util/request/Request'
+import StartWorkInfo from '../../viewmodel/StartWorkInfo'
 
 @Component
+@Entry
 export struct MaterialCollectView {
-  mainMaterial: string
-  @Link process: ProcessData
-  // 查询到工序需要的物料
-  @State materialArray: MaterialInfo[] = CommonConstants.MATERIAL_ARRAY
-  // 采集到的物料
-  @State collectMaterials: MaterialInfo[] = []
+  startWorkInfo: StartWorkInfo
+  // 查询到工序需要的物料(实际数量大于1则为为采集到的物料数量)
+  @State materialArray: MaterialCollectInfo[] = []
+  // 本次采集到的物料(取消/确认后置为空)
+  @State collectArray: MaterialCollectInfo[] = []
+  // 扫描到的编码
   @State collectCode: string = ''
-  // 方便查询已采集的物料信息
-  private collectMap:HashMap<string, MaterialInfo> = new HashMap()
 
   scroller: Scroller = new Scroller()
+  // 扫描弹窗控制器
+  scanCodeController: CustomDialogController = new CustomDialogController({
+    builder: ScanCodeDialog({
+      collectCode: $collectCode,
+      materialArray: this.materialArray,
+      collectArray: $collectArray,
+    }),
+    autoCancel: true,
+    alignment: DialogAlignment.TopEnd,
+    // gridCount: 3,
+    customStyle: true,
+  })
 
-  aboutToAppear() {
-  //   todo 查询需要的物料信息
-    //遍历已采集的物料
-    for (const material of this.materialArray) {
-      if (material.materialNo && material.materialNo.length > 0) {
-        if (this.collectMap.hasKey(material.materialNo)) {
-          this.collectMap.get(material.materialNo).collectNum++
-        } else {
-          material.collectNum = 0
-          this.collectMap.set(material.materialNo, material)
-        }
-      } else if (material.batchCode && material.batchCode.length > 0) {
-        if (this.collectMap.hasKey(material.batchCode)) {
-          this.collectMap.get(material.batchCode).collectNum++
-        } else {
-          material.collectNum = 0
-          this.collectMap.set(material.batchCode, material)
-        }
-      }
-    }
+  async aboutToAppear() {
+    //  查询需要的物料信息
+    this.materialArray = await JGRequest.post('/api/v1/process/itemRecord/list',{
+      "processId": this.startWorkInfo.id
+    })
   }
 
   build() {
@@ -50,52 +45,21 @@ export struct MaterialCollectView {
           }
           .width('8%')
           .justifyContent(FlexAlign.End)
+          .onClick(()=>{
+          //   todo 对接硬件后删除
+            this.scanCodeController.open()
+          })
 
-          TextInput({ placeholder: '请扫描物料编码', text: this.collectCode })
-            .placeholderColor($r('app.color.text_input_placeholder_font_color'))
-            .placeholderFont({ size: $r('app.float.robot_set_font_size'), weight: FontWeight.Medium })
-            .fontSize($r('app.float.robot_set_font_size'))
+          Text(this.collectCode)
+            .fontSize($r('app.float.process_card_middle_font_size'))
             .fontWeight(FontWeight.Medium)
             .fontColor($r('app.color.general_font_color'))
+            .opacity($r('app.float.general_font_opacity'))
             .textAlign(TextAlign.Start)
             .height('100%')
             .layoutWeight(1)
-            .maxLength(100)
             .borderRadius($r('app.float.robot_set_radius'))
             .backgroundColor($r('app.color.general_font_white_color'))
-            .onChange((value: string) => {
-              this.collectCode = value
-            })
-            .onSubmit(() => {
-              // 遍历需要的物料
-              for (const needMaterial of this.materialArray) {
-                if (needMaterial.materialNo && needMaterial.materialNo.length > 0 && this.collectCode === needMaterial.materialNo) {
-                  if (this.collectMap.hasKey(needMaterial.materialNo)) {
-                    this.collectMap.get(needMaterial.materialNo).collectNum++
-                  } else {
-                    needMaterial.collectNum = 1
-                    let collect: MaterialInfo = new MaterialInfo()
-                    Object.assign(collect, needMaterial)
-                    this.collectMap.set(needMaterial.materialNo, collect)
-                    this.collectMaterials.push(collect)
-                    console.log('testTag', '---collect-------' +JSON.stringify(collect))
-                  }
-                  break
-                } else if (needMaterial.batchCode && needMaterial.batchCode.length > 0 && this.collectCode === needMaterial.batchCode) {
-                  if (this.collectMap.hasKey(needMaterial.batchCode)) {
-                    this.collectMap.get(needMaterial.batchCode).collectNum++
-                  } else {
-                    needMaterial.collectNum = 1
-                    let collect: MaterialInfo = new MaterialInfo()
-                    Object.assign(collect, needMaterial)
-                    this.collectMap.set(needMaterial.batchCode, collect)
-                    this.collectMaterials.push(collect)
-                  }
-                  break
-                }
-              }
-              this.collectCode = ''
-            })
         }
         .borderRadius($r('app.float.robot_set_radius'))
         .backgroundColor($r('app.color.general_font_white_color'))
@@ -106,20 +70,19 @@ export struct MaterialCollectView {
       .height('13%')
       .justifyContent(FlexAlign.Start)
 
-      if (this.collectMaterials && this.collectMaterials.length > 0) {
+      if (this.materialArray && this.materialArray.length > 0) {
         Grid() {
-          ForEach(this.collectMaterials, (material: MaterialInfo) => {
+          ForEach(this.materialArray, (material: MaterialCollectInfo) => {
             GridItem() {
               Row() {
                 Column() {
-                  Text(material.materialName)
+                  Text(material.itemName)
                     .fontSize($r('app.float.process_card_middle_font_size'))
                     .fontColor($r('app.color.general_font_color'))
                     .opacity($r('app.float.general_font_opacity'))
                     .fontWeight(FontWeight.Medium)
 
-                  //   todo 不知道是啥
-                  Text('100*200')
+                  Text(material.itemModel)
                     .fontSize($r('app.float.process_card_small_font_size'))
                     .fontColor($r('app.color.general_font_color'))
                     .opacity($r('app.float.process_step_font_opacity'))
@@ -136,9 +99,9 @@ export struct MaterialCollectView {
                 .height('100%')
                 .padding({left: '4%'})
                 Column() {
-                  if (material.needNum - material.collectNum > 0) {
+                  if (material.needNum - (material.realNum ? material.realNum : 0) > 0) {
                     Column() {
-                      Text((material.needNum - material.collectNum).toString())
+                      Text((material.needNum - material.realNum).toString())
                         .fontSize($r('app.float.process_card_large_font_size'))
                         .fontColor($r('app.color.general_font_color'))
                         .opacity($r('app.float.general_font_opacity'))
@@ -215,4 +178,251 @@ export struct MaterialCollectView {
     .height('100%')
     .margin({left: '2%'})
   }
+}
+
+//扫码弹窗
+@CustomDialog
+struct ScanCodeDialog {
+
+  // 扫描到的物料编码
+  @Link collectCode: string
+  materialArray: MaterialCollectInfo[]
+  @Link collectArray: MaterialCollectInfo[]
+
+  // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
+  controller?: CustomDialogController
+  cancel: () => void
+  confirm: () => void
+
+  aboutToAppear() {
+    if (this.collectCode && this.collectCode.length > 0) {
+      // 判断扫描到的物料编码是否在需要的物料中
+      let isValid: boolean = false
+      let collectMaterial: MaterialCollectInfo = {}
+      for (const material of this.materialArray) {
+        if (material.itemSeq && material.itemSeq.length > 0 && material.itemSeq === this.collectCode) {
+          isValid = true
+          Object.assign(collectMaterial, material)
+          collectMaterial.realNum = 1
+        } else if (material.batchNo && material.batchNo.length > 0 && material.batchNo === this.collectCode) {
+          isValid = true
+          Object.assign(collectMaterial, material)
+          collectMaterial.realNum = 0
+        }
+        if (isValid) {
+          this.collectArray.push(collectMaterial)
+          break
+        }
+      }
+    }
+  }
+
+  build() {
+    Column(){
+      Text('物料采集'+'['+ this.collectArray.length + ']')
+        .textAlign(TextAlign.Center)
+        .width('100%')
+        .height('10%')
+        .fontWeight(FontWeight.Medium)
+        .fontSize($r('app.float.title_font_size'))
+        .fontColor($r('app.color.general_font_color'))
+        .opacity($r('app.float.general_border_radius'))
+
+      Row() {
+        Row() {
+          Row() {
+            Image($r('app.media.qr_code'))
+              .height('31%')
+          }
+          .width('8%')
+          .justifyContent(FlexAlign.End)
+
+          Text(this.collectCode)
+            .fontSize($r('app.float.process_card_middle_font_size'))
+            .fontWeight(FontWeight.Medium)
+            .fontColor($r('app.color.general_font_color'))
+            .opacity($r('app.float.general_font_opacity'))
+            .textAlign(TextAlign.Start)
+            .height('100%')
+            .layoutWeight(1)
+            .borderRadius($r('app.float.robot_set_radius'))
+            .backgroundColor($r('app.color.general_font_white_color'))
+        }
+        .borderRadius($r('app.float.robot_set_radius'))
+        .backgroundColor($r('app.color.general_font_white_color'))
+        .width('100%')
+        .height('77%')
+      }
+      .width('66%')
+      .height('10%')
+      .justifyContent(FlexAlign.Center)
+      .alignItems(VerticalAlign.Top)
+
+      List({ space : 10}) {
+        if (this.collectArray && this.collectArray.length > 0) {
+          ForEach(this.collectArray, (item: MaterialCollectInfo, index: number) => {
+            ListItem() {
+              Row(){
+                Column({space:5}){
+                  Text(item.itemName)
+                    .fontColor($r('app.color.general_font_color'))
+                    .fontWeight(FontWeight.Medium)
+                    .fontSize($r('app.float.card_title_font_size'))
+                    .opacity($r('app.float.general_font_opacity'))
+                    .width('100%')
+                  Text(item.itemModel)
+                    .fontColor($r('app.color.general_font_color'))
+                    .fontWeight(FontWeight.Regular)
+                    .fontSize($r('app.float.card_info_font_size'))
+                    .opacity($r('app.float.card_font_default_opacity'))
+                    .textAlign(TextAlign.Start)
+                    .width('100%')
+                  Text(item.itemSeq && item.itemSeq.length > 0 ? '序列号:' + item.itemSeq: '批次号:' + item.batchNo)
+                    .fontColor($r('app.color.general_font_color'))
+                    .fontWeight(FontWeight.Regular)
+                    .fontSize($r('app.float.card_info_font_size'))
+                    .opacity($r('app.float.card_font_default_opacity'))
+                    .textAlign(TextAlign.Start)
+                    .width('100%')
+                }
+                .justifyContent(FlexAlign.Center)
+                .width('50%')
+                .height('100%')
+                .padding({left: 15})
+
+                Column() {
+                  Row() {
+                    Text('录入数量')
+                      .fontColor($r('app.color.general_font_color'))
+                      .fontWeight(FontWeight.Regular)
+                      .fontSize($r('app.float.card_info_font_size'))
+                      .opacity($r('app.float.card_font_default_opacity'))
+                  }
+                  .height('49%')
+                  .width('81.8%')
+                  .alignItems(VerticalAlign.Bottom)
+                  if (item.itemSeq && item.itemSeq.length > 0) {
+                    Text(item.realNum.toString())
+                      .fontWeight(FontWeight.Bold)
+                      .fontColor('#303030')
+                      .fontSize('51px')
+                  } else {
+                    Row() {
+                      AddAndSubtractComp({
+                        inputNum: item.realNum,
+                        obj: item,
+                        editPropertyName: 'realNum',
+                        upperLimit: item.needNum,
+                        lowerLimit: 0,
+                        addFunction: ()=>{
+                          item.realNum++
+                        },
+                        subFunction: ()=>{
+                          item.realNum--
+                        }
+                      })
+                    }
+                    .width('81.8%')
+                    .height('32%')
+                  }
+                }
+                .width('50%')
+                .height('100%')
+                .justifyContent(FlexAlign.Center)
+              }
+              .borderRadius($r('app.float.general_border_radius'))
+              .height('35%')
+              .width('83%')
+              .backgroundColor($r('app.color.robot_set_card_white'))
+            }
+          })
+        }
+      }
+      .width('100%')
+      .height('70%')
+      .alignListItem(ListItemAlign.Center)
+
+      Row({space:10}){
+        Text('取消')
+          .width('35%')
+          .height('70%')
+          .borderRadius(40)
+          .textAlign(TextAlign.Center)
+          .fontColor('#0A59F7')
+          .backgroundColor('#0f000000')
+          .onClick(()=>{
+            this.controller.close()
+          })
+        Text('确认')
+          .width('35%')
+          .height('70%')
+          .borderRadius(40)
+          .textAlign(TextAlign.Center)
+          .fontColor('#FFFFFF')
+          .backgroundColor('#0A59F7')
+          .onClick(()=>{
+            this.controller.close()
+          })
+      }
+      .width('100%')
+      .height('10%')
+      .justifyContent(FlexAlign.Center)
+      Blank()
+    }
+    .width('50%')
+    .height('100%')
+    .backgroundColor($r('app.color.page_general_background'))
+    .borderRadius({ topLeft: $r('app.float.general_border_width'), bottomLeft: $r('app.float.general_border_width') })
+  }
+}
+
+class MaterialCollectInfo {
+  // 创建时间
+  created?: string
+  // 创建人
+  creator?: string
+  // 删除标识
+  deleted?: number
+  // 部门ID
+  deptId?: string
+  // 主键id
+  id?: number
+  // 修改时间
+  updated?:	string
+  // 上次修改人
+  updator?:	string
+  // 批次号
+  batchNo?:	string
+  // 物料编码
+  itemCode?: string
+  // 物料型号
+  itemModel?: string
+  // 物料名称
+  itemName?: string
+  // 物料序列号
+  itemSeq?:	string
+  // 需要数量
+  needNum?:	number
+  // 旧序列号
+  oldSeq?: string
+  // 工序名称
+  operationName?:	string
+  // 组织ID
+  orgId?:	string
+  // 生产过程id
+  processId?:	string
+  // 实际数量
+  realNum?:	number
+  // 排序号
+  sortNum?:	number
+  // 工作台名称
+  stationName?:	string
+  // 步骤id
+  stepInstanceId?: string
+  // 采集人
+  trackBy?:	string
+  // 追溯类型
+  trackType?:	string
+  // 采集时间
+  trackWhen?:	string
 }

+ 153 - 70
entry/src/main/ets/view/processview/MultimediaCollectView.ets

@@ -1,24 +1,49 @@
+import CommonConstants from '../../common/constants/CommonConstants'
+import JGRequest from '../../common/util/request/Request'
+import PageModel from '../../viewmodel/PageModel'
+import StartWorkInfo from '../../viewmodel/StartWorkInfo'
+
 @Component
 export struct MultimediaCollectView {
 
-  @State collectImages: CollectData[] = [
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'}, {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-    {imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},{imageRes: $r('app.media.pcb_demo'), collectTime: '2024-03-09 15:23:34'},
-  ]
+  @State collectImages: CollectData[] = []
   // 照片选中状态,1:选中 2:未选中
   @State selectStates: number[] = []
+  // 是否可选,默认不能选择,也不会出现删除的选项;长按某一张图片后才能选择
+  @State canSelect: boolean = false
+
+  startWorkInfo: StartWorkInfo
+
+  pageNo: number = 1
+  pageSize: number = 10
+  totalPages: number = 1
 
   scroller: Scroller = new Scroller()
 
-  aboutToAppear() {
-    this.collectImages.unshift({imageRes: $r('app.media.return')})
+  async aboutToAppear() {
+    let res: PageModel<CollectData> = await JGRequest.post('/api/v1/process/media/page', {
+      "pageNo": this.pageNo,
+      "pageSize": this.pageSize,
+      "processId": this.startWorkInfo.id
+    })
+    if (res && res.records && res.records.length > 0) {
+      this.collectImages = res.records
+      this.totalPages = res.totalPages
+      this.pageNo++
+      // 多次查询直到,查出所有的数据
+      while (this.pageNo <= this.totalPages) {
+        res = await JGRequest.post('/api/v1/process/media/page', {
+          "pageNo": this.pageNo,
+          "pageSize": this.pageSize,
+          "processId": this.startWorkInfo.id
+        })
+        this.totalPages = res.totalPages
+        this.pageNo++
+        this.collectImages = this.collectImages.concat(res.records)
+      }
+    }
+    // 往数组头部插入数据 占位(包含拍照、上传按钮)
+    this.collectImages.unshift({id: '0'})
     for (let index = 0; index < this.collectImages.length; index++) {
       this.selectStates.push(2)
     }
@@ -31,14 +56,23 @@ export struct MultimediaCollectView {
             Column() {
               if (index === 0) {
                 Row() {
-                  Image($r('app.media.process_camera'))
-                    .width('30%')
-                  Image($r('app.media.local_upload'))
-                    .width('30%')
+                  Row() {
+                    Image($r('app.media.process_camera'))
+                      .width('60%')
+                  }
+                  .width('50%')
+                  .height('80%')
+                  .justifyContent(FlexAlign.Center)
+                  Row() {
+                    Image($r('app.media.local_upload'))
+                      .width('60%')
+                  }
+                  .width('50%')
+                  .height('80%')
+                  .justifyContent(FlexAlign.Center)
                 }
                 .width('100%')
                 .layoutWeight(1)
-                .justifyContent(FlexAlign.SpaceAround)
                 .borderRadius($r('app.float.general_border_radius'))
                 .borderStyle(BorderStyle.Dashed)
                 .borderColor($r('app.color.material_collect_border_color'))
@@ -48,17 +82,19 @@ export struct MultimediaCollectView {
               } else {
                 Column() {
                   Stack() {
-                    Image(item.imageRes)
+                    Image(CommonConstants.FILE_URL_PREFIX + item.filePath)
                       .objectFit(ImageFit.Fill)
                       .borderRadius($r('app.float.general_border_radius'))
-                    Row() {
-                      Checkbox()
-                        .select(this.selectStates[index] === 1 ? true : false)
+                    if (this.canSelect) {
+                      Row() {
+                        Checkbox()
+                          .select(this.selectStates[index] === 1 ? true : false)
+                      }
+                      .width('90%')
+                      .height('90%')
+                      .justifyContent(FlexAlign.End)
+                      .alignItems(VerticalAlign.Top)
                     }
-                    .width('90%')
-                    .height('90%')
-                    .justifyContent(FlexAlign.End)
-                    .alignItems(VerticalAlign.Top)
                   }
                 }
                 .layoutWeight(1)
@@ -69,9 +105,15 @@ export struct MultimediaCollectView {
                     this.selectStates[index] = 1
                   }
                 })
+                .gesture(
+                  LongPressGesture()
+                    .onAction(()=>{
+                      this.canSelect = true
+                    })
+                )
 
                 Row() {
-                  Text(item.collectTime)
+                  Text(item.created)
                     .fontSize($r('app.float.process_card_small_font_size'))
                     .fontColor($r('app.color.general_font_color'))
                     .opacity($r('app.float.material_collect_font_opacity'))
@@ -86,54 +128,65 @@ export struct MultimediaCollectView {
           Row().width('2%').height('39%')
         })
 
-        Row() {
+        if (this.canSelect) {
           Row() {
             Row() {
-              Text('取消')
-                .fontSize($r('app.float.set_card_font_size'))
-                .fontColor($r('app.color.general_font_white_color'))
-            }
-            .width('50%')
-            .height('100%')
-            .justifyContent(FlexAlign.Center)
-            .onClick(() => {
-              for (let index = 0; index < this.collectImages.length; index++) {
-                this.selectStates[index] = 2
+              Row() {
+                Text('取消')
+                  .fontSize($r('app.float.set_card_font_size'))
+                  .fontColor($r('app.color.general_font_white_color'))
               }
-            })
-            Divider()
-              .height('60%')
-              .borderWidth(1)
-              .vertical(true)
-              .borderColor($r('app.color.process_divider_white_color'))
-            Row() {
-              Text('删除')
-                .fontSize($r('app.float.set_card_font_size'))
-                .fontColor($r('app.color.general_font_white_color'))
-            }
-            .width('50%')
-            .height('100%')
-            .justifyContent(FlexAlign.Center)
-            .onClick(() => {
-              for (let index = this.selectStates.length - 1; index >= 0; index--) {
-                if (this.selectStates[index] === 1) {
-                  this.collectImages.splice(index, 1);
+              .width('50%')
+              .height('100%')
+              .justifyContent(FlexAlign.Center)
+              .onClick(() => {
+                for (let index = 0; index < this.collectImages.length; index++) {
+                  this.selectStates[index] = 2
                 }
+                this.canSelect = false
+              })
+              Divider()
+                .height('60%')
+                .borderWidth(1)
+                .vertical(true)
+                .borderColor($r('app.color.process_divider_white_color'))
+              Row() {
+                Text('删除')
+                  .fontSize($r('app.float.set_card_font_size'))
+                  .fontColor($r('app.color.general_font_white_color'))
               }
-              this.selectStates = []
-              for (let index = 0; index < this.collectImages.length; index++) {
-                this.selectStates.push(2)
-              }
-            })
+              .width('50%')
+              .height('100%')
+              .justifyContent(FlexAlign.Center)
+              .onClick(async () => {
+                let deleteIds: number[] = []
+                for (let index = this.selectStates.length - 1; index >= 0; index--) {
+                  if (this.selectStates[index] === 1) {
+                    deleteIds.push(Number.parseFloat(this.collectImages[index].id))
+                    this.collectImages.splice(index, 1);
+                  }
+                }
+                if (deleteIds.length > 0) {
+                  await JGRequest.post('/api/v1/process/media/batch-del', {
+                    'ids': deleteIds
+                  })
+                }
+                this.selectStates = []
+                for (let index = 0; index < this.collectImages.length; index++) {
+                  this.selectStates.push(2)
+                }
+                this.canSelect = false
+              })
+            }
+            .width('100%')
+            .height('27.6%')
+            .borderRadius($r('app.float.general_border_radius'))
+            .backgroundColor($r('app.color.process_card_black_color'))
           }
-          .width('100%')
-          .height('27.6%')
-          .borderRadius($r('app.float.general_border_radius'))
-          .backgroundColor($r('app.color.process_card_black_color'))
+          .width('37.2%')
+          .height('39%')
+          .alignItems(VerticalAlign.Top)
         }
-        .width('37.2%')
-        .height('39%')
-        .alignItems(VerticalAlign.Top)
       }
       .width('100%')
       .margin({top: 11, left: '2%'})
@@ -145,6 +198,36 @@ export struct MultimediaCollectView {
 }
 
 class CollectData {
-  imageRes?: Resource
-  collectTime?: string
+  // 创建时间
+  created?:	string
+  // 创建人
+  creator?:	string
+  // 删除标识
+  deleted?: number
+  // 部门ID
+  deptId?: string
+  // 修改时间
+  updated?:	string
+  // 上次修改人
+  updator?:	string
+  // 文件名称
+  fileName?: string
+  // 文件路径
+  filePath?: string
+  // 文件大小
+  fileSize?: string
+  // 文件类型
+  fileType?: string
+  // 主键
+  id?: string
+  // 预留类型字段
+  mediaType?: number
+  // 组织ID
+  orgId?:	string
+  // 生产过程id
+  processId?: string
+  // 排序号
+  sortNum?: number
+  // 步骤id
+  stepInstanceId?: string
 }