代码调整
This commit is contained in:
parent
9a5ba71218
commit
f6ee224404
@ -75,7 +75,7 @@ export function getPublish3dMapDetail(id) {
|
||||
}
|
||||
|
||||
/** 录制托管*/
|
||||
export function tuoguan3ddrive(group,data) {
|
||||
export function tuoguan3ddrive(group, data) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/trust`,
|
||||
method: 'put',
|
||||
@ -101,7 +101,7 @@ export function saveStationManagerData(data) {
|
||||
});
|
||||
}
|
||||
// 更新数据
|
||||
export function updateStationManagerData(id,data) {
|
||||
export function updateStationManagerData(id, data) {
|
||||
return request({
|
||||
url: `/api/pfp/${id}`,
|
||||
method: 'put',
|
||||
@ -128,6 +128,6 @@ export function getStationManagerData(id) {
|
||||
export function deleteStationManagerData(id) {
|
||||
return request({
|
||||
url: `/api/pfp/${id}`,
|
||||
method: 'delete',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
@ -285,3 +285,10 @@ export function allSimulationCheck() {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 根据地图查询仿真成员 */
|
||||
export function querySimulationMemberByMapId(id) {
|
||||
return request({
|
||||
url: `/api/map/${id}/memberMap`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ export function getTrainingStepList(trainingId) {
|
||||
}
|
||||
/** 修改实训所有步骤 */
|
||||
export function updateTrainingStep(group, trainingId, data) {
|
||||
console.log(group, trainingId, '*******');
|
||||
return request({
|
||||
url: `/api/v2/draft/training/${group}/${trainingId}/step/update`,
|
||||
method: 'put',
|
||||
|
@ -797,6 +797,19 @@ const map = {
|
||||
// 设置地图数据
|
||||
setMapData: (state, map) => {
|
||||
if (map && map.skinVO) {
|
||||
if (!map.memberMap) {
|
||||
map.memberMap = { METRO: [], RAILWAY: [], EMERGENCY: [] };
|
||||
} else {
|
||||
if (!map.memberMap.METRO) {
|
||||
map.memberMap.METRO = [];
|
||||
}
|
||||
if (!map.memberMap.RAILWAY) {
|
||||
map.memberMap.RAILWAY = [];
|
||||
}
|
||||
if (!map.memberMap.EMERGENCY) {
|
||||
map.memberMap.EMERGENCY = [];
|
||||
}
|
||||
}
|
||||
state.map = map;
|
||||
let showConfig = {};
|
||||
if (Vue.prototype.$jlmap && typeof Vue.prototype.$jlmap.getShowConfig === 'function') {
|
||||
@ -1136,13 +1149,6 @@ 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');
|
||||
}
|
||||
},
|
||||
|
||||
@ -1422,9 +1428,6 @@ const map = {
|
||||
},
|
||||
setPictureDeviceMap: ({ commit }, pictureDeviceMap) => {
|
||||
commit('setPictureDeviceMap', pictureDeviceMap);
|
||||
},
|
||||
deleteMember: ({ commit }, data) => {
|
||||
commit('deleteMember', data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -23,13 +23,13 @@ export function handlerUrl() {
|
||||
let OSS_URL;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 开发分支
|
||||
BASE_API = 'http://192.168.3.233/rtss-server';
|
||||
// BASE_API = 'http://192.168.3.233/rtss-server';
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -12,16 +12,19 @@
|
||||
</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-input v-model="item.name" size="mini" />
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-select v-model="item.type" placeholder="请选择" size="mini" @change="changeMemberType($event, item)">
|
||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||
<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 v-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in trainList" :key="elem.groupNumber" :label="elem.groupNumber" :value="elem.groupNumber" />
|
||||
</el-select>
|
||||
<el-select v-else v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :value="elem.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1" style="text-align: center;">
|
||||
@ -31,34 +34,66 @@
|
||||
</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>
|
||||
<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>
|
||||
<template v-for="item in memberRailwayList">
|
||||
<el-row :key="item.id">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="item.name" size="small" />
|
||||
<el-row v-for="(item, index) in memberRailwayList" :key="item.id" style="margin-bottom: 5px;">
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-input v-model="item.name" size="mini" />
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||
<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-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in trainList" :key="elem.groupNumber" :label="elem.groupNumber" :value="elem.groupNumber" />
|
||||
</el-select>
|
||||
<el-select v-else v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :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>
|
||||
</template>
|
||||
</div>
|
||||
</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>
|
||||
<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>
|
||||
<template v-for="item in memberEmergencyList">
|
||||
<el-row :key="item.id">
|
||||
<el-col :span="6">
|
||||
<el-input v-model="item.name" size="small" />
|
||||
<el-row v-for="(item, index) in memberEmergencyList" :key="item.id" style="margin-bottom: 5px;">
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-input v-model="item.name" size="mini" />
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||
<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-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in trainList" :key="elem.groupNumber" :label="elem.groupNumber" :value="elem.groupNumber" />
|
||||
</el-select>
|
||||
<el-select v-else v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :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>
|
||||
</template>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
@ -93,6 +128,20 @@
|
||||
<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="120px" class="demo-ruleForm" size="small">
|
||||
<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-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="行调:" prop="DISPATCHER">
|
||||
@ -117,9 +166,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆段调度:" prop="DEPOT_DISPATCHER">
|
||||
<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>
|
||||
@ -129,7 +178,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<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" />
|
||||
@ -141,7 +190,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<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" />
|
||||
@ -153,7 +202,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<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" />
|
||||
@ -165,19 +214,19 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<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 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-row v-if="batchForm.systemType === 'METRO'">
|
||||
<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" />
|
||||
@ -189,29 +238,15 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<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 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>
|
||||
@ -311,12 +346,22 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'memberMetroList',
|
||||
'memberRailwayList',
|
||||
'memberEmergencyList',
|
||||
'stationList',
|
||||
'trainList'
|
||||
])
|
||||
]),
|
||||
memberMetroList() {
|
||||
return this.$store.state.map.map.memberMap.METRO;
|
||||
},
|
||||
memberRailwayList() {
|
||||
return this.$store.state.map.map.memberMap.RAILWAY;
|
||||
},
|
||||
memberEmergencyList() {
|
||||
return this.$store.state.map.map.memberMap.EMERGENCY;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getMemberId(systemType) {
|
||||
@ -327,17 +372,9 @@ export default {
|
||||
}
|
||||
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);
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
memberMap[type].splice(index, 1);
|
||||
},
|
||||
batchCreate() {
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
@ -363,7 +400,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_ASSISTANT) {
|
||||
if (this.batchForm.STATION_ASSISTANT && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -372,7 +409,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_MASTER) {
|
||||
if (this.batchForm.STATION_MASTER && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -381,7 +418,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_SIGNALER) {
|
||||
if (this.batchForm.STATION_SIGNALER && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -390,7 +427,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_PASSENGER) {
|
||||
if (this.batchForm.STATION_PASSENGER && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -399,7 +436,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_SWITCH_MAN) {
|
||||
if (this.batchForm.STATION_SWITCH_MAN && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -408,7 +445,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_FACILITATOR) {
|
||||
if (this.batchForm.STATION_FACILITATOR && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -417,7 +454,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.STATION_WORKER) {
|
||||
if (this.batchForm.STATION_WORKER && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -426,7 +463,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.DEVICE_MANAGER) {
|
||||
if (this.batchForm.DEVICE_MANAGER && this.batchForm.systemType === 'RAILWAY') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -436,7 +473,7 @@ export default {
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
} else {
|
||||
if (this.batchForm.DEPOT_DISPATCHER) {
|
||||
if (this.batchForm.DEPOT_DISPATCHER && this.batchForm.systemType === 'METRO') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -445,7 +482,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
if (this.batchForm.SIGNAL_BUILDING) {
|
||||
if (this.batchForm.SIGNAL_BUILDING && this.batchForm.systemType === 'METRO') {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
@ -463,7 +500,7 @@ export default {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'DRIVER',
|
||||
deviceCode: train.code
|
||||
deviceCode: train.groupNumber
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
});
|
||||
@ -479,7 +516,7 @@ export default {
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.TRAIN_MASTER) {
|
||||
if (this.batchForm.TRAIN_MASTER && this.batchForm.systemType === 'METRO') {
|
||||
for (let i = 0; i < this.batchForm.TRAIN_MASTER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
@ -490,7 +527,7 @@ export default {
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.ELECTRIC_DISPATCHER) {
|
||||
if (this.batchForm.ELECTRIC_DISPATCHER && this.batchForm.systemType === 'METRO') {
|
||||
for (let i = 0; i < this.batchForm.ELECTRIC_DISPATCHER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
@ -501,7 +538,7 @@ export default {
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.PARENT_DEPARTMENT) {
|
||||
if (this.batchForm.PARENT_DEPARTMENT && this.batchForm.systemType === 'METRO') {
|
||||
for (let i = 0; i < this.batchForm.PARENT_DEPARTMENT; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
@ -512,7 +549,7 @@ export default {
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
if (this.batchForm.SCHEDULING) {
|
||||
if (this.batchForm.SCHEDULING && this.batchForm.systemType === 'METRO') {
|
||||
for (let i = 0; i < this.batchForm.SCHEDULING; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
@ -523,6 +560,7 @@ export default {
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
this.$message.success('批量添加成功!');
|
||||
this.resetForm();
|
||||
},
|
||||
createMember() {
|
||||
@ -534,6 +572,7 @@ export default {
|
||||
deviceCode: this.createForm.deviceCode
|
||||
};
|
||||
memberMap[this.createForm.systemType].push(member);
|
||||
this.$message.success('添加成功!');
|
||||
this.resetForm();
|
||||
},
|
||||
resetForm() {
|
||||
@ -571,6 +610,7 @@ export default {
|
||||
},
|
||||
keyGeneration() {
|
||||
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
|
||||
memberMap[this.generationForm.systemType].splice(0, memberMap[this.generationForm.systemType].length);
|
||||
const memberDispatcher = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
@ -594,7 +634,7 @@ export default {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'DRIVER',
|
||||
deviceCode: train.code
|
||||
deviceCode: train.groupNumber
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(member);
|
||||
});
|
||||
@ -714,6 +754,7 @@ export default {
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(memberScheduling);
|
||||
}
|
||||
this.$message.success('一键生成成功!');
|
||||
this.resetForm();
|
||||
}
|
||||
}
|
||||
|
@ -23,19 +23,19 @@
|
||||
<el-option label="综合演练" value="JOINT" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="ruleForm.usage === 'SINGLE_MEMBER' || ruleForm.usage === 'JOINT'" label="角色:" prop="memberType">
|
||||
<el-select v-model="ruleForm.memberType" placeholder="请选择角色">
|
||||
<el-option v-for="option in roleList" :key="option.value" :label="option.label" :value="option.value" />
|
||||
<el-form-item v-if="(ruleForm.usage === 'SINGLE_MEMBER' || ruleForm.usage === 'JOINT') && ruleForm.type === 'METRO'" label="仿真成员:" prop="memberType">
|
||||
<el-select v-model="ruleForm.memberId" placeholder="请选择仿真成员">
|
||||
<el-option v-for="option in memberMetroList" :key="option.value" :label="option.label" :value="option.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="stationRoles.includes(ruleForm.memberType)" label="车站:" prop="deviceCode">
|
||||
<el-select v-model="ruleForm.deviceCode" placeholder="请选择设备">
|
||||
<el-option v-for="option in stationList" :key="option.code" :label="option.name" :value="option.code" />
|
||||
<el-form-item v-if="(ruleForm.usage === 'SINGLE_MEMBER' || ruleForm.usage === 'JOINT') && ruleForm.type === 'RAILWAY'" label="仿真成员:" prop="memberType">
|
||||
<el-select v-model="ruleForm.memberId" placeholder="请选择仿真成员">
|
||||
<el-option v-for="option in memberRailwayList" :key="option.value" :label="option.label" :value="option.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="ruleForm.memberType === 'DRIVER'" label="列车:" prop="deviceCode">
|
||||
<el-select v-model="ruleForm.deviceCode" placeholder="请选择设备">
|
||||
<el-option v-for="option in trainList" :key="option.code" :label="option.code" :value="option.code" />
|
||||
<el-form-item v-if="(ruleForm.usage === 'SINGLE_MEMBER' || ruleForm.usage === 'JOINT') && ruleForm.type === 'EMERGENCY'" label="仿真成员:" prop="memberType">
|
||||
<el-select v-model="ruleForm.memberId" placeholder="请选择仿真成员">
|
||||
<el-option v-for="option in memberEmergencyList" :key="option.value" :label="option.label" :value="option.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="ruleForm.usage === 'SINGLE_CLIENT'" label="客户端:" prop="client">
|
||||
@ -79,7 +79,8 @@
|
||||
|
||||
<script>
|
||||
import { updateMapSystem, createMapSystem } from '@/api/trainingPlatform';
|
||||
import { getStationListNeedAttendant } from '@/api/jmap/map';
|
||||
import { querySimulationMemberByMapId, getStationListNeedAttendant } from '@/api/jmap/map';
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import ChooseTraining from './chooseTraining';
|
||||
export default {
|
||||
name: 'EditSubsystem',
|
||||
@ -91,10 +92,7 @@ export default {
|
||||
visible: false,
|
||||
title: '',
|
||||
mapSystemId: '',
|
||||
stationList: [],
|
||||
trainList: [],
|
||||
stationRoles: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
||||
'STATION_FACILITATOR', 'STATION_WORKER', 'TRAIN_MASTER'],
|
||||
memberMap: {},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入子系统名称', trigger: 'blur' }
|
||||
@ -106,32 +104,11 @@ export default {
|
||||
{ required: true, message: '请选择使用方式', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
roleList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
||||
{label: '司机', value: 'DRIVER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER'},
|
||||
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
{label: '车站站长', value: 'STATION_MASTER'},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
||||
{label: '车站客运员', value: 'STATION_PASSENGER'},
|
||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
|
||||
{label: '车站引导员', value: 'STATION_FACILITATOR'},
|
||||
{label: '车站工务工', value: 'STATION_WORKER'},
|
||||
{label: '车务段段长', value: 'TRAIN_MASTER'},
|
||||
{label: '工电调度', value: 'ELECTRIC_DISPATCHER'},
|
||||
{label: '上级部分', value: 'PARENT_DEPARTMENT'},
|
||||
{label: '派班员', value: 'SCHEDULING'},
|
||||
{label: '设备管理员', value: 'DEVICE_MANAGER'}
|
||||
],
|
||||
ruleForm: {
|
||||
name: '',
|
||||
type: '',
|
||||
usage: '',
|
||||
memberType: '',
|
||||
deviceCode: '',
|
||||
memberId: '',
|
||||
client: '',
|
||||
function: '',
|
||||
trainingId: '',
|
||||
@ -150,18 +127,36 @@ export default {
|
||||
{ label: '联锁工作站', value: 'IPC' },
|
||||
{ label: '车务终端', value: 'STPC' },
|
||||
{ label: '车务管理终端', value: 'DMP' }
|
||||
]
|
||||
],
|
||||
memberMetroList: [],
|
||||
memberRailwayList: [],
|
||||
memberEmergencyList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.stationList = [];
|
||||
getStationListNeedAttendant(this.$route.query.mapId).then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.stationList = resp.data;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取车站列表失败');
|
||||
async mounted() {
|
||||
this.memberMap = [];
|
||||
try {
|
||||
const stationResp = await getStationListNeedAttendant(this.$route.query.mapId);
|
||||
const memberResp = await querySimulationMemberByMapId(this.$route.query.mapId);
|
||||
this.memberMetroList = [];
|
||||
this.memberRailwayList = [];
|
||||
this.memberEmergencyList = [];
|
||||
memberResp.data.METRO.forEach(member => {
|
||||
const data = this.handleMember(member, stationResp.data);
|
||||
this.memberMetroList.push(data);
|
||||
});
|
||||
memberResp.data.RAILWAY.forEach(member => {
|
||||
const data = this.handleMember(member, stationResp.data);
|
||||
this.memberRailwayList.push(data);
|
||||
});
|
||||
memberResp.data.EMERGENCY.forEach(member => {
|
||||
const data = this.handleMember(member, stationResp.data);
|
||||
this.memberEmergencyList.push(data);
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
this.$message.error('初始化数据失败!');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
@ -172,18 +167,81 @@ export default {
|
||||
this.ruleForm.type = row.paramVO.type;
|
||||
this.ruleForm.usage = row.paramVO.usageInfo.usage;
|
||||
this.ruleForm.client = row.paramVO.usageInfo.param.client;
|
||||
this.ruleForm.memberType = row.paramVO.usageInfo.param.memberType;
|
||||
this.ruleForm.deviceCode = row.paramVO.usageInfo.param.deviceCode;
|
||||
this.ruleForm.memberId = row.paramVO.usageInfo.param.memberId;
|
||||
const functionList = Object.keys(row.paramVO.functionMap);
|
||||
if (functionList && functionList.length) {
|
||||
this.ruleForm.function = functionList[0];
|
||||
}
|
||||
this.title = '子系统修改';
|
||||
if (this.ruleForm.function === 'TRAINING' && row.paramVO.functionMap[this.ruleForm.function]) {
|
||||
this.ruleForm.trainingId = row.paramVO.functionMap[this.ruleForm.function].trainingId;
|
||||
getTrainingDetailNew(this.ruleForm.trainingId).then(resp => { this.ruleForm.trainingName = resp.data.name; }).catch(e=> { console.error(e); });
|
||||
}
|
||||
this.title = '修改子系统';
|
||||
} else {
|
||||
this.title = '子系统创建';
|
||||
this.title = '创建子系统';
|
||||
}
|
||||
this.visible = true;
|
||||
|
||||
},
|
||||
handleMember(member, stationList) {
|
||||
const data = { value: member.id, label: '' };
|
||||
const device = stationList.find(station => station.code === member.deviceCode) || {};
|
||||
switch (member.type) {
|
||||
case 'DISPATCHER':
|
||||
data.label = '行调' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
data.label = '行值-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DRIVER':
|
||||
data.label = '司机-' + member.deviceCode;
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
data.label = '通号' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
data.label = '调度-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SIGNAL_BUILDING':
|
||||
data.label = '信号楼-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
data.label = '助理-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_MASTER':
|
||||
data.label = '站长-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SIGNALER':
|
||||
data.label = '信号员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_PASSENGER':
|
||||
data.label = '客运员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN':
|
||||
data.label = '扳道员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_FACILITATOR':
|
||||
data.label = '引导员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_WORKER':
|
||||
data.label = '工务工-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEVICE_MANAGER':
|
||||
data.label = '设备管理员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'TRAIN_MASTER':
|
||||
data.label = '车务段段长' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
data.label = '工电调度' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'PARENT_DEPARTMENT':
|
||||
data.label = '上级部分' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SCHEDULING':
|
||||
data.label = '派班员' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
},
|
||||
close() {
|
||||
this.mapSystemId = '';
|
||||
@ -191,8 +249,7 @@ export default {
|
||||
name: '',
|
||||
type: '',
|
||||
usage: '',
|
||||
memberType: '',
|
||||
deviceCode: '',
|
||||
memberId: '',
|
||||
client: '',
|
||||
function: '',
|
||||
trainingId: '',
|
||||
@ -203,8 +260,16 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const functionMap = {};
|
||||
if (this.ruleForm.function) {
|
||||
functionMap[this.ruleForm.function] = this.ruleForm.function;
|
||||
if (this.ruleForm.function === 'TRAINING') {
|
||||
functionMap[this.ruleForm.function] = { trainingId: this.ruleForm.trainingId};
|
||||
} else if (this.ruleForm.function) {
|
||||
functionMap[this.ruleForm.function] = null;
|
||||
}
|
||||
const param = {};
|
||||
if (this.ruleForm.usage === 'SINGLE_CLIENT') {
|
||||
param.client = this.ruleForm.client;
|
||||
} else {
|
||||
param.memberId = this.ruleForm.memberId;
|
||||
}
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
@ -214,16 +279,12 @@ export default {
|
||||
type: this.ruleForm.type,
|
||||
usageInfo: {
|
||||
usage: this.ruleForm.usage,
|
||||
param: {
|
||||
client: this.ruleForm.client,
|
||||
memberType: this.ruleForm.memberType,
|
||||
deviceCode: this.ruleForm.deviceCode
|
||||
}
|
||||
param: param
|
||||
},
|
||||
functionMap: functionMap
|
||||
}
|
||||
};
|
||||
if (this.innerTitle === '创建子系统') {
|
||||
if (this.title === '创建子系统') {
|
||||
createMapSystem(data).then(resp => {
|
||||
this.visible = false;
|
||||
this.$emit('tableReload');
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<edit-subsystem ref="editSubsystem" />
|
||||
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user