泰国项目调整
This commit is contained in:
parent
c98746317c
commit
4d92751f7d
@ -2,18 +2,35 @@
|
||||
<div id="menuBarDatie">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" />
|
||||
<setOperationPlan ref="setOperationPlan" />
|
||||
<station-control-convert ref="stationControlConvert" :work="'dispatchWork'" />
|
||||
<view-name ref="viewName" />
|
||||
<train-operation ref="trainOperation" />
|
||||
<switch-control ref="switchControl" />
|
||||
<signal-control ref="signalControl" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew'
|
||||
import { destroySimulationByAdmin, exitSimulation } from '@/api/simulation'
|
||||
import setOperationPlan from './menuDialog/setOperationPlan.vue'
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
|
||||
import { destroySimulationByAdmin, exitSimulation } from '@/api/simulation';
|
||||
import setOperationPlan from './menuDialog/setOperationPlan.vue';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainOperation from './menuDialog/trainOperation';
|
||||
import SwitchControl from './menuDialog/switchControl';
|
||||
import SignalControl from './menuDialog/signalControl';
|
||||
import {mapGetters} from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'DispatchWorkMenuBar',
|
||||
components: {
|
||||
MenuBar,
|
||||
setOperationPlan,
|
||||
ViewName,
|
||||
StationControlConvert,
|
||||
TrainOperation,
|
||||
SwitchControl,
|
||||
SignalControl
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -24,95 +41,225 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: 'Exit',
|
||||
click: this.handleExit,
|
||||
},
|
||||
],
|
||||
click: this.handleExit
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'UI Control',
|
||||
operate: '',
|
||||
children: [],
|
||||
click: this.uiControl
|
||||
},
|
||||
{
|
||||
title: 'Station',
|
||||
operate: '',
|
||||
children: [],
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: 'Station Ctrl Mode',
|
||||
operate: '',
|
||||
children: [],
|
||||
children: [
|
||||
{
|
||||
title: 'To Station Control',
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar
|
||||
},
|
||||
{
|
||||
title: 'Forced Station Control',
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password
|
||||
},
|
||||
{
|
||||
title: 'To Center Control',
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar,
|
||||
force: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Train Control',
|
||||
operate: '',
|
||||
children: [],
|
||||
click: this.trainControlShow
|
||||
},
|
||||
{
|
||||
title: 'Signal Device Control',
|
||||
operate: '',
|
||||
children: [],
|
||||
children: [
|
||||
{
|
||||
title: 'Signal Close',
|
||||
click: this.handleSignalOperate,
|
||||
operate: OperationEvent.Signal.signalClose.mbar
|
||||
},
|
||||
{
|
||||
title: 'Signal Reopen',
|
||||
click: this.handleSignalOperate,
|
||||
operate: OperationEvent.Signal.reopenSignal.mbar
|
||||
},
|
||||
{
|
||||
title: 'Turnout Normal',
|
||||
click: this.handleSwitchOperate,
|
||||
operate: OperationEvent.Switch.locate.mbar
|
||||
},
|
||||
{
|
||||
title: 'Turnout Reverse',
|
||||
click: this.handleSwitchOperate,
|
||||
operate: OperationEvent.Switch.reverse.mbar
|
||||
},
|
||||
{
|
||||
title: 'Turnout Lock',
|
||||
click: this.handleSwitchOperate,
|
||||
operate: OperationEvent.Switch.lock.mBar
|
||||
},
|
||||
{
|
||||
title: 'Turnout Unlock',
|
||||
click: this.handleSwitchOperate,
|
||||
operate: OperationEvent.Switch.unlock.mbar
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Operation Plan',
|
||||
operate: '',
|
||||
click: this.openOperationPlan,
|
||||
children: [],
|
||||
children: []
|
||||
},
|
||||
{
|
||||
title: 'Plan Details',
|
||||
operate: '',
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
children: []
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.stationList.forEach(station => {
|
||||
this.menuNormal[2].children.push({ title: station.name, click: () => {
|
||||
this.$jlmap.setCenter(station.code);
|
||||
} });
|
||||
});
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
trainControlShow() {
|
||||
this.$refs.trainOperation.doShow();
|
||||
},
|
||||
handleSignalOperate(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.signalControl.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSwitchOperate(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
turnToStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制转为站控
|
||||
mandatoryStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求中控
|
||||
conterStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
uiControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose()
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
handleExit() {
|
||||
this.$confirm('Whether to exit emulation?', 'Hint', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.back()
|
||||
})
|
||||
this.back();
|
||||
});
|
||||
},
|
||||
back() {
|
||||
if (this.$store.state.training.simulationCreator) {
|
||||
destroySimulationByAdmin(this.group)
|
||||
destroySimulationByAdmin(this.group);
|
||||
} else {
|
||||
exitSimulation(this.group)
|
||||
exitSimulation(this.group);
|
||||
}
|
||||
if (this.projectDevice && this.$store.state.training.simulationCreator) {
|
||||
this.logout()
|
||||
this.logout();
|
||||
} else if (this.$route.query.third) {
|
||||
if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') {
|
||||
window.parent.postMessage('back', '*')
|
||||
window.parent.postMessage('back', '*');
|
||||
} else {
|
||||
window.close()
|
||||
window.close();
|
||||
}
|
||||
} else if (this.projectDevice) {
|
||||
this.logout()
|
||||
this.logout();
|
||||
} else {
|
||||
this.$router.go(-1)
|
||||
this.$router.go(-1);
|
||||
}
|
||||
},
|
||||
// 登出
|
||||
logout() {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
location.reload();
|
||||
});
|
||||
},
|
||||
openOperationPlan() {
|
||||
console.log
|
||||
this.$refs.setOperationPlan.doShow()
|
||||
},
|
||||
},
|
||||
}
|
||||
console.log;
|
||||
this.$refs.setOperationPlan.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
#menuBarDatie {
|
||||
|
Loading…
Reference in New Issue
Block a user