diff --git a/src/api/trainingPlatform.js b/src/api/trainingPlatform.js index a28cf188b..b85653779 100644 --- a/src/api/trainingPlatform.js +++ b/src/api/trainingPlatform.js @@ -114,3 +114,11 @@ export function queryMapSystemPaged(params) { params }); } +/** 生成地图子系统 */ +export function generateMapSystemNew(mapId, data) { + return request({ + url: `/api/mapSystem/new/${mapId}/generate`, + method: 'post', + data + }); +} diff --git a/src/views/publish/publishMap/editSubsystem.vue b/src/views/publish/publishMap/editSubsystem.vue index 47d5a4b5c..b925ea6fd 100644 --- a/src/views/publish/publishMap/editSubsystem.vue +++ b/src/views/publish/publishMap/editSubsystem.vue @@ -6,7 +6,7 @@ :visible.sync="visible" center > - + @@ -131,7 +131,9 @@ export default { { label: '车务管理终端', value: 'DMP' }, { label: 'ISCS', value: 'ISCS' }, { label: 'IBP', value: 'IBP' }, - { label: 'PSL', value: 'PSL' } + { label: 'PSL', value: 'PSL' }, + { label: '运行图编制', value: 'RUN_PLAN_DESIGN' }, + { label: '列车驾驶', value: 'DRIVE' } ], memberMetroList: [], memberRailwayList: [], @@ -299,51 +301,55 @@ export default { this.$refs.ruleForm.resetFields(); }, commit() { - const functionMap = {}; - if (this.ruleForm.function === 'TRAINING') { - functionMap[this.ruleForm.function] = { trainingId: 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; - } - const data = { - mapId: this.$route.query.mapId, - name: this.ruleForm.name, - desc: this.ruleForm.desc, - paramVO: { - type: this.ruleForm.type, - initParam: initParam, - functionMap: functionMap, - domConfig: { - singleClient: this.ruleForm.singleClient, - singleMember: this.ruleForm.singleMember, - hasTraining: this.ruleForm.hasTraining + this.$refs.ruleForm.validate((valid) => { + if (valid) { + const functionMap = {}; + if (this.ruleForm.function === 'TRAINING') { + functionMap[this.ruleForm.function] = { trainingId: 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; + } + const data = { + mapId: this.$route.query.mapId, + name: this.ruleForm.name, + desc: this.ruleForm.desc, + paramVO: { + type: this.ruleForm.type, + initParam: initParam, + functionMap: functionMap, + domConfig: { + singleClient: this.ruleForm.singleClient, + singleMember: this.ruleForm.singleMember, + hasTraining: this.ruleForm.hasTraining + } + } + }; + if (this.title === '创建子系统') { + createMapSystem(data).then(resp => { + this.visible = false; + this.$emit('tableReload'); + this.$message.success('创建子系统成功!'); + this.close(); + }).catch(() => { + this.$message.error('创建子系统失败!'); + }); + } else { + data.id = this.mapSystemId; + updateMapSystem(data).then(resp => { + this.visible = false; + this.$emit('tableReload'); + this.close(); + this.$message.success('修改子系统成功!'); + }).catch(() => { + this.$message.error('修改子系统失败!'); + }); } } - }; - if (this.title === '创建子系统') { - createMapSystem(data).then(resp => { - this.visible = false; - this.$emit('tableReload'); - this.$message.success('创建子系统成功!'); - this.close(); - }).catch(() => { - this.$message.error('创建子系统失败!'); - }); - } else { - data.id = this.mapSystemId; - updateMapSystem(data).then(resp => { - this.visible = false; - this.$emit('tableReload'); - this.close(); - this.$message.success('修改子系统成功!'); - }).catch(() => { - this.$message.error('修改子系统失败!'); - }); - } + }); }, handleChoose() { this.$refs.chooseTraining.doShow(); diff --git a/src/views/publish/publishMap/subsystem.vue b/src/views/publish/publishMap/subsystem.vue index da2a87c1e..a9b6e745f 100644 --- a/src/views/publish/publishMap/subsystem.vue +++ b/src/views/publish/publishMap/subsystem.vue @@ -2,11 +2,32 @@
+ + + + + + + + + + + + 取 消 + 确 定 + +