This commit is contained in:
fan 2022-08-03 09:23:58 +08:00
commit c5d11595cf
26 changed files with 1330 additions and 912 deletions

View File

@ -56,7 +56,7 @@ export function deleteAllMap() {
return request({
url: `/api/mapBuild/delete/all`,
method: 'delete'
})
});
}
/** 保存草稿地图*/
@ -659,6 +659,15 @@ export function deleteBigRoute(mapId, code) {
});
}
// 大铁地图进路修改接口
export function editBigRoute(data, mapId, code ) {
return request({
url: `/api/draftMap/${mapId}/route/${code}`,
method: 'put',
data
});
}
// 草稿地图修改检查配置接口
export function checkConfig(mapId, data) {
return request({
@ -745,8 +754,8 @@ export function generateDepotCiData(mapId, stationCode) {
}
// 大铁线路批量生成进路
export function generateRoute(mapId) {
return request({
url: `/api/draftMap/${mapId}/route/railway/generate`,
method: 'post'
});
return request({
url: `/api/draftMap/${mapId}/route/railway/generate`,
method: 'post'
});
}

View File

@ -493,6 +493,7 @@ export default {
endSectionCodeColon: 'Terminal stop:',
routePreview: 'In the preview',
routeEdit: 'Route edit',
accessType: 'Access property type',
automaticAccessType: 'Automatic access type',
nearSectionCode: 'Close to segment name',

View File

@ -435,6 +435,7 @@ export default {
endSectionCodeColon: '终端停车点:',
routePreview: '进路预览',
routeEdit: '进路编辑',
accessType: '是否折返进路',
nearSectionCode: '接近区段名称',
continueProtectSwitchData: '延续保护道岔',

View File

@ -259,7 +259,7 @@ class SkinCode extends defaultStyle {
this[deviceType.SignalButton] = {
shape: 'roundWithDock',
fillColor: '#808080',
showName: true
showName: true,
}
this[deviceType.SwitchFault] = {

View File

@ -37,6 +37,7 @@ export default class SignalButton extends Group {
this.z = 0
this.model = model
this.style = style
this.pressed = false
// Line
this.create()
this.setState(model)
@ -291,7 +292,6 @@ export default class SignalButton extends Group {
}
}
}
// let
// { value: 'PICK', label: '接车按钮' },
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
if (!store.getters['map/checkDeviceShow'](this._code)) {
@ -308,5 +308,26 @@ export default class SignalButton extends Group {
}
}
}
pressDown(flg, color) {
if (this.pressed === flg) return
if (this.arcShapeDock1) {
if (flg) {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel })
if (color) {
this.arcShape
.animateStyle(true)
.when(0, { fill: '#69666E' })
.when(1000, { fill: color })
.when(2000, { fill: '#69666E' })
.start()
}
} else {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel })
this.arcShape.stopAnimation(true)
this.recover()
}
this.pressed = flg
}
}
getAnchorPoint() {}
}

View File

@ -487,8 +487,6 @@ export default class Switch extends Group {
if (this.model.switchFaultCode) {
const switchFault = this.mapDevice[this.model.switchFaultCode];
if (this.style.SwitchFault.lamp.switchState) {
console.log(fault)
console.log(pos)
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor)
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor)
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor)

View File

