diff --git a/mocks/robot/getAll b/mocks/robot/getAll index 57067c9..6cb99cb 100644 --- a/mocks/robot/getAll +++ b/mocks/robot/getAll @@ -3,46 +3,44 @@ "success": true, "data": [ { + "gid": "mock-robot-group-1", "id": "mock-robot-1", "label": "模拟机器人A", "brand": "模拟品牌A", - "type": 1, - "ip": "127.0.1.1" + "type": 1 }, { + "gid": "mock-robot-group-1", "id": "mock-robot-2", "label": "模拟机器人B", "brand": "模拟品牌A", - "type": 2, - "ip": "127.0.1.2" + "type": 2 }, { + "gid": "mock-robot-group-1", "id": "mock-robot-3", "label": "模拟机器人C", "brand": "模拟品牌A", - "type": 3, - "ip": "127.0.1.3" + "type": 3 }, { + "gid": "mock-robot-group-2", "id": "mock-robot-4", "label": "模拟机器人D", "brand": "模拟品牌B", - "type": 1, - "ip": "127.0.2.1" + "type": 1 }, { "id": "mock-robot-5", "label": "模拟机器人E", "brand": "模拟品牌B", - "type": 2, - "ip": "127.0.2.2" + "type": 2 }, { "id": "mock-robot-6", "label": "模拟机器人F", "brand": "模拟品牌B", - "type": 3, - "ip": "127.0.2.3" + "type": 3 } ], "message": "模拟提示" diff --git a/mocks/scene/getById b/mocks/scene/getById index f912358..c51cffc 100644 --- a/mocks/scene/getById +++ b/mocks/scene/getById @@ -10,25 +10,25 @@ "label": "模拟机器人组A", "robots": [ { + "gid": "mock-robot-group-1", "id": "mock-robot-1", "label": "模拟机器人A", "brand": "模拟品牌A", - "type": 1, - "ip": "127.0.1.1" + "type": 1 }, { + "gid": "mock-robot-group-1", "id": "mock-robot-2", "label": "模拟机器人B", "brand": "模拟品牌A", - "type": 2, - "ip": "127.0.1.2" + "type": 2 }, { + "gid": "mock-robot-group-1", "id": "mock-robot-3", "label": "模拟机器人C", "brand": "模拟品牌A", - "type": 3, - "ip": "127.0.1.3" + "type": 3 } ] }, @@ -37,25 +37,11 @@ "label": "模拟机器人组B", "robots": [ { + "gid": "mock-robot-group-2", "id": "mock-robot-4", "label": "模拟机器人D", "brand": "模拟品牌B", - "type": 1, - "ip": "127.0.2.1" - }, - { - "id": "mock-robot-5", - "label": "模拟机器人E", - "brand": "模拟品牌B", - "type": 2, - "ip": "127.0.2.2" - }, - { - "id": "mock-robot-6", - "label": "模拟机器人F", - "brand": "模拟品牌B", - "type": 3, - "ip": "127.0.2.3" + "type": 1 } ] } diff --git a/src/_ant.scss b/src/_ant.scss index b12a982..af9a954 100644 --- a/src/_ant.scss +++ b/src/_ant.scss @@ -35,6 +35,43 @@ border-color: get-color(warning); box-shadow: 0 2px 0 0 get-color(0000000a); } + + &.icon-btn { + background-color: transparent; + border: none; + box-shadow: none; + + &.ant-btn-sm { + padding: 0; + } + } + } + + .ant-checkbox { + &::after { + display: none; + } + + & > .ant-checkbox-inner { + background-color: get-color(141414); + border-color: get-color(434343); + border-radius: 2px; + } + + &.ant-checkbox-checked:not(.ant-checkbox-disabled) > .ant-checkbox-inner { + background-color: get-color(primary); + border-color: get-color(primary); + + &::after { + border-color: get-color(141414); + } + } + } + + .ant-checkbox-wrapper { + align-items: center; + font: 400 14px/22px Roboto; + color: get-color(ffffffa6); } .ant-collapse.ant-collapse-ghost { diff --git a/src/_icon.scss b/src/_icon.scss index 79604ca..d40d68d 100644 --- a/src/_icon.scss +++ b/src/_icon.scss @@ -2,13 +2,14 @@ @use 'asset/icons/icon' as *; @include themed { + i { + &.bg-1 { + background-color: get-color(ffffffd9); + } + } + .icon { - display: inline-block; - width: 1em; - height: 1em; - font-size: 18px; - line-height: 1; - vertical-align: top; + @extend %icon; @each $icon in $icons { &.#{$icon} { @@ -16,4 +17,23 @@ } } } + + .mask { + @extend %icon; + + @each $icon in $icons { + &.#{$icon} { + mask: get-icon($icon); + } + } + } +} + +%icon { + display: inline-block; + width: 1em; + height: 1em; + font-size: 24px; + line-height: 1; + vertical-align: top; } diff --git a/src/apis/robot/type.ts b/src/apis/robot/type.ts index 73f1c5a..36defc8 100644 --- a/src/apis/robot/type.ts +++ b/src/apis/robot/type.ts @@ -7,15 +7,15 @@ export interface RobotGroup { } export interface RobotInfo { + gid?: string; // 机器人组id id: string; // 机器人id label: string; // 机器人名称 brand: RobotBrand; // 机器人品牌 type: RobotType; // 机器人类型 - ip: string; // 机器人ip } export interface RobotDetail extends RobotInfo { - group?: string; // 机器人组id + ip: string; // 机器人ip isSimulative?: boolean; // 是否仿真机器人 battery?: number; // 机器人电量 minBattery?: number; // 最小电量 diff --git a/src/assets/icons/_icon.scss b/src/assets/icons/_icon.scss index 26f002b..f7c5150 100644 --- a/src/assets/icons/_icon.scss +++ b/src/assets/icons/_icon.scss @@ -1 +1 @@ -$icons: (dropdown, edit, exit); +$icons: (control, dropdown, edit, exit, trash_fill); diff --git a/src/assets/icons/dark/control.png b/src/assets/icons/dark/control.png new file mode 100644 index 0000000..5a9e578 Binary files /dev/null and b/src/assets/icons/dark/control.png differ diff --git a/src/assets/icons/dark/trash_fill.png b/src/assets/icons/dark/trash_fill.png new file mode 100644 index 0000000..db41ba6 Binary files /dev/null and b/src/assets/icons/dark/trash_fill.png differ diff --git a/src/components/robot-group.vue b/src/components/robot-group.vue index 99223df..5bbeefa 100644 --- a/src/components/robot-group.vue +++ b/src/components/robot-group.vue @@ -1,7 +1,7 @@ @@ -30,15 +40,20 @@ const isAllSelected = computed(() => robots.value.every(({ id }) => sel - {{ $t('全选') }} + {{ $t('全选') }} + + + + + - - + +