This commit is contained in:
fan 2020-03-24 16:51:16 +08:00
commit a0b9974040
9 changed files with 41 additions and 179 deletions

View File

@ -313,6 +313,7 @@ export default {
if (this.isConfirm) {
this.loading = true;
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
this.loading = false;
this.doClose();
}).catch((error) => {
this.loading = false;

View File

@ -212,6 +212,7 @@ export default {
commit() {
this.loading = true;
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
this.loading = false;
this.doClose();
}).catch((error) => {
this.loading = false;

View File

@ -293,7 +293,7 @@ export default {
},
sendCommand(operate) {
this.loading = true;
commitOperate(operate, {}, 2).then((data)=>{
commitOperate(operate, {routeCodeList:this.selection}, 2).then((data)=>{
this.loading = false;
this.doClose();
}).catch(error => {

View File

@ -129,7 +129,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'StandDetainTrain',
@ -180,7 +180,7 @@ export default {
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
return '区间自动扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
return '区间自动扣车';
return '区间取消扣车';
}
return '';
}
@ -297,121 +297,44 @@ export default {
}
},
setDetainTrainAuto() { //
const operate = {
over: true,
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO,
param: {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.sendCommand(menuOperate.StationStand.setDetainTrainAuto, {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
},
cancelDetainTrainAuto() { //
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO,
param: {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto, {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
},
//
setDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
param: {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.sendCommand(menuOperate.StationStand.setDetainTrain, {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
},
//
cancelDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
param: {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.sendCommand(menuOperate.StationStand.cancelDetainTrain, {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
},
//
earlyDeparture() {
const operate = {
over: true,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
};
this.sendCommand(menuOperate.StationStand.earlyDeparture);
},
sendCommand(operate, param) {
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(operate, param, 2).then((data)=>{
this.loading = false;
if (valid) {
this.doClose();
}
this.doClose();
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow({}, error.message);
});
},
cancel() {

View File

@ -64,7 +64,7 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
@ -202,7 +202,7 @@ export default {
//
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
// if (selected.direction == '01') {
//
//
// }
// if (!stationStand || !station) {
// this.tempData.push({ item: '', status: `` });
@ -210,7 +210,7 @@ export default {
// this.tempData.push({ item: '', status: selected.runLevelTime > 0 ? `${station.name}${stationStand.name}:` : `${station.name}${stationStand.name}:` });
// }
// this.tempData.push({ item: '', status: opts.jumpStopStatus != '01' ? '' : '' });
//
//
// this.tempData.push({ item: '', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '' });
},
doShow(operate, selected, opts) {
@ -244,7 +244,6 @@ export default {
},
commit() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation
};
@ -261,7 +260,6 @@ export default {
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -93,7 +93,7 @@
<script>
import { mapGetters } from 'vuex';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '../utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
@ -237,58 +237,26 @@ export default {
},
//
setJumpStop() {
// let val = this.model.val1;
// if (this.model.val2) {
// val = this.model.val2;
// }
const operate = {
over: true,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
param: {
// Is_This_Platform: val,
trainGroupNumber: this.model.tripNumber
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
this.loading = false;
if (valid) {
this.doClose();
}
this.doClose();
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow({}, error.message);
});
},
//
cancelJumpStop() {
// let val = this.model.val1;
// if (this.model.val2) {
// val = this.model.val2;
// }
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
param: {
// Is_This_Platform: val,
trainGroupNumber: this.model.tripNumber
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
this.loading = false;
if (valid) {
this.doClose();
}
this.doClose();
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow({}, error.message);
});
},
cancel() {

View File

@ -74,7 +74,7 @@
import { mapGetters } from 'vuex';
import ConfirmControl from './childDialog/confirmControl';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'StandRunLevel',
@ -290,26 +290,14 @@ export default {
},
commit() {
if (this.isConfirm) {
const operate = {
over: true,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
param: {
runLevelTime: this.time,
runLevelTimeForever: !!this.tempData[0].check
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
this.loading = false;
if (valid) {
this.doClose();
}
this.doClose();
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow({}, error.message);
});
} else {
this.doClose();

View File

@ -60,7 +60,7 @@
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'StandStopTime',
@ -200,30 +200,14 @@ export default {
// });
// },
commit() {
const operate = {
send: true,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
param: {
parkingTime: this.control == '01' ? -1 : 1,
// runLevelTime: this.time,
parkingAlwaysValid: this.effective == '1'
}
// messages: [`: ${this.stationName} - ${this.standName}, ${this.control == '01' ? '' : this.time + ''}, ${this.effective == false ? '' : ''}`]
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
this.loading = false;
if (valid) {
this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmControl.doShow(operate);
}
this.doClose();
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow({}, error.message);
});
},
cancel() {

View File

@ -23,7 +23,6 @@ import StandStopTime from './dialog/standStopTime';
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from './utils/menuOperate';
// import Handler from '@/scripts/cmdPlugin/Handler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';