如果分析成功了,分析进度的弹窗即便是没有接收到后面的 ws 消息也要关闭弹窗
ws 创建连接的时候后面的key 改为userId+'_'+Date.now() 请求重新分析接口参数调整
This commit is contained in:
parent
c1270be5c2
commit
5861337d44
|
@ -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 {
|
||||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||||
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
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user