增加一键生成仿真系统
This commit is contained in:
parent
c7f1984f92
commit
a7e21bbfae
@ -114,3 +114,11 @@ export function queryMapSystemPaged(params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 生成地图子系统 */
|
||||||
|
export function generateMapSystemNew(mapId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapSystem/new/${mapId}/generate`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
center
|
center
|
||||||
>
|
>
|
||||||
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" class="demo-ruleForm">
|
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="子系统名称:" prop="name">
|
<el-form-item label="子系统名称:" prop="name">
|
||||||
<el-input v-model="ruleForm.name" style="width: 200px;" />
|
<el-input v-model="ruleForm.name" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -131,7 +131,9 @@ export default {
|
|||||||
{ label: '车务管理终端', value: 'DMP' },
|
{ label: '车务管理终端', value: 'DMP' },
|
||||||
{ label: 'ISCS', value: 'ISCS' },
|
{ label: 'ISCS', value: 'ISCS' },
|
||||||
{ label: 'IBP', value: 'IBP' },
|
{ label: 'IBP', value: 'IBP' },
|
||||||
{ label: 'PSL', value: 'PSL' }
|
{ label: 'PSL', value: 'PSL' },
|
||||||
|
{ label: '运行图编制', value: 'RUN_PLAN_DESIGN' },
|
||||||
|
{ label: '列车驾驶', value: 'DRIVE' }
|
||||||
],
|
],
|
||||||
memberMetroList: [],
|
memberMetroList: [],
|
||||||
memberRailwayList: [],
|
memberRailwayList: [],
|
||||||
@ -299,6 +301,8 @@ export default {
|
|||||||
this.$refs.ruleForm.resetFields();
|
this.$refs.ruleForm.resetFields();
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
const functionMap = {};
|
const functionMap = {};
|
||||||
if (this.ruleForm.function === 'TRAINING') {
|
if (this.ruleForm.function === 'TRAINING') {
|
||||||
functionMap[this.ruleForm.function] = { trainingId: this.ruleForm.trainingId};
|
functionMap[this.ruleForm.function] = { trainingId: this.ruleForm.trainingId};
|
||||||
@ -344,6 +348,8 @@ export default {
|
|||||||
this.$message.error('修改子系统失败!');
|
this.$message.error('修改子系统失败!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleChoose() {
|
handleChoose() {
|
||||||
this.$refs.chooseTraining.doShow();
|
this.$refs.chooseTraining.doShow();
|
||||||
|
@ -2,11 +2,32 @@
|
|||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
|
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
|
||||||
|
<el-dialog
|
||||||
|
width="30%"
|
||||||
|
:title="title"
|
||||||
|
:before-close="doCloseGenerate"
|
||||||
|
:visible.sync="visible"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="系统:" prop="type">
|
||||||
|
<el-select v-model="form.simTypes" multiple placeholder="请选择生成仿真类型">
|
||||||
|
<el-option label="地铁CBTC" value="METRO" />
|
||||||
|
<el-option label="大铁CTC" value="RAILWAY" />
|
||||||
|
<el-option label="应急调度" value="EMERGENCY" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="doCloseGenerate">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="generateCommit">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { queryMapSystemPaged, deleteMapSystem } from '@/api/trainingPlatform';
|
import { queryMapSystemPaged, deleteMapSystem, generateMapSystemNew } 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 = {
|
||||||
@ -26,7 +47,12 @@ const clientMap = {
|
|||||||
GPC: '调度台终端',
|
GPC: '调度台终端',
|
||||||
IPC: '联锁工作站',
|
IPC: '联锁工作站',
|
||||||
STPC: '车务终端',
|
STPC: '车务终端',
|
||||||
DMP: '车务管理终端'
|
DMP: '车务管理终端',
|
||||||
|
ISCS: 'ISCS',
|
||||||
|
IBP: 'IBP',
|
||||||
|
PSL: 'PSL',
|
||||||
|
RUN_PLAN_DESIGN: '运行图编制',
|
||||||
|
DRIVE: '列车驾驶'
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'PublishMap',
|
name: 'PublishMap',
|
||||||
@ -40,6 +66,16 @@ export default {
|
|||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
|
title: '一键生成子系统',
|
||||||
|
visible: false,
|
||||||
|
rules: {
|
||||||
|
type: [
|
||||||
|
{ required: true, message: '请选择生成仿真系统类型', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
simTypes: []
|
||||||
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
reset: true,
|
reset: true,
|
||||||
@ -103,6 +139,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
|
{ text: '一键生成', handler: this.generateMapSystem },
|
||||||
{ text: '新建', handler: this.handleAddSubsystem },
|
{ text: '新建', handler: this.handleAddSubsystem },
|
||||||
{ text: '返回', handler: this.goBack }
|
{ text: '返回', handler: this.goBack }
|
||||||
]
|
]
|
||||||
@ -138,6 +175,35 @@ export default {
|
|||||||
});
|
});
|
||||||
}).catch( () => { });
|
}).catch( () => { });
|
||||||
},
|
},
|
||||||
|
generateMapSystem() {
|
||||||
|
// this.$confirm('一键生成子系统,是否继续?', '提 示', {
|
||||||
|
// confirmButtonText: '确 定',
|
||||||
|
// cancelButtonText: '取 消',
|
||||||
|
// type: 'warning'
|
||||||
|
// }).then(() => {
|
||||||
|
// generateMapSystemNew(this.$route.query.mapId).then(resp => {
|
||||||
|
// this.reloadTable();
|
||||||
|
// }).catch(error => {
|
||||||
|
// this.$message.error(`生成子系统: ${error.message}`);
|
||||||
|
// });
|
||||||
|
// }).catch( () => { });
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
doCloseGenerate() {
|
||||||
|
this.form.simTypes = [];
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
generateCommit() {
|
||||||
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
generateMapSystemNew(this.$route.query.mapId, this.form).then(resp => {
|
||||||
|
this.reloadTable();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error(`一键生成仿真系统失败: ${error.message}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
updateRow(index, row) {
|
updateRow(index, row) {
|
||||||
this.$refs.editSubsystem.doShow(row);
|
this.$refs.editSubsystem.doShow(row);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user