绘图数据处理调整&佛山修改列车识别好调整
This commit is contained in:
parent
890fc5f851
commit
f33fb7ee91
@ -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({
|
||||
|
@ -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'}
|
||||
};
|
||||
|
||||
|
@ -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', // 车次号前缀
|
||||
|
@ -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]);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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});
|
||||
|
@ -37,13 +37,20 @@
|
||||
:disabled="serverNoIsDisabled"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-form-item v-if="formModel.type == 'PLAN'&&popClass !== 'foshan-01__systerm'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-input
|
||||
:id="domIdTrainNo"
|
||||
v-model="formModel.tripNumber"
|
||||
maxlength="4"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'&&popClass === 'foshan-01__systerm'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-input
|
||||
:id="domIdTrainNo"
|
||||
v-model="formModel.stNumber"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
|
||||
<el-input
|
||||
:id="domIdTargetCode"
|
||||
@ -84,7 +91,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 {
|
||||
@ -108,6 +115,7 @@ export default {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
type: 'PLAN',
|
||||
stNumber: '',
|
||||
serviceNumber: '',
|
||||
destinationCode: '',
|
||||
category: 'MM'
|
||||
@ -119,6 +127,9 @@ export default {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
stNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请选择列车类型', trigger: 'change' }
|
||||
],
|
||||
@ -237,15 +248,31 @@ 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,
|
||||
type: this.formModel.type,
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
stNumber: '',
|
||||
category: 'MM'
|
||||
};
|
||||
}
|
||||
},
|
||||
'formModel.stNumber': function(val) {
|
||||
if (this.popClass === 'foshan-01__systerm' && val.length === 5) {
|
||||
this.trainNoChange(val);
|
||||
} else if (this.popClass === 'foshan-01__systerm') {
|
||||
this.formModel = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
tripNumber: '',
|
||||
type: this.formModel.type,
|
||||
stNumber: val,
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
category: 'MM'
|
||||
};
|
||||
}
|
||||
@ -271,6 +298,7 @@ export default {
|
||||
type: model.type ? model.type : 'PLAN',
|
||||
serviceNumber: model.serviceNumber,
|
||||
destinationCode: model.destinationCode,
|
||||
stNumber: model.serviceNumber + '' + model.tripNumber,
|
||||
category: 'MM'
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
@ -335,14 +363,36 @@ export default {
|
||||
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
||||
}
|
||||
Handler.undo(1);
|
||||
try {
|
||||
if (this.popClass === 'foshan-01__systerm') {
|
||||
getTrainDetailByStNumber(this.$route.query.group, {stNumber: tripNumber}).then(resp => {
|
||||
if (resp.data) {
|
||||
this.formModel.serviceNumber = resp.data.serviceNumber;
|
||||
this.formModel.tripNumber = resp.data.tripNumber;
|
||||
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) {
|
||||
console.log(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 });
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -34,6 +34,7 @@
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </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 {
|
||||
|
Loading…
Reference in New Issue
Block a user