From 57ed5d9ffe2e7eb3b1c542f1e6e4f5becad1c61b Mon Sep 17 00:00:00 2001 From: Yuan Date: Thu, 14 Dec 2023 14:18:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=86=E6=9E=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 4 - bj-rtss-message | 2 +- graphic-pixi | 1 - package.json | 7 +- scripts/sync.cjs | 70 - src/components/DrawAppFormUtils.ts | 2 +- src/components/common/SelectConfigUtils.vue | 2 +- .../draw-app/dialogs/LayerControlDialog.vue | 5 +- .../properties/AxleCountingConfig.vue | 2 +- .../properties/AxleCountingProperty.vue | 2 +- .../draw-app/properties/CiCjConfig.vue | 2 +- .../draw-app/properties/CiQdConfig.vue | 2 +- .../draw-app/properties/OtherLineConfig.vue | 2 +- .../properties/RelateDeviceConfig.vue | 4 +- .../draw-app/properties/RelateIbpConfig.vue | 2 +- .../draw-app/properties/RelateRelayConfig.vue | 2 +- .../properties/StationRelateDeviceConfig.vue | 2 +- .../properties/multipleSelectProperty.vue | 2 +- .../line-app/states/TurnoutState.vue | 2 +- src/drawApp/IbpScene.ts | 2 +- src/drawApp/commonApp.ts | 4 +- .../graphics/AutoReturnBoxInteraction.ts | 13 +- src/drawApp/graphics/BeaconInteraction.ts | 6 +- src/drawApp/graphics/EsbButtonInteraction.ts | 9 +- src/drawApp/graphics/GatedBoxInteraction.ts | 6 +- src/drawApp/graphics/GraphicDataBase.ts | 2 +- src/drawApp/graphics/IBPButtonInteraction.ts | 5 +- src/drawApp/graphics/IbpKeyInteraction.ts | 2 +- src/drawApp/graphics/PlatformInteraction.ts | 2 +- src/drawApp/graphics/PslButtonInteraction.ts | 5 +- src/drawApp/graphics/ScreenDoorInteraction.ts | 5 +- src/drawApp/graphics/SectionInteraction.ts | 8 +- .../graphics/SectionLinkInteraction.ts | 5 +- src/drawApp/graphics/SignalInteraction.ts | 6 +- src/drawApp/graphics/SpksSwitchInteraction.ts | 6 +- src/drawApp/graphics/StationInteraction.ts | 2 +- .../graphics/StopPositionInteraction.ts | 6 +- src/drawApp/graphics/TrainInteraction.ts | 6 +- src/drawApp/graphics/TurnoutInteraction.ts | 8 +- src/drawApp/graphics/ZdwxEsbInteraction.ts | 6 +- src/drawApp/ibpDrawApp.ts | 6 +- src/drawApp/jkApp.ts | 2 +- src/drawApp/lineApp.ts | 2 +- src/drawApp/lineScene.ts | 13 +- src/drawApp/pslApp.ts | 6 +- src/drawApp/pslScene.ts | 2 +- .../relayCabinetGraphics/RelayInteraction.ts | 6 +- src/drawApp/relayCabinetLayoutApp.ts | 6 +- src/drawApp/relayScene.ts | 2 +- src/drawApp/thApp.ts | 2 +- src/drawApp/zdwxApp.ts | 2 +- src/graphics/CommonGraphics.ts | 2 +- src/graphics/IBPButton/IBPButton.ts | 2 +- .../IBPButton/IBPButtonDrawAssistant.ts | 2 +- src/graphics/arrow/Arrow.ts | 3 +- src/graphics/arrow/ArrowDrawAssistant.ts | 8 +- src/graphics/autoReturnBox/AutoReturnBox.ts | 2 +- .../AutoReturnBoxDrawAssistant.ts | 2 +- src/graphics/axleCounting/AxleCounting.ts | 2 +- .../axleCounting/AxleCountingDrawAssistant.ts | 5 +- .../AxleCountingSection.ts | 2 +- .../AxleCountingSectionAssistant.ts | 2 +- src/graphics/beacon/Beacon.ts | 2 +- src/graphics/beacon/BeaconDrawAssistant.ts | 2 +- .../ConcentrationDividingLine.ts | 46 +- .../ConcentrationDividingLineDrawAssistant.ts | 14 +- .../ConcentrationDividingLineUtils.ts | 2 +- src/graphics/curvature/Curvature.ts | 2 +- src/graphics/curvature/CurvatureAssistant.ts | 2 +- .../CurvatureKiloMarker.ts | 2 +- .../CurvatureKiloMarkerDrawAssistant.ts | 2 +- src/graphics/departureTimer/DepartureTimer.ts | 2 +- .../DepartureTimerDrawAssistant.ts | 2 +- src/graphics/esbButton/EsbButton.ts | 2 +- .../esbButton/EsbButtonDrawAssistant.ts | 2 +- src/graphics/esbButton/ZdwxEsb.ts | 2 +- .../esbButton/ZdwxEsbDrawAssistant.ts | 2 +- src/graphics/gatedBox/GatedBox.ts | 2 +- .../gatedBox/GatedBoxDrawAssistant.ts | 2 +- src/graphics/ibpAlarm/IbpAlarm.ts | 2 +- .../ibpAlarm/IbpAlarmDrawAssistant.ts | 2 +- src/graphics/ibpKey/IbpKey.ts | 2 +- src/graphics/ibpKey/IbpKeyDrawAssistant.ts | 2 +- src/graphics/ibpLight/IbpLight.ts | 2 +- .../ibpLight/IbpLightDrawAssistant.ts | 2 +- src/graphics/ibpStationText/ibpStationText.ts | 2 +- .../ibpStationTextDrawAssistant.ts | 2 +- .../kilometerMarker/KilometerMarker.ts | 2 +- src/graphics/link/Link.ts | 5 +- src/graphics/link/LinkDrawAssistant.ts | 8 +- src/graphics/logicSection/LogicSection.ts | 2 +- .../logicSection/LogicSectionDrawAssistant.ts | 18 +- .../PhaseFailureProtector.ts | 2 +- .../PhaseFailureProtectorDrawAssistant.ts | 2 +- src/graphics/platform/Platform.ts | 2 +- .../platform/PlatformDrawAssistant.ts | 2 +- src/graphics/polygon/Polygon.ts | 3 +- src/graphics/polygon/PolygonDrawAssistant.ts | 16 +- src/graphics/polygon/PolygonUtils.ts | 4 +- src/graphics/pslButton/pslButton.ts | 2 +- .../pslButton/pslButtonDrawAssistant.ts | 2 +- src/graphics/pslKey/pslKey.ts | 2 +- src/graphics/pslKey/pslKeyDrawAssistant.ts | 2 +- src/graphics/pslLight/pslLight.ts | 2 +- .../pslLight/pslLightDrawAssistant.ts | 2 +- src/graphics/relay/Relay.ts | 2 +- src/graphics/relay/RelayDrawAssistant.ts | 2 +- src/graphics/relayCabinet/RelayCabinet.ts | 6 +- .../relayCabinet/RelayCabinetDrawAssistant.ts | 2 +- src/graphics/screenDoor/ScreenDoor.ts | 2 +- .../screenDoor/ScreenDoorDrawAssistant.ts | 2 +- src/graphics/section/Section.ts | 11 +- src/graphics/section/SectionDrawAssistant.ts | 19 +- src/graphics/sectionGraphic/SectionGraphic.ts | 2 +- src/graphics/sectionLink/SectionLink.ts | 6 +- .../sectionLink/SectionLinkDrawAssistant.ts | 10 +- src/graphics/separator/Separator.ts | 2 +- .../separator/SeparatorDrawAssistant.ts | 2 +- src/graphics/signal/LampMainBody.ts | 2 +- src/graphics/signal/Signal.ts | 4 +- src/graphics/signal/SignalCode.ts | 2 +- src/graphics/signal/SignalDrawAssistant.ts | 2 +- .../signalFaultAlarm/SignalFaultAlarm.ts | 2 +- .../SignalFaultAlarmDrawAssistant.ts | 2 +- src/graphics/slope/Slope.ts | 2 +- src/graphics/slope/SlopeAssistant.ts | 2 +- .../slopeKiloMarker/SlopeKiloMarker.ts | 2 +- .../SlopeKiloMarkerDrawAssistant.ts | 2 +- src/graphics/spksSwitch/SpksSwitch.ts | 2 +- .../spksSwitch/SpksSwitchDrawAssistant.ts | 2 +- src/graphics/station/Station.ts | 2 +- src/graphics/station/StationDrawAssistant.ts | 2 +- src/graphics/stopPosition/StopPosition.ts | 2 +- .../stopPosition/StopPositionDrawAssistant.ts | 2 +- src/graphics/textContent/TextContent.ts | 2 +- .../textContent/TextContentDrawAssistant.ts | 2 +- .../trackLogicSection/TrackLogicSection.ts | 2 +- .../TrackLogicSectionDrawAssistant.ts | 2 +- src/graphics/trackSection/TrackSection.ts | 2 +- .../trackSection/TrackSectionDrawAssistant.ts | 11 +- src/graphics/train/Train.ts | 6 +- src/graphics/train/TrainDrawAssistant.ts | 2 +- src/graphics/trainWindow/TrainWindow.ts | 2 +- .../trainWindow/TrainWindowDrawAssistant.ts | 2 +- .../trainWindow/oneClickDrawAssistant.ts | 2 +- src/graphics/transponder/Transponder.ts | 2 +- .../transponder/TransponderDrawAssistant.ts | 2 +- src/graphics/turnout/Turnout.ts | 2 +- src/graphics/turnout/TurnoutDrawAssistant.ts | 17 +- src/jl-graphic/app/BasicOperation.ts | 110 -- src/jl-graphic/app/JlDrawApp.ts | 674 ------- src/jl-graphic/app/JlGraphicApp.ts | 1382 ------------- src/jl-graphic/app/index.ts | 47 - src/jl-graphic/core/GraphicRelation.ts | 187 -- src/jl-graphic/core/GraphicStore.ts | 206 -- src/jl-graphic/core/IdGenerator.ts | 28 - src/jl-graphic/core/JlGraphic.ts | 1033 ---------- src/jl-graphic/core/index.ts | 4 - src/jl-graphic/global.d.ts | 158 -- src/jl-graphic/graphic/AbsorbablePosition.ts | 252 --- src/jl-graphic/graphic/DashedLine.ts | 102 - src/jl-graphic/graphic/DraggablePoint.ts | 45 - src/jl-graphic/graphic/VectorGraphic.ts | 45 - src/jl-graphic/graphic/VectorText.ts | 37 - src/jl-graphic/graphic/index.ts | 5 - src/jl-graphic/index.ts | 7 - src/jl-graphic/math/Constants.ts | 26 - src/jl-graphic/math/Vector2.ts | 360 ---- src/jl-graphic/math/index.ts | 4 - src/jl-graphic/message/BasicMessageClient.ts | 144 -- src/jl-graphic/message/CentrifugeBroker.ts | 68 - src/jl-graphic/message/MessageBroker.ts | 305 --- src/jl-graphic/message/MqttBroker.ts | 111 -- src/jl-graphic/message/WsMsgBroker.ts | 82 - src/jl-graphic/message/index.ts | 1 - src/jl-graphic/operation/JlOperation.ts | 99 - src/jl-graphic/operation/index.ts | 1 - src/jl-graphic/plugins/AnimationManager.ts | 93 - src/jl-graphic/plugins/CommonMousePlugin.ts | 373 ---- src/jl-graphic/plugins/CopyPlugin.ts | 142 -- src/jl-graphic/plugins/GraphicEditPlugin.ts | 514 ----- .../plugins/GraphicTransformPlugin.ts | 915 --------- src/jl-graphic/plugins/InteractionPlugin.ts | 489 ----- src/jl-graphic/plugins/KeyboardPlugin.ts | 352 ---- src/jl-graphic/plugins/index.ts | 6 - src/jl-graphic/ui/ContextMenu.ts | 809 -------- src/jl-graphic/ui/Menu.ts | 177 -- src/jl-graphic/utils/GraphicUtils.ts | 773 -------- src/jl-graphic/utils/IntersectUtils.ts | 362 ---- src/jl-graphic/utils/debounce.ts | 37 - src/jl-graphic/utils/index.ts | 55 - src/layouts/DrawLayout.vue | 2 +- src/layouts/LineLayout.vue | 2 +- src/layouts/PslDrawLayout.vue | 2 +- .../RelayCabinetLayout/GeneraterDevice.ts | 10 +- .../RelayCabinetLayout/RelayCabinetLayout.vue | 2 +- src/stores/draw-store.ts | 2 +- src/stores/ibp-draw-store.ts | 2 +- src/stores/line-store.ts | 2 +- src/stores/psl-draw-store.ts | 2 +- src/stores/psl-store.ts | 6 +- src/stores/relayCabinet-store.ts | 2 +- yarn.lock | 1709 ++++++++++++----- 203 files changed, 1474 insertions(+), 11545 deletions(-) delete mode 160000 graphic-pixi delete mode 100644 scripts/sync.cjs delete mode 100644 src/jl-graphic/app/BasicOperation.ts delete mode 100644 src/jl-graphic/app/JlDrawApp.ts delete mode 100644 src/jl-graphic/app/JlGraphicApp.ts delete mode 100644 src/jl-graphic/app/index.ts delete mode 100644 src/jl-graphic/core/GraphicRelation.ts delete mode 100644 src/jl-graphic/core/GraphicStore.ts delete mode 100644 src/jl-graphic/core/IdGenerator.ts delete mode 100644 src/jl-graphic/core/JlGraphic.ts delete mode 100644 src/jl-graphic/core/index.ts delete mode 100644 src/jl-graphic/global.d.ts delete mode 100644 src/jl-graphic/graphic/AbsorbablePosition.ts delete mode 100644 src/jl-graphic/graphic/DashedLine.ts delete mode 100644 src/jl-graphic/graphic/DraggablePoint.ts delete mode 100644 src/jl-graphic/graphic/VectorGraphic.ts delete mode 100644 src/jl-graphic/graphic/VectorText.ts delete mode 100644 src/jl-graphic/graphic/index.ts delete mode 100644 src/jl-graphic/index.ts delete mode 100644 src/jl-graphic/math/Constants.ts delete mode 100644 src/jl-graphic/math/Vector2.ts delete mode 100644 src/jl-graphic/math/index.ts delete mode 100644 src/jl-graphic/message/BasicMessageClient.ts delete mode 100644 src/jl-graphic/message/CentrifugeBroker.ts delete mode 100644 src/jl-graphic/message/MessageBroker.ts delete mode 100644 src/jl-graphic/message/MqttBroker.ts delete mode 100644 src/jl-graphic/message/WsMsgBroker.ts delete mode 100644 src/jl-graphic/message/index.ts delete mode 100644 src/jl-graphic/operation/JlOperation.ts delete mode 100644 src/jl-graphic/operation/index.ts delete mode 100644 src/jl-graphic/plugins/AnimationManager.ts delete mode 100644 src/jl-graphic/plugins/CommonMousePlugin.ts delete mode 100644 src/jl-graphic/plugins/CopyPlugin.ts delete mode 100644 src/jl-graphic/plugins/GraphicEditPlugin.ts delete mode 100644 src/jl-graphic/plugins/GraphicTransformPlugin.ts delete mode 100644 src/jl-graphic/plugins/InteractionPlugin.ts delete mode 100644 src/jl-graphic/plugins/KeyboardPlugin.ts delete mode 100644 src/jl-graphic/plugins/index.ts delete mode 100644 src/jl-graphic/ui/ContextMenu.ts delete mode 100644 src/jl-graphic/ui/Menu.ts delete mode 100644 src/jl-graphic/utils/GraphicUtils.ts delete mode 100644 src/jl-graphic/utils/IntersectUtils.ts delete mode 100644 src/jl-graphic/utils/debounce.ts delete mode 100644 src/jl-graphic/utils/index.ts diff --git a/.gitmodules b/.gitmodules index fdb033d..ccddf1b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ [submodule "bj-rtss-message"] path = bj-rtss-message url = ../bj-rtss-message.git -[submodule "graphic-pixi"] - path = graphic-pixi - url = ../../jl-framework/graphic-pixi.git - branch = bj-rtss diff --git a/bj-rtss-message b/bj-rtss-message index 9c1d888..b68103f 160000 --- a/bj-rtss-message +++ b/bj-rtss-message @@ -1 +1 @@ -Subproject commit 9c1d8889e2b0fdcc3f931259a8d2ebc2952285a4 +Subproject commit b68103fcf0d9a505a605675b8cebb6ca1bf5c533 diff --git a/graphic-pixi b/graphic-pixi deleted file mode 160000 index 1db5125..0000000 --- a/graphic-pixi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1db512545467327f783f5e05bd3a1da654355ba2 diff --git a/package.json b/package.json index 0d4f28c..178fde5 100644 --- a/package.json +++ b/package.json @@ -17,19 +17,14 @@ "sync": "node scripts/sync.cjs" }, "dependencies": { - "@pixi/filter-outline": "^5.2.0", - "@pixi/graphics-extras": "^7.2.4", "@quasar/extras": "^1.0.0", - "@stomp/stompjs": "^7.0.0", "axios": "^1.2.1", "default-passive-events": "^2.0.0", "echarts": "^5.4.3", "google-protobuf": "^3.21.2", + "jl-graphic": "git+ssh://git.code.tencent.com:jl-framework/graphic-pixi.git", "js-base64": "^3.7.5", - "mqtt": "^5.2.1", "pinia": "^2.0.11", - "pixi-viewport": "^5.0.1", - "pixi.js": "^7.2.4", "quasar": "^2.6.0", "vue": "^3.0.0", "vue-router": "^4.0.0" diff --git a/scripts/sync.cjs b/scripts/sync.cjs deleted file mode 100644 index a8fc918..0000000 --- a/scripts/sync.cjs +++ /dev/null @@ -1,70 +0,0 @@ -/** - * 同步图形框架文件到 src/jl-graphic/ - */ -const { - readdirSync, - existsSync, - copyFileSync, - mkdirSync, - rmSync, -} = require('fs'); -const { resolve } = require('path'); - -const jlGraphicSrcPath = resolve(__dirname, '../graphic-pixi/src/jlgraphic'); -const jlGraphicLibPath = resolve(__dirname, '../src/jl-graphic'); - -/** - * 检查并初始化当前项目引入的jl-graphic库 - */ -function checkAndInitJlGraphicLib() { - const exist = existsSync(jlGraphicLibPath); - if (exist) { - console.log('jl-graphic文件夹已存在,清空'); - readdirSync(jlGraphicLibPath, { - withFileTypes: true, - }).forEach((file) => { - if (file.isDirectory()) { - rmSync(resolve(jlGraphicLibPath, file.name), { recursive: true }); - } else { - rmSync(resolve(jlGraphicLibPath, file.name)); - } - }); - } else { - console.log('jl-graphic文件夹不存在,创建'); - // 文件夹不存在,创建 - mkdirSync(jlGraphicLibPath); - } -} - -function copyJlGraphicFiles() { - readdirSync(jlGraphicSrcPath, { - withFileTypes: true, - }).forEach((file) => { - recursiveCopyFiles(file); - }); -} - -function recursiveCopyFiles(file, path = []) { - if (file.isFile()) { - const fileSrcPath = resolve(jlGraphicSrcPath, ...path, file.name); - const fileDestPath = resolve(jlGraphicLibPath, ...path, file.name); - console.log(`copy file ${fileSrcPath} -> ${fileDestPath}`); - copyFileSync(fileSrcPath, fileDestPath); - } else if (file.isDirectory()) { - const srcDir = resolve(jlGraphicSrcPath, ...path, file.name); - const dirPath = resolve(jlGraphicLibPath, ...path, file.name); - mkdirSync(dirPath); - readdirSync(srcDir, { - withFileTypes: true, - }).forEach((subFile) => { - recursiveCopyFiles(subFile, [...path, file.name]); - }); - } -} - -function main() { - checkAndInitJlGraphicLib(); - copyJlGraphicFiles(); -} - -main(); diff --git a/src/components/DrawAppFormUtils.ts b/src/components/DrawAppFormUtils.ts index be1a9ca..33f13eb 100644 --- a/src/components/DrawAppFormUtils.ts +++ b/src/components/DrawAppFormUtils.ts @@ -1,5 +1,5 @@ import { type GraphicDataBase } from 'src/drawApp/graphics/GraphicDataBase'; -import { IDrawApp } from 'src/jl-graphic'; +import { IDrawApp } from 'jl-graphic'; import { onMounted, onUnmounted, reactive, toRaw } from 'vue'; export function useFormData( diff --git a/src/components/common/SelectConfigUtils.vue b/src/components/common/SelectConfigUtils.vue index e5e0166..1c1ada4 100644 --- a/src/components/common/SelectConfigUtils.vue +++ b/src/components/common/SelectConfigUtils.vue @@ -64,7 +64,7 @@