代码调整
This commit is contained in:
parent
ffe67ab78e
commit
322a227fc8
@ -54,11 +54,11 @@ export default {
|
||||
{ label: '观众', value: 'AUDIENCE', enLabel: 'Audience ' },
|
||||
{ label: '司机', value: 'DRIVER', enLabel: 'Driver ' },
|
||||
{ label: '通号', value: 'MAINTAINER', enLabel: 'Repairman ' },
|
||||
{ label: '车辆段信号楼', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' },
|
||||
{ label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' },
|
||||
{ label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' },
|
||||
{ label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher ' },
|
||||
{ label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department' },
|
||||
{ label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building' },
|
||||
{ label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING', enLabel: 'Signal Building' },
|
||||
{ label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant' },
|
||||
{ label: '车站站长', value: 'STATION_MASTER', enLabel: 'StationMaster' },
|
||||
{ label: '车站信号员', value: 'STATION_SIGNALER', enLabel: 'StationSignaler' },
|
||||
|
@ -303,8 +303,24 @@ const map = {
|
||||
map: state => {
|
||||
return state.map;
|
||||
},
|
||||
memberList: state => {
|
||||
return state.map.memberList;
|
||||
memberMetroList: state => {
|
||||
if (!state.map.memberMap) {
|
||||
// this.$set()
|
||||
state.map.memberMap = {METRO: [], RAILWAY: [], EMERGENCY: []};
|
||||
}
|
||||
return state.map.memberMap.METRO;
|
||||
},
|
||||
memberRailwayList: state => {
|
||||
if (!state.map.memberMap) {
|
||||
state.map.memberMap = {METRO: [], RAILWAY: [], EMERGENCY: []};
|
||||
}
|
||||
return state.map.memberMap.RAILWAY;
|
||||
},
|
||||
memberEmergencyList: state => {
|
||||
if (!state.map.memberMap) {
|
||||
state.map.memberMap = {METRO: [], RAILWAY: [], EMERGENCY: []};
|
||||
}
|
||||
return state.map.memberMap.EMERGENCY;
|
||||
},
|
||||
psdList: state => {
|
||||
if (state.map) {
|
||||
@ -1120,6 +1136,13 @@ const map = {
|
||||
},
|
||||
setPictureDeviceMap: (state, pictureDeviceMap) => {
|
||||
state.pictureDeviceMap = pictureDeviceMap;
|
||||
},
|
||||
deleteMember: (state, data) => {
|
||||
console.log(state.map.memberMap[data.type], data.index, '1');
|
||||
state.map.memberMap[data.type].splice(data.index, 1);
|
||||
console.log(state.map.memberMap[data.type], data.index, '2');
|
||||
state.map.memberMap[data.type] = [... state.map.memberMap[data.type]];
|
||||
console.log(state.map.memberMap[data.type], data.index, '3');
|
||||
}
|
||||
},
|
||||
|
||||
@ -1399,6 +1422,9 @@ const map = {
|
||||
},
|
||||
setPictureDeviceMap: ({ commit }, pictureDeviceMap) => {
|
||||
commit('setPictureDeviceMap', pictureDeviceMap);
|
||||
},
|
||||
deleteMember: ({ commit }, data) => {
|
||||
commit('deleteMember', data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -414,8 +414,8 @@ export default {
|
||||
electricDispatcherList[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.memberData[item.id].label = '车辆段信号楼';
|
||||
this.memberData[item.id].labelName = '车辆段信号楼' + (item.name || '');
|
||||
this.memberData[item.id].label = '车辆段/停车场调度';
|
||||
this.memberData[item.id].labelName = item.name ? item.name : '调度-' + device.name;
|
||||
depotDispatcherList[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
@ -440,9 +440,9 @@ export default {
|
||||
this.memberData[item.id].labelName = '上级部门' + (item.name || '');
|
||||
parentDepartmentList[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'PARKING_LOT_SIGNAL_BUILDING':
|
||||
this.memberData[item.id].label = '停车场信号楼' + (item.name || '');
|
||||
this.memberData[item.id].labelName = '停车场信号楼' + (item.name || '');
|
||||
case 'SIGNAL_BUILDING':
|
||||
this.memberData[item.id].label = '车辆段/停车场信号楼';
|
||||
this.memberData[item.id].labelName = item.name ? item.name : '信号楼-' + device.name;
|
||||
parkingLotSignalBuilding[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
@ -520,7 +520,7 @@ export default {
|
||||
type: 'role',
|
||||
children: maintainerList
|
||||
}, {
|
||||
label: '车辆段信号楼',
|
||||
label: '车辆段/停车场调度',
|
||||
id: 'depotDispatcher',
|
||||
type: 'role',
|
||||
children: depotDispatcherList
|
||||
@ -536,7 +536,7 @@ export default {
|
||||
type: 'role',
|
||||
children: electricDispatcherList
|
||||
}, {
|
||||
label: '停车场信号楼',
|
||||
label: '车辆段/停车场信号楼',
|
||||
id: 'parkingLotSignalBuilding',
|
||||
type: 'role',
|
||||
children: parkingLotSignalBuilding
|
||||
|
@ -323,8 +323,8 @@ export default {
|
||||
electricDispatcherList[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.memberData[item.id].label = '车辆段信号楼';
|
||||
this.memberData[item.id].labelName = '车辆段信号楼' + (item.name || '');
|
||||
this.memberData[item.id].label = '车辆段/停车场调度';
|
||||
this.memberData[item.id].labelName = item.name ? item.name : '调度-' + device.name;
|
||||
depotDispatcherList[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
@ -349,9 +349,9 @@ export default {
|
||||
this.memberData[item.id].labelName = '上级部门' + (item.name || '');
|
||||
parentDepartmentList[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'PARKING_LOT_SIGNAL_BUILDING':
|
||||
this.memberData[item.id].label = '停车场信号楼' + (item.name || '');
|
||||
this.memberData[item.id].labelName = '停车场信号楼' + (item.name || '');
|
||||
case 'SIGNAL_BUILDING':
|
||||
this.memberData[item.id].label = '车辆段/停车场信号楼';
|
||||
this.memberData[item.id].labelName = item.name ? item.name : '信号楼-' + device.name;
|
||||
parkingLotSignalBuilding[item.id] = this.memberData[item.id];
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
@ -429,7 +429,7 @@ export default {
|
||||
type: 'role',
|
||||
children: maintainerList
|
||||
}, {
|
||||
label: '车辆段信号楼',
|
||||
label: '车辆段/停车场调度',
|
||||
id: 'depotDispatcher',
|
||||
type: 'role',
|
||||
children: depotDispatcherList
|
||||
@ -445,7 +445,7 @@ export default {
|
||||
type: 'role',
|
||||
children: electricDispatcherList
|
||||
}, {
|
||||
label: '停车场信号楼',
|
||||
label: '车辆段/停车场信号楼',
|
||||
id: 'parkingLotSignalBuilding',
|
||||
type: 'role',
|
||||
children: parkingLotSignalBuilding
|
||||
|
@ -180,7 +180,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
case 'DEPOT_DISPATCHER': {
|
||||
member.label = '车辆段信号楼' + (member.name ? member.name : '');
|
||||
member.label = '车辆段/信号楼调度' + (member.name ? member.name : '');
|
||||
break;
|
||||
}
|
||||
case 'PARENT_DEPARTMENT': {
|
||||
@ -191,8 +191,8 @@ export default {
|
||||
member.label = '电力调度' + (member.name ? member.name : '');
|
||||
break;
|
||||
}
|
||||
case 'PARKING_LOT_SIGNAL_BUILDING': {
|
||||
member.label = '停车场信号楼' + (member.name ? member.name : '');
|
||||
case 'SIGNAL_BUILDING': {
|
||||
member.label = '信号楼' + (member.name ? member.name : '');
|
||||
break;
|
||||
}
|
||||
case 'STATION_ASSISTANT': {
|
||||
|
@ -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) {
|
||||
|
@ -180,7 +180,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
case 'DEPOT_DISPATCHER': {
|
||||
member.label = '车辆段信号楼' + (member.name ? member.name : '');
|
||||
member.label = '车辆段/停车场调度' + (member.name ? member.name : '');
|
||||
break;
|
||||
}
|
||||
case 'PARENT_DEPARTMENT': {
|
||||
@ -191,8 +191,8 @@ export default {
|
||||
member.label = '电力调度' + (member.name ? member.name : '');
|
||||
break;
|
||||
}
|
||||
case 'PARKING_LOT_SIGNAL_BUILDING': {
|
||||
member.label = '停车场信号楼' + (member.name ? member.name : '');
|
||||
case 'SIGNAL_BUILDING': {
|
||||
member.label = '信号楼' + (member.name ? member.name : '');
|
||||
break;
|
||||
}
|
||||
case 'STATION_ASSISTANT': {
|
||||
|
@ -209,7 +209,7 @@ export default {
|
||||
}
|
||||
});
|
||||
window.open(routeData.href);
|
||||
} else if (role.type == '车辆段信号楼') {
|
||||
} else if (role.type == '车辆段/停车场调度') {
|
||||
prdType = '05';
|
||||
type = 'DEPOT_DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
||||
@ -221,10 +221,10 @@ export default {
|
||||
prdType = '';
|
||||
type = 'ELECTRIC_DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'ELECTRIC_DISPATCHER');
|
||||
} else if (role.type == '停车场信号楼') {
|
||||
} else if (role.type == '车辆段/停车场信号楼') {
|
||||
prdType = '';
|
||||
type = 'PARKING_LOT_SIGNAL_BUILDING';
|
||||
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
|
||||
type = 'SIGNAL_BUILDING';
|
||||
this.$store.dispatch('training/setRoles', 'SIGNAL_BUILDING');
|
||||
|
||||
} else if (role.type == '车站助理') {
|
||||
prdType = '';
|
||||
|
@ -329,7 +329,7 @@ export default {
|
||||
type: 'role',
|
||||
children: result.deviceListData[1]
|
||||
}, {
|
||||
label: '车辆段信号楼',
|
||||
label: '车辆段/停车场调度',
|
||||
id: 'depotDispatcher',
|
||||
type: 'role',
|
||||
children: result.deviceListData[4]
|
||||
@ -346,7 +346,7 @@ export default {
|
||||
children: result.deviceListData[6]
|
||||
},
|
||||
{
|
||||
label: '停车场信号楼',
|
||||
label: '车辆段/停车场信号楼',
|
||||
id: 'parkingLotSignalBuilding',
|
||||
type: 'role',
|
||||
children: result.deviceListData[7]
|
||||
|
@ -165,7 +165,7 @@ 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',
|
||||
'ELECTRIC_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||
'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);
|
||||
|
@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
|
||||
member.label = member.type + name + userName;
|
||||
member.normalName = member.type + name;
|
||||
}
|
||||
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长'];
|
||||
const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '电力调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长'];
|
||||
|
||||
/**
|
||||
* 车站助理
|
||||
|
@ -1,13 +1,70 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card" style="height: 100%;">
|
||||
<el-tab-pane class="view-control" label="成员" name="first" :lazy="lazy">
|
||||
<template v-for="item in memberList">
|
||||
<div />
|
||||
</template>
|
||||
<el-tabs v-model="memberActive" class="card" style="height: 100%">
|
||||
<el-tab-pane class="view-control" label="地铁CBTC" name="METRO">
|
||||
<div style="height: 100%;overflow-y: auto;">
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
<el-col :span="5" :offset="1"><div style="text-align: center;font-size: 14px;">名称</div></el-col>
|
||||
<el-col :span="5" :offset="1"><div style="text-align: center;font-size: 14px;">成员类型</div></el-col>
|
||||
<el-col :span="5" :offset="1"><div style="text-align: center;font-size: 14px;">设备</div></el-col>
|
||||
<el-col :span="5" :offset="1"><div style="text-align: center;font-size: 14px;">操作</div></el-col>
|
||||
</el-row>
|
||||
<el-row v-for="(item, index) in memberMetroList" :key="item.id" style="margin-bottom: 5px;">
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-input v-model="item.name" size="mini" @change="changeMemberName($el, item)" />
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-select v-model="item.type" placeholder="请选择" size="mini" @change="changeMemberType($event, item)">
|
||||
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-select v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in [...stationList, ...trainList]" :key="elem.code" :label="elem.name || elem.groupNumber" :value="elem.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1" style="text-align: center;">
|
||||
<el-button type="primary" size="mini" @click="deleteMember(index, 'METRO')">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="大铁CTC" name="RAILWAY">
|
||||
<el-row>
|
||||
<el-col :span="6">名称</el-col>
|
||||
<el-col :span="6">成员类型</el-col>
|
||||
<el-col :span="6">设备</el-col>
|
||||
<el-col :span="6">操作</el-col>
|
||||
</el-row>
|
||||
<template v-for="item in memberRailwayList">
|
||||
<el-row :key="item.id">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="item.name" size="small" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="应急调度" name="EMERGENCY">
|
||||
<el-row>
|
||||
<el-col :span="6">名称</el-col>
|
||||
<el-col :span="6">成员类型</el-col>
|
||||
<el-col :span="6">设备</el-col>
|
||||
<el-col :span="6">操作</el-col>
|
||||
</el-row>
|
||||
<template v-for="item in memberEmergencyList">
|
||||
<el-row :key="item.id">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="item.name" size="small" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="创建" name="second" :lazy="lazy">
|
||||
<div style="height: 100%;overflow-y:auto;">
|
||||
<el-form ref="createForm" :model="createForm" :rules="rules" label-width="150px" class="demo-ruleForm" size="small">
|
||||
<el-form ref="createForm" :model="createForm" label-width="150px" class="demo-ruleForm" size="small">
|
||||
<el-form-item label="成员名称:" prop="name">
|
||||
<el-input v-model="createForm.name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
@ -18,7 +75,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="关联设备:" prop="deviceCode">
|
||||
<el-select v-model="createForm.deviceCode" placeholder="请选择">
|
||||
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
<el-option v-for="item in [...stationList, ...trainList]" :key="item.code" :label="item.name || item.groupNumber" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="系统:" prop="systemType">
|
||||
<el-select v-model="createForm.systemType" placeholder="请选择">
|
||||
<el-option v-for="item in systemList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -30,64 +92,129 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="批量创建" name="third" :lazy="lazy">
|
||||
<div style="height: 100%;overflow-y:auto;">
|
||||
<el-form ref="batchForm" :model="batchForm" label-width="150px" class="demo-ruleForm" size="small">
|
||||
<el-form-item label="行调:" prop="DISPATCHER">
|
||||
<el-input-number v-model="batchForm.DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通号:" prop="MAINTAINER">
|
||||
<el-input-number v-model="batchForm.MAINTAINER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行值:" prop="STATION_SUPERVISOR">
|
||||
<el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="司机:" prop="DRIVER">
|
||||
<el-input-number v-model="batchForm.DRIVER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆段调度:" prop="DEPOT_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.DEPOT_DISPATCHER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆段信号楼:" prop="DEPOT_SIGNAL_BUILDING">
|
||||
<el-input-number v-model="batchForm.DEPOT_SIGNAL_BUILDING" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="停车场信号楼:" prop="PARKING_LOT_SIGNAL_BUILDING">
|
||||
<el-input-number v-model="batchForm.PARKING_LOT_SIGNAL_BUILDING" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站助理:" prop="STATION_ASSISTANT">
|
||||
<el-input-number v-model="batchForm.STATION_ASSISTANT" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站站长:" prop="STATION_MASTER">
|
||||
<el-input-number v-model="batchForm.STATION_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站信号员:" prop="STATION_SIGNALER">
|
||||
<el-input-number v-model="batchForm.STATION_SIGNALER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站客运员:" prop="STATION_PASSENGER">
|
||||
<el-input-number v-model="batchForm.STATION_PASSENGER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站扳道员:" prop="STATION_SWITCH_MAN">
|
||||
<el-input-number v-model="batchForm.STATION_SWITCH_MAN" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站引导员:" prop="STATION_FACILITATOR">
|
||||
<el-input-number v-model="batchForm.STATION_FACILITATOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站工务工:" prop="STATION_WORKER">
|
||||
<el-input-number v-model="batchForm.STATION_WORKER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车务段段长:" prop="TRAIN_MASTER">
|
||||
<el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工电调度:" prop="ELECTRIC_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上级部分:" prop="PARENT_DEPARTMENT">
|
||||
<el-input-number v-model="batchForm.PARENT_DEPARTMENT" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="派班员:" prop="SCHEDULING">
|
||||
<el-input-number v-model="batchForm.SCHEDULING" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备管理员:" prop="DEVICE_MANAGER">
|
||||
<el-input-number v-model="batchForm.DEVICE_MANAGER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form ref="batchForm" :model="batchForm" label-width="120px" class="demo-ruleForm" size="small">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="行调:" prop="DISPATCHER">
|
||||
<el-input-number v-model="batchForm.DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通号:" prop="MAINTAINER">
|
||||
<el-input-number v-model="batchForm.MAINTAINER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="行值:" prop="STATION_SUPERVISOR">
|
||||
<el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="司机:" prop="DRIVER">
|
||||
<el-input-number v-model="batchForm.DRIVER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆段调度:" prop="DEPOT_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.DEPOT_DISPATCHER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆段/停车场信号楼:" prop="SIGNAL_BUILDING">
|
||||
<el-input-number v-model="batchForm.SIGNAL_BUILDING" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站助理:" prop="STATION_ASSISTANT">
|
||||
<el-input-number v-model="batchForm.STATION_ASSISTANT" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站站长:" prop="STATION_MASTER">
|
||||
<el-input-number v-model="batchForm.STATION_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站信号员:" prop="STATION_SIGNALER">
|
||||
<el-input-number v-model="batchForm.STATION_SIGNALER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站客运员:" prop="STATION_PASSENGER">
|
||||
<el-input-number v-model="batchForm.STATION_PASSENGER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站扳道员:" prop="STATION_SWITCH_MAN">
|
||||
<el-input-number v-model="batchForm.STATION_SWITCH_MAN" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站引导员:" prop="STATION_FACILITATOR">
|
||||
<el-input-number v-model="batchForm.STATION_FACILITATOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车站工务工:" prop="STATION_WORKER">
|
||||
<el-input-number v-model="batchForm.STATION_WORKER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车务段段长:" prop="TRAIN_MASTER">
|
||||
<el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工电调度:" prop="ELECTRIC_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上级部分:" prop="PARENT_DEPARTMENT">
|
||||
<el-input-number v-model="batchForm.PARENT_DEPARTMENT" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="派班员:" prop="SCHEDULING">
|
||||
<el-input-number v-model="batchForm.SCHEDULING" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备管理员:" prop="DEVICE_MANAGER">
|
||||
<el-input-number v-model="batchForm.DEVICE_MANAGER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统:" prop="systemType">
|
||||
<el-select v-model="batchForm.systemType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in systemList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="batchCreate">批量创建</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
@ -96,6 +223,18 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="一键生成" name="fourth" :lazy="lazy">
|
||||
<el-form ref="generationForm" :model="generationForm" label-width="120px" class="demo-ruleForm" size="small">
|
||||
<el-form-item label="系统:" prop="systemType">
|
||||
<el-select v-model="generationForm.systemType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in systemList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;">
|
||||
<el-button size="small" type="primary" @click="keyGeneration">一键生成</el-button>
|
||||
</div>
|
||||
@ -105,21 +244,20 @@
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'SimulationMember',
|
||||
data() {
|
||||
return {
|
||||
lazy: true,
|
||||
activeName: 'first',
|
||||
memberActive: 'METRO',
|
||||
roleList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
||||
{label: '司机', value: 'DRIVER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车辆段调度', value: 'DEPOT_DISPATCHER'},
|
||||
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING'},
|
||||
{label: '车辆段信号楼', value: 'DEPOT_SIGNAL_BUILDING'},
|
||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER'},
|
||||
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
{label: '车站站长', value: 'STATION_MASTER'},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
||||
@ -133,14 +271,17 @@ export default {
|
||||
{label: '派班员', value: 'SCHEDULING'},
|
||||
{label: '设备管理员', value: 'DEVICE_MANAGER'}
|
||||
],
|
||||
rules: {
|
||||
|
||||
},
|
||||
systemList: [
|
||||
{ label: '地铁CBTC', value: 'METRO' },
|
||||
{ label: '大铁CTC', value: 'RAILWAY' },
|
||||
{ label: '应急调度', value: 'EMERGENCY' }
|
||||
],
|
||||
createForm: {
|
||||
id: '',
|
||||
name: '',
|
||||
type: '',
|
||||
deviceCode: ''
|
||||
type: 'DISPATCHER',
|
||||
deviceCode: '',
|
||||
systemType: 'METRO'
|
||||
},
|
||||
batchForm: {
|
||||
DISPATCHER: 0,
|
||||
@ -148,8 +289,7 @@ export default {
|
||||
DRIVER: 0,
|
||||
MAINTAINER: 0,
|
||||
DEPOT_DISPATCHER: 0,
|
||||
DEPOT_SIGNAL_BUILDING: 0,
|
||||
PARKING_LOT_SIGNAL_BUILDING: 0,
|
||||
SIGNAL_BUILDING: 0,
|
||||
STATION_ASSISTANT: 0,
|
||||
STATION_MASTER: 0,
|
||||
STATION_SIGNALER: 0,
|
||||
@ -161,25 +301,240 @@ export default {
|
||||
ELECTRIC_DISPATCHER: 0,
|
||||
PARENT_DEPARTMENT: 0,
|
||||
SCHEDULING: 0,
|
||||
DEVICE_MANAGER: 0
|
||||
DEVICE_MANAGER: 0,
|
||||
systemType: 'METRO'
|
||||
},
|
||||
generationForm: {
|
||||
systemType: 'METRO'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'memberList',
|
||||
'stationList'
|
||||
'memberMetroList',
|
||||
'memberRailwayList',
|
||||
'memberEmergencyList',
|
||||
'stationList',
|
||||
'trainList'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
batchCreate() {
|
||||
getMemberId(systemType) {
|
||||
let id = '1';
|
||||
if (this.memberList && this.memberList.length) {
|
||||
id = parseInt(this.memberList[this.memberList.length - 1].id) + 1;
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
if (memberMap[systemType] && memberMap[systemType].length) {
|
||||
id = parseInt(memberMap[systemType][memberMap[systemType].length - 1].id) + 1 + '';
|
||||
}
|
||||
return id;
|
||||
},
|
||||
changeMemberName(val, data) {
|
||||
console.log(val, data, '-------------');
|
||||
},
|
||||
changeMemberType(val, data) {
|
||||
this.$set(data, 'type', val);
|
||||
},
|
||||
deleteMember(index, type) {
|
||||
// const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
// memberMap[type].splice(index, 1);
|
||||
this.$store.dispatch('map/deleteMember', {index, type});
|
||||
console.log(index, this.memberMetroList, this.$store.state.map.memberMap);
|
||||
},
|
||||
batchCreate() {
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
if (this.batchForm.DISPATCHER) {
|
||||
for (let i = 0; i < this.batchForm.DISPATCHER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'DISPATCHER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
this.stationList.forEach(station => {
|
||||
if (!station.depot) {
|
||||
if (this.batchForm.STATION_SUPERVISOR) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_SUPERVISOR',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_ASSISTANT) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_ASSISTANT',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_MASTER) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_MASTER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_SIGNALER) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_SIGNALER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_PASSENGER) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_PASSENGER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_SWITCH_MAN) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_SWITCH_MAN',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_FACILITATOR) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_FACILITATOR',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_WORKER) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_WORKER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.DEVICE_MANAGER) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'DEVICE_MANAGER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
} else {
|
||||
if (this.batchForm.DEPOT_DISPATCHER) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'DEPOT_DISPATCHER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.SIGNAL_BUILDING) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'SIGNAL_BUILDING',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (this.batchForm.DRIVER) {
|
||||
this.trainList.forEach(train => {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'DRIVER',
|
||||
deviceCode: train.code
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
});
|
||||
}
|
||||
if (this.batchForm.MAINTAINER) {
|
||||
for (let i = 0; i < this.batchForm.MAINTAINER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'MAINTAINER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.TRAIN_MASTER) {
|
||||
for (let i = 0; i < this.batchForm.TRAIN_MASTER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'TRAIN_MASTER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.ELECTRIC_DISPATCHER) {
|
||||
for (let i = 0; i < this.batchForm.ELECTRIC_DISPATCHER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'ELECTRIC_DISPATCHER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.PARENT_DEPARTMENT) {
|
||||
for (let i = 0; i < this.batchForm.PARENT_DEPARTMENT; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'PARENT_DEPARTMENT',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.SCHEDULING) {
|
||||
for (let i = 0; i < this.batchForm.SCHEDULING; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'SCHEDULING',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
this.resetForm();
|
||||
},
|
||||
createMember() {
|
||||
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
const member = {
|
||||
id: this.getMemberId(this.createForm.systemType),
|
||||
name: this.createForm.name,
|
||||
type: this.createForm.type,
|
||||
deviceCode: this.createForm.deviceCode
|
||||
};
|
||||
memberMap[this.createForm.systemType].push(member);
|
||||
this.resetForm();
|
||||
},
|
||||
resetForm() {
|
||||
this.batchForm = {
|
||||
@ -188,8 +543,7 @@ export default {
|
||||
DRIVER: 0,
|
||||
MAINTAINER: 0,
|
||||
DEPOT_DISPATCHER: 0,
|
||||
DEPOT_SIGNAL_BUILDING: 0,
|
||||
PARKING_LOT_SIGNAL_BUILDING: 0,
|
||||
SIGNAL_BUILDING: 0,
|
||||
STATION_ASSISTANT: 0,
|
||||
STATION_MASTER: 0,
|
||||
STATION_SIGNALER: 0,
|
||||
@ -201,11 +555,166 @@ export default {
|
||||
ELECTRIC_DISPATCHER: 0,
|
||||
PARENT_DEPARTMENT: 0,
|
||||
SCHEDULING: 0,
|
||||
DEVICE_MANAGER: 0
|
||||
DEVICE_MANAGER: 0,
|
||||
systemType: 'METRO'
|
||||
};
|
||||
this.createForm = {
|
||||
id: '',
|
||||
name: '',
|
||||
type: 'DISPATCHER',
|
||||
deviceCode: '',
|
||||
systemType: 'METRO'
|
||||
};
|
||||
this.generationForm = {
|
||||
systemType: 'METRO'
|
||||
};
|
||||
},
|
||||
keyGeneration() {
|
||||
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
const memberDispatcher = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'DISPATCHER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberDispatcher);
|
||||
this.stationList.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_SUPERVISOR',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(member);
|
||||
}
|
||||
});
|
||||
this.trainList.forEach(train => {
|
||||
const member = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'DRIVER',
|
||||
deviceCode: train.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(member);
|
||||
});
|
||||
const memberMaintainer = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'MAINTAINER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberMaintainer);
|
||||
if (this.generationForm.systemType === 'RAILWAY') {
|
||||
this.stationList.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const memberStationAssistant = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_ASSISTANT',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationAssistant);
|
||||
const memberStationMaster = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_MASTER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationMaster);
|
||||
const memberStationSignaler = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_SIGNALER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationSignaler);
|
||||
const memberStationPassenger = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_PASSENGER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationPassenger);
|
||||
const memberStationSwitchMan = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_SWITCH_MAN',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationSwitchMan);
|
||||
const memberStationFacilitator = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_FACILITATOR',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationFacilitator);
|
||||
const memberStationWorker = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'STATION_WORKER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberStationWorker);
|
||||
const memberDeviceManager = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'DEVICE_MANAGER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberDeviceManager);
|
||||
}
|
||||
});
|
||||
} else if (this.generationForm.systemType === 'METRO') {
|
||||
this.stationList.forEach(station => {
|
||||
if (station.depot) {
|
||||
const memberDepotDispatcher = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'DEPOT_DISPATCHER',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberDepotDispatcher);
|
||||
const memberSignalBuilDing = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'SIGNAL_BUILDING',
|
||||
deviceCode: station.code
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberSignalBuilDing);
|
||||
}
|
||||
});
|
||||
const memberTrainMaster = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'TRAIN_MASTER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberTrainMaster);
|
||||
const memberElectricDispatcher = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'ELECTRIC_DISPATCHER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberElectricDispatcher);
|
||||
const memberParentDepartment = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'PARENT_DEPARTMENT',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberParentDepartment);
|
||||
const memberScheduling = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'SCHEDULING',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(memberScheduling);
|
||||
}
|
||||
this.resetForm();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
visible: false,
|
||||
title: '',
|
||||
mapSystemId: '',
|
||||
mapId: '',
|
||||
stationList: [],
|
||||
trainList: [],
|
||||
stationRoles: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
||||
@ -112,9 +111,8 @@ export default {
|
||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
||||
{label: '司机', value: 'DRIVER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车辆段调度', value: 'DEPOT_DISPATCHER'},
|
||||
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING'},
|
||||
{label: '车辆段信号楼', value: 'DEPOT_SIGNAL_BUILDING'},
|
||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER'},
|
||||
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
{label: '车站站长', value: 'STATION_MASTER'},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
||||
@ -209,7 +207,7 @@ export default {
|
||||
functionMap[this.ruleForm.function] = this.ruleForm.function;
|
||||
}
|
||||
const data = {
|
||||
mapId: this.mapId,
|
||||
mapId: this.$route.query.mapId,
|
||||
name: this.ruleForm.name,
|
||||
desc: this.ruleForm.desc,
|
||||
paramVO: {
|
||||
|
@ -471,7 +471,7 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
subsystemManage(index, row) {
|
||||
this.$router.push({path:'/system/lineDataManage/subsystem', query: {mapId: row.id, lineCode: row.lineCode}});
|
||||
this.$router.push({path:'/systemManagement/lineDataManage/subsystem', query: {mapId: row.id, lineCode: row.lineCode}});
|
||||
},
|
||||
permissionCommit() {
|
||||
getPermissionQuickly(this.mapId, this.permissionNum).then(resp => {
|
||||
|
@ -208,7 +208,7 @@ export default {
|
||||
type: 'role',
|
||||
children: result.deviceListData[1]
|
||||
}, {
|
||||
label: '车辆段信号楼',
|
||||
label: '车辆段/停车场调度',
|
||||
id: 'depotDispatcher',
|
||||
type: 'role',
|
||||
children: result.deviceListData[4]
|
||||
@ -224,7 +224,7 @@ export default {
|
||||
children: result.deviceListData[6]
|
||||
},
|
||||
{
|
||||
label: '停车场信号楼',
|
||||
label: '车辆段/停车场信号楼',
|
||||
id: 'parkingLotSignalBuilding',
|
||||
type: 'role',
|
||||
children: result.deviceListData[7]
|
||||
@ -338,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];
|
||||
@ -540,7 +540,7 @@ export default {
|
||||
}
|
||||
});
|
||||
this.openWindow = window.open(routeData.href);
|
||||
} else if (role.type == '车辆段信号楼') {
|
||||
} else if (role.type == '车辆段/停车场调度') {
|
||||
prdType = '05';
|
||||
role.type = 'DEPOT_DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
||||
@ -552,10 +552,10 @@ export default {
|
||||
prdType = '';
|
||||
role.type = 'ELECTRIC_DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'ELECTRIC_DISPATCHER');
|
||||
} else if (role.type == '停车场信号楼') {
|
||||
} else if (role.type == '车辆段/停车场信号楼') {
|
||||
prdType = '';
|
||||
role.type = 'PARKING_LOT_SIGNAL_BUILDING';
|
||||
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
|
||||
role.type = 'SIGNAL_BUILDING';
|
||||
this.$store.dispatch('training/setRoles', 'SIGNAL_BUILDING');
|
||||
|
||||
} else if (role.type == '车站助理') {
|
||||
prdType = '01';
|
||||
@ -618,10 +618,10 @@ export default {
|
||||
'DISPATCHER':'行调',
|
||||
'DRIVER':'司机',
|
||||
'MAINTAINER':'通号',
|
||||
'DEPOT_DISPATCHER':'车辆段信号楼',
|
||||
'DEPOT_DISPATCHER':'车辆段/停车场调度',
|
||||
'PARENT_DEPARTMENT':'上级部门',
|
||||
'ELECTRIC_DISPATCHER':'电力调度',
|
||||
'PARKING_LOT_SIGNAL_BUILDING':'停车场信号楼',
|
||||
'SIGNAL_BUILDING':'车辆段/停车场信号楼',
|
||||
'STATION_ASSISTANT':'车站助理',
|
||||
'STATION_MASTER':'车站站长',
|
||||
'STATION_SIGNALER':'车站信号员',
|
||||
|
Loading…
Reference in New Issue
Block a user