huhao@jgai.com hace 1 mes
commit
083b29255d
Se han modificado 67 ficheros con 2649 adiciones y 0 borrados
  1. 1 0
      .gitattributes
  2. 11 0
      .gitignore
  3. 10 0
      AppScope/app.json5
  4. 8 0
      AppScope/resources/base/element/string.json
  5. BIN
      AppScope/resources/base/media/app_icon.png
  6. 49 0
      build-profile.json5
  7. 6 0
      entry/.gitignore
  8. 31 0
      entry/build-profile.json5
  9. 6 0
      entry/hvigorfile.ts
  10. 18 0
      entry/obfuscation-rules.txt
  11. 29 0
      entry/oh-package-lock.json5
  12. 14 0
      entry/oh-package.json5
  13. 69 0
      entry/src/main/ets/common/constants/BusinessConstant.ets
  14. 55 0
      entry/src/main/ets/common/util/TimeUtil.ets
  15. 43 0
      entry/src/main/ets/entryability/EntryAbility.ets
  16. 1353 0
      entry/src/main/ets/pages/Index.ets
  17. 9 0
      entry/src/main/ets/viewmodel/device/TempHumiditySensor.ets
  18. 6 0
      entry/src/main/ets/viewmodel/mqtt/MqttCmdData.ets
  19. 11 0
      entry/src/main/ets/viewmodel/mqtt/MqttDataItem.ets
  20. 6 0
      entry/src/main/ets/viewmodel/mqtt/MqttUploadData.ets
  21. 45 0
      entry/src/main/module.json5
  22. 123 0
      entry/src/main/resources/base/element/color.json
  23. 71 0
      entry/src/main/resources/base/element/font.json
  24. 56 0
      entry/src/main/resources/base/element/font_size.json
  25. 16 0
      entry/src/main/resources/base/element/string.json
  26. BIN
      entry/src/main/resources/base/media/icon.png
  27. BIN
      entry/src/main/resources/base/media/startIcon.png
  28. 3 0
      entry/src/main/resources/base/media/state_ai.svg
  29. 3 0
      entry/src/main/resources/base/media/state_ipc.svg
  30. 5 0
      entry/src/main/resources/base/media/state_microphone.svg
  31. 5 0
      entry/src/main/resources/base/media/state_voice.svg
  32. 3 0
      entry/src/main/resources/base/media/workshop_access_control.svg
  33. BIN
      entry/src/main/resources/base/media/workshop_background_image.png
  34. 50 0
      entry/src/main/resources/base/media/workshop_device_offline.svg
  35. 50 0
      entry/src/main/resources/base/media/workshop_device_online.svg
  36. 4 0
      entry/src/main/resources/base/media/workshop_light_control.svg
  37. BIN
      entry/src/main/resources/base/media/workshop_light_off.png
  38. BIN
      entry/src/main/resources/base/media/workshop_light_on.png
  39. 4 0
      entry/src/main/resources/base/media/workshop_power_consumption.svg
  40. 3 0
      entry/src/main/resources/base/media/workshop_refrigerate.svg
  41. 4 0
      entry/src/main/resources/base/media/workshop_robot_control.svg
  42. BIN
      entry/src/main/resources/base/media/workshop_robot_offline.png
  43. BIN
      entry/src/main/resources/base/media/workshop_robot_online.png
  44. 4 0
      entry/src/main/resources/base/media/workshop_shutdown.svg
  45. 3 0
      entry/src/main/resources/base/media/workshop_start_work.svg
  46. 5 0
      entry/src/main/resources/base/profile/main_pages.json
  47. 16 0
      entry/src/main/resources/en_US/element/string.json
  48. 16 0
      entry/src/main/resources/zh_CN/element/string.json
  49. 35 0
      entry/src/ohosTest/ets/test/Ability.test.ets
  50. 5 0
      entry/src/ohosTest/ets/test/List.test.ets
  51. 49 0
      entry/src/ohosTest/ets/testability/TestAbility.ets
  52. 17 0
      entry/src/ohosTest/ets/testability/pages/Index.ets
  53. 50 0
      entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets
  54. 37 0
      entry/src/ohosTest/module.json5
  55. 8 0
      entry/src/ohosTest/resources/base/element/color.json
  56. 16 0
      entry/src/ohosTest/resources/base/element/string.json
  57. BIN
      entry/src/ohosTest/resources/base/media/icon.png
  58. 5 0
      entry/src/ohosTest/resources/base/profile/test_pages.json
  59. 5 0
      entry/src/test/List.test.ets
  60. 33 0
      entry/src/test/LocalUnit.test.ets
  61. 22 0
      hvigor/hvigor-config.json5
  62. 1 0
      hvigor/hvigor-wrapper.js
  63. 6 0
      hvigorfile.ts
  64. 54 0
      hvigorw
  65. 54 0
      hvigorw.bat
  66. 15 0
      oh-package-lock.json5
  67. 13 0
      oh-package.json5

+ 1 - 0
.gitattributes

@@ -0,0 +1 @@
+.preview/*

+ 11 - 0
.gitignore

@@ -0,0 +1,11 @@
+/node_modules
+/oh_modules
+/local.properties
+/.idea
+**/build
+/.hvigor
+.cxx
+/.clangd
+/.clang-format
+/.clang-tidy
+**/.test

+ 10 - 0
AppScope/app.json5

@@ -0,0 +1,10 @@
+{
+  "app": {
+    "bundleName": "com.jg.myapplication",
+    "vendor": "example",
+    "versionCode": 1000000,
+    "versionName": "1.0.0",
+    "icon": "$media:app_icon",
+    "label": "$string:app_name"
+  }
+}

+ 8 - 0
AppScope/resources/base/element/string.json

@@ -0,0 +1,8 @@
+{
+  "string": [
+    {
+      "name": "app_name",
+      "value": "centralControl"
+    }
+  ]
+}

BIN
AppScope/resources/base/media/app_icon.png


+ 49 - 0
build-profile.json5

@@ -0,0 +1,49 @@
+{
+  "app": {
+    "signingConfigs": [
+      {
+        "name": "default",
+        "material": {
+          "certpath": "C:/Users/67381/.ohos/config/openharmony/default_centralControl_tgnum0HQTLufxwj4IivzQ0Yhicbqh_kDbVWuFrrkLjE=.cer",
+          "storePassword": "0000001BD857D7F0E7BEAEE48DB7E8AE8FF4252D4C3C2F3463FF872379E74F053C3C02A90723076FA3B81C",
+          "keyAlias": "debugKey",
+          "keyPassword": "0000001BE04414936DFF76CFF154E05B0D44411C41BD21833E65A10D67E7A3C7BCABF0BBA48AFC39C364E8",
+          "profile": "C:/Users/67381/.ohos/config/openharmony/default_centralControl_tgnum0HQTLufxwj4IivzQ0Yhicbqh_kDbVWuFrrkLjE=.p7b",
+          "signAlg": "SHA256withECDSA",
+          "storeFile": "C:/Users/67381/.ohos/config/openharmony/default_centralControl_tgnum0HQTLufxwj4IivzQ0Yhicbqh_kDbVWuFrrkLjE=.p12"
+        }
+      }
+    ],
+    "products": [
+      {
+        "name": "default",
+        "signingConfig": "default",
+        "compileSdkVersion": 10,
+        "compatibleSdkVersion": 10,
+        "runtimeOS": "OpenHarmony",
+      }
+    ],
+    "buildModeSet": [
+      {
+        "name": "debug",
+      },
+      {
+        "name": "release"
+      }
+    ]
+  },
+  "modules": [
+    {
+      "name": "entry",
+      "srcPath": "./entry",
+      "targets": [
+        {
+          "name": "default",
+          "applyToProducts": [
+            "default"
+          ]
+        }
+      ]
+    }
+  ]
+}

