|
@@ -181,17 +181,7 @@
|
|
|
<span>{{ parseTime(scope.row.endTime) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="运行进度" align="center" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-progress
|
|
|
- type="circle"
|
|
|
- :percentage="ProgressMap[scope.$index]"
|
|
|
- width="48"
|
|
|
- :status="progressStatus"
|
|
|
- ></el-progress>
|
|
|
- </template>
|
|
|
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="准确率" align="center" prop="accuracyRate" />
|
|
|
<el-table-column label="召回率" align="center" prop="recallRate" />
|
|
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip='true' />
|
|
@@ -348,6 +338,24 @@
|
|
|
@pagination="getverificationdata"
|
|
|
/>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ :title=progresstitle
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="20%"
|
|
|
+ style="top:225px"
|
|
|
+ >
|
|
|
+ <div align="center">
|
|
|
+ <el-progress
|
|
|
+ type="circle"
|
|
|
+ :percentage="ProgressMap[taskidToIndexMap.get(ids[0])]"
|
|
|
+ width="80"
|
|
|
+ :status="progressStatus"
|
|
|
+ ></el-progress>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
|
|
|
|
|
@@ -368,6 +376,8 @@ export default {
|
|
|
name: "Task",
|
|
|
data() {
|
|
|
return {
|
|
|
+ progresstitle:'',
|
|
|
+ dialogVisible:false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
vloading:true,
|
|
@@ -431,17 +441,18 @@ export default {
|
|
|
ProgressMap: [],
|
|
|
taskidToIndexMap: new Map(),
|
|
|
verificationtabledata:[],
|
|
|
+ progressStatus:'',
|
|
|
};
|
|
|
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
- computed: {
|
|
|
- progressStatus() {
|
|
|
- return this.Progress === 100 ? 'success' : '';
|
|
|
- },
|
|
|
- },
|
|
|
+ // computed: {
|
|
|
+ // progressStatus() {
|
|
|
+ // return this.Progress === 100 ? 'success' : '';
|
|
|
+ // },
|
|
|
+ // },
|
|
|
methods: {
|
|
|
|
|
|
|
|
@@ -472,6 +483,17 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleRun() {
|
|
|
+ if(this.ids.length>1) {
|
|
|
+ this.$modal.msg("不能选择多个任务!")
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ if(this.ids.length===0){
|
|
|
+ this.$modal.msg("请先选中验证任务!")
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ this.progresstitle = "验证任务"+this.ids[0]+"运行"
|
|
|
+ this.progressStatus = ''
|
|
|
+ this.dialogVisible = true
|
|
|
let taskids = this.ids;
|
|
|
const dayjs = require('dayjs');
|
|
|
|
|
@@ -493,10 +515,13 @@ export default {
|
|
|
console.log(res1.msg)
|
|
|
})
|
|
|
|
|
|
- console.log(this.verificationdataset)
|
|
|
+ // console.log(this.verificationdataset)
|
|
|
|
|
|
task.accuracyRate = res.data.accuracyRate
|
|
|
task.recallRate = res.data.recallRate
|
|
|
+ task.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
|
+ task.taskStatus = '运行成功';
|
|
|
+ task.progress = 100;
|
|
|
//这里需要更新数据库task
|
|
|
updateTask(task).then(res2=>{
|
|
|
console.log(res2.msg)
|
|
@@ -517,15 +542,14 @@ export default {
|
|
|
}
|
|
|
// 如果进度达到100%,清除定时器并调用后端算法
|
|
|
if (this.ProgressMap[idx] >= 100) {
|
|
|
+ this.$set(this.ProgressMap, idx, 0);
|
|
|
clearInterval(intervalId);
|
|
|
+ this.progressStatus = 'success'
|
|
|
+ this.dialogVisible = false
|
|
|
+
|
|
|
if(code===200){
|
|
|
- task.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
|
- task.taskStatus = '运行成功';
|
|
|
- task.progress = 100;
|
|
|
- updateTask(task).then(res => {
|
|
|
this.$message.success('任务' + taskId + '运行成功!');
|
|
|
this.getList();
|
|
|
- });
|
|
|
}
|
|
|
}
|
|
|
}, 100);
|