如果分析成功了,分析进度的弹窗即便是没有接收到后面的 ws 消息也要关闭弹窗

ws 创建连接的时候后面的key 改为userId+'_'+Date.now()
请求重新分析接口参数调整
This commit is contained in:
任珮宇 2023-11-16 09:39:28 +08:00
parent c1270be5c2
commit 5861337d44

View File

@ -103,7 +103,7 @@
:currStep="currStep" :currStep="currStep"
:checkBoxFlag="checkBox_updateCal" :checkBoxFlag="checkBox_updateCal"
:newCheckBoxFlag="newCheckBox_updateCal" :newCheckBoxFlag="newCheckBox_updateCal"
@closeModal="haCndleCloseModal" @closeModal="handleCloseModal"
/> />
<!-- ReProcessing 弹窗结束 --> <!-- ReProcessing 弹窗结束 -->
</div> </div>
@ -230,6 +230,7 @@ export default {
newCheckBox_updateCal: false, //update newCheckBox_updateCal: false, //update
currStep: '', currStep: '',
isReAnalyed: false, isReAnalyed: false,
timerStamp: Date.now(),
} }
}, },
created() { created() {
@ -423,7 +424,12 @@ export default {
// WebSocketwshttpwsshttps // WebSocketwshttpwsshttps
var userId = store.getters.userInfo.id var userId = store.getters.userInfo.id
var url = 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); //console.log(url);
//update-begin-author:taoyan date:2022-4-22 for: v2.4.6 websocket #3278 //update-begin-author:taoyan date:2022-4-22 for: v2.4.6 websocket #3278
let token = Vue.ls.get(ACCESS_TOKEN) let token = Vue.ls.get(ACCESS_TOKEN)
@ -1516,6 +1522,7 @@ export default {
// //
async reProcessing(showMessage = true) { async reProcessing(showMessage = true) {
var userId = store.getters.userInfo.id
if (this.isProcessing) { if (this.isProcessing) {
return return
} }
@ -1529,9 +1536,10 @@ export default {
this.isLoading = true this.isLoading = true
const { inputFileName: fileName } = this.sample const { inputFileName: fileName } = this.sample
const { success, result, message } = await postAction( const { success, result, message } = await postAction(
`/gamma/Reprocessing?fileName=${fileName}&processKey=userId_${Date.now()}` `/gamma/Reprocessing?fileName=${fileName}&processKey=${userId}_${this.timerStamp}`
) )
if (success) { if (success) {
this.reprocessingModalVisible = false //便 ws
this.isReAnalyed = true this.isReAnalyed = true
this.bAnalyed = result.bAnalyed this.bAnalyed = result.bAnalyed
this.$emit('reAnalyed', this.isReAnalyed) this.$emit('reAnalyed', this.isReAnalyed)
@ -1554,7 +1562,7 @@ export default {
this.isLoading = false this.isLoading = false
} }
}, },
haCndleCloseModal() { handleCloseModal() {
this.reprocessingModalVisible = false this.reprocessingModalVisible = false
this.abc = false this.abc = false
}, },