This commit is contained in:
joylink_cuiweidong 2020-09-04 18:22:59 +08:00
commit 3b8c4852c3
9 changed files with 224 additions and 35 deletions

View File

@ -757,6 +757,14 @@ export function getTrainDetailBytripNumber(group, params) {
params: params
});
}
/** 根据车次号和表号获取列车信息 */
export function getTrainDetailByStNumber(group, params) {
return request({
url: `/simulation/${group}/planTripInfoBySt`,
method: 'get',
params: params
});
}
/** 获取新版综合仿真仿真成员列表 */
export function getSimulationMemberList(group) {
return request({

View File

@ -2,6 +2,16 @@ export const keyboardEvents = {
Z: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_Z'}, // 绘图撤销
Y: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_Y'}, // 绘图恢复
DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素
ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'}, // 快捷修改绘图元素
ALT_W: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_W'},
ALT_T: {alkKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_T'},
ALT_G: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_G'},
ALT_R: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_R'},
ALT_V: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_V'},
ALT_A: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_A'},
ALT_O: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_O'},
ALT_E: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_E'},
ALT_S: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_S'},
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'}
};

View File

@ -563,12 +563,12 @@ class SkinCode extends defaultStyle {
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
type: 'MANUAL',
serviceNumber: 'MM',
nameFormat: 'serviceNumber:groupNumber'
},
{
type: '02',
type: 'HEAD',
nameFormat: 'targetCode:groupNumber'
}
], // 特殊列车类型需设置显示格式
@ -586,12 +586,14 @@ class SkinCode extends defaultStyle {
targetCodePrefix: '00', // 目的地码前缀
defaultTargetCode: 'AA', // 默认目的地码
trainTargetTextAlign: 'left', // 车次号文字显示位置
trainNumberOffset: { x: 1, y: 1}// 目的地码偏移量
trainNumberOffset: { x: 1, y: 1}, // 目的地码偏移量
headTypeColor: '#FF0'// 头码车颜色
},
trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'BB', // 默认服务号(表号)
trainServerOffset: { x: 26, y: 1}// 列车服务号偏移
trainServerOffset: { x: 26, y: 1}, // 列车服务号偏移
manualTypeColor: '#FF0'// 人工车颜色
},
trainTarget: {
tripNumberPrefix: '00', // 车次号前缀

View File

@ -258,15 +258,22 @@ class Jlmap {
}
// const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
const oDevice = deviceFactory(type, elem, this.showConfig);
const nDevice = deepAssign(oDevice || {}, elem);
// const nDevice = deepAssign(oDevice || {}, elem);
// if (this.mapDevice[code]) {
// nDevice.instance = this.mapDevice[code].instance; // 保持相同 instance
// }
// this.$painter.delete(oDevice);
// delete this.mapDevice[code];
// if (!elem._dispose) {
// this.mapDevice[code] = nDevice;
// this.$painter.add(nDevice); // 重新赋值instance
// }
if (this.mapDevice[code]) {
nDevice.instance = this.mapDevice[code].instance; // 保持相同 instance
this.$painter.delete(this.mapDevice[code]);
}
this.$painter.delete(oDevice);
delete this.mapDevice[code];
if (!elem._dispose) {
this.mapDevice[code] = nDevice;
this.$painter.add(nDevice); // 重新赋值instance
this.mapDevice[code] = deepAssign(this.mapDevice[code] || {}, oDevice);
this.$painter.add(this.mapDevice[code]);
}
});

View File

@ -346,7 +346,8 @@ export default class TrainBody extends Group {
this.style.Train.trainTarget.planTypeColor && this.textTrainTrip && this.textTrainTrip.setStyle({textFill: this.style.Train.trainTarget.planTypeColor});
} else if (type === 'MANUAL') {
this.style.Train.trainTargetNumber.manualTypeColor && this.textTrainGroup && this.textTrainGroup.setStyle({textFill: this.style.Train.trainTargetNumber.manualTypeColor});
this.style.Train.trainNumber.headTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainNumber.headTypeColor});
this.style.Train.trainNumber.manualTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainNumber.manualTypeColor});
this.style.Train.trainServer.manualTypeColor && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.trainServer.manualTypeColor});
} else if (type === 'HEAD') {
this.style.Train.trainTargetNumber.headTypeColor && this.textTrainGroup && this.textTrainGroup.setStyle({textFill: this.style.Train.trainTargetNumber.headTypeColor});
this.style.Train.trainNumber.headTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainNumber.headTypeColor});

