任务记录 识别进度 修改

master
wanglei 1 year ago
parent 44bd21a90d
commit d02c5934ac

@ -101,10 +101,10 @@
<div class="num"> <div class="num">
<span style="color:#409EFF;">总数量{{ form.num }}</span> <span style="color:#409EFF;">总数量{{ form.num }}</span>
<el-link type="primary" @click="getFailPicture(form.picIds)"></el-link> <el-link type="primary" @click="getALLPicture(form.picIds)"></el-link>
</div> </div>
<div class="num" v-if="form.status==='1'"> <div class="num" v-if="form.status==='1'">
<span style="color:#67C23A;">已识别10</span> <span style="color:#67C23A;">已识别{{percentage}}</span>
</div> </div>
<div class="num" v-if="form.status==='2'"> <div class="num" v-if="form.status==='2'">
<span style="color:#67C23A;">成功{{ form.successNum }}</span> <span style="color:#67C23A;">成功{{ form.successNum }}</span>
@ -150,6 +150,7 @@
<script> <script>
import { listTask, listByIds } from "@/api/dangan/task"; import { listTask, listByIds } from "@/api/dangan/task";
import { reRecongnize } from "@/api/dangan/collection"; import { reRecongnize } from "@/api/dangan/collection";
import axios from "axios";
export default { export default {
name: "Task", name: "Task",
@ -176,6 +177,8 @@
status: null status: null
}, },
form: {}, form: {},
//
percentage: 0,
// //
xgtp:{ xgtp:{
title: null, title: null,
@ -203,6 +206,13 @@
this.loading = false; this.loading = false;
}); });
}, },
getALLPicture(ids){
this.xgtp.queryParams.pageNum = 1;
this.xgtp.queryParams.ids = ids;
this.xgtp.title="所有图片";
this.xgtp.open = true;
this.xgtpQuery();
},
getFailPicture(ids){ getFailPicture(ids){
this.xgtp.queryParams.pageNum = 1; this.xgtp.queryParams.pageNum = 1;
this.xgtp.queryParams.ids = ids; this.xgtp.queryParams.ids = ids;
@ -240,7 +250,9 @@
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.percentage = 0
this.form = row; this.form = row;
this.getProgress();
this.open = true; this.open = true;
this.title = "任务进度"; this.title = "任务进度";
}, },
@ -255,6 +267,22 @@
this.getList() this.getList()
}) })
}, },
/** 查询识别进度 */
getProgress() {
// ID
//axios.post('http://20.206.150.166:22443/get_file_count',`username=${this.$store.state.user.name}`, {
axios.post('http://123.57.142.195:443/get_file_count',`taskId=${this.form.id}`, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then((response)=>{
this.percentage = response.data.file_counts
}).catch(function (error) {
this.percentage = 0
})
},
} }
}; };
</script> </script>

Loading…
Cancel
Save