Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
988f38fbb3
@ -741,12 +741,12 @@ class SkinCode extends defaultStyle {
|
||||
status: 'RMCBTC',
|
||||
trainLColor: '#808080',
|
||||
trainRColor: '#808080'
|
||||
},
|
||||
{
|
||||
status: 'NRMCBTC',
|
||||
trainLColor: 'rgba(0, 0, 0, 0)',
|
||||
trainRColor: 'rgba(0, 0, 0, 0)'
|
||||
}
|
||||
// {
|
||||
// status: 'NRM',
|
||||
// trainLColor: '#A0522D',
|
||||
// trainRColor: '#A0522D'
|
||||
// }
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
communicationStatus: [
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
|
@ -24,7 +24,7 @@ export default class TrainHead extends Group {
|
||||
height: style.Train.trainHead.trainHeadHeight === 'trainBox' ? style.Train.common.trainHeight : model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.1,
|
||||
lineWidth: 0,
|
||||
stroke: style.trainSidelineColor,
|
||||
fill: style.Train.trainHead.trainHeadFillColor
|
||||
}
|
||||
@ -45,7 +45,7 @@ export default class TrainHead extends Group {
|
||||
points: points
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.1,
|
||||
lineWidth: 0,
|
||||
stroke: style.trainSidelineColor,
|
||||
fill: style.Train.trainHead.trainHeadFillColor
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ export default {
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
agree: true,
|
||||
disabled: false
|
||||
};
|
||||
|
||||
|
@ -5,15 +5,17 @@ const runPlan = {
|
||||
stations: [], // 车站列表
|
||||
planData: {}, // 运行图原始数据
|
||||
editData: {}, // 运行图编辑数据
|
||||
updateData: {}, // 运行图更新数据
|
||||
planSizeCount: 0, // 运行图canvas 大小变更标识
|
||||
planLoadedCount: 0, // 运行图数据更新
|
||||
planUpdateCount: 0, // 运行图更新标识
|
||||
allowUpdate:true, // 允许运行图更新
|
||||
updateDataList:[], // 运行图数据更新池
|
||||
selected: {}, // 选择的对象
|
||||
width: 800, // 运行图canvas 容器 宽度
|
||||
height: 600, // 运行图canvas 容器 高度
|
||||
refreshCount: 0, // 刷新页面重新加载
|
||||
initialPlanData: {} // 运行图原始数据
|
||||
|
||||
},
|
||||
getters: {
|
||||
stations: (state) => {
|
||||
@ -102,8 +104,16 @@ const runPlan = {
|
||||
}
|
||||
},
|
||||
updateRunPlanData: (state, data) => {
|
||||
state.updateData = data;
|
||||
state.planUpdateCount++;
|
||||
state.updateDataList.push(data);
|
||||
},
|
||||
updateAllowUpdate: (state, data) => {
|
||||
state.allowUpdate = data;
|
||||
},
|
||||
shiftRunPlanData: (state) => {
|
||||
state.updateDataList.shift();
|
||||
},
|
||||
resetRunPlanData:(state) => {
|
||||
state.updateDataList = [];
|
||||
},
|
||||
clear: (state) => {
|
||||
state.stations = [];
|
||||
@ -129,6 +139,18 @@ const runPlan = {
|
||||
setStations: ({ commit }, mapModel) => {
|
||||
commit('setStations', mapModel);
|
||||
},
|
||||
/** 更新是否更新运行图状态 */
|
||||
updateAllowUpdate:({ commit }, data) => {
|
||||
commit('updateAllowUpdate', data);
|
||||
},
|
||||
/** 重置运行图数据更新池 */
|
||||
resetRunPlanData:({ commit }) => {
|
||||
commit('resetRunPlanData');
|
||||
},
|
||||
/** 删除运行图第一条shuj */
|
||||
shiftRunPlanData:({ commit }) => {
|
||||
commit('shiftRunPlanData');
|
||||
},
|
||||
/** 设置运行图数据 */
|
||||
setPlanData: ({ commit }, data) => {
|
||||
commit('setPlanData', data);
|
||||
|
@ -5,7 +5,7 @@ const scriptRecord = {
|
||||
namespaced: true,
|
||||
state: {
|
||||
mapLocation: {}, // 地图定位,
|
||||
simulationPause: true,
|
||||
simulationPause: true, // 剧本 暂停判断
|
||||
scriptId: '',
|
||||
bgSet: false,
|
||||
isScriptCommand:false, // 当前是否为添加剧本动作指令状态
|
||||
|
@ -15,14 +15,14 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<data-table
|
||||
ref="serviceTable"
|
||||
ref="serviceTable1"
|
||||
:height="height/2"
|
||||
:config="serviceNumberConfig"
|
||||
:style="{top: top-height/2+'px'}"
|
||||
@touch="scheduleTouch"
|
||||
/>
|
||||
<data-table
|
||||
ref="tripTable"
|
||||
ref="tripTable1"
|
||||
:height="height/2"
|
||||
:config="tripNumberConfig"
|
||||
:style="{top: top-height/2+'px'}"
|
||||
@ -57,11 +57,10 @@ export default {
|
||||
return {
|
||||
top: 0,
|
||||
height: 0,
|
||||
heights: [100, 100],
|
||||
inter:null,
|
||||
runPlanId: 'run-plan-view',
|
||||
myChart: null,
|
||||
PlanConvert: {},
|
||||
initialPlanData: [],
|
||||
serviceNumberConfig: {
|
||||
data: [],
|
||||
highlightCurrentRow: true,
|
||||
@ -108,14 +107,6 @@ export default {
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
// right: '30px',
|
||||
// feature: {
|
||||
// dataZoom: {
|
||||
// yAxisIndex: 'none'
|
||||
// },
|
||||
// restore: {},
|
||||
// saveAsImage: {}
|
||||
// }
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
@ -208,6 +199,7 @@ export default {
|
||||
dialogLoading: false,
|
||||
dialogShow: false,
|
||||
series: [],
|
||||
oldseries:[],
|
||||
trainLabelPosition:0
|
||||
};
|
||||
},
|
||||
@ -244,26 +236,13 @@ export default {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
'$store.state.runPlan.planUpdateCount': function () {
|
||||
this.updateRunPlanData(this.$store.state.runPlan.updateData);
|
||||
},
|
||||
'$store.state.runPlan.planSizeCount': function () {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
'$store.state.runPlan.selected.serviceNumber': function (val) {
|
||||
if (this.dialogShow) {
|
||||
const index = this.serviceNumberConfig.data.findIndex(elem => {
|
||||
return elem.serviceNumber == val;
|
||||
});
|
||||
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
|
||||
}
|
||||
},
|
||||
'$store.state.runPlan.selected.tripNumber': function (val) {
|
||||
if (this.dialogShow) {
|
||||
const index = this.tripNumberConfig.data.findIndex(elem => {
|
||||
return elem.tripNumber == val;
|
||||
});
|
||||
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
|
||||
|
||||
'$store.state.map.runPlanStatus':function (val) {
|
||||
if (!val) {
|
||||
this.$store.dispatch('runPlan/resetRunPlanData');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -271,7 +250,6 @@ export default {
|
||||
// this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||
getPublishMapInfo(this.$route.query.mapId).then(res=>{
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
|
||||
this.initialPlanData = this.$store.state.runPlan.planData;
|
||||
// this.loadChartPage();
|
||||
});
|
||||
},
|
||||
@ -279,12 +257,16 @@ export default {
|
||||
this.destroy();
|
||||
},
|
||||
methods: {
|
||||
async doShow() {
|
||||
async doShow() {
|
||||
try {
|
||||
this.dialogLoading = true;
|
||||
this.dialogShow = true;
|
||||
this.setPosition();
|
||||
this.loadInitData(this.series);
|
||||
this.inter && clearInterval(this.inter);
|
||||
this.inter = setInterval(() => {
|
||||
this.updateRunningData();
|
||||
}, 1000);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
@ -293,6 +275,20 @@ export default {
|
||||
},
|
||||
async doClose() {
|
||||
this.dialogShow = false;
|
||||
this.inter && clearInterval(this.inter);
|
||||
// this.inter = null;
|
||||
},
|
||||
updateRunningData() {
|
||||
console.log('外层更新触发');
|
||||
if (this.$store.state.runPlan.allowUpdate) {
|
||||
console.log('里层更新触发');
|
||||
const updateDataList = this.$store.state.runPlan.updateDataList;
|
||||
// console.log(updateDataList.length);
|
||||
if (updateDataList.length > 0) {
|
||||
this.updateRunPlanData(updateDataList[0]);
|
||||
this.$store.dispatch('runPlan/shiftRunPlanData');
|
||||
}
|
||||
}
|
||||
},
|
||||
serviceNumberChange(row) {
|
||||
if (row) {
|
||||
@ -339,23 +335,27 @@ export default {
|
||||
});
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
if (data[0] && initialPlanData[data[0].serviceNumber]) {
|
||||
Object.keys(initialPlanData[data[0].serviceNumber].trainMap).forEach(item => {
|
||||
if (initialPlanData[data[0].serviceNumber].trainMap[item + ''].tripNumber == data[0].tripNumber) {
|
||||
data[0].directionCode = initialPlanData[data[0].serviceNumber].trainMap[item + ''].directionCode;
|
||||
}
|
||||
});
|
||||
if (this.myChart) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
if (data[0] && initialPlanData[data[0].serviceNumber]) {
|
||||
Object.keys(initialPlanData[data[0].serviceNumber].trainMap).forEach(item => {
|
||||
if (initialPlanData[data[0].serviceNumber].trainMap[item + ''].tripNumber == data[0].tripNumber) {
|
||||
data[0].directionCode = initialPlanData[data[0].serviceNumber].trainMap[item + ''].directionCode;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (data[0]) {
|
||||
data[0].secondTime = data[0].second;
|
||||
}
|
||||
const op = this.myChart.getOption();
|
||||
op.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
planData, op.series, { color: '#FF00DE', width: 2 }
|
||||
);
|
||||
this.series = op.series;
|
||||
this.myChart.setOption(op, true);
|
||||
}
|
||||
if (data[0]) {
|
||||
data[0].secondTime = data[0].second;
|
||||
}
|
||||
this.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
planData, this.series, { color: '#FF00DE', width: 2 }
|
||||
);
|
||||
this.myChart && this.myChart.setOption({ series: this.series });
|
||||
},
|
||||
async loadChartPage() {
|
||||
try {
|
||||
@ -366,7 +366,7 @@ export default {
|
||||
this.viewDisabled = true;
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
this.pushModels(this.series, [this.PlanConvert.initializeYaxis(stations)]);
|
||||
this.pushModels(this.series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 1 }));
|
||||
this.oldseries = this.pushModels(this.series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 1 }));
|
||||
// await this.loadInitData(series);
|
||||
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||
this.viewDisabled = false;
|
||||
@ -479,15 +479,16 @@ export default {
|
||||
].join('');
|
||||
},
|
||||
renderTripNumber(params) {
|
||||
this.$store.dispatch('runPlan/updateAllowUpdate', false);
|
||||
const tripNumber = params.tripNumber; // 车次号
|
||||
const serviceNumber = params.serviceNumber; // 服务号
|
||||
let data, markPoint;
|
||||
const op = this.myChart.getOption();
|
||||
if (this.trainLabelPosition > 0) {
|
||||
this.series.splice(this.trainLabelPosition - 1, 1);
|
||||
this.myChart && this.myChart.setOption({ series: this.series });
|
||||
op.series.splice(this.trainLabelPosition - 1, 1);
|
||||
this.myChart && this.myChart.setOption(op, true);
|
||||
}
|
||||
op.series.forEach((item, index) => {
|
||||
this.oldseries.forEach((item, index) => {
|
||||
if (item.name == serviceNumber && item.data) {
|
||||
if (tripNumber) {
|
||||
const temp = item.data.filter(elem => elem[3] == tripNumber);
|
||||
@ -511,7 +512,7 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.series.push({
|
||||
op.series.push({
|
||||
name: 'trainLabel',
|
||||
lineStyle: {
|
||||
color: '#f00',
|
||||
@ -523,9 +524,12 @@ export default {
|
||||
markPoint:markPoint,
|
||||
data: data
|
||||
});
|
||||
this.trainLabelPosition = this.series.length;
|
||||
this.trainLabelPosition = op.series.length;
|
||||
setTimeout(() => {
|
||||
this.myChart && this.myChart.setOption({ series: this.series });
|
||||
this.myChart && this.myChart.setOption(op, true);
|
||||
setTimeout(()=>{
|
||||
this.$store.dispatch('runPlan/updateAllowUpdate', true);
|
||||
}, 300);
|
||||
}, 50);
|
||||
},
|
||||
mouseClick(params) {
|
||||
|
@ -85,8 +85,8 @@ export default {
|
||||
lastData = JSON.parse(lastData);
|
||||
const lastMemberList = [];
|
||||
const dispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
// const electricDispatcherList = [];
|
||||
// const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
this.driverList = [];
|
||||
const maintainerList = [];
|
||||
|
@ -36,13 +36,11 @@
|
||||
:show-select-station="showSelectStation"
|
||||
:data-error="dataError"
|
||||
@runPlanLoadShow="runPlanLoadShow"
|
||||
@runPlanViewShow="runPlanViewShow"
|
||||
@faultChooseShow="faultChooseShow"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
<join-fault-choose ref="faultChoose" :group="group" :offset="offset" />
|
||||
<join-run-plan-Load ref="runPlanLoad" :group="group" />
|
||||
<join-run-plan-view ref="runPlanView" :group="group" />
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
|
||||
<js-question v-if="project == 'jsxt'" :offset="offset" :question-list="questionList" />
|
||||
@ -66,7 +64,6 @@ import MenuDemonSchema from './menuSchema';
|
||||
import JsQuestion from './jsQuestion';
|
||||
import JoinFaultChoose from '@/views/newMap/displayNew/demon/faultChoose';
|
||||
import JoinRunPlanLoad from '@/views/newMap/displayNew/demon/runPlanLoad';
|
||||
import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
|
||||
import menuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import IbpPlate from '@/views/ibp/ibpsystem/index';
|
||||
import MenuTrainList from './menuTrainList';
|
||||
@ -96,7 +93,6 @@ export default {
|
||||
MenuDemonSchema,
|
||||
JoinFaultChoose,
|
||||
JoinRunPlanLoad,
|
||||
JoinRunPlanView,
|
||||
MenuTrainList,
|
||||
menuSystemTime,
|
||||
Jl3dDrive,
|
||||
@ -421,8 +417,8 @@ export default {
|
||||
case 'AUDIENCE':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||
// this.jl3dmaintainershow = false;
|
||||
// this.drivingShow = false;
|
||||
this.jl3dmaintainershow = false;
|
||||
this.drivingShow = false;
|
||||
this.hideIbp();
|
||||
break;
|
||||
case 'DRIVER':
|
||||
@ -473,9 +469,6 @@ export default {
|
||||
back() {
|
||||
this.$refs.demonMenu.back();
|
||||
},
|
||||
runPlanViewShow() { // 运行图预览
|
||||
this.$refs.runPlanView.doShow();
|
||||
},
|
||||
runPlanLoadShow() { // 运行图加载
|
||||
this.$refs.runPlanLoad.doShow();
|
||||
},
|
||||
|
@ -292,6 +292,7 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('training/setMemberList', {memberList:[], userId: this.$store.state.user.id});
|
||||
this.$store.dispatch('training/setSimulationUserList', []);
|
||||
this.$store.dispatch('map/setRunPlanStatus', false);
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.backLoading = true;
|
||||
this.$store.dispatch('map/resetActiveTrainList');
|
||||
|
@ -1,38 +1,45 @@
|
||||
<template>
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-if="showSelectStation" v-model="chiShowStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
<el-button v-if="!runing && !dataError" size="small" type="warning" @click="loadRunPlan">
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
<template v-if="isAdmin">
|
||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
|
||||
</template>
|
||||
</el-button-group>
|
||||
<el-radio-group
|
||||
v-if="isAdmin && !dataError && !isScreen"
|
||||
v-model="mode"
|
||||
size="small"
|
||||
@change="changeOperateMode(mode)"
|
||||
>
|
||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
|
||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="height:100%">
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-if="showSelectStation" v-model="chiShowStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
<el-button v-if="!runing && !dataError" size="small" type="warning" @click="loadRunPlan">
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
<template v-if="isAdmin">
|
||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
|
||||
</template>
|
||||
</el-button-group>
|
||||
<el-radio-group
|
||||
v-if="isAdmin && !dataError && !isScreen"
|
||||
v-model="mode"
|
||||
size="small"
|
||||
@change="changeOperateMode(mode)"
|
||||
>
|
||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
|
||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<join-run-plan-view v-if="runing && !dataError" ref="runPlanView" :group="group" />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
|
||||
import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
|
||||
export default {
|
||||
name: 'MenuDemonSchema',
|
||||
components:{
|
||||
JoinRunPlanView
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
@ -150,7 +157,7 @@ export default {
|
||||
this.$emit('runPlanLoadShow');
|
||||
},
|
||||
viewRunPlan() {
|
||||
this.$emit('runPlanViewShow');
|
||||
this.$refs.runPlanView.doShow();
|
||||
},
|
||||
setRuning(run) {
|
||||
this.runing = run;
|
||||
|
@ -223,19 +223,6 @@ export default {
|
||||
},
|
||||
'$store.state.runPlan.planSizeCount': function () {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
'$store.state.runPlan.selected.serviceNumber': function (val) {
|
||||
const index = this.serviceNumberConfig.data.findIndex(elem => {
|
||||
return elem.serviceNumber == val;
|
||||
});
|
||||
|
||||
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
|
||||
},
|
||||
'$store.state.runPlan.selected.tripNumber': function (val) {
|
||||
const index = this.tripNumberConfig.data.findIndex(elem => {
|
||||
return elem.tripNumber == val;
|
||||
});
|
||||
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -248,7 +235,7 @@ export default {
|
||||
serviceNumberChange(row) {
|
||||
if (row) {
|
||||
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
|
||||
this.renderTripNumber({ 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);
|
||||
@ -258,7 +245,7 @@ export default {
|
||||
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 });
|
||||
// this.renderTripNumber({ serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||
}
|
||||
},
|
||||
async analyticalServiceNumber(data) {
|
||||
@ -430,14 +417,12 @@ export default {
|
||||
].join('');
|
||||
},
|
||||
renderTripNumber(params) {
|
||||
const tripNumber = params.tripNumber; // 车次号
|
||||
const serviceNumber = params.serviceNumber; // 服务号
|
||||
let data, markPoint;
|
||||
const op = this.myChart.getOption();
|
||||
op.series.forEach((item, index) => {
|
||||
if (item.name == serviceNumber && item.data) {
|
||||
if (tripNumber) {
|
||||
const temp = item.data.filter(elem => elem[3] == tripNumber);
|
||||
if (item.name == params.serviceNumber && item.data) {
|
||||
if (params.tripNumber) {
|
||||
const temp = item.data.filter(elem => elem[3] == params.tripNumber);
|
||||
if (temp.length) {
|
||||
data = temp;
|
||||
item.markPoint.data.forEach(each=>{
|
||||
@ -478,6 +463,7 @@ export default {
|
||||
this.myChart && this.myChart.setOption(op, true);
|
||||
}, 50);
|
||||
},
|
||||
|
||||
mouseClick(params) {
|
||||
const model = {
|
||||
serviceNumber: params.seriesName
|
||||
|
@ -96,7 +96,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
#PlanStatusBar {
|
||||
|
Loading…
Reference in New Issue
Block a user