站台屏蔽门调整
This commit is contained in:
parent
2f639cce5e
commit
083e70dc02
@ -17,21 +17,6 @@
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
|
||||
<el-form-item label="关联站台轨:" prop="standTrackCode">
|
||||
<el-select v-model="addModel.standTrackCode" filterable>
|
||||
<el-option
|
||||
v-for="item in PhysicalSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'sectionSelectCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('sectionSelectCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联站台:" prop="standCode">
|
||||
<el-select v-model="addModel.standCode" filterable>
|
||||
<el-option
|
||||
@ -97,18 +82,15 @@ export default {
|
||||
code: '',
|
||||
name: '',
|
||||
standCode: '', // 关联站台唯一code
|
||||
standTrackCode: '', // 关联站台轨编码
|
||||
width: 60,
|
||||
height: 3,
|
||||
position: { x: 0, y: 0 },
|
||||
doorLocationType: '01' // 显示方向朝上或朝下
|
||||
position: { x: 0, y: 0 }
|
||||
},
|
||||
field: '',
|
||||
addModel: {
|
||||
standCode: '',
|
||||
width: 60,
|
||||
height: 3,
|
||||
standTrackCode: '',
|
||||
doorLocationType: '01' // 显示方向朝上或朝下
|
||||
}
|
||||
};
|
||||
@ -136,8 +118,6 @@ export default {
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'doorLocationType', label: '显示方向:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList },
|
||||
{ prop: 'standTrackCode', label: '关联区段:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList },
|
||||
{ prop: 'width', label: '屏蔽门宽度', type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'height', label: '屏蔽门高度', type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||
]
|
||||
@ -162,9 +142,6 @@ export default {
|
||||
standCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
standTrackCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
|
||||
],
|
||||
@ -185,9 +162,6 @@ export default {
|
||||
standCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
standTrackCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
doorLocationType: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
]
|
||||
@ -236,12 +210,6 @@ export default {
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionSelectCode'.toUpperCase()) {
|
||||
this.addModel.standTrackCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
@ -253,8 +221,7 @@ export default {
|
||||
name: `Psd${this.psdList.length + 1}`,
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height,
|
||||
standCode: this.addModel.standCode, // 关联站台唯一code
|
||||
standTrackCode: this.addModel.standTrackCode // 关联站台轨编码
|
||||
standCode: this.addModel.standCode // 关联站台唯一code
|
||||
};
|
||||
this.stationStandList.forEach(elem => {
|
||||
if (elem.code === this.addModel.standCode) {
|
||||
|
@ -17,23 +17,6 @@
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<config-list ref="make" :form="addForm" :form-model="addModel" :rules="createRules" />
|
||||
<!-- <el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
|
||||
<el-form-item :label="$t('map.stationstandName')" prop="stationCode">
|
||||
<el-select v-model="addModel.stationCode" filterable @change="changeStation">
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'standSelectStationCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('standSelectStationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
@ -73,6 +56,14 @@ export default {
|
||||
{ code: '01', name: '朝下' },
|
||||
{ code: '02', name: '朝上' }
|
||||
*/
|
||||
isRightList: [
|
||||
{ code: true, name: '右向'},
|
||||
{ code: false, name: '左向'}
|
||||
],
|
||||
isSmallStandList: [
|
||||
{ code: false, name: '否'},
|
||||
{ code: true, name: '是'}
|
||||
],
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
@ -83,7 +74,10 @@ export default {
|
||||
height: 0,
|
||||
stationCode: '', // 所属车站
|
||||
position: { x: 0, y: 0 },
|
||||
visible: true // 是否显示
|
||||
visible: true, // 是否显示
|
||||
isRight: null,
|
||||
standTrackCode: '',
|
||||
isSmallStand: false
|
||||
// direction: '' // 上下行方向
|
||||
},
|
||||
field: '',
|
||||
@ -97,7 +91,9 @@ export default {
|
||||
standTrackCode: '', // 关联站台轨
|
||||
standTrackUpCode: '', // 上行站台轨
|
||||
standTrackDownCode: '', // 下行站台轨
|
||||
stationstandDirection: '02' // 屏蔽门方向
|
||||
stationstandDirection: '02', // 屏蔽门方向
|
||||
isRight: null,
|
||||
isSmallStand: false
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -127,7 +123,10 @@ export default {
|
||||
] },
|
||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS, isHidden: !this.doorTypeOne },
|
||||
{ prop: 'isRight', label: '行驶方向', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
||||
{ prop: 'isSmallStand', label: '小型站台', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isSmallStandList }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
@ -163,6 +162,15 @@ export default {
|
||||
],
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
|
||||
],
|
||||
standTrackCode: [
|
||||
{ required: true, message: '请选择关联站台轨', trigger: 'change' }
|
||||
],
|
||||
isRight: [
|
||||
{ required: true, message: '请选择行驶方向', trigger: 'change'}
|
||||
],
|
||||
isSmallStand: [
|
||||
{ required: true, message: '请选择是否为小型站台', trigger: 'change'}
|
||||
]
|
||||
};
|
||||
// 清空表单验证提示信息
|
||||
@ -183,7 +191,10 @@ export default {
|
||||
{ prop: 'stationCode', label: this.$t('map.stationstandName'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'standSelectStationCode', buttonShowType: this.isButtonType },
|
||||
{ prop: 'pointY', label: 'Y 坐标:', type: 'number' },
|
||||
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS, isHidden: !this.doorTypeOne },
|
||||
{ prop: 'isRight', label: '行驶方向', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
||||
{ prop: 'isSmallStand', label: '小型站台', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isSmallStandList }
|
||||
]
|
||||
},
|
||||
door: {
|
||||
@ -193,7 +204,6 @@ export default {
|
||||
{value: '01', label: '单侧屏蔽门' },
|
||||
{value: '02', label: '双侧屏蔽门' }
|
||||
] },
|
||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS, isHidden: !this.doorTypeOne },
|
||||
{ prop: 'stationstandDirection', label: '屏蔽门朝向:', type: 'radio', radioList: this.DoorLocationTypeList, isHidden: !this.doorTypeOne },
|
||||
{ prop: 'standTrackUpCode', label: '上行站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectUpCode', buttonShowType: this.isButtonTypeU, isHidden: !this.doorTypeTwo },
|
||||
{ prop: 'standTrackDownCode', label: '下行站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectDownCode', buttonShowType: this.isButtonTypeD, isHidden: !this.doorTypeTwo }
|
||||
@ -224,6 +234,12 @@ export default {
|
||||
],
|
||||
standTrackDownCode: [
|
||||
{ required: true, message: '请选择站台轨', trigger: 'change' }
|
||||
],
|
||||
isRight: [
|
||||
{ required: true, message: '请选择行驶方向', trigger: 'change'}
|
||||
],
|
||||
isSmallStand: [
|
||||
{ required: true, message: '请选择是否为小型站台', trigger: 'change'}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -335,7 +351,10 @@ export default {
|
||||
position: {
|
||||
x: 0,
|
||||
y: this.addModel.pointY
|
||||
}
|
||||
},
|
||||
standTrackCode: this.addModel.standTrackCode,
|
||||
isRight: this.addModel.isRight,
|
||||
isSmallStand: this.addModel.isSmallStand
|
||||
};
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.code == this.addModel.stationCode) {
|
||||
@ -344,7 +363,7 @@ export default {
|
||||
}
|
||||
});
|
||||
models.push(model);
|
||||
if (this.addModel.doorType == '01') {
|
||||
if (this.addModel.doorType == '01' && !this.addModel.isSmallStand) {
|
||||
const uid = getUID('Psd', this.psdList);
|
||||
const param = {
|
||||
_type: 'Psd',
|
||||
@ -353,7 +372,6 @@ export default {
|
||||
width: this.addModel.width,
|
||||
height: 3,
|
||||
standCode: Standuid, // 关联站台唯一code
|
||||
standTrackCode: this.addModel.standTrackCode, // 关联站台轨编码
|
||||
position: {
|
||||
x: models[0].position.x,
|
||||
y: this.addModel.pointY - (this.addModel.height / 2) - space
|
||||
@ -363,7 +381,7 @@ export default {
|
||||
param.position.y = this.addModel.pointY + (this.addModel.height / 2) + space;
|
||||
}
|
||||
models.push(param);
|
||||
} else if (this.addModel.doorType == '02') {
|
||||
} else if (this.addModel.doorType == '02' && !this.addModel.isSmallStand) {
|
||||
const arr = [];
|
||||
for (let index = 0; index < 2; index++) {
|
||||
const uid = getUID('Psd', [...this.psdList, ...arr]);
|
||||
|
Loading…
Reference in New Issue
Block a user