diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/fuzhou_01/menus/menuDialog/stationControlConvert.vue index 4e9e098ab..364ba71a7 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuDialog/stationControlConvert.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuDialog/stationControlConvert.vue @@ -153,11 +153,13 @@ export default { '$store.state.map.controlTransfer':function (controlTransferList) { controlTransferList.forEach(controlTransfer=>{ this.updateTableValue(controlTransfer); - if (controlTransfer.applicantId && controlTransfer.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') { - this.$emit('warningInfoDoShow', controlTransfer); - } }); }, + '$store.state.socket.controlTransfer': function(val) { + if (val && val.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') { + this.$emit('warningInfoDoShow', val); + } + }, // 深度数据状态 tableData: { handler(val, oldVal) { diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuDialog/warningInfo.vue b/src/jmapNew/theme/fuzhou_01/menus/menuDialog/warningInfo.vue index c2f0a8543..d6ea711f7 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuDialog/warningInfo.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuDialog/warningInfo.vue @@ -83,7 +83,7 @@ export default { }, computed: { closeAlarm() { - return OperationEvent.Command.close.alarm; + return OperationEvent.StationControl.requestStationControl.awaitAlarm; } }, methods: { @@ -91,7 +91,7 @@ export default { const operate = { cancel: true, userOperationType: UserOperationType.LEFTCLICK, - operation: OperationEvent.Command.close.alarm.operation + operation: this.closeAlarm.operation }; this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { if (valid) { @@ -100,7 +100,7 @@ export default { }); }, doShow(info) { - const station = this.$store.getters['map/getDeviceByCode'](info.code); + const station = this.$store.getters['map/getDeviceByCode'](info.stationCode); this.stationName = station.name; this.time = parseTime(this.$store.state.training.initTime); this.show = true; diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue index 0bbd9988b..add15bbc7 100644 --- a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue @@ -161,14 +161,13 @@ export default { '$store.state.map.controlTransfer':function (controlTransferList) { controlTransferList.forEach(controlTransfer=>{ this.updateTableValue(controlTransfer); - if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] && - this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id && - this.work === 'localWork' - ) { - this.$emit('warningInfoDoShow', controlTransfer); - } }); }, + '$store.state.socket.controlTransfer': function(val) { + if (val && val.applicantId == this.$store.state.training.myMemberId && this.$store.state.map.picture === 'localWork') { + this.$emit('warningInfoDoShow', val); + } + }, // 深度数据状态 tableData: { handler(val, oldVal) { diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue index 6b5ab9e15..a72afa0d3 100644 --- a/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue @@ -83,7 +83,7 @@ export default { }, computed: { closeAlarm() { - return OperationEvent.Command.close.alarm; + return OperationEvent.StationControl.requestStationControl.awaitAlarm; } }, methods: { @@ -91,7 +91,7 @@ export default { const operate = { cancel: true, userOperationType: UserOperationType.LEFTCLICK, - operation: OperationEvent.Command.close.alarm.operation + operation: this.closeAlarm.operation }; this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { if (valid) { @@ -100,7 +100,7 @@ export default { }); }, doShow(info) { - const station = this.$store.getters['map/getDeviceByCode'](info.code); + const station = this.$store.getters['map/getDeviceByCode'](info.stationCode); this.stationName = station.name; this.time = parseTime(this.$store.state.training.initTime); this.show = true; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 677c7f9ac..e883cfb1b 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -1239,6 +1239,10 @@ export const OperationEvent = { menuButton: { operation: '2024', domId: '_Tips-Control-Request-Menu{BOTTOM}' + }, + awaitAlarm: { + operation: '2025', + domId: '_Tips-Control-Request-AwaitAlarm' } }, // 强行站控 diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 8668f4428..a6daff985 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -117,7 +117,8 @@ const socket = { endStationName: '' }, simulationWorkParam: {}, - conversationMessage: {} + conversationMessage: {}, + controlTransfer: {} }, getters: { }, @@ -385,6 +386,9 @@ const socket = { }, setConversationMessage: (state, message) => { state.conversationMessage = message; + }, + setControlTransfer: (state, transfer) => { + state.controlTransfer = transfer; } }, @@ -610,8 +614,10 @@ const socket = { commit('setSimulationWorkParam', data); }, setConversationMessage: ({ commit }, message) => { - console.log('----------------'); commit('setConversationMessage', message); + }, + setControlTransfer: ({ commit }, transfer) => { + commit('setControlTransfer', transfer); } } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index f84210e59..a1ab5af70 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -23,7 +23,7 @@ export function handlerUrl() { let OSS_URL; if (process.env.NODE_ENV === 'development') { // 开发分支 - BASE_API = 'http://192.168.3.233/rtss-server'; + // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud'; @@ -31,7 +31,7 @@ export function handlerUrl() { // BASE_API = 'http://192.168.3.94:9000'; // 旭强 // BASE_API = 'http://192.168.3.15:9000'; // 张赛 // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 - // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 + BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/utils/subscribeCallback.js b/src/utils/subscribeCallback.js index 2d0d5b32d..e0ee564f6 100644 --- a/src/utils/subscribeCallback.js +++ b/src/utils/subscribeCallback.js @@ -183,6 +183,9 @@ function handle(data) { case 'Simulation_Training_Audio_MATCH_RESULT': store.dispatch('trainingNew/handleMatchVoice', msg); break; + case 'Simulation_Control_Transfer_Result': + store.dispatch('socket/setControlTransfer', msg); + break; } } // 仿真内部聊天 diff --git a/src/views/newMap/display/trainingDesign/editOperate.vue b/src/views/newMap/display/trainingDesign/editOperate.vue index c3e74efb1..2ad47d8c8 100644 --- a/src/views/newMap/display/trainingDesign/editOperate.vue +++ b/src/views/newMap/display/trainingDesign/editOperate.vue @@ -114,13 +114,11 @@ export default { this.tagIndex = index; }, backDesignPane() { - const tipPosition = {}; if (this.stepDetail.operations[this.tagIndex] && this.trainingType === 'SINGLE') { this.stepDetail.tipPosition.domId = this.stepDetail.operations[this.tagIndex].domId; this.stepDetail.tipPosition.deviceCode = this.stepDetail.operations[this.tagIndex].deviceCode; this.stepDetail.tipPosition.operateIndex = this.tagIndex; } - console.log(tipPosition, this.trainingType, '-------'); this.$emit('backDesignPane'); this.tagIndex = 0; this.editMode = false; diff --git a/src/views/newMap/display/trainingList/trainingPositionTip.vue b/src/views/newMap/display/trainingList/trainingPositionTip.vue index f546955e2..c0e91ddfc 100644 --- a/src/views/newMap/display/trainingList/trainingPositionTip.vue +++ b/src/views/newMap/display/trainingList/trainingPositionTip.vue @@ -10,7 +10,7 @@ import PopTip from './poptip'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import { getDomOffset } from '@/utils/index'; import { ScriptMode } from '@/scripts/ConstDic'; - +import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; export default { name: 'TrainingTips', components: { PopTip }, @@ -42,7 +42,8 @@ export default { }, watch: { '$store.state.trainingNew.stepInfo': function(val) { - if (val && this.trainingDetail && this.trainingDetail.type === 'SINGLE' && val.memberId == this.myMemberId) { + const awaitOperateFlag = val && val.tipPosition && val.tipPosition.domId === OperationEvent.StationControl.requestStationControl.awaitAlarm.operation; + if (val && this.trainingDetail && this.trainingDetail.type === 'SINGLE' && val.memberId == this.myMemberId && !awaitOperateFlag) { this.tipInit(); } else { this.tip = ''; @@ -77,6 +78,13 @@ export default { this.tipInit(); } }, 10); + }, + '$store.state.socket.controlTransfer': function(val) { + const stepInfo = this.$store.state.trainingNew.stepInfo; + const domId = OperationEvent.StationControl.requestStationControl.awaitAlarm.operation; + if (val && val.applicantId == this.$store.state.training.myMemberId && stepInfo && stepInfo.tipPosition && stepInfo.tipPosition.domId === domId) { + setTimeout(() => { this.tipInit(); }, 10); + } } }, methods: { @@ -181,14 +189,13 @@ export default { } else if (this.tipAlignIsTop(tipPosition, domId)) { align = 'top'; } - const width = align === 'right' ? 0 : btnDom.clientWidth / 2; + // const width = align === 'right' ? 0 : btnDom.clientWidth / 2; resolve({ align: align, - x: offset.x + width, + x: offset.x + btnDom.clientWidth / 2, y: offset.y }); } else { - console.log('235s'); resolve(null); } } catch (err) {