diff --git a/src/views/publish/publishMap/editSubsystem.vue b/src/views/publish/publishMap/editSubsystem.vue index c8300d79d..44c51da03 100644 --- a/src/views/publish/publishMap/editSubsystem.vue +++ b/src/views/publish/publishMap/editSubsystem.vue @@ -50,23 +50,18 @@ placeholder="请输入内容" /> - - - - - - - - - - - - - - - - - + + + + + + + 取 消 @@ -92,6 +87,13 @@ export default { title: '', mapSystemId: '', memberList: [], + mapConfigData: { + singleClient: {configKey: 'singleClient', configValue: false, defaultValue: false, type: 'boolean', remark: '是否单客户端'}, + singleMember: {configKey: 'singleMember', configValue: false, defaultValue: false, type: 'boolean', remark: '是否单角色类型'}, + hasExam: {configKey: 'hasExam', configValue: false, defaultValue: false, type: 'boolean', remark: '是否含有考试'}, + hasTraining: {configKey: 'hasTraining', configValue: false, defaultValue: false, type: 'boolean', remark: '是否含有实训'}, + trainingDesign: {configKey: 'trainingDesign', configValue: false, defaultValue: false, type: 'boolean', remark: '是否含有实训设计'} + }, rules: { name: [ { required: true, message: '请输入子系统名称', trigger: 'blur' } @@ -111,10 +113,10 @@ export default { client: '', function: '', trainingId: '', - trainingName: '', - singleMember: false, - singleClient: false, - hasTraining: false + trainingName: '' + // singleMember: false, + // singleClient: false, + // hasTraining: false }, clientList: [ { label: '中心ATS工作站', value: 'C_ATS' }, @@ -174,6 +176,7 @@ export default { this.ruleForm.type = row.paramVO.type; this.ruleForm.client = row.paramVO.client || ''; this.ruleForm.memberId = row.paramVO.memberId || ''; + this.setConfigData(row.paramVO.domConfig || {}); this.clientChange(this.ruleForm.client); if (row.paramVO.functionInfoMap) { const functionList = Object.keys(row.paramVO.functionInfoMap); @@ -191,6 +194,15 @@ export default { } this.visible = true; }, + setConfigData(obj) { + Object.keys(this.mapConfigData).forEach(key => { + if (obj.hasOwnProperty(key)) { + this.mapConfigData[key].configValue = obj[key]; + } else { + this.mapConfigData[key].configValue = this.mapConfigData[key].defaultValue; + } + }); + }, typeChange(val) { if (val === 'METRO') { this.memberList = [...this.memberMetroList]; @@ -294,11 +306,12 @@ export default { client: '', function: '', trainingId: '', - trainingName: '', - singleClient: false, - singleMember: false, - hasTraining: false + trainingName: '' + // singleClient: false, + // singleMember: false, + // hasTraining: false }; + this.setConfigData({}); this.visible = false; this.$refs.ruleForm.resetFields(); }, @@ -313,6 +326,10 @@ export default { functionMap = {}; functionMap[this.ruleForm.function] = { function: this.ruleForm.function }; } + const configData = {}; + Object.values(this.mapConfigData).forEach(item => { + configData[item.configKey] = item.configValue; + }); const data = { mapId: this.$route.query.mapId, name: this.ruleForm.name, @@ -323,9 +340,10 @@ export default { memberId: this.ruleForm.memberId, functionInfoMap: functionMap, domConfig: { - singleClient: this.ruleForm.singleClient, - singleMember: this.ruleForm.singleMember, - hasTraining: this.ruleForm.hasTraining + // singleClient: this.ruleForm.singleClient, + // singleMember: this.ruleForm.singleMember, + // hasTraining: this.ruleForm.hasTraining + ...configData } } };