修改前端显示配置项
This commit is contained in:
parent
640f36842f
commit
1cca675506
@ -50,23 +50,18 @@
|
|||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-row>
|
<el-table :data="Object.values(mapConfigData)" style="width: 100%;" size="small" max-height="180">
|
||||||
<el-col :span="8">
|
<el-table-column prop="configKey" label="key" />
|
||||||
<el-form-item label="单客户端:" prop="singleClient">
|
<el-table-column prop="configValue" label="value">
|
||||||
<el-checkbox v-model="ruleForm.singleClient" />
|
<template slot-scope="scope">
|
||||||
</el-form-item>
|
<div v-if="scope.row.type === 'boolean'">
|
||||||
</el-col>
|
<el-radio v-model="scope.row.configValue" :label="true">是</el-radio>
|
||||||
<el-col :span="8">
|
<el-radio v-model="scope.row.configValue" :label="false">否</el-radio>
|
||||||
<el-form-item label="单角色类型:" prop="singleMember">
|
</div>
|
||||||
<el-checkbox v-model="ruleForm.singleMember" />
|
</template>
|
||||||
</el-form-item>
|
</el-table-column>
|
||||||
</el-col>
|
<el-table-column prop="remark" label="描述" />
|
||||||
<el-col :span="8">
|
</el-table>
|
||||||
<el-form-item label="含有实训:" prop="hasTraining">
|
|
||||||
<el-checkbox v-model="ruleForm.hasTraining" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="close">取 消</el-button>
|
<el-button @click="close">取 消</el-button>
|
||||||
@ -92,6 +87,13 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
mapSystemId: '',
|
mapSystemId: '',
|
||||||
memberList: [],
|
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: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入子系统名称', trigger: 'blur' }
|
{ required: true, message: '请输入子系统名称', trigger: 'blur' }
|
||||||
@ -111,10 +113,10 @@ export default {
|
|||||||
client: '',
|
client: '',
|
||||||
function: '',
|
function: '',
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
trainingName: '',
|
trainingName: ''
|
||||||
singleMember: false,
|
// singleMember: false,
|
||||||
singleClient: false,
|
// singleClient: false,
|
||||||
hasTraining: false
|
// hasTraining: false
|
||||||
},
|
},
|
||||||
clientList: [
|
clientList: [
|
||||||
{ label: '中心ATS工作站', value: 'C_ATS' },
|
{ label: '中心ATS工作站', value: 'C_ATS' },
|
||||||
@ -174,6 +176,7 @@ export default {
|
|||||||
this.ruleForm.type = row.paramVO.type;
|
this.ruleForm.type = row.paramVO.type;
|
||||||
this.ruleForm.client = row.paramVO.client || '';
|
this.ruleForm.client = row.paramVO.client || '';
|
||||||
this.ruleForm.memberId = row.paramVO.memberId || '';
|
this.ruleForm.memberId = row.paramVO.memberId || '';
|
||||||
|
this.setConfigData(row.paramVO.domConfig || {});
|
||||||
this.clientChange(this.ruleForm.client);
|
this.clientChange(this.ruleForm.client);
|
||||||
if (row.paramVO.functionInfoMap) {
|
if (row.paramVO.functionInfoMap) {
|
||||||
const functionList = Object.keys(row.paramVO.functionInfoMap);
|
const functionList = Object.keys(row.paramVO.functionInfoMap);
|
||||||
@ -191,6 +194,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.visible = true;
|
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) {
|
typeChange(val) {
|
||||||
if (val === 'METRO') {
|
if (val === 'METRO') {
|
||||||
this.memberList = [...this.memberMetroList];
|
this.memberList = [...this.memberMetroList];
|
||||||
@ -294,11 +306,12 @@ export default {
|
|||||||
client: '',
|
client: '',
|
||||||
function: '',
|
function: '',
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
trainingName: '',
|
trainingName: ''
|
||||||
singleClient: false,
|
// singleClient: false,
|
||||||
singleMember: false,
|
// singleMember: false,
|
||||||
hasTraining: false
|
// hasTraining: false
|
||||||
};
|
};
|
||||||
|
this.setConfigData({});
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$refs.ruleForm.resetFields();
|
this.$refs.ruleForm.resetFields();
|
||||||
},
|
},
|
||||||
@ -313,6 +326,10 @@ export default {
|
|||||||
functionMap = {};
|
functionMap = {};
|
||||||
functionMap[this.ruleForm.function] = { function: this.ruleForm.function };
|
functionMap[this.ruleForm.function] = { function: this.ruleForm.function };
|
||||||
}
|
}
|
||||||
|
const configData = {};
|
||||||
|
Object.values(this.mapConfigData).forEach(item => {
|
||||||
|
configData[item.configKey] = item.configValue;
|
||||||
|
});
|
||||||
const data = {
|
const data = {
|
||||||
mapId: this.$route.query.mapId,
|
mapId: this.$route.query.mapId,
|
||||||
name: this.ruleForm.name,
|
name: this.ruleForm.name,
|
||||||
@ -323,9 +340,10 @@ export default {
|
|||||||
memberId: this.ruleForm.memberId,
|
memberId: this.ruleForm.memberId,
|
||||||
functionInfoMap: functionMap,
|
functionInfoMap: functionMap,
|
||||||
domConfig: {
|
domConfig: {
|
||||||
singleClient: this.ruleForm.singleClient,
|
// singleClient: this.ruleForm.singleClient,
|
||||||
singleMember: this.ruleForm.singleMember,
|
// singleMember: this.ruleForm.singleMember,
|
||||||
hasTraining: this.ruleForm.hasTraining
|
// hasTraining: this.ruleForm.hasTraining
|
||||||
|
...configData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user