From e71c68f7bcb5506123b5ee5dbb39f99baeaab606 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Tue, 6 Aug 2019 10:54:22 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9signal=20=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmap/config/skinStyle/bejing_01.js | 7 +-
src/jmap/config/skinStyle/chengdu_03.js | 1 +
src/jmap/config/skinStyle/fuzhou_01.js | 5 +-
src/jmap/shape/Signal/ESigAuto.js | 8 +-
src/jmap/shape/Signal/index.js | 14 +-
src/jmap/shape/Train/index.js | 44 +-
.../batong_01/menus/menuDialog/viewDevice.vue | 306 +++++------
.../menus/menuDialog/viewDevice.vue | 307 +++++------
.../menus/menuDialog/viewDevice.vue | 307 +++++------
.../fuzhou_01/menus/menuDialog/viewName.vue | 486 +++++++++---------
10 files changed, 767 insertions(+), 718 deletions(-)
diff --git a/src/jmap/config/skinStyle/bejing_01.js b/src/jmap/config/skinStyle/bejing_01.js
index b217a529d..aa309186d 100644
--- a/src/jmap/config/skinStyle/bejing_01.js
+++ b/src/jmap/config/skinStyle/bejing_01.js
@@ -147,14 +147,17 @@ class SkinStyle extends defaultStyle {
},
route: {
direction: false, // 自动进路方向
- offset: { x: 4, y: -2 }, // 自动进路偏移量
+ offset: { x: 1, y: -2 }, // 自动进路偏移量
routeColor: '#00FF00' // 自动进路
},
auto: {
direction: true, // 自动通过方向
offset: { x: 4, y: 0}, // 自动通过偏移量
+ width: 5, // 自动宽度
autoRoute: '#00FF00', // 自动进路
- autoTrigger: '#FFFF00' // 自动触发
+ autoTrigger: '#FFFF00', // 自动触发
+ manualControl: '#FFFF00', // 人工控制
+ outConflict: '#C00808' // 出车冲突
},
delay: {
direction: false, // 延时解锁方向
diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js
index ad9c8ac37..9e5e2eff5 100644
--- a/src/jmap/config/skinStyle/chengdu_03.js
+++ b/src/jmap/config/skinStyle/chengdu_03.js
@@ -156,6 +156,7 @@ class SkinStyle extends defaultStyle {
auto: {
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
+ width: 5, // 自动宽度
manualControl: '#FFFF00', // 人工控制
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js
index c42e96ba7..1e8268f2e 100644
--- a/src/jmap/config/skinStyle/fuzhou_01.js
+++ b/src/jmap/config/skinStyle/fuzhou_01.js
@@ -148,8 +148,11 @@ class SkinStyle extends defaultStyle {
auto: {
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
+ width: 5, // 自动宽度
autoRoute: '#00FF00', // 自动进路
- autoTrigger: '#FFFF00' // 自动触发
+ autoTrigger: '#FFFF00', // 自动触发
+ manualControl: '#FFFF00', // 人工控制
+ outConflict: '#C00808' // 出车冲突
},
delay: {
direction: true, // 延时解锁方向
diff --git a/src/jmap/shape/Signal/ESigAuto.js b/src/jmap/shape/Signal/ESigAuto.js
index 66bb18d03..6d80623d9 100644
--- a/src/jmap/shape/Signal/ESigAuto.js
+++ b/src/jmap/shape/Signal/ESigAuto.js
@@ -14,15 +14,15 @@ class ESigPass extends Group {
const model = this.model;
const style = this.model.style;
const rotation = model.drict != 1? 0 : Math.PI;
- const point = arrow(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.radiusR * 0.8);
this.isNew = true;
this.arrow = new Polygon({
zlevel: model.zlevel,
z: model.z,
+ origin: [model.x, model.y],
rotation: rotation,
shape: {
- points: point
+ points: arrow(model.x, model.y, style.Signal.auto.width, style.Signal.lamp.radiusR * 0.8)
},
style: {
stroke: model.stroke,
@@ -55,9 +55,9 @@ class ESigPass extends Group {
this.arrow.animateStyle(true)
.when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor })
- .when(2000, { fill: fill, stroke: style.Signal.sidelineColor })
+ .when(2000, { fill: fill, stroke: style.sidelineColor })
.when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor })
- .when(4000, { fill: fill, stroke: style.Signal.sidelineColor })
+ .when(4000, { fill: fill, stroke: style.sidelineColor })
.start();
}
diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js
index 0ff0e05f1..be5038ac2 100644
--- a/src/jmap/shape/Signal/index.js
+++ b/src/jmap/shape/Signal/index.js
@@ -113,8 +113,8 @@ class Signal extends Group {
drict: drict,
x: sigAutoX,
y: sigAutoY,
- width: style.Signal.signalAutoWidth,
- fill: style.Signal.lamp.autoRoute,
+ width: style.Signal.auto.width,
+ fill: style.Signal.auto.autoRoute,
lineWidth: 0.6,
stroke: style.sidelineColor
});
@@ -383,24 +383,22 @@ class Signal extends Group {
// 设置自动进路模式状态类型
setAutoRouteOpen() {
+ this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
if (this.model.linkageAutoRouteShow) {
this.sigAuto.show();
} else {
this.sigAuto.hide();
}
-
- this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
}
// 信号机进路自动触发模式状态类型
setAutoAccessOpen() {
+ this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
if (this.model.atsAutoTriggerShow) {
this.sigAuto.show();
} else {
this.sigAuto.hide();
}
-
- this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
}
// 设置自动信号模式状态类型
@@ -427,6 +425,8 @@ class Signal extends Group {
// 恢复状态
recover() {
+ this.sigAuto.hide();
+ this.sigRoute.hide();
this.sigDelay.hide();
this.sigAuto.animationRecover();
this.sigName.setColor(this.style.Signal.text.defaultColor);
@@ -458,7 +458,6 @@ class Signal extends Group {
}
/** 设置自动类型*/
- model.autoType = '04';
switch (model.autoType) {
case '01': this.setAutoClose(); break; // 隐藏 隐藏自动信号和自动进路
case '02': this.setAutoSignalOpen(); break; // 显示 设置自动信号模式状态类型
@@ -475,7 +474,6 @@ class Signal extends Group {
/** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/
if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) {
- console.log(11111111111111111111);
this.setAutoFlicker();
}
}
diff --git a/src/jmap/shape/Train/index.js b/src/jmap/shape/Train/index.js
index ca396517d..729343d18 100644
--- a/src/jmap/shape/Train/index.js
+++ b/src/jmap/shape/Train/index.js
@@ -129,12 +129,12 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.serverNoType.length>0) {
const flag = this.style.Train.trainStatusStyle.serverNoType.some((item) =>{
if (type === item.type) {
- this.trainB.setTextTrainServerColor(item.showColor);
+ this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
return true;
}
});
if (this.style.Train.trainStatusStyle.defaultServerNoColor && !flag) {
- this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultServerNoColor);
+ this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultServerNoColor);
}
}
}
@@ -146,13 +146,13 @@ export default class Train extends Group {
if (status === item.status) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
case 'trainTarget':
- this.trainB.setTextTrainTargetColor(item.showColor);
+ this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
break;
case 'trainServer':
- this.trainB.setTextTrainServerColor(item.showColor);
+ this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
break;
default:
- this.trainB.setTextTrainTargetColor(item.showColor);
+ this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
}
return true;
}
@@ -160,13 +160,13 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.defaultDestinationColor && !flag) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
case 'trainTarget':
- this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
+ this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
case 'trainServer':
- this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
+ this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
default:
- this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
+ this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
}
}
}
@@ -177,10 +177,10 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.directionType.length > 0) {
this.style.Train.trainStatusStyle.directionType.some((item) => {
if (type === item.type) {
- this.trainL.setLineShow(item.lineLShow);
- this.trainL.setArrowShow(item.arrowLShow);
- this.trainR.setLineShow(item.lineRShow);
- this.trainR.setArrowShow(item.arrowRShow);
+ this.trainL && this.trainL.setLineShow(item.lineLShow);
+ this.trainL && this.trainL.setArrowShow(item.arrowLShow);
+ this.trainR && this.trainR.setLineShow(item.lineRShow);
+ this.trainR && this.trainR.setArrowShow(item.arrowRShow);
return true;
}
});
@@ -191,8 +191,8 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.directionStopType.length > 0) {
this.style.Train.trainStatusStyle.directionStopType.some((item) => {
if (type === item.type) {
- this.trainL.setLineShow(item.lineLShow);
- this.trainR.setLineShow(item.lineRShow);
+ this.trainL && this.trainL.setLineShow(item.lineLShow);
+ this.trainR && this.trainR.setLineShow(item.lineRShow);
return true;
}
});
@@ -215,8 +215,8 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.runModeStatus.length > 0) {
this.style.Train.trainStatusStyle.runModeStatus.some((item) => {
if (status === item.status) {
- this.trainL.setColor(item.trainLColor);
- this.trainR.setColor(item.trainRColor);
+ this.trainL && this.trainL.setColor(item.trainLColor);
+ this.trainR &&this.trainR.setColor(item.trainRColor);
return true;
}
});
@@ -227,8 +227,8 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.runControlStatus.length > 0) {
this.style.Train.trainStatusStyle.runControlStatus.some((item) => {
if (status === item.status) {
- this.trainB.setHShow(item.hShow);
- this.trainB.setSShow(item.sShow);
+ this.trainB && this.trainB.setHShow(item.hShow);
+ this.trainB && this.trainB.setSShow(item.sShow);
return true;
}
});
@@ -239,7 +239,7 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.doorStatus.length > 0) {
this.style.Train.trainStatusStyle.doorStatus.some((item) => {
if (status === item.status) {
- this.trainB.setDShow(item.dShow);
+ this.trainB && this.trainB.setDShow(item.dShow);
return true;
}
});
@@ -250,7 +250,7 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.communicationStatus.length > 0) {
this.style.Train.trainStatusStyle.communicationStatus.some((item) => {
if (status === item.status) {
- this.trainB.setTrainColor(item.trainColor);
+ this.trainB && this.trainB.setTrainColor(item.trainColor);
return true;
}
});
@@ -261,7 +261,7 @@ export default class Train extends Group {
if (this.style.Train.trainStatusStyle.alarmStatus.length >0) {
this.style.Train.trainStatusStyle.alarmStatus.some((item) => {
if (status === item.status) {
- this.trainB.setAShow(item.aShow);
+ this.trainB && this.trainB.setAShow(item.aShow);
return true;
}
});
@@ -314,7 +314,7 @@ export default class Train extends Group {
this.style.Train.common.trainWidth = this.size * this.fontSize * (2 / 3) -16;
}
removeTrainDetail() {
- this.trainB.removeTrainDetail();
+ this.trainB && this.trainB.removeTrainDetail();
}
getBoundingRect() {
diff --git a/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue b/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue
index 839281353..849c50c99 100644
--- a/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue
+++ b/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue
@@ -1,165 +1,175 @@
-
-
-
- 车次窗
-
-
- 区段边界
-
-
- 联锁自动进路表示灯
-
-
- ATS自动触发表示灯
-
-
-
-
- 确定
-
-
- 取 消
-
-
-
-
+
+
+
+ 车次窗
+
+
+ 区段边界
+
+
+ 联锁自动进路表示灯
+
+
+ ATS自动触发表示灯
+
+
+
+
+ 确定
+
+
+ 取 消
+
+
+
+
\ No newline at end of file
+
diff --git a/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue b/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue
index 5d4364e7c..8d70ab278 100644
--- a/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue
+++ b/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue
@@ -1,164 +1,177 @@
-
-
-
- 车次窗
-
-
- 区段边界
-
-
- 联锁自动进路表示灯
-
-
- ATS自动触发表示灯
-
-
-
-
- 确定
-
-
-
- 取 消
-
-
-
-
+
+
+
+ 车次窗
+
+
+ 区段边界
+
+
+ 联锁自动进路表示灯
+
+
+ ATS自动触发表示灯
+
+
+
+
+ 确定
+
+
+
+ 取 消
+
+
+
+
\ No newline at end of file
+
diff --git a/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue b/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue
index e893b78f7..e72052eaa 100644
--- a/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue
+++ b/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue
@@ -1,164 +1,177 @@
-
-
-
- 车次窗
-
-
- 区段边界
-
-
- 联锁自动进路表示灯
-
-
- ATS自动触发表示灯
-
-
-
-
- 确定
-
-
-
- 取 消
-
-
-
-
+
+
+
+ 车次窗
+
+
+ 区段边界
+
+
+ 联锁自动进路表示灯
+
+
+ ATS自动触发表示灯
+
+
+
+
+ 确定
+
+
+
+ 取 消
+
+
+
+
\ No newline at end of file
+
diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue
index d13bc968d..dd98d0c98 100644
--- a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue
+++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue
@@ -1,259 +1,267 @@
-
-
-
-
- 信号机名称
-
-
- 站台轨名称
-
-
-
-
- 按钮名称
-
-
- 折返轨名称
-
-
-
-
- 股道名称
-
-
- 转换轨名称
-
-
-
-
- 道岔名称
-
-
- 标识灯名称
-
-
-
-
- 道岔区段名称
-
-
- 目的地名称
-
-
-
-
- 计轴区段名称
-
-
- 公里标
-
-
-
-
-
- 确定
-
-
- 取 消
-
-
-
-
+
+
+
+
+ 信号机名称
+
+
+ 站台轨名称
+
+
+
+
+ 按钮名称
+
+
+ 折返轨名称
+
+
+
+
+ 股道名称
+
+
+ 转换轨名称
+
+
+
+
+ 道岔名称
+
+
+ 标识灯名称
+
+
+
+
+ 道岔区段名称
+
+
+ 目的地名称
+
+
+
+
+ 计轴区段名称
+
+
+ 公里标
+
+
+
+
+
+ 确定
+
+
+ 取 消
+
+
+
+
\ No newline at end of file
+ this.$store.dispatch('map/updateMapDevices', deviceList);
+ }
+ }
+};
+