代码调整
This commit is contained in:
parent
6d6e8a06ae
commit
9eba288eea
42
src/drawApp/common.ts
Normal file
42
src/drawApp/common.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { AxleCounting } from 'src/graphics/axleCounting/AxleCounting';
|
||||
import { Curvature } from 'src/graphics/curvature/Curvature';
|
||||
import { CurvatureKiloMarker } from 'src/graphics/curvatureKiloMarker/CurvatureKiloMarker';
|
||||
import { EsbButton } from 'src/graphics/esbButton/EsbButton';
|
||||
import { GatedBox } from 'src/graphics/gatedBox/GatedBox';
|
||||
import { Link } from 'src/graphics/link/Link';
|
||||
import { Platform } from 'src/graphics/platform/Platform';
|
||||
import { ScreenDoor } from 'src/graphics/screenDoor/ScreenDoor';
|
||||
import { Section } from 'src/graphics/section/Section';
|
||||
import { Separator } from 'src/graphics/separator/Separator';
|
||||
import { Signal } from 'src/graphics/signal/Signal';
|
||||
import { Slope } from 'src/graphics/slope/Slope';
|
||||
import { SlopeKiloMarker } from 'src/graphics/slopeKiloMarker/SlopeKiloMarker';
|
||||
import { SpksSwitch } from 'src/graphics/spksSwitch/SpksSwitch';
|
||||
import { Station } from 'src/graphics/station/Station';
|
||||
import { StopPosition } from 'src/graphics/stopPosition/StopPosition';
|
||||
import { TrainWindow } from 'src/graphics/trainWindow/TrainWindow';
|
||||
import { Transponder } from 'src/graphics/transponder/Transponder';
|
||||
import { Turnout } from 'src/graphics/turnout/Turnout';
|
||||
|
||||
export const drawCommonLayerList = [
|
||||
// 图层列表 默认显示的图层defaultShow: true
|
||||
{ label: '区段', value: Section.Type, defaultShow: true },
|
||||
{ label: '区段检测点', value: AxleCounting.Type, defaultShow: true },
|
||||
{ label: '站台', value: Platform.Type, defaultShow: true },
|
||||
{ label: '屏蔽门', value: ScreenDoor.Type, defaultShow: true },
|
||||
{ label: '车站', value: Station.Type, defaultShow: true },
|
||||
{ label: '道岔', value: Turnout.Type, defaultShow: true },
|
||||
{ label: '信号机', value: Signal.Type, defaultShow: true },
|
||||
{ label: '分隔符', value: Separator.Type, defaultShow: true },
|
||||
{ label: '停车位置标', value: StopPosition.Type, defaultShow: true },
|
||||
{ label: 'Spks开关', value: SpksSwitch.Type, defaultShow: true },
|
||||
{ label: '门控箱', value: GatedBox.Type, defaultShow: true },
|
||||
{ label: '紧急关闭按钮', value: EsbButton.Type, defaultShow: true },
|
||||
{ label: '应答器', value: Transponder.Type, defaultShow: true },
|
||||
{ label: '车次窗', value: TrainWindow.Type, defaultShow: true },
|
||||
{ label: 'Link', value: Link.Type, defaultShow: false },
|
||||
{ label: '坡度公里标', value: SlopeKiloMarker.Type, defaultShow: true },
|
||||
{ label: '坡度', value: Slope.Type, defaultShow: true },
|
||||
{ label: '曲度公里标', value: CurvatureKiloMarker.Type, defaultShow: true },
|
||||
{ label: '曲度', value: Curvature.Type, defaultShow: true },
|
||||
];
|
@ -99,7 +99,7 @@ import { SlopeData } from './graphics/SlopeInteraction';
|
||||
import { Slope, SlopeTemplate } from 'src/graphics/slope/Slope';
|
||||
import { useLineStore } from 'src/stores/line-store';
|
||||
import { LinkData } from './graphics/LinkInteraction';
|
||||
import { Link, LinkTemplate } from 'src/graphics/link/Link';
|
||||
import { LinkTemplate } from 'src/graphics/link/Link';
|
||||
import { LinkDraw } from 'src/graphics/link/LinkDrawAssistant';
|
||||
import {
|
||||
CurvatureKiloMarker,
|
||||
@ -144,29 +144,6 @@ export const DefaultCanvasMenu = new ContextMenu({
|
||||
],
|
||||
});
|
||||
|
||||
export const drawCommonLayerList = [
|
||||
// 图层列表 默认显示的图层defaultShow: true
|
||||
{ label: '区段', value: Section.Type, defaultShow: true },
|
||||
{ label: '区段检测点', value: AxleCounting.Type, defaultShow: true },
|
||||
{ label: '站台', value: Platform.Type, defaultShow: true },
|
||||
{ label: '屏蔽门', value: ScreenDoor.Type, defaultShow: true },
|
||||
{ label: '车站', value: Station.Type, defaultShow: true },
|
||||
{ label: '道岔', value: Turnout.Type, defaultShow: true },
|
||||
{ label: '信号机', value: Signal.Type, defaultShow: true },
|
||||
{ label: '分隔符', value: Separator.Type, defaultShow: true },
|
||||
{ label: '停车位置标', value: StopPosition.Type, defaultShow: true },
|
||||
{ label: 'Spks开关', value: SpksSwitch.Type, defaultShow: true },
|
||||
{ label: '门控箱', value: GatedBox.Type, defaultShow: true },
|
||||
{ label: '紧急关闭按钮', value: EsbButton.Type, defaultShow: true },
|
||||
{ label: '应答器', value: Transponder.Type, defaultShow: true },
|
||||
{ label: '车次窗', value: TrainWindow.Type, defaultShow: true },
|
||||
{ label: 'Link', value: Link.Type, defaultShow: false },
|
||||
{ label: '坡度公里标', value: SlopeKiloMarker.Type, defaultShow: true },
|
||||
{ label: '坡度', value: Slope.Type, defaultShow: true },
|
||||
{ label: '曲度公里标', value: CurvatureKiloMarker.Type, defaultShow: true },
|
||||
{ label: '曲度', value: Curvature.Type, defaultShow: true },
|
||||
];
|
||||
|
||||
export function initCommonDrawApp(app: IDrawApp) {
|
||||
new PlatformDraw(
|
||||
app,
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
IGraphicScene,
|
||||
JlGraphic,
|
||||
} from 'src/jl-graphic';
|
||||
//import { loadScreenDoorConfig } from '../commonApp';
|
||||
import { loadScreenDoorConfig } from '../commonApp';
|
||||
|
||||
export class ScreenDoorData extends GraphicDataBase implements IScreenDoorData {
|
||||
constructor(data?: graphicData.ScreenDoor) {
|
||||
@ -44,7 +44,7 @@ export class ScreenDoorData extends GraphicDataBase implements IScreenDoorData {
|
||||
this.data.refPlatformId = v;
|
||||
}
|
||||
get sonDoorAmount(): number {
|
||||
return 30;
|
||||
return loadScreenDoorConfig()?.sonDoorAmount || 30;
|
||||
}
|
||||
|
||||
clone(): ScreenDoorData {
|
||||
|
@ -32,12 +32,12 @@ import { LogicSectionData } from './graphics/LogicSectionInteraction';
|
||||
import { LinkData } from './graphics/LinkInteraction';
|
||||
import { Link, LinkTemplate } from 'src/graphics/link/Link';
|
||||
import {
|
||||
drawCommonLayerList,
|
||||
initCommonDrawApp,
|
||||
saveCommonDrawDatas,
|
||||
loadCommonDrawDatas,
|
||||
saveDrawToServer,
|
||||
} from './commonApp';
|
||||
import { drawCommonLayerList } from './common';
|
||||
import { Notify } from 'quasar';
|
||||
import { generateCalculateLink } from 'src/api/GenerateApi';
|
||||
import { SignalDraw } from 'src/graphics/signal/SignalDrawAssistant';
|
||||
|
@ -23,12 +23,12 @@ import {
|
||||
} from 'src/graphics/trackLogicSection/TrackLogicSection';
|
||||
import { TrackLogicSectionData } from './graphics/TrackLogicSectionInteraction';
|
||||
import {
|
||||
drawCommonLayerList,
|
||||
initCommonDrawApp,
|
||||
saveCommonDrawDatas,
|
||||
loadCommonDrawDatas,
|
||||
saveDrawToServer,
|
||||
} from './commonApp';
|
||||
import { drawCommonLayerList } from './common';
|
||||
import { SignalDraw } from 'src/graphics/signal/SignalDrawAssistant';
|
||||
import { SignalTemplate, Signal } from 'src/graphics/signal/Signal';
|
||||
import { SignalData, SignalState } from './graphics/SignalInteraction';
|
||||
|
Loading…
Reference in New Issue
Block a user