Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
51096d5ea1
@ -146,7 +146,7 @@ export default {
|
||||
deleteListHint: 'This will delete the list, will it continue?',
|
||||
setUpASubscriptionMapSuccessfully: 'Setting up a subscription map successfully!',
|
||||
setUpASubscriptionMapFailed: 'Setting up a subscription map failed!',
|
||||
getMapStateDataException: 'Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency!',
|
||||
getMapStateDataException: 'Simulation error!', // Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency!
|
||||
packagedSuccessfully: 'Packaged successfully',
|
||||
oneKeyGeneratedSuccessfully: 'One key generated successfully!',
|
||||
obtainedPermissionSuccessfully: 'Successfully obtained permission',
|
||||
|
@ -146,7 +146,7 @@ export default {
|
||||
deleteListHint: '此操作将删除该列表, 是否继续?',
|
||||
setUpASubscriptionMapSuccessfully: '设置订阅地图成功!',
|
||||
setUpASubscriptionMapFailed: '设置订阅地图失败!',
|
||||
getMapStateDataException: '获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理!',
|
||||
getMapStateDataException: '仿真出现异常!', // 获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理!
|
||||
packagedSuccessfully: '打包成功',
|
||||
oneKeyGeneratedSuccessfully: '一键生成成功!',
|
||||
obtainedPermissionSuccessfully: '领取权限成功',
|
||||
|
@ -155,7 +155,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号机宽度
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -163,7 +163,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#C0C0C0', // 信号灯灰色
|
||||
redColor: 'red', // 信号灯红色
|
||||
greenColor: 'green', // 信号灯绿色
|
||||
|
@ -169,7 +169,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -147,7 +147,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -147,7 +147,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -137,6 +137,7 @@ class SkinCode extends defaultStyle {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
post: {
|
||||
standardShow: true, // 灯柱显示
|
||||
blockColor: '#000080', // 信号机封锁颜色
|
||||
standardLength: 4, // 高柱长度
|
||||
standardHeight: 5, // 灯柱高度
|
||||
standardColor: '#FF0000', // 灯柱颜色
|
||||
@ -164,7 +165,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 0, // 信号灯边框线宽度
|
||||
borderColor: '#FF0000', // 信号灯边框线颜色 (虚拟信号机)
|
||||
radiusR: 4, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -193,7 +193,7 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 0, // 信号灯边框线宽度
|
||||
borderColor: '#FF0000', // 信号灯边框线颜色 (虚拟信号机)
|
||||
radiusR: 5, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
blockColor: '#000080', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
@ -511,6 +511,7 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
shapeFlash: true, // 道岔转动失去表示 道岔遮罩删除
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
@ -525,7 +526,7 @@ class SkinCode extends defaultStyle {
|
||||
monolock: true, // 名称单锁显示包围框
|
||||
monolockLocationColor: '#fff', // 道岔单锁'定位'颜色
|
||||
monolockInversionColor: '#fff', // 道岔单锁'反位'颜色
|
||||
faultFlashing: true // 故障闪烁
|
||||
faultFlashing: false // 故障闪烁
|
||||
},
|
||||
sectionAction: {
|
||||
flag: true, // 道岔 关联区段显示
|
||||
|
@ -150,7 +150,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#C0C0C0', // 信号灯灰色
|
||||
redColor: 'red', // 信号灯红色
|
||||
greenColor: 'green', // 信号灯绿色
|
||||
|
@ -188,7 +188,6 @@ class SkinCode extends defaultStyle {
|
||||
borderColor: '#000000', // 信号灯边框线颜色
|
||||
physicColor:'#ffffff', // 物理点灯信号灯边框线颜色
|
||||
radiusR: 5, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#C0C0C0', // 信号灯灰色
|
||||
redColor: 'red', // 信号灯红色
|
||||
greenColor: 'green', // 信号灯绿色
|
||||
|
@ -172,7 +172,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#c0c0c0', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号机宽度
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -155,7 +155,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
|
@ -168,7 +168,6 @@ class SkinCode extends defaultStyle {
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#C0C0C0', // 信号灯灰色
|
||||
redColor: 'red', // 信号灯红色
|
||||
greenColor: 'green', // 信号灯绿色
|
||||
|
@ -256,25 +256,28 @@ export default class Section extends Group {
|
||||
this.line && this.line.setStyle({stroke: '#7F7F7F'});
|
||||
this.name && this.name.setStyle({textFill: '#7F7F7f'});
|
||||
}
|
||||
/** 设置状态*/
|
||||
setState(model, flag = false) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
// 哈尔滨线路 道岔相关区段设置 默认颜色
|
||||
handleSwitchSection(model, flag) {
|
||||
// 哈尔滨线路 南京二 道岔相关区段设置 默认颜色
|
||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
||||
if (switchModel && switchModel.normalPosition != 0) { // 定位情况
|
||||
if (switchModel && (switchModel.normalPosition === 1 || (switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse'))) { // 定位情况
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true);
|
||||
} else if (switchModel && switchModel.normalPosition == 0) { // 反位情况
|
||||
} else if (switchModel && switchModel.reversePosition === 1 || (switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'normal')) { // 反位情况
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 设置状态*/
|
||||
setState(model, flag = false) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
this.handleSwitchSection(model, flag);
|
||||
// 顺序代表优先级
|
||||
/** 道岔保护区段锁闭 */
|
||||
model.overlapLock && this.protectiveLock(model.lockRight);
|
||||
|
@ -119,7 +119,7 @@ class ESigLamp extends Group {
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.stopWidth,
|
||||
stroke: '#000000',
|
||||
lineCap: 'round'
|
||||
lineCap: 'round'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -462,8 +462,11 @@ class Signal extends Group {
|
||||
// 封锁
|
||||
block() {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
|
||||
this.sigPost.setColor('#000080');
|
||||
if (this.style.Signal.post.blockColor) { // 设置底座颜色
|
||||
this.sigPost.setColor(this.style.Signal.post.blockColor);
|
||||
}
|
||||
if (this.style.Signal.lamp.blockColor) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blockColor);
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
if (this.style.Signal.text.nameBorderShow) {
|
||||
@ -683,13 +686,13 @@ class Signal extends Group {
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
}
|
||||
|
||||
/** 信号机封锁 */ // 缺一个功能封锁
|
||||
model.blockade && this.block();
|
||||
/** 设置灯的颜色 */
|
||||
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||
/** 信号机封锁 */ // 缺一个功能封锁
|
||||
model.blockade && this.block();
|
||||
model.remainTime && this.showRemainTime(model.remainTime);
|
||||
if (!path.includes('/map/draw')) {
|
||||
// 联锁自动进路通过
|
||||
|
@ -58,10 +58,11 @@ class ESwLnversion extends Group {
|
||||
return this.relocShelter;
|
||||
}
|
||||
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
animateStyle(color1, color2) {
|
||||
this.relocShelter.animateStyle(true)
|
||||
.when(0, {stroke: color1})
|
||||
.when(500, {stroke: color2})
|
||||
.when(1000, {stroke: color1}).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -56,10 +56,11 @@ class ESwLocal extends Group {
|
||||
this.locShelter.setStyle(data);
|
||||
}
|
||||
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
animateStyle(color1, color2) {
|
||||
this.locShelter.animateStyle(true)
|
||||
.when(0, {stroke: color1})
|
||||
.when(500, {stroke: color2})
|
||||
.when(1000, {stroke: color1}).start();
|
||||
}
|
||||
getLocal() {
|
||||
return this.locShelter;
|
||||
|
@ -65,10 +65,11 @@ class ETriangle extends Group {
|
||||
});
|
||||
}
|
||||
|
||||
animateStyle(cb) {
|
||||
this.eachChild((child) => {
|
||||
cb(child);
|
||||
});
|
||||
animateStyle(color1, color2) {
|
||||
this.section.animateStyle(true)
|
||||
.when(0, {stroke: color1})
|
||||
.when(500, {stroke: color2})
|
||||
.when(1000, {stroke: color1}).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ export default class Switch extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 6;
|
||||
this.isShowShape = true;
|
||||
this.switchPosition = '';
|
||||
this.triangle = new JTriangle(model.intersection, model.skew);
|
||||
this.create();
|
||||
this.createLockRect(); // 创建单锁矩形框显示
|
||||
@ -309,13 +310,26 @@ export default class Switch extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 南京二号线 A,B闪烁
|
||||
shapeFlashing() {
|
||||
let bColor = '#7F7F7F';
|
||||
let aColor = '#7F7F7F';
|
||||
if (this.switchPosition === 'normal') {
|
||||
aColor = '#FF0';
|
||||
} else {
|
||||
bColor = '#FF0';
|
||||
}
|
||||
this.shapeModelB && this.shapeModelB.animateStyle(bColor, this.style.backgroundColor);
|
||||
this.shapeModelA && this.shapeModelA.animateStyle(aColor, this.style.backgroundColor);
|
||||
}
|
||||
/** 失去*/
|
||||
setLossAction() {
|
||||
this.shapeModelA.show();
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelC.show();
|
||||
this.shapeModelC.setColor(this.style.backgroundColor);
|
||||
this.shapeModelB.animateStyle();
|
||||
this.style.Switch.shapeFlash && this.shapeFlashing();
|
||||
this.setTextColor(this.style.Switch.text.lossColor);
|
||||
this.style.Switch.text.faultFlashing && this.nameTextAnimation();
|
||||
|
||||
@ -524,8 +538,10 @@ export default class Switch extends Group {
|
||||
this.recover();
|
||||
this.setSwitchFault(model.split, model.normalPosition, model.reversePosition);
|
||||
if (model.normalPosition) {
|
||||
this.switchPosition = 'normal';
|
||||
this.setLocationAction(model); /** 定位*/
|
||||
} else if (model.reversePosition) {
|
||||
this.switchPosition = 'reverse';
|
||||
this.setInversionAction(model); /** 反位*/
|
||||
} else {
|
||||
this.setLossAction(); // 失去
|
||||
@ -543,13 +559,10 @@ export default class Switch extends Group {
|
||||
|
||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
||||
if (switchModel.normalPosition != 0) { // 定位情况
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC);
|
||||
} else if (switchModel.normalPosition == 0) { // 反位情况
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
|
||||
}
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC);
|
||||
}
|
||||
model.noStatus && this.setAshShow();
|
||||
}
|
||||
|
@ -554,6 +554,8 @@ export default {
|
||||
if (section.parentCode == model.code && section.type == '02') { // 逻辑区段
|
||||
const copySection = deepAssign({}, section);
|
||||
copySection.stationCode = model.stationCode; // 给元素 子逻辑区段设置 设备集中站
|
||||
const length = model.lengthFact / model.logicSectionCodeList.length;
|
||||
copySection.lengthFact = length.toFixed(3);
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) {
|
||||
copySection.points[0] = model.points[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user