desc: 地图绘制 逻辑修改

This commit is contained in:
zyy 2019-08-19 14:01:45 +08:00
parent b025c78d67
commit fd5ab1f30d
6 changed files with 29 additions and 28 deletions

View File

@ -20,6 +20,9 @@ export default {
drawMap: '绘图',
advanced: '高级',
viewLayer: '视图图层',
layerDisplay: '图层显示',
viewShows: '视图显示',
contentShows: '内容显示',
save: '保存',
updata: '更新',

View File

@ -2,20 +2,20 @@
<transition name="fade">
<div v-show="dialogTableVisible" class="dialog-box">
<div class="title">
<div class="fl-title">图层显示</div>
<div class="fl-title">{{ $t('map.layerDisplay') }}</div>
<div class="fr-title" @click="doClose">
<i class="el-icon-close" />
</div>
</div>
<el-row type="flex" justify="center">
<el-form label-width="100px" class="demo-ruleForm">
<el-form-item label="视图显示">
<el-form-item :label="$t('map.viewShows')">
<el-checkbox-group v-model="viewSelect" :min="1" @change="handleSelectView">
<el-checkbox :label="ViewMode.LOGIC">{{ $t('map.logicalView') }}</el-checkbox>
<el-checkbox :label="ViewMode.PHYSICAL">{{ $t('map.physicalView') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="内容显示">
<el-form-item :label="$t('map.contentShows')">
<el-row v-if="ViewMode.LOGIC === viewSelect[0] && viewSelect.length == 1" class="logical-view" type="flex" justify="center" style="width: 100%;">
<el-checkbox-group v-model="logicalLevelsSelect" @change="handleSelectLogicalView">
<el-checkbox v-for="view in LogicalViewTypeList" :key="view.code" :label="view.code" size="mini">

View File

@ -247,13 +247,11 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
this.display = 2;
this.handleSelectView(ViewMode.MIX);
}
});
},
lastStep() {
this.display = 1;
this.handleSelectView(ViewMode.PHYSICAL);
},
buildModel() {
this.addModel.mapRouteUnitRelList.forEach((elem, index) => {

View File

@ -228,7 +228,7 @@ export default {
{ prop: 'useType', label: this.$t('map.signalUseType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList },
{ prop: 'potLampType', label: this.$t('map.potLampType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },
{ prop: 'linkCode', label: 'LinkCode:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
{ prop: 'offset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
{ prop: 'offset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') }
]
}

View File

@ -112,7 +112,7 @@ export default {
]
},
map: {
name: '图数据',
name: '图数据',
item: [
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' },
{ prop: 'sectionACode', label: this.$t('map.sectionACode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="isNew? '新建车类型': '更新列车模型'" :visible.sync="dialogShow" width="30%" :before-close="doClose">
<el-dialog :title="isNew? $t('map.trainmodelCreate'): $t('map.trainmodelUpdate')" :visible.sync="dialogShow" width="30%" :before-close="doClose">
<el-card shadow="never">
<el-form
ref="form"
@ -10,35 +10,35 @@
style="margin: 20px 20px;"
>
<el-input v-model="formModel.code" :disabled="!isNew" type="hidden" />
<el-form-item label="列车类型名称:" prop="name">
<el-form-item :label="$t('map.trainTypeName')" prop="name">
<el-input v-model="formModel.name" :disabled="!isNew" />
</el-form-item>
<el-form-item label="列车长度:" prop="length">
<el-form-item :label="$t('map.trainLength')" prop="length">
<el-input-number v-model="formModel.length" :min="0" />
</el-form-item>
<el-form-item label="安全距离:" prop="safeDistance">
<el-form-item :label="$t('map.trainSafeDistance')" prop="safeDistance">
<el-input-number v-model="formModel.safeDistance" :min="0" />
</el-form-item>
<el-form-item label="最大安全距离:" prop="maxSafeDistance">
<el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance">
<el-input-number v-model="formModel.maxSafeDistance" :min="0" />
</el-form-item>
<el-form-item label="平均速度:" prop="averageVelocity">
<el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity">
<el-input-number v-model="formModel.averageVelocity" :min="0" />km/h
</el-form-item>
<el-form-item label="平均减速度:" prop="averageDeceleration">
<el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration">
<el-input-number v-model="formModel.averageDeceleration" :min="0" />km/h
</el-form-item>
<el-form-item label="默认速度:" prop="defaultVelocity">
<el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity">
<el-input-number v-model="formModel.defaultVelocity" :min="0" />km/h
</el-form-item>
<el-form-item label="最大速度:" prop="maxVelocity">
<el-form-item :label="$t('map.maxVelocity')" prop="maxVelocity">
<el-input-number v-model="formModel.maxVelocity" :min="0" />km/h
</el-form-item>
</el-form>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSure">{{ isNew? '创建': '更新' }}</el-button>
<el-button @click="dialogShow = false"> </el-button>
<el-button type="primary" @click="handleSure">{{ isNew? $t('map.create'): $t('map.updata') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
</span>
</el-dialog>
</template>
@ -73,31 +73,31 @@ export default {
addRules: function () {
return {
code: [
{ required: true, message: '列车模型Code不能为空', trigger: 'change' }
{ required: true, message: this.$t('rules.trainCode'), trigger: 'change' }
],
name: [
{ required: true, message: '请输入列车类型名称', trigger: 'change' }
{ required: true, message: this.$t('rules.pleaseEnterTrainTypeName'), trigger: 'change' }
],
length: [
{ required: true, message: '请输入列车长度', trigger: 'change' }
{ required: true, message: this.$t('rules.trainLength'), trigger: 'change' }
],
safeDistance: [
{ required: true, message: '请输入安全距离', trigger: 'change' }
{ required: true, message: this.$t('rules.safeDistance'), trigger: 'change' }
],
maxSafeDistance: [
{ required: true, message: '请输入最大安全距离', trigger: 'change' }
{ required: true, message: this.$t('rules.maxSafeDistance'), trigger: 'change' }
],
averageVelocity: [
{ required: true, message: '请输入平均速度', trigger: 'change' }
{ required: true, message: this.$t('rules.averageVelocity'), trigger: 'change' }
],
averageDeceleration: [
{ required: true, message: '请输入平均减速度', trigger: 'change' }
{ required: true, message: this.$t('rules.averageDeceleration'), trigger: 'change' }
],
defaultVelocity: [
{ required: true, message: '请输入默认速度', trigger: 'change' }
{ required: true, message: this.$t('rules.defaultVelocity'), trigger: 'change' }
],
maxVelocity: [
{ required: true, message: '请输入最大速度', trigger: 'change' }
{ required: true, message: this.$t('rules.maxVelocity'), trigger: 'change' }
]
};
},