@ -225,15 +225,15 @@ export default {
components: {
PasswordBox,
DefectiveShunting,
NoticeInfo
NoticeInfo,
},
props: {
selected: {
type: Object,
default: () => {
return null
}
}
},
},
},
data() {
return {
@ -264,8 +264,9 @@ export default {
buttonName: true,
signalName: true,
switchName: true,
sectionName: true
}
sectionName: true,
},
pressedSignalButton: null,
}
},
computed: {
@ -331,7 +332,7 @@ export default {
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
}
return ''
}
},
},
watch: {
'$store.state.menuOperation.buttonOperation': function(val, old) {
@ -370,7 +371,7 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](val)
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock)
}
}
},
},
beforeDestroy() {
this.routeDataMap = null
@ -385,12 +386,12 @@ export default {
over: true,
operation: data.operation,
cmdType: data.nextCmdType,
param: data.param
param: data.param,
}
} else {
operate = {
operationPre: data.operation,
operation: data.operateNext
operation: data.operateNext,
}
}
this.trainingOperation(operate)
@ -477,7 +478,7 @@ export default {
operation: this.Station.powerUnLock.button.operation,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
code: this.$store.state.map.showCentralizedStationCode,
param: { stationCode: this.$store.state.map.showCentralizedStationCode }
param: { stationCode: this.$store.state.map.showCentralizedStationCode },
}
this.$store
.dispatch('training/nextNew', operate)
@ -503,7 +504,7 @@ export default {
// S
guideLockLeftButtonDown() {
const operate = {
operation: this.Station.stationMasterLock.leftButton.operation
operation: this.Station.stationMasterLock.leftButton.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -519,7 +520,7 @@ export default {
// X
guideLockRightButtonDown() {
const operate = {
operation: this.Station.stationMasterLock.rightButton.operation
operation: this.Station.stationMasterLock.rightButton.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -532,17 +533,18 @@ export default {
}
})
},
buttonDown(operation, commandTypeList) {
buttonDown(operation, commandTypeList, color) {
this.clearOperate()
this.pressedSignalButton.instance.pressDown(true, color)
if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {
operation: operation
operation: operation,
}
//
const operationList = [
this.Signal.humanTrainRoute.button.operation,
this.Section.fault.button.operation,
this.Section.defectiveShunting.button.operation
this.Section.defectiveShunting.button.operation,
]
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -563,7 +565,7 @@ export default {
//
const operate = {
start: true,
operation: operation
operation: operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -595,7 +597,7 @@ export default {
// OR
arrangementRouteOperation(deviceList) {
const operate = {
operation: this.Signal.arrangementRoute.button.operation
operation: this.Signal.arrangementRoute.button.operation,
}
if (!this.routeDataMap) {
this.handleRouteDataMap()
@ -672,8 +674,8 @@ export default {
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
param: {
signalCode: model._type === 'Signal' ? model.code : model.signalCode
}
signalCode: model._type === 'Signal' ? model.code : model.signalCode,
},
}
this.$store
.dispatch('training/nextNew', operate)
@ -693,7 +695,7 @@ export default {
code: model.code,
operation: this.Signal.guide.button.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: { signalCode: model.signalCode }
param: { signalCode: model.signalCode },
}
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode)
// 15s
@ -711,7 +713,7 @@ export default {
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
val: model.code,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE,
}
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code)
if (model._type === 'SignalButton' && model.type === 'PICK') {
@ -733,7 +735,7 @@ export default {
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: this.cmdType,
param: { switchCode: code }
param: { switchCode: code },
}
this.sendCommand(operate)
},
@ -770,7 +772,7 @@ export default {
code: model.code,
operation: buttonOperation,
cmdType: '',
param: {}
param: {},
}
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
if (buttonOperation === this.Signal.lock.button.operation) {
@ -799,7 +801,7 @@ export default {
code: model.code,
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
param: { signalCode: model.signalCode }
param: { signalCode: model.signalCode },
}
// 15s
if (signal.guideTime) {
@ -817,7 +819,7 @@ export default {
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
param: { sectionCode: model.code }
param: { sectionCode: model.code },
}
this.sendCommand(operate)
}
@ -826,6 +828,10 @@ export default {
selectedChange() {
//
const model = this.selected //
if (this.pressedSignalButton /* && this.pressedSignalButton.code === model.code */) {
this.pressedSignalButton.instance.pressDown(false)
this.pressedSignalButton = null
}
if (
(this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') ||
this.selected._event !== MouseEvent.Left ||
@ -840,7 +846,7 @@ export default {
this.Switch.locate.button.operation,
this.Switch.reverse.button.operation,
this.Switch.block.button.operation,
this.Switch.unblock.button.operation
this.Switch.unblock.button.operation,
]
const signalButtonOperation = [
'LOCATE', //
@ -849,7 +855,9 @@ export default {
'UNLOCK', //
'BLOCK', //
'UNBLOCK', //,
'SECTION_FAULT_UNLOCK' //
'SECTION_FAULT_UNLOCK', //
'CANCEL', //
'HUMAN_RELEASE_ROUTE', //
]
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
this.handleGuideLock(model)
@ -884,21 +892,30 @@ export default {
this.guideLockRightButtonDown()
}
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
this.pressedSignalButton = model
const { lamp } = model.instance.style.SwitchFault
//
if (model.type === 'LOCATE') {
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'])
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
} else if (model.type === 'REVERSE') {
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'])
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'], lamp.reverseColor)
} else if (model.type === 'MONOLOCK') {
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'])
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'], lamp.lockColor)
} else if (model.type === 'UNLOCK') {
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'])
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
} else if (model.type === 'BLOCK') {
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'])
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'], lamp.blockColor)
} else if (model.type === 'UNBLOCK') {
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'])
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
} else if (model.type === 'SECTION_FAULT_UNLOCK') {
this.buttonDown(this.Section.fault.button.operation, ['Section'])
//
this.buttonDown(this.Section.fault.button.operation, ['Section'], lamp.faultColor)
} else if (model.type === 'CANCEL') {
//
this.buttonDown(this.MixinCommand.totalCancel.button.operation, ['Signal', 'SignalButton'])
} else if (model.type === 'HUMAN_RELEASE_ROUTE') {
//
this.buttonDown(this.Signal.humanTrainRoute.button.operation, ['Signal', 'SignalButton'])
}
} else if (
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
@ -930,11 +947,13 @@ export default {
this.deviceList &&
this.deviceList.length &&
this.$store.dispatch('training/updateMapState', [
{ code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 }
{ code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 },
])
this.deviceList = []
Handler.clear() //
this.$store.dispatch('menuOperation/setButtonOperation', null)
// this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(false)
// this.pressedSignalButton = null
},
assistOperateOrChange(model) {
// mode.type==
@ -946,8 +965,8 @@ export default {
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode,
pressDown: model.pressDown ? 0 : 1 // 10
}
pressDown: model.pressDown ? 0 : 1, // 10
},
},
//
CHANGE_DIRECTION: {
@ -956,8 +975,8 @@ export default {
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode,
pressDown: model.pressDown ? 0 : 1 // 10
}
pressDown: model.pressDown ? 0 : 1, // 10
},
},
//
PICK_ASSIST: {
@ -966,8 +985,8 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode
}
stationCode: model.stationCode,
},
},
//
DEPART_ASSIST: {
@ -975,8 +994,8 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode
}
stationCode: model.stationCode,
},
},
//
ACCIDENT: {
@ -984,9 +1003,9 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode
}
}
stationCode: model.stationCode,
},
},
}
const noPasswordModelTypeMap = {
//
@ -995,8 +1014,8 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode
}
stationCode: model.stationCode,
},
},
//
RECOVERY: {
@ -1004,9 +1023,9 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
param: {
labelEnum: model.labelEnum,
stationCode: model.stationCode
}
}
stationCode: model.stationCode,
},
},
}
if (noPasswordModelTypeMap[model.type]) {
const operate = {
@ -1014,7 +1033,7 @@ export default {
operation: noPasswordModelTypeMap[model.type].operation,
code: model.code,
param: noPasswordModelTypeMap[model.type].param,
cmdType: noPasswordModelTypeMap[model.type].nextCmdType
cmdType: noPasswordModelTypeMap[model.type].nextCmdType,
}
this.$store
.dispatch('training/nextNew', operate)
@ -1033,7 +1052,7 @@ export default {
const operate = {
operation: modelTypeMap[model.type].operation,
code: model.code,
param: modelTypeMap[model.type].param
param: modelTypeMap[model.type].param,
}
this.$store
.dispatch('training/nextNew', operate)
@ -1066,8 +1085,8 @@ export default {
// console.error(error);
// this.$refs.noticeInfo.doShow();
// });
}
}
},
},
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -81,7 +81,9 @@ export default {
{label: '车站扳道员', value: 'STATION_SWITCH_MAN', enLabel: 'StationSwitchMan'},
{label: '车站引导员', value: 'STATION_FACILITATOR', enLabel: 'StationFacilitator'},
{label: '车站工务工', value: 'STATION_WORKER', enLabel: 'StationWorker'},
{label: '设备管理员', value: 'DEVICE_MANAGER', enLabel: 'DeviceManager'}
{label: '设备管理员', value: 'DEVICE_MANAGER', enLabel: 'DeviceManager'},
{label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master'}
],
releaseReview: [

View File

@ -175,7 +175,8 @@ export const SimulationType = {
STATION_SWITCH_MAN:'车站扳道员',
STATION_FACILITATOR:'车站引导员',
STATION_WORKER:'车站工务工',
DEVICE_MANAGER:'设备管理员'
DEVICE_MANAGER:'设备管理员',
TRAIN_MASTER:'车务段段长 '
};
export const UrlConfig = {

View File

@ -313,6 +313,7 @@ export default {
data.disabled = true;
});
if (item.children[val.creatorId]) {
console.log(item.children[val.creatorId], item.children, '---------------');
item.children[val.creatorId].isInviting = true;
const offsetTop = document.getElementById('proper_content_box' + val.creatorId).parentNode.offsetTop;
document.querySelector('.chat-box-content').scrollTop = (offsetTop - 40) > 0 ? (offsetTop - 80) : 0;
@ -396,6 +397,7 @@ export default {
const stationFacilitator = {};
const stationWorker = {};
const deviceManager = {};
const trainMaster = {};
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
this.memberData[item.id]['active'] = false;
@ -484,6 +486,13 @@ export default {
this.memberData[item.id].labelName = '设备管理员-' + device.name + (item.name || '');
deviceManager[item.id] = this.memberData[item.id];
break;
case 'TRAIN_MASTER':
// + device.name
// + device.name
this.memberData[item.id].label = '车务段段长-' + (item.name || '');
this.memberData[item.id].labelName = '车务段段长-' + (item.name || '');
trainMaster[item.id] = this.memberData[item.id];
break;
}
});
// { label: '', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
@ -522,6 +531,7 @@ export default {
type: 'role',
children: parentDepartmentList
}, {
label: '电力调度',
id: 'electricDispatcher',
type: 'role',
@ -579,6 +589,12 @@ export default {
id: 'deviceManager',
type: 'role',
children: deviceManager
},
{
label: '车务段段长',
id: 'trainMaster',
type: 'role',
children: trainMaster
}
];
this.initCommonMemberList();
@ -1121,6 +1137,7 @@ export default {
const temStationFacilitatorList = [];
const temStationWorkerList = [];
const temDeviceManagerList = [];
const temTrainMasterList = [];
this.$store.state.training.memberList.forEach(item =>{
switch (item.type) {
case 'DISPATCHER':
@ -1162,11 +1179,14 @@ export default {
case 'DEVICE_MANAGER':
temDeviceManagerList.push({memberId: item.id, connect:true });
break;
case 'TRAIN_MASTER':
temTrainMasterList.push({memberId: item.id, connect:true });
break;
}
});
this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList,
...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList,
...temStationFacilitatorList, temStationWorkerList, temDeviceManagerList];
...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList];
if (this.userRole == 'AUDIENCE' || this.commonConversation) {
this.conversitionMemberList = [];
this.messageList = [...this.commonMessageList];

View File

@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
lastData = JSON.parse(lastData);
const lastMemberList = [];
// const electricDispatcherList = [];
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const driverList = [];
lastData.forEach((member, index)=>{
if (member.userId && member.userId == store.state.user.id) {
@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName;
member.normalName = member.type + name;
}
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员'];
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长 '];
const deviceTypeIndex = deviceType.indexOf(member.type);
if (deviceTypeIndex >= 0) {
if (deviceTypeIndex == 3) {

View File

@ -267,6 +267,15 @@ export default {
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'TRAIN_MASTER': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
// + device.name
member.label = '车务段段长-' + (member.name ? member.name : '');
member.deviceName = device.name;
}
break;
}
}
});
}

View File

@ -308,6 +308,7 @@ export default {
checkRoleInit(data) {
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
// 'TRAIN_MASTER'
data.forEach(item => {
if ((item.admin && item.online) && item.userId == this.userId && stationRoleList.includes(item.type)) {
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
@ -320,6 +321,7 @@ export default {
checkRoleChange(data) {
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
// 'TRAIN_MASTER'
data.forEach(item => {
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && stationRoleList.includes(item.type)) {
// this.userRole = item.type || 'AUDIENCE';

View File

@ -273,6 +273,109 @@ export const operateEnum = {
]
}
},
CTCZONE:{
function: getCTCDevicename,
CTC_ZONE_SAVE_RUN_PLAN:{
code:'planParam',
name:'添加行车计划',
isList:true,
params:[
{
code:'stationCode',
name:'车站',
function:getStationNameById
},
{
code:'trainType',
name:'列车类型',
result:trainTypeList
},
{
code:'runType',
name:'运行类型',
result:[
{code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
]
},
{
code:'arriveTripNumber',
name:'到达车次'
},
{
code:'arriveDirectionCode',
name:'接车口'
},
{
code:'arrivePlanTime',
name:'到达时间'
},
{
code:'startRunPlan',
name:' 始发'
},
{
code:'transfinite',
name:' 超限',
result:transfiniteList
}
]
},
CTC_ZONE_SAVE_TRACK_SECTION:{
name:'行车计划修改股道',
isList:true,
params:[
{
code:'stationCode',
name:'车站',
function:getStationNameById
},
{
code:'runPlanCode',
name:'运行计划编码'
},
{
code:'sectionCode',
name:'股道',
function:getDeviceNameById
},
{
code:'model',
name:'接发类型',
result:[
{code:'R', name:'接车'},
{code:'D', name:'发车'}
]
}
]
},
CTC_ZONE_SAVE_PLAN_TIME:{
name:'行车计划修改时间',
isList:true,
params:[
{
code:'stationCode',
name:'车站',
function:getStationNameById
},
{
code:'runPlanCode',
name:'运行计划编码'
},
{
code:'planTime',
name:'时间'
},
{
code:'model',
name:'接发类型',
result:[
{code:'R', name:'接车'},
{code:'D', name:'发车'}
]
}
]
}
},
CTC: {
function: getCTCDevicename,
CTC_READ_DISPATCH_COMMAND: {
@ -381,79 +484,79 @@ export const operateEnum = {
}
};
// 调度台操作
export const ctcZoneMap = {
CTC_ZONE_SAVE_RUN_PLAN:{
name:'添加行车计划',
isList:true,
objName:'planParam',
params:[
{
code:'stationCode',
name:'车站',
function:getStationNameById
},
{
code:'trainType',
name:'列车类型',
result:trainTypeList
},
{
code:'runType',
name:'运行类型',
result:[
{code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
]
},
{
code:'arriveTripNumber',
name:'到达车次'
},
{
code:'arriveDirectionCode',
name:'接车口'
},
{
code:'arriveSectionCode',
name:'接车股道'
},
{
code:'arrivePlanTime',
name:'到达时间'
},
{
code:'startRunPlan',
name:' 始发'
},
{
code:'transfinite',
name:' 超限',
result:transfiniteList
}
//
]
// planParam: Object
// arriveDirectionCode: "Station32295_SF"
// arrivePlanTime: "2022-07-27 17:12"
// arriveSectionCode: "T97"
// arriveTripNumber: "2056"
// departDirectionCode: ""
// departPlanTime: ""
// departSectionCode: ""
// departTripNumber: ""
// electrical: true
// endRunPlan: true
// entryOutDiscordant: false
// passenger: true
// runType: "FAST_PASSENGER_TRAIN"
// startRunPlan: false
// stationCode: "Station32295"
// trackDiscordant: true
// trainType: "LOCAL_EXPRESS_PASSENGER_TRAIN"
// transfinite: "NO"
// // 调度台操作
// export const ctcZoneMap = {
// CTC_ZONE_SAVE_RUN_PLAN:{
// name:'添加行车计划',
// isList:true,
// objName:'planParam',
// params:[
// {
// code:'stationCode',
// name:'车站',
// function:getStationNameById
// },
// {
// code:'trainType',
// name:'列车类型',
// result:trainTypeList
// },
// {
// code:'runType',
// name:'运行类型',
// result:[
// {code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
// ]
// },
// {
// code:'arriveTripNumber',
// name:'到达车次'
// },
// {
// code:'arriveDirectionCode',
// name:'接车口'
// },
// {
// code:'arriveSectionCode',
// name:'接车股道'
// },
// {
// code:'arrivePlanTime',
// name:'到达时间'
// },
// {
// code:'startRunPlan',
// name:' 始发'
// },
// {
// code:'transfinite',
// name:' 超限',
// result:transfiniteList
// }
// //
// ]
// // planParam: Object
// // arriveDirectionCode: "Station32295_SF"
// // arrivePlanTime: "2022-07-27 17:12"
// // arriveSectionCode: "T97"
// // arriveTripNumber: "2056"
// // departDirectionCode: ""
// // departPlanTime: ""
// // departSectionCode: ""
// // departTripNumber: ""
// // electrical: true
// // endRunPlan: true
// // entryOutDiscordant: false
// // passenger: true
// // runType: "FAST_PASSENGER_TRAIN"
// // startRunPlan: false
// // stationCode: "Station32295"
// // trackDiscordant: true
// // trainType: "LOCAL_EXPRESS_PASSENGER_TRAIN"
// // transfinite: "NO"
}
};
// }
// };
// 转换函数
export function covertOperate(operationType, operationParamMap) {
@ -466,6 +569,8 @@ export function covertOperate(operationType, operationParamMap) {
} else {
if (device._type == 'Power') {
deviceName = '供电线(' + device.code + ')';
} else if (device._type == 'Train') {
deviceName = '列车(' + device.groupNumber + ')';
} else {
deviceName = '' + device.name;
}
@ -484,72 +589,74 @@ export function covertOperate(operationType, operationParamMap) {
});
return tip;
} else if (operationType.includes('CTC_ZONE')) {
let tip = '请点击运行图';
// let operateName = null;
// Object.keys(CMD).forEach(key => {
// Object.values(CMD[key]).forEach(el => {
// if (el.value == operationType) {
// operateName = el;
// return;
// }
// });
// });
// tip += ',执行【' + operateName.label + '】操作';
let operationParam = operationParamMap;
const paramInfo = ctcZoneMap[operationType];
tip += ',执行【' + paramInfo.name + '】操作';
if (paramInfo.objName) {
operationParam = operationParamMap[paramInfo.objName];
}
if (paramInfo.isList) {
tip += ',参数:【';
paramInfo.params.forEach(param=>{
if (param.result) {
param.result.forEach(result=>{
if (result.code == operationParam[param.code]) {
tip += param.name + '为' + result.name + '';
}
});
} else if (param.function) {
tip += param.name + '为' + covertFunction(param.function, operationParam[param.code]) + '';
} else {
tip += param.name + '为' + operationParam[param.code] + '';
}
});
tip += '】';
}
debugger;
// operationParamMap[]
}
// else if (operationType.includes('CTC_ZONE')) {
// let tip = '请点击运行图';
// // let operateName = null;
// // Object.keys(CMD).forEach(key => {
// // Object.values(CMD[key]).forEach(el => {
// // if (el.value == operationType) {
// // operateName = el;
// // return;
// // }
// // });
// // });
// // tip += ',执行【' + operateName.label + '】操作';
// let operationParam = operationParamMap;
// const paramInfo = ctcZoneMap[operationType];
// tip += ',执行【' + paramInfo.name + '】操作';
// if (paramInfo.objName) {
// operationParam = operationParamMap[paramInfo.objName];
// }
// if (paramInfo.isList) {
// tip += ',参数:【';
// paramInfo.params.forEach(param=>{
// if (param.result) {
// param.result.forEach(result=>{
// if (result.code == operationParam[param.code]) {
// tip += param.name + '为' + result.name + '';
// }
// });
// } else if (param.function) {
// tip += param.name + '为' + covertFunction(param.function, operationParam[param.code]) + '';
// } else {
// tip += param.name + '为' + operationParam[param.code] + '';
// }
// });
// tip += '】';
// }
// debugger;
// // operationParamMap[]
// if (paramInfo) {
// if (paramInfo.isDevice) {
// if (paramInfo.isList) {
// paramName += '【' + paramInfo.name + ' ';
// const deviceList = operationParamMap[paramInfo.code];
// deviceList.forEach((device, index)=>{
// paramName += covertFunction(paramInfo.function, device);
// if (index != deviceList.length - 1) {
// paramName += '';
// }
// });
// paramName += '】';
// } else {
// // if (paramInfo) {
// // if (paramInfo.isDevice) {
// // if (paramInfo.isList) {
// // paramName += '【' + paramInfo.name + ' ';
// // const deviceList = operationParamMap[paramInfo.code];
// // deviceList.forEach((device, index)=>{
// // paramName += covertFunction(paramInfo.function, device);
// // if (index != deviceList.length - 1) {
// // paramName += '';
// // }
// // });
// // paramName += '】';
// // } else {
// operationParamMap[]
return tip;
// ctcZoneMap[operationType]
// 调度台添加行车计划
// CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
// CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
// CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
// CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
// CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'},
// CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
// CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
// CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
// CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
} else {
// // operationParamMap[]
// return tip;
// // ctcZoneMap[operationType]
// // 调度台添加行车计划
// // CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
// // CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
// // CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
// // CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
// // CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'},
// // CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
// // CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
// // CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
// // CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
// }
else {
let device = operationType.split('_')[0];
if (device == 'CM') {
device = 'ControlConvertMenu';
@ -560,6 +667,9 @@ export function covertOperate(operationType, operationParamMap) {
if (operationType.includes('ASSIST')) {
device = 'Station';
}
if (operationType.includes('CTC_ZONE')) {
device = 'CTCZONE';
}
const list = ['Train_Update_Type',
'Train_Add_Train_Trace',
'Train_Remove_Train_Trace',
@ -628,7 +738,9 @@ function covertDeviceName(deviceInfo, deviceType) {
function getCTCDevicename(operationType) {
let deviceName = '';
if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
if (operationType.includes('CTC_ZONE')) {
deviceName = '请点击运行图';
} else if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
const roles = store.state.training.roles;
if (roles == 'DISPATCHER') {
deviceName = '调度命令';
@ -774,6 +886,10 @@ function getStationNameById(stationId) {
const station = store.getters['map/getDeviceByCode'](stationId) || {};
return station.name;
}
function getDeviceNameById(deviceCode) {
const device = store.getters['map/getDeviceByCode'](deviceCode) || {};
return device.name;
}
function getStationNamList(list) {
const nameList = [];
list.sort().forEach(stationId => {

View File

@ -258,6 +258,10 @@ export default {
prdType = '';
type = 'DEVICE_MANAGER';
this.$store.dispatch('training/setRoles', 'DEVICE_MANAGER');
} else if (role.type == '车务段段长') {
prdType = '';
type = 'TRAIN_MASTER';
this.$store.dispatch('training/setRoles', 'TRAIN_MASTER');
} else {
prdType = '';
}

View File

@ -213,7 +213,6 @@ export default {
mapId:this.$route.query.mapId,
project: this.project,
newApi: false,
joint: true,
ctc: true,
try: this.$route.query.try || 0,
token:getToken(),
@ -395,6 +394,12 @@ export default {
id: 'deviceManager',
type: 'role',
children: result.deviceListData[15]
},
{
label: '车务段段长',
id: 'trainMaster',
type: 'role',
children: result.deviceListData[16]
}
];
/**

View File

@ -3,6 +3,9 @@
<div class="display-draft">
<el-button-group>
<el-button v-if="!isReplaceBg" type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
<template v-if="$route.query.lineCode == '16'">
<el-button type="primary" @click="modifySystemTime">修改系统时间</el-button>
</template>
<el-button v-if="!isScriptCommand||isReplaceBg" type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button v-if="!isScriptCommand||isReplaceBg" type="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
</el-button-group>
@ -29,6 +32,7 @@
/>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
<tip-script-record-new
ref="tipTaskRecordNew"
@ -55,6 +59,7 @@ import MenuSchema from '@/views/newMap/displayNew/menuSchema';
import DemonMenu from '@/views/newMap/displayNew/demonMenu';
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
import SetTime from '@/views/newMap/displayNew/demon/setTime';
import ModifyTime from '@/views/newMap/displayNew/demon/modifyTime';
import { Notification } from 'element-ui';
import { getSimulationMemberList} from '@/api/simulation';
import ChatBox from '@/views/newMap/chatView/chatBox.vue';
@ -63,6 +68,7 @@ export default {
name: 'MenuScript',
components: {
SetTime,
ModifyTime,
MenuSchema,
DemonMenu,
TipScriptRecordNew,
@ -150,8 +156,8 @@ export default {
if (member) {
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '01', '', '', ''];
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', ' TRAIN_MASTER'];
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '01', '', '', '', ''];
const index = memberType.indexOf(member.type);
let prdType;
if (index >= 0) {
@ -198,6 +204,10 @@ export default {
});
},
methods: {
//
modifySystemTime() {
this.$refs.modifySysTime.doShow();
},
selectBeginTime() {
this.$refs.setTime.doShow();
},
@ -224,6 +234,7 @@ export default {
checkRoleChange(data) {
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
// 'TRAIN_MASTER'
data.forEach(item => {
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && (stationRoleList.includes(item.type) )) {
// this.userRole = item.type || 'AUDIENCE';

View File

@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
lastData = JSON.parse(lastData);
const lastMemberList = [];
// const electricDispatcherList = [];
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const driverList = [];
lastData.forEach((member, index)=>{
if (member.userId && member.userId == store.state.user.id) {
@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName;
member.normalName = member.type + name;
}
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员'];
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长'];
/**
* 车站助理

View File

@ -19,7 +19,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="formModel.type === 'STATION_SUPERVISOR'" label="值班车站:" prop="deviceCode">
<el-form-item v-if="stationRoleList.includes(formModel.type)" label="值班车站:" prop="deviceCode">
<el-select v-model="formModel.deviceCode" placeholder="请选择" size="small">
<el-option
v-for="item in filterStationList"
@ -67,6 +67,17 @@ export default {
{ required: true, message: '请选择值班车站', trigger: 'change' }
]
},
stationRoleList:[
'STATION_SUPERVISOR',
'STATION_ASSISTANT',
'STATION_MASTER',
'STATION_SIGNALER',
'STATION_PASSENGER',
'STATION_SWITCH_MAN',
'STATION_FACILITATOR',
'STATION_WORKER',
'DEVICE_MANAGER'
],
typeList: [
{label: '行调', value: 'DISPATCHER'},
{label: '通号', value: 'MAINTAINER'},
@ -78,7 +89,8 @@ export default {
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
{label: '车站引导员', value: 'STATION_FACILITATOR'},
{label: '车站工务工', value: 'STATION_WORKER'},
{label: '设备管理员', value: 'DEVICE_MANAGER'}
{label: '设备管理员', value: 'DEVICE_MANAGER'},
{label: '车务段段长', value: 'TRAIN_MASTER'}
]
};
},
@ -102,7 +114,8 @@ export default {
},
doSave() {
this.$refs.form.validate(() => {
if (this.formModel.type !== 'STATION_SUPERVISOR') { delete this.formModel.deviceCode; }
// if (this.formModel.type !== 'STATION_SUPERVISOR') { delete this.formModel.deviceCode; }
if (!this.stationRoleList.includes(this.formModel.type)) { delete this.formModel.deviceCode; }
addSimulationMember(this.formModel, this.$route.query.group).then(() => {
this.$message.success('添加仿真角色成员成功!');
this.handleClose();

View File

@ -191,6 +191,7 @@ export default {
const stationFacilitatorList = [];
const stationWorkerList = [];
const deviceManagerList = [];
const trainMasterList = [];
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) {
@ -254,6 +255,11 @@ export default {
this.memberData[item.id].labelName = '设备管理员-' + device.name + (item.name ? `-${item.name }` : '');
deviceManagerList.push(this.memberData[item.id]);
break;
case 'TRAIN_MASTER':
// device.name;
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
trainMasterList.push(this.memberData[item.id]);
break;
// DEVICE_MANAGER:'' deviceManager
}
});
@ -324,6 +330,11 @@ export default {
labelName: '设备管理员',
id: 'deviceManager',
children: deviceManagerList
},
{
labelName: '车务段段长 ',
id: 'trainMaster',
children: trainMasterList
}
];
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);

View File

@ -1,12 +1,12 @@
<template>
<el-dialog v-dialogDrag :title="$t('map.routePreview')" :visible.sync="show" width="95%" :before-do-close="doClose" append-to-body>
<div>
<div v-if="$route.query.lineCode == '16'" style="display: flex;justify-content: right;">
<el-button size="small" type="primary" @click="generationRoute">一键生成</el-button>
</div>
<div v-if="$route.query.lineCode == '16'" style="display: flex;justify-content: right;">
<el-button size="small" type="primary" @click="generationRoute">一键生成</el-button>
</div>
<QueryListPage
style="margin-top: 10px;"
ref="queryListPage"
style="margin-top: 10px;"
:pager-config="pagerConfig"
:query-form="queryForm"
:query-list="queryList"
@ -60,6 +60,7 @@ export default {
{ label: '定位', value: true },
{ label: '反位', value: false }
],
editData: {},
queryList: {
// query: this.queryFunction,
data:[],
@ -138,6 +139,11 @@ export default {
name: '删除',
handleClick: this.deleteRoute,
type: 'danger'
},
{
name: '编辑',
handleClick: this.editRouteFn,
type: 'danger'
}
// {
// name: this.$t('global.cancel'),
@ -231,7 +237,7 @@ export default {
},
getBtnCodeList(btnCodeList) {
const nameList = [];
btnCodeList && btnCodeList.forEach(item => {
btnCodeList && btnCodeList.forEach(item => {
nameList.push(this.formatName(item));
});
return nameList;
@ -257,6 +263,10 @@ export default {
}
return nameList;
},
editRouteFn(index, row) {
this.$emit('setEditRouteDate', JSON.parse(JSON.stringify(row)));
this.doClose();
},
deleteRoute(index, row) {
deleteBigRoute(this.mapInfo.id, row.code).then(res=>{
this.$message.success('删除进路成功');
@ -267,24 +277,24 @@ export default {
this.$messageBox('删除进路失败:' + error.meessage);
});
},
generationRoute() {
this.$confirm('是否确认一键生成进路?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
generateRoute(this.$route.params.mapId).then(response => {
this.$message.success('一键生成进路成功');
}).catch(() => {
this.$messageBox('一键生成进路失败');
}).finally(() => {
this.loading = false;
});
}).catch(() => {
this.$message.info('已取消一键生成进路');
});
}
generationRoute() {
this.$confirm('是否确认一键生成进路?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
generateRoute(this.$route.params.mapId).then(response => {
this.$message.success('一键生成进路成功');
}).catch(() => {
this.$messageBox('一键生成进路失败');
}).finally(() => {
this.loading = false;
});
}).catch(() => {
this.$message.info('已取消一键生成进路');
});
}
}
};
</script>

View File

@ -7,7 +7,7 @@
:route-data="routeData"
@setCenter="setCenter"
/>
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" />
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" @setEditRouteDate="setEditRouteDate" />
</div>
</template>
<script>
@ -47,6 +47,12 @@ export default {
// } 'routeList',
},
methods: {
setEditRouteDate(data) {
this.routeData = data;
this.$nextTick(() => {
this.$refs.routeEdit.setEditData();
});
},
clickEvent(e, model) {
this.onSelect(model);
},

View File

@ -7,11 +7,19 @@
<el-form-item label="名称:" prop="name">
<el-input v-model="addModel.name" style="width: 220px;" />
</el-form-item>
<el-form-item label="是否多进路:" prop="multiRoute">
<el-radio-group v-model="addModel.multiRoute" @change="changeRadio">
<el-form-item label="进路类型:" prop="type">
<!-- <el-radio-group v-model="addModel.multiRoute" @change="changeRadio">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-radio-group> -->
<el-select v-model="addModel.type" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in routeTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="!addModel.multiRoute" label="始端信号机:" prop="startSignalCode">
<el-select v-model="addModel.startSignalCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
@ -79,12 +87,12 @@
@click="hover('pathSwitch')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item v-if="!addModel.multiRoute" prop="normal">
<el-form-item v-if="!addModel.multiRoute">
<el-select v-model="addModel.pathSwitchPosition.normal" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.value"
:label="`${item.label}`"
:label="item.label"
:value="item.value"
/>
</el-select>
@ -142,16 +150,17 @@
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<!-- 是否调车进路 -->
<el-form-item label="是否调车进路:" prop="shutting">
<!-- <el-form-item label="是否调车进路:" prop="shutting">
<el-radio-group v-model="addModel.shutting">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item> -->
</el-form>
<div class="bigDraft">
<el-button-group class="bigDraftBtn">
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="update ">更新进路</el-button>
<el-button v-if="isModify" type="primary" size="small" :loading="loading" @click="clear ">取消更新</el-button>
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="save ">更新进路</el-button>
<el-button v-else type="primary" size="small" :loading="loading" @click="save">保存进路</el-button>
</el-button-group>
</div>
@ -162,7 +171,7 @@ import { getBigRouteList } from '@/api/jmap/mapdraft';
import { setUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index';
// putRouteNew, getRouteNewList, getContinueProtectList, getFlankProtectionList
import { postBigRoute } from '@/api/jmap/mapdraft';
import { postBigRoute, editBigRoute } from '@/api/jmap/mapdraft';
import { mapGetters } from 'vuex';
export default {
name:'BigRouteInfo',
@ -212,10 +221,18 @@ export default {
{ label: '定位', value: true },
{ label: '反位', value: false }
],
routeTypeList: [
{ label: '接车进路', value: 'RECEIVING' },
{ label: '发车进路', value: 'DEPARTURE' },
{ label: '调车进路', value: 'SHUNTING' },
{ label: '通过进路', value: 'PASS' },
{ label: '长调车进路', value: 'LONG_SHUNTING' }
],
addModel:{
code:'',
name:'',
multiRoute:false,
type: 'RECEIVING',
multiRoute: false,
shutting:false,
startSignalCode:'',
signalAspect:1,
@ -223,7 +240,7 @@ export default {
endSectionCode:'',
pathSwitchPosition:{
switchCode:'',
normal:true
normal: true
},
btnCodeList:[],
routeAspectList:[]
@ -273,10 +290,32 @@ export default {
return [...this.signalList, ...this.signalButtonList];
}
},
watch: {
'addModel.type': function(val) {
const list = ['PASS', 'LONG_SHUNTING'];
if (list.includes(val)) {
this.addModel.multiRoute = true;
} else {
this.addModel.multiRoute = false;
}
this.changeRadio();
}
},
mounted() {
this.initPage();
},
methods:{
setEditData() {
this.isModify = true;
const obj = deepAssign({}, this.routeData);
const initData = this.initModelData();
Object.keys(initData).forEach(key => {
if (!obj.hasOwnProperty(key)) {
obj[key] = initData[key];
}
});
this.addModel = deepAssign({}, obj);
},
initPage() {
this.routeList = [];
getBigRouteList(this.$route.params.mapId).then(response => {
@ -348,15 +387,19 @@ export default {
if (newModel.pathSwitchPosition && !newModel.pathSwitchPosition.switchCode) {
delete newModel.pathSwitchPosition;
}
newModel.code = setUID('Route');
let api = editBigRoute;
if (!this.isModify) {
api = postBigRoute;
newModel.code = setUID('Route');
}
that.loading = true;
postBigRoute(newModel, that.mapInfo.id).then(res=>{
that.$message.success(that.$t('tip.creatingSuccessful'));
api(newModel, that.mapInfo.id, newModel.code).then(res=>{
that.$message.success(that.$t(this.isModify ? 'tip.updateSuccessfully' : 'tip.creatingSuccessful'));
that.loading = false;
if (!newModel.multiRoute) { that.routeList.push({code:newModel.code, name:newModel.name}); }
if (!this.isModify && !newModel.multiRoute) { that.routeList.push({code:newModel.code, name:newModel.name}); }
that.clear();
}).catch(() => {
that.$messageBox(that.$t('tip.operationAbnormal'));
that.$messageBox(that.$t(this.isModify ? 'tip.updateFailed' : 'tip.operationAbnormal'));
// + error.message
that.loading = false;
});
@ -368,27 +411,28 @@ export default {
// delete this.addModel.id;
this.$refs.form.resetFields();
this.addModel = {
code:'',
name:'',
multiRoute:false,
startSignalCode:'',
signalAspect:1,
startSectionCode:'',
endSectionCode:'',
pathSwitchPosition:{
switchCode:'',
normal:true
},
btnCodeList:[],
routeAspectList:[]
...this.initModelData()
};
}
this.isModify = false;
},
update() {
this.$refs.form.validate((valid) => {
if (valid) {
}
});
initModelData() {
return {
code:'',
name:'',
type: 'RECEIVING',
multiRoute:false,
startSignalCode:'',
signalAspect:1,
startSectionCode:'',
endSectionCode:'',
pathSwitchPosition:{
switchCode:'',
normal:true
},
btnCodeList:[],
routeAspectList:[]
};
},
pushRouteAspect() {
if (this.routeCode && this.signalAspect) {

File diff suppressed because it is too large Load Diff

View File

@ -91,7 +91,8 @@ export default {
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
{label: '车站引导员', value: 'STATION_FACILITATOR'},
{label: '车站工务工', value: 'STATION_WORKER'},
{label: '设备管理员', value: 'DEVICE_MANAGER'}
{label: '设备管理员', value: 'DEVICE_MANAGER'},
{label: '车务段段长', value: 'TRAIN_MASTER'}
]
};
},

View File

@ -276,6 +276,12 @@ export default {
id: 'deviceManager',
type: 'role',
children: result.deviceListData[15]
},
{
label: '车务段段长',
id: 'trainMaster',
type: 'role',
children: result.deviceListData[16]
}
];
this.memberList = result.lastMemberList;
@ -332,7 +338,7 @@ export default {
const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
const newMember = covertmember[0];
this.memberList.push(newMember);
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员'];
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长'];
const index = deviceTypeList.indexOf(newMember.type);
if (index >= 0) {
const treeDataIn = this.treeData[index];
@ -583,6 +589,10 @@ export default {
prdType = '';
role.type = 'DEVICE_MANAGER';
this.$store.dispatch('training/setRoles', 'DEVICE_MANAGER');
} else if (role.type == '车务段段长') {
prdType = '';
role.type = 'TRAIN_MASTER';
this.$store.dispatch('training/setRoles', 'TRAIN_MASTER');
} else {
prdType = '';
}
@ -619,7 +629,8 @@ export default {
'STATION_SWITCH_MAN':'车站扳道员',
'STATION_FACILITATOR':'车站引导员',
'STATION_WORKER':'车站工务工',
'DEVICE_MANAGER':'设备管理员'
'DEVICE_MANAGER':'设备管理员',
'TRAIN_MASTER':'车务段段长'
};
newRole.type = roleTypeEnumMap[newRole.type];