Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
676d93d1bd
@ -554,5 +554,6 @@ export default {
|
|||||||
coordinateMode: 'Coordinate mode',
|
coordinateMode: 'Coordinate mode',
|
||||||
sectionAssociationMode: 'Section association mode',
|
sectionAssociationMode: 'Section association mode',
|
||||||
leftAssociatedSection: 'Left associated section',
|
leftAssociatedSection: 'Left associated section',
|
||||||
rightAssociatedSection: 'Right associated section'
|
rightAssociatedSection: 'Right associated section',
|
||||||
|
chargeStationList:'Managed station list'
|
||||||
};
|
};
|
||||||
|
@ -548,5 +548,6 @@ export default {
|
|||||||
coordinateMode: '坐标方式',
|
coordinateMode: '坐标方式',
|
||||||
sectionAssociationMode: '区段关联方式',
|
sectionAssociationMode: '区段关联方式',
|
||||||
leftAssociatedSection: '左关联区段',
|
leftAssociatedSection: '左关联区段',
|
||||||
rightAssociatedSection: '右关联区段'
|
rightAssociatedSection: '右关联区段',
|
||||||
|
chargeStationList:'管理车站列表'
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,6 @@ export default class StationControl extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
debugger;
|
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
// 紧急站控
|
// 紧急站控
|
||||||
if (this.style.StationControl.lamp.emergencyControlShow) {
|
if (this.style.StationControl.lamp.emergencyControlShow) {
|
||||||
|
@ -41,6 +41,26 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="checkFieldType(item, 'multiSelect')">
|
||||||
|
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||||
|
<el-select
|
||||||
|
v-model="formModel[item.prop]"
|
||||||
|
filterable
|
||||||
|
multiple
|
||||||
|
:placeholder="item.placeholder"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
:clearable="item.clearable"
|
||||||
|
@change="item.deviceChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="option in item.options"
|
||||||
|
:key="option[item.optionValue]"
|
||||||
|
:label="handleLabel(option, item.optionLabel)"
|
||||||
|
:value="option[item.optionValue]"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
<template v-if="checkFieldType(item, 'selectHover')">
|
<template v-if="checkFieldType(item, 'selectHover')">
|
||||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -67,6 +67,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
field: '',
|
field: '',
|
||||||
|
chargeStation:[],
|
||||||
editModel: {
|
editModel: {
|
||||||
centralized: false,
|
centralized: false,
|
||||||
concentrateStationCode: '',
|
concentrateStationCode: '',
|
||||||
@ -83,10 +84,12 @@ export default {
|
|||||||
kmPostFont: '',
|
kmPostFont: '',
|
||||||
kmPostFontColor: '#FFFFFF',
|
kmPostFontColor: '#FFFFFF',
|
||||||
isShowControlMode: '',
|
isShowControlMode: '',
|
||||||
|
chargeStationCodeList:[],
|
||||||
position: {
|
position: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
}
|
},
|
||||||
|
controlled:false
|
||||||
},
|
},
|
||||||
addModel: {
|
addModel: {
|
||||||
sectionCode: ''
|
sectionCode: ''
|
||||||
@ -135,9 +138,10 @@ export default {
|
|||||||
map: {
|
map: {
|
||||||
name: this.$t('map.mapData'),
|
name: this.$t('map.mapData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
|
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, disabled:this.editModel.controlled },
|
||||||
{ prop: 'centralized', label: this.$t('map.centralized'), 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: '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},
|
||||||
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }
|
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -194,6 +198,9 @@ export default {
|
|||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
this.editModel.runPlanName = selected.runPlanName || '';
|
this.editModel.runPlanName = selected.runPlanName || '';
|
||||||
|
this.chargeStation = this.stationList.filter(data=>{
|
||||||
|
return !data.centralized && data.code != this.editModel.code && !(data.controlled && data.concentrateStationCode != this.editModel.code);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.field.toUpperCase() === 'selectStationCode'.toUpperCase()) {
|
if (this.field.toUpperCase() === 'selectStationCode'.toUpperCase()) {
|
||||||
this.addModel.sectionCode = selected.code;
|
this.addModel.sectionCode = selected.code;
|
||||||
@ -202,6 +209,45 @@ export default {
|
|||||||
this.$emit('stationSectionCode', '');
|
this.$emit('stationSectionCode', '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
changeChargeStation(data) {
|
||||||
|
if (data.length > 0) {
|
||||||
|
this.chargeStation.forEach(station=>{
|
||||||
|
const newModal = Object.assign({}, station);
|
||||||
|
newModal.controlled = false;
|
||||||
|
newModal.concentrateStationCode = '';
|
||||||
|
data.forEach(each=>{
|
||||||
|
switch (each) {
|
||||||
|
case station.code: {
|
||||||
|
newModal.controlled = true;
|
||||||
|
newModal.concentrateStationCode = this.editModel.code;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$emit('updateMapModel', newModal);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.chargeStation.forEach(station=>{
|
||||||
|
const newModal = Object.assign({}, station);
|
||||||
|
newModal.controlled = false;
|
||||||
|
newModal.concentrateStationCode = '';
|
||||||
|
this.$emit('updateMapModel', newModal);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.edit();
|
||||||
|
},
|
||||||
|
changeCentralized(data) {
|
||||||
|
if (!data) {
|
||||||
|
this.editModel.chargeStationCodeList = [];
|
||||||
|
this.edit();
|
||||||
|
this.chargeStation.forEach(station=>{
|
||||||
|
const newModal = Object.assign({}, station);
|
||||||
|
newModal.controlled = false;
|
||||||
|
newModal.concentrateStationCode = '';
|
||||||
|
this.$emit('updateMapModel', newModal);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
hover(field) {
|
hover(field) {
|
||||||
this.field = field === this.field ? '' : field;
|
this.field = field === this.field ? '' : field;
|
||||||
this.$emit('stationSectionCode', this.field);
|
this.$emit('stationSectionCode', this.field);
|
||||||
@ -224,7 +270,9 @@ export default {
|
|||||||
kmPostFont: '8px consolas',
|
kmPostFont: '8px consolas',
|
||||||
kmPostFontColor: '#FFFFFF',
|
kmPostFontColor: '#FFFFFF',
|
||||||
centralized: false,
|
centralized: false,
|
||||||
concentrateStationCode: ''
|
concentrateStationCode: '',
|
||||||
|
controlled:false,
|
||||||
|
chargeStationCodeList:[]
|
||||||
};
|
};
|
||||||
this.sectionList.forEach(elem => {
|
this.sectionList.forEach(elem => {
|
||||||
if (elem.code === this.addModel.sectionCode) {
|
if (elem.code === this.addModel.sectionCode) {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.equipmentStation')" prop="deviceStationCode">
|
<el-form-item :label="$t('map.equipmentStation')" prop="deviceStationCode">
|
||||||
<el-select v-model="addModel.deviceStationCode" filterable>
|
<el-select v-model="addModel.deviceStationCode" filterable disabled>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in stationList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
@ -149,7 +149,7 @@ export default {
|
|||||||
map: {
|
map: {
|
||||||
name: this.$t('map.mapData'),
|
name: this.$t('map.mapData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView },
|
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView, disabled:true},
|
||||||
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView }
|
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user