Browse Source

识别结果查询

Your Name 1 year ago
parent
commit
7d8e663493
1 changed files with 60 additions and 14 deletions
  1. 60 14
      src/views/tasks/Index.vue

+ 60 - 14
src/views/tasks/Index.vue

@@ -77,27 +77,33 @@
     <!-- 上传试卷 -->
     <el-dialog title="试卷上传" :visible.sync="uploadDialogVisible" width="90%" @close="closeUploadDialog">
       <el-row :gutter="20">
-        <el-col :span="13">
+        <el-col :span="16">
           <!-- <el-row>
             <el-col :span="6">参考人数:{{studentsList.length}}</el-col>
             <el-col :span="6">已上传:{{studentsList.length}}</el-col>
             <el-col :span="6">识别异常:</el-col>
           </el-row> -->
           <el-form :inline="true">
-            <el-form-item label="姓名">
-              <el-input size="mini"></el-input>
+            <el-form-item label="姓名" >
+              <el-input size="mini" placeholder="请输入姓名/考号" v-model="queryName" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="识别异常">
+              <el-select v-model="queryMarkStatus" size="mini" clearable>
+                <el-option label="考号识别异常" :value="0"></el-option>
+              </el-select>
             </el-form-item>
             <el-form-item>
-              <el-button type="primary" size="mini">搜索</el-button>
+              <el-button type="primary" size="mini" @click=searchMarkData>搜索</el-button>
+              <el-button size="mini" @click="reSetMarkData">重置</el-button>
               <el-button @click="downloadObjectiveResult(curTaskId)" type="warning" size="mini" icon="el-icon-download">导出</el-button>
-              <el-button size="mini" type="warning" icon="el-icon-printer">试卷扫描</el-button> 
+              <!-- <el-button size="mini" type="warning" icon="el-icon-printer">试卷扫描</el-button>  -->
             </el-form-item>
           </el-form>
           <el-row>
             <el-col :span="24">
               <el-tabs v-model="activeName" @tab-click="handleTabClick">
-                <el-tab-pane :label="'正常('+recTotal+')'" :name="1"></el-tab-pane>
-                <el-tab-pane label="异常" :name="0"></el-tab-pane>
+                <el-tab-pane :label="'正常('+recSucTotal+')'" name="1"></el-tab-pane>
+                <el-tab-pane :label="'异常('+recErrTotal+')'" name="0"></el-tab-pane>
               </el-tabs>
             </el-col>
           </el-row>
@@ -136,8 +142,10 @@
           </el-table>
           <Page ref="pageButton" :current="recPage" :page_size="recPageSize" :total="recTotal" @pageChange="goRecPage" />
         </el-col>
-        <el-col :span="11">
-          <div style="height:70vh;overflow-y:scroll;position: relative;">
+        <el-col :span="8">
+          <div style="height:85vh;overflow-y:scroll;position: relative;">
+              <el-button style="position:absolute;top:0px;left:100px;" size="small" type="warning" icon="el-icon-printer">试卷扫描</el-button>
+              <span style="position:absolute;top:0px;right:40px;color:green;">成功上传:{{fileList.length}}</span>
               <el-upload
                 class="upload-demo"
                 action="http://test.scxjc.club/api/admin/papers/uploadpaper"
@@ -189,12 +197,16 @@
         studentsList:[],
         showAnsVisible:false,
         curStudentRecImg:"",
-        activeName:1,
+        activeName:"1",
         curTaskId:null,
         recPage:1,
         recPageSize:20,
         recTotal:0,
-        recParams:{}
+        recParams:{},
+        recSucTotal:0,
+        recErrTotal:0,
+        queryName:"",
+        queryMarkStatus:null
       };
     },
     methods: {
@@ -235,7 +247,9 @@
           task_id:this.curTaskId,
           page:this.recPage,
           page_size:this.recPageSize,
-          status:this.activeName
+          status:this.activeName,
+          name:this.queryName,
+          err_status:this.queryMarkStatus
         }
         window.clearInterval(this.timer);
         this.openUploadPaper(this.curTaskId)
@@ -302,6 +316,20 @@
           this.doctorList = [];
         }
       },
+      searchMarkData(){
+        this.recParams.name = this.queryName;
+        this.recParams.errStatus = this.queryMarkStatus;
+        window.clearInterval(this.timer);
+        this.openUploadPaper(this.curTaskId);
+      },
+      reSetMarkData(){
+        this.queryName = null;
+        this.queryMarkStatus = null;
+        this.queryParams.name = null;
+        this.queryParams.err_status = null;
+        window.clearInterval(this.timer);
+        this.openUploadPaper(this.curTaskId);
+      },
       openUploadPaper(id) {
         this.curTaskId = id
         this.uploadDialogVisible = true
@@ -312,17 +340,24 @@
           task_id:id,
           page:this.recPage,
           page_size:this.recPageSize,
-          status:this.activeName
+          status:this.activeName,
+          name:this.queryName,
+          err_status:this.queryMarkStatus
         }
         this.$api.getMarkTaskStudents(this.recParams).then(res=>{
           this.studentsList = res.data.data.list;
           this.recTotal = res.data.data.total;
+          this.recSucTotal = res.data.data.suc_total;
+          this.recErrTotal = res.data.data.err_total;
           this.loading = false;
         })
+        window.clearInterval(this.timer);
         this.timer = setInterval(function(){
           that.$api.getMarkTaskStudents(that.recParams).then(res=>{
             that.studentsList = res.data.data.list;
             that.recTotal = res.data.data.total;
+            that.recSucTotal = res.data.data.suc_total;
+            that.recErrTotal = res.data.data.err_total;
           })
         },4000)
       },
@@ -371,7 +406,18 @@
         this.showAnsVisible = true;
       },
       
-      handleTabClick(){
+      handleTabClick(tab,event){
+        this.activeName = tab.name;
+        this.recParams = {
+          task_id:this.curTaskId,
+          page:this.recPage,
+          page_size:this.recPageSize,
+          status:this.activeName,
+          name:this.queryName,
+          err_status:this.queryMarkStatus
+        }
+        window.clearInterval(this.timer);
+        this.openUploadPaper(this.curTaskId)
       },
       downloadObjectiveResult(task_id){
         this.$api