+ 6 - 0
entry/.gitignore

@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test

+ 31 - 0
entry/build-profile.json5

@@ -0,0 +1,31 @@
+{
+  "apiType": "stageMode",
+  "buildOption": {
+    "arkOptions": {
+      // "apPath": "./modules.ap"  /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
+    }
+  },
+  "buildOptionSet": [
+    {
+      "name": "release",
+      "arkOptions": {
+        "obfuscation": {
+          "ruleOptions": {
+            "enable": true,
+            "files": [
+              "./obfuscation-rules.txt"
+            ]
+          }
+        }
+      }
+    },
+  ],
+  "targets": [
+    {
+      "name": "default"
+    },
+    {
+      "name": "ohosTest",
+    }
+  ]
+}

+ 6 - 0
entry/hvigorfile.ts

@@ -0,0 +1,6 @@
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+    system: hapTasks,  /* Built-in plugin of Hvigor. It cannot be modified. */
+    plugins:[]         /* Custom plugin to extend the functionality of Hvigor. */
+}

+ 18 - 0
entry/obfuscation-rules.txt

@@ -0,0 +1,18 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+#   https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope

+ 29 - 0
entry/oh-package-lock.json5

@@ -0,0 +1,29 @@
+{
+  "lockfileVersion": 2,
+  "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
+  "specifiers": {
+    "@mcui/mccharts@^1.0.2": "@mcui/mccharts@1.0.2",
+    "@ohos/axios@2.2.1-rc.0": "@ohos/axios@2.2.1-rc.0",
+    "@ohos/mqtt@2.0.6": "@ohos/mqtt@2.0.6"
+  },
+  "packages": {
+    "@ohos/axios@2.2.1-rc.0": {
+      "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.1-rc.0.har",
+      "integrity": "sha512-owJh8oOd1i56vZGU7opjz8EwYVsiHtuFYCwTyYCLZYLyeCdn9+laWjDpNrCSDZktySyYCu9qmK9867XQ+8QVFg==",
+      "registryType": "ohpm"
+    },
+    "@mcui/mccharts@1.0.2": {
+      "resolved": "https://repo.harmonyos.com/ohpm/@mcui/mccharts/-/mccharts-1.0.2.har",
+      "integrity": "sha512-44hGTwZcsfFnny7nT/zMpWKFqXbaVmdlDbyeJIOlJwbglS/S3ypqhBdzbpj3aJrcMSd5FLFO0FrZGntph9HSIw==",
+      "registryType": "ohpm"
+    },
+    "@ohos/mqtt@2.0.6": {
+      "resolved": "https://repo.harmonyos.com/ohpm/@ohos/mqtt/-/mqtt-2.0.6.har",
+      "integrity": "sha512-2uZKhjM2JWo/eqAPjKIHK3zEa6J8Zp2qz89soY2i34podtcPm23DvP3VLI1HNa+0Tc8Y04RwSz3Gmedqe/OWsw==",
+      "dependencies": {
+        "libmqttasync.so": "file:./src/main/cpp/types/libmqttasync"
+      },
+      "registryType": "ohpm"
+    }
+  }
+}

+ 14 - 0
entry/oh-package.json5

@@ -0,0 +1,14 @@
+{
+  "name": "entry",
+  "version": "1.0.0",
+  "description": "Please describe the basic information.",
+  "main": "",
+  "author": "",
+  "license": "",
+  "dependencies": {
+    "@mcui/mccharts": "^1.0.2",
+    "@ohos/axios": "2.2.1-rc.0",
+    "@ohos/mqtt": "2.0.6"
+  }
+}
+

+ 69 - 0
entry/src/main/ets/common/constants/BusinessConstant.ets

@@ -0,0 +1,69 @@
+import HashMap from '@ohos.util.HashMap';
+
+export default class BusinessConstant {
+
+  static readonly  mqttSubscribeTopic: string = 'station100/data/devices';
+  static readonly  mqttSubscribeTopic2: string = 'station11/data/devices';
+  static readonly  mqttPublishTopic: string = 'station100/cmd/devices';
+  static readonly  mqttUrl: string = 'tcp://192.168.1.3';
+  // 每个clientId不重复
+  static readonly  mqttClientId: string = 'station100' + Date.now().toString(36);
+  static readonly  mqttUserName: string = '';
+  static readonly  mqttPassword: string = '';
+
+  static readonly attrMap: Map<string, string> = new Map([
+    ['LedRed', 'SSD'],
+    ['LedOrange', 'SSD'],
+    ['LedGreen', 'SSD'],
+    ['Buzzer', 'SSD'],
+    ['ExhaustFan', 'HYPYJ'],
+    ['SolderingCurrTemp', 'WKDLT'],
+    ['SolderingSetTemp', 'WKDLT'],
+    ['RingWearStatus', 'FJDJC'],
+
+    ['Temperature', 'WSDCGQ'],
+    ['Humidity', 'WSDCGQ'],
+
+    ['Charging1Set', 'PLC'],
+    ['Charging2Set', 'PLC'],
+    ['LED1Control', 'PLC'],
+    ['LED2Control', 'PLC'],
+    ['LED3Control', 'PLC'],
+    ['Assemble_500W_Control', 'PLC'],
+    ['Debugging_500W_Control', 'PLC'],
+    ['Stokinout_500W_Control', 'PLC'],
+    ['Inspection_500W_Control', 'PLC'],
+    ['Packing_500W_Control', 'PLC'],
+    ['Assemble_1000W_Control', 'PLC'],
+    ['Debugging_1000W_Control', 'PLC'],
+    ['Stokinout_1000W_Control', 'PLC'],
+    ['Inspection_1000W_Control', 'PLC'],
+    ['Packing_1000W_Control', 'PLC'],
+
+    ['Rgv1CurrStatus', 'RGV1'],
+    ['Rgv1CurrBatlevel', 'RGV1']
+  ]);
+
+  static readonly stationLightMap: Map<string, string[]> = new Map([
+    ['装调工位1', ['Assemble_500W_Control', 'Assemble_1000W_Control']],
+    ['装调工位2', ['Debugging_500W_Control', 'Debugging_1000W_Control']],
+    ['出入库工位', ['Stokinout_500W_Control', 'Stokinout_1000W_Control']],
+    ['检验工位', ['Inspection_500W_Control', 'Inspection_1000W_Control']],
+    ['包装工位', ['Packing_500W_Control', 'Packing_1000W_Control']],
+    ['仓储充电位1', ['Charging1Set']],
+    ['仓储充电位2', ['Charging2Set']],
+  ])
+}
+
+export enum DeviceType {
+  ThreeColourLight = 'SSD',
+  WeldFumeExtractor = 'HYPYJ',
+  ElectricSolderingIron = 'WKDLT',
+  ElectricScrewdriver = 'DDLSD',
+  AntiWristStrap = 'FJDJC',
+  CardReader = 'DKQ',
+  Lighting = 'ZM',
+  TempHumiditySensor = 'WSDCGQ',
+  PlcControl = 'PLC',
+  RGV1 = 'RGV1',
+}

