diff --git a/src/api/chat.js b/src/api/chat.js index 8a578dd05..bf653caf8 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -285,3 +285,11 @@ export function realDeviceIsUsed(group, projectCode) { } }); } + +// 获取仿真成员列表(新版地图) +export function getSimulationMembersNew(group) { + return request({ + url: `/simulation/${group}/members`, + method: 'get' + }); +} diff --git a/src/jlmap3d/jl3dsimulation/jlmap3d.js b/src/jlmap3d/jl3dsimulation/jlmap3d.js index 83e53f0a2..e46cdca2d 100644 --- a/src/jlmap3d/jl3dsimulation/jlmap3d.js +++ b/src/jlmap3d/jl3dsimulation/jlmap3d.js @@ -187,12 +187,12 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { scope.webwork.onmessage = function (event) { //更新列车位置 - if(scope.datatype == "new"){ - - UpdateTrainNew(camera,trainlisttest); - }else{ - UpdateTrain(camera,trainlisttest); - } + // if(scope.datatype == "new"){ + // + // UpdateTrainNew(camera,trainlisttest); + // }else{ + // UpdateTrain(camera,trainlisttest); + // } if(camerarail.moveswitch == true){ // console.log(camerarail.progress); diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue b/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue index 02921ccf3..3bdb6d848 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/switchControl.vue @@ -190,7 +190,7 @@ export default { const operate = { over: true, operation: OperationEvent.Switch.locate.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN + cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION }; this.sendCommand(operate); @@ -200,7 +200,7 @@ export default { const operate = { over: true, operation: OperationEvent.Switch.reverse.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN + cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION }; this.sendCommand(operate); diff --git a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue index f13e3354b..dc2b1669a 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue @@ -45,11 +45,36 @@ export default { Local: [ ], Center: [ - // { - // label: '设置临时限速', - // handler: this.setSpeed, - // cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED - // }, + { + label: '道岔总定', + handler: this.locate, + cmdType:CMD.Switch.CMD_SWITCH_NORMAL_POSITION + }, + { + label: '道岔总反', + handler: this.reverse, + cmdType:CMD.Switch.CMD_SWITCH_REVERSE_POSITION + }, + { + label: '道岔单锁', + handler: this.lock, + cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK + }, + { + label: '道岔单解', + handler: this.unlock, + cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK + }, + { + label: '道岔封闭', + handler: this.block, + cmdType:CMD.Switch.CMD_SWITCH_BLOCK + }, + { + label: '道岔解封', + handler: this.unblock, + cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK + } ] }, menuForce: [ @@ -213,48 +238,84 @@ export default { }, // 单操到定位 locate(selectType) { - commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ - // this.$refs.switchControl.doShow(data.operate, this.selected); + let code = selectType.code; + let type = 3; + if (!code) { + code = this.selected.code; + type = 0; + } + commitOperate(menuOperate.Switch.locate, {switchCode: code}, type).then(({valid, operate})=>{ + !selectType.code && this.$refs.switchControl.doShow(operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 单操到反位 reverse(selectType) { - commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ - // this.$refs.switchControl.doShow(data.operate, this.selected); + let code = selectType.code; + let type = 3; + if (!code) { + code = this.selected.code; + type = 0; + } + commitOperate(menuOperate.Switch.reverse, {switchCode: code}, type).then(({valid, operate})=>{ + !selectType.code && this.$refs.switchControl.doShow(operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 道岔单锁 lock(selectType) { - commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ - // this.$refs.switchControl.doShow(data.operate, this.selected); + let code = selectType.code; + let type = 3; + if (!code) { + code = this.selected.code; + type = 0; + } + commitOperate(menuOperate.Switch.lock, {switchCode: code}, type).then(({valid, operate})=>{ + !selectType.code && this.$refs.switchControl.doShow(operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 道岔解锁 unlock(selectType) { - commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ - // this.$refs.switchUnLock.doShow(data.operate, this.selected); + let code = selectType.code; + let type = 3; + if (!code) { + code = this.selected.code; + type = 0; + } + commitOperate(menuOperate.Switch.unlock, {switchCode: code}, type).then(({valid, operate})=>{ + !selectType.code && this.$refs.switchUnLock.doShow(operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 道岔封锁 block(selectType) { - commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ - // this.$refs.switchControl.doShow(data.operate, this.selected); + let code = selectType.code; + let type = 3; + if (!code) { + code = this.selected.code; + type = 0; + } + commitOperate(menuOperate.Switch.block, {switchCode: code}, type).then(({valid, operate})=>{ + !selectType.code && this.$refs.switchControl.doShow(operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); }, // 道岔解封 unblock(selectType) { - commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ - // this.$refs.switchUnLock.doShow(data.operate, this.selected); + let code = selectType.code; + let type = 3; + if (!code) { + code = this.selected.code; + type = 0; + } + commitOperate(menuOperate.Switch.unblock, {switchCode: code}, type).then(({valid, operate})=>{ + !selectType.code && this.$refs.switchUnLock.doShow(operate, this.selected); }).catch(error=>{ this.$refs.noticeInfo.doShow({}, error.message); }); diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 7070ddc21..9cf863d59 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -89,7 +89,7 @@ export default { ], roleTypeNew:[ {label: '管理员', value: 'ADMIN', enLabel: 'Admin '}, - // {label: '教员', value: 'Instructor', enLabel: 'Instructor '}, + {label: '教员', value: 'Instructor', enLabel: 'Instructor '}, {label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}, {label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '}, {label: '观众', value: 'AUDIENCE', enLabel: 'Audience '}, diff --git a/src/views/jlmap3d/drive/drivecontrol/centerpane.vue b/src/views/jlmap3d/drive/drivecontrol/centerpane.vue index 7487fc01c..b6e259ad7 100644 --- a/src/views/jlmap3d/drive/drivecontrol/centerpane.vue +++ b/src/views/jlmap3d/drive/drivecontrol/centerpane.vue @@ -1,5 +1,5 @@