-
+
- 修改
- 删除
+ {{ $t('map.updateObj') }}
+ {{ $t('map.deleteObj') }}
-
+
@@ -18,21 +18,21 @@
v-model="linksCollection"
filterable
:filter-method="filterLinks"
- filter-placeholder="请输入Link名称"
+ :filter-placeholder="$t('rules.linkSelectName')"
:data="DatasCollection"
- :titles="['Link集合', '选择Link']"
+ :titles="[$t('map.linkSet'), $t('map.selectLink')]"
/>
- 创建
+ {{ $t('map.create') }}
-
+
-
+
激活
+ >{{ $t('map.activate') }}
-
+
px
- 拆分
+ {{ $t('map.split') }}
-
-
+
+
激活
+ >{{ $t('map.activate') }}
-
-
+
+
激活
+ >{{ $t('map.activate') }}
- 合并
+ {{ $t('map.merge') }}
-
+
-
+
- 第{{ scope.row.index }}段折线
+ {{ $t('map.aux') }}{{ scope.row.index }}{{ $t('map.sectionLine') }}
-
+
-
+
- 清空
+ {{ $t('map.empty') }}
- 修改
+ {{ $t('map.updateObj') }}
-
+
- 一键删除道岔区段
- 一键创建道岔区段
+ {{ $t('map.deleteSwitchSection') }}
+ {{ $t('map.createSwitchSection') }}
-
+
-
+
-
-
+
+
- 修改
+ {{ $t('map.updateObj') }}
@@ -247,24 +247,24 @@ export default {
field: '',
addRules: {
code: [
- { required: true, message: '请选择区段名称', trigger: 'change' }
+ { required: true, message: this.$t('rules.pleaseSelectSectionName'), trigger: 'change' }
],
splitOffset: [
- { required: true, message: '请填写偏移量', trigger: 'blur' },
- { type: 'number', message: '请填写数值', min: '20' }
+ { required: true, message: this.$t('rules.pleaseFillOffset'), trigger: 'blur' },
+ { type: 'number', message: this.$t('rules.pleaseFillValue'), min: '20' }
]
},
mergeRules: {
lsectioncode: [
- { required: true, message: '请选择左侧区段名称', trigger: 'change' }
+ { required: true, message: this.$t('rules.pleaseSelectLeftSectionName'), trigger: 'change' }
],
rsectioncode: [
- { required: true, message: '请选择右侧区段名称', trigger: 'change' }
+ { required: true, message: this.$t('rules.pleaseSelectRightSectionName'), trigger: 'change' }
]
},
editRule: {
pointY: [
- { required: true, message: '请输入坐标Y值', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterYValue'), trigger: 'blur' }
]
}
};
@@ -283,68 +283,68 @@ export default {
const form = {
labelWidth: '160px',
items: [
- { prop: 'stationCode', label: '所属设备集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
- { prop: 'parentCode', label: '关联物理区段:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
- { prop: 'code', label: '区段编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
- { prop: 'type', label: '区段类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList },
- { prop: 'name', label: '区段名称:', type: 'input' },
- { prop: 'namePoint', label: '区段名称偏移量:', type: 'coordinate', width: '150px', children: [
+ { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
+ { prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
+ { prop: 'code', label: this.$t('map.blockCoding'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
+ { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList },
+ { prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
+ { prop: 'namePoint', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] },
- { prop: 'kmRangeLeft', label: '左侧公里标(米):', type: 'number', min: 0 },
- { prop: 'kmRangeRight', label: '右侧公里标(米):', type: 'number', min: 0 },
- { prop: 'region', label: '区间:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
- { prop: 'nameShow', label: '是否显示区段名称:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'axleShow', label: '是否显示计轴:', type: 'checkbox', disabled: this.isStationAxleShow, isHidden: !this.isSectionType},
- { prop: 'logicSectionShow', label: '是否显示逻辑区段:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'logicSectionNameShow', label: '是否显示逻辑区段名称:', type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSectionType },
- { prop: 'isStandTrack', label: '是否站台轨:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'standTrackName', label: '站台轨名称:', type: 'input', isHidden: !this.isstandTrackNameShow },
- { prop: 'standTrackNamePosition', label: '站台轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
+ { prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0 },
+ { prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0 },
+ { prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
+ { prop: 'nameShow', label: this.$t('map.displayExtentName'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'axleShow', label: this.$t('map.displayAxleCounter'), type: 'checkbox', disabled: this.isStationAxleShow, isHidden: !this.isSectionType},
+ { prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'logicSectionNameShow', label: this.$t('map.displayLogicalWxtentNames'), type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSectionType },
+ { prop: 'isStandTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
+ { prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] },
- { prop: 'relStandCode', label: '站台编码:', type: 'selectHover', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, hover: this.hover, buttonType: 'relStandCode', buttonShowType: this.isButtonType, isHidden: !this.isrelStandCode },
- { prop: 'isReentryTrack', label: '是否折返轨:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'reentryTrackName', label: '折返轨名称:', type: 'input', isHidden: !this.isreentryTrackName },
- { prop: 'reentryTrackNamePosition', label: '折返轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
+ { prop: 'relStandCode', label: this.$t('map.relStandCode'), type: 'selectHover', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, hover: this.hover, buttonType: 'relStandCode', buttonShowType: this.isButtonType, isHidden: !this.isrelStandCode },
+ { prop: 'isReentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName },
+ { prop: 'reentryTrackNamePosition', label: this.$t('map.reentryTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
{ prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] },
- { prop: 'isTransferTrack', label: '是否转换轨:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'transferTrackName', label: '转换轨名称:', type: 'input', isHidden: !this.istransferTrackName },
- { prop: 'transferTrackNamePosition', label: '转换轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
+ { prop: 'isTransferTrack', label: this.$t('map.isTransferTrack'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'transferTrackName', label: this.$t('map.transferTrackName'), type: 'input', isHidden: !this.istransferTrackName },
+ { prop: 'transferTrackNamePosition', label: this.$t('map.transferTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
{ prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
{ prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] },
- { prop: 'destinationCode', label: '目的地码:', type: 'input', isHidden: !this.isdestinationCode },
- { prop: 'destinationCodePoint', label: '目的地码坐标:', type: 'coordinate', width: '150px', isHidden: !this.isdestinationCode, children: [
+ { prop: 'destinationCode', label: this.$t('map.destinationCode'), type: 'input', isHidden: !this.isdestinationCode },
+ { prop: 'destinationCodePoint', label: this.$t('map.destinationCodePoint'), type: 'coordinate', width: '150px', isHidden: !this.isdestinationCode, children: [
{ prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] },
- { prop: 'destinationCodeShow', label: '是否显示目的地码:', type: 'checkbox', isHidden: !this.isdestinationCode },
- { prop: 'leftStopPointOffset', label: '左向停车点偏移量:', type: 'number', min: 0, isHidden: !this.isStopPointOffset },
- { prop: 'rightStopPointOffset', label: '右向停车点偏移量:', type: 'number', min: 0, isHidden: !this.isStopPointOffset },
- { prop: 'isSwitchSection', label: '是否道岔区段:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'relSwitchCode', label: '关联道岔Code:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode },
- { prop: 'logicSectionNameSort', label: '逻辑区段排序:', type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
- {value: true, label: '从小到大'},
- {value: false, label: '从大到小'}
+ { prop: 'destinationCodeShow', label: this.$t('map.destinationCodeShow'), type: 'checkbox', isHidden: !this.isdestinationCode },
+ { prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
+ { prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
+ { prop: 'isSwitchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode },
+ { prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
+ {value: true, label: this.$t('map.fromSmallToLarge')},
+ {value: false, label: this.$t('map.fromLargeToSmall')}
] },
- { prop: 'linkCode', label: '关联的Link:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, disabled: true, isHidden: !this.isSectionType },
- { prop: 'sepTypeLeft', label: '左侧分隔符类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
- { prop: 'offsetLeft', label: '左侧Link偏移量:', type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
- { prop: 'sepTypeRight', label: '右侧分隔符类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
- { prop: 'offsetRight', label: '右侧Link偏移量:', type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
- { prop: 'isSegmentation', label: '是否分割:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'segmentationPosition', label: '默认背景:', type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
+ { prop: 'linkCode', label: this.$t('map.relevanceLinkCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, disabled: true, isHidden: !this.isSectionType },
+ { prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
+ { prop: 'offsetLeft', label: this.$t('map.sectionOffsetLeft'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
+ { prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
+ { prop: 'offsetRight', label: this.$t('map.sectionOffsetRight'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
+ { prop: 'isSegmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'segmentationPosition', label: this.$t('map.segmentationPosition'), type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
{ prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
{ prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
] },
- { prop: 'isCurve', label: '是否曲线:', type: 'checkbox', isHidden: !this.isSectionType },
- { prop: 'points', label: '区段显示坐标:', type: 'points', width: '160px', isHidden: !this.isPointsShow, pointDisabled: this.pointDisabledName, addPoint: this.addPoint, delPoint: this.delPoint },
- { prop: 'trainPosType', label: '列车所在方向:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.TrainPositionTypeList, isHidden: !this.isSectionType }
+ { prop: 'isCurve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSectionType },
+ { prop: 'points', label: this.$t('map.sectionPoints'), type: 'points', width: '160px', isHidden: !this.isPointsShow, pointDisabled: this.pointDisabledName, addPoint: this.addPoint, delPoint: this.delPoint },
+ { prop: 'trainPosType', label: this.$t('map.trainPosType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.TrainPositionTypeList, isHidden: !this.isSectionType }
]
};
return form;
@@ -352,52 +352,52 @@ export default {
rules() {
const rules = {
code: [
- { required: true, message: '请选择设备', trigger: 'change' }
+ { required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
],
name: [
- { required: true, message: '请输入区段名称', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSectionName'), trigger: 'blur' }
],
type: [
- { required: true, message: '请输入区段类型', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSectionType'), trigger: 'blur' }
],
relStandCode: [
- { required: true, message: '请选择关联站台', trigger: 'change' }
+ { required: true, message: this.$t('rules.pleaseSelectAssociatedPlatform'), trigger: 'change' }
],
leftStopPointOffset: [
- { required: true, message: '请输入左向停车点偏移量', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterLeftStopPointOffset'), trigger: 'blur' }
],
rightStopPointOffset: [
- { required: true, message: '请输入右向停车点偏移量', trigger: 'blur' }
+ { required: true, message: this.$t('rules.rightStopPointOffset'), trigger: 'blur' }
],
destinationCode: [
- { required: true, message: '请输入目的地码', trigger: 'blur' }
+ { required: true, message: this.$t('rules.destinationCode'), trigger: 'blur' }
],
'destinationCodePoint.x': [
- { required: true, message: '请输入目的地码坐标X', trigger: 'blur' }
+ { required: true, message: this.$t('rules.destinationCodePointX'), trigger: 'blur' }
],
'destinationCodePoint.y': [
- { required: true, message: '请输入目的地码坐标Y', trigger: 'blur' }
+ { required: true, message: this.$t('rules.destinationCodePointY'), trigger: 'blur' }
],
'namePoint.x': [
- { required: true, message: '请输入区段名称坐标X', trigger: 'blur' }
+ { required: true, message: this.$t('rules.sectionNamePointX'), trigger: 'blur' }
],
'namePoint.y': [
- { required: true, message: '请输入区段名称坐标Y', trigger: 'blur' }
+ { required: true, message: this.$t('rules.sectionNamePointY'), trigger: 'blur' }
],
logicSectionNameSort: [
- { required: true, message: '请选择逻辑区段名称排序', trigger: 'change' }
+ { required: true, message: this.$t('rules.logicSectionNameSort'), trigger: 'change' }
],
offsetLeft: [
- { required: true, message: '请输入左侧Link偏移量', trigger: 'blur' }
+ { required: true, message: this.$t('rules.sectionOffsetLeft'), trigger: 'blur' }
],
sepTypeLeft: [
- { required: true, message: '请选择左侧分隔符', trigger: 'change' }
+ { required: true, message: this.$t('rules.sectionSepTypeLeft'), trigger: 'change' }
],
offsetRight: [
- { required: true, message: '请输入右侧Link偏移量', trigger: 'blur' }
+ { required: true, message: this.$t('rules.sectionOffsetRight'), trigger: 'blur' }
],
sepTypeRight: [
- { required: true, message: '请选择右侧分隔符', trigger: 'change' }
+ { required: true, message: this.$t('rules.sectionSepTypeRight'), trigger: 'change' }
]
};
// 清空表单验证提示信息
@@ -857,9 +857,9 @@ export default {
});
const _that = this;
- this.$confirm('是否确认批量生成?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ this.$confirm(this.$t('tip.confirmBatchGeneration'), this.$t('tip.hint'), {
+ confirmButtonText: this.$t('tip.confirm'),
+ cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', remove);
@@ -867,7 +867,7 @@ export default {
}).catch(() => {
this.$message({
type: 'info',
- message: '已取消批量生成'
+ message: this.$t('tip.cancelGeneration')
});
});
},
@@ -973,15 +973,15 @@ export default {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
const _that = this;
- this.$confirm('是否确认删除?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
+ confirmButtonText: this.$t('tip.confirm'),
+ cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
- _that.$message.info('已取消删除');
+ _that.$message.info(this.$t('tip.cancelledDelete'));
});
}
},
@@ -1117,13 +1117,13 @@ export default {
});
if (!rsection || !lsection) {
- this.$messageBox('存在非物理区段,不能合并');
+ this.$messageBox(this.$t('tip.cannotMerged'));
return;
}
if (rsection && lsection) {
if (lsection.linkCode !== rsection.linkCode) {
- this.$messageBox('不在同一Link上的物理区段不能合并');
+ this.$messageBox(this.$t('tip.linkCannotMerged'));
return;
}
const uid = getUID('Section');
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/signal.vue b/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
index c8aec2ad2..00e5c0191 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
@@ -1,19 +1,18 @@
-
-
+
- 修改
- 删除
+ {{ $t('map.updateObj') }}
+ {{ $t('map.deleteObj') }}
-
+
-
+
-
+
-
+
-
+
- 创建
+ {{ $t('map.create') }}
@@ -129,8 +128,8 @@ export default {
{ code: '08', name: '复位信号机' }
*/
failTypes: [
- { code: '00', name: '正常' },
- { code: '01', name: '灯丝报警' }
+ { code: '00', name: this.$t('map.normal') },
+ { code: '01', name: this.$t('map.signalFilamentAlarm') }
],
editModel: {
code: '',
@@ -174,7 +173,7 @@ export default {
},
mergeRules: {
sectionCode: [
- { required: true, message: '请选择物理区段名称', trigger: 'change' }
+ { required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
]
}
};
@@ -198,30 +197,30 @@ export default {
const form = {
labelWidth: '150px',
items: [
- { prop: 'stationCode', label: '所属设备集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
- { prop: 'code', label: '信号机编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
- { prop: 'name', label: '信号机名称:', type: 'input' },
- { prop: 'uniqueName', label: '信号机唯一名称:', type: 'input' },
- { prop: 'nameShow', label: '是否显示信号机名称:', type: 'checkbox' },
- { prop: 'lampPostType', label: '灯柱类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
- { prop: 'lampPositionType', label: '灯位类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
- { prop: 'useType', label: '用途类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList },
- { prop: 'potLampType', label: '点灯类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },
- { prop: 'directionType', label: '方向类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
- { prop: 'positionType', label: '信号机位置类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPositionTypeList },
+ { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
+ { prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
+ { prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
+ { prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
+ { prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
+ { prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
+ { prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
+ { 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 },
+ { prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
+ { prop: 'positionType', label: this.$t('map.signalPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPositionTypeList },
{ prop: 'linkCode', label: 'LinkCode:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
- { prop: 'offset', label: '偏移量:', type: 'number', min: 0, placeholder: '米' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: '信号机x:', type: 'number', placeholder: '米' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: '信号机y:', type: 'number', placeholder: '米' },
- { prop: 'rotate', label: '旋转角度:', type: 'number', min: -90, max: 90, placeholder: '度' },
- { prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: '信号机名字偏移量 x:', type: 'number', placeholder: 'px' },
- { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'x', label: '信号机名字偏移量 y:', type: 'number', placeholder: 'px' },
- { prop: 'buttonShow', label: '是否显示按钮:', type: 'checkbox' },
- { prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: '按钮x:', type: 'number', placeholder: 'px' },
- { prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'x', label: '按钮y:', type: 'number', placeholder: 'px' },
- { prop: 'guideShow', label: '是否显示引导信号灯:', type: 'checkbox' },
- { prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: '引导信号x:', type: 'number', placeholder: 'px' },
- { prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'x', label: '引导信号y:', type: 'number', placeholder: 'px' }
+ { prop: 'offset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
+ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.signalPositionX'), type: 'number', placeholder: this.$t('tip.meter') },
+ { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.signalPositionY'), type: 'number', placeholder: this.$t('tip.meter') },
+ { prop: 'rotate', label: this.$t('map.signalRotate'), type: 'number', min: -90, max: 90, placeholder: this.$t('tip.angle') },
+ { prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: this.$t('map.signalNamePositionX'), type: 'number', placeholder: 'px' },
+ { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'x', label: this.$t('map.signalNamePositionY'), type: 'number', placeholder: 'px' },
+ { prop: 'buttonShow', label: this.$t('map.signalButtonShow'), type: 'checkbox' },
+ { prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: this.$t('map.signalButtonPositionX'), type: 'number', placeholder: 'px' },
+ { prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'x', label: this.$t('map.signalButtonPositionY'), type: 'number', placeholder: 'px' },
+ { prop: 'guideShow', label: this.$t('map.signalGuideShow'), type: 'checkbox' },
+ { prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: this.$t('map.signalGuidePositionX'), type: 'number', placeholder: 'px' },
+ { prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'x', label: this.$t('map.signalGuidePositionY'), type: 'number', placeholder: 'px' }
]
};
return form;
@@ -229,37 +228,37 @@ export default {
rules() {
const rules = {
code: [
- { required: true, message: '请选择设备', trigger: 'change' }
+ { required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
],
name: [
- { required: true, message: '请输入信号灯名称', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSemaphoreName'), trigger: 'blur' }
],
uniqueName: [
- { required: true, message: '请输入信号机唯一名称', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSignalName'), trigger: 'blur' }
],
offset: [
- { required: true, message: '请输入偏移量', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSignalOffset'), trigger: 'blur' }
],
stationCode: [
- { required: true, message: '请输入设备集中站', trigger: 'change' }
+ { required: true, message: this.$t('rules.pleaseEnterSignalStation'), trigger: 'change' }
],
'position.x': [
- { required: true, message: '信号机x', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSignalPositionX'), trigger: 'blur' }
],
'position.y': [
- { required: true, message: '信号机y', trigger: 'blur' }
+ { required: true, message: this.$t('rules.pleaseEnterSignalPositionY'), trigger: 'blur' }
],
'buttonPosition.x': [
- { required: true, message: '请输入按钮x', trigger: 'blur' }
+ { required: true, message: this.$t('rules.signalButtonPositionX'), trigger: 'blur' }
],
'buttonPosition.y': [
- { required: true, message: '请输入按钮y', trigger: 'blur' }
+ { required: true, message: this.$t('rules.signalButtonPositionY'), trigger: 'blur' }
],
'guidePosition.x': [
- { required: true, message: '请输入引导信号x', trigger: 'blur' }
+ { required: true, message: this.$t('rules.signalGuidePositionX'), trigger: 'blur' }
],
'guidePosition.y': [
- { required: true, message: '请输入引导信号y', trigger: 'blur' }
+ { required: true, message: this.$t('rules,signalGuidePositionY'), trigger: 'blur' }
]
};
// 清空表单验证提示信息
@@ -422,7 +421,7 @@ export default {
this.$emit('addOrUpdateMapModel', model);
} else {
- this.$messageBox('选择的区段为空');
+ this.$messageBox(this.$t('tip.selectedSectionEmpty'));
}
}
});
@@ -478,15 +477,15 @@ export default {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type === 'Signal') {
const _that = this;
- this.$confirm('是否确认删除?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
+ confirmButtonText: this.$t('tip.confirm'),
+ cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
- _that.$message.info('已取消删除');
+ _that.$message.info(this.$t('tip.cancelledDelete'));
});
}
}
@@ -495,5 +494,4 @@ export default {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/station.vue b/src/views/map/mapdraft/mapedit/mapoperate/station.vue
index fbde26af2..2cd3d6fb1 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/station.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/station.vue
@@ -1,19 +1,19 @@
-
+
- 修改
- 删除
+ {{ $t('map.updateObj') }}
+ {{ $t('map.deleteObj') }}
-
+
-
+
- 创建
+ {{ $t('map.create') }}
@@ -85,7 +85,7 @@ export default {
skins: [],
mergeRules: {
sectionCode: [
- { required: true, message: '请选择物理区段名称', trigger: 'blur' }
+ { required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'blur' }
]
}
};
@@ -101,22 +101,22 @@ export default {
const form = {
labelWidth: '150px',
items: [
- { prop: 'concentrateStationCode', label: '所属联锁站编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
- { prop: 'code', label: '车站编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
- { prop: 'zcCode', label: '所属zc区域编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
- { prop: 'centralized', label: '是否集中站:', type: 'checkbox' },
- { prop: 'name', label: '车站名称:', type: 'input' },
- { prop: 'runPlanName', label: '真实名称:', type: 'input' },
- { prop: 'visible', label: '是否显示:', type: 'checkbox' },
- { prop: 'nameFont', label: '车站字体:', type: 'font', placeholder: '车站字体' },
- { prop: 'nameFontColor', label: '车站字体颜色:', type: 'color' },
- { prop: 'kmPostShow', label: '是否显示公里标名称:', type: 'checkbox' },
- { prop: 'kmRange', label: '公里标距离:', type: 'number', min: 0, placeholder: '米' },
- { prop: 'kmPost', label: '公里标名称:', type: 'input' },
- { prop: 'kmPostFont', label: '公里标字体:', type: 'font', placeholder: '公里标字体' },
- { prop: 'kmPostFontColor', label: '公里标字体颜色:', type: 'color' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x坐标:', type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y坐标:', type: 'number', placeholder: 'px' }
+ { prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
+ { prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
+ { prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
+ { prop: 'centralized', label: this.$t('map.centralized'), type: 'checkbox' },
+ { prop: 'name', label: this.$t('map.stationNameColon'), type: 'input' },
+ { prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
+ { prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
+ { prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
+ { prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
+ { prop: 'kmPostShow', label: this.$t('map.stationKmPostShow'), type: 'checkbox' },
+ { prop: 'kmRange', label: this.$t('map.stationKmRange'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
+ { prop: 'kmPost', label: this.$t('map.stationKmPost'), type: 'input' },
+ { prop: 'kmPostFont', label: this.$t('map.stationKmPostFont'), type: 'font', placeholder: this.$t('tip.kilometerFont') },
+ { prop: 'kmPostFontColor', label: this.$t('map.stationKmPostFontColor'), type: 'color' },
+ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.stationPositionX'), type: 'number', placeholder: 'px' },
+ { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.stationPositionY'), type: 'number', placeholder: 'px' }
]
};
return form;
@@ -124,22 +124,22 @@ export default {
rules() {
const rules = {
code: [
- { required: true, message: '请选择设备', trigger: 'change' }
+ { required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
],
name: [
- { required: true, message: '请输入车站名称', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationName'), trigger: 'blur' }
],
kmRange: [
- { required: true, message: '请输入公里标距离', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationKmRange'), trigger: 'blur' }
],
kmPost: [
- { required: true, message: '请输入公里标名称', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationKmPost'), trigger: 'blur' }
],
'position.x': [
- { required: true, message: '请输入x坐标', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationPositionX'), trigger: 'blur' }
],
'position.y': [
- { required: true, message: '请输入y坐标', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationPositionY'), trigger: 'blur' }
]
};
// 清空表单验证提示信息
@@ -287,15 +287,15 @@ export default {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
const _that = this;
- this.$confirm('是否确认删除?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
+ confirmButtonText: this.$t('tip.confirm'),
+ cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
- _that.$message.info('已取消删除');
+ _that.$message.info(this.$t('tip.cancelledDelete'));
});
}
}
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
index c52568b21..d8532a8fc 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
@@ -1,19 +1,19 @@
-
+
- 修改
- 删除
+ {{ $t('map.updateObj') }}
+ {{ $t('map.deleteObj') }}
-
+
-
+
- 创建
+ {{ $t('map.create') }}
@@ -77,7 +77,7 @@ export default {
},
makeRules: {
stationCode: [
- { required: true, message: '请选择车站名称', trigger: 'change' }
+ { required: true, message: this.$t('rules.stationControlStationName'), trigger: 'change' }
]
}
};
@@ -92,16 +92,16 @@ export default {
const form = {
labelWidth: '160px',
items: [
- { prop: 'stationCode', label: '所属设备集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
- { prop: 'code', label: '控制模式编码:', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
- { prop: 'zcCode', label: '所属zc区域编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
- { prop: 'name', label: '控制模式名称:', type: 'input' },
- { prop: 'zokContent', label: '中控内容:', type: 'input' },
- { prop: 'zakContent', label: '站控内容:', type: 'input' },
- { prop: 'jjzkContent', label: '紧急站控/总报警内容:', type: 'input' },
- { prop: 'zzkContent', label: '站中控内容:', type: 'input' },
- { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: '坐标 x:', type: 'number', placeholder: 'px' },
- { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: '坐标 y:', type: 'number', placeholder: 'px' }
+ { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
+ { prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
+ { prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
+ { prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
+ { prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
+ { prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
+ { prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
+ { prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
+ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.stationControlPositionX'), type: 'number', placeholder: 'px' },
+ { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.stationControlPositionY'), type: 'number', placeholder: 'px' }
]
};
return form;
@@ -109,28 +109,28 @@ export default {
rules() {
const rules = {
code: [
- { required: true, message: '请选择设备', trigger: 'change' }
+ { required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
],
stationCode: [
- { required: true, message: '请选择所属车站', trigger: 'change' }
+ { required: true, message: this.$t('rules.stationControlStationCode'), trigger: 'change' }
],
zokContent: [
- { required: true, message: '请输入中控内容', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationControlZokContent'), trigger: 'blur' }
],
zakContent: [
- { required: true, message: '请输入站控内容', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationControlZakContent'), trigger: 'blur' }
],
jjzkContent: [
- { required: true, message: '请输入紧急站控内容', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationControlJjzkContent'), trigger: 'blur' }
],
zzkContent: [
- { required: true, message: '请输入站中控内容', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationControlZzkContent'), trigger: 'blur' }
],
'position.x': [
- { required: true, message: '请输入坐标x', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationControlPositionX'), trigger: 'blur' }
],
'position.y': [
- { required: true, message: '请输入坐标y', trigger: 'blur' }
+ { required: true, message: this.$t('rules.stationControlPositionY'), trigger: 'blur' }
]
};
// 清空表单验证提示信息
diff --git a/src/views/publish/publishMap/index.vue b/src/views/publish/publishMap/index.vue
index 962d25a1b..be34017bc 100644
--- a/src/views/publish/publishMap/index.vue
+++ b/src/views/publish/publishMap/index.vue
@@ -8,6 +8,7 @@
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine } from '@/api/jmap/map';
import { getSkinStyleList } from '@/api/management/mapskin';
import { UrlConfig } from '@/router/index';
+import deviceType from '@/jmap/constant/deviceType';
import localStore from 'storejs';
export default {
@@ -68,7 +69,7 @@ export default {
{
type: 'button',
title: '操作',
- width: '380',
+ width: '420',
buttons: [
{
name: '上架',
@@ -95,6 +96,11 @@ export default {
{
name: '导出地图',
handleClick: this.handleExportMap
+ },
+ {
+ name: '导出',
+ handleClick: this.handleExportMapSame,
+ showControl: () => { return process.env.NODE_ENV === 'development'; }
}
]
}
@@ -217,6 +223,24 @@ export default {
});
},
+ // 部分导出
+ async handleExportMapSame(index, row) {
+ const res = await getPublishMapExport(row.id);
+ const resultData = res.data;
+ if (resultData === false) {
+ return;
+ }
+
+ const self = this;
+ import('@/utils/Export2Excel').then(excel => {
+ self.queryExportDataSame(resultData).then(data => {
+ excel.export_json_excel(data, resultData.name);
+ }).catch(error => {
+ self.$message.error('导出执行异常:' + error.message);
+ });
+ });
+ },
+
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]));
},
@@ -245,6 +269,101 @@ export default {
}
}
+ result.base.push(obj);
+ resolve(result);
+ });
+ },
+ // 格式化数据列表
+ queryExportDataSame(data) {
+ const mapProps = {};
+ const switchType = `${deviceType.Switch.toLowerCase()}List`;
+ const signalType = `${deviceType.Signal.toLowerCase()}List`;
+ const sectionType = `${deviceType.Section.toLowerCase()}List`;
+
+ mapProps[switchType] = {
+ filter: item => { return true; },
+ propList: {
+ 'name': item =>{
+ return item.name;
+ },
+ 'code': item => {
+ return item.code;
+ }
+ }
+ };
+ mapProps[signalType] = {
+ filter: item => { return true; },
+ propList: {
+ 'name': item =>{
+ return item.name;
+ },
+ 'code': item => {
+ return item.code;
+ }
+ }
+ };
+ mapProps[sectionType] = {
+ filter: item => { return item.type == '01'; },
+ propList: {
+ 'name': (item, devices) =>{
+ let name = item.name;
+ if (item.isSwitchSection) {
+ const swchList = devices[switchType];
+ const swch = swchList.find(elem => { return item.relSwitchCode == elem.code; });
+ if (swch) {
+ if (item.code == swch.sectionACode) {
+ name = `${name} (${swch.name}-A)`;
+ } else if (item.code == swch.sectionBCode) {
+ name = `${name} (${swch.name}-B)`;
+ } else if (item.code == swch.sectionCCode) {
+ name = `${name} (${swch.name}-C)`;
+ }
+ }
+ }
+
+ return name;
+ },
+ 'code': item => {
+ return item.code;
+ }
+ }
+ };
+
+ return new Promise((resolve, reject) => {
+ const result = {
+ base: []
+ };
+ const obj = {};
+ for (const i in data) {
+ if (i == 'devices') {
+ for (const v in data[i]) {
+ if (data[i][v].length) {
+ if (mapProps[v]) {
+ const list = [];
+ data[i][v].forEach(device => {
+ if (mapProps[v].filter(device)) {
+ const obj = {};
+ Object.keys(mapProps[v].propList || []).forEach(key => {
+ obj[key] = mapProps[v].propList[key](device, data[i]);
+ });
+ list.push(obj);
+ }
+ });
+ result[v] = list;
+ }
+ } else if (v == 'skinVO') {
+ result[v] = [data[i][v]];
+ }
+ }
+ } else if (data[i] instanceof Object || typeof data[i] != 'object') {
+ obj[i] = data[i];
+ } else if (data[i] instanceof Array) {
+ if (data[i].length) {
+ obj[i] = [...data[i]];
+ }
+ }
+ }
+
result.base.push(obj);
resolve(result);
});
diff --git a/vue.config.js b/vue.config.js
index 06b0d28e9..b2e7bb0a5 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,4 +1,4 @@
-;
+
// import { getBasePathConfig } from '@/utils/baseUrl'
const path = require('path');
@@ -13,7 +13,6 @@ function resolve(dir) {
const name = defaultSettings.title; // page title
const port = 9527; // dev port
-
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
@@ -144,6 +143,6 @@ module.exports = {
config.optimization.runtimeChunk('single');
}
);
- },
+ }
};