档案采集

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 '@/utils/WebScan';
import axios from 'axios'
import qs from 'qs'
export default {
name: "Collection",
@ -598,8 +599,6 @@ export default {
this.openProgress = false;
});
this.getProgress()
this.Interval = setInterval(()=> {
if(this.percentage===100||this.percentage>100){
clearInterval(this.Interval);
@ -641,12 +640,16 @@ export default {
/** 查询识别进度 */
getProgress() {
// ID
axios.get('http://123.57.142.195:443/get_file_count',{ params: {
username: this.$store.state.user.name
}})
.then(function (response) {
this.percentage = (response.data.file_counts/this.pictureRecard.length)*100
}).catch(function (error) {
axios.post('http://123.57.142.195:443/get_file_count',`username=${this.$store.state.user.name}`, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.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);
})

@ -309,9 +309,12 @@ export default {
/** 查询识别进度 */
getProgress() {
// ID
axios.get('http://123.57.142.195:443/get_file_count')
.then(function (response) {
this.percentage = (response.data.file_counts/this.selectionList.length)*100
axios.post('http://123.57.142.195:443/get_file_count',`username=${this.$store.state.user.name}`, {
headers: {
'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) {
//
console.log(error);

Loading…
Cancel
Save