2019-11-29 12:51:58 +08:00
|
|
|
import deviceType from '../constant/deviceType';
|
|
|
|
import Section from './Section/index.js';
|
|
|
|
import Signal from './Signal/index.js';
|
|
|
|
import Station from './Station/index.js';
|
2019-12-23 10:53:25 +08:00
|
|
|
import Resource from './Resource/index.js';
|
2019-11-29 12:51:58 +08:00
|
|
|
import LcControl from './LcControl/index.js';
|
|
|
|
import LimitControl from './LimitControl/index.js';
|
|
|
|
import Switch from './Switch/index.js';
|
|
|
|
import ZcControl from './ZcControl/index.js';
|
|
|
|
import StationCounter from './StationCounter/index.js';
|
|
|
|
import StationDelayUnlock from './StationDelayUnlock/index.js';
|
|
|
|
import StationStand from './StationStand/index.js';
|
2019-12-06 18:03:13 +08:00
|
|
|
import Psd from './Psd/index.js';
|
2019-11-29 12:51:58 +08:00
|
|
|
import TrainWindow from './TrainWindow/index.js';
|
|
|
|
import Train from './Train/index.js';
|
|
|
|
import Line from './Line/index.js';
|
|
|
|
import Text2 from './Text/index.js';
|
2020-03-17 16:12:15 +08:00
|
|
|
import AxleReset from './AxleReset/index';
|
|
|
|
import GuideLock from './GuideLock/index';
|
2020-05-27 10:36:40 +08:00
|
|
|
import AutoTurnBack from './AutoTurnBack/index.js';
|
2020-03-05 15:48:51 +08:00
|
|
|
import OutFrame from './OutFrame/index.js';
|
2019-11-29 12:51:58 +08:00
|
|
|
import CheckBox from './checkBox/checkBox.js';
|
2020-03-05 16:39:49 +08:00
|
|
|
import AutomaticRoute from './AutomacticRoute/index.js';
|
2020-03-24 15:02:14 +08:00
|
|
|
import SaidLamp from './SaidLamp/index.js';
|
2020-04-15 14:13:08 +08:00
|
|
|
import SplitStation from './SplitStation/index';
|
2020-04-26 16:24:34 +08:00
|
|
|
import Arrow from './Arrow/index';
|
2020-05-28 14:39:06 +08:00
|
|
|
import Power from './Power/index';
|
2020-06-04 17:29:18 +08:00
|
|
|
import StationTurnBack from './StationTurnBack/index';
|
2020-08-13 19:27:02 +08:00
|
|
|
import OverAp from './OverAp/index.js';
|
2019-11-29 12:51:58 +08:00
|
|
|
|
|
|
|
/** 图库*/
|
|
|
|
const mapShape = {};
|
|
|
|
mapShape[deviceType.Section] = Section;
|
|
|
|
mapShape[deviceType.Signal] = Signal;
|
|
|
|
mapShape[deviceType.Station] = Station;
|
2019-12-23 10:53:25 +08:00
|
|
|
mapShape[deviceType.Resource] = Resource;
|
2019-11-29 12:51:58 +08:00
|
|
|
mapShape[deviceType.LcControl] = LcControl;
|
|
|
|
mapShape[deviceType.LimitControl] = LimitControl;
|
|
|
|
mapShape[deviceType.Switch] = Switch;
|
|
|
|
mapShape[deviceType.ZcControl] = ZcControl;
|
|
|
|
mapShape[deviceType.StationCounter] = StationCounter;
|
|
|
|
mapShape[deviceType.StationDelayUnlock] = StationDelayUnlock;
|
|
|
|
mapShape[deviceType.StationStand] = StationStand;
|
2019-12-06 18:03:13 +08:00
|
|
|
mapShape[deviceType.Psd] = Psd;
|
2019-11-29 12:51:58 +08:00
|
|
|
mapShape[deviceType.TrainWindow] = TrainWindow;
|
|
|
|
mapShape[deviceType.Train] = Train;
|
|
|
|
mapShape[deviceType.Line] = Line;
|
|
|
|
mapShape[deviceType.Text] = Text2;
|
2020-03-18 09:10:57 +08:00
|
|
|
mapShape[deviceType.AutoTurnBack] = AutoTurnBack;
|
2020-03-05 15:48:51 +08:00
|
|
|
mapShape[deviceType.OutFrame] = OutFrame;
|
2020-03-17 16:12:15 +08:00
|
|
|
mapShape[deviceType.AxleReset] = AxleReset;
|
|
|
|
mapShape[deviceType.GuideLock] = GuideLock;
|
2019-11-29 12:51:58 +08:00
|
|
|
mapShape[deviceType.CheckBox] = CheckBox;
|
2020-03-05 16:39:49 +08:00
|
|
|
mapShape[deviceType.AutomaticRoute] = AutomaticRoute;
|
2020-03-24 15:02:14 +08:00
|
|
|
mapShape[deviceType.AtsControl] = SaidLamp;
|
|
|
|
mapShape[deviceType.CenterCommunication] = SaidLamp;
|
|
|
|
mapShape[deviceType.ChainControl] = SaidLamp;
|
|
|
|
mapShape[deviceType.IntersiteControl] = SaidLamp;
|
|
|
|
mapShape[deviceType.LeuControl] = SaidLamp;
|
|
|
|
mapShape[deviceType.LocalControl] = SaidLamp;
|
|
|
|
mapShape[deviceType.Maintain] = SaidLamp;
|
|
|
|
mapShape[deviceType.PowerSupply] = SaidLamp;
|
|
|
|
mapShape[deviceType.NoOneReturn] = SaidLamp;
|
|
|
|
mapShape[deviceType.MaintenanceLamps] = SaidLamp;
|
2020-03-24 16:35:09 +08:00
|
|
|
mapShape[deviceType.ZcCommunication] = SaidLamp;
|
2020-04-14 15:45:13 +08:00
|
|
|
mapShape[deviceType.ControlSwitch] = SaidLamp;
|
|
|
|
mapShape[deviceType.LampFilament] = SaidLamp;
|
|
|
|
mapShape[deviceType.ModeStatusGroup] = SaidLamp;
|
|
|
|
mapShape[deviceType.FaultStatusGroup] = SaidLamp;
|
|
|
|
mapShape[deviceType.ReturnModeGroup] = SaidLamp;
|
|
|
|
mapShape[deviceType.Axle] = SaidLamp;
|
2020-04-22 17:12:29 +08:00
|
|
|
mapShape[deviceType.SwitchFault] = SaidLamp;
|
2020-04-15 14:13:08 +08:00
|
|
|
mapShape[deviceType.SplitStation] = SplitStation;
|
2020-04-26 16:24:34 +08:00
|
|
|
mapShape[deviceType.Arrow] = Arrow;
|
2020-05-28 14:39:06 +08:00
|
|
|
mapShape[deviceType.Power] = Power;
|
2020-06-04 17:29:18 +08:00
|
|
|
mapShape[deviceType.StationTurnBack] = StationTurnBack;
|
2020-08-13 19:27:02 +08:00
|
|
|
mapShape[deviceType.OverAp] = OverAp;
|
2019-11-29 12:51:58 +08:00
|
|
|
|
|
|
|
function shapefactory(device, jmap) {
|
|
|
|
const type = device._type;
|
|
|
|
const shape = mapShape[type];
|
|
|
|
if (shape instanceof Function) {
|
|
|
|
// eslint-disable-next-line
|
|
|
|
return new shape(device, jmap.style);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default shapefactory;
|