Merge remote-tracking branch 'remotes/origin/test'

This commit is contained in:
joylink_cuiweidong 2021-07-06 18:20:26 +08:00
commit c30c25a022
28 changed files with 1364 additions and 186 deletions

View File

@ -148,6 +148,14 @@ export function listUserRoutingData(mapId) {
});
}
/** 根据目的地码查询用户交路数据(新版) */
export function getUserRoutingDataByDes(mapId, destinationCode) {
return request({
url: `/api/runPlan/userData/${mapId}/routing/select?destinationCode=${destinationCode}`,
method: 'get'
});
}
/** 根据交路查询交路区段列表*/
export function querySectionListByRouting(routingCode) {
return request({

View File

@ -160,7 +160,8 @@ class SkinCode extends defaultStyle {
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'flash' // 信号机故障类型flash太阳
faultType: 'flash', // 信号机故障类型flash太阳
overlapColor: '#0000ff' // 信号机延续保护颜色
},
route: {
direction: false, // 自动进路方向
@ -658,7 +659,7 @@ class SkinCode extends defaultStyle {
], // 特殊列车类型需设置显示格式
lrPadding: 1, // 两边间隔
upPadding: 1, // 上边距离
trainBodyFillColor: '#000000', // 列车车身填充颜色
trainBodyFillColor: 'rgba(0,0,0,0)', // 列车车身填充颜色
// targetCode:
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
},

View File

@ -685,7 +685,11 @@ class Signal extends Group {
}
}
}
overlapLock() {
if (this.style.Signal.lamp.overlapColor) {
this.sigName && this.sigName.setStyle({ textFill: this.style.Signal.lamp.overlapColor });
}
}
// 封锁
block() {
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
@ -970,6 +974,7 @@ class Signal extends Group {
}
/** 信号机封锁 */ // 缺一个功能封锁
model.blockade && this.block(); // 因大铁处理信号按钮状态 封锁处理需在延时解锁时间之后处理
model.overlapLock && this.overlapLock();
model.reblockade && this.reblock();
if (!path.includes('/map/draw')) {
// 联锁自动进路通过

View File

@ -3,7 +3,6 @@ import Text from 'zrender/src/graphic/Text';
import LangStorage from '@/utils/lang';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index';
import Vue from 'vue';
class EMouse extends Group {
constructor(device) {
@ -58,6 +57,24 @@ class EMouse extends Group {
if (!store.state.map.mapConfig.upRight) {
direction = this.device.model.right != 1;
}
const physicalSection = store.getters['map/getDeviceByCode'](this.device.model.model.physicalCode);
let closeDoorTip = '';
if (physicalSection.standTrack) {
const stationStand = store.state.map.map.stationStandList.find(item => item.standTrackCode === physicalSection.code);
if ((stationStand.right && this.device.model.right) || (!stationStand.right && !this.device.model.right)) {
if (stationStand.inside) {
closeDoorTip = '左开右关';
} else {
closeDoorTip = '左关右开';
}
} else {
if (stationStand.inside) {
closeDoorTip = '左关右开';
} else {
closeDoorTip = '左开右关';
}
}
}
const turnBackStrategyMap = new Map([
['NONE', '无折返'],
['DEFAULT', '默认'],
@ -79,9 +96,9 @@ class EMouse extends Group {
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
} else {
if (this.device.style.Train.moreTrainDetail) {
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: ${stationNames.get(this.device.model.startStation)}\n终点站名: ${stationNames.get(this.device.model.endStation)}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: ${stationNames.get(this.device.model.stationCode) || ''}\n车次通信: 通信车\n运行时间: ${this.device.model.runningTime}s\n停站时间: ${this.device.model.parkingRemainTime < 0 ? '无效' : `${this.device.model.parkingRemainTime}s`}\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折返策略: ${turnBackStrategyMap.get(this.device.model.turnBackStrategy)}\n折返状态: ${turnBackStatusMap.get(this.device.model.turnBackStatus)}\n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: ${stationNames.get(this.device.model.stationCode) || ''}\n车次通信: 通信车\n运行时间: ${this.device.model.runningTime}s\n停站时间: ${this.device.model.parkingRemainTime < 0 ? '无效' : `${this.device.model.parkingRemainTime}s`}\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.model.doorCloseLock ? '关闭' : closeDoorTip}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折返策略: ${turnBackStrategyMap.get(this.device.model.turnBackStrategy) || ''}\n折返状态: ${turnBackStatusMap.get(this.device.model.turnBackStatus)}\n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
}
}
} else {

View File

@ -6,9 +6,11 @@
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<train-add ref="trainAdd" />
<!-- <train-add ref="trainAdd" /> -->
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<!-- <train-delete ref="trainDelete" /> -->
<add-runplan-line ref="addRunplanLine" />
<delete-runplan-line ref="deleteRunplanLine" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
@ -18,9 +20,11 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainAdd from './menuDialog/trainAdd';
// import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
// import TrainDelete from './menuDialog/trainDelete';
import AddRunplanLine from './menuDialog/addRunplanLine';
import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
import PasswordBox from './menuDialog/passwordBox';
import ViewTrainId from './menuDialog/viewTrainId';
import ViewName from './menuDialog/viewName';
@ -38,9 +42,11 @@ export default {
ViewTrainId,
ViewName,
ViewDevice,
TrainAdd,
// TrainAdd,
TrainTranstalet,
TrainDelete,
// TrainDelete,
AddRunplanLine,
DeleteRunplanLine,
ManageUser,
HelpAbout
},
@ -397,7 +403,8 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
// this.$refs.trainAdd.doShow(operate);
this.$refs.addRunplanLine.doShow(operate);
}
});
},
@ -421,7 +428,8 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
// this.$refs.trainDelete.doShow(operate);
this.$refs.deleteRunplanLine.doShow(operate);
}
});
},

View File

