diff --git a/src/components/PopMenu/popTip.vue b/src/components/PopMenu/popTip.vue index 08238f896..03f6c8cb6 100644 --- a/src/components/PopMenu/popTip.vue +++ b/src/components/PopMenu/popTip.vue @@ -151,6 +151,7 @@ export default { }, methods: { resetShowPosition(point) { + console.log(this.tipMsg, '===================='); if (point) { this.show = true; const self = this; @@ -249,7 +250,7 @@ export default { position: fixed; padding: 5px 0px; border: 1px solid gray; - z-index: 2; + z-index: 9999; .dsp-block { display: block; diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 928dc157b..5f7ce1d8a 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -213,7 +213,7 @@ class SkinCode extends defaultStyle { }, reentry: { // 站台折返策略 position: 0, // 折返方向 - offset: {x: -16, y: 20}, // 折返偏移量 + offset: {x: -16, y: -15}, // 折返偏移量 noHumanColor: '#0F16DA', // 站台无人折返 autoChangeEndsColor: '#0BF400' // 站台自动换端 }, diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 2e85b968d..4532d3b87 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -134,13 +134,14 @@ class StationStand extends Group { /** 站台折返策略*/ if (style.StationStand.reentry.offset) { const reentryH = style.StationStand.standEmergent.mergentR; - const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2); - const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH; + const isRight = model.right ? -1 : 1; + const reentryX = model.position.x - (style.StationStand.reentry.position || isRight) * (style.StationStand.reentry.offset.x - model.width / 2); + const reentryY = model.position.y + (style.StationStand.reentry.position || isRight) * (style.StationStand.reentry.offset.y) + isRight * reentryH; this.reentry = new EReentry({ zlevel: this.zlevel, z: this.z + 1, style: style, - drict: drict, + drict: isRight, x: reentryX, y: reentryY, lineWidth: 0, @@ -512,7 +513,13 @@ class StationStand extends Group { } /** 设置折返策略*/ - switch (model.reentryStrategy) { + let reentryStrategy = ''; + if (model.reentryStrategy !== '04') { + reentryStrategy = model.reentryStrategy; + } else { + reentryStrategy = model.defaultReentryStrategy; + } + switch (reentryStrategy) { case '04': /** 默认*/ case '01': this.noReentry(); /** 无折返策略*/ diff --git a/src/jmapNew/theme/xian_02/menus/index.vue b/src/jmapNew/theme/xian_02/menus/index.vue index ad6911281..09c45d8a8 100644 --- a/src/jmapNew/theme/xian_02/menus/index.vue +++ b/src/jmapNew/theme/xian_02/menus/index.vue @@ -13,6 +13,7 @@ + @@ -36,6 +37,7 @@ import MenuLimit from './menuLimit'; import PassiveContorl from './passiveDialog/control'; import MenuStationStand from './menuStationStand'; import PopStationStand from './popStationStand'; +import MenuRequest from './menuRequest'; // import PassiveTimeout from './passiveDialog/timeout'; export default { @@ -55,7 +57,8 @@ export default { MenuStationStand, // PassiveAlarm, PassiveContorl, - PopStationStand + PopStationStand, + MenuRequest // PassiveTimeout }, props: { diff --git a/src/jmapNew/theme/xian_02/menus/menuRequest.vue b/src/jmapNew/theme/xian_02/menus/menuRequest.vue new file mode 100644 index 000000000..e0fce3d14 --- /dev/null +++ b/src/jmapNew/theme/xian_02/menus/menuRequest.vue @@ -0,0 +1,232 @@ + + + + diff --git a/src/jmapNew/theme/xian_02/menus/popStationStand.vue b/src/jmapNew/theme/xian_02/menus/popStationStand.vue index 61e649092..ed6ab53e0 100644 --- a/src/jmapNew/theme/xian_02/menus/popStationStand.vue +++ b/src/jmapNew/theme/xian_02/menus/popStationStand.vue @@ -1,6 +1,6 @@ @@ -78,10 +110,18 @@ export default { modelList: [], trainPosType: '' }, + roadModel: { + roadType: '', + sectionCode: '' + }, positionTypes: [ { name: '上方', type: '01' }, { name: '下方', type: '02' } ], + sectionRoadTypeList: [ + {code: 'LEFT', name: '左行线'}, + {code: 'RIGHT', name: '右行线'} + ], tipInfoList: [], formRules: { trainPosType: [ @@ -90,6 +130,14 @@ export default { modelList: [ { required: true, message: '请选择', trigger: 'change' } ] + }, + roadRules: { + sectionCode: [ + { required: true, message: '请选择', trigger: 'change' } + ], + roadType: [ + { required: true, message: '请选择', trigger: 'change' } + ] } }; }, @@ -139,6 +187,65 @@ export default { this.$refs.formModel.resetFields(); // 对该表单项进行重置并移除校验结果 } }); + }, + getSetRoadList(models, direction, section) { + section.roadType = this.roadModel.roadType; + models.push(section); + if (section.logicSectionCodeList && section.logicSectionCodeList.length) { + section.logicSectionCodeList.forEach(item => { + const logicSection = this.$store.getters['map/getDeviceByCode'](item); + logicSection.roadType = this.roadModel.roadType; + models.push(logicSection); + }); + } + let nextSection = ''; + if (direction === 'left' && section.leftSectionCode) { + nextSection = this.$store.getters['map/getDeviceByCode'](section.leftSectionCode); + } else if (direction === 'right' && section.rightSectionCode) { + nextSection = this.$store.getters['map/getDeviceByCode'](section.rightSectionCode); + } else if (section.switch && section.switch.code) { + const switchDevcie = this.$store.getters['map/getDeviceByCode'](section.switch.code); + if (switchDevcie.sectionACode === section.code) { + nextSection = this.$store.getters['map/getDeviceByCode'](switchDevcie.sectionBCode); + } else if (switchDevcie.sectionBCode === section.code) { + nextSection = this.$store.getters['map/getDeviceByCode'](switchDevcie.sectionACode); + } + if ((nextSection.points[0].x > section.points[0].x && direction === 'left') || (nextSection.points[0].x < section.points[0].x && direction === 'right')) { + nextSection = ''; + } + } + if (nextSection) { + this.getSetRoadList(models, direction, nextSection); + } + }, + setRoadType() { + const models = []; + this.$refs['roadModel'].validate((valid) => { + if (valid) { + const section = this.$store.getters['map/getDeviceByCode'](this.roadModel.sectionCode); + let direction = ''; + if (section.leftSectionCode) { + direction = 'left'; + } else if (section.rightSectionCode) { + direction = 'right'; + } else if (section.switch && section.switch.code) { + let nextSection = ''; + const switchDevcie = this.$store.getters['map/getDeviceByCode'](section.switch.code); + if (switchDevcie.sectionACode === section.code) { + nextSection = this.$store.getters['map/getDeviceByCode'](switchDevcie.sectionBCode); + direction = nextSection.points[0].x > section.points[0].x ? 'right' : 'left'; + } else if (switchDevcie.sectionBCode === section.code) { + nextSection = this.$store.getters['map/getDeviceByCode'](switchDevcie.sectionACode); + direction = nextSection.points[0].x > section.points[0].x ? 'right' : 'left'; + } + } + if (direction) { + this.getSetRoadList(models, direction, section); + } + } + this.$emit('updateMapModel', models, 'five'); + this.$refs.roadModel.resetFields(); // 对该表单项进行重置并移除校验结果 + }); } } }; diff --git a/src/views/newMap/newMapdraft/mapoperate/section/create.vue b/src/views/newMap/newMapdraft/mapoperate/section/create.vue index 976c0cd67..818044ed4 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/create.vue @@ -225,7 +225,8 @@ export default { relevanceSectionList: [], points: [], leftAxlePosition: 0, - rightAxlePosition: 0 + rightAxlePosition: 0, + roadType: '' }; }, // 批量创建 diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index a21b8dfd9..acf5a3897 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -71,6 +71,13 @@ export default { {value: 2, label: '特殊计轴下方显示'}, {value: -2, label: '特殊计轴上方显示'} ], + sectionRoadTypeList: [ + {code: 'LEFT', name: '左行线'}, + {code: 'RIGHT', name: '右行线'}, + {code: 'CROSS', name: '渡线'}, + {code: 'DEPOT', name: '联段线'}, + {code: 'PARKING', name: '库线'} + ], editModel: { code: '', name: '', @@ -115,7 +122,8 @@ export default { logicSectionStartOffset: 0, logicSectionEndOffset: 0, leftAxlePosition: 0, - rightAxlePosition: 0 + rightAxlePosition: 0, + roadType: '' }, oldPoint: [], // 区段未修改前 坐标 logicSectionNums: [1], @@ -152,6 +160,7 @@ export default { { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] }, { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList }, // 区段类型 + { prop: 'roadType', label: '线路类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.sectionRoadTypeList, isHidden: !this.isSwitchSectionType}, { prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection}, // 左关联区段 { prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection}, // 右关联区段 { prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode }, // 所属物理/道岔区段code @@ -455,6 +464,9 @@ export default { } else if (this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase()) { this.$refs.batchSettings.formModel.modelList.push(selected.code); this.activeName = 'five'; + } else if (this.field.toUpperCase() === 'sectionRoadCode'.toUpperCase()) { + this.$refs.batchSettings.roadModel.sectionCode = selected.code; + this.activeName = 'five'; } } }, diff --git a/src/views/newMap/newMapdraft/mapoperate/section/splitOrMerge.vue b/src/views/newMap/newMapdraft/mapoperate/section/splitOrMerge.vue index 8fa5f8460..dfa361c5a 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/splitOrMerge.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/splitOrMerge.vue @@ -205,7 +205,8 @@ export default { } ], namePosition: { x: 0, y: 0 }, - relevanceSectionList: [] + relevanceSectionList: [], + roadType: selected.roadType }; models.push(model); } @@ -281,7 +282,8 @@ export default { kmRangeLeft: '', region: '', trainWindowCode: '', - relevanceSectionList: [] + relevanceSectionList: [], + roadType: '' }; models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](lsection.code), { _dispose: true })); models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](rsection.code), { _dispose: true })); diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/create.vue b/src/views/newMap/newMapdraft/mapoperate/signal/create.vue index cc37d823a..ae3eb855a 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/create.vue @@ -66,6 +66,16 @@ /> + + + + + @@ -98,7 +108,8 @@ export default { right: false, leftOrRight: 'L', // 左右侧 positionType: '01', - stationCode: '' + stationCode: '', + interlockStationCode: '' }, SignalPositionTypeList:[], SignalDirectionList: [ @@ -172,6 +183,7 @@ export default { _type: 'Signal', code: uid, name: uname, + type: 'PROTECTION', uniqueName: uid, sectionCode: this.addModel.sectionCode, positionType: this.addModel.positionType, diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue index 96de7ca45..d4eadb7f7 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue @@ -73,11 +73,17 @@ export default { { code: '00', name: this.$t('map.normal') }, { code: '01', name: this.$t('map.signalFilamentAlarm') } ], + signalTypeList: [ + { code: 'PROTECTION', name: '防护信号机'}, + { code: 'BLOCKING', name: '阻挡信号机'}, + { code: 'PASSING', name: '通过信号机'} + ], questionList: [], field:'', editModel: { code: '', name: '', + type: 'PROTECTION', uniqueName: '', nameShow: false, lampPostType: '', @@ -98,7 +104,8 @@ export default { position: { x: 0, y: 0 }, positionPoint: { x: 0, y: 0 }, buttonPosition: { x: 0, y: 0 }, - guidePosition: { x: 0, y: 0 } + guidePosition: { x: 0, y: 0 }, + interlockStationCode: '' }, addModel: { number: 2 @@ -149,6 +156,7 @@ 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: 'type', label: '信号机类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.signalTypeList}, { prop: 'positionPoint', label: '信号机偏移坐标:', type: 'coordinate', width: '140px', children: [ { prop: 'positionPoint.x', firstLevel: 'positionPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'positionPoint.y', firstLevel: 'positionPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } @@ -180,6 +188,7 @@ export default { name: this.$t('map.mapData'), item: [ { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }, + { prop: 'interlockStationCode', label: '所属联锁站', 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: 'sectionCode', label: this.$t('map.belongsSection'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList }, diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index 9fa7b6af7..f264478f6 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -79,6 +79,10 @@ export default { { code: false, name: '向左'}, { code: true, name: '向右'} ], + reentryStrategyList: [ + { code: '02', name: '自动无人折返'}, + { code: '03', name: '自动换端'} + ], editModel: { code: '', name: '', @@ -94,6 +98,7 @@ export default { right: true, standTrackCode: '', small: false, + defaultReentryStrategy: '', // 默认折返策略 stopJumpLamp: false, // 跳停功能按钮 stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标 cancelStopJumpLamp: false, // 取消跳停功能按钮 @@ -116,6 +121,7 @@ export default { standTrackDownCode: '', // 下行站台轨 stationstandDirection: '02', // 屏蔽门方向 right: true, + defaultReentryStrategy: '', // 默认折返策略 inside: false, // 内外站台 small: false, stopJumpLamp: false, // 跳停功能按钮 @@ -163,6 +169,7 @@ export default { { 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: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, + { prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.reentryStrategyList }, { prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true }, { prop: 'inside', label: '是否内站台:', type: 'checkbox' }, { prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'}, @@ -246,6 +253,7 @@ export default { { 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: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, + { prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.reentryStrategyList, clearable: true }, { prop: 'small', label: '是否小型站台:', type: 'checkbox' }, { prop: 'inside', label: '是否内站台:', type: 'checkbox' }, { prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'}, diff --git a/src/views/system/configLine/config.vue b/src/views/system/configLine/config.vue index a4a53fdc6..7634931ef 100644 --- a/src/views/system/configLine/config.vue +++ b/src/views/system/configLine/config.vue @@ -1,15 +1,22 @@ @@ -71,10 +96,15 @@ export default { dialogVisible: false, index: 0, id: '', - tableData: [], + generalData: [], + roadData: [], focus: false, - booleanList: ['lockFirst', 'switchSingleHandle'], + booleanList: ['lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch', + 'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen', + 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch'], selectList: ['upDirection'], + generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection'], + numberList: ['overlapReleaseTime', 'routeReleaseTime'], optionsMap: { upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}] } @@ -103,7 +133,8 @@ export default { const res = await getRealLineConfigList(this.id); if (res.data) { const keys = Object.keys(res.data); - this.tableData = []; + this.generalData = []; + this.roadData = []; keys.forEach(key => { // let value = ''; let type = 'input'; @@ -113,6 +144,8 @@ export default { } else if (this.selectList.indexOf(key) >= 0) { type = 'select'; options = this.optionsMap[key]; + } else if (this.numberList.indexOf(key) >= 0) { + type = 'number'; } else { type = 'input'; } @@ -122,10 +155,15 @@ export default { type: type, options: options }; - this.tableData.push(param); + if (this.generalConfig.includes(key)) { + this.generalData.push(param); + } else { + this.roadData.push(param); + } }); } else { - this.tableData = []; + this.generalData = []; + this.roadData = []; } } catch (error) { console.log(error); @@ -145,30 +183,18 @@ export default { this.$refs.editConfig.show(item); this.index = index; }, - delModel(item, index) { - this.$confirm('此操作将删除该配置项, 是否继续?', this.$t('global.tips'), { - confirmButtonText: this.$t('global.confirm'), - cancelButtonText: this.$t('global.cancel'), - type: 'warning' - }).then(() => { - this.tableData.splice(index, 1); - }); - }, - createModel(data) { - this.tableData.push(data); - }, - updateModel(data) { - this.tableData.splice(this.index, 1, data); - }, save() { const param = {}; - this.tableData.forEach(item => { + this.generalData.forEach(item => { param[item.configKey] = item.configValue; // if (item.boolean) { // const value = item.configValue == 'true'; // param[item.configKey] = value; // } }); + this.roadData.forEach(item => { + param[item.configKey] = item.configValue; + }); putRealLineConfig(this.id, param).then(res => { this.$message.success(`保存配置项成功!`); this.dialogVisible = false;