+ 55 - 0
entry/src/main/ets/common/util/TimeUtil.ets

@@ -0,0 +1,55 @@
+class TimeUtil {
+
+  getCurrentDate(): string {
+    let dateTime = new Date()
+    let month: string = JSON.stringify(dateTime.getMonth() + 1)
+    let time = dateTime.getFullYear() + '-' + (dateTime.getMonth() + 1).toString().padStart(2, '0')
+      + '-' + (dateTime.getDate().toString().padStart(2, '0'))
+    return time
+  }
+
+  getCurrentTime(): string {
+    let dateTime = new Date()
+    let time = dateTime.getFullYear() + '-' + (dateTime.getMonth() + 1).toString().padStart(2, '0')
+      + '-' + (dateTime.getDate().toString().padStart(2, '0')) + ' ' +
+      (dateTime.getHours().toString().length == 1 ? '0' + dateTime.getHours() : dateTime.getHours()) + ':'
+      + (dateTime.getMinutes().toString().length == 1 ? '0' + dateTime.getMinutes() : dateTime.getMinutes()) + ':'
+      + (dateTime.getSeconds().toString().length == 1 ? '0'+ dateTime.getSeconds(): dateTime.getSeconds())
+    return time
+  }
+
+  getHourAndMinute(): string {
+    let dateTime = new Date()
+    let time = (dateTime.getHours().toString().length == 1 ? '0' + dateTime.getHours() : dateTime.getHours()) + ':'
+      + (dateTime.getMinutes().toString().length == 1 ? '0' + dateTime.getMinutes() : dateTime.getMinutes())
+    return time
+  }
+
+  getDateAndWeek(): string {
+    let dateTime = new Date()
+    let weekDay = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+    let time = ((dateTime.getMonth() + 1) < 10 ? ' ' + (dateTime.getMonth() + 1) : (dateTime.getMonth() + 1))
+      + '月' + (dateTime.getDate() < 10 ? dateTime.getDate().toString() + '日' + '  ' : dateTime.getDate().toString() + '日' + ' ')+
+      weekDay[dateTime.getDay()]
+    return time
+  }
+
+  //上午、下午、晚上
+  getTimePeriod(): string {
+    let currentTime = new Date();
+    let currentHour = currentTime.getHours();
+    let period: string;
+    if (currentHour < 12) {
+      period = "上午";
+    } else if (currentHour < 18) {
+      period = "下午";
+    } else {
+      period = "晚上";
+    };
+    return period;
+  }
+}
+
+let timeUtil = new TimeUtil();
+
+export default timeUtil as TimeUtil;

+ 43 - 0
entry/src/main/ets/entryability/EntryAbility.ets

@@ -0,0 +1,43 @@
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+import hilog from '@ohos.hilog';
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Want from '@ohos.app.ability.Want';
+import window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+  onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+  }
+
+  onDestroy(): void {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+  }
+
+  onWindowStageCreate(windowStage: window.WindowStage): void {
+    // Main window is created, set main page for this ability
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+    windowStage.loadContent('pages/Index', (err) => {
+      if (err.code) {
+        hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+        return;
+      }
+      hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+    });
+  }
+
+  onWindowStageDestroy(): void {
+    // Main window is destroyed, release UI related resources
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+  }
+
+  onForeground(): void {
+    // Ability has brought to foreground
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+  }
+
+  onBackground(): void {
+    // Ability has back to background
+    hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+  }
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1353 - 0
entry/src/main/ets/pages/Index.ets


+ 9 - 0
entry/src/main/ets/viewmodel/device/TempHumiditySensor.ets

@@ -0,0 +1,9 @@
+//温湿度传感器
+export default class TempHumiditySensor {
+  // 实际温度 = 当前温度/10,单位°c
+  Temperature?: number
+  // 实际湿度 = 当前湿度/10,单位%
+  Humidity?: number
+  // 在线状态(1:在线 0:离线)
+  OnlineStatus?: number
+}

+ 6 - 0
entry/src/main/ets/viewmodel/mqtt/MqttCmdData.ets

@@ -0,0 +1,6 @@
+//mqtt控制数据格式
+import MqttDataItem from './MqttDataItem'
+
+export default class MqttCmdData {
+  w?: MqttDataItem[]
+}

+ 11 - 0
entry/src/main/ets/viewmodel/mqtt/MqttDataItem.ets

@@ -0,0 +1,11 @@
+/*
+ * mqtt上传数据项
+ * */
+export default class MqttDataItem {
+  //采集属性编码
+  tag?: string
+  //采集属性值
+  value?: number
+  //采集属性所属设备类型
+  deviceType?: string
+}

+ 6 - 0
entry/src/main/ets/viewmodel/mqtt/MqttUploadData.ets

@@ -0,0 +1,6 @@
+//mqtt上传数据格式
+import MqttDataItem from './MqttDataItem'
+
+export default class MqttUploadData {
+  d?: MqttDataItem[]
+}

+ 45 - 0
entry/src/main/module.json5

@@ -0,0 +1,45 @@
+{
+  "module": {
+    "name": "entry",
+    "type": "entry",
+    "description": "$string:module_desc",
+    "mainElement": "EntryAbility",
+    "deviceTypes": [
+      "default",
+      "tablet"
+    ],
+    "deliveryWithInstall": true,
+    "installationFree": false,
+    "pages": "$profile:main_pages",
+    "abilities": [
+      {
+        "name": "EntryAbility",
+        "srcEntry": "./ets/entryability/EntryAbility.ets",
+        "description": "$string:EntryAbility_desc",
+        "icon": "$media:app_icon",
+        "label": "$string:EntryAbility_label",
+        "startWindowIcon": "$media:startIcon",
+        "startWindowBackground": "$color:start_window_background",
+        "exported": true,
+        "skills": [
+          {
+            "entities": [
+              "entity.system.home"
+            ],
+            "actions": [
+              "action.system.home"
+            ]
+          }
+        ]
+      }
+    ],
+    "requestPermissions":[
+      {
+        "name": "ohos.permission.INTERNET"
+      },
+      {
+        "name": "ohos.permission.STARTUP_APPLICATION"
+      }
+    ]
+  }
+}

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

