区段绘图数据调整roadType不为''
This commit is contained in:
parent
1c8929cb08
commit
35d13ae529
@ -48,7 +48,8 @@ export default {
|
|||||||
'border-right': 'none'
|
'border-right': 'none'
|
||||||
},
|
},
|
||||||
row: {},
|
row: {},
|
||||||
loading: false
|
loading: false,
|
||||||
|
specialOperationList: [OperationEvent.Signal.cancelTrainRoute.lock.menu.operation]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -103,6 +104,9 @@ export default {
|
|||||||
},
|
},
|
||||||
commitEachCommand(requestList) {
|
commitEachCommand(requestList) {
|
||||||
const eachCmd = requestList[0];
|
const eachCmd = requestList[0];
|
||||||
|
if (this.specialOperationList.includes(eachCmd) && eachCmd.cmdType) {
|
||||||
|
// this.handelSpecialOperation(eachCmd);
|
||||||
|
}
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
operation: eachCmd.operation.code,
|
operation: eachCmd.operation.code,
|
||||||
|
@ -149,7 +149,7 @@ export function deepAssign(obj, item) {
|
|||||||
const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象
|
const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象
|
||||||
for (const keys in item) {
|
for (const keys in item) {
|
||||||
if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝
|
if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝
|
||||||
if (typeof item[keys] === 'object') { // 如果值是对象,就递归一下
|
if (item[keys] && typeof item[keys] === 'object') { // 如果值是对象,就递归一下
|
||||||
target[keys] = item[keys].constructor === Array ? [] : {};
|
target[keys] = item[keys].constructor === Array ? [] : {};
|
||||||
target[keys] = deepClone(item[keys]);
|
target[keys] = deepClone(item[keys]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
|||||||
trainPosType: ''
|
trainPosType: ''
|
||||||
},
|
},
|
||||||
roadModel: {
|
roadModel: {
|
||||||
roadType: '',
|
roadType: null,
|
||||||
sectionCode: ''
|
sectionCode: ''
|
||||||
},
|
},
|
||||||
positionTypes: [
|
positionTypes: [
|
||||||
|
@ -226,7 +226,7 @@ export default {
|
|||||||
points: [],
|
points: [],
|
||||||
leftAxlePosition: 0,
|
leftAxlePosition: 0,
|
||||||
rightAxlePosition: 0,
|
rightAxlePosition: 0,
|
||||||
roadType: '',
|
roadType: null,
|
||||||
firstTurnBack: false
|
firstTurnBack: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -123,7 +123,7 @@ export default {
|
|||||||
logicSectionEndOffset: 0,
|
logicSectionEndOffset: 0,
|
||||||
leftAxlePosition: 0,
|
leftAxlePosition: 0,
|
||||||
rightAxlePosition: 0,
|
rightAxlePosition: 0,
|
||||||
roadType: '',
|
roadType: null,
|
||||||
firstTurnBack: false
|
firstTurnBack: false
|
||||||
},
|
},
|
||||||
oldPoint: [], // 区段未修改前 坐标
|
oldPoint: [], // 区段未修改前 坐标
|
||||||
@ -161,7 +161,7 @@ export default {
|
|||||||
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
] },
|
] },
|
||||||
{ prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList }, // 区段类型
|
{ prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList }, // 区段类型
|
||||||
{ prop: 'roadType', label: '线路类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.sectionRoadTypeList, isHidden: !this.isSwitchSectionType},
|
{ prop: 'roadType', label: '线路类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.sectionRoadTypeList, clearable:true, isHidden: !this.isSwitchSectionType, change: true, deviceChange: this.roadTypeChange},
|
||||||
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection}, // 左关联区段
|
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection}, // 左关联区段
|
||||||
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection}, // 右关联区段
|
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection}, // 右关联区段
|
||||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode }, // 所属物理/道岔区段code
|
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode }, // 所属物理/道岔区段code
|
||||||
@ -403,6 +403,9 @@ export default {
|
|||||||
this.$emit('setCenter', code);
|
this.$emit('setCenter', code);
|
||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
},
|
},
|
||||||
|
roadTypeChange(val) {
|
||||||
|
if (!val) { this.editModel.roadType = null; }
|
||||||
|
},
|
||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
// 判断是否激活选择站台
|
// 判断是否激活选择站台
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
|
@ -284,7 +284,7 @@ export default {
|
|||||||
region: '',
|
region: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
relevanceSectionList: [],
|
relevanceSectionList: [],
|
||||||
roadType: '',
|
roadType: null,
|
||||||
firstTurnBack: false
|
firstTurnBack: false
|
||||||
};
|
};
|
||||||
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](lsection.code), { _dispose: true }));
|
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](lsection.code), { _dispose: true }));
|
||||||
|
Loading…
Reference in New Issue
Block a user