diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js
index 2cea4f0fb..177eb7228 100644
--- a/src/jmapNew/config/skinCode/xian_02.js
+++ b/src/jmapNew/config/skinCode/xian_02.js
@@ -254,12 +254,14 @@ class SkinCode extends defaultStyle {
detainCar: { // 扣车
position: -1, // 扣车标识在站台上显示方向
text: 'H', // 扣车显示内容
- offset: {x: -8, y: 13}, // 扣车偏移量
+ offset: {x: 8, y: 0}, // 扣车偏移量
centerTrainColor: 'white', // 中心扣车颜色
andCenterTrainColor: 'red', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
fontSize: 10,
- fontWeight: 'normal'
+ fontWeight: 'normal',
+ circleWidth:14, // 西安二号线特殊样式 圆圈的宽度
+ special:true // 西安二号线特殊样式
},
stopTime: { // 停站时间
position: 1, // 停站时间方向
diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js
index 80cd14f6e..d2e7e103a 100644
--- a/src/jmapNew/map.js
+++ b/src/jmapNew/map.js
@@ -294,7 +294,7 @@ class Jlmap {
}
showStationHandlePsd(oDevice, stationCode) {
const standDevice = this.mapDevice[oDevice.standCode];
- if (standDevice.deviceStationCode === stationCode || !stationCode) {
+ if (standDevice && standDevice.deviceStationCode === stationCode || !stationCode) {
this.$painter.updateSpecialShowStation(oDevice, true);
} else {
this.$painter.updateSpecialShowStation(oDevice, false);
diff --git a/src/jmapNew/shape/StationStand/EDetainCircle.js b/src/jmapNew/shape/StationStand/EDetainCircle.js
new file mode 100644
index 000000000..46057353d
--- /dev/null
+++ b/src/jmapNew/shape/StationStand/EDetainCircle.js
@@ -0,0 +1,67 @@
+import Group from 'zrender/src/container/Group';
+import Circle from 'zrender/src/graphic/shape/Circle';
+import Line from 'zrender/src/graphic/shape/Line';
+
+class EDetainCircle extends Group {
+ constructor(model) {
+ super();
+ this.model = model;
+ this.create();
+ }
+
+ create() {
+ const model = this.model;
+ const style = this.model.style;
+ this.detainCircle = new Circle({
+ zlevel: model.zlevel,
+ z: model.z,
+ shape: {
+ cx: model.x,
+ cy: model.y,
+ r: model.radius
+ },
+ style:{
+ lineWidth:2,
+ stroke:style.sidelineColor
+ }
+ });
+ this.line1 = new Line({
+ zlevel: model.zlevel,
+ z: model.z,
+ shape:{
+ x1:model.x - model.radius * 0.7,
+ y1:model.y - model.radius * 0.7,
+ x2:model.x + model.radius * 0.7,
+ y2:model.y + model.radius * 0.7
+ },
+ style:{
+ lineWidth:2,
+ stroke:style.sidelineColor
+ }
+ });
+ this.line2 = new Line({
+ zlevel: model.zlevel,
+ z: model.z,
+ shape:{
+ x1:model.x - model.radius * 0.7,
+ y1:model.y + model.radius * 0.7,
+ x2:model.x + model.radius * 0.7,
+ y2:model.y - model.radius * 0.7
+ },
+ style:{
+ lineWidth:2,
+ stroke:style.sidelineColor
+ }
+ });
+ this.add(this.detainCircle);
+ this.add(this.line1);
+ this.add(this.line2);
+ }
+
+ setColor(color) {
+ this.detainCircle.setStyle('stroke', color);
+ this.line1.setStyle('stroke', color);
+ }
+}
+
+export default EDetainCircle;
diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js
index c1ddfda90..f7a5b3c94 100644
--- a/src/jmapNew/shape/StationStand/index.js
+++ b/src/jmapNew/shape/StationStand/index.js
@@ -12,6 +12,7 @@ import EHighlight from '../element/EHighlight';
import ETrainStop from './ETrainStop';
import ETrainDepart from './ETrainDepart';
import EControl from '../element/EControl';
+import EDetainCircle from './EDetainCircle';
import {isShowThePrdType} from '../../utils/handlePath';
class StationStand extends Group {
@@ -131,21 +132,34 @@ class StationStand extends Group {
this.add(this.reentry);
}
- /** 站台扣车*/
- const detainD = model.right ? 1 : -1;
- const detainX = model.position.x - style.StationStand.detainCar.position * detainD * (style.StationStand.detainCar.offset.x - model.width / 2);
- const detainY = model.position.y + detainD * (style.StationStand.detainCar.offset.y - model.height / 2);
- this.detain = new EDetain({
- zlevel: this.zlevel,
- z: this.z,
- style: style,
- x: detainX,
- y: detainY,
- width: model.width,
- inside: model.inside,
- right: model.right
- });
- this.add(this.detain);
+ if (style.StationStand.detainCar.special) {
+ const detainD = model.right ? 1 : -1;
+ this.detainCircle = new EDetainCircle({
+ zlevel: this.zlevel,
+ z: this.z,
+ style: style,
+ x: model.position.x + (model.width / 2) * detainD + detainD * style.StationStand.detainCar.offset.x + detainD * style.StationStand.detainCar.circleWidth / 2,
+ y: model.position.y,
+ radius:style.StationStand.detainCar.circleWidth / 2
+ });
+ this.add(this.detainCircle);
+ } else {
+ /** 站台扣车*/
+ const detainD = model.right ? 1 : -1;
+ const detainX = model.position.x - style.StationStand.detainCar.position * detainD * (style.StationStand.detainCar.offset.x - model.width / 2);
+ const detainY = model.position.y + detainD * (style.StationStand.detainCar.offset.y - model.height / 2);
+ this.detain = new EDetain({
+ zlevel: this.zlevel,
+ z: this.z,
+ style: style,
+ x: detainX,
+ y: detainY,
+ width: model.width,
+ inside: model.inside,
+ right: model.right
+ });
+ this.add(this.detain);
+ }
/** 停站时间*/
if (style.StationStand.stopTime.offset) {
diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue
index de08a7603..d15c1d25c 100644
--- a/src/views/newMap/jlmapNew/index.vue
+++ b/src/views/newMap/jlmapNew/index.vue
@@ -5,7 +5,7 @@