福州车站站台操作&西安车站站台操作调整

This commit is contained in:
fan 2020-06-15 18:00:24 +08:00
parent c4ce6ae0f9
commit f60e69f8ff
15 changed files with 180 additions and 386 deletions

View File

@ -157,10 +157,11 @@ class SkinCode extends defaultStyle {
route: { route: {
direction: false, // 自动进路方向 direction: false, // 自动进路方向
offset: { x: -4, y: 0 }, // 自动进路偏移量 offset: { x: -4, y: 0 }, // 自动进路偏移量
routeColor: '#00FF00' // 自动进路 routeColor: '#00FF00', // 自动进路
radiusR: 6 // 信号灯半径
}, },
auto: { auto: {
signalFrontTriangle: false, // 信号灯前三角展示 signalFrontTriangle: true, // 信号灯前三角展示
direction: false, // 自动通过方向 direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量 offset: { x: -4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度 width: 5, // 自动宽度

View File

@ -22,16 +22,14 @@
<div style="height: 32px;"> <div style="height: 32px;">
<el-radio <el-radio
v-model="standStatus" v-model="standStatus"
label="02" :label="upRight"
style="line-height: 32px;" style="line-height: 32px;"
:style="{color: standStatus == '02' ? '' : 'red'}"
disabled disabled
>{{ $t('menu.upDirection') }}</el-radio> >{{ $t('menu.upDirection') }}</el-radio>
<el-radio <el-radio
v-model="standStatus" v-model="standStatus"
label="01" :label="!upRight"
style="line-height: 32px;" style="line-height: 32px;"
:style="{color: standStatus == '01' ? '' : 'red'}"
disabled disabled
>{{ $t('menu.downDirection') }}</el-radio> >{{ $t('menu.downDirection') }}</el-radio>
</div> </div>
@ -120,12 +118,14 @@ export default {
selection: [], selection: [],
isSelect: true, isSelect: true,
isConfirm: false, isConfirm: false,
strategy: '' strategy: '',
upRight: ''
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList' 'stationList',
'mapConfig'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -149,23 +149,25 @@ export default {
}); });
}, },
methods: { methods: {
loadInitData(selected, opts) { loadInitData(selected) {
this.tempData = []; this.tempData = [];
const station = this.stationList.find(n => n.code == selected.stationCode); const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy }); this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
}, },
doShow(operate, selected, opts) { doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.standStatus = ''; this.standStatus = '';
this.stationName = ''; this.stationName = '';
this.upRight = this.mapConfig.upDirection === 'right';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standStatus = selected.direction; this.standStatus = selected.right;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.loadInitData(selected, opts); this.loadInitData(selected);
} }
this.dialogShow = true; this.dialogShow = true;
@ -197,7 +199,7 @@ export default {
this.strategy = strategy; this.strategy = strategy;
this.isSelect = false; this.isSelect = false;
this.isConfirm = true; this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -213,14 +215,13 @@ export default {
const operate = { const operate = {
over: true, over: true,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation, operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
param:{ param:{
Stand_ReentryStrategy:this.strategy standReentryStrategy: this.strategy
} }
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();

View File

@ -30,6 +30,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default { export default {
name: 'StandDetainTrain', name: 'StandDetainTrain',
@ -124,119 +125,31 @@ export default {
}, },
// //
setDetainTrain() { setDetainTrain() {
const step = { this.sendCommand(menuOperate.StationStand.setDetainTrain);
over: true,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
const step = { this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
}, },
// //
cancelDetainTrainForce() { cancelDetainTrainForce() {
const step = { this.sendCommand(menuOperate.StationStand.cancelDetainTrainForce);
over: true,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
}, },
// //
earlyDeparture() { earlyDeparture() {
const step = { this.sendCommand(menuOperate.StationStand.earlyDeparture);
over: true,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
}, },
// //
setJumpStop() { setJumpStop() {
const step = { this.sendCommand(menuOperate.StationStand.setJumpStop, this.selected.direction);
over: true,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
val: this.selected.direction, // , 01: /02:
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
}, },
// //
cancelJumpStop() { cancelJumpStop() {
const step = { this.sendCommand(menuOperate.StationStand.cancelJumpStop, this.selected.direction); // , 01: /02:
over: true, },
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, sendCommand(operate, val) { //
val: this.selected.direction, // , 01: /02:
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => { commitOperate(operate, {}, 2, val).then(({valid})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -244,16 +157,15 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(step); this.$refs.noticeInfo.doShow();
}); });
}, },
cancel() { cancel() {
const step = { const step = {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.loading = false; this.loading = false;
this.$store.dispatch('training/next', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -15,10 +15,10 @@
<el-row> <el-row>
<el-radio-group v-model="upDown" style="width:100%;" @change="choose"> <el-radio-group v-model="upDown" style="width:100%;" @change="choose">
<el-col :span="11"> <el-col :span="11">
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio> <el-radio :id="upDown ? domIdChoose : ''" :label="rightUp">{{ $t('menu.uplinkBroadly') }}</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="1">
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">{{ $t('menu.downlinkBroadly') }}</el-radio> <el-radio :id="!upDown ? domIdChoose : ''" :label="!rightUp">{{ $t('menu.downlinkBroadly') }}</el-radio>
</el-col> </el-col>
</el-radio-group> </el-radio-group>
</el-row> </el-row>
@ -68,15 +68,17 @@ export default {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
upDown: '01', upDown: true,
tempData: [], tempData: [],
disabled: true, disabled: true,
operation: '' operation: '',
rightUp: true
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationStandList' 'stationStandList',
'mapConfig'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -108,9 +110,10 @@ export default {
this.tempData = []; this.tempData = [];
this.stationStandList.forEach(elem => { this.stationStandList.forEach(elem => {
/** status 01: 未扣车*/ /** status 01: 未扣车*/
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status; const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {});
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {}); const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) { console.log(stand, stand.centerHoldTrain);
if (station && station.visible && stand && stand.centerHoldTrain && elem.right == this.upDown) {
this.tempData.push({ stationName: station.name, standName: elem.name }); this.tempData.push({ stationName: station.name, standName: elem.name });
} }
}); });
@ -124,7 +127,8 @@ export default {
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.loading = false; this.loading = false;
this.upDown = selected.direction; this.upDown = selected.right;
this.rightUp = this.mapConfig.upDirection === 'right';
this.loadTableData(); this.loadTableData();
this.operation = operate.operation; this.operation = operate.operation;
} }
@ -145,7 +149,7 @@ export default {
val: `${upDown}` val: `${upDown}`
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -158,12 +162,12 @@ export default {
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN, cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
val: this.upDown, val: this.upDown,
param: { param: {
Stand_AllLine: this.upDown isRight: this.upDown
} }
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -179,7 +183,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -112,8 +112,8 @@ export default {
}, },
timeList() { timeList() {
const list = [ const list = [
{ value: 0, label: this.$t('menu.automatic2') }, { value: 0, label: this.$t('menu.automatic2') }
{ value: 1, label: '1' } // { value: 1, label: '1' }
]; ];
for (var i = 60; i <= this.maxRunLevel; i++) { for (var i = 60; i <= this.maxRunLevel; i++) {
list.push({ value: i, label: `${i}` }); list.push({ value: i, label: `${i}` });
@ -137,7 +137,7 @@ export default {
}); });
}, },
methods: { methods: {
loadInitData(selected, opts) { loadInitData(selected) {
this.tempData = []; this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode); const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { // if (selected.direction == '01') { //
@ -145,18 +145,18 @@ export default {
if (index != 0) { if (index != 0) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
} }
} else { } else {
// //
if (index != this.stationList.length) { if (index != this.stationList.length) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
} }
} }
}, },
doShow(operate, selected, opts) { doShow(operate, selected) {
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.standName = ''; this.standName = '';
@ -168,7 +168,7 @@ export default {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.loadInitData(selected, opts); this.loadInitData(selected);
} }
this.dialogShow = true; this.dialogShow = true;
@ -195,15 +195,13 @@ export default {
const operate = { const operate = {
operation: OperationEvent.StationStand.setRunLevel.choose.operation, operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(), val: time.toString(),
param: { param: {}
Stand_RunLevel: time
}
}; };
this.time = time; this.time = time;
this.isSelect = false; this.isSelect = false;
this.isConfirm = true; this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -213,12 +211,10 @@ export default {
const operate = { const operate = {
operation: OperationEvent.StationStand.setRunLevel.check.operation, operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(), val: check.toString(),
param: { param: {}
Stand_AlwaysValid: !!this.tempData[0].check
}
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -231,19 +227,17 @@ export default {
}, },
commit() { commit() {
if (this.isConfirm) { if (this.isConfirm) {
const forver = !!this.tempData[0].check;
const operate = { const operate = {
operation: OperationEvent.StationStand.setRunLevel.menu.operation, operation: OperationEvent.StationStand.setRunLevel.menu.operation,
val: [this.time, forver].join('::'),
param:{ param:{
Stand_AlwaysValid:forver, runLevelTimeForever: !!this.tempData[0].check,
Stand_RunLevel:this.time runLevelTime: this.time
}, },
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`] messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -263,7 +257,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -44,8 +44,8 @@
<div style="padding: 0px 15px; height: 30px;"> <div style="padding: 0px 15px; height: 30px;">
<div style=" position: relative; top:-5px;"> <div style=" position: relative; top:-5px;">
<el-radio-group v-model="direction"> <el-radio-group v-model="direction">
<el-radio label="02" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio> <el-radio :label="upRight" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio>
<el-radio label="01" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio> <el-radio :label="!upRight" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
@ -53,8 +53,8 @@
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span> <span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
<div style=" position: relative; top:-10px;"> <div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective"> <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="effective === false? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio> <el-radio :id="!effective? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
<el-radio :id="effective === true? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio> <el-radio :id="effective? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
@ -75,7 +75,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { mapGetters } from 'vuex';
export default { export default {
name: 'StandStopTime', name: 'StandStopTime',
@ -93,10 +93,14 @@ export default {
effective: false, effective: false,
selected: null, selected: null,
standName: '', standName: '',
stationName: '' stationName: '',
upRight: true
}; };
}, },
computed: { computed: {
...mapGetters('map', [
'mapConfig'
]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
@ -143,7 +147,7 @@ export default {
}); });
}, },
methods: { methods: {
doShow(operate, selected, tempDate) { doShow(operate, selected) {
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.standName = ''; this.standName = '';
@ -156,10 +160,10 @@ export default {
} }
} }
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02'; this.control = selected.parkingTime ? '02' : '01';
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime); this.time = selected.parkingTime ? selected.parkingTime : 15;
this.effective = !!tempDate.parkingValidStatus; this.direction = selected.right;
this.direction = selected.direction; this.upRight = this.mapConfig.upDirection === 'right';
this.selected = selected || {}; this.selected = selected || {};
} }
this.dialogShow = true; this.dialogShow = true;
@ -175,19 +179,16 @@ export default {
chooseControl(control) { chooseControl(control) {
/** 自动时的默认时间*/ /** 自动时的默认时间*/
if (control == '01') { if (control == '01') {
this.inputTime = 15; this.time = 15;
this.effective = true; this.effective = true;
} }
const operate = { const operate = {
operation: OperationEvent.StationStand.setStopTime.choose1.operation, operation: OperationEvent.StationStand.setStopTime.choose1.operation,
val: `${control}`, param: {}
param: {
Stand_StopControl: `${control}`
}
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -197,12 +198,10 @@ export default {
const operate = { const operate = {
operation: OperationEvent.StationStand.setStopTime.choose2.operation, operation: OperationEvent.StationStand.setStopTime.choose2.operation,
val: `${effective}`, val: `${effective}`,
param: { param: {}
Stand_AlwaysValid: `${effective}`
}
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -213,12 +212,10 @@ export default {
repeat: true, repeat: true,
operation: OperationEvent.StationStand.setStopTime.input.operation, operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${time}`, val: `${time}`,
param: { param: {}
Stand_StopTime: `${time}`
}
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -229,15 +226,14 @@ export default {
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation,
val: [`${this.control}`, this.time, this.effective].join('::'), val: [`${this.control}`, this.time, this.effective].join('::'),
param:{ param:{
Stand_StopControl:this.control, parkingTime: this.control === '01' ? -1 : this.time,
Stand_AlwaysValid:this.effective, parkingAlwaysValid: this.control === '01' ? true : this.effective
Stand_StopTime:this.time
}, },
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`] messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -254,7 +250,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation operation: OperationEvent.Command.close.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -79,6 +79,7 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
name: 'StationCmdControl', name: 'StationCmdControl',
@ -265,7 +266,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip')); this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 }); this.setButtonEnable({ step: 1 });
@ -291,7 +292,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip')); this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1; this.timeCountCommand = -1;
@ -313,16 +314,16 @@ export default {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) { if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/ /** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation; operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
// operate.cmdType = CMD.Station.powerUnLock; operate.cmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) { } else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/ /** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation; operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
// operate.cmdType = CMD.Station.execKeyOperationTest; operate.cmdType = CMD.Station.CMD_STATION_KEY_OPERATION_TEST;
} }
this.setMessage(''); this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
@ -352,7 +353,7 @@ export default {
} }
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
@ -369,7 +370,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation operation: OperationEvent.Command.close.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -87,7 +87,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -103,7 +103,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -109,7 +109,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -125,7 +125,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -75,6 +75,11 @@ export default {
label: this.$t('menu.menuStation.allATSAutoControl'), label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL, handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
} }
// { // {
// label: this.$t('menu.menuStation.execKeyOperationTest'), // label: this.$t('menu.menuStation.execKeyOperationTest'),
@ -126,29 +131,21 @@ export default {
}, },
initMenu() { initMenu() {
this.menu = []; this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) { //
// this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) { //
// if (this.operatemode === OperateMode.FAULT) {
if (this.operatemode === OperateMode.FAULT) { this.menu = [...this.menuForce];
this.menu = [...this.menuForce];
}
} }
// this.menu = MenuContextHandler.covert(this.menu);
}, },
doShow(point) { doShow(point) {
this.clickEvent(); if (this.selected.ciStation) {
this.initMenu(); this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.initMenu();
this.$refs.popMenu.resetShowPosition(point); if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
} }
}, },
doClose() { doClose() {
@ -260,10 +257,10 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation, operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
param: { param: {
Station_Code: `${this.selected.code}` stationCode: this.selected.code
} }
}; };
this.$store.dispatch('training/next', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(step, this.selected); this.$refs.stationCmdControl.doShow(step, this.selected);
@ -277,10 +274,10 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Station.humanControlALL.menu.operation, operation: OperationEvent.Station.humanControlALL.menu.operation,
param: { param: {
Station_Code: `${this.selected.code}` stationCode: this.selected.code
} }
}; };
this.$store.dispatch('training/next', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(step); this.$refs.stationHumanControlAll.doShow(step);
@ -294,10 +291,10 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation, operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
param: { param: {
Station_Code: `${this.selected.code}` stationCode: this.selected.code
} }
}; };
this.$store.dispatch('training/next', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(step, this.selected); this.$refs.stationSetRouteControlAll.doShow(step, this.selected);

View File

@ -236,211 +236,90 @@ export default {
}, },
// //
setDetainTrain() { setDetainTrain() {
const step = { commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standControl.doShow(operate, this.selected);
this.$refs.standControl.doShow(step, this.selected);
} }
}); });
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
const step = { commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standControl.doShow(operate, this.selected);
this.$refs.standControl.doShow(step, this.selected);
} }
}); });
}, },
// //
cancelDetainTrainForce() { cancelDetainTrainForce() {
const step = { commitOperate(menuOperate.StationStand.cancelDetainTrainForce, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standControl.doShow(operate, this.selected);
this.$refs.standControl.doShow(step, this.selected);
} }
}); });
}, },
// 线 // 线
cancelDetainTrainAll() { cancelDetainTrainAll() {
const step = { commitOperate(menuOperate.StationStand.cancelDetainTrainAll, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standDetainTrainAll.doShow(operate, this.selected);
this.$refs.standDetainTrainAll.doShow(step, this.selected);
} }
}); });
}, },
// //
setJumpStop() { setJumpStop() {
const step = { commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standControl.doShow(operate, this.selected);
this.$refs.standControl.doShow(step, this.selected);
} }
}); });
}, },
// //
cancelJumpStop() { cancelJumpStop() {
const step = { commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standControl.doShow(operate, this.selected);
this.$refs.standControl.doShow(step, this.selected);
} }
}); });
}, },
// //
setStopTime() { setStopTime() {
const step = { commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standStopTime.doShow(operate, this.selected);
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standStopTime.doShow(step, this.selected, tempData);
});
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
setRunLevel() { setRunLevel() {
const step = { commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standRunLevel.doShow(operate, this.selected);
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standRunLevel.doShow(step, this.selected, tempData);
});
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
earlyDeparture() { earlyDeparture() {
const step = { commitOperate(menuOperate.StationStand.earlyDeparture, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standControl.doShow(operate, this.selected);
this.$refs.standControl.doShow(step, this.selected);
} }
}); });
}, },
// //
setBackStrategy() { setBackStrategy() {
const step = { commitOperate(menuOperate.StationStand.setBackStrategy, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standBackStrategy.doShow(operate, this.selected);
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standBackStrategy.doShow(step, this.selected, tempData);
});
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
detail() { detail() {
const step = { commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.detail.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.standDetail.doShow(operate, this.selected);
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standDetail.doShow(step, this.selected, tempData);
});
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
} }
} }

View File

@ -190,6 +190,16 @@ export const menuOperate = {
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
}, },
cancelDetainTrainForce: {
// 强制取消扣车
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
cancelDetainTrainAll: {
// 全线取消扣车
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
setDetainTrainAuto:{ setDetainTrainAuto:{
// 区间列车数量限制 // 区间列车数量限制
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation, operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,

View File

@ -5,7 +5,7 @@
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="500px" width="500px"
:before-close="doClose" :before-close="doClose"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -20,8 +20,8 @@
</el-col> </el-col>
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<div style="height: 32px;"> <div style="height: 32px;">
<el-radio v-model="standStatus" :label="true" style="line-height: 32px;" disabled>上行方向</el-radio> <el-radio v-model="standStatus" :label="upRight" style="line-height: 32px;" disabled>上行方向</el-radio>
<el-radio v-model="standStatus" :label="false" style="line-height: 32px;" disabled>下行方向</el-radio> <el-radio v-model="standStatus" :label="!upRight" style="line-height: 32px;" disabled>下行方向</el-radio>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -105,12 +105,14 @@ export default {
selection: [], selection: [],
isSelect: true, isSelect: true,
isConfirm: false, isConfirm: false,
strategy: '' strategy: '',
upRight: true
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList' 'stationList',
'mapConfig'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -159,6 +161,7 @@ export default {
if (!this.dialogShow) { if (!this.dialogShow) {
this.standStatus = ''; this.standStatus = '';
this.stationName = ''; this.stationName = '';
this.upRight = this.mapConfig.upDirection === 'right';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standStatus = selected.right; this.standStatus = selected.right;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
@ -168,24 +171,11 @@ export default {
} }
this.loadInitData(selected); this.loadInitData(selected);
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
clickEvent(row, column, event) {
const operate = {
operation: OperationEvent.StationStand.setBackStrategy.choose.operation
};
this.strategyId = row.id;
this.isConfirm = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
checkTableDataSelction(data) { checkTableDataSelction(data) {
const selection = []; const selection = [];
if (data && data.length > 0) { if (data && data.length > 0) {

View File

@ -15,10 +15,10 @@
<el-row> <el-row>
<el-radio-group v-model="upDown" style="width:100%;" @change="choose"> <el-radio-group v-model="upDown" style="width:100%;" @change="choose">
<el-col :span="11"> <el-col :span="11">
<el-radio :id="upDown ? domIdChoose : ''" :label="true">{{ $t('menu.uplinkBroadly') }}</el-radio> <el-radio :id="upDown ? domIdChoose : ''" :label="rightUp">{{ $t('menu.uplinkBroadly') }}</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="1">
<el-radio :id="!upDown ? domIdChoose : ''" :label="false">{{ $t('menu.downlinkBroadly') }}</el-radio> <el-radio :id="!upDown ? domIdChoose : ''" :label="!rightUp">{{ $t('menu.downlinkBroadly') }}</el-radio>
</el-col> </el-col>
</el-radio-group> </el-radio-group>
</el-row> </el-row>
@ -71,12 +71,14 @@ export default {
upDown: false, upDown: false,
tempData: [], tempData: [],
disabled: true, disabled: true,
operation: '' operation: '',
rightUp: true
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationStandList' 'stationStandList',
'mapConfig'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -125,6 +127,7 @@ export default {
if (!this.dialogShow) { if (!this.dialogShow) {
this.loading = false; this.loading = false;
this.upDown = selected.right; this.upDown = selected.right;
this.rightUp = this.mapConfig.upDirection === 'right';
this.loadTableData(); this.loadTableData();
this.operation = operate.operation; this.operation = operate.operation;
} }
@ -157,7 +160,7 @@ export default {
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN, cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
param: { param: {
standAllLine: this.upDown ? '01' : '02' isRight: this.upDown
} }
}; };

View File

@ -44,8 +44,8 @@
<div style="padding: 0px 15px; height: 30px;"> <div style="padding: 0px 15px; height: 30px;">
<div style=" position: relative; top:-5px;"> <div style=" position: relative; top:-5px;">
<el-radio-group v-model="direction"> <el-radio-group v-model="direction">
<el-radio :label="true" disabled>上行方向</el-radio> <el-radio :label="upRight" disabled>上行方向</el-radio>
<el-radio :label="false" disabled>下行方向</el-radio> <el-radio :label="!upRight" disabled>下行方向</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
@ -75,6 +75,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
export default { export default {
name: 'StandStopTime', name: 'StandStopTime',
@ -90,12 +91,16 @@ export default {
control: '01', control: '01',
direction: false, direction: false,
effective: true, effective: true,
upRight: true,
selected: null, selected: null,
standName: '', standName: '',
stationName: '' stationName: ''
}; };
}, },
computed: { computed: {
...mapGetters('map', [
'mapConfig'
]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
@ -146,6 +151,7 @@ export default {
this.control = selected.parkingTime ? '02' : '01'; this.control = selected.parkingTime ? '02' : '01';
this.time = selected.parkingTime ? selected.parkingTime : 30; this.time = selected.parkingTime ? selected.parkingTime : 30;
this.direction = selected.right; this.direction = selected.right;
this.upRight = this.mapConfig.upDirection === 'right';
this.selected = selected || {}; this.selected = selected || {};
} }
this.dialogShow = true; this.dialogShow = true;
@ -206,8 +212,8 @@ export default {
const operate = { const operate = {
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: { param: {
parkingTime: this.time == 30 ? 0 : this.time, parkingTime: this.control === '01' ? -1 : this.time,
parkingAlwaysValid: this.effective parkingAlwaysValid: this.control === '01' ? true : this.effective
}, },
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`] messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
}; };