|
@@ -257,6 +257,9 @@ const updateArchive = async ()=>{
|
|
updateArchiveLoad.value = false
|
|
updateArchiveLoad.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window.$message?.success(data)
|
|
window.$message?.success(data)
|
|
|
|
+ count.value = 0
|
|
|
|
+ Verification()
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -269,10 +272,28 @@ const updateArchiveprogress = async ()=>{
|
|
})
|
|
})
|
|
|
|
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
- console.log(data)
|
|
|
|
|
|
+ if (data == 100) {
|
|
|
|
+ count.value = 100
|
|
|
|
+ }
|
|
propercent.value = data
|
|
propercent.value = data
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+const timer = ref(null)
|
|
|
|
+let count = ref(0) // 倒计时
|
|
|
|
+//循环请求接口
|
|
|
|
+const Verification = () => {
|
|
|
|
+ timer.value = setInterval(() => {
|
|
|
|
+ if (count.value == 100) {
|
|
|
|
+ console.log('停着')
|
|
|
|
+ clearInterval(timer.value)
|
|
|
|
+ } else {
|
|
|
|
+ updateArchiveprogress()// 请求数据
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }, 1000)
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|