diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index 528733e6c..eee827dd9 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -194,7 +194,7 @@ export default class SaidLamp extends Group { } } - // 设置状态 498 + // 设置状态 setState(model) { this.recover(); if (!store.getters['map/checkDeviceShow'](this._code)) { diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index a9f8f1c6c..26670103d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -132,7 +132,9 @@ export default { { name: '闭塞', value: 'Occlusion' }, { name: '接发车箭头', value: 'PickOrDepartArrow' } ], - editModel:getModel('ControlLamp'), + hasDirectionList: ['SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion', 'PickOrDepartArrow'], + directionList: [{label: 'X',value: 'X'},{label: 'XF',value: 'XF'},{label: 'XD',value: 'XD'}, {label:'S',value:'S'},{label:'SF',value:'SF'},{label:'SD',value: 'SD'}], + editModel:getModel('ControlLamp'), addModel:getModel('ControlLamp'), field: '' }; @@ -164,6 +166,7 @@ export default { { prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup' }, { prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup'}, { prop: 'right', label: '朝右:', type: 'checkbox', isHidden: this.editModel.type !== 'PickOrDepartArrow' }, + { prop: 'direction', label: '方向:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.directionList, isHidden: !this.hasDirectionList.includes(this.editModel.type) }, { prop: 'switchCode', label: '所属道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.editModel.type !== 'SwitchFault', hover: this.hover, buttonType: 'switchSelectCode', buttonShowType: this.isButtonType }, { prop:'stationCode', label: '所属车站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList} ] @@ -188,6 +191,7 @@ export default { ] }, { prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup' }, { prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup'}, + { prop: 'direction', label: '方向:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.directionList, isHidden: !this.hasDirectionList.includes(this.addModel.type) }, { prop: 'switchCode', label: '所属道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.addModel.type !== 'SwitchFault', hover: this.hover, buttonType: 'switchSelectCode', buttonShowType: this.isButtonType } ] } @@ -217,7 +221,10 @@ export default { ], switchCode: [ { required: true, message: '请选择所属道岔!', trigger: 'change'} - ] + ], + direction: [ + { required: true, message: '请选择方向!', trigger: 'change'} + ] }; }, isButtonType() { diff --git a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue index 111b33d2a..04743c41d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue @@ -56,6 +56,7 @@ export default { signalCode: '', sectionCode: '', switchCode: '', + direction: '', position: { x: 0, y: 0 @@ -93,6 +94,7 @@ export default { { value: 'CHANGE_DIRECTION', label: '改方按钮' } ], centralizedStationList: [], // 设备集中站列表 + directionList: [{label:'X',value:'X'},{label:'XF',value:'XF'},{label:'XD',value:'XD'},{label:'S',value:'S'},{label:'SF',value:'SF'},{label:'SD',value:'SD'}], rules: { code: [ { required: true, message: this.$t('rules.selectText'), trigger: 'blur' } @@ -117,7 +119,10 @@ export default { ], 'position.y': [ { required: true, message: this.$t('rules.pleaseEnterYCoordinate'), trigger: 'blur' } - ] + ], + direction: [ + { required: true, message: '请选择方向', trigger: 'change' } + ] } }; }, @@ -151,6 +156,7 @@ export default { { prop: 'signalCode', label: '关联信号机:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.signalList, hover: this.hover, buttonType: 'linkSignal', buttonShowType: this.isLinkSignalShow, isHidden: !this.isLinkSignal }, { prop: 'sectionCode', label: '关联区段:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.sectionList, hover: this.hover, buttonType: 'linkSection', buttonShowType: this.isLinkSectionShow, isHidden: !this.isLinkSection }, { prop: 'switchCode', label: '关联道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchList, hover: this.hover, buttonType: 'linkSwitch', buttonShowType: this.isLinkSwitchShow, isHidden: !this.isLinkSwitch }, + { prop: 'direction', label: '方向:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.directionList, isHidden: !this.isLinkDirection }, { 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 } @@ -205,7 +211,10 @@ export default { }, isLinkSwitch() { return this.editModel.type === 'FLEXIBLE'; - } + }, + isLinkDirection() { + return ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION'].includes(this.editModel.type); + } }, methods: { handleInit() { @@ -233,6 +242,7 @@ export default { this.editModel.signalCode = ''; this.editModel.switchCode = ''; this.editModel.sectionCode = ''; + this.editModel.direction = ''; this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); } else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { @@ -278,12 +288,14 @@ export default { }, updateMapModel(data) { if (this.isLinkSignal) { - data.sectionCode = ''; data.switchCode = ''; + data.sectionCode = ''; data.switchCode = ''; data.direction = ''; } else if (this.isLinkSection) { - data.signalCode = ''; data.switchCode = ''; + data.signalCode = ''; data.switchCode = ''; data.direction = ''; } else if (this.isLinkSwitch) { - data.signalCode = ''; data.sectionCode = ''; - } + data.signalCode = ''; data.sectionCode = ''; data.direction = ''; + } else if (this.isLinkDirection) { + data.sectionCode = ''; data.signalCode = ''; data.switchCode = ''; + } this.$emit('updateMapModel', data); } }