@ -0,0 +1,377 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="430px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item prop="serviceNumber">
<span id="rpServiceNumber" slot="label">表号: </span>
<el-input v-model="addModel.serviceNumber" style="width:260px" maxlength="2" />
</el-form-item>
<el-form-item prop="tripNumber">
<span id="rpTripNumber" slot="label">车次号: </span>
<el-input v-model="addModel.tripNumber" style="width:260px" maxlength="4" />
</el-form-item>
<el-form-item prop="destinationCode">
<span id="rpDestinationCode" slot="label">目的地码: </span>
<el-select ref="destinationCode" v-model="addModel.destinationCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px" @change="changeDestination">
<el-option
v-for="item in destinationCodeList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="routing">
<span slot="label">交路: </span>
<el-select ref="routing" v-model="addModel.routing" value-key="id" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px">
<el-option
v-for="item in routeList"
:key="item.id"
:label="item.name"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item prop="startTime">
<span slot="label">开始时间: </span>
<el-time-picker ref="startTime" v-model="addModel.startTime" size="small" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" style="width:260px" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {getUserRoutingDataByDes, querySectionListByRouting, getMapStationRunUser, getStationStopTime} from '@/api/runplan';
import { getRunplanConfig } from '@/api/jmap/mapdraft';
import { formatTime } from '@/jmapNew/theme/parser/util';
import { sendCommandNew } from '@/api/jmap/training';
export default {
name:'AddRunplanLine',
data() {
return {
dialogShow:false,
loading:false,
operate: null,
operation:'',
destinationCodeList:[],
routeList:[],
stopStationMap:{},
stopTimeMap:{},
reentryData: {},
addModel:{
serviceNumber:'',
tripNumber:'',
destinationCode:'',
startTime:'',
routing:{
startStationCode:'',
endStationCode:'',
endSectionCode:'',
startSectionCode:'',
id:'',
startTbFront: null,
endTbFront: null
}
}
// rules: {
// }
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '加线';
// this.$t('menu.menuDialog.addPlanTrain')
},
group() {
return this.$route.query.group;
},
rules() {
const validateRouting = (rule, value, callback) => {
if (value && value.id != '') {
return callback();
} else {
return callback(new Error('请选择交路'));
}
};
const crules = {
serviceNumber: [
{ required: true, trigger: 'blur', validator:this.validateService}
// message: '',
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
destinationCode:[
{ required: true, message: '请选择目的地码', trigger: 'blur' },
{ required: true, message: '请选择目的地码', trigger: 'change' }
],
routing:[
{ required: true, validator: validateRouting, trigger: 'blur' },
{ required: true, validator: validateRouting, trigger: 'change' }
],
startTime:[
{ required: true, message: '请选择开始时间', trigger: 'blur' },
{ required: true, message: '请选择开始时间', trigger: 'change' }
]
};
return crules;
}
},
mounted() {
const destinationList = this.sectionList.filter(section=>{
return section.destinationCode != '' && section.destinationCode != undefined;
});
this.destinationCodeList = destinationList.map(section=>{
const destination = {};
destination['code'] = section.destinationCode;
return destination;
});
const mapId = this.$route.query.mapId;
const that = this;
if (mapId) {
getMapStationRunUser(mapId).then(resp =>{
const list = resp.data.list;
list.forEach(elem => {
that.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
});
getStationStopTime(mapId).then(response=>{
const stopTimeList = response.data.list;
stopTimeList.forEach(element=>{
that.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
});
getRunplanConfig(mapId).then(resp => {
const data = resp.data;
this.reentryData = data.config.reentryData;
});
});
});
}
},
methods:{
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
validateService (rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请输入表号'));
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.addModel.serviceNumber = newValue;
return callback();
} else {
this.addModel.serviceNumber = '';
}
}
},
doClose() {
this.$refs['routing'].blur();
this.$refs['destinationCode'].blur();
this.$refs['startTime'].hidePicker();
this.$refs['form'].resetFields();
this.addModel = {
serviceNumber:'',
tripNumber:'',
destinationCode:'',
startTime:'',
routing:{
startStationCode:'',
endStationCode:'',
endSectionCode:'',
startSectionCode:'',
id:'',
startTbFront: null,
endTbFront: null
}
},
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
changeDestination(destinationCode) {
this.addModel.routing = {};
const mapId = this.$route.query.mapId;
if (mapId) {
getUserRoutingDataByDes(mapId, destinationCode).then(resp => {
this.routeList = resp.data;
}).catch((error) => {
this.routeList = [];
console.log(error);
});
}
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const runplanLine = {serviceNumber:this.addModel.serviceNumber, tripConfigList:[{
startStationCode:this.addModel.routing.startStationCode,
endStationCode:this.addModel.routing.endStationCode,
endSectionCode:this.addModel.routing.endSectionCode,
startSectionCode:this.addModel.routing.startSectionCode,
routingCode:this.addModel.routing.id,
id:1,
tripNumber:this.addModel.tripNumber,
startTime:this.addModel.startTime
}] };
//
// startTbFront
// startTbFront
// endTbFront
const arriveConfigList = [];
const that = this;
querySectionListByRouting(that.addModel.routing.id).then(resp=>{
const length = resp.data.length - 1;
resp.data.forEach((parkSectionCode, index)=>{
const arriveConfig = {arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode};
const prev = arriveConfigList[index - 1];
const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
if (index == 0) {
arriveConfig.departureTime = that.addModel.startTime;
} else if (index < length) {
if (String(that.addModel.routing.startTbFront) == 'false' && index == 1) {
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
} else {
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
}
const nowParking = that.stopTimeMap[parkSectionCode.stationCode] || {};
arriveConfig.departureTime = formatTime(this.computedTimeByString(arriveConfig.arriveTime) / 1000 + nowParking.parkingTime || 0 );
} else {
if (String(that.addModel.routing.endTbFront) == 'false') {
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
} else {
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
}
arriveConfig.departureTime = '';
}
// if (index == 0) {
// arriveConfig.departureTime = that.addModel.startTime;
// } else if (index < resp.data.length - 1) {
// const prev = arriveConfigList[index - 1];
// // startSectionCode;
// // endSectionCode;
// const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || 0;
// arriveConfig.arriveTime = prev.departureTime + that.stopTimeMap[prev.stationCode] || 0 + runLevel ? runLevel.l3 : 0;
//
// // elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
// } else {
// arriveConfig.arriveTime = '';
// }
// { }
arriveConfigList.push(arriveConfig);
});
runplanLine.tripConfigList[0].arriveConfigList = arriveConfigList;
runplanLine.tripConfigList[0].endTime = arriveConfigList[arriveConfigList.length - 1].arriveTime;
if (this.group) {
sendCommandNew(this.group, 'RunPlan_Add_Trip', runplanLine).then((response) => {
this.$message.success('添加计划车成功');
this.doClose();
// 仿
}).catch(error => {
this.$messageBox('添加计划车失败:' + error.$message);
});
}
});
}
});
},
computedTimeByString(timeStr) {
const bTime = +new Date(`2019-01-01 00:00:00`);
const eTime = +new Date(`2019-01-01 ${timeStr}`);
return Number(eTime) - Number(bTime);
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
// serviceNumber: "001",
// tripConfigList:[
// {
// arriveConfigList[]
// {
// arriveTime: "06:00:00"
// departureTime: "06:00:00"
// sectionCode: "T2"
// speedLevel: ""
// speedLevelTime: 123
// stationCode: "Station1478"
// stopTime: 0
// }
// startStationCode
// endStationCode
// endSectionCode
// startSectionCode
// endTime
// id
// routingCode: 3615
// serviceNumber: "001"
// startTime: "06:00:00"
// tripNumber: ""
// }
// ]
}
};
</script>
<style lang="scss" scoped>
.rpServiceNumber{}
.rpTripNumber{}
.rpDestinationCode{}
</style>

