diff --git a/src/i18n/langs/zh/menu.js b/src/i18n/langs/zh/menu.js index a2aa5c5a6..df60e9f1a 100644 --- a/src/i18n/langs/zh/menu.js +++ b/src/i18n/langs/zh/menu.js @@ -51,7 +51,7 @@ export default { menuSignal: { routeSelect: '进路选排', routeCancel: '进路取消', - signalBlock: '信号封闭', + signalBlock: '信号封锁', signalDeblock: '信号解封', signalReopen: '信号重开', guideRouteHandle: '引导进路办理', diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index 9216b42f0..142545358 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -27,7 +27,11 @@ export function parser(data, skinCode, showConfig) { zrUtil.each(centralStationList, elem => { mapDevice[elem.code].stationCode = elem.code; zrUtil.each(elem.chargeStationCodeList || [], item => { - mapDevice[item].stationCode = elem.code; + if (mapDevice[item]) { + mapDevice[item].stationCode = elem.code; + } else { + console.error('未获取到设备' + item); + } }); }); zrUtil.each(data.sectionList || [], elem => { diff --git a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue index 3b021eb83..bc55f7cd9 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue @@ -423,21 +423,21 @@ export default { break; case 'center': operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; - // delete operate.over; + delete operate.over; operate.subType = 'center'; operate.param = {stationCodes: [model.code]}; operate.code = model.code; break; case 'emergency': operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL; - // delete operate.over; + delete operate.over; operate.subType = 'emergency'; operate.param = {stationCodes: [model.code]}; operate.code = model.code; break; case 'interconnected': operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL; - // delete operate.over; + delete operate.over; operate.subType = 'interconnected'; operate.param = {stationCodes: [model.code]}; operate.code = model.code; @@ -447,7 +447,7 @@ export default { this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => { // 判断是否需要 弹窗密码框 // const operate = Object.assign({}, operate); - if (subType == 'center ' || subType == 'emergency' || subType == 'interconnected' ) { + if (subType == 'center' || subType == 'emergency' || subType == 'interconnected' ) { operate['operateNext'] = operate.operation = this.Command.close.password.operation; if (subType == 'center') { operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; diff --git a/src/jmapNew/theme/components/menus/dialog/trainOperation.vue b/src/jmapNew/theme/components/menus/dialog/trainOperation.vue index 317e3ce5e..c69d95e55 100644 --- a/src/jmapNew/theme/components/menus/dialog/trainOperation.vue +++ b/src/jmapNew/theme/components/menus/dialog/trainOperation.vue @@ -34,6 +34,9 @@ + + 自动运行 + @@ -41,6 +44,7 @@ import LeftTrain from '@/assets/left_train.png'; import RightTrain from '@/assets/right_train.png'; import { sandTableTrainControl } from '@/api/simulation'; +import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'TrainOperation', data() { @@ -113,12 +117,36 @@ export default { adjustDirection() { sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: !this.right, speed: this.speed }).then(resp => { this.right = !this.right; - }).catch(err => { this.$message.error(err.message); }); + }).catch(err => { this.$message.error(err.message); }).finally(() => { this.changeSpeedFlag = false; }); }, brakeTrain() { sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => { this.speed = 0; - }).catch(err => { this.$message.error(err.message); }); + }).catch(err => { this.$message.error(err.message); }).finally(() => { this.changeSpeedFlag = false; }); + }, + handleRun() { + const step = { + over: true, + operation: menuOperate.Common.trainDrive.operation, + cmdType: menuOperate.Common.trainDrive.cmdType, + param: { + groupNumber: this.groupNumber, + param: { + speedLimit: '', + through: 0, + targetDeviceCode: '' + } + } + }; + this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$messageBox('Failed to set or cancel the fault!'); + } + }).catch((error) => { + this.$messageBox(error.message || 'Failed to set or cancel the fault!'); + }).finally(() => { this.changeSpeedFlag = false; }); } } }; diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/routeLock.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/routeLock.vue index b7b4ba75b..cac91b5fd 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/routeLock.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/routeLock.vue @@ -107,7 +107,7 @@ export default { this.tempData = [{ code: selected.code, name: selected.name, - status: selected.blockade ? this.$t('menu.unblocked') : this.$t('menu.blocked') }]; + status: selected.blockade ? this.$t('menu.blocked') : this.$t('menu.unblocked') }]; const timer = setInterval(() => { if (this.$refs.table) { this.$refs.table.setCurrentRow(this.tempData[0]); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue index 6612aaa04..d34abda9a 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue @@ -149,7 +149,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -205,7 +205,9 @@ export default { }); }, doShow(point) { - this.initMenu(); + if (!(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER' && this.operatemode !== OperateMode.FAULT)) { + this.initMenu(); + } if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue index da1d05613..72d279552 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue @@ -195,7 +195,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -361,7 +361,9 @@ export default { } }, doShow(point) { - this.initMenu(); + if (!(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER' && this.operatemode !== OperateMode.FAULT)) { + this.initMenu(); + } if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue index 0100537f7..8d64df7cc 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue @@ -131,7 +131,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -154,7 +154,9 @@ export default { }, doShow(point) { if (this.selected.ciStation) { - this.initMenu(); + if (!(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER' && this.operatemode !== OperateMode.FAULT)) { + this.initMenu(); + } if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue index 18ca49971..d429ead2c 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue @@ -185,7 +185,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -221,7 +221,9 @@ export default { // } }, doShow(point) { - this.initMenu(); + if (!(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER' && this.operatemode !== OperateMode.FAULT)) { + this.initMenu(); + } if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue index 8c75d9c2d..d58af0481 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue @@ -153,7 +153,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -207,7 +207,9 @@ export default { }); }, doShow(point) { - this.initMenu(); + if (!(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER' && this.operatemode !== OperateMode.FAULT)) { + this.initMenu(); + } if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue index 829863eaa..50f100a0b 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue @@ -178,7 +178,7 @@ export default { } }, '$store.state.menuOperation.selected': function (val) { - if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'srsandbox') { + if (val._type === 'Train' && val._event === MouseEvent.Left && (this.project === 'srsandbox' || this.project === 'ngysandtable')) { this.$refs.trainOperation.doShow(val); } } diff --git a/src/jmapNew/theme/parser/EqualDistanceParser.js b/src/jmapNew/theme/parser/EqualDistanceParser.js index f7fb72d69..6be03c64e 100644 --- a/src/jmapNew/theme/parser/EqualDistanceParser.js +++ b/src/jmapNew/theme/parser/EqualDistanceParser.js @@ -1,5 +1,5 @@ import { createMartPoint, createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor } from './util'; -import store from '@/store/index'; +// import store from '@/store/index'; const defaultConfig = { /** 边缘高度*/ @@ -49,7 +49,6 @@ class EqualDistanceParser { var idx = 0; var lastPoint = null; var nextPoint = null; - /** 如果车次号为空,不显示名称*/ if (train.tripNumber) { // 如果不是被删除的首个车次 @@ -59,9 +58,9 @@ class EqualDistanceParser { pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; pointdata.directionCode = train.right ? '2' : '1'; - if (!store.state.map.mapConfig.upRight) { - pointdata.directionCode = train.right ? '1' : '2'; - } + // if (!store.state.map.mapConfig.upRight) { + // pointdata.directionCode = train.right ? '1' : '2'; + // } pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ opt.markPointData.push(this.__createMartPoint(pointdata)); @@ -170,10 +169,10 @@ class EqualDistanceParser { runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => { return parseInt(a.secondTime) - parseInt(b.secondTime); }); - let directionCode = elem.right ? '2' : '1'; - if (!store.state.map.mapConfig.upRight) { - directionCode = elem.right ? '1' : '2'; - } + const directionCode = elem.right ? '2' : '1'; + // if (!store.state.map.mapConfig.upRight) { + // directionCode = elem.right ? '1' : '2'; + // } /** 如果此记录车组号的数据为第一条时,则打上标签*/ if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); @@ -262,7 +261,6 @@ class EqualDistanceParser { } else if (directionCode === '2') { defaultValue += sign * this.getEdge() / 2; } - return defaultValue; } diff --git a/src/views/login/normalLogin.vue b/src/views/login/normalLogin.vue index 2c10ddc6a..51fcde7f5 100644 --- a/src/views/login/normalLogin.vue +++ b/src/views/login/normalLogin.vue @@ -331,7 +331,8 @@ export default { mapId: mapId, simType:paramVO.type, project: this.projectCode, - projectDevice:this.$route.query.projectDevice + projectDevice:this.$route.query.projectDevice, + type: this.$route.query.type }; if (config) { if (config.client) { query.client = config.client; } diff --git a/src/views/newMap/display/index.vue b/src/views/newMap/display/index.vue index 93fbdc7b6..52f4dbaee 100644 --- a/src/views/newMap/display/index.vue +++ b/src/views/newMap/display/index.vue @@ -21,7 +21,7 @@ import { getSessionStorage } from '@/utils/auth'; import { mapGetters } from 'vuex'; import TerminalsPicture from './terminals/index'; import SimulationMenu from './simulationMenu/simulationMenu'; -import { getSimulationInfoNew, destroySimulationByAdmin, exitSimulation } from '@/api/simulation'; +import { getSimulationInfoNew } from '@/api/simulation'; import { loadMapDataById, loadRunPlanData } from '@/utils/loaddata'; import { getByGroupStationList } from '@/api/jmap/map'; import { EventBus } from '@/scripts/event-bus'; @@ -134,15 +134,18 @@ export default { }, // 初始化 initLoadData() { - getSimulationInfoNew(this.group).then(resp => { + getSimulationInfoNew(this.group).then(async resp => { if (resp && resp.data && !resp.data.dataError) { this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan); this.$store.dispatch('training/setDomConfig', resp.data.paramVO && resp.data.paramVO.domConfig ? resp.data.paramVO.domConfig : {}); this.$store.dispatch('map/setLinkSwitchMap', resp.data.linkSwitchMap || {}); - loadMapDataById(this.mapId, 'simulation'); if (this.simType === 'METRO') { - this.loadRunPlan(); + this.$store.dispatch('runPlan/clear'); + const respSl = await getByGroupStationList(this.group); + this.$store.dispatch('runPlan/setStations', respSl.data); + await loadRunPlanData(this.group); } + await loadMapDataById(this.mapId, 'simulation'); } else { this.endViewLoading(); this.$messageBox('此地图数据正在维护中,无法运行!'); @@ -154,13 +157,6 @@ export default { this.$message.error('获取仿真信息失败!'); }); }, - loadRunPlan() { - this.$store.dispatch('runPlan/clear'); - getByGroupStationList(this.group).then(resp => { - this.$store.dispatch('runPlan/setStations', resp.data); - loadRunPlanData(this.group); - }); - }, // 结束加载状态 endViewLoading() { this.$nextTick(() => { diff --git a/src/views/newMap/display/terminals/diagramEdit/components/schedule.vue b/src/views/newMap/display/terminals/diagramEdit/components/schedule.vue index 011443c7f..1677e5a3a 100644 --- a/src/views/newMap/display/terminals/diagramEdit/components/schedule.vue +++ b/src/views/newMap/display/terminals/diagramEdit/components/schedule.vue @@ -288,7 +288,13 @@ export default { }, tripNumberModify(row) { if (row) { - this.$refs.modifyService.doShow({serviceNumber:this.$store.state.runPlan.selected.serviceNumber, tripNumber:row.tripNumber}); + let serviceNumber; + if (this.loadRunPlanId) { + serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber; + } else { + serviceNumber = this.$store.state.runPlan.selected.serviceNumber; + } + this.$refs.modifyService.doShow({serviceNumber:serviceNumber, tripNumber:row.tripNumber}); } }, serviceNumberChange(row) { diff --git a/src/views/newMap/display/terminals/diagramPreview.vue b/src/views/newMap/display/terminals/diagramPreview.vue index 50c2e0ef8..35d869381 100644 --- a/src/views/newMap/display/terminals/diagramPreview.vue +++ b/src/views/newMap/display/terminals/diagramPreview.vue @@ -405,7 +405,7 @@ export default { this.destroy(); let startValue = 3600 + this.PlanParser.getTranslation(); const offsetTime = 3600; - const initTime = toTimeStamp(formatDuring(this.$store.state.socket.simulationTimeSync)); + const initTime = toTimeStamp(formatDuring(this.$store.state.socket.simulationTimeSync | 0)); startValue = initTime - this.PlanParser.getTranslation(); option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime; option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime; diff --git a/src/views/newMap/newMapdraft/mapoperate/simulationMember/index.vue b/src/views/newMap/newMapdraft/mapoperate/simulationMember/index.vue index 448d592b3..088e38f0f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/simulationMember/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/simulationMember/index.vue @@ -1007,21 +1007,21 @@ export default { deviceCode: '' }; memberMap[this.generationForm.systemType].push(memberDispatcher); + const memberNccDispatcher = { + id: this.getMemberId(this.generationForm.systemType), + name: '', + type: 'NCC_DISPATCHER', + deviceCode: '' + }; + memberMap[this.generationForm.systemType].push(memberNccDispatcher); + const memberOccDispatcher = { + id: this.getMemberId(this.generationForm.systemType), + name: '', + type: 'OCC_DISPATCHER', + deviceCode: '' + }; + memberMap[this.generationForm.systemType].push(memberOccDispatcher); } - const memberNccDispatcher = { - id: this.getMemberId(this.generationForm.systemType), - name: '', - type: 'NCC_DISPATCHER', - deviceCode: '' - }; - memberMap[this.generationForm.systemType].push(memberNccDispatcher); - const memberOccDispatcher = { - id: this.getMemberId(this.generationForm.systemType), - name: '', - type: 'OCC_DISPATCHER', - deviceCode: '' - }; - memberMap[this.generationForm.systemType].push(memberOccDispatcher); this.stationList.forEach(station => { if (!station.depot) { const member = { diff --git a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue index 5f2056a36..449ffbc8b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue @@ -1,7 +1,7 @@