View File

@ -84,7 +84,7 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import Handler from '@/scripts/cmdPlugin/Handler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {getTrainDetailBytripNumber} from '@/api/simulation';
import {getTrainDetailBytripNumber, getTrainDetailByStNumber} from '@/api/simulation';
import NoticeInfo from '../childDialog/noticeInfo';
export default {
@ -140,7 +140,11 @@ export default {
'map'
]),
serverNoIsDisabled() {
if (this.popClass === 'foshan-01__systerm' && this.formModel.type === 'PLAN') {
return false;
} else {
return true;
}
},
trainNumberIsDisabled() {
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
@ -237,9 +241,9 @@ export default {
},
watch: {
'formModel.tripNumber': function(val) {
if (val.length == 4) {
if (this.popClass !== 'foshan-01__systerm' && val.length === 4) {
this.trainNoChange(val);
} else {
} else if (this.popClass !== 'foshan-01__systerm') {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: val,
@ -248,6 +252,37 @@ export default {
targetCode: '',
category: 'MM'
};
} else if (this.popClass === 'foshan-01__systerm' && val.length === 2 && this.formModel.serviceNumber.length === 3) {
this.trainNoChange(val, this.formModel.serviceNumber);
} else if (this.popClass === 'foshan-01__systerm') {
const serviceNumber = this.formModel.serviceNumber;
const destinationCode = this.formModel.destinationCode;
this.formModel = {
groupNumber: this.formModel.groupNumber,
destinationCode: destinationCode,
tripNumber: val,
type: this.formModel.type,
serviceNumber: serviceNumber,
targetCode: '',
category: 'MM'
};
}
},
'formModel.serviceNumber': function(val) {
if (this.popClass === 'foshan-01__systerm' && val.length === 3 && this.formModel.tripNumber.length === 2) {
this.trainNoChange(this.formModel.tripNumber, val);
} else if (this.popClass === 'foshan-01__systerm') {
const tripNumber = this.formModel.tripNumber;
const destinationCode = this.formModel.destinationCode;
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
destinationCode: destinationCode,
type: this.formModel.type,
serviceNumber: val,
targetCode: '',
category: 'MM'
};
}
}
},
@ -324,7 +359,7 @@ export default {
}
});
},
trainNoChange(tripNumber) {
trainNoChange(tripNumber, serviceNumber) {
const operate = {
tripNumber: tripNumber,
operation: ''
@ -335,14 +370,33 @@ export default {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
}
Handler.undo(1);
try {
if (this.popClass === 'foshan-01__systerm') {
getTrainDetailByStNumber(this.$route.query.group, {tripNumber: tripNumber, serviceNumber: serviceNumber}).then(resp => {
if (resp.data) {
this.formModel.destinationCode = resp.data.destinationCode;
}
});
} else {
getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
if (resp.data) {
this.formModel.serviceNumber = resp.data.serviceNumber;
this.formModel.destinationCode = resp.data.destinationCode;
}
}).catch(() => {
this.$message.error('获取列车信息失败!');
});
}
} catch (e) {
this.$message.error('获取列车信息失败!');
}
// getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
// if (resp.data) {
// this.formModel.serviceNumber = resp.data.serviceNumber;
// this.formModel.destinationCode = resp.data.destinationCode;
// }
// }).catch(() => {
// this.$message.error('');
// });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -5,6 +5,7 @@
<train-delete ref="trainDelete" />
<train-define ref="trainDefine" />
<train-move ref="trainMove" />
<train-control ref="trainControl" pop-class="foshan-01__systerm" />
<!-- <train-edit ref="trainEdit" /> -->
<train-set-plan ref="trainSetPlan" />
<!-- <train-move-evently ref="trainMoveEvently" /> -->
@ -25,6 +26,7 @@ import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove';
// import TrainEdit from './dialog/trainEdit';
import TrainSetPlan from './dialog/trainSetPlan';
import TrainControl from '@/jmapNew/theme/components/menus/dialog/trainControl';
// import TrainMoveEvently from './dialog/trainMoveEvently';
// import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead';
@ -54,7 +56,8 @@ export default {
TrainSetHead,
TrainSetWork,
trainSetWorkATP,
SetFault
SetFault,
TrainControl
},
props: {
selected: {
@ -82,7 +85,7 @@ export default {
},
{
label: '修改列车识别号',
handler: this.undeveloped,
handler: this.editTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
@ -385,7 +388,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDefine.doShow(step, this.selected);
this.$refs.trainControl.doShow(step, this.selected);
}
});
},