@@ -0,0 +1,123 @@
+{
+  "color": [
+    {
+      "name": "start_window_background",
+      "value": "#FFFFFF"
+    },
+    {
+      "name": "FFFFFF",
+      "value": "#FFFFFF"
+    },
+    {
+      "name": "000000",
+      "value": "#000000"
+    },
+    {
+      "name": "0A84FF",
+      "value": "#0A84FF"
+    },
+    {
+      "name": "30D158",
+      "value": "#30D158"
+    },
+    {
+      "name": "73C3FF",
+      "value": "#73C3FF"
+    },
+    {
+      "name": "1050FF",
+      "value": "#1050FF"
+    },
+    {
+      "name": "FF453A",
+      "value": "#FF453A"
+    },
+    {
+      "name": "E5E5E5",
+      "value": "#E5E5E5"
+    },
+    {
+      "name": "191919",
+      "value": "#191919"
+    },
+    {
+      "name": "FF9F0A",
+      "value": "#FF9F0A"
+    },
+    {
+      "name": "333333",
+      "value": "#333333"
+    },
+    {
+      "name": "20FFFFFF",
+      "value": "#33FFFFFF"
+    },
+    {
+      "name": "10FFFFFF",
+      "value": "#19FFFFFF"
+    },
+    {
+      "name": "90FFFFFF",
+      "value": "#E5FFFFFF"
+    },
+    {
+      "name": "60FFFFFF",
+      "value": "#99FFFFFF"
+    },
+    {
+      "name": "30FFFFFF",
+      "value": "#4DFFFFFF"
+    },
+    {
+      "name": "40FFFFFF",
+      "value": "#66FFFFFF"
+    },
+    {
+      "name": "90000000",
+      "value": "#E5000000"
+    },
+    {
+      "name": "60000000",
+      "value": "#E5000000"
+    },
+    {
+      "name": "99000000",
+      "value": "#99000000"
+    },
+    {
+      "name": "FFD60A",
+      "value": "#FFD60A"
+    },
+    {
+      "name": "D9D9D9",
+      "value": "#D9D9D9"
+    },
+    {
+      "name": "20FFD60A",
+      "value": "#33FFD60A"
+    },
+    {
+      "name": "64BB5C",
+      "value": "#64BB5C"
+    },
+    {
+      "name": "2064BB5C",
+      "value": "#3364BB5C"
+    },
+    {
+      "name": "2A2A2A",
+      "value": "#2A2A2A"
+    },
+    {
+      "name": "007AFF",
+      "value": "#007AFF"
+    },
+    {
+      "name": "2030D158",
+      "value": "#3330D158"
+    },{
+      "name": "15FFFFFF",
+      "value": "#26FFFFFF"
+    }
+  ]
+}

+ 71 - 0
entry/src/main/resources/base/element/font.json

@@ -0,0 +1,71 @@
+{
+  "float": [
+    {
+      "name": "virtualSize_20",
+      "value": "30vp"
+    },
+    {
+      "name": "virtualSize_9_6",
+      "value": "14.4vp"
+    },
+    {
+      "name": "virtualSize_19_2",
+      "value": "28.8vp"
+    },
+    {
+      "name": "virtualSize_16_8",
+      "value": "25.2vp"
+    },
+    {
+      "name": "virtualSize_6_4",
+      "value": "9.6vp"
+    },
+    {
+      "name": "virtualSize_7_2",
+      "value": "10.8vp"
+    },
+    {
+      "name": "virtualSize_58",
+      "value": "87vp"
+    },{
+      "name": "virtualSize_46",
+      "value": "69vp"
+    },
+    {
+      "name": "virtualSize_4_8",
+      "value": "7.2vp"
+    },
+    {
+      "name": "virtualSize_36",
+      "value": "54vp"
+    },
+    {
+      "name": "virtualSize_48",
+      "value": "72vp"
+    },
+    {
+      "name": "virtualSize_60",
+      "value": "90vp"
+    },
+    {
+      "name": "virtualSize_120",
+      "value": "180vp"
+    },
+    {
+      "name": "virtualSize_2",
+      "value": "3vp"
+    },
+    {
+      "name": "virtualSize_40",
+      "value": "60vp"
+    },
+    {
+      "name": "virtualSize_152",
+      "value": "228vp"
+    },
+    {
+      "name": "virtualSize_42",
+      "value": "63vp"
+    }
+  ]
+}

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

@@ -0,0 +1,56 @@
+{
+  "float": [
+    {
+      "name": "fontSize_38",
+      "value": "25.3fp"
+    },
+    {
+      "name": "fontSize_14",
+      "value": "21fp"
+    },
+    {
+      "name": "fontSize_12",
+      "value": "18fp"
+    },
+    {
+      "name": "fontSize_10",
+      "value": "15fp"
+    },
+    {
+      "name": "fontSize_8",
+      "value": "12fp"
+    },
+    {
+      "name": "fontSize_7",
+      "value": "10.5fp"
+    },
+    {
+      "name": "fontSize_6",
+      "value": "9fp"
+    },
+    {
+      "name": "fontSize_6_4",
+      "value": "9.6fp"
+    },
+    {
+      "name": "fontSize_28",
+      "value": "42fp"
+    },
+    {
+      "name": "fontSize_15_2",
+      "value": "22.8fp"
+    },
+    {
+      "name": "fontSize_19_2",
+      "value": "28.8fp"
+    },
+    {
+      "name": "fontSize_9_6",
+      "value": "14.4fp"
+    },
+    {
+      "name": "fontSize_4_8",
+      "value": "7.2fp"
+    }
+  ]
+}

+ 16 - 0
entry/src/main/resources/base/element/string.json

@@ -0,0 +1,16 @@
+{
+  "string": [
+    {
+      "name": "module_desc",
+      "value": "module description"
+    },
+    {
+      "name": "EntryAbility_desc",
+      "value": "description"
+    },
+    {
+      "name": "EntryAbility_label",
+      "value": "label"
+    }
+  ]
+}

BIN
entry/src/main/resources/base/media/icon.png


BIN
entry/src/main/resources/base/media/startIcon.png


+ 3 - 0
entry/src/main/resources/base/media/state_ai.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path d="M19.832 3.5a1.308 1.308 0 0 0-1.308 1.308v14.716a1.308 1.308 0 1 0 2.617 0V4.809A1.308 1.308 0 0 0 19.833 3.5Zm-9.406.762c-.48-1.045-1.98-1.007-2.404.063L2.592 17.97a1.309 1.309 0 1 0 2.433.968l1.333-3.349c.023.001.044.013.068.013h6.33l1.56 3.397a1.308 1.308 0 0 0 2.377-1.092L10.426 4.262Zm-3.034 8.721L9.324 8.13l2.23 4.853H7.391Z"/>
+</svg>

