线路功能调整

This commit is contained in:
fan 2022-10-31 14:31:34 +08:00
parent d2050dacd8
commit ce6781e1d9
6 changed files with 299 additions and 150 deletions

View File

@ -76,48 +76,48 @@ export function getSubSystemByProjectCode() {
}); });
} }
/** 创建地图系统 */ /** 创建地图系统 */
export function createMapSystem(data) { export function createMapFunction(data) {
return request({ return request({
url: `/api/mapSystem/new`, url: `/api/mapFunction`,
method: 'post', method: 'post',
data data
}); });
} }
/** 列表查询地图系统 */ /** 列表查询地图系统 */
export function queryMapSystemList(params) { export function queryMapFunctionList(params) {
return request({ return request({
url: `/api/mapSystem/new/list`, url: `/api/mapFunction/list`,
method: 'get', method: 'get',
params params
}); });
} }
/** 更新地图系统 */ /** 更新地图系统 */
export function updateMapSystem(data) { export function updateMapFunction(data) {
return request({ return request({
url: `/api/mapSystem/new/${data.id}`, url: `/api/mapFunction/${data.id}`,
method: 'post', method: 'put',
data data
}); });
} }
/** 删除地图系统 */ /** 删除地图系统 */
export function deleteMapSystem(id) { export function deleteMapFunction(id) {
return request({ return request({
url: `/api/mapSystem/new/${id}`, url: `/api/mapFunction/${id}`,
method: 'delete' method: 'delete'
}); });
} }
/** 分页查询地图系统 */ /** 分页查询地图系统 */
export function queryMapSystemPaged(params) { export function queryMapFunctionPaged(params) {
return request({ return request({
url: `/api/mapSystem/new/paged`, url: `/api/mapFunction/paged`,
method: 'get', method: 'get',
params params
}); });
} }
/** 生成地图子系统 */ /** 生成地图子系统 */
export function generateMapSystemNew(mapId, data) { export function generateMapFunctionNew(mapId, data) {
return request({ return request({
url: `/api/mapSystem/new/${mapId}/generate`, url: `/api/mapFunction/${mapId}/generate`,
method: 'post', method: 'post',
data data
}); });

View File

@ -23,13 +23,13 @@ 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:9000'; // 周寅 // BASE_API = 'http://192.168.3.90:9000'; // 周寅
// 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';

View File

@ -1,97 +1,175 @@
<template> <template>
<el-dialog <el-dialog
width="30%"
:title="title" :title="title"
:before-close="close" :before-close="close"
:visible.sync="visible" :visible.sync="visible"
center center
fullscreen
> >
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px"> <div style="padding: 0 150px">
<el-form-item label="子系统名称:" prop="name"> <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" size="small">
<el-input v-model="ruleForm.name" style="width: 200px;" /> <el-form-item label="子系统名称:" prop="name">
</el-form-item> <el-input v-model="ruleForm.name" style="width: 200px;" />
<el-form-item label="系统:" prop="type"> </el-form-item>
<el-select v-model="ruleForm.type" placeholder="请选择类型" @change="typeChange"> <el-form-item label="系统:" prop="type">
<el-option label="地铁CBTC" value="METRO" /> <el-select v-model="ruleForm.type" placeholder="请选择类型" @change="typeChange">
<el-option label="大铁CTC" value="RAILWAY" /> <el-option label="地铁CBTC" value="METRO" />
<el-option label="应急调度" value="EMERGENCY" /> <el-option label="大铁CTC" value="RAILWAY" />
</el-select> <el-option label="应急调度" value="EMERGENCY" />
</el-form-item> </el-select>
<el-form-item label="客户端:" prop="client"> </el-form-item>
<el-select v-model="ruleForm.client" clearable placeholder="请选择使用客户端" @change="clientChange"> <el-form-item label="默认扮演成员:" prop="DEFAULT_MEMBER">
<el-option v-for="option in clientList" :key="option.value" :label="option.label" :value="option.value" /> <el-checkbox v-model="ruleForm.DEFAULT_MEMBER" />
</el-select> </el-form-item>
</el-form-item> <el-form-item v-if="ruleForm.DEFAULT_MEMBER" label="仿真成员:" prop="memberId">
<el-form-item label="仿真成员:" prop="memberId"> <el-select v-model="ruleForm.memberId" placeholder="请选择仿真成员">
<el-select v-model="ruleForm.memberId" placeholder="请选择仿真成员"> <el-option v-for="option in memberList" :key="option.value" :label="option.label" :value="option.value" />
<el-option v-for="option in memberList" :key="option.value" :label="option.label" :value="option.value" /> </el-select>
</el-select> </el-form-item>
</el-form-item> <el-form-item label="大客流:" prop="LPF">
<el-form-item label="功能:" prop="function"> <el-checkbox v-model="ruleForm.LPF" />
<el-select v-model="ruleForm.function" clearable placeholder="请选择功能"> </el-form-item>
<el-option label="大客流" value="LPF" /> <el-form-item label="真实设备:" prop="REAL_DEVICE">
<el-option label="实训室" value="TRAINING_ROOM" /> <el-checkbox v-model="ruleForm.REAL_DEVICE" />
<el-option label="实训设计" value="TRAINING_DESIGN" /> </el-form-item>
<el-option label="实训" value="TRAINING" /> <el-form-item label="实训:" prop="TRAINING">
<el-option label="考试" value="EXAM" /> <el-checkbox v-model="ruleForm.TRAINING" />
</el-select> </el-form-item>
</el-form-item> <el-form-item v-if="ruleForm.TRAINING" label="实训名称:" prop="trainingName">
<el-form-item v-if="ruleForm.function === 'TRAINING'" label="实训:" prop="trainingName"> <div style="display: flex;">
<div style="display: flex;"> <div style="width: 200px;">{{ ruleForm.trainingName? ruleForm.trainingName: '-' }}</div>
<div style="width: 200px;">{{ ruleForm.trainingName? ruleForm.trainingName: '-' }}</div> <el-button style="margin-left: 10px;" type="primary" size="mini" @click="handleChoose">选择</el-button>
<el-button style="margin-left: 10px;" type="primary" size="mini" @click="handleChoose">选择</el-button> </div>
</div> </el-form-item>
</el-form-item> <el-form-item label="考试:" prop="EXAM">
<el-form-item label="描述:" prop="desc"> <el-checkbox v-model="ruleForm.EXAM" />
<el-input </el-form-item>
v-model="ruleForm.desc" <el-form-item label="试卷:" prop="examId">
type="textarea" <el-select v-model="ruleForm.examId" placeholder="请选择试卷">
:rows="2" <el-option v-for="option in examList" :key="option.id" :label="option.name" :value="option.id" />
placeholder="请输入内容" </el-select>
/> </el-form-item>
</el-form-item> <el-form-item label="描述:" prop="desc">
<el-row> <el-input
<el-col :span="8"> v-model="ruleForm.desc"
<el-form-item label="单客户端:" prop="singleClient"> type="textarea"
<el-checkbox v-model="ruleForm.singleClient" /> :rows="2"
</el-form-item> placeholder="请输入内容"
</el-col> />
<el-col :span="8"> </el-form-item>
<el-form-item label="单角色类型:" prop="singleMember"> <!-- <el-form-item label="客户端:" prop="client">-->
<el-checkbox v-model="ruleForm.singleMember" /> <!-- <el-select v-model="ruleForm.client" clearable placeholder="请选择使用客户端" @change="clientChange">-->
</el-form-item> <!-- <el-option v-for="option in clientList" :key="option.value" :label="option.label" :value="option.value" />-->
</el-col> <!-- </el-select>-->
<el-col :span="8"> <!-- </el-form-item>-->
<el-form-item label="含有实训:" prop="hasTraining"> <el-table
<el-checkbox v-model="ruleForm.hasTraining" /> :data="tableData"
</el-form-item> border
</el-col> style="width: 100%;margin-top: 10px;"
</el-row> >
</el-form> <el-table-column
<span slot="footer" class="dialog-footer"> prop="label"
<el-button @click="close"> </el-button> label="前端配置项"
<el-button type="primary" @click="commit"> </el-button> />
</span> <el-table-column
prop="value"
label="value"
>
<template slot-scope="scope">
<el-checkbox v-if="scope.row.type === 'checkbox'" v-model="scope.row.value" />
<el-select v-else-if="scope.row.type === 'select'" v-model="scope.row.value">
<el-option
v-for="item in scope.row.optionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
</el-table>
<!-- <el-form-item label="功能:" prop="function">-->
<!-- <el-select v-model="ruleForm.function" clearable placeholder="请选择功能">-->
<!-- <el-option label="大客流" value="LPF" />-->
<!-- <el-option label="实训室" value="TRAINING_ROOM" />-->
<!-- <el-option label="实训设计" value="TRAINING_DESIGN" />-->
<!-- <el-option label="实训" value="TRAINING" />-->
<!-- <el-option label="考试" value="EXAM" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="单客户端:" prop="singleClient">-->
<!-- <el-checkbox v-model="ruleForm.singleClient" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="单角色类型:" prop="singleMember">-->
<!-- <el-checkbox v-model="ruleForm.singleMember" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="含有实训:" prop="hasTraining">-->
<!-- <el-checkbox v-model="ruleForm.hasTraining" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="close"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</div>
</div>
<choose-training ref="chooseTraining" @choose="choose" /> <choose-training ref="chooseTraining" @choose="choose" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { updateMapSystem, createMapSystem } from '@/api/trainingPlatform'; import { updateMapFunction, createMapFunction } from '@/api/trainingPlatform';
import { querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map'; import { querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
import { getTrainingDetailNew } from '@/api/jmap/training'; import { getTrainingDetailNew } from '@/api/jmap/training';
import ChooseTraining from './chooseTraining'; import ChooseTraining from './chooseTraining';
export default { export default {
name: 'EditSubsystem', name: 'EditSubsystem',
components: { components: {
ChooseTraining ChooseTraining
}, },
data() { data() {
const clientList = [
{ label: '中心ATS工作站', value: 'C_ATS' },
{ label: '中心ATS大屏', value: 'C_ATS_BS' },
{ label: '中心PA系统', value: 'C_PA' },
{ label: '中心视频监控系统', value: 'C_CCTV' },
{ label: '现地ATS工作站', value: 'L_ATS' },
{ label: '本地控制工作站', value: 'LCW' },
{ label: '现地视频监控系统', value: 'L_CCTV' },
{ label: '现地PA系统', value: 'L_PA' },
{ label: '调度台终端', value: 'GPC' },
{ label: '联锁工作站', value: 'IPC' },
{ label: '车务终端', value: 'STPC' },
{ label: '车务管理终端', value: 'DMP' },
{ label: 'ISCS', value: 'ISCS' },
{ label: 'IBP', value: 'IBP' },
{ label: 'PSL', value: 'PSL' },
{ label: '运行图编制', value: 'RUN_PLAN_DESIGN' },
{ label: '列车驾驶', value: 'DRIVE' }
];
return { return {
visible: false, visible: false,
title: '', title: '',
mapSystemId: '', mapSystemId: '',
memberList: [], memberList: [],
examList: [],
tableData: [
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: clientList},
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' }
],
rules: { rules: {
name: [ name: [
{ required: true, message: '请输入子系统名称', trigger: 'blur' } { required: true, message: '请输入子系统名称', trigger: 'blur' }
@ -109,12 +187,14 @@ export default {
desc: '', desc: '',
memberId: '', memberId: '',
client: '', client: '',
function: '',
trainingId: '', trainingId: '',
trainingName: '', trainingName: '',
singleMember: false, examId: '',
singleClient: false, DEFAULT_MEMBER: false,
hasTraining: false LPF: false,
REAL_DEVICE: false,
TRAINING: false,
EXAM: false
}, },
clientList: [ clientList: [
{ label: '中心ATS工作站', value: 'C_ATS' }, { label: '中心ATS工作站', value: 'C_ATS' },
@ -172,18 +252,44 @@ 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.client || ''; this.typeChange(this.ruleForm.type);
this.ruleForm.memberId = row.paramVO.memberId || ''; // this.ruleForm.singleMember = row.paramVO.domConfig.singleMember;
this.clientChange(this.ruleForm.client); // this.ruleForm.singleClient = row.paramVO.domConfig.singleClient;
if (row.paramVO.functionInfoMap) { // this.ruleForm.hasTraining = row.paramVO.domConfig.hasTraining;
const functionList = Object.keys(row.paramVO.functionInfoMap); // this.ruleForm.hasExam = row.paramVO.domConfig.hasExam;
if (functionList && functionList.length) { // this.ruleForm.trainingDesign = row.paramVO.domConfig.trainingDesign;
this.ruleForm.function = functionList[0]; // { key: 'client', label: '', value: '', type: 'select', optionList: clientList},
this.tableData.forEach(item => {
if (item.key === 'singleMember') {
item.value = row.paramVO.domConfig.singleMember;
} else if (item.key === 'singleClient') {
item.value = row.paramVO.domConfig.singleClient;
} else if (item.key === 'client') {
item.value = row.paramVO.domConfig.client;
} else if (item.key === 'hasTraining') {
item.value = row.paramVO.domConfig.hasTraining;
} else if (item.key === 'hasExam') {
item.value = row.paramVO.domConfig.hasExam;
} else if (item.key === 'trainingDesign') {
item.value = row.paramVO.domConfig.trainingDesign;
}
});
for (const key in row.paramVO.itemMap) {
if (key === 'DEFAULT_MEMBER') {
this.ruleForm.DEFAULT_MEMBER = true;
this.ruleForm.memberId = row.paramVO.itemMap[key];
} else if (key === 'LPF') {
this.ruleForm.LPF = true;
} else if (key === 'REAL_DEVICE') {
this.ruleForm.REAL_DEVICE = true;
} else if (key === 'TRAINING') {
this.ruleForm.TRAINING = true;
this.ruleForm.trainingId = row.paramVO.itemMap[key];
getTrainingDetailNew(this.ruleForm.trainingId).then(resp => { this.ruleForm.trainingName = resp.data.name; }).catch(e=> { console.error(e); });
} else if (key === 'EXAM') {
this.ruleForm.EXAM = true;
this.ruleForm.examId = row.paramVO.itemMap[key];
} }
}
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 = '修改子系统'; this.title = '修改子系统';
} else { } else {
@ -207,22 +313,22 @@ export default {
this.memberList = [...temMemberList]; this.memberList = [...temMemberList];
} }
}, },
clientChange(val) { // clientChange(val) {
if (this.ruleForm.type === 'METRO') { // if (this.ruleForm.type === 'METRO') {
this.memberList = [...this.memberMetroList]; // this.memberList = [...this.memberMetroList];
} else if (this.ruleForm.type === 'RAILWAY') { // } else if (this.ruleForm.type === 'RAILWAY') {
this.memberList = [...this.memberRailwayList]; // this.memberList = [...this.memberRailwayList];
} else if (this.ruleForm.type === 'EMERGENCY') { // } else if (this.ruleForm.type === 'EMERGENCY') {
this.memberList = [...this.memberEmergencyList]; // this.memberList = [...this.memberEmergencyList];
} // }
if (['C_ATS', 'C_ATS_BS', 'C_PA', 'C_CCTV', 'GPC'].includes(val)) { // if (['C_ATS', 'C_ATS_BS', 'C_PA', 'C_CCTV', 'GPC'].includes(val)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'DISPATCHER'); // const temMemberList = this.memberList.filter(member => member.memberType === 'DISPATCHER');
this.memberList = [...temMemberList]; // this.memberList = [...temMemberList];
} else if (['L_ATS', 'LCW', 'L_CCTV', 'L_PA'].includes(val)) { // } else if (['L_ATS', 'LCW', 'L_CCTV', 'L_PA'].includes(val)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'STATION_SUPERVISOR'); // const temMemberList = this.memberList.filter(member => member.memberType === 'STATION_SUPERVISOR');
this.memberList = [...temMemberList]; // this.memberList = [...temMemberList];
} // }
}, // },
handleMember(member, stationList) { handleMember(member, stationList) {
const data = { value: member.id, label: '', memberType: member.type }; const data = { value: member.id, label: '', memberType: member.type };
const device = stationList.find(station => station.code === member.deviceCode) || {}; const device = stationList.find(station => station.code === member.deviceCode) || {};
@ -288,16 +394,18 @@ export default {
this.mapSystemId = ''; this.mapSystemId = '';
this.ruleForm = { this.ruleForm = {
name: '', name: '',
desc: '',
type: '', type: '',
desc: '',
memberId: '', memberId: '',
client: '', client: '',
function: '',
trainingId: '', trainingId: '',
trainingName: '', trainingName: '',
singleClient: false, examId: '',
singleMember: false, DEFAULT_MEMBER: false,
hasTraining: false LPF: false,
REAL_DEVICE: false,
TRAINING: false,
EXAM: false
}; };
this.visible = false; this.visible = false;
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
@ -305,32 +413,38 @@ export default {
commit() { commit() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
let functionMap = null; const itemMap = {};
if (this.ruleForm.function === 'TRAINING') { if (this.ruleForm.DEFAULT_MEMBER) {
functionMap = {}; itemMap.DEFAULT_MEMBER = this.ruleForm.memberId;
functionMap[this.ruleForm.function] = { function: this.ruleForm.function, id: this.ruleForm.trainingId};
} else if (this.ruleForm.function) {
functionMap = {};
functionMap[this.ruleForm.function] = { function: this.ruleForm.function };
} }
if (this.ruleForm.LPF) {
itemMap.LPF = null;
}
if (this.ruleForm.REAL_DEVICE) {
itemMap.REAL_DEVICE = null;
}
if (this.ruleForm.TRAINING) {
itemMap.TRAINING = this.ruleForm.trainingId;
}
if (this.ruleForm.EXAM) {
itemMap.EXAM = this.ruleForm.examId;
}
const domConfig = {};
this.tableData.forEach(item => {
domConfig[item.key] = item.value;
});
const data = { const data = {
mapId: this.$route.query.mapId, mapId: this.$route.query.mapId,
name: this.ruleForm.name, name: this.ruleForm.name,
desc: this.ruleForm.desc, desc: this.ruleForm.desc,
paramVO: { paramVO: {
type: this.ruleForm.type, type: this.ruleForm.type,
client: this.ruleForm.client ? this.ruleForm.client : null, itemMap:itemMap,
memberId: this.ruleForm.memberId, domConfig: domConfig
functionInfoMap: functionMap,
domConfig: {
singleClient: this.ruleForm.singleClient,
singleMember: this.ruleForm.singleMember,
hasTraining: this.ruleForm.hasTraining
}
} }
}; };
if (this.title === '创建子系统') { if (this.title === '创建子系统') {
createMapSystem(data).then(resp => { createMapFunction(data).then(resp => {
this.visible = false; this.visible = false;
this.$emit('tableReload'); this.$emit('tableReload');
this.$message.success('创建子系统成功!'); this.$message.success('创建子系统成功!');
@ -340,7 +454,7 @@ export default {
}); });
} else { } else {
data.id = this.mapSystemId; data.id = this.mapSystemId;
updateMapSystem(data).then(resp => { updateMapFunction(data).then(resp => {
this.visible = false; this.visible = false;
this.$emit('tableReload'); this.$emit('tableReload');
this.close(); this.close();
@ -364,5 +478,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.dialog-footer {
text-align: center;
}
</style> </style>

View File

@ -28,7 +28,7 @@ export default {
{ label: 'ibp数据', value: 'ibp' }, { label: 'ibp数据', value: 'ibp' },
{ label: 'iscs数据', value: 'iscs' }, { label: 'iscs数据', value: 'iscs' },
{ label: '线路配置', value: 'REAL_LINE_CONFIG'}, { label: '线路配置', value: 'REAL_LINE_CONFIG'},
{ label: '子系统数据', value: 'mapSystem' }, { label: '子系统数据', value: 'mapFunction' },
{ label: '实训数据', value: 'training' } { label: '实训数据', value: 'training' }
] ]
}; };
@ -60,7 +60,7 @@ export default {
ibp: this.checkList.includes('ibp'), ibp: this.checkList.includes('ibp'),
iscs: this.checkList.includes('iscs'), iscs: this.checkList.includes('iscs'),
realLineConfig: this.checkList.includes('REAL_LINE_CONFIG'), realLineConfig: this.checkList.includes('REAL_LINE_CONFIG'),
mapSystem: this.checkList.includes('mapSystem'), mapFunction: this.checkList.includes('mapFunction'),
training: this.checkList.includes('training') training: this.checkList.includes('training')
}; };
const res = await getPublishMapExportNew(this.row.id, data); const res = await getPublishMapExportNew(this.row.id, data);

View File

@ -27,7 +27,7 @@
</template> </template>
<script> <script>
import { queryMapSystemPaged, deleteMapSystem, generateMapSystemNew } from '@/api/trainingPlatform'; import { queryMapFunctionPaged, deleteMapFunction, generateMapFunctionNew } from '@/api/trainingPlatform';
import { getPublishMapListOnline } from '@/api/jmap/map'; import { getPublishMapListOnline } from '@/api/jmap/map';
import EditSubsystem from './editSubsystem'; import EditSubsystem from './editSubsystem';
const simTypeMap = { const simTypeMap = {
@ -111,12 +111,45 @@ export default {
columnValue: (row) => { return simTypeMap[row.simType]; }, columnValue: (row) => { return simTypeMap[row.simType]; },
tagType: () => { return 'success'; } tagType: () => { return 'success'; }
}, },
// DEFAULT_MEMBER: false,
// LPF: false,
// REAL_DEVICE: false,
// TRAINING: false,
// EXAM: false
{ {
title: '客户端', title: '默认扮演成员',
prop: 'client', prop: 'DEFAULT_MEMBER',
type: 'tag', type: 'tag',
columnValue: (row) => { return clientMap[row.paramVO.client]; }, columnValue: (row) => { return row.paramVO.itemMap.hasOwnProperty('DEFAULT_MEMBER') ? '是' : '否'; },
tagType: () => { return ''; } tagType: () => { return 'success'; }
},
{
title: '大客流',
prop: 'LPF',
type: 'tag',
columnValue: (row) => { return row.paramVO.itemMap.hasOwnProperty('LPF') ? '是' : '否'; },
tagType: () => { return 'success'; }
},
{
title: '真实设备',
prop: 'REAL_DEVICE',
type: 'tag',
columnValue: (row) => { return row.paramVO.itemMap.hasOwnProperty('REAL_DEVICE') ? '是' : '否'; },
tagType: () => { return 'success'; }
},
{
title: '加载实训',
prop: 'TRAINING',
type: 'tag',
columnValue: (row) => { return row.paramVO.itemMap.hasOwnProperty('TRAINING') ? '是' : '否'; },
tagType: () => { return 'success'; }
},
{
title: '加载试卷',
prop: 'EXAM',
type: 'tag',
columnValue: (row) => { return row.paramVO.itemMap.hasOwnProperty('EXAM') ? '是' : '否'; },
tagType: () => { return 'success'; }
}, },
{ {
title: '描述', title: '描述',
@ -160,7 +193,7 @@ export default {
methods: { methods: {
queryFunction(params) { queryFunction(params) {
params['mapId'] = this.$route.query.mapId; params['mapId'] = this.$route.query.mapId;
return queryMapSystemPaged(params); return queryMapFunctionPaged(params);
}, },
deleteRow(index, row) { deleteRow(index, row) {
this.$confirm('删除子系统,是否继续?', '提 示', { this.$confirm('删除子系统,是否继续?', '提 示', {
@ -168,7 +201,7 @@ export default {
cancelButtonText: '取 消', cancelButtonText: '取 消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
deleteMapSystem(row.id).then(resp => { deleteMapFunction(row.id).then(resp => {
this.reloadTable(); this.reloadTable();
}).catch(error => { }).catch(error => {
this.$message.error(`删除子系统: ${error.message}`); this.$message.error(`删除子系统: ${error.message}`);
@ -181,7 +214,7 @@ export default {
// cancelButtonText: ' ', // cancelButtonText: ' ',
// type: 'warning' // type: 'warning'
// }).then(() => { // }).then(() => {
// generateMapSystemNew(this.$route.query.mapId).then(resp => { // generateMapFunctionNew(this.$route.query.mapId).then(resp => {
// this.reloadTable(); // this.reloadTable();
// }).catch(error => { // }).catch(error => {
// this.$message.error(`: ${error.message}`); // this.$message.error(`: ${error.message}`);
@ -196,7 +229,7 @@ export default {
generateCommit() { generateCommit() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
generateMapSystemNew(this.$route.query.mapId, this.form).then(resp => { generateMapFunctionNew(this.$route.query.mapId, this.form).then(resp => {
this.reloadTable(); this.reloadTable();
this.doCloseGenerate(); this.doCloseGenerate();
}).catch(error => { }).catch(error => {

View File

@ -22,7 +22,7 @@
<script> <script>
import { listUserPermision } from '@/api/management/author'; import { listUserPermision } from '@/api/management/author';
import { queryMapSystemList } from '@/api/trainingPlatform'; import { queryMapFunctionList } from '@/api/trainingPlatform';
import { superAdmin, admin } from '@/router/index'; import { superAdmin, admin } from '@/router/index';
import selectRole from './selectRole/list'; import selectRole from './selectRole/list';
import LangStorage from '@/utils/lang'; import LangStorage from '@/utils/lang';
@ -149,7 +149,7 @@ export default {
this.$refs.selectRole.doShow(row.id); this.$refs.selectRole.doShow(row.id);
}, },
initMapSystem() { initMapSystem() {
queryMapSystemList({mapId: this.$route.params.mapId}).then(resp => { queryMapFunctionList({mapId: this.$route.params.mapId}).then(resp => {
this.systemList = resp.data; this.systemList = resp.data;
console.log(resp); console.log(resp);
}).catch(() => { }).catch(() => {