View File

@ -34,6 +34,7 @@
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
<i class="el-icon-caret-right" style="float: right;height: 30px;line-height: 30px;" />
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
@ -202,7 +203,28 @@ export default {
{
title: '窗口(W)',
operate: OperationEvent.Command.mBar.system,
children: []
children: [
{
title: '报警',
click: this.undeveloped
},
{
title: '时刻表信息',
click: this.undeveloped
},
{
title: '性能工具',
click: this.undeveloped
},
{
title: '用户权限',
click: this.undeveloped
},
{
title: '系统状态',
click: this.undeveloped
}
]
},
{
title: '列车(T)',
@ -210,12 +232,36 @@ export default {
children: [
{
title: '排列进路',
operate: '',
children: [
{
title: '站台',
click: this.handleArrangeRoute
},
{
title: '信号机',
click: this.handleArrangeRoute
}
]
},
{
title: '分配',
operate: '',
children: [
{
title: '运行线',
click: this.handleTrainDistribution
},
{
title: '班次',
click: this.undeveloped
},
{
title: '往返',
click: this.undeveloped
}
]
},
{
title: '操作',
operate: '',
@ -595,7 +641,13 @@ export default {
children: [
{
title: '缩放',
operate: '',
children: [
{
title: '全部',
click: this.undeveloped
}
]
},
{
title: '修改可见性',
@ -603,16 +655,43 @@ export default {
},
{
title: '允许显示',
operate: '',
children: [
{
title: '停站到计时',
click: this.undeveloped
}
]
}
]
}
],
Center: [
{
title: '窗口(W)',
operate: OperationEvent.Command.mBar.system,
children: []
children: [
{
title: '报警',
click: this.undeveloped
},
{
title: '时刻表信息',
click: this.undeveloped
},
{
title: '性能工具',
click: this.undeveloped
},
{
title: '用户权限',
click: this.undeveloped
},
{
title: '系统状态',
click: this.undeveloped
}
]
},
{
title: '列车(T)',
@ -620,12 +699,36 @@ export default {
children: [
{
title: '排列进路',
operate: '',
children: [
{
title: '站台',
click: this.handleArrangeRoute
},
{
title: '信号机',
click: this.handleArrangeRoute
}
]
},
{
title: '分配',
operate: '',
children: [
{
title: '运行线',
click: this.handleTrainDistribution
},
{
title: '班次',
click: this.undeveloped
},
{
title: '往返',
click: this.undeveloped
}
]
},
{
title: '操作',
operate: '',
@ -1672,6 +1775,7 @@ export default {
.menu-li-text {
font-size: 14px;
color: #000;
width: $menuItemWidth;
}
.menu-li-text .status {

View File

@ -140,7 +140,7 @@ export default {
}
},
'$store.state.socket.simulationReset': function (val) {
this.selectSeries = []; this.runSeries = [];
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
if (this.dialogShow) {
this.loadInitData();
}