diff --git a/src/views/newMap/newMapdraft/mapoperate/section.vue b/src/views/newMap/newMapdraft/mapoperate/section.vue
index 1a15e8030..91ff1c1d5 100644
--- a/src/views/newMap/newMapdraft/mapoperate/section.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/section.vue
@@ -530,7 +530,6 @@ export default {
if (this.sectionList && this.sectionList.length) {
list = this.sectionList.filter(elem => { return elem.type === '01'; });
}
- list.unshift({code: '', name: '无'});
return list;
},
ReverseSectionList() {
diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue
index 93d71d1bc..498fc1f28 100644
--- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue
@@ -8,7 +8,7 @@
- {{ $t('map.updateObj') }}
+
{{ $t('map.deleteObj') }}
@@ -138,12 +138,12 @@ 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: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList },
- { prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
- { prop: 'doorLocationType', label: this.$t('map.stationstandDirection'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList },
- { prop: 'hasDoor', label: this.$t('map.stationstandHasDoor'), 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: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList, change: true, deviceChange:this.updateView },
+ { prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox', change: true, deviceChange: this.updateView},
+ { prop: 'doorLocationType', label: this.$t('map.stationstandDirection'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList, change: true, deviceChange:this.updateView },
+ { prop: 'hasDoor', label: this.$t('map.stationstandHasDoor'), type: 'checkbox', change: true, deviceChange:this.updateView },
+ { prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px', change:true, deviceChange:this.updateView},
+ { prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px', change:true, deviceChange:this.updateView}
]
},
map: {
@@ -229,6 +229,10 @@ export default {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
+ this.edit();
+ },
+ updateView() {
+ this.edit();
},
deviceSelect(selected) {
this.$refs.dataform.resetFields();
From 3d192fe44757805db7b20282ff27b8ac07b68ba5 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Mon, 2 Dec 2019 13:50:13 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=98=E5=9B=BE?=
=?UTF-8?q?=E5=8C=BA=E6=AE=B5=E5=85=B3=E8=81=94=E5=85=B3=E7=B3=BB=E6=A0=A1?=
=?UTF-8?q?=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../newMap/newMapdraft/mapoperate/section.vue | 36 ++++++++++---------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/views/newMap/newMapdraft/mapoperate/section.vue b/src/views/newMap/newMapdraft/mapoperate/section.vue
index 1a15e8030..184e69659 100644
--- a/src/views/newMap/newMapdraft/mapoperate/section.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/section.vue
@@ -224,19 +224,6 @@ export default {
}
},
data() {
- var validateLeftSection = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请选择做关联区段'));
- } else {
- const leftSection = this.$store.getters['map/getDeviceByCode'](value);
- if (leftSection.point[0] !== this.selected.point[0]) {
- callback(new Error('所选择关联区段不相邻!'));
- } else {
- callback();
- }
- }
-
- };
return {
questionList: [],
activeName: 'first',
@@ -395,9 +382,9 @@ export default {
{ prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] },
+ { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList},
{ prop: 'leftSection', label: '左关联区段', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.PhysicalSectionList},
{ prop: 'rightSection', label: '右关联区段', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.PhysicalSectionList},
- { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList},
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
{ prop: 'isStandTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1
@@ -467,6 +454,22 @@ export default {
return form;
},
rules() {
+ var validateLeftSection = (rule, value, callback) => {
+ const leftSection = this.$store.getters['map/getDeviceByCode'](value);
+ if (leftSection && (leftSection.points[1].x !== this.selected.points[0].x || leftSection.points[1].y !== this.selected.points[0].y )) {
+ callback(new Error('所选择关联区段不相邻!'));
+ } else {
+ callback();
+ }
+ };
+ var validateRightSection = (rule, value, callback) => {
+ const rightSection = this.$store.getters['map/getDeviceByCode'](value);
+ if (rightSection && (rightSection.points[0].x !== this.selected.points[1].x || rightSection.points[0].y !== this.selected.points[1].y )) {
+ callback(new Error('所选择关联区段不相邻!'));
+ } else {
+ callback();
+ }
+ };
const rules = {
code: [
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
@@ -517,10 +520,10 @@ export default {
{ required: true, message: this.$t('rules.pleaseSelectTrainDir'), trigger: 'change' }
],
leftSection: [
- { required: this.editModel.type === '01', message: '请选择左关联区段', trigger: 'change' }
+ { required: this.editModel.type === '01', validator: validateLeftSection, trigger: 'change' }
],
rightSection: [
- { required: this.editModel.type === '01', message: '请选择右关联区段', trigger: 'change'}
+ { required: this.editModel.type === '01', validator: validateRightSection, trigger: 'change'}
]
};
return rules;
@@ -530,7 +533,6 @@ export default {
if (this.sectionList && this.sectionList.length) {
list = this.sectionList.filter(elem => { return elem.type === '01'; });
}
- list.unshift({code: '', name: '无'});
return list;
},
ReverseSectionList() {
From b4bfdd55b26a47e6a85472ecf4e7d003e3e9a926 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 2 Dec 2019 13:57:25 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=AB=99=E5=8F=B0=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../newMapdraft/mapoperate/config/list.vue | 16 +++++++++++++---
.../newMapdraft/mapoperate/stationstand.vue | 10 +++++-----
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/views/newMap/newMapdraft/mapoperate/config/list.vue b/src/views/newMap/newMapdraft/mapoperate/config/list.vue
index 95a452f8e..54d61a162 100644
--- a/src/views/newMap/newMapdraft/mapoperate/config/list.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/config/list.vue
@@ -62,13 +62,18 @@