仿真系统创建生成调整

This commit is contained in:
fan 2022-10-19 11:04:49 +08:00
parent 0cbf642586
commit 159ff15ace
7 changed files with 32 additions and 24 deletions

View File

@ -540,7 +540,7 @@ export function queryPaTimedList(group, params) {
/** 创建仿真 */ /** 创建仿真 */
export function createSimulation(data) { export function createSimulation(data) {
return request({ return request({
url: `/simulation/new`, url: `/simulation/new/${data.mapId}`,
method: 'post', method: 'post',
data data
}); });

View File

@ -5,7 +5,7 @@
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'"/>
<menu-train ref="menuTrain" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<passive-alarm ref="passiveAlarm" /> <passive-alarm ref="passiveAlarm" />

View File

@ -5,7 +5,7 @@
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<passive-alarm ref="passiveAlarm" /> <passive-alarm ref="passiveAlarm" />

View File

@ -46,6 +46,12 @@ export default {
default() { default() {
return null; return null;
} }
},
work: {
type: Object,
default() {
return '';
}
} }
}, },
data() { data() {

View File

@ -23,14 +23,14 @@ export function handlerUrl() {
let OSS_URL; let OSS_URL;
if (process.env.NODE_ENV === 'development') { 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://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.3.90:9100'; // 周寅 // BASE_API = 'http://192.168.3.90:9100'; // 周寅
// BASE_API = 'http://192.168.3.94:9000'; // 旭强 // 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.5:9000'; // 夏增彬
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -172,15 +172,17 @@ export default {
this.ruleForm.name = row.name; this.ruleForm.name = row.name;
this.ruleForm.desc = row.desc || ''; this.ruleForm.desc = row.desc || '';
this.ruleForm.type = row.paramVO.type; this.ruleForm.type = row.paramVO.type;
this.ruleForm.client = row.paramVO.initParam.client || ''; this.ruleForm.client = row.paramVO.client || '';
this.ruleForm.memberId = row.paramVO.initParam.memberId || ''; this.ruleForm.memberId = row.paramVO.memberId || '';
this.clientChange(this.ruleForm.client); this.clientChange(this.ruleForm.client);
const functionList = Object.keys(row.paramVO.functionMap); if (row.paramVO.functionInfoMap) {
if (functionList && functionList.length) { const functionList = Object.keys(row.paramVO.functionInfoMap);
this.ruleForm.function = functionList[0]; if (functionList && functionList.length) {
this.ruleForm.function = functionList[0];
}
} }
if (this.ruleForm.function === 'TRAINING' && row.paramVO.functionMap[this.ruleForm.function]) { if (this.ruleForm.function === 'TRAINING' && row.paramVO.functionInfoMap[this.ruleForm.function]) {
this.ruleForm.trainingId = row.paramVO.functionMap[this.ruleForm.function].trainingId; this.ruleForm.trainingId = row.paramVO.functionInfoMap[this.ruleForm.function].id;
getTrainingDetailNew(this.ruleForm.trainingId).then(resp => { this.ruleForm.trainingName = resp.data.name; }).catch(e=> { console.error(e); }); getTrainingDetailNew(this.ruleForm.trainingId).then(resp => { this.ruleForm.trainingName = resp.data.name; }).catch(e=> { console.error(e); });
} }
this.title = '修改子系统'; this.title = '修改子系统';
@ -303,15 +305,13 @@ export default {
commit() { commit() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
const functionMap = {}; let functionMap = null;
if (this.ruleForm.function === 'TRAINING') { if (this.ruleForm.function === 'TRAINING') {
functionMap[this.ruleForm.function] = { trainingId: this.ruleForm.trainingId}; functionMap = {};
functionMap[this.ruleForm.function] = { function: this.ruleForm.function, id: this.ruleForm.trainingId};
} else if (this.ruleForm.function) { } else if (this.ruleForm.function) {
functionMap[this.ruleForm.function] = null; functionMap = {};
} functionMap[this.ruleForm.function] = { function: this.ruleForm.function };
const initParam = { memberId: this.ruleForm.memberId };
if (this.ruleForm.client) {
initParam.client = this.ruleForm.client;
} }
const data = { const data = {
mapId: this.$route.query.mapId, mapId: this.$route.query.mapId,
@ -319,8 +319,9 @@ export default {
desc: this.ruleForm.desc, desc: this.ruleForm.desc,
paramVO: { paramVO: {
type: this.ruleForm.type, type: this.ruleForm.type,
initParam: initParam, client: this.ruleForm.client ? this.ruleForm.client : null,
functionMap: functionMap, memberId: this.ruleForm.memberId,
functionInfoMap: functionMap,
domConfig: { domConfig: {
singleClient: this.ruleForm.singleClient, singleClient: this.ruleForm.singleClient,
singleMember: this.ruleForm.singleMember, singleMember: this.ruleForm.singleMember,

View File

@ -10,7 +10,7 @@
center center
> >
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px"> <el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px">
<el-form-item label="系统:" prop="type"> <el-form-item label="系统:" prop="simTypes">
<el-select v-model="form.simTypes" multiple placeholder="请选择生成仿真类型"> <el-select v-model="form.simTypes" multiple placeholder="请选择生成仿真类型">
<el-option label="地铁CBTC" value="METRO" /> <el-option label="地铁CBTC" value="METRO" />
<el-option label="大铁CTC" value="RAILWAY" /> <el-option label="大铁CTC" value="RAILWAY" />
@ -115,7 +115,7 @@ export default {
title: '客户端', title: '客户端',
prop: 'client', prop: 'client',
type: 'tag', type: 'tag',
columnValue: (row) => { return clientMap[row.paramVO.initParam.client]; }, columnValue: (row) => { return clientMap[row.paramVO.client]; },
tagType: () => { return ''; } tagType: () => { return ''; }
}, },
{ {
@ -198,6 +198,7 @@ export default {
if (valid) { if (valid) {
generateMapSystemNew(this.$route.query.mapId, this.form).then(resp => { generateMapSystemNew(this.$route.query.mapId, this.form).then(resp => {
this.reloadTable(); this.reloadTable();
this.doCloseGenerate();
}).catch(error => { }).catch(error => {
this.$message.error(`一键生成仿真系统失败: ${error.message}`); this.$message.error(`一键生成仿真系统失败: ${error.message}`);
}); });