diff --git a/src/jmapNew/config/deviceStyle.js b/src/jmapNew/config/deviceStyle.js
index 7b079c099..5f92bd9bb 100644
--- a/src/jmapNew/config/deviceStyle.js
+++ b/src/jmapNew/config/deviceStyle.js
@@ -1,6 +1,6 @@
const mapDeviceStyle = {
'01': 'chengdu_01',
- // '01': 'xian_02',
+ // '01': 'xian_02',
'02': 'fuzhou_01',
'03': 'bejing_01',
'04': 'chengdu_03',
diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js
index 11359fa25..8d0b9cddd 100644
--- a/src/jmapNew/config/skinCode/xian_02.js
+++ b/src/jmapNew/config/skinCode/xian_02.js
@@ -98,7 +98,8 @@ class SkinCode extends defaultStyle {
axle: {
radius: 3, // 计轴 半径
distance: 5, // 计轴和区段之间的距离 (未用)
- color: 'white', // 区段计轴颜色
+ color: '#808080', // 区段计轴颜色
+ occupyColor: '#FF0000', // 区段计轴占用颜色
resetColor: '#00FFFF', // 区段计轴预复位颜色
Failure: '#E6A23C' // #FFFF00 计轴失效
},
diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js
index aad226366..80cd14f6e 100644
--- a/src/jmapNew/map.js
+++ b/src/jmapNew/map.js
@@ -332,6 +332,8 @@ class Jlmap {
}
update(list) {
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
+ const signalDeviceList = [];
+ const signalStatusList = [];
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
@@ -347,8 +349,12 @@ class Jlmap {
}
const signalDevice = this.mapDevice[route.startSignalCode];
const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode};
- if (this.hookHandle(signalDevice, signalStatus)) {
- this.$painter.update(signalDevice);
+ const index = signalDeviceList.indexOf(signalDevice);
+ if (index === -1) {
+ signalDeviceList.push(signalDevice);
+ signalStatusList.push(signalStatus);
+ } else {
+ signalStatusList[index] = {atsControl: signalStatusList[index].atsControl && elem.atsControl, fleetMode: signalStatusList[index].fleetMode || elem.fleetMode};
}
} else if (elem.deviceType === 'CYCLE') {
store.dispatch('map/updateAutoReentryState', elem);
@@ -385,13 +391,19 @@ class Jlmap {
}
}
});
-
+ this.handleRouteSignalStatus(signalDeviceList, signalStatusList);
// 状态后处理
this.postHandle(list || []);
if (this.methods.stateUpdate instanceof Function) { this.methods.stateUpdate(list); }
}
-
+ handleRouteSignalStatus(signalDeviceList, signalStatusList) {
+ signalDeviceList.forEach((item, index)=> {
+ if (item && this.hookHandle(item, signalStatusList[index])) {
+ this.$painter.update(item);
+ }
+ });
+ }
pullBack(payload) {
if (payload.type === 'zoom') {
const zrWidth = this.$zr.getWidth();
diff --git a/src/jmapNew/shape/Section/EAxle.js b/src/jmapNew/shape/Section/EAxle.js
index ff299b4c9..4be5695a3 100644
--- a/src/jmapNew/shape/Section/EAxle.js
+++ b/src/jmapNew/shape/Section/EAxle.js
@@ -7,13 +7,17 @@ import Path from 'zrender/src/graphic/Path';
export const EAxle = Path.extend({
type: 'EAxle',
shape: {
- point: null
+ // style: this.style,
+ // traingle: traingle11,
+ // drictx: 1,
+ // dricty: 1,
+ // point: this.model.points[0]
},
buildPath: function (ctx, model) {
if (model && model.style && model.traingle) {
const axleLength = 2 * model.style.Section.axle.radius;
- const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength));
- const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength));
+ const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength) * 1.2);
+ const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength) * 1.2);
// 圆弧
const arcX = positionx - model.dricty * model.traingle.getSin(axleLength);
const arcY = positiony + model.drictx * model.traingle.getSin(axleLength);
@@ -23,8 +27,8 @@ export const EAxle = Path.extend({
const x1 = positionx - model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength);
const y1 = positiony + model.drictx * model.traingle.getSin(axleLength) - model.traingle.getSin(axleLength);
- const x2 = positionx + model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength);
- const y2 = positiony + model.drictx * model.traingle.getSin(axleLength) + model.traingle.getSin(axleLength);
+ const x2 = positionx + model.traingle.getCos(axleLength * 1.5) - model.dricty * model.traingle.getSin(axleLength);
+ const y2 = positiony + model.drictx * model.traingle.getSin(axleLength * 1.5) + model.traingle.getSin(axleLength);
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.closePath();
diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js
index 084a105ec..53aeff108 100644
--- a/src/jmapNew/shape/Section/index.js
+++ b/src/jmapNew/shape/Section/index.js
@@ -6,7 +6,7 @@ import ELines from './ELines'; // 创建多线条 曲线 (私有)
import EblockLines from './EblockLines'; // 区段封锁特有
import ESeparator from './ESeparator'; // 分隔符 (私有)
import EMouse from './EMouse';
-// import { EAxle } from './EAxle'; // 创建计轴 (暂时不使用)
+import { EAxle } from './EAxle'; // 创建计轴 (暂时不使用)
import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路箭头
import ELimitName from './ELimitName'; // 成都三号线 限速名称
import JTriangle from '../../utils/JTriangle';
@@ -39,6 +39,23 @@ export default class Section extends Group {
this.creatRelease(); // 创建延时释放
this.createSeparator(); // 创建分隔符
this.createTurnBack(); // 创建成都三号线 折返箭头
+ // this.createAxles();
+ /* 计轴 */
+ // const traingle11 = new JTriangle(this.model.points[0], this.model.points[1]);
+ // this.axle = new EAxle({
+ // shape: {
+ // style: this.style,
+ // traingle: traingle11,
+ // drictx: 1,
+ // dricty: 1,
+ // point: this.model.points[0]
+ // },
+ // style: {
+ // fill: this.style.Section.axle.color,
+ // stroke: this.style.Section.axle.color
+ // }
+ // });
+ // this.add(this.axle);
}
// 创建区段名称
@@ -209,6 +226,7 @@ export default class Section extends Group {
});
this.add(this.destinationText);
}
+
}
}
diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js
index 7d72dcb73..1622ced7f 100644
--- a/src/jmapNew/shape/Signal/index.js
+++ b/src/jmapNew/shape/Signal/index.js
@@ -566,11 +566,11 @@ class Signal extends Group {
}
setLowButtonActive() {
- this.lowButton.setLowButtonActive();
+ this.lowButton && this.lowButton.setLowButtonActive();
}
setLowButtonRecover() {
- this.lowButton.setLowButtonRecover();
+ this.lowButton && this.lowButton.setLowButtonRecover();
}
}
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue
index 6b378a621..14df4b555 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue
@@ -139,7 +139,7 @@ export default {
watch: {
'$store.state.menuOperation.setMenuChangeCount': function (val) {
if (this.selected._type) {
- if (this.selected._type == 'Section' && this.selected.type == '03') {
+ if (this.selected._type == 'Section' && (this.selected.type == '03' || this.selected.type == '04')) { // 道岔区段 道岔计轴区段 都是道岔操作
this.selected = this.selected.switch;
}
this.canCommand = true;
diff --git a/src/jmapNew/theme/ningbo_01/operationConfig.js b/src/jmapNew/theme/ningbo_01/operationConfig.js
index cb4f02fc9..73b76ffe0 100644
--- a/src/jmapNew/theme/ningbo_01/operationConfig.js
+++ b/src/jmapNew/theme/ningbo_01/operationConfig.js
@@ -693,11 +693,11 @@ export default {
operateType: 'Signal_Block',
skinCode: '06',
trainingName: '信号封锁({5})',
- trainingRemark: '信号封闭',
+ trainingRemark: '信号封锁',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
- { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' },
+ { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
]
},
diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js
index 225c78190..deeb34c7a 100644
--- a/src/jmapNew/utils/parser.js
+++ b/src/jmapNew/utils/parser.js
@@ -192,6 +192,8 @@ export function parser(data, skinCode, showConfig) {
if (cnodeSection && lnodeSection && rnodeSection) {
cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code];
+ const sectionParent = mapDevice[cnodeSection.parentCode];
+ sectionParent['switch'] = mapDevice[elem.code];
if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) {
mapDevice[elem.code].intersection = {
x: cnodeSection.points[0].x,
diff --git a/src/router/index_Common.js b/src/router/index_Common.js
index f467a4aea..91d893624 100644
--- a/src/router/index_Common.js
+++ b/src/router/index_Common.js
@@ -52,6 +52,7 @@ const Taskmanage = () => import('@/views/lesson/taskmanage/list');
const TrainingRuleList = () => import('@/views/lesson/trainingRule/list');
const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index');
const Trainingmanage = () => import('@/views/lesson/trainingmanage/index');
+const TrainingmanageOld = () => import('@/views/lesson/trainingmanage/oldMap');
const LessonEdit = () => import('@/views/lesson/lessoncategory/index');
const LessonHome = () => import('@/views/lesson/home');
const LessonDetail = () => import('@/views/lesson/details');
@@ -312,6 +313,11 @@ export const asyncRouter = [
component: Trainingmanage,
hidden: true
},
+ {// 老地图实训管理
+ path: 'lesson/TrainingmanageOld',
+ component: TrainingmanageOld,
+ hidden: true
+ },
{ // 创建课程
path: 'lesson/edit/:type',
component: LessonEdit,
diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js
index 8c1af282b..35c1a79de 100644
--- a/src/scripts/ConstDic.js
+++ b/src/scripts/ConstDic.js
@@ -2291,6 +2291,7 @@ export const UrlConfig = {
trainingRule: '/design/lesson/trainingRule',
trainingRuleDetail: '/design/lesson/trainingRule/detail',
trainingManage: '/design/lesson/trainingManage',
+ trainingManageOld: '/design/lesson/trainingManageOld',
lessonTraining: '/design/lesson/training',
trainingRecord: '/design/lesson/training',
runPlan: '/design/runPlan/detail',
diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue
index 490f910ca..93600be5d 100644
--- a/src/views/lesson/home.vue
+++ b/src/views/lesson/home.vue
@@ -209,7 +209,11 @@ export default {
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
},
trainingManage() {
- this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});
+ if (this.$route.query.drawWay + '' === 'true') {
+ this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});
+ } else {
+ this.$router.push({path: `${UrlConfig.design.trainingManageOld}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});
+ }
},
operationManage() {
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode}});
diff --git a/src/views/lesson/trainingRule/addBatch.vue b/src/views/lesson/trainingRule/addBatch.vue
index 65c4904a5..591c4074f 100644
--- a/src/views/lesson/trainingRule/addBatch.vue
+++ b/src/views/lesson/trainingRule/addBatch.vue
@@ -6,6 +6,7 @@
width="25%"
:before-close="handleClose"
center
+ :z-index="2000"
>