仿真系统创建生成调整
This commit is contained in:
parent
0cbf642586
commit
159ff15ace
@ -540,7 +540,7 @@ export function queryPaTimedList(group, params) {
|
||||
/** 创建仿真 */
|
||||
export function createSimulation(data) {
|
||||
return request({
|
||||
url: `/simulation/new`,
|
||||
url: `/simulation/new/${data.mapId}`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
|
@ -5,7 +5,7 @@
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :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-station ref="menuStation" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
|
@ -5,7 +5,7 @@
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :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-station ref="menuStation" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
|
@ -46,6 +46,12 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: Object,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -23,14 +23,14 @@ 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.5: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';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -172,15 +172,17 @@ export default {
|
||||
this.ruleForm.name = row.name;
|
||||
this.ruleForm.desc = row.desc || '';
|
||||
this.ruleForm.type = row.paramVO.type;
|
||||
this.ruleForm.client = row.paramVO.initParam.client || '';
|
||||
this.ruleForm.memberId = row.paramVO.initParam.memberId || '';
|
||||
this.ruleForm.client = row.paramVO.client || '';
|
||||
this.ruleForm.memberId = row.paramVO.memberId || '';
|
||||
this.clientChange(this.ruleForm.client);
|
||||
const functionList = Object.keys(row.paramVO.functionMap);
|
||||
if (row.paramVO.functionInfoMap) {
|
||||
const functionList = Object.keys(row.paramVO.functionInfoMap);
|
||||
if (functionList && functionList.length) {
|
||||
this.ruleForm.function = functionList[0];
|
||||
}
|
||||
if (this.ruleForm.function === 'TRAINING' && row.paramVO.functionMap[this.ruleForm.function]) {
|
||||
this.ruleForm.trainingId = row.paramVO.functionMap[this.ruleForm.function].trainingId;
|
||||
}
|
||||
if (this.ruleForm.function === 'TRAINING' && row.paramVO.functionInfoMap[this.ruleForm.function]) {
|
||||
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); });
|
||||
}
|
||||
this.title = '修改子系统';
|
||||
@ -303,15 +305,13 @@ export default {
|
||||
commit() {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
const functionMap = {};
|
||||
let functionMap = null;
|
||||
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) {
|
||||
functionMap[this.ruleForm.function] = null;
|
||||
}
|
||||
const initParam = { memberId: this.ruleForm.memberId };
|
||||
if (this.ruleForm.client) {
|
||||
initParam.client = this.ruleForm.client;
|
||||
functionMap = {};
|
||||
functionMap[this.ruleForm.function] = { function: this.ruleForm.function };
|
||||
}
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
@ -319,8 +319,9 @@ export default {
|
||||
desc: this.ruleForm.desc,
|
||||
paramVO: {
|
||||
type: this.ruleForm.type,
|
||||
initParam: initParam,
|
||||
functionMap: functionMap,
|
||||
client: this.ruleForm.client ? this.ruleForm.client : null,
|
||||
memberId: this.ruleForm.memberId,
|
||||
functionInfoMap: functionMap,
|
||||
domConfig: {
|
||||
singleClient: this.ruleForm.singleClient,
|
||||
singleMember: this.ruleForm.singleMember,
|
||||
|
@ -10,7 +10,7 @@
|
||||
center
|
||||
>
|
||||
<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-option label="地铁CBTC" value="METRO" />
|
||||
<el-option label="大铁CTC" value="RAILWAY" />
|
||||
@ -115,7 +115,7 @@ export default {
|
||||
title: '客户端',
|
||||
prop: 'client',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return clientMap[row.paramVO.initParam.client]; },
|
||||
columnValue: (row) => { return clientMap[row.paramVO.client]; },
|
||||
tagType: () => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -198,6 +198,7 @@ export default {
|
||||
if (valid) {
|
||||
generateMapSystemNew(this.$route.query.mapId, this.form).then(resp => {
|
||||
this.reloadTable();
|
||||
this.doCloseGenerate();
|
||||
}).catch(error => {
|
||||
this.$message.error(`一键生成仿真系统失败: ${error.message}`);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user