南京二故障显示调整& 实训调整

This commit is contained in:
fan 2021-11-23 14:04:11 +08:00
parent c59d1c4103
commit 15cf2838da
20 changed files with 193 additions and 27 deletions

View File

@ -93,7 +93,7 @@ class SkinCode extends defaultStyle {
protectiveLockColor: '#9DFF6E', // 区段保护锁闭
delayUnlockColor: '#00FF00', // 延时解锁
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
faultLockColor: '#00FF00', // 区段故障锁定颜色
invalidColor: '#ff0000', // 计轴故障
undefinedColor: '#0071C1', // 区段未定义颜色

View File

@ -84,7 +84,7 @@ class EHorizontal2Door extends Group {
this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor);
}
}
if (model.noStatus) {
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.stand1.setStyle('fill', '#7F7F7F');
this.stand2.setStyle('fill', '#7F7F7F');
}

View File

@ -51,7 +51,7 @@ class ERect2Door extends Group {
this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor);
}
}
if (model.noStatus) {
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.psd.setStyle('fill', '#7F7F7F');
}
}

View File

@ -493,7 +493,9 @@ export default class Section extends Group {
// 区段故障锁闭 之前是fault 暂时设置为faultLock
model.faultLock && this.faultLock();
// 设置灰显
model.noStatus && this.setAshShow();
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.setAshShow();
}
// 设置脱轨器
model.signalDerailer && exec(DerailerMap[model.signalDerailer], this.derailer, this.style);

View File

@ -3,7 +3,7 @@ import Arc from 'zrender/src/graphic/shape/Arc';
import Sector from 'zrender/src/graphic/shape/Sector';
import Group from 'zrender/src/container/Group';
// import Path from 'zrender/src/graphic/Path';
import {ESigFault} from './ESigFault';
// import {ESigFault} from './ESigFault';
class ESigLamp extends Group {
constructor(model) {

View File

@ -319,7 +319,7 @@ class Signal extends Group {
});
this.add(this.insideTriangle);
}
if (style.Signal.sigBack || (style.Signal.virtual.bg && model.virtual)) {
if (style.Signal.sigBack || (style.Signal.virtual && style.Signal.virtual.bg && model.virtual)) {
const bgObj = style.Signal.sigBack || style.Signal.virtual.bg;
const signalRect = this.sigPost.getBoundingRect().clone();
this.lamps.forEach(elem => {
@ -771,7 +771,7 @@ class Signal extends Group {
this.sigPost.setColor(this.style.Signal.post.approachLockColor);
}
}
fault() {
noOpenFault() {
if (this.style.Signal.lamp.faultType == 'flash') {
// this.lamps[0].faultShow();
} else if (this.style.Signal.lamp.faultType == 'cross') {
@ -792,6 +792,25 @@ class Signal extends Group {
this.lamps[0].setAnimationStart('red');
}
}
lightingUnitFaultName() {
this.sigName && this.sigName.setAnimationStart('#F00');
}
lightingUnitFaultHead() {
this.lamps && this.lamps[0] && this.lamps[0].setAnimationStart('#F00');
}
fault(faultType) {
switch (faultType) {
case 'NO_OPEN':
this.noOpenFault();
break;
case 'LIGHTING_UNIT_FAULT_NAME':
this.lightingUnitFaultName();
break;
case 'LIGHTING_UNIT_FAULT_HEAD':
this.lightingUnitFaultHead();
break;
}
}
// 逻辑点灯
logicalLight() {
@ -1115,14 +1134,14 @@ class Signal extends Group {
}
model.approachLock && this.handleApproachLock();
// 信号机故障
model.fault && this.fault();
model.fault && this.fault(model.fault);
if (model.guideTime) {
this.tText && this.tText.setStyle('text', model.guideTime);
this.tText && this.tText.show();
}
this.model.virtual && this.sigBack && this.sigBack.show();
// 设置灰显
if (model.noStatus) {
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.setAshShow();
}

View File

@ -1,5 +1,6 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import store from '@/store/index';
class ETrainSetButton extends Group {
constructor(model) {
@ -53,7 +54,9 @@ class ETrainSetButton extends Group {
}
setState(model) {
model.noStatus && this.setColor('#7F7F7F');
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.setColor('#7F7F7F');
}
}
}

View File

@ -1,6 +1,7 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Text from 'zrender/src/graphic/Text';
import store from '@/store/index';
class EGapStand extends Group {
constructor(model) {
@ -108,7 +109,9 @@ class EGapStand extends Group {
this.setClose();
}
}
model.noStatus && this.setColor('#7F7F7F');
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.setColor('#7F7F7F');
}
}
}

View File

@ -739,7 +739,9 @@ export default class Switch extends Group {
const sectionC = this.mapDevice[switchModel.sectionCCode];
sectionC && sectionC.instance && sectionC.instance.handleSwitchSection(sectionC);
}
model.noStatus && this.setAshShow();
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) {
this.setAshShow();
}
!model.auto && this.artificialArc && this.artificialArc.show();
}
}

View File

@ -184,6 +184,8 @@ export default {
}
if (name) {
this.deviceName = deviceType[selected._type] + '-' + name;
} else if (selected._type == 'Server') {
this.deviceName = '服务器';
} else {
this.deviceName = deviceType[selected._type];
}
@ -224,6 +226,28 @@ export default {
{label: '红光带故障', value: 'AXLE_FAULT'},
{label: '橙光带故障', value: 'ARB'}
];
} else if (selected._type === 'Switch' && this.popClass === 'nanjing-02__systerm' ) {
this.faultList = [
{label: '短闪', value: 'SPLIT'},
{label: '短闪4次恢复', value: 'SPLIT_4'},
{label: '定位短闪', value: 'NORMAL_SPLIT'},
{label: '反位短闪', value: 'REVERSE_SPLIT'},
{label: '长闪', value: 'SQUEEZE'},
{label: '道岔区段灰显', value: 'SECTION_NO_STATUS'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '红光带故障', value: 'AXLE_FAULT'},
{label: '橙光带故障', value: 'ARB'}
];
} else if (selected._type === 'Server' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [
{label: 'ATS故障', value: 'ATS_FAULT' }
];
} else if (selected._type === 'Signal' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [
{label: '无法开放(非CTC)', value: 'NO_OPEN'},
{label: '编号闪', value: 'LIGHTING_UNIT_FAULT_NAME'},
{label: '机头闪', value: 'LIGHTING_UNIT_FAULT_HEAD'}
];
}
if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value;