View File

@ -0,0 +1,141 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form
ref="form"
size="small"
label-width="100px"
:model="model"
:rules="rules"
>
<el-form-item prop="serviceNumber" label="表号">
<el-input v-model="model.serviceNumber" maxlength="2" />
</el-form-item>
<el-form-item prop="tripNumber" label="车次号">
<el-input v-model="model.tripNumber" maxlength="4" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">{{
$t("menu.menuDialog.confirm")
}}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button @click="doClose">{{
$t("menu.menuDialog.cancel")
}}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { sendCommandNew } from '@/api/jmap/training';
export default {
name: 'DeleteRunplanLine',
data() {
return {
loading: false,
dialogShow: false,
model: {
serviceNumber: '',
tripNumber: ''
},
rules: {
serviceNumber: [
{
required: true,
trigger: 'blur',
validator:this.validateService
// message: ""
}
],
tripNumber: [
{
required: true,
trigger: 'blur',
message: '请输入车次号'
}
]
}
};
},
computed: {
title() {
return '抽线';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
watch: {
'$store.state.runPlan': function(oldVal, newVal) {
console.log(newVal);
}
},
methods: {
doShow(operate) {
// this.operate = operate || {};
// this.operation = operate.operation;
// //
// if (!this.dialogShow) {
// this.loading = false;
// }
this.dialogShow = true;
this.$nextTick(function() {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
validateService (rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请输入表号'));
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.model.serviceNumber = newValue;
return callback();
} else {
this.model.serviceNumber = '';
}
}
},
commit() {
this.$refs.form.validate(valid => {
if (valid) {
const group = this.$route.query.group;
const data = this.model;
sendCommandNew(group, 'RunPlan_Delete_Trip', data)
.then(resp => {
console.log(resp);
this.$message.success('删除计划车成功');
this.doClose();
})
.catch(e => {
this.$messageBox(e.message);
});
}
});
}
}
};
</script>
<style lang="scss" scoped></style>

View File

@ -50,27 +50,47 @@ class EqualDistanceParser {
var lastPoint = null;
var nextPoint = null;
/** 创建标记点名称和坐标*/
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
/** 如果车次号为空,不显示名称*/
if (train.tripNumber) {
// 如果不是被删除的首个车次
if (!train.firstInvalid) {
/** 创建标记点名称和坐标*/
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(this.__createMartPoint(pointdata));
}
opt.name = '' + service.serviceNumber;
}
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.name = '' + service.serviceNumber;
opt.markPointData.push(this.__createMartPoint(pointdata));
if (!train.firstInvalid) {
/** 计算非折返点车次点坐标集合*/
train.stationTimeList.forEach((elem, index) => {
idx = index;
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
});
train.stationTimeList.forEach((elem, index) => {
idx = index;
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
});
} else {
const deletePoint = {
symbol:'circle',
name:'breakPoint',
symbolSize:10,
itemStyle:{
color:'#FF5A3B'
},
coord: [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)]
};
/** 给服务对象添加服务名称和标记点*/
// this.__createMartPoint(deletePoint)
opt.markPointData.push(deletePoint);
}
/** 计算折返点车次坐标点集合*/
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {

View File

@ -52,32 +52,50 @@ class EqualRatioParser {
/** 如果车次号为空,不显示名称*/
if (train.tripNumber) {
/** 创建标记点名称和坐标*/
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
// 如果不是被删除的首个车次
if (!train.firstInvalid) {
/** 创建标记点名称和坐标*/
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(this.__createMartPoint(pointdata));
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(this.__createMartPoint(pointdata));
/** 创建服务号名称*/
opt.name = `${service.serviceNumber}`;
}
/** 计算非折返点车次点坐标集合*/
train.stationTimeList.forEach((elem, index) => {
idx = index;
// if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
// index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
// index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
if (!train.firstInvalid) {
/** 计算非折返点车次点坐标集合*/
train.stationTimeList.forEach((elem, index) => {
idx = index;
// if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
// index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
// index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
// }
});
});
} else {
const deletePoint = {
symbol:'circle',
name:'breakPoint',
symbolSize:10,
itemStyle:{
color:'#FF5A3B'
},
coord: [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)]
};
/** 给服务对象添加服务名称和标记点*/
// this.__createMartPoint(deletePoint)
opt.markPointData.push(deletePoint);
}
/** 计算折返点车次坐标点集合*/
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {

View File

@ -15,6 +15,8 @@
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
<!-- <add-runplan-line ref="addRunplanLine" /> -->
</div>
</template>
<script>
@ -22,6 +24,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainAdd from './menuDialog/trainAdd';
// import AddRunplanLine from './menuDialog/addRunplanLine';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import PasswordBox from './menuDialog/passwordBox';
@ -30,6 +33,7 @@ import ViewName from './menuDialog/viewName';
import ViewDevice from './menuDialog/viewDevice';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
import { EventBus } from '@/scripts/event-bus';
export default {
@ -42,10 +46,12 @@ export default {
ViewName,
ViewDevice,
TrainAdd,
// AddRunplanLine,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
// DeleteRunplanLine
},
props: {
selected: {
@ -403,7 +409,12 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
if (this.$route.query.lineCode == '10') {
this.$refs.trainAdd.doShow(operate);
} else {
// this.$refs.addRunplanLine.doShow(operate);
this.$refs.trainAdd.doShow(operate);
}
}
});
},
@ -428,6 +439,7 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
// this.$refs.deleteRunplanLine.doShow(operate);
}
});
},

View File

@ -0,0 +1,377 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="430px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item prop="serviceNumber">
<span id="rpServiceNumber" slot="label">表号: </span>
<el-input v-model="addModel.serviceNumber" style="width:260px" maxlength="2" />
</el-form-item>
<el-form-item prop="tripNumber">
<span id="rpTripNumber" slot="label">车次号: </span>
<el-input v-model="addModel.tripNumber" style="width:260px" maxlength="4" />
</el-form-item>
<el-form-item prop="destinationCode">
<span id="rpDestinationCode" slot="label">目的地码: </span>
<el-select ref="destinationCode" v-model="addModel.destinationCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px" @change="changeDestination">
<el-option
v-for="item in destinationCodeList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="routing">
<span slot="label">交路: </span>
<el-select ref="routing" v-model="addModel.routing" value-key="id" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px">
<el-option
v-for="item in routeList"
:key="item.id"
:label="item.name"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item prop="startTime">
<span slot="label">开始时间: </span>
<el-time-picker ref="startTime" v-model="addModel.startTime" size="small" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" style="width:260px" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {getUserRoutingDataByDes, querySectionListByRouting, getMapStationRunUser, getStationStopTime} from '@/api/runplan';
import { getRunplanConfig } from '@/api/jmap/mapdraft';
import { formatTime } from '@/jmapNew/theme/parser/util';
import { sendCommandNew } from '@/api/jmap/training';
export default {
name:'AddRunplanLine',
data() {
return {
dialogShow:false,
loading:false,
operate: null,
operation:'',
destinationCodeList:[],
routeList:[],
stopStationMap:{},
stopTimeMap:{},
reentryData: {},
addModel:{
serviceNumber:'',
tripNumber:'',
destinationCode:'',
startTime:'',
routing:{
startStationCode:'',
endStationCode:'',
endSectionCode:'',
startSectionCode:'',
id:'',
startTbFront: null,
endTbFront: null
}
}
// rules: {
// }
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '加线';
// this.$t('menu.menuDialog.addPlanTrain')
},
group() {
return this.$route.query.group;
},
rules() {
const validateRouting = (rule, value, callback) => {
if (value && value.id != '') {
return callback();
} else {
return callback(new Error('请选择交路'));
}
};
const crules = {
serviceNumber: [
{ required: true, trigger: 'blur', validator:this.validateService}
// message: '',
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
destinationCode:[
{ required: true, message: '请选择目的地码', trigger: 'blur' },
{ required: true, message: '请选择目的地码', trigger: 'change' }
],
routing:[
{ required: true, validator: validateRouting, trigger: 'blur' },
{ required: true, validator: validateRouting, trigger: 'change' }
],
startTime:[
{ required: true, message: '请选择开始时间', trigger: 'blur' },
{ required: true, message: '请选择开始时间', trigger: 'change' }
]
};
return crules;
}
},
mounted() {
const destinationList = this.sectionList.filter(section=>{
return section.destinationCode != '' && section.destinationCode != undefined;
});
this.destinationCodeList = destinationList.map(section=>{
const destination = {};
destination['code'] = section.destinationCode;
return destination;
});
const mapId = this.$route.query.mapId;
const that = this;
if (mapId) {
getMapStationRunUser(mapId).then(resp =>{
const list = resp.data.list;
list.forEach(elem => {
that.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
});
getStationStopTime(mapId).then(response=>{
const stopTimeList = response.data.list;
stopTimeList.forEach(element=>{
that.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
});
getRunplanConfig(mapId).then(resp => {
const data = resp.data;
this.reentryData = data.config.reentryData;
});
});
});
}
},
methods:{
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
validateService (rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请输入表号'));
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.addModel.serviceNumber = newValue;
return callback();
} else {
this.addModel.serviceNumber = '';
}
}
},
doClose() {
this.$refs['routing'].blur();
this.$refs['destinationCode'].blur();
this.$refs['startTime'].hidePicker();
this.$refs['form'].resetFields();
this.addModel = {
serviceNumber:'',
tripNumber:'',
destinationCode:'',
startTime:'',
routing:{
startStationCode:'',
endStationCode:'',
endSectionCode:'',
startSectionCode:'',
id:'',
startTbFront: null,
endTbFront: null
}
},
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
changeDestination(destinationCode) {
this.addModel.routing = {};
const mapId = this.$route.query.mapId;
if (mapId) {
getUserRoutingDataByDes(mapId, destinationCode).then(resp => {
this.routeList = resp.data;
}).catch((error) => {
this.routeList = [];
console.log(error);
});
}
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const runplanLine = {serviceNumber:this.addModel.serviceNumber, tripConfigList:[{
startStationCode:this.addModel.routing.startStationCode,
endStationCode:this.addModel.routing.endStationCode,
endSectionCode:this.addModel.routing.endSectionCode,
startSectionCode:this.addModel.routing.startSectionCode,
routingCode:this.addModel.routing.id,
id:1,
tripNumber:this.addModel.tripNumber,
startTime:this.addModel.startTime
}] };
//
// startTbFront
// startTbFront
// endTbFront
const arriveConfigList = [];
const that = this;
querySectionListByRouting(that.addModel.routing.id).then(resp=>{
const length = resp.data.length - 1;
resp.data.forEach((parkSectionCode, index)=>{
const arriveConfig = {arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode};
const prev = arriveConfigList[index - 1];
const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
if (index == 0) {
arriveConfig.departureTime = that.addModel.startTime;
} else if (index < length) {
if (String(that.addModel.routing.startTbFront) == 'false' && index == 1) {
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
} else {
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
}
const nowParking = that.stopTimeMap[parkSectionCode.stationCode] || {};
arriveConfig.departureTime = formatTime(this.computedTimeByString(arriveConfig.arriveTime) / 1000 + nowParking.parkingTime || 0 );
} else {
if (String(that.addModel.routing.endTbFront) == 'false') {
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
} else {
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
}
arriveConfig.departureTime = '';
}
// if (index == 0) {
// arriveConfig.departureTime = that.addModel.startTime;
// } else if (index < resp.data.length - 1) {
// const prev = arriveConfigList[index - 1];
// // startSectionCode;
// // endSectionCode;
// const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || 0;
// arriveConfig.arriveTime = prev.departureTime + that.stopTimeMap[prev.stationCode] || 0 + runLevel ? runLevel.l3 : 0;
//
// // elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
// } else {
// arriveConfig.arriveTime = '';
// }
// { }
arriveConfigList.push(arriveConfig);
});
runplanLine.tripConfigList[0].arriveConfigList = arriveConfigList;
runplanLine.tripConfigList[0].endTime = arriveConfigList[arriveConfigList.length - 1].arriveTime;
if (this.group) {
sendCommandNew(this.group, 'RunPlan_Add_Trip', runplanLine).then((response) => {
this.$message.success('添加计划车成功');
this.doClose();
// 仿
}).catch(error => {
this.$messageBox('添加计划车失败:' + error.$message);
});
}
});
}
});
},
computedTimeByString(timeStr) {
const bTime = +new Date(`2019-01-01 00:00:00`);
const eTime = +new Date(`2019-01-01 ${timeStr}`);
return Number(eTime) - Number(bTime);
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
// serviceNumber: "001",
// tripConfigList:[
// {
// arriveConfigList[]
// {
// arriveTime: "06:00:00"
// departureTime: "06:00:00"
// sectionCode: "T2"
// speedLevel: ""
// speedLevelTime: 123
// stationCode: "Station1478"
// stopTime: 0
// }
// startStationCode
// endStationCode
// endSectionCode
// startSectionCode
// endTime
// id
// routingCode: 3615
// serviceNumber: "001"
// startTime: "06:00:00"
// tripNumber: ""
// }
// ]
}
};
</script>
<style lang="scss" scoped>
.rpServiceNumber{}
.rpTripNumber{}
.rpDestinationCode{}
</style>

