This commit is contained in:
fan 2021-11-25 10:47:32 +08:00
commit a5e0e4b671
6 changed files with 65 additions and 22 deletions

View File

@ -21,7 +21,8 @@ class SkinCode extends defaultStyle {
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle', // 文字垂直对齐方式
approachColor: '#FFFFFF',
occupyColor: '#FF0000' // 计轴区段占用字体颜色
occupyColor: '#FF0000', // 计轴区段占用字体颜色
invalidColor:'#ff0000' // // 计轴故障
},
logicText: {
z: 10,

View File

@ -153,6 +153,16 @@ class ETextName extends Group {
}
}
setAnimation(invalidColor, backgroundColor) {
if (this.text) {
this.text.animate('style', true)
.when(0, { textFill:invalidColor })
.when(1000, { textFill: backgroundColor })
.when(2000, { textFill: invalidColor })
.start();
}
}
recover() {
// 暂时不做状态初始化
if (this.text) {
@ -162,6 +172,10 @@ class ETextName extends Group {
this.text && this.text.setStyle({textFill: this.model.approach && this.model.type === 'name' ? styleModel.approachColor : styleModel.fontColor });
}
stopAnimation() {
this.text && this.text.stopAnimation(false);
}
setState() {
// 区段名称类暂时不做状态处理
}

View File

@ -249,7 +249,18 @@ export default class Section extends Group {
stroke: this.style.Section.line.invalidColor,
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
});
// 南京二号线 计轴受扰 区段编号变红
if (this.style.Section.name.invalidColor) {
this.name.setAnimation(this.style.Section.name.invalidColor, this.style.backgroundColor);
}
}
namestopAnimation() {
if (this.name) {
this.name.stopAnimation();
}
}
/** 进路锁闭 04*/
routeLock(lockRight) {
if (this.line) {
@ -477,6 +488,7 @@ export default class Section extends Group {
model.nctOccupied && this.unCommunicationOccupied();
/** 计轴故障 */
model.invalid && this.invalid();
!model.invalid && this.namestopAnimation();
/** 通信车占用状态 */
model.ctOccupied && this.communicationOccupied();
/** 区段关闭 */

View File

@ -153,7 +153,9 @@ class StationStand extends Group {
this.downDetainLamp && this.downDetainLamp.hide();
}
setScreenDoorOpenStatus(model) {
this.gapStand && this.gapStand.setState(model);
if (!this.model.noStatus && !(this.model.atsNoStatus && store.state.training.prdType == '02')) {
this.gapStand && this.gapStand.setState(model);
}
}
setState(model) {
// // 新版地图使用新版状态变更方式

View File

@ -248,6 +248,13 @@ export default {
{label: '编号闪', value: 'LIGHTING_UNIT_FAULT_NAME'},
{label: '机头闪', value: 'LIGHTING_UNIT_FAULT_HEAD'}
];
} else if (selected._type === 'Section' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [
{label: '紫光带故障', value: 'FAULT'},
{label: '红光带故障', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴受扰', value: 'ARB'},
{label:'无数据故障', value:'UNABLE_COLLECT_STATUS'}
];
}
if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value;

View File

@ -34,6 +34,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import CommandHandler from '@/scripts/cmdPlugin/CommandHandler.js';
export default {
name: 'Menus',
@ -153,28 +154,34 @@ export default {
});
},
atpRestart() {
const step = {
over: true,
operation: menuOperate.Common.setFault.operation,
cmdType: menuOperate.Common.setFault.cmdType,
param: {
code: 'Server',
faultType: 'Server_ATP_Restart'
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
} else {
this.doClose();
this.$messageBox('设置或取消故障操作失败!');
}
}).catch((error) => {
this.loading = false;
CommandHandler.execute('Server_ATP_Restart', {}).then(resp => {
this.doClose();
this.$messageBox(error.message || '设置或取消故障操作失败!');
}).catch(error => {
this.doClose();
this.$messageBox(error.message || 'ATP重启失败');
});
// const step = {
// over: true,
// operation: menuOperate.Server.atpRestart.operation,
// cmdType: menuOperate.Server.atpRestart.cmdType
// // param: {
// // code: 'Server',
// // faultType: 'Server_ATP_Restart'
// // }
// };
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.doClose();
// } else {
// this.doClose();
// this.$messageBox('ATP');
// }
// }).catch((error) => {
// this.loading = false;
// this.doClose();
// this.$messageBox(error.message || 'ATP');
// });
},
doClose() {
if (this.$refs && this.$refs.popMenu) {