Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
c089ce1187
@ -9,10 +9,11 @@ export function getMapTree() {
|
||||
}
|
||||
|
||||
/** 草稿地图列表*/
|
||||
export function listMap() {
|
||||
export function listMap(params) {
|
||||
return request({
|
||||
url: '/api/mapBuild/list',
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -554,5 +554,6 @@ export default {
|
||||
coordinateMode: 'Coordinate mode',
|
||||
sectionAssociationMode: 'Section association mode',
|
||||
leftAssociatedSection: 'Left associated section',
|
||||
rightAssociatedSection: 'Right associated section'
|
||||
rightAssociatedSection: 'Right associated section',
|
||||
chargeStationList:'Managed station list'
|
||||
};
|
||||
|
@ -548,5 +548,6 @@ export default {
|
||||
coordinateMode: '坐标方式',
|
||||
sectionAssociationMode: '区段关联方式',
|
||||
leftAssociatedSection: '左关联区段',
|
||||
rightAssociatedSection: '右关联区段'
|
||||
rightAssociatedSection: '右关联区段',
|
||||
chargeStationList:'管理车站列表'
|
||||
};
|
||||
|
@ -151,7 +151,6 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
|
@ -151,7 +151,6 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
|
@ -154,7 +154,6 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
|
@ -151,7 +151,6 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
|
@ -27,7 +27,7 @@ class SkinCode extends defaultStyle {
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
logicText: {
|
||||
show: false, // 逻辑区段名称显示
|
||||
show: true, // 逻辑区段名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 6, // 文字离区段距离
|
||||
fontSize: 8, // 字体大小
|
||||
@ -144,7 +144,6 @@ class SkinCode extends defaultStyle {
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
distance: 0, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: true, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
|
@ -68,13 +68,12 @@ class Signal extends Group {
|
||||
// 信号机名称
|
||||
const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
const textAlign = style.Signal.text.isAlignCenter ? 'middle': this.model.directionShowType == '01'? 'right': 'left';
|
||||
const textAlign = style.Signal.text.isAlignCenter ? 'middle' : this.model.directionShowType == '01' ? 'right' : 'left';
|
||||
const textVerticalAlign = posit == 1 ? 'top' : 'bottom';
|
||||
this.sigName = new ESigName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: false,
|
||||
isNoRotation: style.Signal.text.isNoRotation,
|
||||
style: style,
|
||||
x: sigNameX,
|
||||
y: sigNameY,
|
||||
@ -172,7 +171,7 @@ class Signal extends Group {
|
||||
device.eachChild(item => {
|
||||
if (item instanceof Group) {
|
||||
this.transformRotation(item);
|
||||
} else if (item && item.model && item.model.isNoRotation) {
|
||||
} else if (item) {
|
||||
item.origin = [this.model.position.x, this.model.position.y];
|
||||
item.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||
item.dirty();
|
||||
|
@ -24,7 +24,6 @@ export default class StationControl extends Group {
|
||||
}
|
||||
|
||||
create() {
|
||||
debugger;
|
||||
const model = this.model;
|
||||
// 紧急站控
|
||||
if (this.style.StationControl.lamp.emergencyControlShow) {
|
||||
|
@ -99,7 +99,7 @@ export default {
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await listMap();
|
||||
const res = await listMap({ drawWay:'0'});
|
||||
res.data && res.data.forEach(elem=>{
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
|
@ -143,7 +143,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -152,7 +152,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -245,7 +245,7 @@ export default {
|
||||
}
|
||||
},
|
||||
acquireMapList() {
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -87,7 +87,7 @@ export default {
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await listMap();
|
||||
const res = await listMap({ drawWay:'1'});
|
||||
res.data && res.data.forEach(elem=>{
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
|
@ -143,7 +143,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -152,7 +152,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -245,7 +245,7 @@ export default {
|
||||
}
|
||||
},
|
||||
acquireMapList() {
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({drawWay: '1'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap().then(response => {
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -41,6 +41,26 @@
|
||||
</template>
|
||||
</el-form-item>
|
||||
</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')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-select
|
||||
@ -97,7 +117,7 @@
|
||||
<template v-if="checkFieldType(item, 'radio')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-radio-group v-model="formModel[item.prop]" :disabled="item.disabled">
|
||||
<el-radio v-for="(opts, indexs) in item.radioList" :key="indexs" :border="item.border" :label="opts.value">{{ opts.label }}</el-radio>
|
||||
<el-radio v-for="(opts, indexs) in item.radioList" :key="indexs" :border="item.border" :label="opts[item.optionValue]||opts.value">{{ opts[item.optionLabel]||opts.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
@ -32,45 +32,46 @@
|
||||
@click="hover('selectSingalCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="信号机名称:" prop="name">
|
||||
<el-input v-model="addModel.name" style="width: 178px;" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.leftOrRight')" prop="leftOrRight">
|
||||
<el-select v-model="addModel.leftOrRight" filterable>
|
||||
<el-option
|
||||
<el-radio-group v-model="addModel.leftOrRight">
|
||||
<el-radio
|
||||
v-for="item in SignalLeftOrRightList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.directionType')" prop="directionType">
|
||||
<el-select v-model="addModel.directionType" filterable>
|
||||
<el-option
|
||||
v-for="item in SignalDirectionTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
:label="item.value"
|
||||
border
|
||||
size="mini"
|
||||
>
|
||||
{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.signalDirectionTypeX')" prop="directionShowType">
|
||||
<el-select v-model="addModel.directionShowType" filterable>
|
||||
<el-option
|
||||
<el-radio-group v-model="addModel.directionShowType">
|
||||
<el-radio
|
||||
v-for="item in SignalDirectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
:label="item.code"
|
||||
border
|
||||
size="mini"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.positionType')" prop="positionType">
|
||||
<el-select v-model="addModel.positionType" filterable>
|
||||
<el-option
|
||||
<el-radio-group v-model="addModel.positionType">
|
||||
<el-radio
|
||||
v-for="item in SignalPositionTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
:label="item.code"
|
||||
border
|
||||
size="mini"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.equipmentStation')" prop="stationCode">
|
||||
<el-select v-model="addModel.stationCode" filterable>
|
||||
@ -125,7 +126,6 @@ export default {
|
||||
SignalPotLampTypeList: [],
|
||||
SignalLampPostTypeList: [],
|
||||
SignalLampPositionTypeList: [],
|
||||
SignalDirectionTypeList: [],
|
||||
SignalPositionTypeList: [],
|
||||
SignalUseTypeList: [],
|
||||
failTypes: [
|
||||
@ -141,7 +141,6 @@ export default {
|
||||
lampPositionType: '',
|
||||
potLampType: '01',
|
||||
directionShowType: '',
|
||||
directionType: '',
|
||||
positionType: '',
|
||||
namePosition: { x: 0, y: 0 },
|
||||
useType: '',
|
||||
@ -158,7 +157,7 @@ export default {
|
||||
field: '',
|
||||
addModel: {
|
||||
sectionCode: '',
|
||||
directionType: '01',
|
||||
name: '',
|
||||
directionShowType: '01',
|
||||
leftOrRight: '0',
|
||||
positionType: '01',
|
||||
@ -168,9 +167,6 @@ export default {
|
||||
sectionCode: [
|
||||
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
||||
],
|
||||
directionType: [
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.directionType'), trigger: 'change' }
|
||||
],
|
||||
directionShowType: [
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.directionType'), trigger: 'change' }
|
||||
],
|
||||
@ -181,7 +177,7 @@ export default {
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.positionType'), trigger: 'change' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.equipmentStation'), trigger: 'change' }
|
||||
{ required: false, message: this.$t('map.pleaseSelect') + '' + this.$t('map.equipmentStation'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -228,10 +224,10 @@ export default {
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
||||
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.SignalLampPostTypeList },
|
||||
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
||||
{ prop: 'directionShowType', label: this.$t('map.signalDirectionTypeX'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionList },
|
||||
{ prop: 'positionType', label: this.$t('map.signalPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPositionTypeList },
|
||||
{ prop: 'directionShowType', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.SignalDirectionList },
|
||||
{ prop: 'positionType', label: this.$t('map.signalPositionType'), type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.SignalPositionTypeList },
|
||||
{ prop: 'rotate', label: this.$t('map.rotateAngle'), type: 'number', min: -90, max: 90, placeholder: this.$t('tip.angle') },
|
||||
{ prop: 'namePosition', label: this.$t('map.signalNamePosition'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
@ -253,7 +249,6 @@ export default {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
|
||||
{ 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: 'potLampType', label: this.$t('map.potLampType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },
|
||||
@ -320,10 +315,6 @@ export default {
|
||||
this.SignalLampPositionTypeList = list;
|
||||
});
|
||||
|
||||
this.$Dictionary.signalDirectionType().then(list => {
|
||||
this.SignalDirectionTypeList = list;
|
||||
});
|
||||
|
||||
this.$Dictionary.signalPositionType().then(list => {
|
||||
this.SignalPositionTypeList = list;
|
||||
});
|
||||
@ -369,7 +360,6 @@ export default {
|
||||
uniqueName: uid,
|
||||
sectionCode: this.addModel.sectionCode,
|
||||
positionType: this.addModel.positionType,
|
||||
directionType: this.addModel.directionType,
|
||||
directionShowType: this.addModel.directionShowType,
|
||||
nameShow: true,
|
||||
namePosition: { x: 0, y: 0 },
|
||||
@ -383,7 +373,7 @@ export default {
|
||||
};
|
||||
this.sectionList.forEach(elem => {
|
||||
if (elem.code === this.addModel.sectionCode) {
|
||||
model.name = 'Signal_' + elem.name.replace('Section_', '');
|
||||
model.name = this.addModel.name || 'Signal_' + elem.name.replace('Section_', '');
|
||||
model.linkCode = elem.code;
|
||||
if (this.addModel.leftOrRight === '0') {
|
||||
const beg = elem.points[0];
|
||||
|
@ -67,6 +67,7 @@ export default {
|
||||
return {
|
||||
activeName: 'first',
|
||||
field: '',
|
||||
chargeStation:[],
|
||||
editModel: {
|
||||
centralized: false,
|
||||
concentrateStationCode: '',
|
||||
@ -83,10 +84,12 @@ export default {
|
||||
kmPostFont: '',
|
||||
kmPostFontColor: '#FFFFFF',
|
||||
isShowControlMode: '',
|
||||
chargeStationCodeList:[],
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
controlled:false
|
||||
},
|
||||
addModel: {
|
||||
sectionCode: ''
|
||||
@ -135,9 +138,10 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'centralized', label: this.$t('map.centralized'), type: 'checkbox' },
|
||||
{ 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', 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: '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' }
|
||||
]
|
||||
}
|
||||
@ -194,6 +198,9 @@ export default {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
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()) {
|
||||
this.addModel.sectionCode = selected.code;
|
||||
@ -202,6 +209,45 @@ export default {
|
||||
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) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('stationSectionCode', this.field);
|
||||
@ -224,7 +270,9 @@ export default {
|
||||
kmPostFont: '8px consolas',
|
||||
kmPostFontColor: '#FFFFFF',
|
||||
centralized: false,
|
||||
concentrateStationCode: ''
|
||||
concentrateStationCode: '',
|
||||
controlled:false,
|
||||
chargeStationCodeList:[]
|
||||
};
|
||||
this.sectionList.forEach(elem => {
|
||||
if (elem.code === this.addModel.sectionCode) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
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 }
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user