This commit is contained in:
joylink_cuiweidong 2020-04-30 16:34:08 +08:00
commit 268d3f939e
9 changed files with 148 additions and 76 deletions

View File

@ -163,13 +163,14 @@ class SkinCode extends defaultStyle {
borderWidth: 2, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色
radiusR: 5, // 信号灯半径
blockColor: '#EF0C08', // 信号灯锁闭
blockColor: '#C0C0C0', // 信号灯锁闭
grayColor: '#C0C0C0', // 信号灯灰色
redColor: 'red', // 信号灯红色
greenColor: 'green', // 信号灯绿色
yellowColor: 'yellow', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
blueColor: '#0070C0', // 信号灯蓝色
logicDisplayNone: true // 信号机上×型标识不展示
},
route: {
direction: true, // 自动通过方向
@ -184,7 +185,8 @@ class SkinCode extends defaultStyle {
manualControl: '#FFFF00', // 人工控制
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
outConflict: '#C00808' // 出车冲突
outConflict: '#C00808', // 出车冲突,
lampstandard: true // 灯柱颜色变化
},
delay: {
direction: false, // 延时解锁方向

View File

@ -30,7 +30,7 @@ class ESigLamp extends Group {
stroke: style.Signal.lamp.borderColor
}
});
if ( !style.Signal.lamp.logicDisplayNone ) {
this.lstop = new Line({
_subType: 'SignalLamp',
_val: '3',
@ -51,7 +51,6 @@ class ESigLamp extends Group {
stroke: style.backgroundColor
}
});
this.rstop = new Line({
_subType: 'SignalLamp',
_val: '3',
@ -72,6 +71,7 @@ class ESigLamp extends Group {
stroke: style.backgroundColor
}
});
}
this.add(this.lamp);
if (!style.Signal.lamp.logicDisplayNone) {
this.add(this.lstop);
@ -97,11 +97,11 @@ class ESigLamp extends Group {
setStop(has) {
if (has) {
this.lstop.show();
this.rstop.show();
this.lstop && this.lstop.show();
this.rstop && this.rstop.show();
} else {
this.lstop.hide();
this.rstop.hide();
this.lstop && this.lstop.hide();
this.rstop && this.rstop.hide();
}
}

View File

@ -66,8 +66,8 @@ class Signal extends Group {
this.ciConfirm = new Text({
zlevel: this.zlevel,
z: this.z,
silent: true,
subType: 'enabled',
silent: false,
_subType: 'enabled',
style: {
textBorderColor: 'red',
textBorderWidth: 0,
@ -148,7 +148,13 @@ class Signal extends Group {
this.add(this.insideTriangle);
}
if (style.Signal.sigBack) {
const signalRect = this.getBoundingRect();
const signalRect = this.sigPost.getBoundingRect();
this.lamps.forEach(elem => {
signalRect.union(elem.getBoundingRect());
});
if (this.insideTriangle) {
signalRect.union(this.insideTriangle.getBoundingRect());
}
// 信号的背景
this.sigBack = new Rect({
zlevel: this.zlevel,
@ -380,15 +386,7 @@ class Signal extends Group {
this.sigName.setStyle({ textBorderWidth: 1 });
this.sigName.setColor('#fff');
}
// if (this.style.Signal.sigBack) {
// this.sigBack.show();
// this.sigBack.animateStyle(true)
// .when(0, { fill: this.style.backgroundColor })
// .when(1000, { fill: this.style.Signal.sigBack.color })
// .when(2000, { fill: this.style.backgroundColor })
// .when(3000, { fill: this.style.Signal.sigBack.color })
// .start();
// }
this.sigBack && this.sigBack.show();
}
// 功能封锁
@ -429,6 +427,9 @@ class Signal extends Group {
if (this.style.Signal.lamp.guidName == 'haerbin_01') {
this.sigName.setColor(this.style.Signal.text.ArtificialRouteColor);
}
if (this.style.Signal.auto.lampstandard) {
this.sigPost.setColor(this.style.Signal.auto.manualControl);
}
}
// 设置自动进路模式状态类型
@ -479,6 +480,12 @@ class Signal extends Group {
.when(1000, { textFill: this.style.Signal.ciConfirm.textColor })
.when(2000, { textFill: this.style.backgroundColor })
.start();
this.sigBack && this.sigBack.animateStyle(true)
.when(0, { fill: this.style.backgroundColor })
.when(1000, { fill: this.style.Signal.sigBack.color })
.when(2000, { fill: this.style.backgroundColor })
.when(3000, { fill: this.style.Signal.sigBack.color })
.start();
}
}
@ -503,6 +510,7 @@ class Signal extends Group {
this.sigPost && this.sigPost.removeTerminalOptional();
this.ciConfirm && this.ciConfirm.stopAnimation(false);
this.ciConfirm && this.ciConfirm.hide();
this.sigBack && this.sigBack.hide();
}
setState(model) {

View File

@ -215,7 +215,7 @@ export default {
operation: eachCmd.operation.code,
param: eachCmd.param //
};
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 1}]);
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1}]);
} else {
operate = {
send: true,
@ -223,7 +223,7 @@ export default {
cmdType: eachCmd.cmdType,
param: eachCmd.param //
};
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 0}]);
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0}]);
}
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {

View File

@ -110,7 +110,7 @@ export default {
operation: eachCmd.operation.code,
param: eachCmd.param //
};
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 1}]);
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1}]);
} else {
operate = {
send: true,
@ -118,7 +118,7 @@ export default {
cmdType: eachCmd.cmdType,
param: eachCmd.param //
};
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 0}]);
this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0}]);
}
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {

View File

@ -173,6 +173,20 @@ export default {
}
]
},
menuEnabled: [
{
label: '使能',
handler: this.enabledConfirm
},
{
label: '模拟',
handler: this.undeveloped
},
{
label: '帮助',
handler: this.undeveloped
}
],
menuForce: [
{
label: '信号关灯',
@ -212,6 +226,8 @@ export default {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else if (this.selected._type === 'Signal' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
this.doEnabledShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
@ -405,8 +421,8 @@ export default {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号封锁'},
ciConfirm: true,
param: {signalCode: this.selected.code}
param: {signalCode: this.selected.code},
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
});
} else {
this.$refs.noticeInfo.doShow(step);
@ -417,10 +433,27 @@ export default {
},
//
unlock() {
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeUnLock.doShow(operate, this.selected);
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.unlock.menu.operation,
param: {
signalCode: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号解封'},
ciConfirm: true,
param: {signalCode: this.selected.code}
});
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
@ -548,7 +581,35 @@ export default {
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', { startSignalCode: '', endSignalRouteList: [] });
this.$store.dispatch('training/updateMapState', updateDeviceList);
},
undeveloped() {}
enabledConfirm() {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号解封'},
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
param: {
signal: this.selected.code
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
initMenuEnabled() {
this.menu = this.menuEnabled;
},
doEnabledShow(point) {
this.topTip = `一级命令使能`;
this.clickEvent();
this.initMenuEnabled();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
}
}
};
</script>

View File

@ -169,7 +169,7 @@ export default {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
} else if (this.selected._type === 'Switch' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
this.doEnabledShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -2,9 +2,9 @@ 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.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛

View File

@ -106,7 +106,7 @@ export default {
focus: false,
booleanList: ['lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle'],
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'overlapSettingByTrigger'],
selectList: ['upDirection'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection'],
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
@ -130,7 +130,8 @@ export default {
overlapSignalOppositeSwitchNpOnly: '延续保护道岔在防护信号机与所属区段方向相反时,是否只构建定位道岔',
overlapReleaseTime: '默认延续保护解锁时间',
routeReleaseTime: '默认进路解锁时间',
generateCycle: '是否生成自动折返'
generateCycle: '是否生成自动折返',
overlapSettingByTrigger: '延续保护的建立方式true-通过触发建立false-随进路建立'
}
};
},