提交
This commit is contained in:
@@ -187,6 +187,7 @@ export default {
|
||||
fileList1: [],
|
||||
|
||||
containerHeight: null,
|
||||
pollInterval: null,
|
||||
formData: {
|
||||
message: "",
|
||||
},
|
||||
@@ -776,11 +777,12 @@ export default {
|
||||
const poll = () => {
|
||||
this.getMedicalDetail(() => {
|
||||
// 停止轮询
|
||||
clearInterval(pollInterval);
|
||||
clearInterval(this.pollInterval);
|
||||
this.pollInterval = null;
|
||||
});
|
||||
};
|
||||
// 每5秒发送一次请求,直到收到正确的响应
|
||||
const pollInterval = setInterval(poll, 5000);
|
||||
this. pollInterval = setInterval(poll, 5000);
|
||||
|
||||
//调用后端 SSE 接口,发送问题并接收实时回答
|
||||
// this.startSSE(params);
|
||||
@@ -1183,9 +1185,11 @@ export default {
|
||||
},
|
||||
},
|
||||
onHide() {
|
||||
|
||||
this.closeWebSocket();
|
||||
},
|
||||
onUnload() {
|
||||
this.pollInterval()
|
||||
this.closeWebSocket();
|
||||
},
|
||||
};
|
||||
|
||||
@@ -176,7 +176,8 @@ export default {
|
||||
this.tabsList = [
|
||||
{ id: 0, title: "草稿箱", statusTitle: '' },
|
||||
{ id: 1, title: "待审核",statusTitle: '待审核',color:'#f59442' },
|
||||
{ id: 3, title: "已通过",statusTitle: '已通过' ,color:'#22be98' },
|
||||
{ id: 3, title: "质量检测中",statusTitle: '检测中' ,color:'#22be98' },
|
||||
{ id: 4, title: "已通过",statusTitle: '已通过' ,color:'#22be98' },
|
||||
{ id: 2, title: "未通过",statusTitle: '未通过',color:"#e78084" },
|
||||
];
|
||||
this.taihumedId = this.tabsList[0].id;
|
||||
|
||||
Reference in New Issue
Block a user