+ 3 - 0
entry/src/main/resources/base/media/state_ipc.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path fill-rule="evenodd" d="M4.5 3h15A1.5 1.5 0 0 1 21 4.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 19.5v-15A1.5 1.5 0 0 1 4.5 3Zm12.75 4.5a.75.75 0 0 0-1.5 0v1.25h-1.5V7.5a.75.75 0 0 0-1.5 0v1.25h-1.5V7.5a.75.75 0 0 0-1.5 0v1.25h-1.5V7.5a.75.75 0 0 0-1.5 0v1.293a.75.75 0 0 0-.5.707v4c0 .414.336.75.75.75h1.75v2.25c0 .414.336.75.75.75h5a.75.75 0 0 0 .75-.75v-2.25H17a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 0-.5-.707V7.5Z" clip-rule="evenodd"/>
+</svg>

+ 5 - 0
entry/src/main/resources/base/media/state_microphone.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path d="M15.5 5.5a3.5 3.5 0 1 0-7 0V12a3.5 3.5 0 1 0 7 0V5.5Z"/>
+  <path fill-rule="evenodd" d="M4.5 10.75a.75.75 0 0 1 .75.75 6.75 6.75 0 0 0 13.5 0 .75.75 0 0 1 1.5 0 8.25 8.25 0 1 1-16.5 0 .75.75 0 0 1 .75-.75Z" clip-rule="evenodd"/>
+  <path fill-rule="evenodd" d="M12 18.25a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 .75-.75Z" clip-rule="evenodd"/>
+</svg>

+ 5 - 0
entry/src/main/resources/base/media/state_voice.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path fill-rule="evenodd" d="M5.48 17.17a14.283 14.283 0 0 0 1.613 2.057C8.218 20.41 9.93 21.75 12 21.75a.75.75 0 0 0 .75-.75V3a.75.75 0 0 0-.75-.75c-2.065 0-3.776 1.315-4.902 2.482a14.101 14.101 0 0 0-1.614 2.023H3a1.75 1.75 0 0 0-1.75 1.75v6.914c0 .967.784 1.75 1.75 1.75h2.48Z" clip-rule="evenodd"/>
+  <path d="M16.5 6.94a.75.75 0 0 0-1.06.06l.03.53.03.53c.252.23.533.533.736.812A5.285 5.285 0 0 1 17.25 12a5.287 5.287 0 0 1-.997 3.106 5.21 5.21 0 0 1-.752.835.75.75 0 1 0 .999 1.118 6.69 6.69 0 0 0 .969-1.075A6.785 6.785 0 0 0 18.75 12a6.786 6.786 0 0 0-1.302-4.013 6.702 6.702 0 0 0-.948-1.046Z"/>
+  <path d="M15.44 7a.75.75 0 0 0 .06 1.06l-.03-.53-.03-.53Zm1.678 13.593A9.995 9.995 0 0 0 22 12a9.994 9.994 0 0 0-4.747-8.51"/>
+</svg>

+ 3 - 0
entry/src/main/resources/base/media/workshop_access_control.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path fill-opacity=".9" fill-rule="evenodd" d="M4.5 6A1.5 1.5 0 0 1 6 4.5h36A1.5 1.5 0 0 1 43.5 6v36a1.5 1.5 0 0 1-1.5 1.5H6A1.5 1.5 0 0 1 4.5 42V6Zm10.743 1.5 9.231 3.077A1.5 1.5 0 0 1 25.5 12v24a1.5 1.5 0 0 1-1.026 1.423l-9.23 3.077H40.5v-33H15.243ZM7.5 39.919V8.08l15 5v21.84l-15 5ZM18 20.5a1.5 1.5 0 0 1 1.5 1.5v4a1.5 1.5 0 0 1-3 0v-4a1.5 1.5 0 0 1 1.5-1.5Z" clip-rule="evenodd"/>
+</svg>

BIN
entry/src/main/resources/base/media/workshop_background_image.png


+ 50 - 0
entry/src/main/resources/base/media/workshop_device_offline.svg

@@ -0,0 +1,50 @@
+<svg width="280" height="138" viewBox="0 0 280 138" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 16C0 7.16344 7.16344 0 16 0L180.893 0C185.602 0 190.072 2.07429 193.112 5.67034L197.897 11.3297C200.937 14.9257 205.406 17 210.115 17H264C272.837 17 280 24.1634 280 33V122C280 130.837 272.837 138 264 138H16C7.16344 138 0 130.837 0 122V16Z" fill="white" fill-opacity="0.1"/>
+<path d="M199 1H204L215 14H210L199 1Z" fill="url(#paint0_linear_520_504)"/>
+<path d="M207 1H212L223 14H218L207 1Z" fill="url(#paint1_linear_520_504)"/>
+<path d="M215 1H220L231 14H226L215 1Z" fill="url(#paint2_linear_520_504)"/>
+<path d="M223 1H228L239 14H234L223 1Z" fill="url(#paint3_linear_520_504)"/>
+<path d="M231 1H236L247 14H242L231 1Z" fill="url(#paint4_linear_520_504)"/>
+<path d="M239 1H244L255 14H250L239 1Z" fill="url(#paint5_linear_520_504)"/>
+<path d="M247 1H252L263 14H258L247 1Z" fill="url(#paint6_linear_520_504)"/>
+<path d="M255.5 1H260.5L271.5 14H266.5L255.5 1Z" fill="url(#paint7_linear_520_504)"/>
+<path d="M264 1H269L280 14H275L264 1Z" fill="url(#paint8_linear_520_504)"/>
+<defs>
+<linearGradient id="paint0_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint1_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint2_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint3_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint4_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint5_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint6_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint7_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint8_linear_520_504" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>

+ 50 - 0
entry/src/main/resources/base/media/workshop_device_online.svg

@@ -0,0 +1,50 @@
+<svg width="280" height="138" viewBox="0 0 280 138" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 16C0 7.16344 7.16344 0 16 0L180.893 0C185.602 0 190.072 2.07429 193.112 5.67034L197.897 11.3297C200.937 14.9257 205.406 17 210.115 17H264C272.837 17 280 24.1634 280 33V122C280 130.837 272.837 138 264 138H16C7.16344 138 0 130.837 0 122V16Z" fill="white" fill-opacity="0.2"/>
+<path d="M199 1H204L215 14H210L199 1Z" fill="url(#paint0_linear_520_485)"/>
+<path d="M207 1H212L223 14H218L207 1Z" fill="url(#paint1_linear_520_485)"/>
+<path d="M215 1H220L231 14H226L215 1Z" fill="url(#paint2_linear_520_485)"/>
+<path d="M223 1H228L239 14H234L223 1Z" fill="url(#paint3_linear_520_485)"/>
+<path d="M231 1H236L247 14H242L231 1Z" fill="url(#paint4_linear_520_485)"/>
+<path d="M239 1H244L255 14H250L239 1Z" fill="url(#paint5_linear_520_485)"/>
+<path d="M247 1H252L263 14H258L247 1Z" fill="url(#paint6_linear_520_485)"/>
+<path d="M255.5 1H260.5L271.5 14H266.5L255.5 1Z" fill="url(#paint7_linear_520_485)"/>
+<path d="M264 1H269L280 14H275L264 1Z" fill="url(#paint8_linear_520_485)"/>
+<defs>
+<linearGradient id="paint0_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint1_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint2_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint3_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint4_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint5_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint6_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint7_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+<linearGradient id="paint8_linear_520_485" x1="199" y1="7.5" x2="280" y2="7.5" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.2"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 4 - 0
entry/src/main/resources/base/media/workshop_light_control.svg


