档案采集

master
wanglei 2 years ago
parent 0c96f1cd78
commit e658968841

@ -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);
}) })

@ -309,9 +309,12 @@ export default {
/** 查询识别进度 */ /** 查询识别进度 */
getProgress() { getProgress() {
// ID // ID
axios.get('http://123.57.142.195:443/get_file_count') axios.post('http://123.57.142.195:443/get_file_count',`username=${this.$store.state.user.name}`, {
.then(function (response) { headers: {
this.percentage = (response.data.file_counts/this.selectionList.length)*100 'Content-Type': 'application/x-www-form-urlencoded'
}
}).then(function (response) {
this.percentage = Math.round((response.data.file_counts/this.selectionList.length)*100)
}).catch(function (error) { }).catch(function (error) {
// //
console.log(error); console.log(error);

Loading…
Cancel
Save