调整保存字段

This commit is contained in:
zyy 2020-05-28 15:02:15 +08:00
parent 6eefedb434
commit 55f57e2135
4 changed files with 9 additions and 10 deletions

View File

@ -318,8 +318,7 @@ export default class Station extends Group {
setState(model) {
if (!this.isShowShape) return;
this.recover();
// model.controlMode && this['handle' + model.controlMode]();
this.handleLocal();
model.controlMode && this['handle' + model.controlMode]();
}
getShapeTipPoint(opts) {

View File

@ -147,7 +147,7 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(data.arrowList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.Arrow, elem, propConvert, showConfig);
}, this);
zrUtil.each(data.powerList || [], elem => {
zrUtil.each(data.powerLineList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.Power, elem, propConvert, showConfig);
}, this);
zrUtil.each(data.indicatorLightList || [], elem => {
@ -329,7 +329,7 @@ export function updateMapData(state, model) {
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
case deviceType.Power: updateForList(model, state, 'powerList'); break;
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
}
}
}

View File

@ -342,9 +342,9 @@ const map = {
return [];
}
},
powerList: (state) => {
powerLineList: (state) => {
if (state.map) {
return state.map.powerList || [];
return state.map.powerLineList || [];
} else {
return [];
}

View File

@ -110,7 +110,7 @@ export default {
editModel: {
code: '',
width: 1,
leftTerminal: true,
leftTerminal: true, //
rightTerminal: true,
showConditions: '01', //
points: []
@ -143,7 +143,7 @@ export default {
},
computed: {
...mapGetters('map', [
'powerList'
'powerLineList'
]),
form() {
const form = {
@ -156,7 +156,7 @@ export default {
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: '供电线路', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.powerList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: '供电线路', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.powerLineList, change: true, deviceChange: this.deviceChange },
{ prop: 'width', label: '供电线路宽度', type: 'number', min: 1, placeholder: 'px' },
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
{ prop: 'leftTerminal', label: '左侧端点:', type: 'select', optionLabel: 'label', optionValue:'value', options: this.terminalList},
@ -213,7 +213,7 @@ export default {
const pointArr = JSON.stringify(this.addModel.points);
const model = {
_type: 'Power',
code: getUID('Power', this.powerList),
code: getUID('Power', this.powerLineList),
width: this.addModel.width,
leftTerminal: true,
rightTerminal: true,