diff --git a/src/_ant.scss b/src/_ant.scss index c6bab09..93cd560 100644 --- a/src/_ant.scss +++ b/src/_ant.scss @@ -113,14 +113,17 @@ .ant-checkbox-wrapper { align-items: center; font: 400 14px/22px Roboto; - vertical-align: top; color: get-color(text2); + vertical-align: top; } - .ant-collapse.ant-collapse-ghost { + .ant-collapse { + background-color: transparent; border-radius: 0; & > .ant-collapse-item { + border: none; + & > .ant-collapse-header { gap: 8px; align-items: center; @@ -128,7 +131,6 @@ padding: 0; font: 500 14px/22px Roboto; color: get-color(text1); - background: get-color(fill3); border-radius: 2px; & > .ant-collapse-header-text { @@ -155,6 +157,22 @@ padding: 0; } } + } + + &.ant-collapse-borderless > .ant-collapse-item { + & > .ant-collapse-header { + background: get-color(neutral3); + } + + & + .ant-collapse-item { + margin-block-start: 24px; + } + } + + &.ant-collapse-ghost > .ant-collapse-item { + & > .ant-collapse-header { + background: get-color(fill3); + } & + .ant-collapse-item { margin-block-start: 8px; @@ -271,13 +289,13 @@ box-shadow: none !important; &.ant-input-status-error { - outline-color: rgba($color: get-color(error), $alpha: 20%) !important; border-color: get-color(error) !important; + outline-color: rgba($color: get-color(error), $alpha: 20%) !important; } &:not(:disabled):focus { - outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); border-color: get-color(primary); + outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); transition: none; } @@ -291,13 +309,13 @@ box-shadow: none !important; &.ant-input-affix-wrapper-status-error { - outline-color: rgba($color: get-color(error), $alpha: 20%) !important; border-color: get-color(error) !important; + outline-color: rgba($color: get-color(error), $alpha: 20%) !important; } &:not(.ant-input-affix-wrapper-disabled).ant-input-affix-wrapper-focused { - outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); border-color: get-color(primary); + outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); transition: none; } @@ -306,20 +324,24 @@ } & > .ant-input { - outline: none; background-color: transparent; + outline: none; } & > .ant-input-suffix { margin-inline-start: 12px; font-size: 16px; - color: get-color(icon-disabled); + color: get-color(icon); } &.search { padding-inline-start: 7px; background-color: get-color(fill3); border-color: get-color(border2); + + & > .ant-input-suffix { + color: get-color(icon-disabled); + } } } @@ -332,13 +354,13 @@ box-shadow: none !important; &.ant-input-number-status-error { - outline-color: rgba($color: get-color(error), $alpha: 20%) !important; border-color: get-color(error) !important; + outline-color: rgba($color: get-color(error), $alpha: 20%) !important; } &:not(:disabled).ant-input-number-focused { - outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); border-color: get-color(primary); + outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); transition: none; } } @@ -489,8 +511,8 @@ } &.ant-select-status-error > .ant-select-selector { - outline-color: rgba($color: get-color(error), $alpha: 20%) !important; border-color: get-color(error) !important; + outline-color: rgba($color: get-color(error), $alpha: 20%) !important; } &:not(.ant-select-disabled):hover > .ant-select-selector { @@ -498,8 +520,8 @@ } &:not(.ant-select-disabled).ant-select-focused > .ant-select-selector { - outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); border-color: get-color(primary); + outline: 2px solid rgba($color: get-color(primary), $alpha: 20%); transition: none; } @@ -640,8 +662,8 @@ padding: 3px 5px; margin: 0; font: 500 14px/22px Roboto; - vertical-align: top; color: get-color(text1); + vertical-align: top; background-color: transparent; border-color: get-color(border1); border-radius: 4px; diff --git a/src/_icon.scss b/src/_icon.scss index 8147d16..4d02e8f 100644 --- a/src/_icon.scss +++ b/src/_icon.scss @@ -2,20 +2,22 @@ @use 'asset/icons/icon' as *; @include themed { - .icon-btn { + .ant-btn.icon-btn { + color: get-color(text1) !important; + &.panel-btn { - color: get-color(icon); + color: get-color(icon) !important; &:disabled { - color: get-color(icon-disabled); + color: get-color(icon-disabled) !important; } } &.tool-btn { - color: get-color(icon); + color: get-color(icon) !important; &:disabled { - color: get-color(icon-disabled); + color: get-color(icon-disabled) !important; } &.active { @@ -23,7 +25,7 @@ } &:not(:disabled):hover { - background-color: get-color(bg_layout); + background-color: get-color(bg_layout) !important; } } } @@ -45,7 +47,7 @@ background-color: currentcolor; &.primary { - color: get-color(icon-brand); + color: get-color(icon-brand) !important; } @each $icon in $icons { diff --git a/src/apis/map/type.ts b/src/apis/map/type.ts index cc61976..fed0f4d 100644 --- a/src/apis/map/type.ts +++ b/src/apis/map/type.ts @@ -40,3 +40,5 @@ export interface MapAreaInfo { routes?: Array; // 绑定线路id集合 } //#endregion + +export type MapRect = Record<'x' | 'y' | 'width' | 'height', number>; diff --git a/src/components/card/point-detail-card.vue b/src/components/card/point-detail-card.vue index cd1d2dc..a02f29a 100644 --- a/src/components/card/point-detail-card.vue +++ b/src/components/card/point-detail-card.vue @@ -36,14 +36,11 @@ const bindAction = computed( const mapAreas = (type: MapAreaType): string => { const id = pen.value?.id; if (!id) return ''; - return ( - editor.value - .find(`area-${type}`) - .filter(({ area }) => area?.points?.includes(id)) - ?.map(({ label }) => label) - .filter((v) => !!v) - .join('、') ?? '' - ); + return editor.value + .getBoundAreas(id, 'point', type) + .map(({ label }) => label) + .filter((v) => !!v) + .join('、'); }; const coArea1 = computed(() => mapAreas(MapAreaType.库区)); const coArea2 = computed(() => mapAreas(MapAreaType.互斥区)); diff --git a/src/components/card/point-edit-card.vue b/src/components/card/point-edit-card.vue index 83eec13..40c1463 100644 --- a/src/components/card/point-edit-card.vue +++ b/src/components/card/point-edit-card.vue @@ -1,29 +1,57 @@ diff --git a/src/components/modal/robot-bind-modal.vue b/src/components/modal/robot-bind-modal.vue new file mode 100644 index 0000000..e740807 --- /dev/null +++ b/src/components/modal/robot-bind-modal.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/pages/scene-editor.vue b/src/pages/scene-editor.vue index c3b03fe..c5ec546 100644 --- a/src/pages/scene-editor.vue +++ b/src/pages/scene-editor.vue @@ -138,7 +138,7 @@ const selectRobot = (id: string) => {