Quellcode durchsuchen

第二次提交

yixiaojun vor 1 Jahr
Ursprung
Commit
aee7c70b20
2 geänderte Dateien mit 36 neuen und 11 gelöschten Zeilen
  1. 20 1
      entry/src/main/ets/common/component/TaskComp.ets
  2. 16 10
      entry/src/main/ets/pages/Index.ets

+ 20 - 1
entry/src/main/ets/common/component/TaskComp.ets

@@ -1,4 +1,5 @@
 import {task, taskclass} from '../util/request/testR'
+import router from '@ohos.router'
 @Component
 export struct TaskComp {
   @State bugNum:number=0
@@ -46,6 +47,11 @@ export struct TaskComp {
       .backgroundImageSize({width:'100%',height:'100%'})
       .height('100%')
       .borderRadius(15)
+      .onClick(()=>{
+        router.pushUrl({
+          url:'pages/process/ProcessHome'
+        })
+      })
 
 
       //左右column
@@ -113,6 +119,11 @@ export struct TaskComp {
       .height('70%')
       .borderRadius(15)
       .alignItems(HorizontalAlign.End)
+      .onClick(()=>{
+        router.pushUrl({
+          url:'pages/process/ProcessHome'
+        })
+      })
       Divider().vertical(true)
         .height('60%')
       Column(){
@@ -144,6 +155,11 @@ export struct TaskComp {
 
         }.width('100%')
         .height('50%')
+        .onClick(()=>{
+          router.pushUrl({
+            url:'pages/process/ProcessHome'
+          })
+        })
         Divider().vertical(false)
           .width('80%')
         Column(){
@@ -171,8 +187,11 @@ export struct TaskComp {
             .fontSize(px2vp(64))
             .fontWeight(FontWeight.Bold)
 
-        }.width('100%')
+        }.width('80%')
         .height('50%')
+        .backgroundColor('#ffff')
+        .borderRadius(px2vp(21))
+        .margin(5)
 
 
       }.width('30%')

+ 16 - 10
entry/src/main/ets/pages/Index.ets

@@ -15,13 +15,6 @@ struct Index {
   aboutToDisappear(){
     console.log('testTag', '===='+px2vp(19));
  }
-
-
-
-
-
-
-
   build() {
     Row() {
       Column() {
@@ -239,19 +232,32 @@ struct Index {
           // .justifyContent(FlexAlign.End)
           // .borderRadius(15)
           Flex({ wrap: FlexWrap.Wrap }) {
-              Row(){
+              Column(){
                 TaskComp({isHomePage: this.isHomePage})
+                Text('生产操作')
+                  .fontSize(px2vp(27))
+                  .fontWeight(FontWeight.Medium)
+                  .fontColor($r('app.color.robot_set_card_white'))
             }
             .height('40%')
             .width('32%')
-            Row(){
+
+           Column(){
               Warehousing()
+             Text('智能仓储')
+               .fontSize(px2vp(27))
+               .fontWeight(FontWeight.Medium)
+               .fontColor($r('app.color.robot_set_card_white'))
             }
             .height('40%')
             .width('32%')
             .margin({left:10})
-            Row(){
+            Column(){
               SmartFactoryCard()
+              Text('智汇工厂')
+                .fontSize(px2vp(27))
+                .fontWeight(FontWeight.Medium)
+                .fontColor($r('app.color.robot_set_card_white'))
             }
             .height('40%')
             .width('32%')