大铁线路调整2
This commit is contained in:
parent
7fbe309f70
commit
6ed22109af
@ -194,7 +194,7 @@ export default class SaidLamp extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置状态 498
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.recover();
|
this.recover();
|
||||||
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||||
|
@ -132,7 +132,9 @@ export default {
|
|||||||
{ name: '闭塞', value: 'Occlusion' },
|
{ name: '闭塞', value: 'Occlusion' },
|
||||||
{ name: '接发车箭头', value: 'PickOrDepartArrow' }
|
{ 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'),
|
addModel:getModel('ControlLamp'),
|
||||||
field: ''
|
field: ''
|
||||||
};
|
};
|
||||||
@ -164,6 +166,7 @@ export default {
|
|||||||
{ prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup' },
|
{ 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: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup'},
|
||||||
{ prop: 'right', label: '朝右:', type: 'checkbox', isHidden: this.editModel.type !== 'PickOrDepartArrow' },
|
{ 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: '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}
|
{ 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: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup' },
|
||||||
{ prop: 'pfNum', 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 }
|
{ 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: [
|
switchCode: [
|
||||||
{ required: true, message: '请选择所属道岔!', trigger: 'change'}
|
{ required: true, message: '请选择所属道岔!', trigger: 'change'}
|
||||||
]
|
],
|
||||||
|
direction: [
|
||||||
|
{ required: true, message: '请选择方向!', trigger: 'change'}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
isButtonType() {
|
isButtonType() {
|
||||||
|
@ -56,6 +56,7 @@ export default {
|
|||||||
signalCode: '',
|
signalCode: '',
|
||||||
sectionCode: '',
|
sectionCode: '',
|
||||||
switchCode: '',
|
switchCode: '',
|
||||||
|
direction: '',
|
||||||
position: {
|
position: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
@ -93,6 +94,7 @@ export default {
|
|||||||
{ value: 'CHANGE_DIRECTION', label: '改方按钮' }
|
{ value: 'CHANGE_DIRECTION', label: '改方按钮' }
|
||||||
],
|
],
|
||||||
centralizedStationList: [], // 设备集中站列表
|
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: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: this.$t('rules.selectText'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.selectText'), trigger: 'blur' }
|
||||||
@ -117,7 +119,10 @@ export default {
|
|||||||
],
|
],
|
||||||
'position.y': [
|
'position.y': [
|
||||||
{ required: true, message: this.$t('rules.pleaseEnterYCoordinate'), trigger: 'blur' }
|
{ 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: '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: '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: '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', 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.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 }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||||
@ -205,7 +211,10 @@ export default {
|
|||||||
},
|
},
|
||||||
isLinkSwitch() {
|
isLinkSwitch() {
|
||||||
return this.editModel.type === 'FLEXIBLE';
|
return this.editModel.type === 'FLEXIBLE';
|
||||||
}
|
},
|
||||||
|
isLinkDirection() {
|
||||||
|
return ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION'].includes(this.editModel.type);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleInit() {
|
handleInit() {
|
||||||
@ -233,6 +242,7 @@ export default {
|
|||||||
this.editModel.signalCode = '';
|
this.editModel.signalCode = '';
|
||||||
this.editModel.switchCode = '';
|
this.editModel.switchCode = '';
|
||||||
this.editModel.sectionCode = '';
|
this.editModel.sectionCode = '';
|
||||||
|
this.editModel.direction = '';
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
} else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
} else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
@ -278,12 +288,14 @@ export default {
|
|||||||
},
|
},
|
||||||
updateMapModel(data) {
|
updateMapModel(data) {
|
||||||
if (this.isLinkSignal) {
|
if (this.isLinkSignal) {
|
||||||
data.sectionCode = ''; data.switchCode = '';
|
data.sectionCode = ''; data.switchCode = ''; data.direction = '';
|
||||||
} else if (this.isLinkSection) {
|
} else if (this.isLinkSection) {
|
||||||
data.signalCode = ''; data.switchCode = '';
|
data.signalCode = ''; data.switchCode = ''; data.direction = '';
|
||||||
} else if (this.isLinkSwitch) {
|
} 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);
|
this.$emit('updateMapModel', data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user