diff --git a/src/jlmap3d/jl3ddevice/component/moveanimate.js b/src/jlmap3d/jl3ddevice/component/moveanimate.js index bacc0dcbb..04a593d56 100644 --- a/src/jlmap3d/jl3ddevice/component/moveanimate.js +++ b/src/jlmap3d/jl3ddevice/component/moveanimate.js @@ -14,176 +14,6 @@ export function Moveanimate(main){ this.status = true; //当前动画模型 this.nowmodelname = undefined; - //定义所有继电器部件动画 - // this.initlist = function(modellist){ - // - // for(let j=0,lenj=modellist.length;j { let mapnetdata = data.data; getPublish3dMapDetail(mapId).then(netdata => { + console.log(netdata); let assetsdata = JSON.parse(netdata.data.sections); if(assetsdata.link){ scope.datatype = "old"; diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js index b2665436f..c63f21d0a 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js @@ -355,21 +355,22 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta } function traindoorupdate(data){ - + // console.log(data); if(trainmodel.code == data.code){ + if(trainmodel.right == "0"){ if(data.doorCode == "2"){ - if(trainmodel.open != data.open && data.open == "0"){ - trainmodel.open = "0"; + if(trainmodel.openleft != data.open && data.open == "0"){ + trainmodel.openleft = "0"; for(let an=actions["traindoor"].top.length-1;an>=0;an--){ actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration; actions["traindoor"].top[an].timeScale = -1; actions["traindoor"].top[an].play(); } - }else if(trainmodel.open != data.open && data.open == "1"){ - trainmodel.open = "1"; + }else if(trainmodel.openleft != data.open && data.open == "1"){ + trainmodel.openleft = "1"; for(let an=actions["traindoor"].top.length-1;an>=0;an--){ actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].time = 0; @@ -380,16 +381,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta }else{ - if (trainmodel.open != data.open && data.open == '0') { - trainmodel.open = '0'; + if (trainmodel.openright != data.open && data.open == '0') { + trainmodel.openright = '0'; for (let an=actions["traindoor"].down.length-1; an>=0; an--) { actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration; actions["traindoor"].down[an].timeScale = -1; actions["traindoor"].down[an].play(); } - } else if (trainmodel.open != data.open && data.open == '1') { - trainmodel.open = "1"; + } else if (trainmodel.openright != data.open && data.open == '1') { + trainmodel.openright = "1"; for(let an=actions["traindoor"].down.length-1;an>=0;an--){ actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].time = 0; @@ -402,16 +403,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta }else{ if(data.doorCode == "1"){ - if(trainmodel.open != data.open && data.open == "0"){ - trainmodel.open = "0"; + if(trainmodel.openright != data.open && data.open == "0"){ + trainmodel.openright = "0"; for(let an=actions["traindoor"].top.length-1;an>=0;an--){ actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration; actions["traindoor"].top[an].timeScale = -1; actions["traindoor"].top[an].play(); } - }else if(trainmodel.open != data.open && data.open == "1"){ - trainmodel.open = "1"; + }else if(trainmodel.openright != data.open && data.open == "1"){ + trainmodel.openright = "1"; for(let an=actions["traindoor"].top.length-1;an>=0;an--){ actions["traindoor"].top[an].reset(); actions["traindoor"].top[an].time = 0; @@ -422,16 +423,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta }else{ - if (trainmodel.open != data.open && data.open == '0') { - trainmodel.open = '0'; + if (trainmodel.openleft != data.open && data.open == '0') { + trainmodel.openleft = '0'; for (let an=actions["traindoor"].down.length-1; an>=0; an--) { actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration; actions["traindoor"].down[an].timeScale = -1; actions["traindoor"].down[an].play(); } - } else if (trainmodel.open != data.open && data.open == '1') { - trainmodel.open = "1"; + } else if (trainmodel.openleft != data.open && data.open == '1') { + trainmodel.openleft = "1"; for(let an=actions["traindoor"].down.length-1;an>=0;an--){ actions["traindoor"].down[an].reset(); actions["traindoor"].down[an].time = 0; @@ -490,7 +491,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta trainmodel.dispose = "1"; code = trainlisttest.group.children[i].name; trainmodel.rotation.y = 0; - trainmodel.open = '1'; + trainmodel.openleft = '1'; + trainmodel.openright = '1'; trainmodel.curve = null; trainmodel.nextcurve = null; trainmodel.speed = 0; diff --git a/src/jlmap3d/main/loaders/AssetLoader.js b/src/jlmap3d/main/loaders/AssetLoader.js index c73508dd2..42e5bd68a 100644 --- a/src/jlmap3d/main/loaders/AssetLoader.js +++ b/src/jlmap3d/main/loaders/AssetLoader.js @@ -240,6 +240,7 @@ export function AssetLoader(){ // scope.modellist.push(defaultswitch2); let modeldata = JSON.parse(data); + // console.log(data); for(let j=0;j { diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/foshan_01/menus/dialog/standRunLevel.vue index 4a53ffc85..a85029268 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/standRunLevel.vue @@ -188,12 +188,12 @@ export default { getLevelByTime(time) { const times = Object.keys(this.timeList).findIndex(key => { return this.timeList[key].findIndex(obj => { - return obj.value === time; + return obj.value == time; }) >= 0; }).toString(); return times == -1 ? '0' : times; }, - loadInitData(selected, opts) { + loadInitData(selected) { this.tempData = []; const index = this.stationList.findIndex(n => n.code == selected.stationCode); if (selected.direction == '01') { // 下行 @@ -201,18 +201,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})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); + this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(selected.runLevelTime), time: selected.runLevelTime ? selected.runLevelTime : 0, check: !!selected.runLevelTimeForever }); } } 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})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); + this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(selected.runLevelTime), time: selected.runLevelTime ? selected.runLevelTime : 0, check: !!selected.runLevelTimeForever }); } } }, - doShow(operate, selected, opts) { + doShow(operate, selected) { this.selected = selected; // 如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据 if (!this.dialogShow) { @@ -225,7 +225,7 @@ export default { this.stationName = station.name; } } - this.loadInitData(selected, opts); + this.loadInitData(selected); } this.dialogShow = true; @@ -249,10 +249,11 @@ export default { }, timeSelectChange(time) { const operate = { - operation: OperationEvent.StationStand.setRunLevel.choose.operation + operation: OperationEvent.StationStand.setRunLevel.choose.operation, + val: this.time }; - this.time = time.toString(); + this.time = time; this.isSelect = false; this.isConfirm = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -263,7 +264,8 @@ export default { }, levelSelectChange(row) { const operate = { - operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation + operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation, + val: row.level }; this.time = row.time = this.timeList[row.level][0].value; @@ -277,8 +279,10 @@ export default { }, checkChange(check) { const operate = { - operation: OperationEvent.StationStand.setRunLevel.check.operation + operation: OperationEvent.StationStand.setRunLevel.check.operation, + val: check }; + this.isConfirm = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { @@ -299,7 +303,7 @@ export default { operation: OperationEvent.StationStand.setRunLevel.menu.operation, cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, param: { - runLevelTime: this.time, + runLevelTime: Number(this.time), runLevelTimeForever: !!this.tempData[0].check } }; diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue index 4a1abbde7..ee41c0aac 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue @@ -38,8 +38,8 @@ 有效次数
- 一次有效 - 一直有效 + 一次有效 + 一直有效
@@ -128,7 +128,7 @@ export default { }); }, methods: { - doShow(operate, selected, tempDate) { + doShow(operate, selected) { this.selected = selected || {}; // 如果不是断点激活,则需要对初始值进行初始化 if (!this.dialogShow) { @@ -142,11 +142,11 @@ export default { } } - this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02'; - this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime); - // this.effective = tempDate.parkingValidStatus ? true : false; - this.effective = tempDate.parkingValidStatus ? '1' : '0'; + this.control = Number(selected.parkingTime) == -1 ? '01' : '02'; + this.effective = selected.parkingAlwaysValid ? '1' : '0'; this.direction = selected.direction; + + this.time = Number(selected.parkingTime) == -1 ? 15 : Number(selected.parkingTime); } this.dialogShow = true; this.$nextTick(function () { @@ -162,12 +162,13 @@ export default { chooseControl(control) { /** 自动时的默认时间*/ if (control == '01') { - this.inputTime = 15; - this.effective = 1; + this.time = 15; + this.effective = '1'; } const operate = { - operation: OperationEvent.StationStand.setStopTime.choose1.operation + operation: OperationEvent.StationStand.setStopTime.choose1.operation, + val: this.control }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -178,7 +179,8 @@ export default { }, chooseEffective() { const operate = { - operation: OperationEvent.StationStand.setStopTime.choose2.operation + operation: OperationEvent.StationStand.setStopTime.choose2.operation, + val: this.effective }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -190,7 +192,8 @@ export default { inputTime() { const operate = { repeat: true, - operation: OperationEvent.StationStand.setStopTime.input.operation + operation: OperationEvent.StationStand.setStopTime.input.operation, + val: this.time }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -205,11 +208,9 @@ export default { operation: OperationEvent.StationStand.setStopTime.menu.operation, cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, param: { - parkingTime: this.control == '01' ? -1 : 1, - runLevelTime: this.time, + parkingTime: this.control == '01' ? -1 : this.time, parkingAlwaysValid: this.effective == '1' } - // messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`] }; this.loading = true; @@ -217,8 +218,6 @@ export default { this.loading = false; if (valid) { this.doClose(); - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.confirmControl.doShow(operate); } }).catch((error) => { this.loading = false; diff --git a/src/jmapNew/theme/foshan_01/menus/menuButton.vue b/src/jmapNew/theme/foshan_01/menus/menuButton.vue index 090c4cfc0..80e759d1e 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuButton.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuButton.vue @@ -1,9 +1,9 @@