diff --git a/src/jlmap3d/edit/connect/newgetmodels.js b/src/jlmap3d/edit/connect/newgetmodels.js index 138b66af3..70501918e 100644 --- a/src/jlmap3d/edit/connect/newgetmodels.js +++ b/src/jlmap3d/edit/connect/newgetmodels.js @@ -98,16 +98,16 @@ export function getmodels(data) { let backgroundmodel = { id:"1010", - name:"xiansuidao", + name:"nbsuidao", deviceType:"suidaobg", - type:"xiansuidao", + type:"nbsuidao", picUrl:"", - assetUrl:"../../static/model/suidao/xiansuidao.FBX" + assetUrl:"../../static/model/suidao/nbsuidao.FBX" } assets.push(backgroundmodel); models.assets = assets; - models.stationtexture = "xian3"; + models.stationtexture = "nb1"; models.istexture = true; console.log(models); postmap.assets = JSON.stringify(models); diff --git a/src/jlmap3d/jl3ddevice/component/moveanimate.js b/src/jlmap3d/jl3ddevice/component/moveanimate.js index 04a593d56..b66cfaf10 100644 --- a/src/jlmap3d/jl3ddevice/component/moveanimate.js +++ b/src/jlmap3d/jl3ddevice/component/moveanimate.js @@ -231,14 +231,14 @@ export function Moveanimate(main){ pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z)); // if(i == 0){ - scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true,i); - scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,leni-i-1); + scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,i); + scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,leni-i-1); // }else if((i+1)=0;an--){ actions["traindoor"].top[an].stop(); } @@ -216,6 +218,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta actions["traindoor"].down[an].play(); } }else if(trainmodel.openright == "1"){ + updatedoorlight(true,false); trainmodel.openright = "0"; for(let an=actions["traindoor"].down.length-1;an>=0;an--){ actions["traindoor"].down[an].stop(); @@ -429,6 +432,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta } }else if(trainmodel.openleft != data.open && data.open == "1"){ trainmodel.openleft = "1"; + console.log(data); + updatedoorlight(true,false); for(let an=actions["traindoor"].top.length-1;an>=0;an--){ actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].time = 0; @@ -449,6 +454,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta } } else if (trainmodel.openright != data.open && data.open == '1') { trainmodel.openright = "1"; + updatedoorlight(false,true); for(let an=actions["traindoor"].down.length-1;an>=0;an--){ actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].time = 0; @@ -673,6 +679,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta } function simulationreset(data){ + updatedoorlight(false,false); for(let i=0;i { const code = elem.code; const type = elem._type; - if (elem.deviceType === 'TRAIN' && elem.type === 'HEAD') { - elem.serviceNumber = ''; - } else if (elem.deviceType === 'TRAIN' && elem.type === 'MANUAL') { - elem.serviceNumber = ''; - elem.tripNumber = ''; - elem.destinationCode = ''; - } const oDevice = this.mapDevice[code] || deviceFactory(type, elem); this.hookHandle(oDevice, elem); }); diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index b4a218af1..6fc4e9df3 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -104,7 +104,7 @@ export default class TrainBody extends Group { ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) : model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号 const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码 - const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 + const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 this.textTrainServer = new ETextName({ zlevel: model.zlevel, z: model.z + 1, @@ -157,6 +157,22 @@ export default class TrainBody extends Group { textAlign: 'left', textVerticalAlign: 'top' }); + if (style.Train.trainTargetNumber.maskText) { + this.textTrainTargetNumberMask = new ETextName({ + zlevel: model.zlevel, + z: model.z + 2, + x: parseInt(model.point.x + style.Train.trainTargetNumber.trainTargetNumberOffset.x), + y: parseInt(model.point.y + style.Train.trainTargetNumber.trainTargetNumberOffset.y), + text: style.Train.trainTargetNumber.maskText, + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + } this.formatChangePosition(model, style); this.add(this.trainBodyBox); if (style.Train.common.haveTextHSDA) { @@ -338,8 +354,10 @@ export default class TrainBody extends Group { this.style.Train.trainTarget.planTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.planTypeColor}); } else if (type === 'MANUAL') { this.style.Train.trainTargetNumber.manualTypeColor && this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle({textFill: this.style.Train.trainTargetNumber.manualTypeColor}); + this.style.Train.trainNumber.headTypeColor && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.trainNumber.headTypeColor}); } else if (type === 'HEAD') { this.style.Train.trainTargetNumber.headTypeColor && this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle({textFill: this.style.Train.trainTargetNumber.headTypeColor}); + this.style.Train.trainNumber.headTypeColor && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.trainNumber.headTypeColor}); } } setSoonerOrLater(dt) { @@ -392,8 +410,10 @@ export default class TrainBody extends Group { this.add(this.textTrainTarget); } else if (ele == 'groupNumber') { !style.Train.common.fixedCoordinates && this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); + !style.Train.common.fixedCoordinates && this.textTrainTargetNumberMask && this.textTrainTargetNumberMask.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); widthText += this.textTrainTargetNumber.getBoundingRect().width; this.add(this.textTrainTargetNumber); + this.textTrainTargetNumberMask && this.add(this.textTrainTargetNumberMask); } }); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue index f3325f200..7e546a722 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standBackStrategy.vue @@ -22,16 +22,14 @@
{{ $t('menu.upDirection') }} {{ $t('menu.downDirection') }}
@@ -120,12 +118,14 @@ export default { selection: [], isSelect: true, isConfirm: false, - strategy: '' + strategy: '', + upRight: '' }; }, computed: { ...mapGetters('map', [ - 'stationList' + 'stationList', + 'mapConfig' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; @@ -149,23 +149,25 @@ export default { }); }, methods: { - loadInitData(selected, opts) { + loadInitData(selected) { this.tempData = []; const station = this.stationList.find(n => n.code == selected.stationCode); - this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy }); + this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' }); }, - doShow(operate, selected, opts) { + doShow(operate, selected) { + this.selected = selected; if (!this.dialogShow) { this.standStatus = ''; this.stationName = ''; + this.upRight = this.mapConfig.upDirection === 'right'; if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { - this.standStatus = selected.direction; + this.standStatus = selected.right; const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); if (station) { this.stationName = station.name; } } - this.loadInitData(selected, opts); + this.loadInitData(selected); } this.dialogShow = true; @@ -197,7 +199,7 @@ export default { this.strategy = strategy; this.isSelect = false; this.isConfirm = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -213,14 +215,13 @@ export default { const operate = { over: true, operation: OperationEvent.StationStand.setBackStrategy.menu.operation, - val: `${this.strategy}`, cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, param:{ - Stand_ReentryStrategy:this.strategy + standReentryStrategy: this.strategy } }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standControl.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standControl.vue index 185d399cf..1366f9f2d 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standControl.vue @@ -30,6 +30,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from './childDialog/childDialog/noticeInfo'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; +import { menuOperate, commitOperate } from '../utils/menuOperate'; export default { name: 'StandDetainTrain', @@ -124,119 +125,31 @@ export default { }, // 设置扣车 setDetainTrain() { - const step = { - over: true, - operation: OperationEvent.StationStand.setDetainTrain.menu.operation, - cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN - }; - - this.loading = true; - this.$store.dispatch('training/next', step).then(({ valid }) => { - this.loading = false; - this.doClose(); - if (!valid) { - this.$refs.noticeInfo.doShow(step); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(step); - }); + this.sendCommand(menuOperate.StationStand.setDetainTrain); }, // 取消扣车 cancelDetainTrain() { - const step = { - over: true, - operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, - cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN - }; - - this.loading = true; - this.$store.dispatch('training/next', step).then(({ valid }) => { - this.loading = false; - this.doClose(); - if (!valid) { - this.$refs.noticeInfo.doShow(step); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(step); - }); + this.sendCommand(menuOperate.StationStand.cancelDetainTrain); }, // 强制取消扣车 cancelDetainTrainForce() { - const step = { - over: true, - operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation, - cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN - }; - - this.loading = true; - this.$store.dispatch('training/next', step).then(({ valid }) => { - this.loading = false; - this.doClose(); - if (!valid) { - this.$refs.noticeInfo.doShow(step); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(step); - }); + this.sendCommand(menuOperate.StationStand.cancelDetainTrainForce); }, // 提前发车 earlyDeparture() { - const step = { - over: true, - operation: OperationEvent.StationStand.earlyDeparture.menu.operation, - cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART - }; - - this.loading = true; - this.$store.dispatch('training/next', step).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(step); - }); + this.sendCommand(menuOperate.StationStand.earlyDeparture); }, // 设置跳停 setJumpStop() { - const step = { - over: true, - operation: OperationEvent.StationStand.setJumpStop.menu.operation, - val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行 - cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP - }; - - this.loading = true; - this.$store.dispatch('training/next', step).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(step); - }); + this.sendCommand(menuOperate.StationStand.setJumpStop, this.selected.direction); }, // 取消跳停 cancelJumpStop() { - const step = { - over: true, - operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, - val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行 - cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP - }; - + this.sendCommand(menuOperate.StationStand.cancelJumpStop, this.selected.direction); // 站台的上下行方向, 01:下行 /02:上行 + }, + sendCommand(operate, val) { // 发送指令 this.loading = true; - this.$store.dispatch('training/next', step).then(({ valid }) => { + commitOperate(operate, {}, 2, val).then(({valid})=>{ this.loading = false; if (valid) { this.doClose(); @@ -244,16 +157,15 @@ export default { }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(step); + this.$refs.noticeInfo.doShow(); }); }, cancel() { const step = { operation: OperationEvent.Command.cancel.menu.operation }; - this.loading = false; - this.$store.dispatch('training/next', step).then(({ valid }) => { + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetail.vue index cd0b5e891..3531f2fb9 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetail.vue @@ -90,12 +90,11 @@ export default { }); }, methods: { - loadInitData(selected, opts) { + loadInitData(selected) { this.tempData = []; - const index = this.stationList.findIndex(n => n.code == selected.stationCode); let stationStand, station; - if (selected.direction == '01') { // 下行 + if (!selected.right) { // 下行 // 下行时,此站不是最后一站 if (index != 0) { stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code); @@ -110,18 +109,18 @@ export default { } /** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/ - this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: opts.holdStatus == '02' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') }); - this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: opts.holdStatus == '03' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') }); - this.tempData.push({ item: this.$t('menu.stopTime'), status: opts.parkingTime != -1 ? opts.parkingTime : this.$t('menu.automatic2') }); + this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: selected.stationHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') }); + this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: selected.centerHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') }); + this.tempData.push({ item: this.$t('menu.stopTime'), status: selected.parkingTime != -1 ? selected.parkingTime : this.$t('menu.automatic2') }); if (!stationStand || !station) { this.tempData.push({ item: this.$t('menu.runLevel'), status: this.$t('menu.automatic2') }); } else { - this.tempData.push({ item: this.$t('menu.runLevel'), status: opts.intervalRunTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') }); + this.tempData.push({ item: this.$t('menu.runLevel'), status: selected.runLevelTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') }); } - this.tempData.push({ item: this.$t('menu.jumpStop'), status: opts.jumpStopStatus != '01' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') }); - this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : this.$t('menu.default') }); + this.tempData.push({ item: this.$t('menu.jumpStop'), status: selected.assignSkip || selected.allSkip ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') }); + this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : this.$t('menu.default') }); }, - doShow(operate, selected, opts) { + doShow(operate, selected) { if (!this.dialogShow) { this.standName = ''; this.stationName = ''; @@ -132,7 +131,7 @@ export default { this.stationName = station.name; } } - this.loadInitData(selected, opts); + this.loadInitData(selected); } this.dialogShow = true; this.$nextTick(function () { diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetainTrainAll.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetainTrainAll.vue index d5e3640f1..43198ba0e 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetainTrainAll.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standDetainTrainAll.vue @@ -15,10 +15,10 @@ - {{ $t('menu.uplinkBroadly') }} + {{ $t('menu.uplinkBroadly') }} - {{ $t('menu.downlinkBroadly') }} + {{ $t('menu.downlinkBroadly') }} @@ -68,15 +68,17 @@ export default { return { dialogShow: false, loading: false, - upDown: '01', + upDown: true, tempData: [], disabled: true, - operation: '' + operation: '', + rightUp: true }; }, computed: { ...mapGetters('map', [ - 'stationStandList' + 'stationStandList', + 'mapConfig' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; @@ -108,9 +110,10 @@ export default { this.tempData = []; this.stationStandList.forEach(elem => { /** status 01: 未扣车*/ - const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status; + const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}); const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {}); - if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) { + console.log(stand, stand.centerHoldTrain); + if (station && station.visible && stand && stand.centerHoldTrain && elem.right == this.upDown) { this.tempData.push({ stationName: station.name, standName: elem.name }); } }); @@ -124,7 +127,8 @@ export default { // 不是断点激活的菜单应该将状态初始化 if (!this.dialogShow) { this.loading = false; - this.upDown = selected.direction; + this.upDown = selected.right; + this.rightUp = this.mapConfig.upDirection === 'right'; this.loadTableData(); this.operation = operate.operation; } @@ -145,7 +149,7 @@ export default { val: `${upDown}` }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -158,12 +162,12 @@ export default { cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN, val: this.upDown, param: { - Stand_AllLine: this.upDown + isRight: this.upDown } }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -179,7 +183,7 @@ export default { operation: OperationEvent.Command.cancel.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standRunLevel.vue index 958656680..7467d0388 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standRunLevel.vue @@ -112,8 +112,8 @@ export default { }, timeList() { const list = [ - { value: 0, label: this.$t('menu.automatic2') }, - { value: 1, label: '1' } + { value: 0, label: this.$t('menu.automatic2') } + // { value: 1, label: '1' } ]; for (var i = 60; i <= this.maxRunLevel; i++) { list.push({ value: i, label: `${i}` }); @@ -137,7 +137,7 @@ export default { }); }, methods: { - loadInitData(selected, opts) { + loadInitData(selected) { this.tempData = []; const index = this.stationList.findIndex(n => n.code == selected.stationCode); if (selected.direction == '01') { // 下行 @@ -145,18 +145,18 @@ export default { if (index != 0) { const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); - this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); + this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus }); } } else { // 上行时,此站不是最后一站 if (index != this.stationList.length) { const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); - this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); + this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus }); } } }, - doShow(operate, selected, opts) { + doShow(operate, selected) { // 如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据 if (!this.dialogShow) { this.standName = ''; @@ -168,7 +168,7 @@ export default { this.stationName = station.name; } } - this.loadInitData(selected, opts); + this.loadInitData(selected); } this.dialogShow = true; @@ -195,15 +195,13 @@ export default { const operate = { operation: OperationEvent.StationStand.setRunLevel.choose.operation, val: time.toString(), - param: { - Stand_RunLevel: time - } + param: {} }; this.time = time; this.isSelect = false; this.isConfirm = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -213,12 +211,10 @@ export default { const operate = { operation: OperationEvent.StationStand.setRunLevel.check.operation, val: check.toString(), - param: { - Stand_AlwaysValid: !!this.tempData[0].check - } + param: {} }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -231,19 +227,17 @@ export default { }, commit() { if (this.isConfirm) { - const forver = !!this.tempData[0].check; const operate = { operation: OperationEvent.StationStand.setRunLevel.menu.operation, - val: [this.time, forver].join('::'), param:{ - Stand_AlwaysValid:forver, - Stand_RunLevel:this.time + runLevelTimeForever: !!this.tempData[0].check, + runLevelTime: this.time }, messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`] }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -263,7 +257,7 @@ export default { operation: OperationEvent.Command.cancel.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/standStopTime.vue index 11ec73b92..e3af32eb0 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/standStopTime.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/standStopTime.vue @@ -44,8 +44,8 @@
- {{ $t('menu.upDirection') }} - {{ $t('menu.downDirection') }} + {{ $t('menu.upDirection') }} + {{ $t('menu.downDirection') }}
@@ -53,8 +53,8 @@ {{ $t('menu.effectiveNumber') }}
- {{ $t('menu.onceEffective') }} - {{ $t('menu.alwaysEffective') }} + {{ $t('menu.onceEffective') }} + {{ $t('menu.alwaysEffective') }}
@@ -75,7 +75,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import ConfirmControl from './childDialog/confirmControl'; import NoticeInfo from './childDialog/childDialog/noticeInfo'; -import CMD from '@/scripts/cmdPlugin/CommandEnum'; +import { mapGetters } from 'vuex'; export default { name: 'StandStopTime', @@ -93,10 +93,14 @@ export default { effective: false, selected: null, standName: '', - stationName: '' + stationName: '', + upRight: true }; }, computed: { + ...mapGetters('map', [ + 'mapConfig' + ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; }, @@ -143,7 +147,7 @@ export default { }); }, methods: { - doShow(operate, selected, tempDate) { + doShow(operate, selected) { // 如果不是断点激活,则需要对初始值进行初始化 if (!this.dialogShow) { this.standName = ''; @@ -156,10 +160,10 @@ export default { } } - this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02'; - this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime); - this.effective = !!tempDate.parkingValidStatus; - this.direction = selected.direction; + this.control = selected.parkingTime ? '02' : '01'; + this.time = selected.parkingTime ? selected.parkingTime : 15; + this.direction = selected.right; + this.upRight = this.mapConfig.upDirection === 'right'; this.selected = selected || {}; } this.dialogShow = true; @@ -175,19 +179,16 @@ export default { chooseControl(control) { /** 自动时的默认时间*/ if (control == '01') { - this.inputTime = 15; + this.time = 15; this.effective = true; } const operate = { operation: OperationEvent.StationStand.setStopTime.choose1.operation, - val: `${control}`, - param: { - Stand_StopControl: `${control}` - } + param: {} }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -197,12 +198,10 @@ export default { const operate = { operation: OperationEvent.StationStand.setStopTime.choose2.operation, val: `${effective}`, - param: { - Stand_AlwaysValid: `${effective}` - } + param: {} }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -213,12 +212,10 @@ export default { repeat: true, operation: OperationEvent.StationStand.setStopTime.input.operation, val: `${time}`, - param: { - Stand_StopTime: `${time}` - } + param: {} }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } @@ -229,15 +226,14 @@ export default { operation: OperationEvent.StationStand.setStopTime.menu.operation, val: [`${this.control}`, this.time, this.effective].join('::'), param:{ - Stand_StopControl:this.control, - Stand_AlwaysValid:this.effective, - Stand_StopTime:this.time + parkingTime: this.control === '01' ? -1 : this.time, + parkingAlwaysValid: this.control === '01' ? true : this.effective }, messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`] }; this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; if (valid) { this.doClose(); @@ -254,7 +250,7 @@ export default { operation: OperationEvent.Command.close.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/stationCmdControl.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/stationCmdControl.vue index a25a8d7ac..a6e66771e 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/dialog/stationCmdControl.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/stationCmdControl.vue @@ -79,6 +79,7 @@