-
-
-
-
-
+
-
\ No newline at end of file
+
diff --git a/src/jmap/theme/fuzhou_01/planSchedule/statusBar.vue b/src/jmap/theme/fuzhou_01/planSchedule/statusBar.vue
index f85d6c6ce..4c1418fb3 100644
--- a/src/jmap/theme/fuzhou_01/planSchedule/statusBar.vue
+++ b/src/jmap/theme/fuzhou_01/planSchedule/statusBar.vue
@@ -1,95 +1,102 @@
-
+
-
\ No newline at end of file
+
diff --git a/src/jmap/theme/fuzhou_01/planSchedule/titleBar.vue b/src/jmap/theme/fuzhou_01/planSchedule/titleBar.vue
index 689c3486a..f157ced61 100644
--- a/src/jmap/theme/fuzhou_01/planSchedule/titleBar.vue
+++ b/src/jmap/theme/fuzhou_01/planSchedule/titleBar.vue
@@ -1,44 +1,44 @@
-
-
-
{{mapName}}
-
({{runPlanName}})
-
-
+
+
+
{{ mapName }}
+
({{ runPlanName }})
+
+
-
\ No newline at end of file
+
diff --git a/src/jmap/utils/parser.js b/src/jmap/utils/parser.js
index e07e70a20..e9d282e03 100644
--- a/src/jmap/utils/parser.js
+++ b/src/jmap/utils/parser.js
@@ -33,80 +33,85 @@ export function deviceFactory(type, elem) {
return Object.assign({ _type: type }, deviceRender[type], elem);
}
-export function parser(data, jmap) {
+export function createDevice(type, model, propConvert) {
+ const device = deviceFactory(type, model);
+ return propConvert ? propConvert.initPrivateProps(device) : device;
+}
+
+export function parser(data, skinStyle) {
var mapDevice = {};
- var propConvert = Vue.prototype.$theme.loadPropConvert(jmap.skinStyle);
+ var propConvert = skinStyle ? Vue.prototype.$theme.loadPropConvert(skinStyle): null;
if (data) {
zrUtil.each(data.linkList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Link, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Link, elem, propConvert);
}, this);
zrUtil.each(data.sectionList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Section, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Section, elem, propConvert);
}, this);
zrUtil.each(data.signalList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Signal, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Signal, elem, propConvert);
}, this);
zrUtil.each(data.stationList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Station, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Station, elem, propConvert);
}, this);
zrUtil.each(data.stationStandList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationStand, elem));
+ mapDevice[elem.code] = createDevice(deviceType.StationStand, elem, propConvert);
}, this);
zrUtil.each(data.stationControlList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationControl, elem));
+ mapDevice[elem.code] = createDevice(deviceType.StationControl, elem, propConvert);
}, this);
zrUtil.each(data.counterList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationCounter, elem));
+ mapDevice[elem.code] = createDevice(deviceType.StationCounter, elem, propConvert);
}, this);
zrUtil.each(data.delayShowList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationDelayUnlock, elem));
+ mapDevice[elem.code] = createDevice(deviceType.StationDelayUnlock, elem, propConvert);
}, this);
zrUtil.each(data.lineList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Line, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
}, this);
zrUtil.each(data.textList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Text, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
}, this);
zrUtil.each(data.zcList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.ZcControl, elem));
+ mapDevice[elem.code] = createDevice(deviceType.ZcControl, elem, propConvert);
}, this);
zrUtil.each(data.lcList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.LcControl, elem));
+ mapDevice[elem.code] = createDevice(deviceType.LcControl, elem, propConvert);
}, this);
zrUtil.each(data.tempSpeedLimitList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.LimitControl, elem));
+ mapDevice[elem.code] = createDevice(deviceType.LimitControl, elem, propConvert);
}, this);
zrUtil.each(data.resourceList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.ImageControl, elem));
+ mapDevice[elem.code] = createDevice(deviceType.ImageControl, elem, propConvert);
}, this);
zrUtil.each(data.trainList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Train, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Train, elem, propConvert);
}, this);
zrUtil.each(data.Line || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Line, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
}, this);
zrUtil.each(data.Text || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Text, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
}, this);
zrUtil.each(data.trainWindowList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.TrainWindow, elem));
+ mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert);
if (elem.sectionCode) {
const section = mapDevice[elem.sectionCode];
if (section) {
@@ -116,7 +121,7 @@ export function parser(data, jmap) {
}, this);
zrUtil.each(data.switchList || [], elem => {
- mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Switch, elem));
+ mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert);
const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode];
const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode];
const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode];
diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js
index 7bc549125..24c3b19b3 100644
--- a/src/scripts/ConstConfig.js
+++ b/src/scripts/ConstConfig.js
@@ -73,13 +73,13 @@ export default {
{ label: 'SHD三联段线', value: '18' },
{ label: 'SHD四联段线', value: '19' }
],
- roleType:[
- {label:'管理员',value:'Admin'},
- {label:'教员',value:'Instructor'},
- {label:'行调',value:'Dispatcher'},
- {label:'车站',value:'Attendant'},
- {label:'观众',value:'Audience'},
- {label:'司机',value:'Driver'},
+ roleType: [
+ {label: '管理员', value: 'Admin'},
+ {label: '教员', value: 'Instructor'},
+ {label: '行调', value: 'Dispatcher'},
+ {label: '车站', value: 'Attendant'},
+ {label: '观众', value: 'Audience'},
+ {label: '司机', value: 'Driver'}
],
SimulationType: [
@@ -88,14 +88,14 @@ export default {
{ label: '综合演练', value: 'Joint'},
{ label: '大屏', value: 'BigScreen'},
{ label: '琏计划', value: 'RunPlan'},
- { label: '任务录制', value: 'ScriptRecord'},
+ { label: '任务录制', value: 'ScriptRecord'}
],
skinCode: [
{ label: '福州一号线', value: '02'},
{ label: '北京一号线', value: '03'},
{ label: '成都三号线', value: '04'},
- { label: '北京八通线', value: '05'},
+ { label: '北京八通线', value: '05'}
]
}
diff --git a/src/store/modules/map.js b/src/store/modules/map.js
index 411bb2f54..73c02851b 100644
--- a/src/store/modules/map.js
+++ b/src/store/modules/map.js
@@ -1,4 +1,5 @@
import deviceType from '@/jmap/constant/deviceType';
+import { parser } from '@/jmap/utils/parser';
import Vue from 'vue';
/**
@@ -190,6 +191,7 @@ const map = {
state: {
map: null, // 地图数据
+ mapDevice: {}, // 解析后的地图数据
mapList: {}, // 地图数据列表
mapViewLoadedCount: 0, // 地图视图加载完成标识
mapDataLoadedCount: 0, // 地图数据加载完成标识
@@ -351,25 +353,21 @@ const map = {
trainDetails: (state) => {
return state.trainDetails;
},
- getDeviceByCode: () => (code) => {
- if (Vue.prototype.$jlmap) {
- return Vue.prototype.$jlmap.getDeviceByCode(code);
- }
+ getDeviceByCode: (state) => (code) => {
+ return state.mapDevice[code];
},
// 查询区段关联的计数器
getCounterBySectionCode: (state) => (code, type) => {
let device = null;
- if (Vue.prototype.$jlmap) {
- var section = Vue.prototype.$jlmap.mapDevice[code];
- if (section) {
- state.map.counterList.forEach(counter => {
- if (counter.stationCode === section.model.stationCode && type == counter.type) {
- device = Vue.prototype.$jlmap.mapDevice[counter.code];
- return;
- }
- });
- }
+ var section = state.mapDevice[code];
+ if (section) {
+ state.map.counterList.forEach(counter => {
+ if (counter.stationCode === section.model.stationCode && type == counter.type) {
+ device = state.mapDevice[counter.code];
+ return;
+ }
+ });
}
return device;
@@ -378,16 +376,14 @@ const map = {
// 查询信号机关联的计数器
getCounterBySingalCode: (state) => (code, type) => {
let device = null;
- if (Vue.prototype.$jlmap) {
- var signal = Vue.prototype.$jlmap.mapDevice[code];
- if (signal) {
- state.map.counterList.forEach(counter => {
- if (counter.stationCode === signal.model.stationCode && type == counter.type) {
- device = Vue.prototype.$jlmap.mapDevice[counter.code];
- return;
- }
- });
- }
+ var signal = state.mapDevice[code];
+ if (signal) {
+ state.map.counterList.forEach(counter => {
+ if (counter.stationCode === signal.model.stationCode && type == counter.type) {
+ device = state.mapDevice[counter.code];
+ return;
+ }
+ });
}
return device;
},
@@ -395,12 +391,12 @@ const map = {
// 查询所属车站关联的控制模式
getStationControlByStationCode: (state) => (code) => {
let device = null;
- if (Vue.prototype.$jlmap && code &&
+ if (code &&
state.map &&
state.map.stationControlList && state.map.stationControlList.length) {
state.map.stationControlList.forEach(elem => {
if (elem.stationCode == code) {
- device = Vue.prototype.$jlmap.mapDevice[elem.code];
+ device = state.mapDevice[elem.code];
}
});
}
@@ -411,7 +407,12 @@ const map = {
mutations: {
setMapData: (state, map) => {
- state.map = map;
+ if (map && map.skinVO) {
+ state.map = map;
+ state.mapDevice = parser(map, map.skinVO.code);
+ } else {
+ state.mapDevice = {};
+ }
},
mapRender: (state, devices) => {
Vue.prototype.$jlmap && Vue.prototype.$jlmap.render(devices);
@@ -450,6 +451,7 @@ const map = {
},
mapClear: (state) => {
state.map = null;
+ state.mapDevice = {};
Vue.prototype.$jlmap && Vue.prototype.$jlmap.clear();
}
},
diff --git a/src/utils/runPlan.js b/src/utils/runPlan.js
index 5076618bd..1bfa6c559 100644
--- a/src/utils/runPlan.js
+++ b/src/utils/runPlan.js
@@ -1,3 +1,5 @@
+import store from '@/store';
+
/** 创建一个车次数据点*/
export function createMartPoint(opt) {
const rotate = opt.directionCode === '2' ? 45 : (opt.directionCode === '1' ? -45 : 0);
@@ -220,7 +222,7 @@ export function ascToNum(asc) {
/** 将时间格式化前补零*/
export function formatTime(time) {
- let str = `${time}` || '';
+ let str = `${time || ''}`;
if (str) {
const list = str.split(':');
str = list.map(elem => {
@@ -231,6 +233,16 @@ export function formatTime(time) {
return str;
}
+/** 通过code将名称格式化*/
+export function formatName(code) {
+ var name = '';
+ const device = store.getters['map/getDeviceByCode'](code);
+ if (device) {
+ name = device.name;
+ }
+ return name;
+}
+
/** 根据索引获取单元格的数据*/
export function getCellValue(Sheet, index) {
let value;
@@ -280,3 +292,4 @@ export function convertSheetToList(Sheet, isReverse) {
return dataList;
}
+
diff --git a/src/views/components/quickMenu/index.vue b/src/views/components/quickMenu/index.vue
index eeb6a895e..5ad6b1ba3 100644
--- a/src/views/components/quickMenu/index.vue
+++ b/src/views/components/quickMenu/index.vue
@@ -211,7 +211,7 @@
top: 0px;
width: 60px;
height: 60px;
- -webkit-transform: rotate(180deg);
+ transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
@@ -231,7 +231,7 @@
top: 35%;
margin-top: -1.5px;
left: 16px;
- -webkit-transform-origin: 0% 50%;
+ transform-origin: 0% 50%;
-moz-transform-origin: 0% 50%;
-ms-transform-origin: 0% 50%;
-o-transform-origin: 0% 50%;
@@ -248,7 +248,7 @@
background: #fff;
position: absolute;
left: 0px;
- -webkit-transform-origin: 0% 50%;
+ transform-origin: 0% 50%;
-moz-transform-origin: 0% 50%;
-ms-transform-origin: 0% 50%;
-o-transform-origin: 0% 50%;
@@ -303,14 +303,14 @@
}
&.active {
- -webkit-transform: rotate(0deg) !important;
+ transform: rotate(0deg) !important;
-moz-transform: rotate(0deg) !important;
-ms-transform: rotate(0deg) !important;
-o-transform: rotate(0deg) !important;
transform: rotate(0deg) !important;
.menu {
- -webkit-transform: scale(0.7);
+ transform: scale(0.7);
-moz-transform: scale(0.7);
-ms-transform: scale(0.7);
-o-transform: scale(0.7);
@@ -321,24 +321,24 @@
margin-top: -1.5px;
left: 50%;
margin-left: -12px;
- -webkit-transform-origin: 50% 50%;
+ transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
- -webkit-transform: rotate(405deg);
+ transform: rotate(405deg);
-moz-transform: rotate(405deg);
-ms-transform: rotate(405deg);
-o-transform: rotate(405deg);
transform: rotate(405deg);
&:before {
- -webkit-transform-origin: 50% 50%;
+ transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
- -webkit-transform: rotate(-450deg);
+ transform: rotate(-450deg);
-moz-transform: rotate(-450deg);
-ms-transform: rotate(-450deg);
-o-transform: rotate(-450deg);
@@ -358,23 +358,23 @@
0%,
100% {
- -webkit-transform: translateY(0px);
+ transform: translateY(0px);
}
10% {
- -webkit-transform: translateY(6px);
+ transform: translateY(6px);
}
30% {
- -webkit-transform: translateY(-4px);
+ transform: translateY(-4px);
}
70% {
- -webkit-transform: translateY(3px);
+ transform: translateY(3px);
}
90% {
- -webkit-transform: translateY(-2px);
+ transform: translateY(-2px);
}
}
@@ -406,7 +406,7 @@
0%,
100% {
- -webkit-transform: translateY(0px);
+ transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
@@ -414,7 +414,7 @@
}
10% {
- -webkit-transform: translateY(6px);
+ transform: translateY(6px);
-moz-transform: translateY(6px);
-ms-transform: translateY(6px);
-o-transform: translateY(6px);
@@ -422,7 +422,7 @@
}
30% {
- -webkit-transform: translateY(-4px);
+ transform: translateY(-4px);
-moz-transform: translateY(-4px);
-ms-transform: translateY(-4px);
-o-transform: translateY(-4px);
@@ -430,7 +430,7 @@
}
70% {
- -webkit-transform: translateY(3px);
+ transform: translateY(3px);
-moz-transform: translateY(3px);
-ms-transform: translateY(3px);
-o-transform: translateY(3px);
@@ -438,7 +438,7 @@
}
90% {
- -webkit-transform: translateY(-2px);
+ transform: translateY(-2px);
-moz-transform: translateY(-2px);
-ms-transform: translateY(-2px);
-o-transform: translateY(-2px);
diff --git a/src/views/demonstration/home.vue b/src/views/demonstration/home.vue
index 95adf3e3c..9cbe4adac 100644
--- a/src/views/demonstration/home.vue
+++ b/src/views/demonstration/home.vue
@@ -15,7 +15,7 @@
城市轨道交通仿真系统以各地铁信号系统为基础,针对培训部分进行改造,旨在构建一套用于行车演示的专业仿真模拟系统。
该系统具有高灵活性以便于将来的扩展升级,同时,仿真系统具备正常操作及故障操作两种模式,除了正常的功能操作以外还可以进行设备的故障模拟。
- {{ $t('hello') }}
+ {{ $t('lesson.content') }}
diff --git a/src/views/jlmap/index.vue b/src/views/jlmap/index.vue
index 31b80bee3..758fa28a5 100644
--- a/src/views/jlmap/index.vue
+++ b/src/views/jlmap/index.vue
@@ -253,7 +253,7 @@ export default {
},
// 设置新的地图数据
setMap(map) {
- this.$jlmap.setMap(map);
+ this.$jlmap.setMap(map, this.$store.state.map.mapDevice);
},
// 刷新地图数据
refresh(map) {
diff --git a/src/views/map/mapdraft/index.vue b/src/views/map/mapdraft/index.vue
index b70ad684b..00745cb9b 100644
--- a/src/views/map/mapdraft/index.vue
+++ b/src/views/map/mapdraft/index.vue
@@ -7,7 +7,6 @@