rt-sim-training-client/src/views/iscs/iscsSystem/stationConfig/index.vue

98 lines
3.5 KiB
Vue
Raw Normal View History

2020-09-22 11:31:18 +08:00
<template>
<div style="height: 100%; width: 100%;overflow-y:hidden;overflow-x:hidden;position: relative;">
2020-09-22 15:25:33 +08:00
<psd-system v-if="mode=='psdSystem'" />
<substation v-else-if="mode=='substation'" />
<schedule v-else-if="mode=='schedule'" />
2021-03-23 16:41:40 +08:00
<normal v-else-if="mode.includes('environment')" />
<fas v-else-if="fasList.includes(mode)" />
2021-03-23 18:17:54 +08:00
<signal-system v-else-if="mode === 'signal'" />
2021-03-23 16:41:40 +08:00
<!-- environmentThree -->
<!-- <normal v-else-if="mode=='environmentFour'" />
2020-10-15 17:02:34 +08:00
<normal v-else-if="mode=='environmentFive'" />
<normal v-else-if="mode=='environmentSix'" />
<normal v-else-if="mode=='environmentSeven'" />
<normal v-else-if="mode=='environmentEight'" />
<normal v-else-if="mode=='environmentNine'" />
<normal v-else-if="mode=='environmentTen'" />
<normal v-else-if="mode=='environmentThirteen'" />
2020-10-15 17:02:34 +08:00
<normal v-else-if="mode=='environmentEleven'" />
2021-03-23 16:41:40 +08:00
<normal v-else-if="mode=='environmentTwelve'" /> -->
2021-03-23 18:17:54 +08:00
<!-- <big-screen v-else-if="mode === 'signal'" /> -->
<!-- <big-screen v-else-if="mode === 'signal'" /> -->
2021-03-23 17:52:32 +08:00
<ticket-or-entrance v-else-if="mode === 'autoTicket'" />
<!-- -->
2020-09-22 11:31:18 +08:00
</div>
</template>
<script>
2020-09-22 15:25:33 +08:00
import PsdSystem from './psdSystem/index.vue';
import Substation from './powerMonitor/substation.vue';
import Normal from './environment/index.vue';
import Schedule from './schedule';
2021-03-23 16:41:40 +08:00
import Fas from './fas/index.vue';
2021-03-23 18:17:54 +08:00
import SignalSystem from './signalSystem/index.vue';
// import BigScreen from '@/views/designPlatform/bigScreen';
2021-03-23 17:52:32 +08:00
import TicketOrEntrance from './ticketOrEntrance/index';
// import BigScreen from '@/views/designPlatform/bigScreen';
import { getSimulationInfoNew } from '@/api/simulation';
import { getByGroupStationList } from '@/api/jmap/map';
import { loadRunPlanData } from '@/utils/loaddata';
2020-09-22 11:31:18 +08:00
export default {
2020-09-22 15:25:33 +08:00
components:{
Schedule,
2020-10-12 09:26:14 +08:00
PsdSystem,
Substation,
Normal,
2021-03-23 18:17:54 +08:00
// BigScreen,
SignalSystem,
2021-03-23 17:52:32 +08:00
Fas,
TicketOrEntrance
2020-09-22 15:25:33 +08:00
},
2020-09-22 11:31:18 +08:00
data() {
return {
mode: 'index',
2021-03-23 16:41:40 +08:00
deviceList: [],
2021-03-23 17:51:36 +08:00
fasList:['sensing', 'gas', 'section', 'linkage', 'stationHall', 'platform']
2020-09-22 11:31:18 +08:00
};
},
computed: {
group() {
return this.$route.query.group;
}
},
2020-09-22 11:31:18 +08:00
watch: {
'$route': function(val) {
this.mode = this.$route.params.mode;
},
'$store.state.socket.runPlanReloadCount': function (val) {
getSimulationInfoNew(this.group).then(res => {
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
loadRunPlanData(this.group);
});
2020-09-22 11:31:18 +08:00
}
},
mounted() {
this.mode = this.$route.params.mode;
getSimulationInfoNew(this.group).then(res => {
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
this.loadRunData();
});
},
methods: {
loadRunData() {
this.$store.dispatch('runPlan/clear').then(() => {
if (this.group) {
// 获取排序的车站列表
getByGroupStationList(this.group).then(response => {
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
loadRunPlanData(this.group);
});
}).catch(() => {
this.$messageBox(this.$t('display.schema.getStationListFail'));
});
}
});
}
2020-09-22 11:31:18 +08:00
}
};
</script>