diff --git a/mocks/scene/getById b/mocks/scene/getById index 176003e..f64453f 100644 --- a/mocks/scene/getById +++ b/mocks/scene/getById @@ -4,7 +4,7 @@ "data": { "id": "mock-scene-1", "label": "模拟场景A", - "json": "{\"x\":0,\"y\":0,\"scale\":1,\"pens\":[],\"origin\":{\"x\":0,\"y\":0},\"center\":{\"x\":0,\"y\":0},\"paths\":{},\"template\":\"4c2a10f\",\"locked\":10,\"version\":\"1.0.78\",\"dataPoints\":[],\"robotGroups\":[{\"id\":\"mock-robot-group-1\",\"label\":\"模拟机器人组A\",\"robots\":[\"mock-robot-1\",\"mock-robot-2\",\"mock-robot-3\"]},{\"sid\":\"mock-scene-1\",\"id\":\"mock-robot-group-2\",\"label\":\"模拟机器人组B\",\"robots\":[\"mock-robot-4\"]}],\"robots\":[{\"gid\":\"mock-robot-group-1\",\"id\":\"mock-robot-1\",\"label\":\"模拟机器人A\",\"brand\":\"模拟品牌A\",\"type\":1,\"ip\":\"127.0.1.1\"},{\"gid\":\"mock-robot-group-1\",\"id\":\"mock-robot-2\",\"label\":\"模拟机器人B\",\"brand\":\"模拟品牌A\",\"type\":2,\"ip\":\"127.0.1.2\"},{\"gid\":\"mock-robot-group-1\",\"id\":\"mock-robot-3\",\"label\":\"模拟机器人C\",\"brand\":\"模拟品牌A\",\"type\":3,\"ip\":\"127.0.1.3\"},{\"gid\":\"mock-robot-group-2\",\"id\":\"mock-robot-4\",\"label\":\"模拟机器人D\",\"brand\":\"模拟品牌B\",\"type\":1,\"ip\":\"127.0.2.1\"}]}" + "json": "{\"x\":0,\"y\":0,\"scale\":1,\"pens\":[{\"id\":\"3afaff2\",\"name\":\"area\",\"tags\":[\"area\",\"area-12\"],\"label\":\"A3afaff2\",\"x\":254,\"y\":52,\"width\":183,\"height\":195,\"lineWidth\":1,\"area\":{\"type\":12,\"points\":[\"a6667c8\",\"702ccfa\",\"9fc0ba3\",\"984da11\"],\"routes\":[]},\"locked\":4,\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[],\"rotate\":0},{\"id\":\"8b37b4f\",\"name\":\"area\",\"tags\":[\"area\",\"area-11\"],\"label\":\"A8b37b4f\",\"x\":44,\"y\":49,\"width\":193,\"height\":195,\"lineWidth\":1,\"area\":{\"type\":11,\"points\":[\"21b74c90\",\"00f32a0\",\"7f201a25\",\"8de717e\"],\"routes\":[]},\"locked\":4,\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[],\"rotate\":0},{\"id\":\"5d96dd3d\",\"name\":\"area\",\"tags\":[\"area\",\"area-1\"],\"label\":\"A5d96dd3d\",\"x\":451,\"y\":126,\"width\":196,\"height\":125,\"lineWidth\":1,\"area\":{\"type\":1,\"points\":[\"5170c043\"],\"routes\":[]},\"locked\":4,\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[],\"rotate\":0},{\"x\":88,\"y\":88,\"width\":24,\"height\":24,\"lineWidth\":2,\"iconSize\":4,\"image\":\"\",\"canvasLayer\":3,\"id\":\"21b74c90\",\"name\":\"point\",\"tags\":[\"point\",\"point-1\"],\"label\":\"P21b74c90\",\"point\":{\"type\":1},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":188,\"y\":88,\"width\":24,\"height\":24,\"lineWidth\":2,\"iconSize\":4,\"image\":\"\",\"canvasLayer\":3,\"id\":\"00f32a0\",\"name\":\"point\",\"tags\":[\"point\",\"point-2\"],\"label\":\"P00f32a0\",\"point\":{\"type\":2},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":288,\"y\":88,\"width\":24,\"height\":24,\"lineWidth\":2,\"iconSize\":4,\"image\":\"\",\"canvasLayer\":3,\"id\":\"a6667c8\",\"name\":\"point\",\"tags\":[\"point\",\"point-3\"],\"label\":\"Pa6667c8\",\"point\":{\"type\":3},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":388,\"y\":88,\"width\":24,\"height\":24,\"lineWidth\":2,\"iconSize\":4,\"image\":\"\",\"canvasLayer\":3,\"id\":\"702ccfa\",\"name\":\"point\",\"tags\":[\"point\",\"point-4\"],\"label\":\"P702ccfa\",\"point\":{\"type\":4},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":76,\"y\":170,\"width\":48,\"height\":60,\"lineWidth\":3,\"iconSize\":10,\"image\":\"/point/11-dark.png\",\"canvasLayer\":3,\"id\":\"7f201a25\",\"name\":\"point\",\"tags\":[\"point\",\"point-11\"],\"label\":\"P7f201a25\",\"point\":{\"type\":11},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":176,\"y\":170,\"width\":48,\"height\":60,\"lineWidth\":3,\"iconSize\":10,\"image\":\"/point/12-dark.png\",\"canvasLayer\":3,\"id\":\"8de717e\",\"name\":\"point\",\"tags\":[\"point\",\"point-12\"],\"label\":\"P8de717e\",\"point\":{\"type\":12},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":276,\"y\":170,\"width\":48,\"height\":60,\"lineWidth\":3,\"iconSize\":10,\"image\":\"/point/13-dark.png\",\"canvasLayer\":3,\"id\":\"9fc0ba3\",\"name\":\"point\",\"tags\":[\"point\",\"point-13\"],\"label\":\"P9fc0ba3\",\"point\":{\"type\":13},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":376,\"y\":170,\"width\":48,\"height\":60,\"lineWidth\":3,\"iconSize\":10,\"image\":\"/point/14-dark.png\",\"canvasLayer\":3,\"id\":\"984da11\",\"name\":\"point\",\"tags\":[\"point\",\"point-14\"],\"label\":\"P984da11\",\"point\":{\"type\":14},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":476,\"y\":170,\"width\":48,\"height\":60,\"lineWidth\":3,\"iconSize\":10,\"image\":\"/point/15-dark.png\",\"canvasLayer\":3,\"id\":\"5170c043\",\"name\":\"point\",\"tags\":[\"point\",\"point-15\"],\"label\":\"P5170c043\",\"point\":{\"type\":15},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0},{\"x\":576,\"y\":170,\"width\":48,\"height\":60,\"lineWidth\":3,\"iconSize\":10,\"image\":\"/point/16-dark.png\",\"canvasLayer\":3,\"id\":\"d292734\",\"name\":\"point\",\"tags\":[\"point\",\"point-16\"],\"label\":\"Pd292734\",\"point\":{\"type\":16},\"fontSize\":14,\"lineHeight\":1.5,\"anchors\":[{\"x\":0.5,\"y\":0.5}],\"rotate\":0}],\"origin\":{\"x\":0,\"y\":0},\"center\":{\"x\":0,\"y\":0},\"paths\":{},\"template\":\"4c2a10f\",\"locked\":4,\"version\":\"1.0.78\",\"dataPoints\":[],\"robotGroups\":[{\"id\":\"mock-robot-group-1\",\"label\":\"模拟机器人组A\",\"robots\":[\"mock-robot-1\",\"mock-robot-2\",\"mock-robot-3\"]},{\"sid\":\"mock-scene-1\",\"id\":\"mock-robot-group-2\",\"label\":\"模拟机器人组B\",\"robots\":[\"mock-robot-4\"]}],\"robots\":[{\"gid\":\"mock-robot-group-1\",\"id\":\"mock-robot-1\",\"label\":\"模拟机器人A\",\"brand\":\"模拟品牌A\",\"type\":1,\"ip\":\"127.0.1.1\"},{\"gid\":\"mock-robot-group-1\",\"id\":\"mock-robot-2\",\"label\":\"模拟机器人B\",\"brand\":\"模拟品牌A\",\"type\":2,\"ip\":\"127.0.1.2\"},{\"gid\":\"mock-robot-group-1\",\"id\":\"mock-robot-3\",\"label\":\"模拟机器人C\",\"brand\":\"模拟品牌A\",\"type\":3,\"ip\":\"127.0.1.3\"},{\"gid\":\"mock-robot-group-2\",\"id\":\"mock-robot-4\",\"label\":\"模拟机器人D\",\"brand\":\"模拟品牌B\",\"type\":1,\"ip\":\"127.0.2.1\"}],\"theme\":\"dark\",\"background\":\"#1e2430\",\"color\":\"#bdc7db\"}" }, "message": "模拟提示" } diff --git a/src/_ant.scss b/src/_ant.scss index aee3eea..c6bab09 100644 --- a/src/_ant.scss +++ b/src/_ant.scss @@ -68,6 +68,16 @@ border-radius: 8px; box-shadow: 0 2px 8px 0 get-color(shadow1); + & > .ant-card-head { + min-height: 48px; + padding: 14px 16px; + margin: 0; + font: 500 16px/20px Roboto; + color: get-color(text1); + background-color: get-color(fill1); + border: none; + } + & > .ant-card-body { padding: 16px; } @@ -103,8 +113,8 @@ .ant-checkbox-wrapper { align-items: center; font: 400 14px/22px Roboto; - color: get-color(text2); vertical-align: top; + color: get-color(text2); } .ant-collapse.ant-collapse-ghost { @@ -261,13 +271,13 @@ box-shadow: none !important; &.ant-input-status-error { - border-color: get-color(error) !important; outline-color: rgba($color: get-color(error), $alpha: 20%) !important; + border-color: get-color(error) !important; } &:not(:disabled):focus { - border-color: get-color(primary); outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); + border-color: get-color(primary); transition: none; } @@ -281,13 +291,13 @@ box-shadow: none !important; &.ant-input-affix-wrapper-status-error { - border-color: get-color(error) !important; outline-color: rgba($color: get-color(error), $alpha: 20%) !important; + border-color: get-color(error) !important; } &:not(.ant-input-affix-wrapper-disabled).ant-input-affix-wrapper-focused { - border-color: get-color(primary); outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); + border-color: get-color(primary); transition: none; } @@ -296,8 +306,8 @@ } & > .ant-input { - background-color: transparent; outline: none; + background-color: transparent; } & > .ant-input-suffix { @@ -322,13 +332,13 @@ box-shadow: none !important; &.ant-input-number-status-error { - border-color: get-color(error) !important; outline-color: rgba($color: get-color(error), $alpha: 20%) !important; + border-color: get-color(error) !important; } &:not(:disabled).ant-input-number-focused { - border-color: get-color(primary); outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); + border-color: get-color(primary); transition: none; } } @@ -455,6 +465,8 @@ } .ant-select:not(.ant-select-borderless) { + width: 100%; + & > .ant-select-selector { color: get-color(text1); background-color: get-color(neutral1); @@ -477,8 +489,8 @@ } &.ant-select-status-error > .ant-select-selector { - border-color: get-color(error) !important; outline-color: rgba($color: get-color(error), $alpha: 20%) !important; + border-color: get-color(error) !important; } &:not(.ant-select-disabled):hover > .ant-select-selector { @@ -486,8 +498,8 @@ } &:not(.ant-select-disabled).ant-select-focused > .ant-select-selector { - border-color: get-color(primary); outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); + border-color: get-color(primary); transition: none; } @@ -578,6 +590,10 @@ margin: 0; background-color: get-color(fill1); + &::before { + display: none; + } + & > .ant-tabs-nav-wrap > .ant-tabs-nav-list { & > .ant-tabs-tab { padding: 14px 32px; @@ -604,6 +620,10 @@ display: none; } } + + & > .ant-tabs-nav-operations { + display: none; + } } & > .ant-tabs-content-holder > .ant-tabs-content { @@ -620,8 +640,8 @@ padding: 3px 5px; margin: 0; font: 500 14px/22px Roboto; - color: get-color(text1); vertical-align: top; + color: get-color(text1); background-color: transparent; border-color: get-color(border1); border-radius: 4px; diff --git a/src/components/card/point-edit-card.vue b/src/components/card/point-edit-card.vue new file mode 100644 index 0000000..83eec13 --- /dev/null +++ b/src/components/card/point-edit-card.vue @@ -0,0 +1,43 @@ + + + diff --git a/src/components/editor-toolbar.vue b/src/components/editor-toolbar.vue index b50b079..0b11ccb 100644 --- a/src/components/editor-toolbar.vue +++ b/src/components/editor-toolbar.vue @@ -7,7 +7,7 @@ import { inject, type InjectionKey, ref, type ShallowRef, watch } from 'vue'; type Props = { token: InjectionKey>; editable?: boolean; - current?: string; + id: string; }; const props = defineProps(); const editor = inject(props.token)!; @@ -54,13 +54,18 @@ watch(editor.value.mouseBrush, (v) => { - + - + - + diff --git a/src/pages/scene-editor.vue b/src/pages/scene-editor.vue index ac84fc9..c3b03fe 100644 --- a/src/pages/scene-editor.vue +++ b/src/pages/scene-editor.vue @@ -1,7 +1,7 @@