Browse Source

修改设置-用户布局

hh 1 year ago
parent
commit
b3c1a9fc20

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

@@ -67,7 +67,7 @@ export struct AddAndSubtractComp {
       .width('50%')
       .height('100%')
       .border({width:{left: 1, right: 1}})
-      .borderColor($r('app.color.general_border_white_color'))
+      .borderColor($r('app.color.general_border_black_color'))
       Row() {
         Image(this.upperLimit && this.upperLimit >= this.lowerLimit ? $r('app.media.add_disabled') : $r('app.media.add'))
           .width($r('app.float.title_icon_size'))
@@ -90,7 +90,7 @@ export struct AddAndSubtractComp {
     .width('100%')
     .height('100%')
     .borderWidth(1)
-    .borderColor($r('app.color.general_border_white_color'))
+    .borderColor($r('app.color.general_border_black_color'))
     .borderRadius($r('app.float.general_border_radius'))
   }
 }

+ 1 - 1
entry/src/main/ets/pages/SetPage.ets

@@ -81,7 +81,7 @@ struct SetPage {
         .margin({ right: '1.6%' })
       }
       .width('100%')
-      .layoutWeight(1)
+      .height('82%')
 
       // 底部操作栏
       BottomOperateComp()

+ 78 - 119
entry/src/main/ets/view/UserInfoSetView.ets

@@ -1,6 +1,8 @@
 import common from '@ohos.app.ability.common';
 import { MediaBean } from '../common/Bean/MediaBean';
 import { MediaHelper } from '../common/Bean/MediaHelper';
+import SpaceStateList from '../model/SpaceStateList';
+
 ///关于弹窗
 @CustomDialog
 struct About {
@@ -161,7 +163,7 @@ struct About {
 
 ///人脸录入里的重新录入弹窗
 @CustomDialog
-struct Facialinput {
+struct FacialInput {
   @Link mediaBean:MediaBean
   private mediaHelper: MediaHelper = new MediaHelper(getContext());
   @State luru:number=0
@@ -178,7 +180,6 @@ struct Facialinput {
         .height('15%')
         .onClick(()=>{
           this.controller.close()
-
         })
       Row(){
         Text().width("25%")
@@ -240,8 +241,6 @@ struct Facialinput {
           .onClick(()=> {
             this.controller.close()
           })
-
-
       }
       .justifyContent(FlexAlign.Center)
       .width('100%')
@@ -255,10 +254,6 @@ struct Facialinput {
 
     }.width("100%")
     .height("100%")
-
-
-
-
   }
   async handleClick(option: MediaOption) {
     let mediaBean: MediaBean;
@@ -277,11 +272,8 @@ struct Facialinput {
     }
 
     if (mediaBean) {
-
       this.mediaBean = mediaBean;
-
     }
-
   }
 }
 
@@ -297,7 +289,7 @@ struct Facerecognition {
   @State textValue: string = ''
   @State inputValue: string = ''
   aboutToDisappear() {
-    this.FacialinputController= undefined // 将dialogController置空
+    this.FacialInputController = undefined // 将dialogController置空
   }
   onCancel() {
     console.info('onCancel')
@@ -308,9 +300,9 @@ struct Facerecognition {
   existApp() {
     console.info(' existApp')
   }
-  /////人脸录入里的重新录入弹窗控制器
-  FacialinputController: CustomDialogController = new CustomDialogController({
-    builder: Facialinput({
+  //人脸录入里的重新录入弹窗控制器
+  FacialInputController: CustomDialogController = new CustomDialogController({
+    builder: FacialInput({
       mediaBean:this.mediaBean,
       cancel: this.onCancel,
       confirm: this.onAccept,
@@ -368,7 +360,7 @@ struct Facerecognition {
           .backgroundColor('#F1F3F5')
           .height('20%')
           .onClick(()=>{
-            this.FacialinputController.open()
+            this.FacialInputController.open()
           })
 
         }.width('50%')
@@ -390,15 +382,10 @@ struct Facerecognition {
         .height('30%')
         .onClick(()=>{
           this.controller.close()
-
         })
-
     }.width("100%")
     .height("100%")
-
     .backgroundColor('#4d000000')
-
-
   }
 }
 @Entry
@@ -426,8 +413,6 @@ export struct UserInfoSetView {
       confirm: this.onAccept,
       textValue: $textValue,
       inputValue: $inputValue,
-
-
     }),
 
     // gridCount: 3,
@@ -443,10 +428,7 @@ export struct UserInfoSetView {
       mediaBean:this.mediaBean,
       cancel: this.onCancel,
       confirm: this.onAccept,
-
-
     }),
-
     // gridCount: 3,
     cancel: this.existApp,
     //autoCancel: true,
@@ -460,11 +442,11 @@ export struct UserInfoSetView {
     Row(){
       Column({space:10}){
         Text()
-          .height('20%')
+          .height('18.6%')
         Image(this.mediaBean.localUrl)
           .width('267px')
-          .borderRadius(200)
           .height('267px')
+          .borderWidth(1)
         Text('王德发')
           .fontSize('51px')
           .fontColor('#e6000000')
@@ -472,157 +454,134 @@ export struct UserInfoSetView {
           .height('10%')
         Text('退出登录')
           .width('90%')
-          .height('9%')
-          .borderRadius(25)
+          .height('11.2%')
+          .borderRadius($r('app.float.robot_set_radius'))
           .textAlign(TextAlign.Center)
           .backgroundColor('#0f000000')
         Blank()
-
-
-
-      }.width('34%')
-
+      }
+      .width('34%')
       .height('100%')
+
       Column(){
         Text('用户')
           .fontColor('#e6000000')
           .width('100%')
           .height('7%')
-          .fontSize('32px')
-        Row(){
-          Column(){
-
-            Text('人脸识别')
-              .fontSize('32px')
-            Text('通过面部识别认证您的身份,快捷登录账号')
-              .fontSize('27px')
-              .fontWeight(FontWeight.Regular)
-
-          }
-          .alignItems(HorizontalAlign.Start)
-          .justifyContent(FlexAlign.Center)
-          .height('100%')
-          .width('80%')
-          Blank()
-          Toggle({ type: ToggleType.Switch,isOn: true })
-            .width('96px')
-            .height('53px')
-          Blank()
-
-
-        }.width('100%')
-        .height('16%')
-        .margin(5)
-        .backgroundColor("#ffff")
-        .borderRadius(25)
+          .fontSize($r('app.float.process_circulation_font_size'))
+          .fontColor($r('app.color.general_font_color'))
+          .fontWeight(FontWeight.Medium)
+          .opacity($r('app.float.general_font_opacity'))
 
-        .padding({left:10})
         Row(){
-          Column(){
-
+          Column({space: 5}){
             Text('保持登录')
-              .fontSize('32px')
+              .fontSize($r('app.float.card_title_font_size'))
+              .fontColor($r('app.color.general_font_color'))
+              .fontWeight(FontWeight.Medium)
+              .opacity($r('app.float.general_font_opacity'))
             Text('账号保持登录状态,直至手动退出')
-              .fontSize('27px')
+              .fontSize($r('app.float.robot_set_font_size'))
+              .fontColor($r('app.color.general_font_color'))
               .fontWeight(FontWeight.Regular)
-
+              .opacity($r('app.float.general_font_opacity'))
           }
           .alignItems(HorizontalAlign.Start)
           .justifyContent(FlexAlign.Center)
           .height('100%')
           .width('80%')
-          Blank()
-          Toggle({ type: ToggleType.Switch,isOn: true })
-            .width('96px')
-            .height('53px')
-          Blank()
-
-
+          Row() {
+            Toggle({ type: ToggleType.Switch,isOn: true })
+              .width('96px')
+              .height('53px')
+          }
+          .height('100%')
+          .width('20%')
+          .justifyContent(FlexAlign.End)
+          .padding({right: 5})
         }.width('100%')
-        .height('16%')
+        .height('16.3%')
         .margin(5)
-        .backgroundColor("#ffff")
-        .borderRadius(25)
-
+        .backgroundColor($r('app.color.general_card_background_color'))
+        .borderRadius($r('app.float.general_border_radius'))
         .padding({left:10})
-        Row(){
-          Column(){
 
-            Text('面部')
-              .fontSize('32px')
-            Text('管理用户面部信息')
-              .fontSize('27px')
+        Row(){
+          Column({space: 5}){
+            Text('技能')
+              .fontSize($r('app.float.card_title_font_size'))
+              .fontColor($r('app.color.general_font_color'))
+              .fontWeight(FontWeight.Medium)
+              .opacity($r('app.float.general_font_opacity'))
+            Text('查看你的技能,技能掌握情况将决定某些工序能否执行')
+              .fontSize($r('app.float.robot_set_font_size'))
+              .fontColor($r('app.color.general_font_color'))
               .fontWeight(FontWeight.Regular)
-
+              .opacity($r('app.float.general_font_opacity'))
           }
           .alignItems(HorizontalAlign.Start)
           .justifyContent(FlexAlign.Center)
           .height('100%')
           .width('80%')
-          Column(){
-            Image($r('app.media.jiaobiao'))
-              .width('27px')
-              .height('27px')
+          Row() {
+            Image($r('app.media.subscript_space'))
+              .height($r('app.float.card_subscript_new_size'))
+              .width($r('app.float.card_subscript_new_size'))
           }
-          .alignItems(HorizontalAlign.End)
+          .alignItems(VerticalAlign.Bottom)
           .justifyContent(FlexAlign.End)
-          .height('70%')
-          .width('17%')
-
-
+          .height('100%')
+          .width('20%')
         }.width('100%')
-        .height('16%')
+        .height('16.3%')
         .margin(5)
-        .backgroundColor("#ffff")
-        .borderRadius(25)
-
+        .backgroundColor($r('app.color.general_card_background_color'))
+        .borderRadius($r('app.float.general_border_radius'))
         .padding({left:10})
         .onClick(()=>{
           this.FacerecognitionController.open()
         })
+
         Text('其他')
           .width('100%')
-          .fontSize('32px')
+          .fontSize($r('app.float.process_circulation_font_size'))
+          .fontColor($r('app.color.general_font_color'))
+          .opacity($r('app.float.general_font_opacity'))
         Row(){
           Column(){
-
             Text('关于')
               .fontSize('32px')
-
-
           }
           .alignItems(HorizontalAlign.Start)
           .justifyContent(FlexAlign.Center)
           .height('100%')
           .width('80%')
-          Column(){
-            Image($r('app.media.jiaobiao'))
-              .width('27px')
-              .height('27px')
+          Row() {
+            Image($r('app.media.subscript_space'))
+              .height($r('app.float.card_subscript_new_size'))
+              .width($r('app.float.card_subscript_new_size'))
           }
-          .alignItems(HorizontalAlign.End)
+          .alignItems(VerticalAlign.Bottom)
           .justifyContent(FlexAlign.End)
-          .height('70%')
-          .width('17%')
-
-
+          .height('100%')
+          .width('20%')
         }.width('100%')
-        .height('16%')
+        .height('16.3%')
         .margin(5)
-        .backgroundColor("#ffff")
-        .borderRadius(25)
-
+        .backgroundColor($r('app.color.general_card_background_color'))
+        .borderRadius($r('app.float.general_border_radius'))
         .padding({left:10})
         .onClick(()=>{
           this.AboutDialogController.open()
         })
-      }.width('66%')
+
+      }
+      .width('66%')
       .padding(10)
       .height('100%')
     }
-
     .width('90%')
-    .height('84%')
+    .height('82%')
     .backgroundColor('#F1F3F5')
   }
 

+ 1 - 1
entry/src/main/resources/base/element/color.json

@@ -148,7 +148,7 @@
       "value": "#1A1A1A"
     },
     {
-      "name": "general_border_white_color",
+      "name": "general_border_black_color",
       "value": "#000000"
     }
   ]