BIN
entry/src/main/resources/base/media/workshop_light_off.png


BIN
entry/src/main/resources/base/media/workshop_light_on.png


+ 4 - 0
entry/src/main/resources/base/media/workshop_power_consumption.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path fill-rule="evenodd" d="M10 8.5a.5.5 0 0 0-.5.5v33a.5.5 0 0 0 .5.5h28a.5.5 0 0 0 .5-.5V9a.5.5 0 0 0-.5-.5h-5.5V10a1.5 1.5 0 0 1-1.5 1.5H17a1.5 1.5 0 0 1-1.5-1.5V8.5H10Zm8.5 0V7A1.5 1.5 0 0 0 17 5.5h-7A3.5 3.5 0 0 0 6.5 9v33a3.5 3.5 0 0 0 3.5 3.5h28a3.5 3.5 0 0 0 3.5-3.5V9A3.5 3.5 0 0 0 38 5.5h-7A1.5 1.5 0 0 0 29.5 7v1.5h-11Z" clip-rule="evenodd"/>
+  <path fill-rule="evenodd" d="M15.5 4A1.5 1.5 0 0 1 17 2.5h14A1.5 1.5 0 0 1 32.5 4v6a1.5 1.5 0 0 1-1.5 1.5H17a1.5 1.5 0 0 1-1.5-1.5V4Zm3 1.5v3h11v-3h-11Zm9.56 12.44a1.5 1.5 0 0 1 0 2.12l-5.44 5.441h6.384a1.5 1.5 0 0 1 1.06 2.561l-8.003 8a1.5 1.5 0 0 1-2.121-2.121l5.442-5.44H19a1.5 1.5 0 0 1-1.06-2.56l7.999-8.002a1.5 1.5 0 0 1 2.121 0Z" clip-rule="evenodd"/>
+</svg>

+ 3 - 0
entry/src/main/resources/base/media/workshop_refrigerate.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path fill-opacity=".9" fill-rule="evenodd" d="M19.5 7A1.5 1.5 0 0 1 21 5.5h3a5.5 5.5 0 0 1 0 11H8a1.5 1.5 0 0 1 0-3h16a2.5 2.5 0 0 0 0-5h-3A1.5 1.5 0 0 1 19.5 7Zm15 10a1.5 1.5 0 0 1 1.5-1.5h2a5.5 5.5 0 0 1 0 11H6a1.5 1.5 0 0 1 0-3h32a2.5 2.5 0 0 0 0-5h-2a1.5 1.5 0 0 1-1.5-1.5Zm-22 16a1.5 1.5 0 0 1 1.5-1.5h15a5.5 5.5 0 0 1 0 11h-3a1.5 1.5 0 0 1 0-3h3a2.5 2.5 0 0 0 0-5H14a1.5 1.5 0 0 1-1.5-1.5Z" clip-rule="evenodd"/>
+</svg>

+ 4 - 0
entry/src/main/resources/base/media/workshop_robot_control.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path fill-rule="evenodd" d="M7.8 7.5a.3.3 0 0 0-.3.3v28.8a.3.3 0 0 0 .3.3h32.4a.3.3 0 0 0 .3-.3V7.8a.3.3 0 0 0-.3-.3H7.8Zm-3.3.3a3.3 3.3 0 0 1 3.3-3.3h32.4a3.3 3.3 0 0 1 3.3 3.3v28.8a3.3 3.3 0 0 1-3.3 3.3H7.8a3.3 3.3 0 0 1-3.3-3.3V7.8Z" clip-rule="evenodd"/>
+  <path fill-rule="evenodd" d="M4.5 38.4A1.5 1.5 0 0 1 6 36.9h7.2a1.5 1.5 0 0 1 1.5 1.5V42a1.5 1.5 0 0 1-1.5 1.5H6A1.5 1.5 0 0 1 4.5 42v-3.6Zm3 1.5v.6h4.2v-.6H7.5Zm25.8-1.5a1.5 1.5 0 0 1 1.5-1.5H42a1.5 1.5 0 0 1 1.5 1.5V42a1.5 1.5 0 0 1-1.5 1.5h-7.2a1.5 1.5 0 0 1-1.5-1.5v-3.6Zm3 1.5v.6h4.2v-.6h-4.2ZM10.5 15.6H12v3.9a1.5 1.5 0 0 1-3 0v-3.9h1.5Zm27 0H39v3.9a1.5 1.5 0 0 1-3 0v-3.9h1.5Zm-30-1.5v-1.5h33v3h-33v-1.5Z" clip-rule="evenodd"/>
+</svg>

BIN
entry/src/main/resources/base/media/workshop_robot_offline.png


BIN
entry/src/main/resources/base/media/workshop_robot_online.png


+ 4 - 0
entry/src/main/resources/base/media/workshop_shutdown.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path fill-rule="evenodd" d="M2.5 24C2.5 12.126 12.126 2.5 24 2.5S45.5 12.126 45.5 24 35.874 45.5 24 45.5 2.5 35.874 2.5 24ZM24 5.5C13.783 5.5 5.5 13.783 5.5 24S13.783 42.5 24 42.5 42.5 34.217 42.5 24 34.217 5.5 24 5.5Z" clip-rule="evenodd"/>
+  <path fill-rule="evenodd" d="M13.94 13.94a1.5 1.5 0 0 1 2.12 0l18 18a1.5 1.5 0 0 1-2.12 2.12l-18-18a1.5 1.5 0 0 1 0-2.12Z" clip-rule="evenodd"/>
+</svg>

+ 3 - 0
entry/src/main/resources/base/media/workshop_start_work.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path fill-rule="evenodd" d="M9.252 4.7a1.5 1.5 0 0 1 1.501.003l31 18a1.5 1.5 0 0 1 0 2.594l-31 18A1.5 1.5 0 0 1 8.5 42V6a1.5 1.5 0 0 1 .752-1.3ZM11.5 8.605v30.79L38.013 24 11.5 8.605Z" clip-rule="evenodd"/>
+</svg>

+ 5 - 0
entry/src/main/resources/base/profile/main_pages.json

@@ -0,0 +1,5 @@
+{
+  "src": [
+    "pages/Index"
+  ]
+}

+ 16 - 0
entry/src/main/resources/en_US/element/string.json

