From 8b3c7eadc575cad95857186eb14fd877b302fd8b Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 24 Jun 2022 16:37:42 +0800 Subject: [PATCH] =?UTF-8?q?JD=5F1A=E7=BA=BF=E8=B7=AF=E5=BB=BA=E7=AB=8B-?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/deviceStyle.js | 3 +- src/jmapNew/theme/datie_jd1a/model.js | 71 +++++++++++++++++++++++++++ src/utils/baseUrl.js | 4 +- 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 src/jmapNew/theme/datie_jd1a/model.js diff --git a/src/jmapNew/config/deviceStyle.js b/src/jmapNew/config/deviceStyle.js index 4cd3bdd4b..32e333d85 100644 --- a/src/jmapNew/config/deviceStyle.js +++ b/src/jmapNew/config/deviceStyle.js @@ -15,7 +15,8 @@ const mapDeviceStyle = { '14':'nanjing_02', // 南京二号线 '15': 'datie_01', // 大铁线路一 '16': 'datie_02', // 大铁线路二 - '17':'datie_tky' // 铁科院大铁线路 + '17':'datie_tky', // 铁科院大铁线路 + '18':'datie_jd1a' }; export function selectLineCode(code) { diff --git a/src/jmapNew/theme/datie_jd1a/model.js b/src/jmapNew/theme/datie_jd1a/model.js new file mode 100644 index 000000000..c7d80a99e --- /dev/null +++ b/src/jmapNew/theme/datie_jd1a/model.js @@ -0,0 +1,71 @@ +import deviceType from '../../constant/deviceType'; + +class Model { + constructor() { + this.screenLine = 3; + // 公共字段部分默认初始值 + this['public'] = {}; + this['public'][deviceType.Signal] = { + lampPositionType: '02', + lampPostType: '02' + }; + + // 私有字段部分默认初始值 + this['private'] = {}; + this['private'][deviceType.StationControl] = { + indicatorShow: true // 标识灯名称显示 + }; + this['private'][deviceType.Station] = { + kmPostShow: true // 公里标显示 + }; + this['private'][deviceType.Switch] = { + nameShow: true + }; + this['private'][deviceType.Section] = { + nameShow: true, + borderBorderShow: true, // 区段边界显示 + destinationNameShow: true, // 目的地码名称显示 + standTrackNameShow: true, // 站台轨名称显示 + reentryTrackNameShow: true, // 折返轨名称显示 + transferTrackNameShow: true // 转换轨名称显示 + }; + this['private'][deviceType.Signal] = { + nameShow: true, // 信号机名称显示 + linkageAutoRouteShow: true, // 联锁自动进路表示灯显示 + atsAutoTriggerShow: true // ATS自动触发表示灯显示 + }; + this['private'][deviceType.Train] = { + }; + this['private'][deviceType.TrainWindow] = { + trainWindowShow: true + }; + } + + initPublicProps(model) { + if (model) { + var modelInitial = this.public[model._type]; + if (modelInitial) { + for (var prop in modelInitial) { + model[prop] = modelInitial[prop]; + } + } + } + + return model; + } + + initPrivateProps(model) { + if (model) { + var modelInitial = this.private[model._type]; + if (modelInitial) { + for (var prop in modelInitial) { + model[prop] = modelInitial[prop]; + } + } + } + + return model; + } +} + +export default new Model(); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index f2ce36aff..05d02e164 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -24,7 +24,7 @@ export function handlerUrl(data) { if (process.env.NODE_ENV === 'development') { // const data = null; // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 // BASE_API = 'http://192.168.8.172:9200'; // 旭强 @@ -33,7 +33,7 @@ export function handlerUrl(data) { // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 - BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 + // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 // BASE_API = data && data.domainName ? 'https://' + data.domainName : BASE_API; BASE_API = data && data.domainName ? 'http://' + data.domainName : BASE_API; VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';