区段绘图数据调整roadType不为''
This commit is contained in:
parent
1c8929cb08
commit
35d13ae529
@ -48,7 +48,8 @@ export default {
|
||||
'border-right': 'none'
|
||||
},
|
||||
row: {},
|
||||
loading: false
|
||||
loading: false,
|
||||
specialOperationList: [OperationEvent.Signal.cancelTrainRoute.lock.menu.operation]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -103,6 +104,9 @@ export default {
|
||||
},
|
||||
commitEachCommand(requestList) {
|
||||
const eachCmd = requestList[0];
|
||||
if (this.specialOperationList.includes(eachCmd) && eachCmd.cmdType) {
|
||||
// this.handelSpecialOperation(eachCmd);
|
||||
}
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: eachCmd.operation.code,
|
||||
|
@ -149,7 +149,7 @@ export function deepAssign(obj, item) {
|
||||
const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象
|
||||
for (const keys in item) {
|
||||
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] = deepClone(item[keys]);
|
||||
} else {
|
||||
|
@ -111,7 +111,7 @@ export default {
|
||||
trainPosType: ''
|
||||
},
|
||||
roadModel: {
|
||||
roadType: '',
|
||||
roadType: null,
|
||||
sectionCode: ''
|
||||
},
|
||||
positionTypes: [
|
||||
|
@ -226,7 +226,7 @@ export default {
|
||||
points: [],
|
||||
leftAxlePosition: 0,
|
||||
rightAxlePosition: 0,
|
||||
roadType: '',
|
||||
roadType: null,
|
||||
firstTurnBack: false
|
||||
};
|
||||
},
|
||||
|
@ -123,7 +123,7 @@ export default {
|
||||
logicSectionEndOffset: 0,
|
||||
leftAxlePosition: 0,
|
||||
rightAxlePosition: 0,
|
||||
roadType: '',
|
||||
roadType: null,
|
||||
firstTurnBack: false
|
||||
},
|
||||
oldPoint: [], // 区段未修改前 坐标
|
||||
@ -161,7 +161,7 @@ export default {
|
||||
{ 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: '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: '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
|
||||
@ -403,6 +403,9 @@ export default {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
roadTypeChange(val) {
|
||||
if (!val) { this.editModel.roadType = null; }
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
// 判断是否激活选择站台
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
|
@ -284,8 +284,8 @@ export default {
|
||||
region: '',
|
||||
trainWindowCode: '',
|
||||
relevanceSectionList: [],
|
||||
roadType: '',
|
||||
firstTurnBack: false
|
||||
roadType: null,
|
||||
firstTurnBack: false
|
||||
};
|
||||
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](lsection.code), { _dispose: true }));
|
||||
models.push(deepAssign(this.$store.getters['map/getDeviceByCode'](rsection.code), { _dispose: true }));
|
||||
|
Loading…
Reference in New Issue
Block a user