|
@@ -1,17 +1,121 @@
|
|
|
+import { TimeAndTitle } from '../component/TimeAndTitle';
|
|
|
+import router from '@ohos.router';
|
|
|
+import WorkOrderInfo from '../viewmodel/WorkOrderInfo';
|
|
|
+import CommonConstants from '../common/constants/CommonConstants';
|
|
|
+
|
|
|
@Entry
|
|
|
@Component
|
|
|
struct Index {
|
|
|
@State message: string = 'Hello World';
|
|
|
+ // 工单列表
|
|
|
+ @State workOrders: WorkOrderInfo[] = []
|
|
|
+ // 选中工单
|
|
|
+ @State selectWorkOder: WorkOrderInfo = {}
|
|
|
+ // 工位通知数量
|
|
|
+ @State noticeNum: number = 100
|
|
|
+ async aboutToAppear() {
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
build() {
|
|
|
- Row() {
|
|
|
- Column() {
|
|
|
- Text(this.message)
|
|
|
- .fontSize(50)
|
|
|
- .fontWeight(FontWeight.Bold)
|
|
|
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) {
|
|
|
+ //时间和导航标
|
|
|
+ Row(){
|
|
|
+ TimeAndTitle()
|
|
|
+ }.width('100%')
|
|
|
+ .height('3.4%')
|
|
|
+ .alignItems(VerticalAlign.Bottom)
|
|
|
+ .justifyContent(FlexAlign.End)
|
|
|
+ Row(){
|
|
|
+ Image($r('app.media.general_return'))
|
|
|
+ .height($r('app.float.virtualSize_56'))
|
|
|
+ .width($r('app.float.virtualSize_56'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ Text('生产执行')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_38'))
|
|
|
+ }
|
|
|
+ .height('4%')
|
|
|
+ .width('94.8%')
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+ .onClick(()=> {
|
|
|
+ router.back()
|
|
|
+ })
|
|
|
+
|
|
|
+ Row() {
|
|
|
+ // 左侧选择工单、工位、人员;工序查看
|
|
|
+ Column() {
|
|
|
+ Button('请选择工单', { type: ButtonType.Normal })
|
|
|
+ .width('100%')
|
|
|
+ .height('12.4%')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ // 工位、人员信息
|
|
|
+ Row() {
|
|
|
+ Row().width('5.6%')
|
|
|
+ Column() {
|
|
|
+ Text(CommonConstants.STATION_NANE)
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ Text(CommonConstants.USER_NAME)
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ }
|
|
|
+ .width('48.8%')
|
|
|
+ .height('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+
|
|
|
+ Row() {
|
|
|
+ Text(this.noticeNum > 99 ? '99+' : this.noticeNum.toString())
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .height('42.3%')
|
|
|
+ .width('42%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ }
|
|
|
+ .width('40%')
|
|
|
+ .height('100%')
|
|
|
+ .justifyContent(FlexAlign.End)
|
|
|
+ Row().width('5.6%')
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('8.1%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ // 工序
|
|
|
+ Column() {
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('77.2%')
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('19.8%')
|
|
|
+ .justifyContent(FlexAlign.SpaceBetween)
|
|
|
+ // 右侧生产操作栏
|
|
|
+ Column() {
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('79.1%')
|
|
|
+ .height('100%')
|
|
|
}
|
|
|
- .width('100%')
|
|
|
+ .height('80%')
|
|
|
+ .width('94.8%')
|
|
|
+ .justifyContent(FlexAlign.SpaceBetween)
|
|
|
}
|
|
|
+ .width('100%')
|
|
|
.height('100%')
|
|
|
+ .backgroundColor($r('app.color.000000'))
|
|
|
}
|
|
|
}
|