diff --git a/README.md b/README.md index bd2a45d..7a03904 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ GroupSceneDetail { "id": "mock-robot-1", "label": "模拟机器人A", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.1.1", "isConnected": true, @@ -95,7 +95,7 @@ GroupSceneDetail { "id": "mock-robot-2", "label": "模拟机器人B", - "brand": "模拟品牌A", + "brand": 1, "type": 2, "ip": "127.0.1.2" } @@ -128,7 +128,7 @@ RobotRealtimeInfo [JSON] { "id": "mock-robot-1", "label": "模拟机器人A", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.1.1", "isConnected": true, @@ -169,42 +169,42 @@ Array { "id": "mock-robot-1", "label": "模拟机器人A", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.1.1" }, { "id": "mock-robot-2", "label": "模拟机器人B", - "brand": "模拟品牌A", + "brand": 1, "type": 2, "ip": "127.0.1.2" }, { "id": "mock-robot-3", "label": "模拟机器人C", - "brand": "模拟品牌A", + "brand": 1, "type": 3, "ip": "127.0.1.3" }, { "id": "mock-robot-4", "label": "模拟机器人D", - "brand": "模拟品牌B", + "brand": 1, "type": 1, "ip": "127.0.2.1" }, { "id": "mock-robot-5", "label": "模拟机器人E", - "brand": "模拟品牌B", + "brand": 1, "type": 2, "ip": "127.0.2.2" }, { "id": "mock-robot-6", "label": "模拟机器人F", - "brand": "模拟品牌B", + "brand": 1, "type": 3, "ip": "127.0.2.3" } @@ -250,7 +250,7 @@ RobotInfo "data": { "id": "mock-robot-0", "label": "模拟机器人-注册", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.0.0" }, @@ -372,7 +372,7 @@ interface RobotInfo { label: string; // 机器人名称 brand: RobotBrand; // 机器人品牌 type: RobotType; // 机器人类型 - ip: string; // 机器人ip + ip?: string; // 机器人ip(仅真实机器人) battery?: number; // 机器人电量 isConnected?: boolean; // 机器人连接状态 state?: RobotState; // 机器人状态 @@ -387,6 +387,8 @@ export interface RobotDetail extends RobotInfo { chargeBattery?: number; // 充电电量 taskBattery?: number; // 任务电量 swapBattery?: number; // 交换电量 + length?: number; // 空载长(仅仿真机器人) + width?: number; // 空载宽(仅仿真机器人) } export interface RobotRealtimeInfo extends RobotInfo { x: number; // 坐标x @@ -397,7 +399,7 @@ export interface RobotRealtimeInfo extends RobotInfo { } enum RobotBrand { - '先工' = 1, + 仙工 = 1, } enum RobotType { 叉车机器人 = 1, diff --git a/mocks/robot/getAll b/mocks/robot/getAll index 57067c9..61c9933 100644 --- a/mocks/robot/getAll +++ b/mocks/robot/getAll @@ -5,42 +5,42 @@ { "id": "mock-robot-1", "label": "模拟机器人A", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.1.1" }, { "id": "mock-robot-2", "label": "模拟机器人B", - "brand": "模拟品牌A", + "brand": 1, "type": 2, "ip": "127.0.1.2" }, { "id": "mock-robot-3", "label": "模拟机器人C", - "brand": "模拟品牌A", + "brand": 1, "type": 3, "ip": "127.0.1.3" }, { "id": "mock-robot-4", "label": "模拟机器人D", - "brand": "模拟品牌B", + "brand": 1, "type": 1, "ip": "127.0.2.1" }, { "id": "mock-robot-5", "label": "模拟机器人E", - "brand": "模拟品牌B", + "brand": 1, "type": 2, "ip": "127.0.2.2" }, { "id": "mock-robot-6", "label": "模拟机器人F", - "brand": "模拟品牌B", + "brand": 1, "type": 3, "ip": "127.0.2.3" } diff --git a/mocks/robot/register b/mocks/robot/register index 23972f9..da10ace 100644 --- a/mocks/robot/register +++ b/mocks/robot/register @@ -4,7 +4,7 @@ "data": { "id": "mock-robot-0", "label": "模拟机器人-注册", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.0.0" }, diff --git a/mocks/scene/getByGroupId b/mocks/scene/getByGroupId index c242237..4b42358 100644 --- a/mocks/scene/getByGroupId +++ b/mocks/scene/getByGroupId @@ -17,7 +17,7 @@ { "id": "mock-robot-1", "label": "模拟机器人A", - "brand": "模拟品牌A", + "brand": 1, "type": 1, "ip": "127.0.1.1", "isConnected": true, @@ -29,7 +29,7 @@ { "id": "mock-robot-2", "label": "模拟机器人B", - "brand": "模拟品牌A", + "brand": 1, "type": 2, "ip": "127.0.1.2" } diff --git a/src/_ant.scss b/src/_ant.scss index f0fa6c5..ebc24a8 100644 --- a/src/_ant.scss +++ b/src/_ant.scss @@ -371,6 +371,23 @@ } } + .ant-input-number-group-wrapper { + width: 100%; + + & > .ant-input-number-wrapper { + & > .ant-input-number { + border-radius: 2px 0 0 2px; + } + + & > .ant-input-number-group-addon { + color: get-color(text1); + background-color: get-color(fill3); + border-color: get-color(neutral5); + border-radius: 0 2px 2px 0; + } + } + } + .ant-layout { background-color: get-color(page_bg); diff --git a/src/apis/robot/constant.ts b/src/apis/robot/constant.ts index da29310..a5b694d 100644 --- a/src/apis/robot/constant.ts +++ b/src/apis/robot/constant.ts @@ -1,7 +1,7 @@ import { isNumber } from 'lodash-es'; export enum RobotBrand { - '先工' = 1, + 仙工 = 1, } export const ROBOT_BRAND_OPTIONS = >( Object.entries(RobotBrand).filter(([, v]) => isNumber(v)) diff --git a/src/apis/robot/type.ts b/src/apis/robot/type.ts index ca47c70..eecef87 100644 --- a/src/apis/robot/type.ts +++ b/src/apis/robot/type.ts @@ -13,7 +13,7 @@ export interface RobotInfo { label: string; // 机器人名称 brand: RobotBrand; // 机器人品牌 type: RobotType; // 机器人类型 - ip?: string; // 机器人ip + ip?: string; // 机器人ip(仅真实机器人) battery?: number; // 机器人电量 isConnected?: boolean; // 机器人连接状态 state?: RobotState; // 机器人状态 @@ -29,8 +29,8 @@ export interface RobotDetail extends RobotInfo { chargeBattery?: number; // 充电电量 taskBattery?: number; // 任务电量 swapBattery?: number; // 交换电量 - length?: number; // 空载长 - width?: number; // 空载宽 + length?: number; // 空载长(仅仿真机器人) + width?: number; // 空载宽(仅仿真机器人) } export interface RobotRealtimeInfo extends RobotInfo { diff --git a/src/assets/icons/light/redo.png b/src/assets/icons/light/redo.png index da8e419..0df859a 100644 Binary files a/src/assets/icons/light/redo.png and b/src/assets/icons/light/redo.png differ diff --git a/src/assets/icons/light/save.png b/src/assets/icons/light/save.png index b982128..a7eef35 100644 Binary files a/src/assets/icons/light/save.png and b/src/assets/icons/light/save.png differ diff --git a/src/assets/icons/light/trash.png b/src/assets/icons/light/trash.png index 82098eb..a00ba95 100644 Binary files a/src/assets/icons/light/trash.png and b/src/assets/icons/light/trash.png differ diff --git a/src/assets/icons/light/undo.png b/src/assets/icons/light/undo.png index 236f52b..55f8fd8 100644 Binary files a/src/assets/icons/light/undo.png and b/src/assets/icons/light/undo.png differ diff --git a/src/components/modal/robot-add-modal.vue b/src/components/modal/robot-add-modal.vue index ec7892d..1b9ec74 100644 --- a/src/components/modal/robot-add-modal.vue +++ b/src/components/modal/robot-add-modal.vue @@ -1,5 +1,5 @@