diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue index 1650f26..75a3904 100644 --- a/src/views/spectrumAnalysis/gamma-analysis.vue +++ b/src/views/spectrumAnalysis/gamma-analysis.vue @@ -103,7 +103,7 @@ :currStep="currStep" :checkBoxFlag="checkBox_updateCal" :newCheckBoxFlag="newCheckBox_updateCal" - @closeModal="haCndleCloseModal" + @closeModal="handleCloseModal" /> @@ -230,6 +230,7 @@ export default { newCheckBox_updateCal: false, //update复选框状态 currStep: '', isReAnalyed: false, + timerStamp: Date.now(), } }, created() { @@ -423,7 +424,12 @@ export default { // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https var userId = store.getters.userInfo.id var url = - window._CONFIG['domianURL'].replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId + window._CONFIG['domianURL'].replace('https://', 'wss://').replace('http://', 'ws://') + + '/websocket/' + + userId + + '_' + + this.timerStamp + //console.log(url); //update-begin-author:taoyan date:2022-4-22 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278 let token = Vue.ls.get(ACCESS_TOKEN) @@ -1516,6 +1522,7 @@ export default { // 重新分析 async reProcessing(showMessage = true) { + var userId = store.getters.userInfo.id if (this.isProcessing) { return } @@ -1529,9 +1536,10 @@ export default { this.isLoading = true const { inputFileName: fileName } = this.sample const { success, result, message } = await postAction( - `/gamma/Reprocessing?fileName=${fileName}&processKey=userId_${Date.now()}` + `/gamma/Reprocessing?fileName=${fileName}&processKey=${userId}_${this.timerStamp}` ) if (success) { + this.reprocessingModalVisible = false //如果分析成功了,分析进度的弹窗即便是没有接收到后面的 ws 消息也要关闭弹窗 this.isReAnalyed = true this.bAnalyed = result.bAnalyed this.$emit('reAnalyed', this.isReAnalyed) @@ -1554,7 +1562,7 @@ export default { this.isLoading = false } }, - haCndleCloseModal() { + handleCloseModal() { this.reprocessingModalVisible = false this.abc = false },