+
@@ -65,9 +65,20 @@ export default {
}
};
-
diff --git a/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/detail.vue b/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/detail.vue
index f5d59f18f..914c1c13a 100644
--- a/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/detail.vue
+++ b/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/detail.vue
@@ -80,18 +80,18 @@ export default {
selectCheckShow: false,
indexShow: true,
columns: [
- {
- title: this.$t('map.routeID'),
- prop: 'code'
- },
+ // {
+ // title: this.$t('map.routeID'),
+ // prop: 'code'
+ // },
{
title: this.$t('map.pathName'),
prop: 'name'
},
- {
- title: this.$t('map.pathUnitMapName'),
- prop: 'mapId'
- },
+ // {
+ // title: this.$t('map.pathUnitMapName'),
+ // prop: 'mapId'
+ // },
{
title: this.$t('map.routeStationName'),
prop: 'stationCode'
diff --git a/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/route.vue b/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/route.vue
index a986bc867..e0da5d7d1 100644
--- a/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/route.vue
+++ b/src/views/map/mapdraft/mapedit/dataRelation/routeoperate/route.vue
@@ -37,6 +37,20 @@
/>
+
+
+
+
+ {{ $t('map.activate') }}
+
{{ $t('map.activate') }}
-
{{ $t('map.activate') }}
-
-
-
-
- {{ $t('map.activate') }}
-
-
-
-
-
-
-
-
- {{ $t('map.activate') }}
- {{ $t('map.add') }}
-
-
-
-
-
-
-
- {{ swictchName(scope.row.switchCode) }}
-
-
-
-
-
-
- {{ $t('map.remove') }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('map.activate') }}
- {{ $t('map.add') }}
-
-
-
-
-
-
-
- {{ swictchName(scope.row.switchCode) }}
-
-
-
-
-
-
- {{ $t('map.remove') }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('map.activate') }}
-
激活
-
-
-
-
- 激活
-
激活
添加
-
+
{{ swictchName(scope.row.switchCode) }}
-
+
+
+
+
+
+ 激活
+
+
+
+
+
+ {{ $t('map.activate') }}
+ {{ $t('map.add') }}
+
+
+
+
+
+
+
+ {{ swictchName(scope.row.switchCode) }}
+
+
+
+
+
+
+ {{ $t('map.remove') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('map.activate') }}
+
+
+
+
+
+ {{ $t('map.activate') }}
+ {{ $t('map.add') }}
+
+
+
+
+
+
+
+ {{ swictchName(scope.row.switchCode) }}
+
+
+
+
+
+
+ {{ $t('map.remove') }}
+
+
+
+
+
{{ $t('map.save') }}
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/ImageControl.vue b/src/views/map/mapdraft/mapedit/mapoperate/ImageControl.vue
index ee3607179..2c807a904 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/ImageControl.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/ImageControl.vue
@@ -111,7 +111,7 @@ export default {
]),
dataForm() {
const form = {
- labelWidth: '150px',
+ labelWidth: '130px',
items: {
code: {
name: '',
@@ -126,7 +126,7 @@ export default {
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },
{ prop: 'zIndex', label: this.$t('map.imageZindex'), type: 'number', min: 0 },
{ prop: 'rotate', label: this.$t('map.rotateAngle'), type: 'number', min: 0 },
- { prop: 'position', label: this.$t('map.imagePoint'), type: 'coordinate', width: '140px', children: [
+ { prop: 'position', label: this.$t('map.imagePoint'), type: 'coordinate', width: '120px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }
@@ -206,8 +206,6 @@ export default {
y: selected.position.y
};
this.activeName = 'first';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/config/data.vue b/src/views/map/mapdraft/mapedit/mapoperate/config/data.vue
index 8db820036..263a90896 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/config/data.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/config/data.vue
@@ -194,7 +194,11 @@ export default {
} else if (label == 'label') {
return option.label;
} else if (label == 'name&&code') {
- return option.name + ' (' + option.code+ ')';
+ if (option.code) {
+ return option.name + ' (' + option.code+ ')';
+ } else {
+ return option.name;
+ }
} else if (label == 'code&&name') {
return option.code + ' (' + option.name+ ')';
} else {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/config/list.vue b/src/views/map/mapdraft/mapedit/mapoperate/config/list.vue
index a451becb0..905fbb351 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/config/list.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/config/list.vue
@@ -209,7 +209,11 @@ export default {
} else if (label == 'label') {
return option.label;
} else if (label == 'name&&code') {
- return option.name + ' (' + option.code+ ')';
+ if (option.code) {
+ return option.name + ' (' + option.code+ ')';
+ } else {
+ return option.name;
+ }
} else if (label == 'code&&name') {
return option.code + ' (' + option.name+ ')';
} else {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/counter.vue b/src/views/map/mapdraft/mapedit/mapoperate/counter.vue
index caaa61374..edb3ddb91 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/counter.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/counter.vue
@@ -150,8 +150,10 @@ export default {
{ prop: 'name', label: this.$t('map.counterName'), type: 'input' },
{ prop: 'type', label: this.$t('map.counterType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.typeList },
{ prop: 'max', label: this.$t('map.countMax'), type: 'number', min: 0, placeholder: '个' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.pointX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.pointY'), type: 'number', placeholder: 'px' }
+ { prop: 'position', label: this.$t('map.counterPosition'), type: 'coordinate', width: '110px', children: [
+ { 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' }
+ ] }
]
},
map: {
@@ -200,8 +202,6 @@ export default {
} else if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue b/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue
index 36052f204..4e48272bb 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue
@@ -132,8 +132,10 @@ export default {
{ prop: 'unlockTime', label: this.$t('map.delayTime'), type: 'number', min: 0, max: 1000, placeholder: 's' },
{ prop: 'fontFamily', label: this.$t('map.font'), type: 'font' },
{ prop: 'textFontColor', label: this.$t('map.color'), type: 'color' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.pointX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.pointY'), type: 'number', placeholder: 'px' }
+ { prop: 'position', label: this.$t('map.delayUnlockPosition'), type: 'coordinate', width: '110px', children: [
+ { 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' }
+ ] }
]
},
map: {
@@ -182,8 +184,6 @@ export default {
} else if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
this.$refs.form.clearValidate();
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/lcControl.vue b/src/views/map/mapdraft/mapedit/mapoperate/lcControl.vue
index b586aabf8..3a6b2d88a 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/lcControl.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/lcControl.vue
@@ -185,8 +185,6 @@ export default {
y: selected.position.y
};
this.activeName = 'first';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/limitControl.vue b/src/views/map/mapdraft/mapedit/mapoperate/limitControl.vue
index ed47eee2a..f9ce8a704 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/limitControl.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/limitControl.vue
@@ -176,8 +176,6 @@ export default {
y: selected.position.y
};
this.activeName = 'first';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/line.vue b/src/views/map/mapdraft/mapedit/mapoperate/line.vue
index 3df2e2ea8..afd3d5805 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/line.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/line.vue
@@ -208,8 +208,6 @@ export default {
} else if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.addModel.stationName = selected.name;
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
addPoint(index) {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/link.vue b/src/views/map/mapdraft/mapedit/mapoperate/link.vue
index ddd902dc3..b85af0706 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/link.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/link.vue
@@ -170,20 +170,19 @@ export default {
item: [
{ prop: 'code', label: this.$t('map.linkCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.linkName'), type: 'input' },
- { prop: 'lengthShow', label: this.$t('map.linkDisplayLength'), type: 'number', min: 50, placeholder: 'px' },
- { prop: 'color', label: this.$t('map.linkColor'), type: 'color' },
- { prop: 'leftFdCode', label: this.$t('map.linkLeftFdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
- { prop: 'leftSdCode', label: this.$t('map.linkLeftSdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
- { prop: 'rightFdCode', label: this.$t('map.linkRightFdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
- { prop: 'rightSdCode', label: this.$t('map.linkRightSdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
- { prop: 'lp', label: this.$t('map.linkLp'), type: 'coordinate', width: '160px', children: [
+ { prop: 'lp', label: this.$t('map.linkLp'), type: 'coordinate', width: '119px', children: [
{ prop: 'lp.x', firstLevel: 'lp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },
{ prop: 'lp.y', firstLevel: 'lp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: false }
] },
- { prop: 'rp', label: this.$t('map.linkRp'), type: 'coordinate', width: '160px', children: [
+ { prop: 'rp', label: this.$t('map.linkRp'), type: 'coordinate', width: '119px', children: [
{ prop: 'rp.x', firstLevel: 'rp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },
{ prop: 'rp.y', firstLevel: 'rp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: false }
- ] }
+ ] },
+ { prop: 'color', label: this.$t('map.linkColor'), type: 'color' },
+ { prop: 'leftFdCode', label: this.$t('map.linkLeftFdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists },
+ { prop: 'leftSdCode', label: this.$t('map.linkLeftSdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists },
+ { prop: 'rightFdCode', label: this.$t('map.linkRightFdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists },
+ { prop: 'rightSdCode', label: this.$t('map.linkRightSdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists }
]
},
map: {
@@ -279,6 +278,10 @@ export default {
this.activeName = 'first';
this.$refs.dataform.clearValidate();
});
+ },
+ linkList(value) {
+ this.linkLists = JSON.parse(JSON.stringify(this.linkList));
+ this.linkLists.unshift({code: '', name: '无'});
}
},
mounted() {
@@ -301,10 +304,10 @@ export default {
this.editModel.lengthShow = Math.sqrt(Math.pow(selected.rp.x - selected.lp.x, 2) + Math.pow(selected.rp.y - selected.lp.y, 2));
this.editModel.lengthFact = selected.lengthFact;
this.editModel.color = selected.color;
- this.editModel.leftFdCode = selected.leftFdCode;
- this.editModel.leftSdCode = selected.leftSdCode;
- this.editModel.rightFdCode = selected.rightFdCode;
- this.editModel.rightSdCode = selected.rightSdCode;
+ this.editModel.leftFdCode = selected.leftFdCode || '';
+ this.editModel.leftSdCode = selected.leftSdCode || '';
+ this.editModel.rightFdCode = selected.rightFdCode || '';
+ this.editModel.rightSdCode = selected.rightSdCode || '';
this.editModel.lp = {
x: selected.lp.x,
y: selected.lp.y
@@ -314,8 +317,6 @@ export default {
y: selected.rp.y
};
this.activeName = 'first';
- } else {
- this.activeName = 'second';
}
});
},
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/section.vue b/src/views/map/mapdraft/mapedit/mapoperate/section.vue
index 70bf04a71..8032277b2 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/section.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/section.vue
@@ -136,30 +136,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('map.updateObj') }}
-
-
-
@@ -235,13 +211,14 @@ export default {
offsetLeft: 0,
sepTypeRight: '',
offsetRight: 0,
- trainPosType: '',
+ trainPosType: '01',
+ // pointY: '',
parentCode: '',
points: [],
isCurve: false
},
editRuleModel: {
- trainType: '01',
+ // trainType: '01',
pointY: 0
},
tableData: [],
@@ -304,15 +281,13 @@ export default {
item: [
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
- { prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
{ prop: 'namePoint', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
- { prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
- { prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
+ { prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
+ { prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] },
- { prop: 'nameShow', label: this.$t('map.displayExtentName'), type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'axleShow', label: this.$t('map.displayAxleCounter'), type: 'checkbox', disabled: this.isStationAxleShow, isHidden: !this.isSectionType},
- { prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'logicSectionNameShow', label: this.$t('map.displayLogicalWxtentNames'), type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSectionType },
+ { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList, disabled: true },
+ { prop: 'linkCode', label: this.$t('map.relevanceLinkCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, disabled: true, isHidden: !this.isSectionType },
+ { 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.isSectionType },
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
{ prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
@@ -342,11 +317,12 @@ export default {
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
{ prop: 'isSwitchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', isHidden: !this.isSectionType },
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode },
+ { prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'logicSectionNameShow', label: this.$t('map.displayLogicalWxtentNames'), type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSectionType },
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
{value: true, label: this.$t('map.fromSmallToLarge')},
{value: false, label: this.$t('map.fromLargeToSmall')}
] },
- { prop: 'linkCode', label: this.$t('map.relevanceLinkCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, disabled: true, isHidden: !this.isSectionType },
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
{ prop: 'isSegmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSectionType },
@@ -364,10 +340,9 @@ export default {
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
{ prop: 'offsetLeft', label: this.$t('map.sectionOffsetLeft'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
{ prop: 'offsetRight', label: this.$t('map.sectionOffsetRight'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
- { prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
+ { prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0 },
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0 },
- { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList },
{ prop: 'trainPosType', label: this.$t('map.trainDirection'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.TrainPositionTypeList, isHidden: !this.isSectionType }
]
}
@@ -424,6 +399,9 @@ export default {
],
sepTypeRight: [
{ required: true, message: this.$t('rules.sectionSepTypeRight'), trigger: 'change' }
+ ],
+ relSwitchCode: [
+ { required: true, message: this.$t('rules.sectionRelSwitchCode'), trigger: 'change' }
]
};
return rules;
@@ -460,6 +438,7 @@ export default {
// 判断显隐
isParentCode() {
+ // true 显示 false 隐藏
return this.editModel.type == '02' || this.editModel.relSwitchCode;
},
isStationCodeDisabled() {
@@ -510,6 +489,12 @@ export default {
},
pointDisabledName() {
return this.editModel.type == '02';
+ },
+ sectionColonShow() {
+ if (this.$store.state.map.map) {
+ return this.$store.state.map.map.skinVO.code == '03';
+ }
+ return false;
}
},
watch: {
@@ -639,7 +624,7 @@ export default {
this.computedLogicSectionNumList(this.editModel.logicSectionNum);
// 激活选择Section
- this.activeName = 'three';
+ // this.activeName = 'three';
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
this.addModel.code = selected.code;
} else if (this.field.toUpperCase() === 'leftSection'.toUpperCase()) {
@@ -650,7 +635,7 @@ export default {
this.activeName = 'first';
}
} else {
- this.activeName = 'second';
+ // this.activeName = 'second';
this.tableData = [];
}
}
@@ -766,16 +751,6 @@ export default {
this.$emit('addOrUpdateMapModel', models);
this.$emit('delMapModel', remove);
},
- editSectionTrain() {
- const data = [];
- this.sectionList.forEach(ele => {
- if (ele.points[0].y == this.editRuleModel.pointY && ele.points[ele.points.length - 1].y == this.editRuleModel.pointY) {
- ele.trainPosType = this.editRuleModel.trainType;
- data.push(ele);
- }
- });
- this.$emit('addOrUpdateMapModel', data);
- },
addPoint(index) {
const data = { x: 0, y: 0 };
this.editModel.points.splice(index + 1, 0, data);
@@ -977,6 +952,10 @@ export default {
section.trainPosType = model.trainPosType;
edits.push(section);
}
+ // if (section.points[0].y == this.editModel.pointY && section.points[section.points.length - 1].y == this.editModel.pointY) {
+ // section.trainPosType = this.editModel.trainPosType;
+ // edits.push(section);
+ // }
});
edits.push(model);
this.fieldS = '';
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/signal.vue b/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
index 80ccdf43e..6dc58bad8 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
@@ -219,22 +219,30 @@ export default {
item: [
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
- { prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
+ { prop: 'position', label: this.$t('map.signalPosition'), type: 'coordinate', width: '140px', children: [
+ { 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: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
{ prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
{ prop: 'positionType', label: this.$t('map.signalPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPositionTypeList },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.signalPositionX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.signalPositionY'), type: 'number', placeholder: 'px' },
{ prop: 'rotate', label: this.$t('map.rotateAngle'), type: 'number', min: -90, max: 90, placeholder: this.$t('tip.angle') },
- { prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: this.$t('map.signalNamePositionX'), type: 'number', placeholder: 'px' },
- { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'x', label: this.$t('map.signalNamePositionY'), type: 'number', placeholder: 'px' },
+ { prop: 'namePosition', label: this.$t('map.signalNamePosition'), type: 'coordinate', width: '140px', children: [
+ { 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: 'buttonShow', label: this.$t('map.signalButtonShow'), type: 'checkbox' },
- { prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: this.$t('map.signalButtonPositionX'), type: 'number', placeholder: 'px' },
- { prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'x', label: this.$t('map.signalButtonPositionY'), type: 'number', placeholder: 'px' },
+ { prop: 'buttonPosition', label: this.$t('map.signalButtonPosition'), type: 'coordinate', width: '140px', children: [
+ { prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
+ { prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
+ ] },
{ prop: 'guideShow', label: this.$t('map.signalGuideShow'), type: 'checkbox' },
- { prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: this.$t('map.signalGuidePositionX'), type: 'number', placeholder: 'px' },
- { prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'x', label: this.$t('map.signalGuidePositionY'), type: 'number', placeholder: 'px' }
+ { prop: 'guidePosition', label: this.$t('map.signalGuidePosition'), type: 'coordinate', width: '140px', children: [
+ { prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
+ { prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
+ ] }
]
},
map: {
@@ -244,7 +252,7 @@ export default {
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
{ 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: 'linkCode', label: this.$t('map.signalLinkCode')+':', 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') }
]
@@ -267,9 +275,6 @@ export default {
offset: [
{ required: true, message: this.$t('rules.pleaseEnterSignalOffset'), trigger: 'blur' }
],
- stationCode: [
- { required: true, message: this.$t('rules.pleaseEnterSignalStation'), trigger: 'change' }
- ],
'position.x': [
{ required: true, message: this.$t('rules.pleaseEnterSignalPositionX'), trigger: 'blur' }
],
@@ -395,8 +400,6 @@ export default {
this.addModel.sectionCode = selected.code;
}
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
hover(field) {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/station.vue b/src/views/map/mapdraft/mapedit/mapoperate/station.vue
index d065f8470..2b8631965 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/station.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/station.vue
@@ -103,7 +103,7 @@ export default {
]),
form() {
const form = {
- labelWidth: '150px',
+ labelWidth: '130px',
items: {
code: {
name: '',
@@ -114,16 +114,18 @@ export default {
item: [
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.stationName'), type: 'input' },
- { prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
+ { prop: 'position', label: this.$t('map.stationPosition'), type: 'coordinate', width: '120px', children: [
+ { 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: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
- { prop: 'kmPostShow', label: this.$t('map.stationKmPostShow'), type: 'checkbox' },
+ // { prop: 'kmPostShow', label: this.$t('map.stationKmPostShow'), type: 'checkbox' },
{ prop: 'kmRange', label: this.$t('map.stationKmRange'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
{ prop: 'kmPost', label: this.$t('map.stationKmPost'), type: 'input' },
{ prop: 'kmPostFont', label: this.$t('map.stationKmPostFont'), type: 'font', placeholder: this.$t('tip.kilometerFont') },
- { prop: 'kmPostFontColor', label: this.$t('map.stationKmPostFontColor'), type: 'color' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.stationPositionX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.stationPositionY'), type: 'number', placeholder: 'px' }
+ { prop: 'kmPostFontColor', label: this.$t('map.stationKmPostFontColor'), type: 'color' }
]
},
map: {
@@ -227,8 +229,6 @@ export default {
this.addModel.sectionCode = selected.code;
}
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
index e99479825..ca94969f2 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
@@ -109,8 +109,10 @@ export default {
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.pointX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.pointY'), type: 'number', placeholder: 'px' }
+ { prop: 'position', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '150px', children: [
+ { 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' }
+ ] }
]
},
map: {
@@ -200,8 +202,6 @@ export default {
} else if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/stationstand.vue b/src/views/map/mapdraft/mapedit/mapoperate/stationstand.vue
index 460f8019b..f04c25400 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/stationstand.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/stationstand.vue
@@ -134,16 +134,18 @@ export default {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
- { prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', disabled: true },
+ { prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input' },
+ { prop: 'position', label: this.$t('map.stationstandPosition'), type: 'coordinate', width: '120px', children: [
+ { 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: 'nameShow', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
+ // { prop: 'nameShow', label: this.$t('map.stationstandShowName'), 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: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.pointX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.pointY'), type: 'number', placeholder: 'px' }
+ { prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }
]
},
map: {
@@ -261,8 +263,6 @@ export default {
} else if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/switch.vue b/src/views/map/mapdraft/mapedit/mapoperate/switch.vue
index e786d61aa..7164b8b70 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/switch.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/switch.vue
@@ -110,12 +110,15 @@ export default {
item: [
{ prop: 'code', label: this.$t('map.switchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.switchName'), type: 'input' },
- { prop: 'nameShow', label: this.$t('map.switchShowName'), type: 'checkbox' },
- { prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: this.$t('map.switchPositionX'), type: 'number', placeholder: 'px' },
- { prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: this.$t('map.switchPositionY'), type: 'number', placeholder: 'px' },
- // { prop: 'timeoutShow', label: this.$t('map.timeoutShow'), type: 'checkbox' },
- { prop: 'tp.x', firstLevel: 'tp', secondLevel: 'x', label: this.$t('map.switchTpX'), type: 'number', placeholder: 'px' },
- { prop: 'tp.y', firstLevel: 'tp', secondLevel: 'y', label: this.$t('map.switchTpY'), type: 'number', placeholder: 'px' }
+ // { prop: 'nameShow', label: this.$t('map.switchShowName'), type: 'checkbox' },
+ { prop: 'namePoint', label: this.$t('map.switchPosition'), type: 'coordinate', width: '160px', children: [
+ { prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
+ { prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
+ ] },
+ { prop: 'tp', label: this.$t('map.switchTp'), type: 'coordinate', width: '160px', children: [
+ { prop: 'tp.x', firstLevel: 'tp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
+ { prop: 'tp.y', firstLevel: 'tp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
+ ] }
]
},
map: {
@@ -146,9 +149,6 @@ export default {
'namePoint.y': [
{ required: true, message: this.$t('rules.switchNamePointY'), trigger: 'blur' }
],
- stationCode: [
- { required: true, message: this.$t('rules.switchStationCode'), trigger: 'change' }
- ],
turnTime: [
{ required: true, message: this.$t('rules.switchTurnTime'), trigger: 'blur' }
],
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/text.vue b/src/views/map/mapdraft/mapedit/mapoperate/text.vue
index 4095a6318..826216d77 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/text.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/text.vue
@@ -23,12 +23,25 @@
-
- px
-
-
- px
-
+
+ {{ $t('map.textPoints') }}
+
+
+
+
+
+
+
@@ -137,8 +150,10 @@ export default {
{ prop: 'content', label: this.$t('map.textContent'), type: 'fontContent', content: 'content', prepend: 'prepend', placeholder: this.$t('map.pleaseSelect') },
{ prop: 'font', label: this.$t('map.textFont'), type: 'font', placeholder: this.$t('map.font') },
{ prop: 'fontColor', label: this.$t('map.textFontColor'), type: 'color' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.pointX'), type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.pointY'), type: 'number', placeholder: 'px' }
+ { prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
+ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
+ { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
+ ] }
]
},
map: {
@@ -182,8 +197,6 @@ export default {
this.activeName = 'first';
} else if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.activeName = 'second';
- } else {
- this.activeName = 'second';
}
},
create() {
@@ -253,6 +266,25 @@ export default {
background: #f0f0f0;
overflow: hidden;
}
+ .coordinate {
+ overflow: hidden;
+
+ .title {
+ text-align: right;
+ font-size: 14px;
+ color: #606266;
+ line-height: 40px;
+ padding: 0 12px 0 0;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ line-height: 28px;
+ width: 120px;
+ font-weight: bold;
+ display: block;
+ float: left;
+ margin-right: 7px;
+ }
+ }
/deep/ {
.el-select .el-input {
width: 130px;
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue b/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue
index 8ce94cb62..15c37e308 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/train/create.vue
@@ -64,7 +64,8 @@ export default {
},
groupNumber: '',
modelCode: ''
- }
+ },
+ errorTip: this.$t('tip.selectValidInterval')
};
},
computed: {
@@ -79,7 +80,7 @@ export default {
range.end >= range.beg) {
callback();
} else {
- callback(new Error(this.$t('tip.selectValidInterval')));
+ callback(new Error(this.errorTip));
}
},
trigger: 'blur'
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/train/index.vue b/src/views/map/mapdraft/mapedit/mapoperate/train/index.vue
index 9b56a11c1..369809086 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/train/index.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/train/index.vue
@@ -87,7 +87,7 @@ export default {
this.deviceSelect(val);
},
$route() {
- this.activeName = 'first';
+ // this.activeName = 'first';
}
},
methods: {
@@ -100,9 +100,9 @@ export default {
this.editModel.code = selected.code;
this.editModel.modelCode = selected.modelCode;
this.editModel.groupNumber = selected.groupNumber;
- this.activeName = 'first';
+ // this.activeName = 'first';
} else {
- this.activeName = 'second';
+ // this.activeName = 'second';
}
},
create(list) {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/trainwindow.vue b/src/views/map/mapdraft/mapedit/mapoperate/trainwindow.vue
index cb527afb1..d4963519b 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/trainwindow.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/trainwindow.vue
@@ -142,8 +142,10 @@ export default {
{ prop: 'code', label: this.$t('map.trainWindowCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.trainWindowList, change: true, deviceChange: this.deviceChange },
{ prop: 'width', label: this.$t('map.trainWindowWidth'), type: 'number', min: 0, placeholder: 'px' },
{ prop: 'height', label: this.$t('map.trainWindowHeight'), type: 'number', min: 0, placeholder: 'px' },
- { prop: 'point.x', firstLevel: 'point', secondLevel: 'x', label: this.$t('map.pointX'), type: 'number', placeholder: 'px' },
- { prop: 'point.y', firstLevel: 'point', secondLevel: 'y', label: this.$t('map.pointY'), type: 'number', placeholder: 'px' }
+ { prop: 'point', label: this.$t('map.trainWindowPoints'), type: 'coordinate', width: '110px', children: [
+ { prop: 'point.x', firstLevel: 'point', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },
+ { prop: 'point.y', firstLevel: 'point', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: false }
+ ] }
]
},
map: {
@@ -191,8 +193,6 @@ export default {
y: selected.point.y
};
this.activeName = 'first';
- } else {
- this.activeName = 'second';
}
},
createModel(opts) {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/zcControl.vue b/src/views/map/mapdraft/mapedit/mapoperate/zcControl.vue
index 972222fd3..7a393a489 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/zcControl.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/zcControl.vue
@@ -184,8 +184,6 @@ export default {
y: selected.position.y
};
this.activeName = 'first';
- } else {
- this.activeName = 'second';
}
},
create() {
diff --git a/src/views/map/mapdraft/mapmanage/edit.vue b/src/views/map/mapdraft/mapmanage/edit.vue
index 48f95533a..e2074cbf6 100644
--- a/src/views/map/mapdraft/mapmanage/edit.vue
+++ b/src/views/map/mapdraft/mapmanage/edit.vue
@@ -11,9 +11,6 @@
size="mini"
@submit.native.prevent
>
-
-
-
-
+
+
+
+
@@ -49,7 +49,6 @@
-
@@ -95,7 +94,7 @@ export default {
editModel: {
id: '',
name: '',
- skinCode: '',
+ skinCode: '01',
cityCode: ''
},
updtModel: {
diff --git a/src/views/map/mapdraft/mapmanage/publish.vue b/src/views/map/mapdraft/mapmanage/publish.vue
index 0a3ae51e0..5fb276909 100644
--- a/src/views/map/mapdraft/mapmanage/publish.vue
+++ b/src/views/map/mapdraft/mapmanage/publish.vue
@@ -44,7 +44,7 @@ export default {
editModel: {
id: '',
name: '',
- cityCode: ''
+ cityCode: '000000'
}
};
},
From 0fe2f1a043d5f61be4a772c13a438898107e3f0a Mon Sep 17 00:00:00 2001
From: ival <610568032@qq.com>
Date: Fri, 23 Aug 2019 13:44:43 +0800
Subject: [PATCH 43/64] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E5=AD=97=E5=85=B8=E9=A6=96=E5=AD=97=E6=AF=8D=E5=A4=A7=E5=86=99?=
=?UTF-8?q?=E5=AF=BC=E8=87=B4select=E9=80=89=E9=A1=B9=E4=B8=8D=E5=87=BA?=
=?UTF-8?q?=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/package/draft/editRule.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/views/package/draft/editRule.vue b/src/views/package/draft/editRule.vue
index 77f3947b1..3b00b835e 100644
--- a/src/views/package/draft/editRule.vue
+++ b/src/views/package/draft/editRule.vue
@@ -66,8 +66,8 @@ export default {
const form = {
labelWidth: '120px',
items: [
- { prop: 'permissionType', label: this.$t('permission.permissionType'), type: 'select', required: false, disabled: !this.isAdd, options: this.PermissionTypeList, change: true, onChange: this.permissionTypeChange },
- { prop: 'mapId', label: this.$t('permission.mapName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMap, options: this.PublishMapList, change: true, onChange: this.mapChange },
+ { prop: 'permissionType', label: this.$t('permission.permissionType'), type: 'select', required: false, disabled: !this.isAdd, options: this.permissionTypeList, change: true, onChange: this.permissionTypeChange },
+ { prop: 'mapId', label: this.$t('permission.mapName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMap, options: this.publishMapList, change: true, onChange: this.mapChange },
{ prop: 'mapProductCode', label: this.$t('permission.mapProductName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMapProduct, options: this.mapProductList, change: true, onChange: this.mapProductChange },
{ prop: 'lessonId', label: this.$t('permission.lessonName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
{ prop: 'roleName', label: this.$t('permission.belonger'), type: 'complete', required: false, disabled: !this.isAdd, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
@@ -208,7 +208,7 @@ export default {
},
mapProductChange(mapProductCode) {
this.formModel.lessonId = '';
- this.filterPublisLessonList = this.PublisLessonList.filter(elem => { return elem.mapId == this.formModel.mapId && elem.prdCode == this.formModel.mapProductCode; });
+ this.filterPublisLessonList = this.publisLessonList.filter(elem => { return elem.mapId == this.formModel.mapId && elem.prdCode == this.formModel.mapProductCode; });
},
// 搜索查询input
async querySearchAsync(queryString, cb) {
From 2250bc970dda5a90abbec0eb844c4cc11eb01767 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Fri, 23 Aug 2019 14:24:30 +0800
Subject: [PATCH 44/64] =?UTF-8?q?desc:=20=E4=BF=AE=E6=94=B9=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E6=98=BE=E7=A4=BA=E6=94=BE=E5=88=B0=E7=9A=AE=E8=82=A4?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmap/config/skinCode/bejing_01.js | 7 +-
src/jmap/config/skinCode/chengdu_03.js | 15 +++-
src/jmap/config/skinCode/chengdu_04.js | 13 ++-
src/jmap/config/skinCode/fuzhou_01.js | 11 +++
src/jmap/map.js | 8 +-
src/jmap/painter.js | 34 +++++---
src/jmap/shape/Section/index.js | 88 +++++++++++---------
src/jmap/shape/Signal/EMouse.js | 2 +-
src/jmap/shape/Signal/index.js | 2 +-
src/jmap/shape/Station/index.js | 2 +-
src/jmap/shape/StationControl/index.js | 24 +++---
src/jmap/shape/StationStand/index.js | 2 +-
src/jmap/shape/Switch/index.js | 4 +-
src/views/demonstration/deomonList/index.vue | 2 +-
src/views/demonstration/detail/index.vue | 20 ++---
src/views/demonstration/list/demonList.vue | 2 +-
src/views/display/index.vue | 6 +-
src/views/jointTraining/index.vue | 9 +-
src/views/jointTraining/menuDemon.vue | 4 +-
src/views/trainRoom/index.vue | 24 +++---
20 files changed, 166 insertions(+), 113 deletions(-)
diff --git a/src/jmap/config/skinCode/bejing_01.js b/src/jmap/config/skinCode/bejing_01.js
index aa7be1736..d7433e709 100644
--- a/src/jmap/config/skinCode/bejing_01.js
+++ b/src/jmap/config/skinCode/bejing_01.js
@@ -27,7 +27,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: { // 逻辑区段名称
- show: true, // 逻辑区段名称显示
+ show: false, // 逻辑区段名称显示
position: -1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -138,6 +138,7 @@ class SkinCode extends defaultStyle {
standardWidth: 1.5 // 灯柱宽度
},
text: {
+ show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: false, // 信号字体对其方式
@@ -303,12 +304,16 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Station] = {
+ text: {
+ show: true // 公里标名称显示
+ },
kilometerPosition: 'down', // 公里标位置
fontWeight: 'bold' // 文字错细
};
this[deviceType.Switch] = {
text: {
+ show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: -15, y: -10}, // 道岔名称与区段距离
fontSize: 10, // 字体大小
diff --git a/src/jmap/config/skinCode/chengdu_03.js b/src/jmap/config/skinCode/chengdu_03.js
index bb6a557c4..fc928d348 100644
--- a/src/jmap/config/skinCode/chengdu_03.js
+++ b/src/jmap/config/skinCode/chengdu_03.js
@@ -16,6 +16,7 @@ class SkinCode extends defaultStyle {
routeColor: true // 进路触发颜色
},
text: {
+ show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 12, // 字体大小
@@ -26,6 +27,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: {
+ show: false, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -36,6 +38,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: {
+ show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 24, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -46,6 +49,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: {
+ show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -56,6 +60,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: {
+ show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -66,6 +71,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: {
+ show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
@@ -135,6 +141,7 @@ class SkinCode extends defaultStyle {
standardWidth: 2 // 灯柱宽度
},
text: {
+ show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: false, // 信号字体对其方式
@@ -293,13 +300,17 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Station] = {
+ text: {
+ show: true // 公里标名称显示
+ },
kilometerPosition: 'up' // 公里标朝向
};
this[deviceType.Switch] = {
text: {
- position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
- offset: {x: 5, y: -10}, // 道岔名称与区段距离
+ show: true, // 道岔名称显示
+ position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
+ offset: {x: 5, y: -10}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#fff', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
diff --git a/src/jmap/config/skinCode/chengdu_04.js b/src/jmap/config/skinCode/chengdu_04.js
index c1fda0199..3123902d8 100644
--- a/src/jmap/config/skinCode/chengdu_04.js
+++ b/src/jmap/config/skinCode/chengdu_04.js
@@ -16,6 +16,7 @@ class SkinCode extends defaultStyle {
routeColor: false // 进路触发颜色
},
text: {
+ show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 12, // 字体大小
@@ -25,7 +26,8 @@ class SkinCode extends defaultStyle {
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
- logicText: { // 逻辑区段名称
+ logicText: { // 逻辑区段名称
+ show: false, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -36,6 +38,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: { // 站台
+ show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 24, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -46,6 +49,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: { // 折返
+ show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -56,6 +60,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: { // 转换轨
+ show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -66,6 +71,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: { // 目的地
+ show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
@@ -132,6 +138,7 @@ class SkinCode extends defaultStyle {
standardWidth: 2 // 灯柱宽度
},
text: {
+ show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: false, // 信号字体对其方式
@@ -290,11 +297,15 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Station] = {
+ text: {
+ show: true // 公里标名称显示
+ },
kilometerPosition: 'up' // 公里标朝向
};
this[deviceType.Switch] = {
text: {
+ show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 5, y: -10}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
diff --git a/src/jmap/config/skinCode/fuzhou_01.js b/src/jmap/config/skinCode/fuzhou_01.js
index 76a712c84..6d576f3c8 100644
--- a/src/jmap/config/skinCode/fuzhou_01.js
+++ b/src/jmap/config/skinCode/fuzhou_01.js
@@ -16,6 +16,7 @@ class SkinCode extends defaultStyle {
routeColor: false // 进路触发颜色
},
text: {
+ show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 18, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -26,6 +27,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: {
+ show: true, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 6, // 文字离区段距离
fontSize: 8, // 字体大小
@@ -36,6 +38,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: {
+ show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -46,6 +49,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: {
+ show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -56,6 +60,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: {
+ show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 28, // 文字离区段距离
fontSize: 11, // 字体大小
@@ -66,6 +71,7 @@ class SkinCode extends defaultStyle {
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: {
+ show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
@@ -125,6 +131,7 @@ class SkinCode extends defaultStyle {
standardWidth: 2 // 灯珠宽度
},
text: {
+ show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: true, // 信号字体对其方式
@@ -272,11 +279,15 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Station] = {
+ text: {
+ show: true // 公里标名称显示
+ },
kilometerPosition: 'up' // 公里标朝向
};
this[deviceType.Switch] = {
text: {
+ show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 0, y: 8}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
diff --git a/src/jmap/map.js b/src/jmap/map.js
index fc7f7d66b..7ae9e4a77 100644
--- a/src/jmap/map.js
+++ b/src/jmap/map.js
@@ -80,10 +80,10 @@ class Jlmap {
// 保存皮肤类型
if (map.skinVO) {
this.skinCode = map.skinVO.code;
- this.$options.scaleRate = map.skinVO.scaling;
- this.$options.offsetX = map.skinVO.origin.x;
- this.$options.offsetY = map.skinVO.origin.y;
- this.$painter.updateTransform({ scaleRate: map.skinVO.scaling, offsetX: map.skinVO.origin.x, offsetY: map.skinVO.origin.y });
+ this.$options.scaleRate = map.skinVO.scaling || 1;
+ this.$options.offsetX = map.skinVO.origin ? map.skinVO.origin.x : 0;
+ this.$options.offsetY = map.skinVO.origin ? map.skinVO.origin.y : 0;
+ this.$painter.updateTransform({ scaleRate: this.$options.scaleRate, offsetX: this.$options.offsetX, offsetY: this.$options.offsetY });
}
// 保存原始数据
diff --git a/src/jmap/painter.js b/src/jmap/painter.js
index e299bd411..442e53db1 100644
--- a/src/jmap/painter.js
+++ b/src/jmap/painter.js
@@ -67,11 +67,15 @@ class Painter {
* @param {*} device
*/
add(device) {
- const instance = shapefactory(device, this.$jmap);
- if (instance) {
- device.instance = instance;
- this.$transformHandle.transformView(instance);
- this.mapInstanceLevel[device._type].add(instance);
+ try {
+ const instance = shapefactory(device, this.$jmap);
+ if (instance) {
+ device.instance = instance;
+ this.$transformHandle.transformView(instance);
+ this.mapInstanceLevel[device._type].add(instance);
+ }
+ } catch (err) {
+ console.error(err);
}
}
@@ -136,15 +140,19 @@ class Painter {
*/
update(device) {
if (device) {
- if (device._dispose) {
- this.delete(device);
- } else if (deviceType.Train == device._type) {
- this.updateTrain(device);
- } else {
- const instance = device.instance;
- if (instance) {
- instance.setState(device);
+ try {
+ if (device._dispose) {
+ this.delete(device);
+ } else if (deviceType.Train == device._type) {
+ this.updateTrain(device);
+ } else {
+ const instance = device.instance;
+ if (instance) {
+ instance.setState(device);
+ }
}
+ } catch (err) {
+ console.error(err);
}
}
}
diff --git a/src/jmap/shape/Section/index.js b/src/jmap/shape/Section/index.js
index c6ba1f7f8..40235857d 100644
--- a/src/jmap/shape/Section/index.js
+++ b/src/jmap/shape/Section/index.js
@@ -228,8 +228,8 @@ export default class Section extends Group {
const y = Math.min(model.points[0].y, model.points[model.points.length - 1].y) + Math.abs(model.points[model.points.length - 1].y - model.points[0].y) / 2;
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
const drict = model.trainPosType != '01' ? 1 : -1;
- /** 区段名称*/
- if (model.nameShow) {
+ /** 区段名称 (逻辑区段名称 或 物理区段名称 是否显示)*/
+ if (style.Section.logicText.show || style.Section.text.show) {
let tempx = x;
let tempy = y;
// 创建区段名称
@@ -238,23 +238,26 @@ export default class Section extends Group {
const opposite = style.Section.logicText.opposite ? -1: 1;
tempx += traingle.getSin(style.Section.logicText.distance);
tempy += traingle.getCos(style.Section.logicText.distance) * (style.Section.logicText.position || opposite * drict);
- this.name = new ETextName({
- zlevel: this.zlevel,
- z: this.z + 2,
- style: this.style,
- silent: false,
- x: tempx + model.namePosition.x,
- y: tempy + model.namePosition.y,
- fontWeight: style.Section.logicText.fontWeight,
- fontSize: style.Section.logicText.fontSize,
- fontFamily: style.fontFamily,
- text: model.name,
- textFill: style.Section.logicText.fontColor,
- textAlign: style.Section.logicText.textAlign,
- textPosition: style.Section.logicText.textPosition,
- textVerticalAlign: style.Section.logicText.textVerticalAlign
- });
- } else {
+ if (style.Section.logicText.show) {
+ this.name = new ETextName({
+ zlevel: this.zlevel,
+ z: this.z + 2,
+ style: this.style,
+ silent: false,
+ x: tempx + model.namePosition.x,
+ y: tempy + model.namePosition.y,
+ fontWeight: style.Section.logicText.fontWeight,
+ fontSize: style.Section.logicText.fontSize,
+ fontFamily: style.fontFamily,
+ text: model.name,
+ textFill: style.Section.logicText.fontColor,
+ textAlign: style.Section.logicText.textAlign,
+ textPosition: style.Section.logicText.textPosition,
+ textVerticalAlign: style.Section.logicText.textVerticalAlign
+ });
+ this.add(this.name);
+ }
+ } else if (style.Section.text.show && !model.isSwitchSection) {
const opposite = style.Section.text.opposite ? -1: 1;
tempx += traingle.getSin(style.Section.text.distance);
tempy += traingle.getCos(style.Section.text.distance) * (style.Section.text.position || opposite * drict);
@@ -274,30 +277,33 @@ export default class Section extends Group {
textPosition: style.Section.text.textPosition,
textVerticalAlign: style.Section.text.textVerticalAlign
});
+ this.add(this.name);
}
} else {
- this.name = new ETextName({
- zlevel: this.zlevel,
- z: this.z + 2,
- style: this.style,
- silent: false,
- x: tempx + model.namePosition.x,
- y: tempy + model.namePosition.y + style.Section.text.distance * drict,
- fontWeight: style.Section.text.fontWeight,
- fontSize: style.Section.text.fontSize,
- fontFamily: style.fontFamily,
- text: model.name,
- textFill: style.Section.text.fontColor,
- textAlign: style.Section.text.textAlign,
- textPosition: style.Section.text.textPosition,
- textVerticalAlign: style.Section.text.textVerticalAlign
- });
+ if (style.Section.text.show) {
+ this.name = new ETextName({
+ zlevel: this.zlevel,
+ z: this.z + 2,
+ style: this.style,
+ silent: false,
+ x: tempx + model.namePosition.x,
+ y: tempy + model.namePosition.y + style.Section.text.distance * drict,
+ fontWeight: style.Section.text.fontWeight,
+ fontSize: style.Section.text.fontSize,
+ fontFamily: style.fontFamily,
+ text: model.name,
+ textFill: style.Section.text.fontColor,
+ textAlign: style.Section.text.textAlign,
+ textPosition: style.Section.text.textPosition,
+ textVerticalAlign: style.Section.text.textVerticalAlign
+ });
+ this.add(this.name);
+ }
}
- this.add(this.name);
}
/** 站台轨名称*/
- if (model.isStandTrack && model.standTrackNameShow) {
+ if (model.isStandTrack && model.standTrackNameShow && style.Section.standText.show) {
const opposite = style.Section.standText.opposite ? -1: 1;
const tempx = x + traingle.getSin(style.Section.standText.distance);
const tempy = y + traingle.getCos(style.Section.standText.distance) * (style.Section.standText.position || opposite * drict);
@@ -320,7 +326,7 @@ export default class Section extends Group {
}
/** 折返轨名称*/
- if (model.isReentryTrack && model.reentryTrackNameShow) {
+ if (model.isReentryTrack && model.reentryTrackNameShow && style.Section.reentryText.show) {
const opposite = style.Section.reentryText.opposite ? -1: 1;
const tempx = x + traingle.getSin(style.Section.reentryText.distance);
const tempy = y + traingle.getCos(style.Section.reentryText.distance) * (style.Section.reentryText.position || opposite * drict);
@@ -343,7 +349,7 @@ export default class Section extends Group {
}
/** 转换轨名称*/
- if (model.isTransferTrack && model.transferTrackNameShow) {
+ if (model.isTransferTrack && model.transferTrackNameShow && style.Section.transferText.show) {
const opposite = style.Section.transferText.opposite ? -1: 1;
const tempx = x + traingle.getSin(style.Section.transferText.distance);
const tempy = y + traingle.getCos(style.Section.transferText.distance) * (style.Section.transferText.position || opposite * drict);
@@ -366,7 +372,7 @@ export default class Section extends Group {
}
/** 目的码名称*/
- if (model.destinationCode && model.destinationCodeShow) {
+ if (model.destinationCode && model.destinationCodeShow && style.Section.destinationText.show) {
const opposite = style.Section.destinationText.opposite ? -1: 1;
const tempx = x + traingle.getSin(style.Section.destinationText.distance);
const tempy = y + traingle.getCos(style.Section.destinationText.distance) * (style.Section.destinationText.position || opposite * drict);
@@ -731,7 +737,7 @@ export default class Section extends Group {
/** 设置状态*/
setState(model) {
this.recover();
- if (model.status == '01') {
+ if (model.status == '01' || model.status == '00' || model.status == undefined) {
if (this.name && this.style.Section.active.routeColor) {
this.name.setStyle({textFill: this.style.Section.text.fontColor});
}
diff --git a/src/jmap/shape/Signal/EMouse.js b/src/jmap/shape/Signal/EMouse.js
index dbc9c924e..1b7ef9e6a 100644
--- a/src/jmap/shape/Signal/EMouse.js
+++ b/src/jmap/shape/Signal/EMouse.js
@@ -47,7 +47,7 @@ export default class EMouse extends Group {
this.device.lamps.forEach(elem => {
elem.setBorderColor(this.style.Signal.mouseOverStyle.lampBorderLineColor);
});
- this.device.sigName.setColor(this.style.backgroundColor);
+ this.device.sigName && this.device.sigName.setColor(this.style.backgroundColor);
}
mouseout(e) {
diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js
index 9ab5ff302..e0efe7c5b 100644
--- a/src/jmap/shape/Signal/index.js
+++ b/src/jmap/shape/Signal/index.js
@@ -150,7 +150,7 @@ class Signal extends Group {
this.add(this.sigPost);
this.lamps.forEach(lamp => { this.add(lamp); });
- this.model.nameShow ? this.add(this.sigName) : null;
+ this.style.Signal.text.show ? this.add(this.sigName) : null;
this.add(this.sigAuto);
this.add(this.sigRoute);
this.add(this.sigDelay);
diff --git a/src/jmap/shape/Station/index.js b/src/jmap/shape/Station/index.js
index a25fab0d5..cfd8c5562 100644
--- a/src/jmap/shape/Station/index.js
+++ b/src/jmap/shape/Station/index.js
@@ -21,7 +21,7 @@ export default class Station extends Group {
const model = this.model;
const style = this.style;
- if (model.visible) {
+ if (style.Station.text.show) {
this.stationText = new ETextName({
zlevel: this.zlevel,
z: this.z,
diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js
index b84702861..aced10c05 100644
--- a/src/jmap/shape/StationControl/index.js
+++ b/src/jmap/shape/StationControl/index.js
@@ -113,24 +113,24 @@ export default class StationControl extends Group {
setState(model) {
switch (model.status) {
case '00': // 无状态
- this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
- this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
- this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
break;
case '01': // 中控
- this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
- this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
- this.centerControl.setColor(this.style.StationControl.lamp.greenColor);
+ this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.greenColor);
break;
case '02': // 站控
- this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
- this.substationControl.setColor(this.style.StationControl.lamp.yellowColor);
- this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.yellowColor);
+ this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
break;
case '03': // 紧急站控
- this.emergencyControl.setColor(this.style.StationControl.lamp.redColor);
- this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
- this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.redColor);
+ this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
+ this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
break;
}
}
diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js
index f8e15a6ed..732860278 100644
--- a/src/jmap/shape/StationStand/index.js
+++ b/src/jmap/shape/StationStand/index.js
@@ -196,7 +196,7 @@ class StationStand extends Group {
/** 空闲*/
spare() {
- this.safeStand.setColor(this.style.StationStand.stand.spareColor);
+ this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.spareColor);
}
/** 列车停站*/
diff --git a/src/jmap/shape/Switch/index.js b/src/jmap/shape/Switch/index.js
index 34786f860..503d61400 100644
--- a/src/jmap/shape/Switch/index.js
+++ b/src/jmap/shape/Switch/index.js
@@ -135,7 +135,7 @@ export default class Switch extends Group {
nameTextY: nameTextY,
sectionName: model.sectionName,
name: model.name,
- nameShow: model.nameShow,
+ nameShow: style.Switch.text.show,
triangle: this.triangle
});
@@ -188,7 +188,7 @@ export default class Switch extends Group {
/** 设置岔芯颜色*/
setSwitchCoreColor(color) {
- this.swCore.setColor(color);
+ this.swCore && this.swCore.setColor(color);
}
/** 设置道岔文字颜色*/
diff --git a/src/views/demonstration/deomonList/index.vue b/src/views/demonstration/deomonList/index.vue
index 9b94b9fa2..b8b5fd3b7 100644
--- a/src/views/demonstration/deomonList/index.vue
+++ b/src/views/demonstration/deomonList/index.vue
@@ -110,7 +110,7 @@ export default {
launchFullscreen();
await putJointTrainingSimulationEntrance(this.group);
const rest = await getPublishMapInfo(this.mapId);
- const query = { skinStyle: rest.data.skinStyle, mapId: this.mapId, group: this.group };
+ const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group };
this.$router.push({ path: `/jointTraining`, query: query });
} else if (this.state == '01') {
const query = { group: this.group };
diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue
index adc95b882..10b24ee54 100644
--- a/src/views/demonstration/detail/index.vue
+++ b/src/views/demonstration/detail/index.vue
@@ -2,7 +2,7 @@
{{ $t('demonstration.simulationName') + courseModel.name }}
- {{$t('demonstration.noSimulationProducts')}}
+ {{ $t('demonstration.noSimulationProducts') }}
- {{$t('demonstration.productDescription')}}
+ {{ $t('demonstration.productDescription') }}
{{ courseModel.remarks }}
- {{$t('global.permissionList')}}
+ {{ $t('global.permissionList') }}
- {{$t('global.buy')}}
- {{$t('global.distributePermission')}}
- {{$t('global.transferQRCode')}}
- {{$t('demonstration.startSimulation')}}
- {{$t('demonstration.createRoom')}}
- {{$t('demonstration.enterRoom')}}
+ {{ $t('global.buy') }}
+ {{ $t('global.distributePermission') }}
+ {{ $t('global.transferQRCode') }}
+ {{ $t('demonstration.startSimulation') }}
+ {{ $t('demonstration.createRoom') }}
+ {{ $t('demonstration.enterRoom') }}
@@ -279,7 +279,7 @@ export default {
launchFullscreen();
}).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
- this.buttonLoading = false;
+ this.buttonLoading = false;
});
},
buy() {
diff --git a/src/views/demonstration/list/demonList.vue b/src/views/demonstration/list/demonList.vue
index 6f93274f2..d554427b5 100644
--- a/src/views/demonstration/list/demonList.vue
+++ b/src/views/demonstration/list/demonList.vue
@@ -1,7 +1,7 @@
- {{$t('global.mapList')}}
+ {{ $t('global.mapList') }}
diff --git a/src/views/display/index.vue b/src/views/display/index.vue
index 6f468b7d5..163787bfb 100644
--- a/src/views/display/index.vue
+++ b/src/views/display/index.vue
@@ -158,15 +158,15 @@ export default {
trainingId() {
return this.$route.query.trainingId;
},
- skinCode() {
- return this.$route.query.skinCode;
- },
mapId() {
return this.$route.query.mapId;
},
prdType() {
return this.$route.query.prdType;
},
+ skinCode() {
+ return this.$route.query.skinCode;
+ },
isLesson() {
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
},
diff --git a/src/views/jointTraining/index.vue b/src/views/jointTraining/index.vue
index 621935079..32873365d 100644
--- a/src/views/jointTraining/index.vue
+++ b/src/views/jointTraining/index.vue
@@ -72,6 +72,7 @@ export default {
userRole: '',
group: '',
mapId: '',
+ skinCode: '',
simulationShow: false,
drivingShow: false
};
@@ -90,10 +91,7 @@ export default {
]),
...mapGetters('config', [
'canvasId'
- ]),
- skinCode() {
- return this.$route.query.skinCode;
- }
+ ])
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
@@ -135,6 +133,7 @@ export default {
async created() {
this.group = this.$route.query.group;
this.mapId = this.$route.query.mapId;
+ this.skinCode = this.$route.query.skinCode;
},
async mounted() {
await this.initLoadData();
@@ -283,6 +282,8 @@ export default {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
+ console.log(this.skinCode);
+
if (this.skinCode) {
// 01 现地 02 行调 '' 观众
const resp = await this.getUserRole();
diff --git a/src/views/jointTraining/menuDemon.vue b/src/views/jointTraining/menuDemon.vue
index 2a1b65e0e..b17b0dcc7 100644
--- a/src/views/jointTraining/menuDemon.vue
+++ b/src/views/jointTraining/menuDemon.vue
@@ -122,13 +122,13 @@ export default {
this.setPosition();
},
'$store.state.map.map.stationList': function (val) { // 执行一次 以后不会有变化
- if (val.length) {
+ if (val && val.length) {
this.stationList = val;
this.stationLists = val;
}
},
'$store.state.socket.roleInfo': function (val) {
- if (val.length) {
+ if (val && val.length) {
this.addrolesList(val);
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
diff --git a/src/views/trainRoom/index.vue b/src/views/trainRoom/index.vue
index 459539f36..f4357bcd6 100644
--- a/src/views/trainRoom/index.vue
+++ b/src/views/trainRoom/index.vue
@@ -132,8 +132,8 @@
v-if="userId == roomInfo.creatorId"
type="primary"
style="float: right;"
- @click="start"
:loading="loading"
+ @click="start"
>
开始仿真
@@ -141,16 +141,16 @@
进入仿真
结束仿真
@@ -158,8 +158,8 @@
v-if="userId == roomInfo.creatorId"
type=""
style="float: right; margin-right: 0px;"
- @click="postCode"
:loading="loading"
+ @click="postCode"
>生成二维码