This commit is contained in:
pan
2024-09-09 01:18:21 +08:00
parent 05f662c0c7
commit 6a5157ae7d
9 changed files with 56 additions and 30 deletions

View File

@@ -30,10 +30,10 @@
}
},
created(){
this.initWebSocket();
// this.initWebSocket();
},
methods: {
initWebSocket() {
/* initWebSocket() {
this.websocket = new WebSocket(process.env.VUE_APP_WS_URL);
this.websocket.onmessage = (event) => {
this.uploading = true;
@@ -52,8 +52,8 @@
}
})
console.log('this.progressArr=' + this.progressArr);
/* let progress = msgStr.substring(msgStr.indexOf("/") + 1, msgStr.length);
this.progress = parseInt(msgArr[2])*/
/!* let progress = msgStr.substring(msgStr.indexOf("/") + 1, msgStr.length);
this.progress = parseInt(msgArr[2])*!/
// if (progress === '100%') {
// this.websocket.close();
// }
@@ -61,7 +61,7 @@
this.websocket.onclose = () => {
console.log('WebSocket connection closed');
};
},
}, */
checkDuplicate(docId) {
return this.progressArr.findIndex(t => t['docId'] == docId) == -1
}