{
+ return station.centralized;
+ });
+ return list;
}
},
mounted() {
@@ -171,6 +179,7 @@ export default {
sectionCode: this.addModel.sectionCode,
positionType: this.addModel.positionType,
directionShowType: this.addModel.directionShowType,
+ // leftOrRight: this.addModel.leftOrRight,
nameShow: true,
namePosition: { x: 0, y: 0 },
buttonShow: true,
@@ -184,7 +193,7 @@ export default {
this.sectionList.forEach(elem => {
if (elem.code === this.addModel.sectionCode) {
- if (this.addModel.leftOrRight === '0') {
+ if (this.addModel.leftOrRight === 'L') {
const beg = elem.points[0];
const end = elem.points[0 + 1];
const traingle = new JTriangle(beg, end);
diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue
index 421419e4b..6f3d11ac2 100644
--- a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue
@@ -16,6 +16,19 @@
+
+
+ 构建信号机偏移量
+ {{ $t('map.clearHint') }}
+
+
+
@@ -56,6 +69,7 @@ export default {
{ code: '00', name: this.$t('map.normal') },
{ code: '01', name: this.$t('map.signalFilamentAlarm') }
],
+ questionList: [],
field:'',
editModel: {
code: '',
@@ -65,6 +79,7 @@ export default {
lampPostType: '',
lampPositionType: '',
potLampType: '01',
+ leftOrRight: 'L',
directionShowType: '',
positionType: '',
namePosition: { x: 0, y: 0 },
@@ -105,6 +120,13 @@ export default {
}
return list;
},
+ centralizedStationList() {
+ let list = [];
+ list = this.stationList.filter(station=>{
+ return station.centralized;
+ });
+ return list;
+ },
form() {
return {
labelWidth: '150px',
@@ -146,11 +168,11 @@ export default {
map: {
name: this.$t('map.mapData'),
item: [
- { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
+ { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
{ 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: 'sectionCode', label: this.$t('map.belongsSection'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList, disabled: true },
+ { prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList },
{ prop: 'offset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') }
]
@@ -227,7 +249,6 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
- // this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() != 'selectSingalCode'.toUpperCase()) {
this.$refs.dataform.resetFields();
this.activeName = 'first';
@@ -278,6 +299,46 @@ export default {
_that.$message.info(this.$t('tip.cancelledDelete'));
});
}
+ },
+ // 构建信号机偏移量
+ editAll() {
+ const models = [];
+ this.questionList = [];
+ this.signalList.forEach(item => {
+ const signalModel = deepAssign({}, item);
+ const section = this.findSection(signalModel);
+ if (section.code && item.sectionCode != section.code) {
+ item.sectionCode = section.code;
+ }
+ if (!section.code) {
+ this.questionList.push(`${item.name} 信号机位置可能不正确,请手动调试归属区段及偏移量.`);
+ }
+ signalModel.offset = 2;
+ if (signalModel.directionShowType == '02') {
+ if (section.lengthFact) {
+ signalModel.offset = Math.abs(Number(section.lengthFact) - 2);
+ }
+ }
+ models.push(signalModel);
+ });
+ this.$emit('updateMapModel', models);
+ },
+ // 寻找信号机关联区段
+ findSection(signal) {
+ // 01 向左 02 向右
+ let model = {};
+ this.sectionList.forEach(section => {
+ if (signal.directionShowType == '01' && section.type != '02') {
+ if (section.points[0].x == signal.position.x && Math.abs(section.points[0].y - signal.position.y) <= 20) {
+ model = section;
+ }
+ } else if (signal.directionShowType == '02' && section.type != '02') {
+ if (section.points[section.points.length - 1].x == signal.position.x && Math.abs(section.points[section.points.length - 1].y - signal.position.y) <= 20) {
+ model = section;
+ }
+ }
+ });
+ return model;
}
}
};
@@ -288,6 +349,24 @@ export default {
height: 100%;
}
+ .flex_box{
+ display: flex;
+ justify-content: center;
+ }
+
+ .box-card {
+ width: calc(100% - 80px);
+ margin: 20px auto 0;
+ padding: 0 20px;
+ .text {
+ font-size: 14px;
+ }
+
+ .item {
+ padding: 6px 0;
+ }
+ }
+
.card {
height: 100%;
}
diff --git a/src/views/newMap/newMapdraft/mapoperate/station.vue b/src/views/newMap/newMapdraft/mapoperate/station.vue
index 82bf1c5ff..9edcf70aa 100644
--- a/src/views/newMap/newMapdraft/mapoperate/station.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/station.vue
@@ -95,7 +95,9 @@ export default {
chargeStation:[],
editModel: {
centralized: false,
- concentrateStationCode: '',
+ concentrateStationCode: '', // 所属集中站
+ isCIStation:false, // 是否联锁站
+ number:'', // 编号
code: '',
zcCode: '',
visible: true,
@@ -103,6 +105,11 @@ export default {
name: '',
nameFont: '',
nameFontColor: '#FFFFFF',
+ subheadDisplay:false,
+ subhead:'', // 副标题
+ subheadFont:'',
+ subheadFontColor:'#FFFFFF',
+ subheadPosition:{ x: 0, y: 0 },
kmPostShow: '',
kmRange: 0,
kmPost: '',
@@ -151,6 +158,7 @@ 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: 'number', label: this.$t('map.stationNumber'), type: 'input' },
{ 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' }
@@ -158,6 +166,14 @@ export default {
{ prop: 'visible', label: this.$t('map.stationstandShowName'), 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: 'subheadDisplay', label: this.$t('map.subheadDisplay'), type: 'checkbox' },
+ { prop: 'subhead', label: this.$t('map.subhead'), type: 'input', isHidden:!this.editModel.subheadDisplay },
+ { prop: 'subheadFont', label: this.$t('map.subheadFont'), type: 'font', isHidden:!this.editModel.subheadDisplay },
+ { prop: 'subheadFontColor', label: this.$t('map.subheadFontColor'), type: 'color', isHidden:!this.editModel.subheadDisplay },
+ { prop: 'subheadPosition', label: this.$t('map.subheadPosition'), type: 'coordinate', width: '120px', isHidden:!this.editModel.subheadDisplay, children: [
+ { prop: 'subheadPosition.x', firstLevel: 'subheadPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
+ { prop: 'subheadPosition.y', firstLevel: 'subheadPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
+ ] },
{ prop: 'kilometerPosition', label: '公里标偏移坐标:', type: 'coordinate', width: '120px', children: [
{ prop: 'kilometerPosition.x', firstLevel: 'kilometerPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
{ prop: 'kilometerPosition.y', firstLevel: 'kilometerPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
@@ -181,7 +197,7 @@ export default {
map: {
name: this.$t('map.mapData'),
item: [
- { prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, disabled:this.editModel.controlled },
+ { prop: 'isCIStation', label: this.$t('map.isCIStation'), type: 'checkbox'},
{ prop: 'centralized', label: this.$t('map.centralized'), type: 'checkbox', disabled:this.editModel.controlled, change:true, deviceChange:this.changeCentralized },
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList, isHidden: !this.isZcCode },
{ prop: 'chargeStationCodeList', label: this.$t('map.chargeStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.chargeStation, isHidden: !this.isZcCode, deviceChange:this.changeChargeStation},
@@ -339,6 +355,8 @@ export default {
_type: 'Station',
code: uid,
name: item.stationName,
+ number:'',
+ subheadDisplay:false,
zcCode: '',
runPlanName: '',
visible: true,
diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue
index b21ad8dc6..1cbe0c94a 100644
--- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue
@@ -17,23 +17,6 @@
-
@@ -73,6 +56,10 @@ export default {
{ code: '01', name: '朝下' },
{ code: '02', name: '朝上' }
*/
+ isRightList: [
+ { code: 'right', name: '向右'},
+ { code: 'left', name: '向左'}
+ ],
editModel: {
code: '',
name: '',
@@ -83,7 +70,10 @@ export default {
height: 0,
stationCode: '', // 所属车站
position: { x: 0, y: 0 },
- visible: true // 是否显示
+ visible: true, // 是否显示
+ isRight: 'right',
+ standTrackCode: '',
+ small: false
// direction: '' // 上下行方向
},
field: '',
@@ -93,11 +83,12 @@ export default {
pointY: 0, // y坐标
width: 60,
height: 20,
- doorType: '01', // 屏蔽门类型
standTrackCode: '', // 关联站台轨
standTrackUpCode: '', // 上行站台轨
standTrackDownCode: '', // 下行站台轨
- stationstandDirection: '02' // 屏蔽门方向
+ stationstandDirection: '02', // 屏蔽门方向
+ isRight: 'right',
+ small: false
}
};
},
@@ -127,7 +118,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: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES },
+ { prop: 'isRight', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
+ { prop: 'small', label: '是否小型站台:', type: 'checkbox' }
]
},
map: {
@@ -163,6 +157,9 @@ export default {
],
'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
+ ],
+ standTrackCode: [
+ { required: true, message: '请选择关联站台轨', trigger: 'change' }
]
};
// 清空表单验证提示信息
@@ -183,20 +180,16 @@ 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 },
+ { prop: 'isRight', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
+ { prop: 'small', label: '是否小型站台:', type: 'checkbox' }
]
},
door: {
name: '屏蔽门数据',
item: [
- { prop: 'doorType', label: '屏蔽门类型:', type: 'radio', radioList: [
- {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 }
+ { prop: 'stationstandDirection', label: '屏蔽门朝向:', type: 'radio', radioList: this.DoorLocationTypeList }
]
}
}
@@ -218,12 +211,6 @@ export default {
],
standTrackCode: [
{ required: true, message: '请选择关联站台轨', trigger: 'change' }
- ],
- standTrackUpCode: [
- { required: true, message: '请选择站台轨', trigger: 'change' }
- ],
- standTrackDownCode: [
- { required: true, message: '请选择站台轨', trigger: 'change' }
]
};
},
@@ -233,17 +220,8 @@ export default {
isButtonTypeS() {
return this.field == 'sectionSelectCode';
},
- isButtonTypeU() {
- return this.field == 'sectionSelectUpCode';
- },
- isButtonTypeD() {
- return this.field == 'sectionSelectDownCode';
- },
- doorTypeOne() {
- return this.addModel.doorType == '01';
- },
- doorTypeTwo() {
- return this.addModel.doorType == '02';
+ isButtonTypeES() {
+ return this.field === 'editSectionSelectCode';
},
PhysicalSectionList() {
let list = [];
@@ -295,6 +273,7 @@ export default {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
+ this.editModel.isRight = selected.isRight ? 'right' : 'left';
}
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'standSelectStationCode'.toUpperCase()) {
this.addModel.stationCode = selected.code;
@@ -306,14 +285,9 @@ export default {
this.activeName = 'second';
this.field = '';
this.$emit('standStationCode', '');
- } else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionSelectUpCode'.toUpperCase()) {
- this.addModel.standTrackUpCode = selected.code;
- this.activeName = 'second';
- this.field = '';
- this.$emit('standStationCode', '');
- } else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionSelectDownCode'.toUpperCase()) {
- this.addModel.standTrackDownCode = selected.code;
- this.activeName = 'second';
+ } else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'editSectionSelectCode'.toUpperCase()) {
+ this.editModel.standTrackCode = selected.code;
+ this.activeName = 'first';
this.field = '';
this.$emit('standStationCode', '');
}
@@ -335,7 +309,10 @@ export default {
position: {
x: 0,
y: this.addModel.pointY
- }
+ },
+ standTrackCode: this.addModel.standTrackCode,
+ isRight: this.addModel.isRight === 'right',
+ small: this.addModel.small
};
this.stationList.forEach(elem => {
if (elem.code == this.addModel.stationCode) {
@@ -344,7 +321,7 @@ export default {
}
});
models.push(model);
- if (this.addModel.doorType == '01') {
+ if (!this.addModel.small) {
const uid = getUID('Psd', this.psdList);
const param = {
_type: 'Psd',
@@ -353,7 +330,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,35 +339,6 @@ export default {
param.position.y = this.addModel.pointY + (this.addModel.height / 2) + space;
}
models.push(param);
- } else if (this.addModel.doorType == '02') {
- const arr = [];
- for (let index = 0; index < 2; index++) {
- const uid = getUID('Psd', [...this.psdList, ...arr]);
- const param = {
- _type: 'Psd',
- code: uid,
- name: `Psd${[...this.psdList, ...arr].length + 1}`,
- width: this.addModel.width,
- height: 3,
- standCode: Standuid, // 关联站台唯一code
- standTrackCode: '', // 关联站台轨编码
- position: {
- x: models[0].position.x,
- y: this.addModel.pointY
- }
- };
- if (index == 0) {
- param.standTrackCode = this.addModel.standTrackUpCode;
- param.position.y = this.addModel.pointY - (this.addModel.height / 2) - space;
- } else {
- param.standTrackCode = this.addModel.standTrackDownCode;
- param.position.y = this.addModel.pointY + (this.addModel.height / 2) + space;
- }
- arr.push(param);
- }
- arr.forEach(item => {
- models.push(item);
- });
}
this.$emit('updateMapModel', models);
}
@@ -401,7 +348,9 @@ export default {
edit() {
this.$refs.dataform.validate((valid) => {
if (valid) {
+ this.editModel.isRight = this.addModel.isRight === 'right';
const data = Object.assign({_type: 'StationStand'}, this.editModel);
+ console.log(data);
this.$emit('updateMapModel', data);
}
});
diff --git a/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue b/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue
index 973c4278e..f03e7c110 100644
--- a/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue
@@ -13,7 +13,7 @@
-
+
@@ -23,6 +23,43 @@
+
+
+
+
+
+
+
+
+ {{ $t('map.activate') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('map.updateObj') }}
+
+
+
@@ -77,6 +114,27 @@ export default {
height: [
{ required: true, message: this.$t('rules.trainWindowHeight'), trigger: 'blur' }
]
+ },
+ field: '',
+ addModel: {
+ pointY: '',
+ width: '',
+ height: '',
+ modelList: []
+ },
+ mergeRules: {
+ pointY: [
+ { required: true, message: '请输入', trigger: 'blur' }
+ ],
+ modelList: [
+ { required: true, message: '请选择', trigger: 'change' }
+ ],
+ width: [
+ { required: true, message: this.$t('rules.trainWindowWidth'), trigger: 'blur' }
+ ],
+ height: [
+ { required: true, message: this.$t('rules.trainWindowHeight'), trigger: 'blur' }
+ ]
}
};
},
@@ -140,11 +198,20 @@ export default {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
+ hover(field) {
+ this.field = field == this.field ? '' : field;
+ },
deviceSelect(selected) {
this.$refs.form.resetFields();
if (selected && selected._type.toUpperCase() === 'TrainWindow'.toUpperCase()) {
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
+ if (this.field == 'trainWindowCode') {
+ if (this.addModel.modelList.indexOf(selected.code) == -1) {
+ this.addModel.modelList.push(selected.code);
+ }
+ this.activeName = 'three';
+ }
}
},
createModel(opts) {
@@ -314,6 +381,22 @@ export default {
_that.$message.info(this.$t('tip.cancelledDelete'));
});
}
+ },
+ editTrainWindow() {
+ this.$refs['addForm'].validate((valid) => {
+ if (valid) {
+ const models = [];
+ this.addModel.modelList.forEach(item => {
+ const model = this.$store.getters['map/getDeviceByCode'](item);
+ model.point.y = this.addModel.pointY;
+ model.height = this.addModel.height;
+ model.width = this.addModel.width;
+ models.push(model);
+ });
+ this.$emit('updateMapModel', models);
+ this.addModel.modelList = [];
+ }
+ });
}
}
};