Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
906e12d508
Binary file not shown.
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 138 KiB |
Binary file not shown.
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 120 KiB |
@ -154,10 +154,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuSpeed: [
|
menuSpeed: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '列车限速',
|
||||||
handler: this.limitSpeed
|
// handler: this.limitSpeed
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -184,7 +184,7 @@ export default {
|
|||||||
let res = {};
|
let res = {};
|
||||||
res = await createSimulationNew(data);
|
res = await createSimulationNew(data);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
const query = { group: res.data, lineCode:this.courseModel.lineCode };
|
const query = { group: res.data, lineCode:this.courseModel.lineCode, mapId: this.courseModel.mapId };
|
||||||
this.$router.push({ path: `/displayIscs/system`, query: query });
|
this.$router.push({ path: `/displayIscs/system`, query: query });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -65,7 +65,7 @@ export default {
|
|||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
this.$jlmap.off('zoom');
|
this.$jlmap.off('zoom');
|
||||||
this.handleUpdateScreen();
|
this.handleUpdateScreen();
|
||||||
if (this.$route.query.group) {
|
if (this.$route.query.group && !this.$route.path.includes('displayIscs')) {
|
||||||
this.subscribe();
|
this.subscribe();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
await this.setWindowSize();
|
await this.setWindowSize();
|
||||||
await this.initLoadData();
|
await this.initLoadData();
|
||||||
this.disPlay = true;
|
this.disPlay = true;
|
||||||
if (this.$route.path.includes('design/bigScreen') || this.$route.query.noPreLogout || this.$route.query.projectDevice) {
|
if (this.$route.path.includes('design/bigScreen') || this.$route.query.noPreLogout || this.$route.query.projectDevice || this.$route.path.includes('displayIscs')) {
|
||||||
this.disPlay = false;
|
this.disPlay = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div style="height: 100%; width: 100%;overflow-y:hidden;overflow-x:hidden;position: relative;">
|
<div style="height: 100%; width: 100%;overflow-y:hidden;overflow-x:hidden;position: relative;">
|
||||||
<psd-system v-if="mode=='psdSystem'" />
|
<psd-system v-if="mode=='psdSystem'" />
|
||||||
<substation v-else-if="mode=='substation'" />
|
<substation v-else-if="mode=='substation'" />
|
||||||
|
<schedule v-else-if="mode=='schedule'" />
|
||||||
<normal v-else-if="mode=='environmentThree'" />
|
<normal v-else-if="mode=='environmentThree'" />
|
||||||
<normal v-else-if="mode=='environmentFour'" />
|
<normal v-else-if="mode=='environmentFour'" />
|
||||||
<normal v-else-if="mode=='environmentFive'" />
|
<normal v-else-if="mode=='environmentFive'" />
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<normal v-else-if="mode=='environmentThirteen'" />
|
<normal v-else-if="mode=='environmentThirteen'" />
|
||||||
<normal v-else-if="mode=='environmentEleven'" />
|
<normal v-else-if="mode=='environmentEleven'" />
|
||||||
<normal v-else-if="mode=='environmentTwelve'" />
|
<normal v-else-if="mode=='environmentTwelve'" />
|
||||||
|
<big-screen v-else-if="mode === 'signal'" />
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -22,11 +22,18 @@
|
|||||||
import PsdSystem from './psdSystem/index.vue';
|
import PsdSystem from './psdSystem/index.vue';
|
||||||
import Substation from './powerMonitor/substation.vue';
|
import Substation from './powerMonitor/substation.vue';
|
||||||
import Normal from './environment/index.vue';
|
import Normal from './environment/index.vue';
|
||||||
|
import Schedule from './schedule';
|
||||||
|
import BigScreen from '@/views/designPlatform/bigScreen';
|
||||||
|
import { getSimulationInfoNew } from '@/api/simulation';
|
||||||
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
|
import { loadRunPlanData } from '@/utils/loaddata';
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
|
Schedule,
|
||||||
PsdSystem,
|
PsdSystem,
|
||||||
Substation,
|
Substation,
|
||||||
Normal
|
Normal,
|
||||||
|
BigScreen
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -34,21 +41,44 @@ export default {
|
|||||||
deviceList: []
|
deviceList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
group() {
|
||||||
|
return this.$route.query.group;
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route': function(val) {
|
'$route': function(val) {
|
||||||
this.mode = this.$route.params.mode;
|
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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// '$store.state.iscs.selectedCount': function() {
|
|
||||||
// const device = this.$store.state.iscs.selected;
|
|
||||||
// if (device && device._type === 'IscsButton' && device.function === 'GraphicEle') {
|
|
||||||
// this.$refs.graphicEle.doShow();
|
|
||||||
// } else if (device && this.deviceList.includes(device._type)) {
|
|
||||||
// this.$refs.deviceControl.doShow(device);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.mode = this.$route.params.mode;
|
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'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
507
src/views/iscs/iscsSystem/stationConfig/schedule.vue
Normal file
507
src/views/iscs/iscsSystem/stationConfig/schedule.vue
Normal file
@ -0,0 +1,507 @@
|
|||||||
|
<template>
|
||||||
|
<div id="PlanSchedule" :style="{ height: height+'px'}">
|
||||||
|
<div class="left">
|
||||||
|
<div :id="runPlanId" />
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<data-table
|
||||||
|
ref="serviceTable1"
|
||||||
|
:height="height/2"
|
||||||
|
:config="serviceNumberConfig"
|
||||||
|
:style="{top: top-height/2+'px'}"
|
||||||
|
@touch="scheduleTouch"
|
||||||
|
/>
|
||||||
|
<data-table
|
||||||
|
ref="tripTable1"
|
||||||
|
:height="height/2"
|
||||||
|
:config="tripNumberConfig"
|
||||||
|
:style="{top: top-height/2+'px'}"
|
||||||
|
@touch="trainNumTouch"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { timeFormat } from '@/utils/date';
|
||||||
|
import DataTable from '@/views/planSchedule/menusPlan/components/dataTable';
|
||||||
|
import echarts from 'echarts';
|
||||||
|
import {toTimeStamp, formatDuring} from '@/utils/date';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PlanSchedule',
|
||||||
|
components: {
|
||||||
|
DataTable
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
top: 0,
|
||||||
|
height: 0,
|
||||||
|
inter:null,
|
||||||
|
runPlanId: 'run-plan-view',
|
||||||
|
myChart: null,
|
||||||
|
PlanConvert: {},
|
||||||
|
serviceNumberConfig: {
|
||||||
|
data: [],
|
||||||
|
highlightCurrentRow: true,
|
||||||
|
handleChange: this.serviceNumberChange,
|
||||||
|
showClose: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'serviceNumber',
|
||||||
|
label: '表号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 40
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
tripNumberConfig: {
|
||||||
|
data: [],
|
||||||
|
highlightCurrentRow: true,
|
||||||
|
handleChange: this.tripNumberChange,
|
||||||
|
showClose: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'tripNumber',
|
||||||
|
label: '车次号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 40
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
realData: {},
|
||||||
|
kmRangeCoordMap: {},
|
||||||
|
absoluteTime: 2 * 3600,
|
||||||
|
indexKmRangeMap: {},
|
||||||
|
dialogLoading: false,
|
||||||
|
dialogShow: false,
|
||||||
|
seriesMap: {},
|
||||||
|
staticSeries: [],
|
||||||
|
runSeries: [],
|
||||||
|
selectSeries: [],
|
||||||
|
runPlanData: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('runPlan', [
|
||||||
|
'stations'
|
||||||
|
]),
|
||||||
|
maxWidth() {
|
||||||
|
return this.$store.state.app.width > 1920 ? 1920 : this.$store.state.app.width;
|
||||||
|
},
|
||||||
|
maxHeight() {
|
||||||
|
return this.$store.state.app.height > 1080 ? 1050 : this.$store.state.app.height - 30;
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
return this.$t('display.runPlan.previewRunDiagram');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
maxWidth() {
|
||||||
|
this.setPosition();
|
||||||
|
},
|
||||||
|
maxHeight() {
|
||||||
|
this.setPosition();
|
||||||
|
},
|
||||||
|
'$store.state.runPlan.planLoadedCount': async function () {
|
||||||
|
try {
|
||||||
|
await this.loadChartPage();
|
||||||
|
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||||
|
if (this.dialogShow) {
|
||||||
|
await this.loadInitData();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.simulationReset': function (val) {
|
||||||
|
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||||
|
if (this.dialogShow) {
|
||||||
|
this.loadInitData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.runPlan.planSizeCount': function () {
|
||||||
|
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||||
|
},
|
||||||
|
'$store.state.socket.trainStationList': function (val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.updateRunPlanData(val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.lineCode);
|
||||||
|
this.loadChartPage();
|
||||||
|
EventBus.$on('clearRunSeries', () => {
|
||||||
|
this.runSeries = [];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.$store.dispatch('runPlan/setSelected', null);
|
||||||
|
this.destroy();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.inter && clearInterval(this.inter);
|
||||||
|
},
|
||||||
|
serviceNumberChange(row) {
|
||||||
|
if (row) {
|
||||||
|
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
|
||||||
|
this.renderTripNumber({ serviceNumber: row.serviceNumber, tripNumber: null });
|
||||||
|
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
|
||||||
|
if (serviceObj) {
|
||||||
|
this.analyticalTripNumber(serviceObj.trainMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tripNumberChange(row) {
|
||||||
|
if (row) {
|
||||||
|
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||||
|
this.renderTripNumber({ serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async analyticalServiceNumber(data) {
|
||||||
|
this.serviceNumberConfig.data = Object.keys(data || {})
|
||||||
|
.sort((a, b) => { return parseInt(data[a].serviceNumber) - parseInt(data[b].serviceNumber); })
|
||||||
|
.map(serviceNumber => { return { serviceNumber }; });
|
||||||
|
},
|
||||||
|
async analyticalTripNumber(data) {
|
||||||
|
this.tripNumberConfig.data = Object.keys(data || {})
|
||||||
|
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
||||||
|
.map(tripNumber => { return { tripNumber }; });
|
||||||
|
},
|
||||||
|
async setPosition() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const top = 54;
|
||||||
|
const width = this.maxWidth * 0.85;
|
||||||
|
let height = this.maxHeight;
|
||||||
|
|
||||||
|
height = height - top;
|
||||||
|
this.$store.dispatch('runPlan/resize', { width, height });
|
||||||
|
|
||||||
|
if (this.top != top) {
|
||||||
|
this.top = top;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.height != height) {
|
||||||
|
this.height = height - top;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
updateRunPlanData(data) {
|
||||||
|
const stations = this.$store.state.runPlan.stations;
|
||||||
|
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||||
|
data.forEach(item => {
|
||||||
|
if (item && initialPlanData[item.serviceNumber]) {
|
||||||
|
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||||
|
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||||
|
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
item.secondTime = item.second;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||||
|
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||||
|
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
||||||
|
);
|
||||||
|
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
|
||||||
|
this.myChart && this.myChart.setOption({series: series});
|
||||||
|
},
|
||||||
|
async loadChartPage() {
|
||||||
|
try {
|
||||||
|
this.seriesMap = {};
|
||||||
|
this.staticSeries = [];
|
||||||
|
const stations = this.$store.state.runPlan.stations;
|
||||||
|
const planData = this.$store.state.runPlan.planData;
|
||||||
|
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||||
|
this.pushModels(this.staticSeries, [this.PlanConvert.initializeYaxis(stations)]);
|
||||||
|
this.staticSeries = this.pushModels(this.staticSeries, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
|
||||||
|
this.staticSeries.forEach(item => {
|
||||||
|
this.seriesMap[item.name] = item;
|
||||||
|
});
|
||||||
|
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
|
await this.setPosition();
|
||||||
|
await this.loadInitData();
|
||||||
|
this.inter && clearInterval(this.inter);
|
||||||
|
} catch (error) {
|
||||||
|
this.$messageBox(`加载运行图数据失败`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async loadInitData() {
|
||||||
|
this.myChart && this.myChart.showLoading();
|
||||||
|
const option = {
|
||||||
|
tooltip: {
|
||||||
|
axisPointer: {
|
||||||
|
trigger: 'item',
|
||||||
|
type: 'cross'
|
||||||
|
},
|
||||||
|
formatter: this.axisTooltip,
|
||||||
|
borderWidth: 1
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
right: '40px',
|
||||||
|
left: '120px',
|
||||||
|
height: '85%'
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: [],
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
lineStyle: {
|
||||||
|
width: 2,
|
||||||
|
color: '#d14a61'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: this.xAxisLableFormat,
|
||||||
|
textStyle: {
|
||||||
|
color: '#333'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
snap: true,
|
||||||
|
label: {
|
||||||
|
formatter: this.xAxisPointFormat,
|
||||||
|
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
yAxisIndex: 0,
|
||||||
|
splitLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
lineStyle: {
|
||||||
|
width: 2,
|
||||||
|
color: '#d14a61'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
interval: 'auto',
|
||||||
|
formatter: this.yAxisLableFormat
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
xAxisIndex: 'all',
|
||||||
|
label: {
|
||||||
|
formatter: this.yAxisPointFormat,
|
||||||
|
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataZoom: [{
|
||||||
|
type: 'inside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fiterMode: 'filter',
|
||||||
|
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||||
|
handleSize: '80%',
|
||||||
|
handleStyle: {
|
||||||
|
color: '#fff',
|
||||||
|
shadowBlur: 3,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||||
|
shadowOffsetX: 2,
|
||||||
|
shadowOffsetY: 2
|
||||||
|
},
|
||||||
|
bottom: '20px'
|
||||||
|
}],
|
||||||
|
series: [
|
||||||
|
|
||||||
|
]
|
||||||
|
};
|
||||||
|
await this.xAxisInit(option);
|
||||||
|
await this.yAxisInit(option);
|
||||||
|
await this.loadInitChart(option);
|
||||||
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
},
|
||||||
|
pushModels(series, models) {
|
||||||
|
if (models && models.length) {
|
||||||
|
models.forEach(elem => {
|
||||||
|
if (elem) {
|
||||||
|
series.push(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return series;
|
||||||
|
},
|
||||||
|
loadInitChart(option) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
this.destroy();
|
||||||
|
let startValue = 3600 + this.PlanConvert.TranslationTime;
|
||||||
|
const offsetTime = 3600;
|
||||||
|
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
|
||||||
|
startValue = initTime - this.PlanConvert.TranslationTime;
|
||||||
|
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||||
|
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
||||||
|
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||||
|
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||||
|
if (this.myChart) {
|
||||||
|
this.myChart.setOption(option);
|
||||||
|
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||||
|
this.myChart.on('click', this.mouseClick);
|
||||||
|
}
|
||||||
|
resolve(true);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
xAxisPointFormat(params) {
|
||||||
|
return timeFormat(params.value);
|
||||||
|
},
|
||||||
|
yAxisPointFormat(params) {
|
||||||
|
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
||||||
|
},
|
||||||
|
xAxisLableFormat(value, index) {
|
||||||
|
return timeFormat(value);
|
||||||
|
},
|
||||||
|
yAxisLableFormat(value, index) {
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
xAxisInit(option) {
|
||||||
|
const list = [];
|
||||||
|
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||||
|
list.push(time);
|
||||||
|
}
|
||||||
|
const startValue = 3600 * 6;
|
||||||
|
const offsetTime = 3600 * 1;
|
||||||
|
|
||||||
|
option.xAxis[0].data = list;
|
||||||
|
if (!option.dataZoom[0].startValue) {
|
||||||
|
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!option.dataZoom[0].endValue) {
|
||||||
|
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxisInit(option) {
|
||||||
|
if (Object.keys(this.PlanConvert).length) {
|
||||||
|
option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||||
|
option.yAxis[0].max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisTooltip(param) {
|
||||||
|
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
|
||||||
|
return [
|
||||||
|
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||||
|
`车站名称: ${station.name}<br>`,
|
||||||
|
`车站公里标: ${station.kmRange} km <br>`,
|
||||||
|
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||||
|
].join('');
|
||||||
|
},
|
||||||
|
renderTripNumber(params) {
|
||||||
|
const tripNumber = params.tripNumber; // 车次号
|
||||||
|
const serviceNumber = params.serviceNumber; // 服务号
|
||||||
|
let data, markPoint;
|
||||||
|
if (tripNumber && this.seriesMap[serviceNumber]) {
|
||||||
|
const temp = this.seriesMap[serviceNumber].data.filter(elem => elem[3] == tripNumber);
|
||||||
|
if (temp.length) {
|
||||||
|
data = temp;
|
||||||
|
this.seriesMap[serviceNumber].markPoint.data.forEach(each=> {
|
||||||
|
if (each.name == temp[0][4]) {
|
||||||
|
markPoint = deepAssign({}, {data:[each]});
|
||||||
|
markPoint.symbol = 'roundRect';
|
||||||
|
markPoint.symbolSize = 1;
|
||||||
|
markPoint.data[0].label.color = '#f00';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (this.seriesMap[serviceNumber]) {
|
||||||
|
markPoint = deepAssign({}, this.seriesMap[serviceNumber].markPoint);
|
||||||
|
markPoint.data.forEach(each => {
|
||||||
|
each.label.color = '#f00';
|
||||||
|
});
|
||||||
|
data = this.seriesMap[serviceNumber].data;
|
||||||
|
}
|
||||||
|
this.selectSeries = [{
|
||||||
|
name: 'trainLabel',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#f00',
|
||||||
|
width: 2,
|
||||||
|
type: 'solid'
|
||||||
|
},
|
||||||
|
z: 10,
|
||||||
|
type: 'line',
|
||||||
|
markPoint:markPoint,
|
||||||
|
animation: false,
|
||||||
|
data: data
|
||||||
|
}];
|
||||||
|
const series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||||
|
this.myChart && this.myChart.setOption({series: series});
|
||||||
|
},
|
||||||
|
mouseClick(params) {
|
||||||
|
const model = {
|
||||||
|
serviceNumber: params.seriesName
|
||||||
|
};
|
||||||
|
this.$store.dispatch('runPlan/setSelected', model);
|
||||||
|
},
|
||||||
|
reSize(opt) {
|
||||||
|
if (this.myChart) {
|
||||||
|
this.myChart.resize({
|
||||||
|
width: opt.width,
|
||||||
|
height: opt.height,
|
||||||
|
silent: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
destroy() {
|
||||||
|
if (this.myChart && this.myChart.isDisposed) {
|
||||||
|
this.myChart.dispose();
|
||||||
|
this.myChart = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scheduleTouch() {
|
||||||
|
|
||||||
|
},
|
||||||
|
trainNumTouch() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped rel="stylesheet/scss" lang="scss">
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
#PlanSchedule {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
height: 100%;
|
||||||
|
width: 85%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
height: 100%;
|
||||||
|
width: 15%;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -49,8 +49,8 @@
|
|||||||
<span class="eachButtonText">{{ button.name }}</span>
|
<span class="eachButtonText">{{ button.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="button.children&&button.children.length>0" class="childGroup" :class="isActive(button)">
|
<div v-if="button.children&&button.children.length>0" class="childGroup" :class="isActive(button)">
|
||||||
<div v-for="child in button.children" :key="child.id" class="childButton" @click="gotoPage(button,child)">
|
<div v-for="child in button.children" :key="child.id" class="childButton" :style="{cursor:child.disabled? 'not-allowed': 'pointer'}" @click="gotoPage(button,child)">
|
||||||
<div class="childButtonIn">{{ child.name }}</div>
|
<div class="childButtonIn" :style="{color:child.disabled?'#c0c0c0':'#000'}">{{ child.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="childLine" />
|
<div class="childLine" />
|
||||||
</div>
|
</div>
|
||||||
@ -260,7 +260,8 @@ export default {
|
|||||||
name: 'TIS管理器',
|
name: 'TIS管理器',
|
||||||
mode: 'tis',
|
mode: 'tis',
|
||||||
id: 'tis',
|
id: 'tis',
|
||||||
type: 'interface'
|
type: 'interface',
|
||||||
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '列车时刻表',
|
name: '列车时刻表',
|
||||||
@ -278,7 +279,8 @@ export default {
|
|||||||
name: '全线信号系统界面',
|
name: '全线信号系统界面',
|
||||||
mode: 'allLineSignal',
|
mode: 'allLineSignal',
|
||||||
id: 'allLineSignal',
|
id: 'allLineSignal',
|
||||||
type: 'interface'
|
type: 'interface',
|
||||||
|
disabled: true
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
// communication:{name:'通信', type:'totalSystem', id: 'communication', active:false, icon:iscs_icon7,
|
// communication:{name:'通信', type:'totalSystem', id: 'communication', active:false, icon:iscs_icon7,
|
||||||
@ -398,8 +400,10 @@ export default {
|
|||||||
this.buttonId = button.id;
|
this.buttonId = button.id;
|
||||||
},
|
},
|
||||||
gotoPage(button, child) {
|
gotoPage(button, child) {
|
||||||
button.active = false;
|
if (!child.disabled) {
|
||||||
this.selectChildren(child.id, false);
|
button.active = false;
|
||||||
|
this.selectChildren(child.id, false);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
changeStation(item) {
|
changeStation(item) {
|
||||||
this.selectStation = item;
|
this.selectStation = item;
|
||||||
@ -425,7 +429,7 @@ export default {
|
|||||||
if (station) {
|
if (station) {
|
||||||
stationName = station.name;
|
stationName = station.name;
|
||||||
}
|
}
|
||||||
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode };
|
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode, mapId: this.$route.query.mapId, noPreLogout:this.$route.query.noPreLogout };
|
||||||
|
|
||||||
if (isReplace) {
|
if (isReplace) {
|
||||||
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });
|
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
|
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
|
||||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||||
|
<el-button v-if="userRole==='DISPATCHER' && !$route.query.projectDevice" size="small" @click="goIscs">ISCS</el-button>
|
||||||
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||||
<template v-if="isAdmin">
|
<template v-if="isAdmin">
|
||||||
<el-button v-if="!running && !dataError && $route.query.type !== 'ILW'" size="small" type="warning" @click="loadRunPlan">
|
<el-button v-if="!running && !dataError && $route.query.type !== 'ILW'" size="small" type="warning" @click="loadRunPlan">
|
||||||
@ -202,6 +203,18 @@ export default {
|
|||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
},
|
},
|
||||||
|
goIscs() {
|
||||||
|
const routeData = this.$router.resolve({
|
||||||
|
path:`/displayIscs/system`,
|
||||||
|
query:{
|
||||||
|
lineCode: this.$route.query.lineCode,
|
||||||
|
mapId: this.$route.query.mapId,
|
||||||
|
group: this.$route.query.group,
|
||||||
|
noPreLogout: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
|
},
|
||||||
// 点击ibp预览
|
// 点击ibp预览
|
||||||
goIbp() {
|
goIbp() {
|
||||||
// this.$refs.selectIbp.doShow();
|
// this.$refs.selectIbp.doShow();
|
||||||
|
Loading…
Reference in New Issue
Block a user