@@ -0,0 +1,16 @@
+{
+  "string": [
+    {
+      "name": "module_desc",
+      "value": "module description"
+    },
+    {
+      "name": "EntryAbility_desc",
+      "value": "description"
+    },
+    {
+      "name": "EntryAbility_label",
+      "value": "label"
+    }
+  ]
+}

+ 16 - 0
entry/src/main/resources/zh_CN/element/string.json

@@ -0,0 +1,16 @@
+{
+  "string": [
+    {
+      "name": "module_desc",
+      "value": "模块描述"
+    },
+    {
+      "name": "EntryAbility_desc",
+      "value": "description"
+    },
+    {
+      "name": "EntryAbility_label",
+      "value": "中控"
+    }
+  ]
+}

+ 35 - 0
entry/src/ohosTest/ets/test/Ability.test.ets

@@ -0,0 +1,35 @@
+import hilog from '@ohos.hilog';
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function abilityTest() {
+  describe('ActsAbilityTest', () => {
+    // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+    beforeAll(() => {
+      // Presets an action, which is performed only once before all test cases of the test suite start.
+      // This API supports only one parameter: preset action function.
+    })
+    beforeEach(() => {
+      // Presets an action, which is performed before each unit test case starts.
+      // The number of execution times is the same as the number of test cases defined by **it**.
+      // This API supports only one parameter: preset action function.
+    })
+    afterEach(() => {
+      // Presets a clear action, which is performed after each unit test case ends.
+      // The number of execution times is the same as the number of test cases defined by **it**.
+      // This API supports only one parameter: clear action function.
+    })
+    afterAll(() => {
+      // Presets a clear action, which is performed after all test cases of the test suite end.
+      // This API supports only one parameter: clear action function.
+    })
+    it('assertContain', 0, () => {
+      // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+      hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
+      let a = 'abc';
+      let b = 'b';
+      // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+      expect(a).assertContain(b);
+      expect(a).assertEqual(a);
+    })
+  })
+}

+ 5 - 0
entry/src/ohosTest/ets/test/List.test.ets

@@ -0,0 +1,5 @@
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+  abilityTest();
+}

+ 49 - 0
entry/src/ohosTest/ets/testability/TestAbility.ets

@@ -0,0 +1,49 @@
+import UIAbility from '@ohos.app.ability.UIAbility';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import hilog from '@ohos.hilog';
+import { Hypium } from '@ohos/hypium';
+import testsuite from '../test/List.test';
+import window from '@ohos.window';
+import Want from '@ohos.app.ability.Want';
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+
+export default class TestAbility extends UIAbility {
+  onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
+    hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
+    hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? '');
+    let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator;
+    abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+    let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs;
+    abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
+    hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
+    Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
+  }
+
+  onDestroy() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
+  }
+
+  onWindowStageCreate(windowStage: window.WindowStage) {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
+    windowStage.loadContent('testability/pages/Index', (err) => {
+      if (err.code) {
+        hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+        return;
+      }
+      hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+    });
+  }
+
+  onWindowStageDestroy() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
+  }
+
+  onForeground() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
+  }
+
+  onBackground() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
+  }
+}

+ 17 - 0
entry/src/ohosTest/ets/testability/pages/Index.ets

@@ -0,0 +1,17 @@
+@Entry
+@Component
+struct Index {
+  @State message: string = 'Hello World';
+
+  build() {
+    Row() {
+      Column() {
+        Text(this.message)
+          .fontSize(50)
+          .fontWeight(FontWeight.Bold)
+      }
+      .width('100%')
+    }
+    .height('100%')
+  }
+}

+ 50 - 0
entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets

@@ -0,0 +1,50 @@
+import hilog from '@ohos.hilog';
+import TestRunner from '@ohos.application.testRunner';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import Want from '@ohos.app.ability.Want';
+
+let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator | undefined = undefined
+let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs | undefined = undefined
+
+async function onAbilityCreateCallback() {
+  hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
+}
+
+async function addAbilityMonitorCallback(err : Error) {
+  hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
+}
+
+export default class OpenHarmonyTestRunner implements TestRunner {
+  constructor() {
+  }
+
+  onPrepare() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
+  }
+
+  async onRun() {
+    hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
+    abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
+    abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
+    const bundleName = abilityDelegatorArguments.bundleName;
+    const testAbilityName = 'TestAbility';
+    const moduleName = abilityDelegatorArguments.parameters['-m'];
+    let lMonitor: AbilityDelegatorRegistry.AbilityMonitor = {
+      abilityName: testAbilityName,
+      onAbilityCreate: onAbilityCreateCallback,
+      moduleName: moduleName
+    };
+    abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
+    const want: Want = {
+      bundleName: bundleName,
+      abilityName: testAbilityName,
+      moduleName: moduleName
+    };
+    abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+    abilityDelegator.startAbility(want, (err, data) => {
+      hilog.info(0x0000, 'testTag', 'startAbility : err : %{public}s', JSON.stringify(err) ?? '');
+      hilog.info(0x0000, 'testTag', 'startAbility : data : %{public}s',JSON.stringify(data) ?? '');
+    })
+    hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end');
+  }
+}

+ 37 - 0
entry/src/ohosTest/module.json5

@@ -0,0 +1,37 @@
+{
+  "module": {
+    "name": "entry_test",
+    "type": "feature",
+    "description": "$string:module_test_desc",
+    "mainElement": "TestAbility",
+    "deviceTypes": [
+      "default",
+      "tablet"
+    ],
+    "deliveryWithInstall": true,
+    "installationFree": false,
+    "pages": "$profile:test_pages",
+    "abilities": [
+      {
+        "name": "TestAbility",
+        "srcEntry": "./ets/testability/TestAbility.ets",
+        "description": "$string:TestAbility_desc",
+        "icon": "$media:app_icon",
+        "label": "$string:TestAbility_label",
+        "exported": true,
+        "startWindowIcon": "$media:app_icon",
+        "startWindowBackground": "$color:start_window_background",
+        "skills": [
+          {
+            "actions": [
+              "action.system.home"
+            ],
+            "entities": [
+              "entity.system.home"
+            ]
+          }
+        ]
+      }
+    ]
+  }
+}

+ 8 - 0
entry/src/ohosTest/resources/base/element/color.json

@@ -0,0 +1,8 @@
+{
+  "color": [
+    {
+      "name": "start_window_background",
+      "value": "#FFFFFF"
+    }
+  ]
+}

+ 16 - 0
entry/src/ohosTest/resources/base/element/string.json

@@ -0,0 +1,16 @@
+{
+  "string": [
+    {
+      "name": "module_test_desc",
+      "value": "test ability description"
+    },
+    {
+      "name": "TestAbility_desc",
+      "value": "the test ability"
+    },
+    {
+      "name": "TestAbility_label",
+      "value": "test label"
+    }
+  ]
+}

BIN
entry/src/ohosTest/resources/base/media/icon.png


+ 5 - 0
entry/src/ohosTest/resources/base/profile/test_pages.json

