diff --git a/src/jmapNew/constant/deviceState.js b/src/jmapNew/constant/deviceState.js index 750b9736c..307e035e1 100644 --- a/src/jmapNew/constant/deviceState.js +++ b/src/jmapNew/constant/deviceState.js @@ -134,13 +134,6 @@ deviceState[deviceType.StationStand] = { parkingTime: 0, // 站台停车时间 自动为0 num:0, // 站台上等车人数 // /** 折返策略*/ - // reentryStrategy: { - // Default: '01', /** 默认(缺省值)*/ - // State01: '01', /** 无折返策略 */ - // State02: '02', /** 无人折返 */ - // State03: '03', /** 自动换端 */ - // State04: '04' /** 默认 */ - // }, /** 是否故障*/ fault: 0 /** 非故障*/ }; diff --git a/src/jmapNew/shape/graph/StationStand/EReentry.js b/src/jmapNew/shape/graph/StationStand/EReentry.js index f9f9b821d..4ebcbc31f 100644 --- a/src/jmapNew/shape/graph/StationStand/EReentry.js +++ b/src/jmapNew/shape/graph/StationStand/EReentry.js @@ -63,17 +63,17 @@ class EReentry extends Group { reentryStrategy = model.defaultReentryStrategy; } switch (reentryStrategy) { - case '04': /** 默认*/ - case '01': { + case 'DEFAULT': /** 默认*/ + case 'NONE': { this.reentry && this.reentry.hideMode(); /** 无折返策略*/ break; } - case '02': { + case 'UNMANNED': { this.showMode(); /** 无人折返*/ this.setColor(style.StationStand.reentry.noHumanColor); break; } - case '03':/** 自动换端*/ { + case 'AUTO':/** 自动换端*/ { this.showMode(); this.setColor(style.StationStand.reentry.autoChangeEndsColor); break; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue index b2de8a649..23ef80cbd 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue @@ -68,6 +68,7 @@ import { MapDeviceType } from '@/scripts/cmdPlugin/Config'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; +import { TurnBackTypeMap } from '@/scripts/ConstDic'; export default { name: 'StandDetail', @@ -81,12 +82,7 @@ export default { tempData: [], stationName: '', standName: '', - strategyMap: { - '01': '无折返', - '02': '无人折返', - '03': '自动换端', - '04': '默认' - }, + strategyMap: TurnBackTypeMap, treeData: [ { children: [ @@ -232,7 +228,7 @@ export default { doClose() { this.loading = false; this.dialogShow = false; - this.$root.$emit('dialogClose', this.selected); + this.$root.$emit('dialogClose', this.selected); this.$store.dispatch('training/emitTipFresh'); mouseCancelState(this.selected); }, diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue index 70afc5455..efe048e52 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standDetail.vue @@ -92,12 +92,6 @@ export default { tempData: [], stationName: '', standName: '', - strategyMap: { - '01': '无折返', - '02': '无人折返', - '03': '自动换端', - '04': '默认' - }, runLevelList: [ '自动', '低速', diff --git a/src/jmapNew/theme/components/menus/dialog/standDetail.vue b/src/jmapNew/theme/components/menus/dialog/standDetail.vue index 271828484..d59091ede 100644 --- a/src/jmapNew/theme/components/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/components/menus/dialog/standDetail.vue @@ -62,12 +62,6 @@ export default { dialogShow: false, loading: false, tempData: [], - strategyMap: { - '01': '无折返', - '02': '无人折返', - '03': '自动换端', - '04': '默认' - }, treeData: [ { children: [ diff --git a/src/jmapNew/theme/datie_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/datie_01/menus/dialog/standDetail.vue index 70afc5455..efe048e52 100644 --- a/src/jmapNew/theme/datie_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/datie_01/menus/dialog/standDetail.vue @@ -92,12 +92,6 @@ export default { tempData: [], stationName: '', standName: '', - strategyMap: { - '01': '无折返', - '02': '无人折返', - '03': '自动换端', - '04': '默认' - }, runLevelList: [ '自动', '低速', diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue index 9f3dd0590..6877ab10d 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue @@ -83,6 +83,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo' import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { mapGetters } from 'vuex'; +import ConstConfig from '@/scripts/ConstConfig'; export default { name: 'StandBackStrategy', @@ -95,24 +96,7 @@ export default { dialogShow: false, loading: false, tempData: [], - strategyList: [ - { - value: '01', - label: this.$t('menu.noSwitchback') - }, - { - value: '02', - label: this.$t('menu.noOneSwitchback') - }, - { - value: '03', - label: this.$t('menu.automaticChange') - }, - { - value: '04', - label: this.$t('menu.default') - } - ], + strategyList: ConstConfig.ConstSelect.turnBackTypeList, stationName: '', standStatus: '', selection: [], @@ -147,7 +131,7 @@ export default { loadInitData(selected) { this.tempData = []; const station = this.stationList.find(n => n.code == selected.stationCode); - this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' }); + this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || 'DEFAULT' }); }, doShow(operate, selected) { this.selected = selected; diff --git a/src/jmapNew/theme/xian_01/menus/dialog/standBackStrategy.vue b/src/jmapNew/theme/xian_01/menus/dialog/standBackStrategy.vue index 6db7e986b..02ecdeea8 100644 --- a/src/jmapNew/theme/xian_01/menus/dialog/standBackStrategy.vue +++ b/src/jmapNew/theme/xian_01/menus/dialog/standBackStrategy.vue @@ -71,6 +71,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo' import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { mapGetters } from 'vuex'; +import ConstConfig from '@/scripts/ConstConfig'; export default { name: 'StandBackStrategy', @@ -82,24 +83,7 @@ export default { dialogShow: false, loading: false, tempData: [], - strategyList: [ - { - value: '01', - label: this.$t('menu.noSwitchback') - }, - { - value: '02', - label: this.$t('menu.noOneSwitchback') - }, - { - value: '03', - label: this.$t('menu.automaticChange') - }, - { - value: '04', - label: this.$t('menu.default') - } - ], + strategyList: ConstConfig.ConstSelect.turnBackTypeList, stationName: '', standStatus: '', selection: [], @@ -134,7 +118,7 @@ export default { loadInitData(selected) { this.tempData = []; const station = this.stationList.find(n => n.code == selected.stationCode); - this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' }); + this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || 'DEFAULT' }); }, strategySelectChange(strategy) { const operate = { diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 6ea082b2c..bdf4c6ba5 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -227,6 +227,12 @@ export default { { label: '每日加载', value:'EVERY_DAY' }, { label: '周内加载', value: 'WITHIN_A_WEEK' }, { label: '周末加载', value: 'WEEKEND' } + ], + turnBackTypeList: [ + { label: '无折返', value: 'NONE' }, + { label: '默认', value: 'DEFAULT' }, + { label: '自动换端', value: 'AUTO' }, + { label: '无人折返', value: 'UNMANNED' } ] } }; diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 36f459d53..d79734688 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -1,3 +1,12 @@ +/** +* 折返类型 +*/ +export const TurnBackTypeMap = { + NONE: '无折返', + DEFAULT: '默认', + AUTO: '自动换端', + UNMANNED: '无人折返' +}; /** * 图纸类型 */ diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index 9635891f3..6b1b48679 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -41,6 +41,7 @@