This commit is contained in:
fan 2020-08-03 15:27:26 +08:00
commit 42d850de66
23 changed files with 270 additions and 178 deletions

View File

@ -156,7 +156,7 @@ class Jlmap {
}
switchScreen(data, num, sum) {
const sumHalf = sum / 2;
const sumHalf = sum <= 2 ? sum : sum / 2;
const dx = data.width / sumHalf;
const dy = data.height / sumHalf;
const row = num <= sumHalf ? 0 : 1;

View File

@ -220,7 +220,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -229,7 +231,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -249,8 +251,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -282,8 +284,11 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
// ...this.menuSpeed
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
// this.menu = menuConvert(this.menu);
@ -322,8 +327,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -338,8 +343,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -349,9 +354,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -361,9 +366,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -373,7 +378,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const operate = {

View File

@ -133,7 +133,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -142,7 +144,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -162,8 +164,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -191,7 +193,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menuForce, ...this.menuDirective, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
// this.menu = menuConvert(this.menu);
@ -229,8 +235,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -245,8 +251,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -256,9 +262,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -268,9 +274,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -280,7 +286,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const operate = {

View File

@ -116,7 +116,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -125,7 +127,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -145,8 +147,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -173,7 +175,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {
@ -209,8 +215,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -225,8 +231,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -236,9 +242,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -248,9 +254,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -260,7 +266,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const operate = {

View File

@ -125,7 +125,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -134,7 +136,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -154,8 +156,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -182,7 +184,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {
@ -219,8 +225,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -235,8 +241,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -246,9 +252,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -258,9 +264,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -270,7 +276,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const step = {

View File

@ -93,7 +93,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -102,7 +104,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -123,8 +125,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -164,8 +166,11 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
// ...this.menuSpeed
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {
@ -202,8 +207,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -218,8 +223,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -229,9 +234,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -241,9 +246,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -253,7 +258,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const step = {

View File

@ -64,7 +64,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -73,7 +75,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -94,8 +96,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -123,10 +125,13 @@ export default {
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {
@ -179,7 +184,7 @@ export default {
});
},
nextStation() {
const group = this.$route.query.group;
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -191,7 +196,7 @@ export default {
});
},
routeBlockRun() {
const group = this.$route.query.group;
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -201,9 +206,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -213,9 +218,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -225,7 +230,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
}
}
// //
// addTrainId() {
// const step = {
@ -326,8 +331,8 @@ export default {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.trainSwitch.doShow(step, this.selected);
// }
// });
// }
// });
// }
}
};
</script>

View File

@ -211,7 +211,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -280,7 +282,11 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {

View File

@ -114,7 +114,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -122,8 +124,8 @@ export default {
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -176,11 +178,13 @@ export default {
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
// ...this.menuSpeed
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {
@ -387,9 +391,9 @@ export default {
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
// },
handleOverFuideSignal() {
const group = this.$route.query.group;
// },
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -399,9 +403,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -411,7 +415,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {

View File

@ -222,7 +222,9 @@ export default {
{
label: '取消故障',
handler: this.cancelStoppage
},
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
@ -231,7 +233,7 @@ export default {
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
@ -251,8 +253,8 @@ export default {
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
@ -281,7 +283,11 @@ export default {
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce, ...this.menuDirective];
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
this.menu = [...this.menuDirective];
}
},
doShow(point) {
@ -319,8 +325,8 @@ export default {
// commitOperate(menuOperate.Train.nextStation, { code: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -335,8 +341,8 @@ export default {
// commitOperate(menuOperate.Train.routeBlockRun, { code: this.selected.code }, 3).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
const group = this.$route.query.group;
// });
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -346,9 +352,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -358,9 +364,9 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
@ -370,7 +376,7 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
},
//
limitSpeed() {
const operate = {

View File

@ -47,7 +47,8 @@ export const TrainingMode = {
export const OperateMode = {
ADMIN: '00',
NORMAL: '01',
FAULT: '02'
FAULT: '02',
DIRECTIVE: '03'
};
/**

View File

@ -174,22 +174,27 @@ const training = {
resetUsedTime: (state) => {
state.usedTime = 0;
},
countUsedTime: (state) => {
countTime: (state, type) => {
if (state.timeInterval) {
clearInterval(state.timeInterval);
state.timeInterval = null;
}
if (type == 'Lesson') {
state.timeInterval = setInterval(() => {
state.usedTime++;
}, 1000);
} else {
state.timeInterval = setInterval(() => {
state.initTime += 1000;
}, 1000);
}
},
stopCountTime: (state) => {
if (state.timeInterval) {
clearInterval(state.timeInterval);
state.timeInterval = null;
}
state.timeInterval = setInterval(() => {
state.usedTime++;
state.initTime += 1000;
}, 1000);
},
// stopCountTime: (state) => {
// if (state.timeInterval) {
// clearInterval(state.timeInterval);
// state.timeInterval = null;
// }
// },
setOperate: (state, operate) => {
state.operate = operate;
},
@ -357,9 +362,9 @@ const training = {
/**
* 停止计时
*/
// setStopCountTime: ({ commit }) => {
// commit('stopCountTime');
// },
setStopCountTime: ({ commit }) => {
commit('stopCountTime');
},
/**
* 主动判断是否结束
@ -402,9 +407,9 @@ const training = {
// commit('countUsedTime');
}
},
// 开始计时
countUsedTime({ commit }) {
commit('countUsedTime');
// 计时(教学正计时与仿真当前时间)
countTime({ commit }, type) {
commit('countTime', type);
},
/**

View File

@ -396,6 +396,7 @@
bottom:0px;
height: 15px;
position: absolute;
cursor:pointer;
}
.panelb {

View File

@ -376,6 +376,7 @@ import axios from 'axios';
width: 60px;
position: absolute;
text-align: center;
cursor:pointer;
}
.panebutton2{
@ -383,6 +384,7 @@ import axios from 'axios';
width: 80px;
position: absolute;
text-align: center;
cursor:pointer;
}
.buttonimg{
@ -423,6 +425,7 @@ import axios from 'axios';
width:30px;
height:30px;
position:absolute;
cursor:pointer;
}
.switchimg{

View File

@ -302,15 +302,16 @@ export default {
position:absolute;
width: 100%;
height: 100%;
z-index: 2;
z-index: 35;
}
.jl3dmap3dMaintainerSelect{
position:absolute;
width: 100%;
height: 100%;
z-index: 35;
z-index: 350;
top:0;
left:0;
background-image:url("/static/texture/bg.jpg");
// background-repeat:no-repeat;
background-size:100%;

View File

@ -371,9 +371,9 @@ export default {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.scriptId = Number(resp.data.scriptId) || 0;
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
this.planRunning = resp.data.planRunning;
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
this.$store.dispatch('training/countUsedTime');
if (!this.planRunning) {
this.$store.dispatch('training/over');
}

View File

@ -110,6 +110,7 @@ export default {
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => {
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('training/countTime', 'Lesson'); //
});
});
this.startLoading = false;
@ -134,6 +135,7 @@ export default {
this.$store.dispatch('training/end', null);
finishOneExamQuestion(model).then(response => {
this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/emitTipFresh');
this.init();
}).catch(() => {

View File

@ -116,6 +116,7 @@ export default {
demoMode: function (val) {
this.$store.dispatch('training/end', null);
this.$store.dispatch('training/reset');
this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('menuOperation/setButtonOperation', null);
@ -169,7 +170,7 @@ export default {
startTrainingNew(this.trainingObj, this.group).then(response => {
this.$store.dispatch('map/clearJlmapTrainView').then(() => {
this.$store.dispatch('training/teachModeStart');
this.$store.dispatch('training/countUsedTime'); //
this.$store.dispatch('training/countTime', 'Lesson'); //
this.$store.dispatch('training/setMapDefaultState').then(() => {
this.$store.dispatch('training/emitTipFresh');
this.tipInfo({ color: 'green', message: this.$t('global.pleaseOpearte') });
@ -222,6 +223,7 @@ export default {
}).then(() => {
this.backDisable = false;
this.$store.dispatch('training/end', null);
this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/setScore', 0);
this.$store.dispatch('training/emitTipFresh');
}).catch(() => {
@ -263,7 +265,7 @@ export default {
z-index: 9;
display: inline-block;
position: absolute;
left: 160px;
left: 5px;
height: 32px;
}

View File

@ -15,12 +15,10 @@
<!-- 运行图加载 -->
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<el-button v-if="notScript && !runing" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">自动故障设置</el-button>
<el-button v-if="faultMode" size="small" type="danger" @click="setFault">自动故障设置</el-button>
</el-button-group>
<el-radio-group v-if="!isScheduling" v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
</el-radio-group>
<el-button v-if="!isScheduling" size="small" :type="faultMode ? 'danger' : ''" @click="changeOperateMode()">故障模式</el-button>
<!-- <el-button v-if="!isLocalStation" size="small" :type="faultMode ? 'danger' : ''" @click="changeDirectiveMode()">指令模式</el-button> -->
</template>
</div>
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
@ -89,6 +87,7 @@ export default {
swch: '02',
showStationContent:'',
isScriptCommand:false,
faultMode: false,
swchList: [
{ value: '01', name: '现地' },
{ value: '02', name: '行调' }
@ -176,9 +175,22 @@ export default {
}
});
},
changeOperateMode(handle) {
this.$store.dispatch('training/changeOperateMode', { mode: handle });
changeOperateMode() {
this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL;
if (this.faultMode) {
mode = OperateMode.FAULT;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
// changeDirectiveMode() { // (使 使)
// this.directiveMode = !this.directiveMode;
// let mode = OperateMode.NORMAL;
// if (this.directiveMode) {
// mode = OperateMode.DIRECTIVE;
// }
// this.$store.dispatch('training/changeOperateMode', { mode: mode });
// },
setRuning(run) {
this.runing = run;
},

View File

@ -316,13 +316,13 @@ export default {
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
this.$store.dispatch('map/setRunPlanStatus', resp.data.planRunning);
if (resp.data.planRunning) {
this.$store.dispatch('training/simulationStart');
} else {
this.$store.dispatch('training/over');
}
this.$store.dispatch('training/countUsedTime');
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
this.dataError = true;
this.$messageBox('此地图数据正在维护中,无法运行!');

View File

@ -12,18 +12,12 @@
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- -->
</template>
<template v-if="isAdmin">
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
<el-button v-if="faultMode && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
</template>
</el-button-group>
<el-radio-group
v-if="isAdmin && !dataError && !isScreen"
v-model="mode"
size="small"
@change="changeOperateMode(mode)"
>
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
</el-radio-group>
<el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? 'danger' : ''" @click="changeOperateMode()">故障模式</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">指令模式</el-button>
</div>
<join-run-plan-view v-if="runing && !dataError" ref="runPlanView" :group="group" />
</div>
@ -34,6 +28,7 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { getByGroupStationList } from '@/api/jmap/map';
import { getEveryDayRunPlanNew } from '@/api/simulation';
import { getSessionStorage } from '@/utils/auth';
import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
export default {
name: 'MenuDemonSchema',
@ -89,7 +84,9 @@ export default {
kmRangeCoordMap: {},
runPlanData: {},
runing: false,
userId: ''
userId: '',
faultMode: false,
directiveMode: false
};
},
computed: {
@ -98,6 +95,12 @@ export default {
]),
isScreen() {
return this.$store.state.training.prdType === '07';
},
isCenter() {
return this.$store.state.training.prdType === '02';
},
isShowDirective() { //
return this.$route.query.type == 'CW' && getSessionStorage('project') == 'heb';
}
},
watch: {
@ -147,8 +150,21 @@ export default {
// initPlannedDriving(isDisable) {
// this.isDisable = isDisable;
// },
changeOperateMode(handle) {
this.$store.dispatch('training/changeOperateMode', { mode: handle });
changeOperateMode() {
this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL;
if (this.faultMode) {
mode = OperateMode.FAULT;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
changeDirectiveMode() { //
this.directiveMode = !this.directiveMode;
let mode = OperateMode.NORMAL;
if (this.directiveMode) {
mode = OperateMode.DIRECTIVE;
}
this.$store.dispatch('training/changeOperateMode', { mode: mode });
},
setFault() {
this.$emit('faultChooseShow');

View File

@ -62,7 +62,7 @@
</el-form-item>
<template v-for="(item, i) in list">
<el-form-item :key="i" :label="'第'+ (i + 1) +'行偏移值:'" prop="offsetTop">
<el-input-number v-model="list[i]['offsetTop']" style="width: 150px;" :min="0" />
<el-input-number v-model="list[i]['offsetTop']" style="width: 150px;" />
</el-form-item>
</template>
</el-form>

View File

@ -196,7 +196,7 @@ export default {
this.mapBox = document.getElementsByTagName('canvas');
if (this.trainingId) {
//
//
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(resp => {
this.trainingObj = resp.data;
this.$store.dispatch('training/setTrainingData', this.trainingObj);