调整车站筛选
This commit is contained in:
parent
6f4b4fa6dd
commit
226abef552
@ -107,7 +107,8 @@ export default {
|
|||||||
field: '',
|
field: '',
|
||||||
oldLeftSectionCode: '',
|
oldLeftSectionCode: '',
|
||||||
oldRightSectionCode: '',
|
oldRightSectionCode: '',
|
||||||
tipInfoList: []
|
tipInfoList: [],
|
||||||
|
centralizedStationList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -369,9 +370,6 @@ export default {
|
|||||||
return this.$store.state.map.map.skinVO.code === '03';
|
return this.$store.state.map.map.skinVO.code === '03';
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
|
||||||
centralizedStationList() {
|
|
||||||
return this.stationList.filter(station => station.centralized);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -402,9 +400,14 @@ export default {
|
|||||||
this.editModel.roadType = null;
|
this.editModel.roadType = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleInit() {
|
||||||
|
if (this.stationList && this.stationList.length) {
|
||||||
|
this.centralizedStationList = this.stationList.filter(station => station.centralized);
|
||||||
|
}
|
||||||
|
},
|
||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
// 判断是否激活选择站台
|
// 判断是否激活选择站台
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type === 'Section') {
|
||||||
if (this.field === 'leftSection') {
|
if (this.field === 'leftSection') {
|
||||||
if (selected.type === '01' || selected.type === '03') {
|
if (selected.type === '01' || selected.type === '03') {
|
||||||
this.editModel.leftSectionCode = selected.code;
|
this.editModel.leftSectionCode = selected.code;
|
||||||
@ -423,6 +426,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.clear();
|
this.clear();
|
||||||
|
this.handleInit();
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
this.oldPoint = selected.points;
|
this.oldPoint = selected.points;
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
|||||||
{ code: true, name: '向右' }
|
{ code: true, name: '向右' }
|
||||||
],
|
],
|
||||||
SignalLeftOrRightList: [],
|
SignalLeftOrRightList: [],
|
||||||
CentralizedStationList:[],
|
// CentralizedStationList:[],
|
||||||
mergeRules: {
|
mergeRules: {
|
||||||
sectionCode: [
|
sectionCode: [
|
||||||
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
||||||
@ -87,6 +87,13 @@ export default {
|
|||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
|
ciStationList() {
|
||||||
|
let list = [];
|
||||||
|
list = this.stationList.filter(station=>{
|
||||||
|
return station.ciStation;
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
},
|
||||||
isButtonType() {
|
isButtonType() {
|
||||||
return this.field == 'selectSingalCode';
|
return this.field == 'selectSingalCode';
|
||||||
},
|
},
|
||||||
@ -104,7 +111,7 @@ export default {
|
|||||||
{ prop: 'right', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalDirectionList},
|
{ prop: 'right', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalDirectionList},
|
||||||
{ prop: 'positionType', label: this.$t('map.positionType'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalPositionTypeList},
|
{ prop: 'positionType', label: this.$t('map.positionType'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalPositionTypeList},
|
||||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList},
|
{ 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: 'interlockStationCode', label: '所属联锁站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.ciStationList}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,9 @@ export default {
|
|||||||
},
|
},
|
||||||
lampPositionModel: {
|
lampPositionModel: {
|
||||||
lampPositionType: ''
|
lampPositionType: ''
|
||||||
}
|
},
|
||||||
|
centralizedStationList: [], // 设备集中站列表
|
||||||
|
ciStationList: [] // 联锁站列表
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -293,20 +295,6 @@ export default {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
centralizedStationList() {
|
|
||||||
let list = [];
|
|
||||||
list = this.stationList.filter(station=>{
|
|
||||||
return station.centralized;
|
|
||||||
});
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
ciStationList() {
|
|
||||||
let list = [];
|
|
||||||
list = this.stationList.filter(station=> {
|
|
||||||
return station.ciStation;
|
|
||||||
});
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
form() {
|
form() {
|
||||||
return {
|
return {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
@ -426,6 +414,12 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleInit() {
|
||||||
|
if (this.stationList && this.stationList.length) {
|
||||||
|
this.centralizedStationList = this.stationList.filter(station=> station.centralized);
|
||||||
|
this.ciStationList = this.stationList.filter(station=> station.ciStation);
|
||||||
|
}
|
||||||
|
},
|
||||||
hover(field) {
|
hover(field) {
|
||||||
this.field = field == this.field ? '' : field;
|
this.field = field == this.field ? '' : field;
|
||||||
this.signalSectionCode(this.field);
|
this.signalSectionCode(this.field);
|
||||||
@ -435,12 +429,13 @@ export default {
|
|||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
},
|
},
|
||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) {
|
if (selected && selected._type == 'Signal' && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) {
|
||||||
|
this.handleInit();
|
||||||
this.editModel = getModel('Signal');
|
this.editModel = getModel('Signal');
|
||||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
} else if (selected && selected._type.toUpperCase() == 'Section'.toUpperCase() && this.field == 'selectSingalCode') {
|
} else if (selected && selected._type == 'Section' && this.field == 'selectSingalCode') {
|
||||||
if (selected.type == '01' || selected.type === '03') {
|
if (selected.type == '01' || selected.type === '03') {
|
||||||
this.$refs.createSignal.setSectionCode(selected.code);
|
this.$refs.createSignal.setSectionCode(selected.code);
|
||||||
} else if (selected.type == '02') {
|
} else if (selected.type == '02') {
|
||||||
@ -464,12 +459,12 @@ export default {
|
|||||||
this.signalStationModel.signalLists.push(selected.code);
|
this.signalStationModel.signalLists.push(selected.code);
|
||||||
}
|
}
|
||||||
this.activeName = 'three';
|
this.activeName = 'three';
|
||||||
} else if (selected && selected._type === 'Signal' && this.field == 'signalIgnoreRouteEnd') {
|
} else if (selected && selected._type == 'Signal' && this.field == 'signalIgnoreRouteEnd') {
|
||||||
if (!this.editModel.ignoreRouteEnd.includes(selected.code) && this.editModel.code != selected.code) {
|
if (!this.editModel.ignoreRouteEnd.includes(selected.code) && this.editModel.code != selected.code) {
|
||||||
this.editModel.ignoreRouteEnd.push(selected.code);
|
this.editModel.ignoreRouteEnd.push(selected.code);
|
||||||
}
|
}
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
} else if (selected && selected._type === 'Signal' && this.field == 'signalCodes') {
|
} else if (selected && selected._type == 'Signal' && this.field == 'signalCodes') {
|
||||||
if (!this.ciModelForm.signalList.includes(selected.code)) {
|
if (!this.ciModelForm.signalList.includes(selected.code)) {
|
||||||
this.ciModelForm.signalList.push(selected.code);
|
this.ciModelForm.signalList.push(selected.code);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editModel: getModel('Switch')
|
editModel: getModel('Switch'),
|
||||||
|
centralizedStationList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -98,21 +99,27 @@ export default {
|
|||||||
'switchList',
|
'switchList',
|
||||||
'stationList',
|
'stationList',
|
||||||
'lineCode'
|
'lineCode'
|
||||||
]),
|
])
|
||||||
centralizedStationList() {
|
// centralizedStationList() {
|
||||||
let list = [];
|
// let list = [];
|
||||||
list = this.stationList.filter(station=>{
|
// list = this.stationList.filter(station=>{
|
||||||
return station.centralized;
|
// return station.centralized;
|
||||||
});
|
// });
|
||||||
return list;
|
// return list;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
handleInit() {
|
||||||
|
if (this.stationList && this.stationList.length) {
|
||||||
|
this.centralizedStationList = this.stationList.filter(station=> station.centralized );
|
||||||
|
}
|
||||||
|
},
|
||||||
deviceChange(code) {
|
deviceChange(code) {
|
||||||
this.$emit('setCenter', code);
|
this.$emit('setCenter', code);
|
||||||
this.setModel(this.$store.getters['map/getDeviceByCode'](code));
|
this.setModel(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
},
|
},
|
||||||
setModel(data) {
|
setModel(data) {
|
||||||
|
this.handleInit();
|
||||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||||
this.editModel = deepAssign(this.editModel, data);
|
this.editModel = deepAssign(this.editModel, data);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user