View File

@ -0,0 +1,141 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form
ref="form"
size="small"
label-width="100px"
:model="model"
:rules="rules"
>
<el-form-item prop="serviceNumber" label="表号">
<el-input v-model="model.serviceNumber" maxlength="2" />
</el-form-item>
<el-form-item prop="tripNumber" label="车次号">
<el-input v-model="model.tripNumber" maxlength="4" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">{{
$t("menu.menuDialog.confirm")
}}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button @click="doClose">{{
$t("menu.menuDialog.cancel")
}}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { sendCommandNew } from '@/api/jmap/training';
export default {
name: 'DeleteRunplanLine',
data() {
return {
loading: false,
dialogShow: false,
model: {
serviceNumber: '',
tripNumber: ''
},
rules: {
serviceNumber: [
{
required: true,
trigger: 'blur',
validator:this.validateService
// message: ""
}
],
tripNumber: [
{
required: true,
trigger: 'blur',
message: '请输入车次号'
}
]
}
};
},
computed: {
title() {
return '抽线';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
watch: {
'$store.state.runPlan': function(oldVal, newVal) {
console.log(newVal);
}
},
methods: {
doShow(operate) {
// this.operate = operate || {};
// this.operation = operate.operation;
// //
// if (!this.dialogShow) {
// this.loading = false;
// }
this.dialogShow = true;
this.$nextTick(function() {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
validateService (rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请输入表号'));
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.model.serviceNumber = newValue;
return callback();
} else {
this.model.serviceNumber = '';
}
}
},
commit() {
this.$refs.form.validate(valid => {
if (valid) {
const group = this.$route.query.group;
const data = this.model;
sendCommandNew(group, 'RunPlan_Delete_Trip', data)
.then(resp => {
console.log(resp);
this.$message.success('删除计划车成功');
this.doClose();
})
.catch(e => {
this.$messageBox(e.message);
});
}
});
}
}
};
</script>
<style lang="scss" scoped></style>

View File

@ -12,21 +12,17 @@ const runPlan = {
width: 800, // 运行图canvas 容器 宽度
height: 600, // 运行图canvas 容器 高度
refreshCount: 0, // 刷新页面重新加载
initialPlanData: {}, // 运行图原始数据
draftSelected: {}, // 草稿运行图选中对象
draftStations: [], // 草稿运行图车站列表
runPlanMap: {}, // 运行图数据map以id和version 为标识)
runPlanInfo: {}, // 运行图信息
loadRunPlanCount: 0, // 运行图加载数据完成
serviceNumberDataList: [] // 运行图数据
serviceNumberDataList: [], // 运行图数据
updateTrainRpData:{} // 更新仿真运行图数据
},
getters: {
stations: (state) => {
return state.stations || [];
},
draftStations: (state) => {
return state.draftStations || [];
},
getRunPlanData: (state) => {
if (!state.runPlanInfo || !state.runPlanInfo.templateId) {
return '';
@ -47,24 +43,6 @@ const runPlan = {
setStations: (state, stations) => {
state.stations = stations;
},
setDraftStations: (state, stations) => {
state.draftStations = stations;
},
setInitialPlanData: (state, data) => {
state.initialPlanData = {};
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
const serviceList = data.serviceNumberDataList;
serviceList.forEach((service, i) => {
const trainList = service.tripNumberDataList;
state.initialPlanData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
trainList.forEach((train, j) => {
state.initialPlanData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, right:train.right,
directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
startSecondTime: train.startSecondTime, startSectionCode:train.startSectionCode, endSectionCode:train.endSectionCode };
});
});
}
},
setPlanData: (state, data) => {
state.planData = data;
state.editData = {};
@ -84,22 +62,6 @@ const runPlan = {
}
state.planLoadedCount++;
},
setDraftPlanData: (state, data) => {
state.draftPlanData = data;
state.draftEditData = {};
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
const serviceList = data.serviceNumberDataList;
serviceList.forEach((service, i) => {
const trainList = service.tripNumberDataList;
state.draftEditData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
trainList.forEach((train, j) => {
state.draftEditData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, right:train.right,
directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
startSecondTime: train.startSecondTime, startSectionCode:train.startSectionCode, endSectionCode:train.endSectionCode };
});
});
}
},
setSelected: (state, selected) => {
state.selected = selected;
},
@ -113,7 +75,68 @@ const runPlan = {
state.planData[serviceNumber] = { oldIndex, serviceNumber, trainMap: {} };
state.planLoadedCount++;
}
},
},
setUpdateTrainRpData: (state, updateTrainRpData) => {
state.updateTrainRpData = updateTrainRpData;
},
updateTrainRunplan:(state, updateServiceNumber) => {
const dataList = updateServiceNumber.serviceNumberDataList;
const length = dataList.length;
if (length > 0) {
dataList.forEach(data=>{
const {serviceNumber, tripNumberDataList} = data;
const serviceNumberDataList = state.planData.serviceNumberDataList;
const serviceObj = serviceNumberDataList.find(serviceNumberData=>{ return serviceNumberData.serviceNumber == serviceNumber; });
if (!serviceObj) {
// 原始计划不存在 添加
state.editData[serviceNumber] = { oldIndex: serviceNumberDataList.length, serviceNumber: serviceNumber, backup: undefined, trainMap: {}};
tripNumberDataList.forEach(tripNumberData=>{
state.editData[serviceNumber].trainMap[tripNumberData.tripNumber] = Object.assign({oldIndex:tripNumberDataList.length }, tripNumberData);
});
state.planData.serviceNumberDataList.push({
serviceNumber: serviceNumber,
tripNumberDataList:[...tripNumberDataList]
});
} else {
// 原始计划存在
tripNumberDataList.forEach(tripNumberData=>{
if (tripNumberData.invalid) {
// 删除计划
const index = serviceObj.tripNumberDataList.findIndex(tripNumberInfo=>{ return tripNumberInfo.tripNumber == tripNumberData.tripNumber; });
if (tripNumberData.firstInvalid) {
// 删除的第一条数据处理
serviceObj.tripNumberDataList[index].stationTimeList.splice(1, tripNumberData.stationTimeList.length - 1);
serviceObj.tripNumberDataList[index].firstInvalid = tripNumberData.firstInvalid;
delete state.editData[serviceNumber].trainMap[tripNumberData.tripNumber];
// state.editData[serviceNumber].trainMap[tripNumberData.tripNumber].stationTimeList.splice(1, tripNumberData.stationTimeList.length - 1);
} else {
serviceObj.tripNumberDataList.splice(index, 1);
delete state.editData[serviceNumber].trainMap[tripNumberData.tripNumber];
}
} else {
if (tripNumberData.add) {
// 添加计划
state.editData[serviceNumber].trainMap[tripNumberData.tripNumber] = Object.assign({oldIndex:serviceObj.tripNumberDataList.length }, tripNumberData);
serviceObj.tripNumberDataList.push(tripNumberData);
}
}
});
// 处理所有的车次号删除
if (serviceObj.tripNumberDataList.length == 1 && serviceObj.tripNumberDataList[0].firstInvalid) {
delete state.editData[serviceNumber];
}
}
});
}
state.planLoadedCount++;
// const serviceObj = state.planData[serviceNumber];
// if (serviceObj) {
// const oldIndex = serviceObj.oldIndex;
// state.planData[serviceNumber] = { oldIndex, serviceNumber, trainMap: {} };
// state.planLoadedCount++;
// }
},
clear: (state) => {
// state.stations = [];
state.planData = {};
@ -158,13 +181,6 @@ const runPlan = {
resolve(mapModel);
});
},
/** 设置草稿stations数据 */
setDraftStations: ({ commit }, mapModel) => {
return new Promise((resolve) =>{
commit('setDraftStations', mapModel);
resolve(mapModel);
});
},
/** 重置运行图数据更新池 */
resetRunPlanData:({ commit }) => {
commit('resetRunPlanData');
@ -177,17 +193,18 @@ const runPlan = {
setPlanData: ({ commit }, data) => {
commit('setPlanData', data);
},
setDraftPlanData: ({ commit }, data) => {
commit('setDraftPlanData', data);
},
/** 设置初始运行图数据 */
setInitialPlanData: ({ commit }, data) => {
commit('setInitialPlanData', data);
},
/** 增加服务号*/
addServiceNumber: ({ commit }, serviceNumber) => {
commit('addServiceNumber', serviceNumber);
},
/** 更新仿真里的运行图(西安三加线抽线逻辑) */
updateTrainRunplan: ({ commit }, updateServiceNumber) => {
commit('updateTrainRunplan', updateServiceNumber);
},
/** 设置需要更新的仿真运行图数据 (西安三加线抽线逻辑) */
setUpdateTrainRpData: ({ commit }, updateTrainRpData) => {
commit('setUpdateTrainRpData', updateTrainRpData);
},
/** 选择车次*/
setSelected: ({ commit }, selected) => {
commit('setSelected', selected);

View File

@ -189,9 +189,13 @@ function handle(state, data) {
store.dispatch('training/over');
}
break;
case 'Simulation_PslStatus':
case 'Simulation_PslStatus':
state.simulationPslStatus = msg;
break;
// 运行图加线/抽线/变化推送消息
case 'Simulation_Trip_Plan_Change':
state.simulationPlanChange = msg;
break;
}
}
@ -337,7 +341,8 @@ const socket = {
deviceStateMessages: null, // 新版订阅设备状态消息
simulationSpeed: 1, // 仿真倍速
simulationPause: false,
simulationPslStatus: [], //PSL面板按钮状态信息
simulationPslStatus: [], // PSL面板按钮状态信息
simulationPlanChange:{} // 运行图加线/抽线/变化推送消息
},
getters: {
},

View File

@ -92,9 +92,10 @@ const user = {
const type = userInfo.type;
const project = userInfo.project;
const deviceCode = userInfo.deviceCode;
const teacherLogin = userInfo.teacherLogin;
return new Promise((resolve, reject) => {
// 登录系统
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
login(params).then(resp => {
const token = resp.data;
const header = { group: '', 'X-Token': token };

View File

@ -69,12 +69,10 @@ export function loadRunPlanData(group, dataError) {
dbReadData('runPlan', store.state.runPlan.runPlanInfo.templateId, store.state.runPlan.runPlanInfo.version, async (runPlanData, version) =>{
if (runPlanData && runPlanData.version == version) {
await store.dispatch('runPlan/setPlanData', runPlanData);
await store.dispatch('runPlan/setInitialPlanData', runPlanData);
await store.dispatch('runPlan/loadRunPlanCountIncrease');
} else if (runPlanData) {
getEveryDayRunPlanNew(group).then(async (resp) => {
await store.dispatch('runPlan/setPlanData', resp.data);
await store.dispatch('runPlan/setInitialPlanData', resp.data);
await store.dispatch('runPlan/loadRunPlanCountIncrease');
resp.data.templateId = store.state.runPlan.runPlanInfo.templateId;
resp.data.version = store.state.runPlan.runPlanInfo.version;
@ -85,7 +83,6 @@ export function loadRunPlanData(group, dataError) {
} else {
getEveryDayRunPlanNew(group).then(async (resp) => {
await store.dispatch('runPlan/setPlanData', resp.data);
await store.dispatch('runPlan/setInitialPlanData', resp.data);
await store.dispatch('runPlan/loadRunPlanCountIncrease');
resp.data.templateId = store.state.runPlan.runPlanInfo.templateId;
resp.data.version = store.state.runPlan.runPlanInfo.version;

View File

@ -199,16 +199,8 @@ export default {
},
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;
}
item.secondTime = item.second;
});
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
this.runSeries = this.PlanParser.updateDataToModels(data, stations, this.kmRangeMap,
@ -234,7 +226,7 @@ export default {
await this.loadInitData();
this.inter && clearInterval(this.inter);
} catch (error) {
console.log(error);
console.log(error);
this.$messageBox(`加载运行图数据失败`);
}
},

View File

@ -77,6 +77,7 @@
<div style="display: inline-block;width: 100%;margin-bottom: 10px;">
<div style="display:inline-block">
<el-checkbox v-model="isAutoLogin">{{ $t('login.autoLogin') }}</el-checkbox>
<el-checkbox v-if="project === 'cgy'" v-model="teacherLogin">教师登录</el-checkbox>
</div>
<el-popover
v-if="!noQrcodeList.includes(project)"
@ -179,6 +180,7 @@ export default {
QCode: QCode,
loading111: true,
isAutoLogin: false,
teacherLogin: false,
loginForm: {
username: '',
password: ''
@ -420,6 +422,7 @@ export default {
model.type = this.modelType;
model.project = loginInfo[this.project].loginParam;
model.deviceCode = this.$route.query.projectDevice;
model.teacherLogin = this.teacherLogin;
this.loading = true;
if (this.isAutoLogin) {
Cookies.set(this.cookiesName, model.username, { expires: 2});
@ -565,7 +568,11 @@ export default {
}
});
} else {
this.$router.push({ path: this.path });
if (this.teacherLogin) {
this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
} else {
this.$router.push({ path: this.path });
}
}
},
handleLanguage() {

View File

@ -9,10 +9,10 @@
:close-on-click-modal="false"
top="25vh"
>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="100px" class="demo-ruleForm">
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="110px" class="demo-ruleForm">
<el-form-item prop="email">
<template slot="label">
<span>&emsp;&emsp;</span>
<span>(账号)</span>
</template>
<el-input v-model="form.email" />
</el-form-item>

View File

@ -271,16 +271,8 @@ export default {
},
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;
}
item.secondTime = item.second;
});
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,

View File

@ -48,7 +48,6 @@ export default {
},
beforeDestroy() {
this.$store.dispatch('runPlan/setPlanData', []);
this.$store.dispatch('runPlan/setInitialPlanData', []);
},
mounted() {
// this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);

View File

@ -157,7 +157,7 @@ export default {
mounted() {
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
this.PlanParser = this.$theme.loadPlanParser(this.$route.query.lineCode);
this.loadChartPage();
// this.loadChartPage();
EventBus.$on('clearRunSeries', () => {
this.runSeries = [];
});
@ -230,16 +230,8 @@ export default {
},
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;
}
item.secondTime = item.second;
});
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
this.runSeries = this.PlanParser.updateDataToModels(data, stations, this.kmRangeMap,
@ -531,13 +523,18 @@ export default {
axisTooltip(param) {
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
if (this.$route.query.lineCode !== '07') {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
].join('');
if (station.name) {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
].join('');
} else {
return '';
}
} else {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
@ -566,8 +563,12 @@ export default {
}
} else if (this.seriesMap[serviceNumber]) {
markPoint = deepAssign({}, this.seriesMap[serviceNumber].markPoint);
markPoint.data.forEach(each => {
each.label.color = '#f00';
markPoint.data.forEach((each, index) => {
if (each.symbol == 'circle') {
markPoint.data.splice(index, 1);
} else {
each.label.color = '#f00';
}
});
data = this.seriesMap[serviceNumber].data;
}

View File

@ -232,16 +232,8 @@ export default {
},
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;
}
item.secondTime = item.second;
});
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
this.runSeries = this.PlanParser.updateDataToModels(data, stations, this.kmRangeMap,
@ -257,11 +249,11 @@ export default {
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
if (this.$route.query.lineCode === '07') {
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisX(stations)]);
} else {
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]);
}
if (this.$route.query.lineCode === '07') {
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisX(stations)]);
} else {
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]);
}
this.staticSeries = this.pushModels(this.staticSeries, this.PlanParser.convertDataToModels(planData, stations, this.kmRangeMap, { color: '#000', width: 0.5 }));
this.staticSeries.forEach(item => {
this.seriesMap[item.name] = item;

View File

@ -142,14 +142,28 @@ export default {
this.swch = '01';
}
},
'$store.state.map.mapDataLoadedCount': function () {
// '$store.state.map.mapDataLoadedCount': function () {
// this.loadRunData();
// },
'$store.state.training.subscribeCount': function () {
this.loadRunData();
},
'$store.state.socket.simulationPlanChange': function (val) {
//
if (JSON.stringify(this.$store.state.runPlan.planData) == '{}') {
this.$store.dispatch('runPlan/setUpdateTrainRpData', val);
} else {
this.$store.dispatch('runPlan/updateTrainRunplan', val);
}
},
'$store.state.training.triggerFaultCount': function () {
this.setFault();
},
'$store.state.runPlan.loadRunPlanCount': function () {
this.viewDisabled = false;
if (JSON.stringify(this.$store.state.runPlan.updateTrainRpData) != '{}') {
this.$store.dispatch('runPlan/updateTrainRunplan', this.$store.state.runPlan.updateTrainRpData);
}
},
'$store.state.socket.simulationSpeed': function (val) {
this.speed = val;

View File

@ -26,7 +26,8 @@
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
</div>
<join-run-plan-view v-if="running && !dataError" ref="runPlanView" :group="group" />
<!-- running && -->
<join-run-plan-view v-if="!dataError" ref="runPlanView" :group="group" />
<select-ibp ref="selectIbp" />
</div>
@ -160,7 +161,18 @@ export default {
// }
// }
// }
'$store.state.map.mapDataLoadedCount': function () {
'$store.state.socket.simulationPlanChange': function (val) {
//
if (JSON.stringify(this.$store.state.runPlan.planData) == '{}') {
this.$store.dispatch('runPlan/setUpdateTrainRpData', val);
} else {
this.$store.dispatch('runPlan/updateTrainRunplan', val);
}
},
// '$store.state.map.mapDataLoadedCount': function () {
// this.loadRunData(this.$route.query);
// },
'$store.state.training.subscribeCount': function () {
this.loadRunData(this.$route.query);
},
'$store.state.training.triggerFaultCount': function () {
@ -169,6 +181,10 @@ export default {
'$store.state.runPlan.loadRunPlanCount': function () {
this.viewDisabled = false;
this.firstLoad = false;
if (JSON.stringify(this.$store.state.runPlan.updateTrainRpData) != '{}') {
this.$store.dispatch('runPlan/updateTrainRunplan', this.$store.state.runPlan.updateTrainRpData);
this.$store.dispatch('runPlan/setUpdateTrainRpData', {});
}
}
},
async mounted() {

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="title_content">{{ $store.state.user.companyName + '教学管理' }}</div>
<el-button type="text" class="lessonManageBack" @click="back">返回</el-button>
<div class="title_content">{{ companyName + '教学管理' }}</div>
<el-button v-if="!hideBack" type="text" class="lessonManageBack" @click="back">返回</el-button>
<div class="lessonManageInfo">
<el-menu class="lessonManageMenu" default-active="2-1">
<el-menu-item index="1" @click="clickMenu">
@ -30,7 +30,7 @@
<div class="lessonManageOther">
<router-view />
</div>
</div>
</div>
</div>
</template>
@ -56,7 +56,12 @@ export default {
};
},
computed: {
companyName() {
return this.$store.state.user.companyName;
},
hideBack() {
return this.$route.query.enter === 'teacher';
}
},
created() {

View File

@ -490,13 +490,18 @@ export default {
axisTooltip(param) {
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
if (this.$route.query.lineCode !== '07') {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
].join('');
if (station.name) {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
].join('');
} else {
return '';
}
} else {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
@ -525,8 +530,12 @@ export default {
}
} else {
markPoint = deepAssign({}, item.markPoint);
markPoint.data.forEach(each=>{
each.label.color = '#f00';
markPoint.data.forEach((each, index)=>{
if (each.symbol == 'circle') {
markPoint.data.splice(index, 1);
} else {
each.label.color = '#f00';
}
});
data = item.data;
}

View File

@ -110,7 +110,9 @@ export default {
'holdCommandIgnoreControlMode',
'delayWhenCancelRouteWithAbnormalInterlock',
'noARB',
'checkDirectionWhenSetHead'
'checkDirectionWhenSetHead',
'transferRouteCanOnlyFaultUnlock',
'setManualWhenHeadTrainArriveTarget'
],
selectList: ['runMode'],
generalConfig: [
@ -153,7 +155,9 @@ export default {
'figuresOfTripNumber',
'figuresOfServiceNumber',
'noARB',
'checkDirectionWhenSetHead'
'checkDirectionWhenSetHead',
'transferRouteCanOnlyFaultUnlock',
'setManualWhenHeadTrainArriveTarget'
],
rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
@ -201,7 +205,9 @@ export default {
figuresOfTripNumber: '车次号的位数',
figuresOfServiceNumber: '服务号的位数',
noARB: '没有ARB判定',
checkDirectionWhenSetHead: '设置头码车时检查方向'
checkDirectionWhenSetHead: '设置头码车时检查方向',
transferRouteCanOnlyFaultUnlock: '转换轨进路只能通过故障解锁来取消',
setManualWhenHeadTrainArriveTarget: '头码车抵达目的地后变为人工车'
}
};
},