|
|
|
@ -212,6 +212,7 @@ import { listBookshelf } from "@/api/dangan/bookshelf";
|
|
|
|
import { collectSaves, collectRecongnize } from "@/api/dangan/collection";
|
|
|
|
import { collectSaves, collectRecongnize } from "@/api/dangan/collection";
|
|
|
|
import '@/utils/WebScan';
|
|
|
|
import '@/utils/WebScan';
|
|
|
|
import axios from 'axios'
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
import qs from 'qs'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Collection",
|
|
|
|
name: "Collection",
|
|
|
|
@ -598,8 +599,6 @@ export default {
|
|
|
|
this.openProgress = false;
|
|
|
|
this.openProgress = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.getProgress()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Interval = setInterval(()=> {
|
|
|
|
this.Interval = setInterval(()=> {
|
|
|
|
if(this.percentage===100||this.percentage>100){
|
|
|
|
if(this.percentage===100||this.percentage>100){
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
clearInterval(this.Interval);
|
|
|
|
@ -641,12 +640,16 @@ export default {
|
|
|
|
/** 查询识别进度 */
|
|
|
|
/** 查询识别进度 */
|
|
|
|
getProgress() {
|
|
|
|
getProgress() {
|
|
|
|
// 向给定ID的用户发起请求
|
|
|
|
// 向给定ID的用户发起请求
|
|
|
|
axios.get('http://123.57.142.195:443/get_file_count',{ params: {
|
|
|
|
axios.post('http://123.57.142.195:443/get_file_count',`username=${this.$store.state.user.name}`, {
|
|
|
|
username: this.$store.state.user.name
|
|
|
|
headers: {
|
|
|
|
}})
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
.then(function (response) {
|
|
|
|
}
|
|
|
|
this.percentage = (response.data.file_counts/this.pictureRecard.length)*100
|
|
|
|
})
|
|
|
|
}).catch(function (error) {
|
|
|
|
.then( (response)=> {
|
|
|
|
|
|
|
|
console.log(response.data.file_counts);
|
|
|
|
|
|
|
|
this.percentage = Math.round((response.data.file_counts/this.pictureRecard.length)*100);
|
|
|
|
|
|
|
|
console.log(this.percentage);
|
|
|
|
|
|
|
|
}).catch((error)=> {
|
|
|
|
// 处理错误情况
|
|
|
|
// 处理错误情况
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|