diff --git a/src/views/newMap/newDesignUser/mapmanage/operateMenu.vue b/src/views/newMap/newDesignUser/mapmanage/operateMenu.vue index ae7a5413b..119dff1c3 100644 --- a/src/views/newMap/newDesignUser/mapmanage/operateMenu.vue +++ b/src/views/newMap/newDesignUser/mapmanage/operateMenu.vue @@ -141,9 +141,6 @@ export default { '$store.state.menuOperation.menuCount': function (val) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Map)) { this.menu = [...this.menuMap]; - // if (this.hasRelease) { - // this.menu.push(this.publishMapMenu); - // } this.doShow(this.$store.state.menuOperation.menuPosition); } else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) { this.initCancelMenu(); diff --git a/src/views/newMap/newMapdraft/mapoperate/models.js b/src/views/newMap/newMapdraft/mapoperate/models.js index cbfa5ee03..183bd9dbc 100644 --- a/src/views/newMap/newMapdraft/mapoperate/models.js +++ b/src/views/newMap/newMapdraft/mapoperate/models.js @@ -129,7 +129,8 @@ class Model { this.kmPostFontColor = '#FFFFFF'; this.isShowControlMode = ''; this.chargeStationCodeList = []; - this.relStationCodeList = []; // 联锁站关联车站列表 + this.relStationCodeList = []; // 生成交路车站列表 + this.routingStationList = []; // 联锁站关联车站列表 this.position = { x: 0, y: 0 }; this.kilometerPosition = { x: 0, y: 0 }; // 公里标偏移坐标 this.createControlMode = false; diff --git a/src/views/newMap/newMapdraft/mapoperate/station.vue b/src/views/newMap/newMapdraft/mapoperate/station.vue index f4e492078..015ffd4ce 100644 --- a/src/views/newMap/newMapdraft/mapoperate/station.vue +++ b/src/views/newMap/newMapdraft/mapoperate/station.vue @@ -102,8 +102,8 @@ export default { props: { selected: { type: Object, - default: function () { - return null; + default() { + return {}; } } }, @@ -111,7 +111,7 @@ export default { return { activeName: 'first', lazy: true, - // field: '', + field: '', chargeStation:[], relStationList: [], // 车站列表 controlled:false, @@ -203,6 +203,7 @@ export default { { prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList, isHidden: !this.isZcCode, disabled:true }, { prop: 'chargeStationCodeList', label: '管理车站列表:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.chargeStation, isHidden: !this.isZcCode }, { prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation}, + { prop: 'routingStationList', label: '生成交路的车站:', type: 'multiSelectHover', optionLabel: 'name', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'routingStation', buttonShowType: this.routingStationButtonShow }, { prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }, { prop: 'jp', label: '车站简称', type: 'input' } ] @@ -247,15 +248,26 @@ export default { }, isReentry() { return this.editModel.reentry; + }, + routingStationButtonShow() { + return this.field === 'routingStation'; } }, methods: { + hover(field) { + this.field = field == this.field ? '' : field; + if (this.field) { + this.$emit('deviceSelect', 'Station'); + } else { + this.$emit('deviceSelect', ''); + } + }, deviceChange(code) { this.$emit('setCenter', code); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); }, deviceSelect(selected) { - if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) { + if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field != 'routingStation') { this.editModel = getModel('Station'); this.$refs.dataform && this.$refs.dataform.resetFields(); this.activeName = 'first'; @@ -285,6 +297,11 @@ export default { return !data.centralized && data.code != this.editModel.code && !(beCentralizedStation[data.code] && beCentralizedStation[data.code] != this.editModel.code); }); this.controlled = !!beCentralizedStation[selected.code]; + } else if (selected && selected._type === 'Station' && this.field == 'routingStation') { + this.activeName = 'first'; + if (!this.editModel.routingStationList.includes(selected.code) && this.editModel.code != selected.code) { + this.editModel.routingStationList.push(selected.code); + } } }, // 选择管理车站