Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
d4279dd03a
@ -120,6 +120,13 @@ export default class defaultStyle {
|
||||
stroke: '#FFFFFF',
|
||||
fill: '#00FFFF'
|
||||
};
|
||||
/** 常规字体样式 */
|
||||
this.textStyle = {
|
||||
textAlign: 'center', // 文字居中
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
fontWeight: 'normal' // 字体粗细
|
||||
};
|
||||
}
|
||||
}
|
||||
export const drawSectionStyle = {
|
||||
|
@ -281,17 +281,17 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: 1, // 扣车方向
|
||||
offset: { x: -8, y: 13 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
headFontSize: 8,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: 3 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
offset: { x: -8, y: 3 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
textFontSize: 8
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
@ -543,6 +543,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
|
@ -229,27 +229,28 @@ class SkinCode extends defaultStyle {
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 0},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#00ffcc', // 停跳文字颜色
|
||||
arcColor: '#00ffcc', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11 // 圆半径大小
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
@ -488,6 +489,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
|
@ -236,27 +236,27 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
textFontSize: 10
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#00ffcc', // 停跳文字颜色
|
||||
arcColor: '#00ffcc', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal',
|
||||
textFontSize: 11
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
@ -666,6 +666,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
|
@ -226,27 +226,27 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 11,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
textFontSize: 11
|
||||
},
|
||||
jump: {
|
||||
text: 'S', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 10},
|
||||
offset: {x: -8, y: -5},
|
||||
textColor: '#5376B3', // 停跳文字颜色
|
||||
arcColor: '#000000', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
@ -528,6 +528,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
trainHSDATextFontSize: 8// 列车HDSA字号
|
||||
},
|
||||
|
@ -514,6 +514,8 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
trainHSDATextFontSize: 8// 列车HDSA字号
|
||||
},
|
||||
|
@ -230,27 +230,21 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
fontSize: 18, // 扣车字体大小
|
||||
position: -1, // 扣车方向
|
||||
offset: { x: -8, y: -6 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: 'red', // 中心扣车颜色
|
||||
fontSize: 18, // 扣车字体大小
|
||||
offset: { x: 60, y: -20 }, // 扣车偏移量
|
||||
centerTrainColor: '#F61107', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: { x: -8, y: 0 },
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
text: 'S', // 停跳显示内容
|
||||
offset: { x: 10, y: 20 },
|
||||
textColor: '#00FF00', // 停跳文字颜色
|
||||
fontWeight: 'bold',
|
||||
fontSize: 18
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: 26 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
@ -540,6 +534,8 @@ class SkinCode extends defaultStyle {
|
||||
trainSidelineColor: '#FFFF00',
|
||||
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 20, // HSDA上边距离
|
||||
|
@ -274,27 +274,19 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
position: 1, // 扣车方向
|
||||
offset: { x: -8, y: 0 }, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10,
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: -4 }, // 运行时间偏移量
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: { x: -8, y: 0 },
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 10 // 停站时间字体大小
|
||||
},
|
||||
jump: {},
|
||||
level: { // 运行等级
|
||||
position: -1, // 运行等级方向
|
||||
offset: { x: -8, y: 4 }, // 运行等级偏移量
|
||||
@ -405,7 +397,7 @@ class SkinCode extends defaultStyle {
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 10 // 道岔单边长度
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: 'lightgreen', // 道岔单锁'定位'颜色 (红色)
|
||||
@ -529,6 +521,14 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#A388B1', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:tripNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
hasArrow: true,
|
||||
width: 6,
|
||||
radiusR: 4,
|
||||
fillColor: '#00FF00',
|
||||
distanceTop: 15,
|
||||
distanceBottom: 35
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
|
@ -729,7 +729,7 @@ export default class Section extends Group {
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.5 }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 }); });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,78 +5,31 @@ class EDetain extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
this.detain = null;
|
||||
// if (this.model.style.StationStand.common.special) {
|
||||
this.create();
|
||||
// }
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create(textName) {
|
||||
if (!this.isNew) {
|
||||
|
||||
create() {
|
||||
if (this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
// inside true 内侧
|
||||
const gag = 22;
|
||||
const gagX = 6; // 左右间隔
|
||||
let height = '';
|
||||
let position = '';
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
} else {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
} else {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
text: style.StationStand.detainCar.text,
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: style.StationStand.detainCar.centerTrainColor,
|
||||
textStroke: style.backgroundColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x + position,
|
||||
y: model.y + height,
|
||||
text: textName,
|
||||
// textAlign: model.inside ? 'left' : 'right',
|
||||
textAlign: 'center',
|
||||
fontWeight: 'blod',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: textName == 'E' ? '#fff' : 'red',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
this.add(this.detain);
|
||||
} else {
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
text: style.StationStand.detainCar.text,
|
||||
textAlign: model.textAlign,
|
||||
textVerticalAlign: model.textVerticalAlign,
|
||||
fontSize: `${style.StationStand.stand.headFontSize} px ${style.fontFamily}`,
|
||||
textFill: style.StationStand.detainCar.centerTrainColor,
|
||||
textStroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.detain);
|
||||
}
|
||||
});
|
||||
this.add(this.detain);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,17 +39,11 @@ class EDetain extends Group {
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.detain.hide();
|
||||
this.detain && this.detain.hide();
|
||||
}
|
||||
|
||||
show(nameText) {
|
||||
if (this.model.style.StationStand.common.special && nameText) {
|
||||
this.create();
|
||||
this.detain.setStyle('text', nameText);
|
||||
} else {
|
||||
this.create();
|
||||
}
|
||||
show() {
|
||||
this.create();
|
||||
this.detain.show();
|
||||
}
|
||||
}
|
||||
|
@ -7,71 +7,29 @@ class EJump extends Group {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
this.create();
|
||||
this.setStatus(model.allSkip, model.assignSkip);
|
||||
}
|
||||
|
||||
create(textName) {
|
||||
if (!this.isNew) {
|
||||
create() {
|
||||
if (this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
// inside true 内侧
|
||||
const gag = 22;
|
||||
const gagX = 6; // 左右间隔
|
||||
let height = '';
|
||||
let position = '';
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
} else {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
} else {
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: style.StationStand.jump.fontWeight,
|
||||
fontSize: style.StationStand.jump.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.StationStand.jump.text,
|
||||
textFill: style.StationStand.jump.textColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.x + position,
|
||||
y: model.y + height,
|
||||
text: textName,
|
||||
textAlign: 'center',
|
||||
fontWeight: 'blod',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: textName == 'S' ? 'green' : '#fff',
|
||||
textVerticalAlign: 'middle'
|
||||
}
|
||||
});
|
||||
this.add(this.jump);
|
||||
} else {
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.StationStand.jump.text,
|
||||
textFill: style.StationStand.jump.textColor,
|
||||
textAlign: model.textAlign,
|
||||
textVerticalAlign: model.textVerticalAlign
|
||||
}
|
||||
});
|
||||
});
|
||||
this.add(this.jump);
|
||||
if (style.StationStand.jump.r) {
|
||||
this.jumpArc = new Arc({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -86,44 +44,29 @@ class EJump extends Group {
|
||||
}
|
||||
});
|
||||
this.add(this.jumpArc);
|
||||
this.add(this.jump);
|
||||
this.jumpArc.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setName(val) {
|
||||
this.create();
|
||||
this.jump.setStyle('text', val);
|
||||
}
|
||||
setStatus(allSkip, assignSkip) {
|
||||
if (this.jumpArc) {
|
||||
this.jumpArc.hide();
|
||||
if (assignSkip) {
|
||||
this.jumpArc.hide(); // 指定站台跳停
|
||||
} else if (allSkip) {
|
||||
this.jumpArc.show(); // 站台全部跳停
|
||||
}
|
||||
}
|
||||
}
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.jump.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.jump.hide();
|
||||
this.jump && this.jump.hide();
|
||||
this.jumpArc && this.jumpArc.hide();
|
||||
}
|
||||
|
||||
show(nameText) {
|
||||
if (this.model.style.StationStand.common.special && nameText) {
|
||||
this.create();
|
||||
this.jump.setStyle('text', nameText);
|
||||
} else {
|
||||
this.create();
|
||||
show(isAllJump) {
|
||||
this.create();
|
||||
if (isAllJump) { // 站台跳停
|
||||
this.jump.show();
|
||||
this.jumpArc && this.jumpArc.show();
|
||||
} else { // 指定列车跳停
|
||||
this.jump.show();
|
||||
}
|
||||
this.jump.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ class ELevel extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.level = null;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
@ -20,16 +21,15 @@ class ELevel extends Group {
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.stopTime.textFontSize || style.StationStand.common.textFontSize,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.StationStand.stopTime.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.level.textColor,
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.level);
|
||||
}
|
||||
}
|
||||
@ -45,8 +45,7 @@ class ELevel extends Group {
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.level.hide();
|
||||
this.level && this.level.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
|
@ -3,47 +3,45 @@ import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import { flashlight } from '../utils/ShapePoints.js';
|
||||
|
||||
class EReentry extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
this.isNew = true;
|
||||
this.reentry = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: flashlight(model.x, model.y, model.drict, 10, 5, 0, 0, 4)
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
|
||||
this.isNew = true;
|
||||
this.reentry = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: flashlight(model.x, model.y, model.drict, 10, 5, 0, 0, 4)
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
this.add(this.reentry);
|
||||
}
|
||||
}
|
||||
|
||||
this.add(this.reentry);
|
||||
}
|
||||
}
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.reentry.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.reentry.setStyle('textFill', color);
|
||||
}
|
||||
hide() {
|
||||
this.reentry && this.reentry.hide();
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.reentry.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.reentry.show();
|
||||
}
|
||||
show() {
|
||||
this.create();
|
||||
this.reentry.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default EReentry;
|
||||
|
@ -135,12 +135,8 @@ class StationStand extends Group {
|
||||
|
||||
/** 站台扣车*/
|
||||
const detainD = model.right ? 1 : -1;
|
||||
let detainX = model.position.x - (style.StationStand.stopTime.position || detainD) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
let detainY = model.position.y + (style.StationStand.stopTime.position || detainD) * (style.StationStand.detainCar.offset.y - model.height / 2);
|
||||
if (style.StationStand.common.special) {
|
||||
detainX = model.position.x;
|
||||
detainY = model.position.y;
|
||||
}
|
||||
const detainX = model.position.x - (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,
|
||||
@ -149,25 +145,25 @@ class StationStand extends Group {
|
||||
y: detainY,
|
||||
width: model.width,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
right: model.right
|
||||
});
|
||||
this.add(this.detain);
|
||||
|
||||
/** 停站时间*/
|
||||
const timeDrict = model.right ? 1 : -1;
|
||||
const timeX = model.position.x - timeDrict * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: timeX,
|
||||
y: timeY,
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
this.add(this.time);
|
||||
if (style.StationStand.stopTime.offset) {
|
||||
const timeDrict = model.right ? 1 : -1;
|
||||
const timeX = model.position.x - timeDrict * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: timeX,
|
||||
y: timeY,
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
this.add(this.time);
|
||||
}
|
||||
|
||||
/** 运行等级*/
|
||||
const levelDrict = model.right ? 1 : -1;
|
||||
@ -186,14 +182,10 @@ class StationStand extends Group {
|
||||
/** 列车停跳 */
|
||||
if (style.StationStand.common.haveJumpShow) {
|
||||
const jumpDirct = model.right ? -1 : 1;
|
||||
let jumpX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
let jumpY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
const jumpX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
const jumpCX = model.position.x - jumpDirct * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpCY = model.position.y + jumpDirct * style.StationStand.jump.offset.y;
|
||||
if (style.StationStand.common.special) {
|
||||
jumpX = model.position.x;
|
||||
jumpY = model.position.y;
|
||||
}
|
||||
this.jump = new EJump({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -204,11 +196,7 @@ class StationStand extends Group {
|
||||
cy: jumpCY,
|
||||
width: model.width,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
allSkip: model.allSkip,
|
||||
assignSkip: model.assignSkip
|
||||
right: model.right
|
||||
});
|
||||
this.add(this.jump);
|
||||
}
|
||||
@ -222,7 +210,7 @@ class StationStand extends Group {
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
createFunctionButton() { //
|
||||
createFunctionButton() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
if (model.stopJumpLamp) {
|
||||
@ -364,7 +352,6 @@ class StationStand extends Group {
|
||||
this.trainDepart && this.trainDepart.hide();
|
||||
this.reentry && this.reentry.hide();
|
||||
this.jump && this.jump.hide();
|
||||
this.jump && this.jump.setStatus(0, 0);
|
||||
}
|
||||
|
||||
/** 空闲*/
|
||||
@ -406,31 +393,13 @@ class StationStand extends Group {
|
||||
/** 指定列车跳站*/
|
||||
designatedJumpStop() {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor);
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.jump && this.jump.show('S');
|
||||
this.jump && this.jump.setColor('green');
|
||||
} else {
|
||||
this.jump && this.jump.show();
|
||||
}
|
||||
this.jump && this.jump.setStatus(0, 1);
|
||||
}
|
||||
|
||||
/** 未设置跳停*/
|
||||
unJumpStop() {
|
||||
this.jump && this.jump.hide();
|
||||
this.jump && this.jump.setStatus(0, 0);
|
||||
this.jump && this.jump.show(0);
|
||||
}
|
||||
|
||||
/** 站台跳停*/
|
||||
jumpStop() {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor);
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.jump && this.jump.show('S');
|
||||
this.jump && this.jump.setColor('green');
|
||||
} else {
|
||||
this.jump && this.jump.show();
|
||||
}
|
||||
this.jump && this.jump.setStatus(1, 0);
|
||||
this.jump && this.jump.show(1);
|
||||
}
|
||||
|
||||
/** 车站扣车*/
|
||||
|
@ -27,10 +27,8 @@ class ESwLocal extends Group {
|
||||
onmouseout: model.onmouseout
|
||||
});
|
||||
|
||||
const lpx = Math.abs(model.triangle.getCos(1));
|
||||
this.locShelter.position = [model.triangle.drictx * lpx, -model.triangle.dricty * 0.2];
|
||||
this.locShelter.show();
|
||||
this.add(this.locShelter);
|
||||
this.locShelter.show();
|
||||
}
|
||||
|
||||
hide() {
|
||||
|
@ -48,8 +48,6 @@ export default class Switch extends Group {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
const halfWidthX = style.Section.line.width / 2 - 0.7;
|
||||
const halfWidthY = style.Section.line.width / 2 + 0.12;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth * 2; // 超出宽度多少
|
||||
const swPadding = style.Switch.core.length;
|
||||
const directx = this.triangle.drictx;
|
||||
@ -57,10 +55,17 @@ export default class Switch extends Group {
|
||||
const direct = -this.triangle.drictx * this.triangle.dricty;
|
||||
const coverLength = switchWidth * 1.5;
|
||||
|
||||
const point1 = [model.intersection.x - directx * halfWidthX, model.intersection.y + directy * halfWidthY];
|
||||
const point2 = [model.intersection.x - directx * halfWidthX + directx * switchWidth / this.triangle.getSinRate(), point1[1]];
|
||||
const switchWidth1 = style.Section.line.width / 2;
|
||||
const width1 = switchWidth1 * this.triangle.getSinRate();
|
||||
const height1 = switchWidth1 * this.triangle.getCosRate();
|
||||
const width2 = (height1 + switchWidth1) / this.triangle.getTanRate();
|
||||
const width3 = (style.Section.line.width / this.triangle.getSinRate()) - width2 - width1;
|
||||
const detailWidth = 0.2; // 调整定位模糊宽度
|
||||
|
||||
const point1 = [model.intersection.x - directx * width3 - directx * detailWidth, model.intersection.y + directy * switchWidth1];
|
||||
const point2 = [model.intersection.x + directx * (width2 + width1) + directx * detailWidth, point1[1]];
|
||||
const point3 = [point2[0] + directx * this.triangle.getCotRate() * swPadding, point2[1] + directy * swPadding];
|
||||
const point4 = [point3[0] + direct * this.triangle.getSin(switchWidth), point3[1] - direct * this.triangle.getCos(switchWidth)];
|
||||
const point4 = [point3[0] + direct * this.triangle.getSin(switchWidth) - directx * 2 * detailWidth, point3[1] - direct * this.triangle.getCos(switchWidth)];
|
||||
this.locShelter = new ESwLocal({ // 定位 覆盖形状
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -72,11 +77,6 @@ export default class Switch extends Group {
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
const switchWidth1 = style.Section.line.width / 2;
|
||||
const width1 = switchWidth1 * this.triangle.getSinRate();
|
||||
const height1 = switchWidth1 * this.triangle.getCosRate();
|
||||
const width2 = (height1 + switchWidth1) / this.triangle.getTanRate();
|
||||
const width3 = (style.Section.line.width / this.triangle.getSinRate()) - width2 - width1;
|
||||
const rpoint1 = [model.intersection.x + directx * width3, model.intersection.y - directy * switchWidth1];
|
||||
const rpoint2 = [rpoint1[0] + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1];
|
||||
const rpoint3 = [rpoint2[0] + directx * 10, rpoint2[1]];
|
||||
@ -258,7 +258,6 @@ export default class Switch extends Group {
|
||||
this.relocShelter.show(); // 反位
|
||||
}
|
||||
this.locShelter.hide(); // 定位
|
||||
// this.setSectionState(this.relocShelter.getSection(), 'fill', this.model);
|
||||
this.rhomboid.show(); // 平行四边形
|
||||
this.setSectionState(this.rhomboid.getSection(), 'fill', this.model);
|
||||
}
|
||||
|
53
src/jmapNew/shape/Train/EDirection.js
Normal file
53
src/jmapNew/shape/Train/EDirection.js
Normal file
@ -0,0 +1,53 @@
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import { arrow } from '../utils/ShapePoints';
|
||||
|
||||
class EDirection extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const rotation = model.right != 1 ? 0 : Math.PI;
|
||||
|
||||
this.arrow = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: [model.x, model.y],
|
||||
rotation: rotation,
|
||||
shape: {
|
||||
points: arrow(model.x, model.y, style.Train.directionArrow.width, style.Train.directionArrow.radiusR * 0.8)
|
||||
},
|
||||
style: {
|
||||
stroke: style.Train.directionArrow.fillColor,
|
||||
lineWidth: 2,
|
||||
fill: style.Train.directionArrow.fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.arrow);
|
||||
}
|
||||
|
||||
// 箭头颜色
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.arrow.setStyle('fill', color);
|
||||
}
|
||||
|
||||
// 隐藏
|
||||
hide() {
|
||||
this.create();
|
||||
this.arrow.hide();
|
||||
}
|
||||
|
||||
// 显示
|
||||
show() {
|
||||
this.create();
|
||||
this.arrow.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default EDirection;
|
@ -5,6 +5,7 @@ import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import ETriangle from '../Train/ETriangle';
|
||||
import store from '@/store';
|
||||
import EDirection from './EDirection';
|
||||
|
||||
/** 列车 */
|
||||
export default class Train extends Group {
|
||||
@ -153,6 +154,22 @@ export default class Train extends Group {
|
||||
if (style.Train.common.haveTrainBorder) {
|
||||
this.createTrainBorder();
|
||||
}
|
||||
if (style.Train.directionArrow.hasArrow) {
|
||||
const arrowPoint = {x: 0, y: 0};
|
||||
if (model.trainWindowModel) {
|
||||
arrowPoint.x = model.trainWindowModel.point.x;
|
||||
arrowPoint.y = model.right ? model.trainWindowModel.point.y + style.Train.directionArrow.distanceBottom : model.trainWindowModel.point.y - style.Train.directionArrow.distanceTop;
|
||||
}
|
||||
this.directionArrow = new EDirection({
|
||||
zlevel: this.zlevel,
|
||||
z:10,
|
||||
right: model.right,
|
||||
x: arrowPoint.x,
|
||||
y: arrowPoint.y,
|
||||
style: style
|
||||
});
|
||||
this.add(this.directionArrow);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取设备提示坐标
|
||||
|
@ -16,10 +16,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
<el-input :id="domIdInput" v-model="addModel.serialNumber" size="mini" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -27,7 +27,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.targetCode" />
|
||||
<el-input v-model="addModel.targetCode" size="mini" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -59,7 +59,7 @@ export default {
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
targetCode: '',
|
||||
tripNumber: ''
|
||||
serialNumber: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
|
@ -15,7 +15,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
<el-input v-model="addModel.groupNumber" size="mini" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -24,10 +24,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="addModel.serialNumber" />
|
||||
<el-input v-model="addModel.serialNumber" size="mini" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" />
|
||||
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" size="mini" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6" style="line-height: 44px;">车组号:</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
|
@ -15,7 +15,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
@ -19,19 +19,15 @@
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
// import TrainEdit from './dialog/trainEdit';
|
||||
import TrainSetPlan from './dialog/trainSetPlan';
|
||||
import TrainAddPlan from './dialog/trainAddPlan';
|
||||
// import TrainMoveEvently from './dialog/trainMoveEvently';
|
||||
// import TrainDeletePlan from './dialog/trainDeletePlan';
|
||||
import TrainSetHead from './dialog/trainSetHead';
|
||||
import TrainSetWork from './dialog/trainSetWork';
|
||||
import trainSetWorkATP from './dialog/trainSetWorkATP';
|
||||
// import TrainFlag from './dialog/trainFlag';
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
@ -47,11 +43,8 @@ export default {
|
||||
TrainDelete,
|
||||
TrainDefine,
|
||||
TrainMove,
|
||||
// TrainEdit,
|
||||
TrainSetPlan,
|
||||
TrainAddPlan,
|
||||
// TrainMoveEvently,
|
||||
// TrainDeletePlan,
|
||||
TrainSetHead,
|
||||
TrainSetWork,
|
||||
trainSetWorkATP
|
||||
@ -361,7 +354,7 @@ export default {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
|
@ -102,7 +102,7 @@ export const DeviceMenu = {
|
||||
StationStand: '06',
|
||||
Train: '07',
|
||||
Station: '08',
|
||||
TrainWindow: '09',
|
||||
TrainWindow: '07',
|
||||
LimitControl: '10',
|
||||
AutoTurnBack: '11',
|
||||
AxleReset: '12',
|
||||
|
@ -20,6 +20,8 @@ class MenuContextHandler {
|
||||
} else if (selected._type == 'Station') {
|
||||
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.code);
|
||||
} else if (selected._type == 'Train') { // 车次窗单独处理
|
||||
control = store.getters['map/getStationCodeByTrain'](selected);
|
||||
} else if (selected._type == 'TrainWindow') {
|
||||
control = store.getters['map/getDeviceTrainWindowCodeByStationCode'](selected.code);
|
||||
} else {
|
||||
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
|
||||
@ -91,11 +93,11 @@ class MenuContextHandler {
|
||||
const selected = this.getCurrentStateObject();
|
||||
let menu = [];
|
||||
const control = this.getStationControl(selected);
|
||||
|
||||
if (control) {
|
||||
if (this.getPrdType() != '') {
|
||||
const type = State2SimulationMap[this.getPrdType()];
|
||||
const status = State2ControlMap[control.controlMode]; // 判断当前模式
|
||||
// const status = 'LocalStationControl';
|
||||
menu = [...menuList[type]];
|
||||
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
|
||||
if (selected._type == 'StationStand') {
|
||||
|
@ -527,7 +527,14 @@ const map = {
|
||||
|
||||
return device;
|
||||
},
|
||||
|
||||
getStationCodeByTrain: (state) => (train) => {
|
||||
if (train && train.sectionCode) {
|
||||
const section = state.mapDevice[train.sectionCode];
|
||||
if (section && section.stationCode) {
|
||||
return state.mapDevice[section.stationCode];
|
||||
}
|
||||
}
|
||||
},
|
||||
// 通过循环区段来获取控制模式
|
||||
getDeviceTrainWindowCodeByStationCode: (state) => (code) => {
|
||||
let device = null;
|
||||
@ -537,13 +544,7 @@ const map = {
|
||||
state.map.sectionList.forEach(elem => {
|
||||
if (elem.trainWindowCode == code) {
|
||||
state.trainWindowSectionCode = elem.code;
|
||||
if (state.map.stationList && state.map.stationList.length) {
|
||||
state.map.stationList.forEach(elems => {
|
||||
if (elems.code == elem.stationCode) {
|
||||
device = state.mapDevice[elems.code];
|
||||
}
|
||||
});
|
||||
}
|
||||
device = state.mapDevice[elem.stationCode];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -3,11 +3,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -95,7 +95,8 @@ export default {
|
||||
}
|
||||
case 'lessonDesign': {
|
||||
setSessionStorage('designType', 'lessonDesign');
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
|
||||
console.log(obj);
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` });
|
||||
break;
|
||||
}
|
||||
case 'runPlanDesign': {
|
||||
@ -144,7 +145,7 @@ export default {
|
||||
drawWay: elem.drawWay
|
||||
}
|
||||
];
|
||||
this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode}) : '';
|
||||
this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode}) : '';
|
||||
elem.children.push(
|
||||
{
|
||||
id: '3',
|
||||
|
@ -212,7 +212,7 @@ export default {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
operationManage() {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId}});
|
||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode}});
|
||||
},
|
||||
revertLesson(index, row) {
|
||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||
|
@ -27,7 +27,7 @@ export default {
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
skinCode: this.$route.query.mapId
|
||||
skinCode: this.$route.query.lineCode
|
||||
},
|
||||
skinCodeList: [],
|
||||
isShow: false
|
||||
@ -113,29 +113,26 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
create() {
|
||||
const self = this;
|
||||
async create() {
|
||||
this.loading = true;
|
||||
addTrainingRulesList(
|
||||
this.formModel.mapId,
|
||||
OperationList[this.formModel.mapId].list
|
||||
)
|
||||
.then(response => {
|
||||
self.loading = false;
|
||||
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable'); // 刷新列表
|
||||
})
|
||||
.catch(error => {
|
||||
self.loading = false;
|
||||
self.$message.error(
|
||||
`${this.$('error.batchCreateFailed')}:${error.message}`
|
||||
);
|
||||
try {
|
||||
OperationList[this.$route.query.lineCode].list.forEach(item => {
|
||||
item.mapId = this.$route.query.mapId;
|
||||
});
|
||||
await addTrainingRulesList(this.$route.query.mapId, OperationList[this.$route.query.lineCode].list);
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t('lesson.batchCreateSuccess'));
|
||||
this.handleClose();
|
||||
this.$emit('reloadTable'); // 刷新列表
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.loading = false;
|
||||
this.$message.error(this.$t('error.batchCreateFailed'));
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.formModel = {
|
||||
skinCode: this.$route.query.mapId
|
||||
skinCode: this.$route.query.lineCode
|
||||
};
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
||||
// { text: this.$t('lesson.generation'), handler: this.handleBatchAdd},
|
||||
{ text: this.$t('lesson.generation'), handler: this.handleBatchAdd},
|
||||
{ text: this.$t('lesson.copy'), handler: this.handleSaveAs }
|
||||
]
|
||||
},
|
||||
|
@ -118,7 +118,7 @@ export default {
|
||||
this.point = { x: em.clientX, y: em.clientY };
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (em.subType === 'TrainWindow') {
|
||||
device = { _type: deviceType.Train, code: em.deviceCode };
|
||||
device = { _type: deviceType.TrainWindow, code: em.deviceCode };
|
||||
this.$store.dispatch('map/setTrainWindowShow', true);
|
||||
} else if (em.subType == 'button' && em.deviceType == 'Station') { // 宁波一号线右键显示控制模式
|
||||
const equipment = this.getDeviceByEm(em);
|
||||
|
@ -63,6 +63,10 @@ export default {
|
||||
type: 'text',
|
||||
label: this.$t('map.pathName')
|
||||
},
|
||||
code: {
|
||||
type: 'text',
|
||||
label: '进路code'
|
||||
},
|
||||
stationCode: {
|
||||
type: 'select',
|
||||
label: this.$t('map.routeStationName'),
|
||||
|
@ -39,6 +39,10 @@ export default {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('map.autoTurnedName')
|
||||
},
|
||||
code: {
|
||||
type: 'text',
|
||||
label: '折返进路code'
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -52,6 +56,10 @@ export default {
|
||||
title: this.$t('map.autoTurnedName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '折返进路code',
|
||||
prop: 'code'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.routeStationName'),
|
||||
prop: 'stationCode'
|
||||
|
Loading…
Reference in New Issue
Block a user