View File

@ -11,11 +11,14 @@
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
import MenuTrain from './menuTrain';
import MenuBar from './menuBar';
import MenuButton from './menuButton';
@ -27,6 +30,10 @@ import MenuStationStand from './menuStationStand';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
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';
export default {
name: 'Menus',
@ -41,7 +48,9 @@ export default {
MenuStationStand,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
PassiveTimeout,
PopMenu,
SetFault
},
props: {
selected: {
@ -54,13 +63,36 @@ export default {
data() {
return {
loginActive: false,
inputStr: ''
inputStr: '',
menu: [
{
label: '设置故障',
handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: 'ATP重启',
handler: this.atpRestart,
cmdType: CMD.Fault.CMD_SET_FAULT
}
]
};
},
computed: {
...mapGetters('config', [
'width'
]),
...mapGetters('menuOperation', [
'buttonOperation'
]),
...mapGetters('training', [
'operatemode'
]),
isShowButton() {
return this.$store.state.training.prdType === '01' || this.$store.state.training.prdType === '02';
},
@ -73,6 +105,13 @@ export default {
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel) && !this.buttonOperation && this.operatemode === OperateMode.FAULT) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
mounted() {
@ -84,6 +123,63 @@ export default {
login(inputStr) {
this.loginActive = !!inputStr;
this.inputStr = inputStr;
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
//
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: 'Server' }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, { _type: 'Server' });
}
});
},
//
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: 'Server' }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, { _type: 'Server' });
}
});
},
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;
this.doClose();
this.$messageBox(error.message || '设置或取消故障操作失败!');
});
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};

View File

@ -276,6 +276,7 @@
</template>
</el-row>
</div>
<notice-info ref="noticeInfo" pop-class="nanjing-02__systerm" />
</div>
</template>
<script>
@ -289,8 +290,12 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import BanIcon from '@/assets/ban-heb.png';
import { queryRunPlanList } from '@/api/runplan';
import { simulationLoadRunPlan } from '@/api/simulation';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
components: {
NoticeInfo
},
props: {
selected: {
type: Object,
@ -982,7 +987,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
if (error && error.code == '10017') {
if ( error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
@ -1019,8 +1024,10 @@ export default {
this.handleClose();
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(error.message);
} else {
EventBus.$emit('sendMsg', {message: `${this.commandInfo.name}失败`});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(`${this.commandInfo.name}失败`);
}
});
},
@ -1041,8 +1048,10 @@ export default {
}).catch((error) => {
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(error.message);
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow('命令执行失败!');
}
this.doClose();
});
@ -1068,8 +1077,10 @@ export default {
this.handleClose();
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(error.message);
} else {
EventBus.$emit('sendMsg', {message: `${this.commandInfo.name}失败`});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(`${this.commandInfo.name}失败`);
}
});
},
@ -1192,8 +1203,10 @@ export default {
}).catch((error) => {
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(error.message);
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow('命令执行失败!');
}
});
},
@ -1212,8 +1225,10 @@ export default {
this.handleStationClose();
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(error.message);
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow('命令执行失败!');
}
});
},
@ -1233,8 +1248,10 @@ export default {
}).catch((error) => {
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow(error.message);
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
this.$store.state.training.prdType === '02' && this.$refs.noticeInfo.doShow('命令执行失败!');
}
});
},

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="haerbin-01__systerm" />
</div>
</template>
@ -20,8 +20,8 @@ export default {
name: 'SectionMenu',
components: {
PopMenu,
SetFault,
LoadSpareTrain
SetFault,
LoadSpareTrain
},
props: {
selected: {

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>
@ -107,7 +107,7 @@ export default {
}
},
doShow(point) {
if (this.selected.ciStation) {
if (this.selected && this.selected.ciStation) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
<psl ref="psl" pop-class="xian-01__systerm" />
</div>
</template>

View File

@ -2,7 +2,7 @@
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<switch-hook-lock ref="switchHookLock" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>

View File

@ -8,7 +8,7 @@
<!-- <train-switch ref="trainSwitch" /> -->
<!-- <train-edit-number ref="trainEditNumber" /> -->
<speed-limit ref="speedLimit" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="nanjing-02__systerm" />
</div>
</template>

View File

@ -2,14 +2,14 @@ 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.8.152:9000'; // 袁琪
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
// BASE_API = 'http://192.168.8.109:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
} else {
BASE_API = process.env.VUE_APP_BASE_API;
}

View File

@ -179,7 +179,7 @@ export default {
(val || []).forEach(item => {
if (!item.confirmed) {
this.tipContent.push(item);
this.handleAlarm(item);
// this.handleAlarm(item);
if (this.tipContent.length > 3) {
this.tipContent.shift();
}