@@ -0,0 +1,5 @@
+{
+  "src": [
+    "testability/pages/Index"
+  ]
+}

+ 5 - 0
entry/src/test/List.test.ets

@@ -0,0 +1,5 @@
+import localUnitTest from './LocalUnit.test';
+
+export default function testsuite() {
+  localUnitTest();
+}

+ 33 - 0
entry/src/test/LocalUnit.test.ets

@@ -0,0 +1,33 @@
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function localUnitTest() {
+  describe('localUnitTest',() => {
+    // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+    beforeAll(() => {
+      // Presets an action, which is performed only once before all test cases of the test suite start.
+      // This API supports only one parameter: preset action function.
+    });
+    beforeEach(() => {
+      // Presets an action, which is performed before each unit test case starts.
+      // The number of execution times is the same as the number of test cases defined by **it**.
+      // This API supports only one parameter: preset action function.
+    });
+    afterEach(() => {
+      // Presets a clear action, which is performed after each unit test case ends.
+      // The number of execution times is the same as the number of test cases defined by **it**.
+      // This API supports only one parameter: clear action function.
+    });
+    afterAll(() => {
+      // Presets a clear action, which is performed after all test cases of the test suite end.
+      // This API supports only one parameter: clear action function.
+    });
+    it('assertContain', 0, () => {
+      // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+      let a = 'abc';
+      let b = 'b';
+      // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+      expect(a).assertContain(b);
+      expect(a).assertEqual(a);
+    });
+  });
+}

+ 22 - 0
hvigor/hvigor-config.json5

@@ -0,0 +1,22 @@
+{
+  "hvigorVersion": "3.2.4",
+  "dependencies": {
+    "@ohos/hvigor-ohos-plugin": "3.2.4"
+  },
+  "execution": {
+    // "analyze": "default",                    /* Define the build analyze mode. Value: [ "default" | "verbose" | false ]. Default: "default" */
+    // "daemon": true,                          /* Enable daemon compilation. Value: [ true | false ]. Default: true */
+    // "incremental": true,                     /* Enable incremental compilation. Value: [ true | false ]. Default: true */
+    // "parallel": true,                        /* Enable parallel compilation. Value: [ true | false ]. Default: true */
+    // "typeCheck": false,                      /* Enable typeCheck. Value: [ true | false ]. Default: false */
+  },
+  "logging": {
+    // "level": "info"                          /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+  },
+  "debugging": {
+    // "stacktrace": false                      /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
+  },
+  "nodeOptions": {
+    // "maxOldSpaceSize": 4096                  /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process */
+  }
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
hvigor/hvigor-wrapper.js


+ 6 - 0
hvigorfile.ts

@@ -0,0 +1,6 @@
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+    system: appTasks,  /* Built-in plugin of Hvigor. It cannot be modified. */
+    plugins:[]         /* Custom plugin to extend the functionality of Hvigor. */
+}

+ 54 - 0
hvigorw

@@ -0,0 +1,54 @@
+#!/bin/bash
+
+# ----------------------------------------------------------------------------
+#  Hvigor startup script, version 1.0.0
+#
+#  Required ENV vars:
+#  ------------------
+#    NODE_HOME - location of a Node home dir
+#    or
+#    Add /usr/local/nodejs/bin to the PATH environment variable
+# ----------------------------------------------------------------------------
+
+HVIGOR_APP_HOME="`pwd -P`"
+HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
+#NODE_OPTS="--max-old-space-size=4096"
+
+fail() {
+  echo "$*"
+  exit 1
+}
+
+set_executable_node() {
+  EXECUTABLE_NODE="${NODE_HOME}/bin/node"
+  if [ -x "$EXECUTABLE_NODE" ]; then
+    return
+  fi
+
+  EXECUTABLE_NODE="${NODE_HOME}/node"
+  if [ -x "$EXECUTABLE_NODE" ]; then
+    return
+  fi
+  fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
+}
+
+# Determine node to start hvigor wrapper script
+if [ -n "${NODE_HOME}" ]; then
+  set_executable_node
+else
+  EXECUTABLE_NODE="node"
+  command -v ${EXECUTABLE_NODE} &> /dev/null || fail "ERROR: NODE_HOME not set and 'node' command not found"
+fi
+
+# Check hvigor wrapper script
+if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ]; then
+  fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
+fi
+
+if [ -z "${NODE_OPTS}" ]; then
+  NODE_OPTS="--"
+fi
+
+# start hvigor-wrapper script
+exec "${EXECUTABLE_NODE}" "${NODE_OPTS}" \
+  "${HVIGOR_WRAPPER_SCRIPT}" "$@"

+ 54 - 0
hvigorw.bat

@@ -0,0 +1,54 @@
+@rem
+@rem ----------------------------------------------------------------------------
+@rem  Hvigor startup script for Windows, version 1.0.0
+@rem
+@rem  Required ENV vars:
+@rem  ------------------
+@rem    NODE_HOME - location of a Node home dir
+@rem    or
+@rem    Add %NODE_HOME%/bin to the PATH environment variable
+@rem ----------------------------------------------------------------------------
+@rem
+@echo off
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
+set NODE_EXE=node.exe
+@rem set NODE_OPTS="--max-old-space-size=4096"
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+if not defined NODE_OPTS set NODE_OPTS="--"
+
+@rem Find node.exe
+if defined NODE_HOME (
+  set NODE_HOME=%NODE_HOME:"=%
+  set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
+)
+
+%NODE_EXE% --version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" (
+  "%NODE_EXE%" "%NODE_OPTS%" "%WRAPPER_MODULE_PATH%" %*
+) else if exist "%NODE_EXE_PATH%" (
+  "%NODE_EXE%" "%NODE_OPTS%" "%WRAPPER_MODULE_PATH%" %*
+) else (
+  echo.
+  echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+  echo.
+  echo Please set the NODE_HOME variable in your environment to match the
+  echo location of your NodeJs installation.
+)
+
+if "%ERRORLEVEL%" == "0" (
+  if "%OS%" == "Windows_NT" endlocal
+) else (
+  exit /b %ERRORLEVEL%
+)

+ 15 - 0
oh-package-lock.json5

@@ -0,0 +1,15 @@
+{
+  "lockfileVersion": 2,
+  "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
+  "specifiers": {
+    "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13"
+  },
+  "packages": {
+    "@ohos/hypium@1.0.13": {
+      "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz",
+      "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==",
+      "registryType": "ohpm",
+      "shasum": "88d8dda420097efb98d770bf59616faef4682f06"
+    }
+  }
+}

+ 13 - 0
oh-package.json5

@@ -0,0 +1,13 @@
+{
+  "name": "centralcontrol",
+  "version": "1.0.0",
+  "description": "Please describe the basic information.",
+  "main": "",
+  "author": "",
+  "license": "",
+  "dependencies": {
+  },
+  "devDependencies": {
+    "@ohos/hypium": "1.0.13"
+  }
+}