瀏覽代碼

客观题打分和异常标识

Your Name 1 年之前
父節點
當前提交
355003631f
共有 3 個文件被更改,包括 44 次插入8 次删除
  1. 9 0
      src/constant.js
  2. 10 4
      src/views/papers/cutPaper.vue
  3. 25 4
      src/views/tasks/Index.vue

+ 9 - 0
src/constant.js

@@ -43,4 +43,13 @@ export default{
         {label:"F",value:"F",flag:0},
         {label:"G",value:"G",flag:0}
     ],
+    recErrorList:[
+        {label:"考号异常",value:0},
+        {label:"少识别选项",value:-1},
+        {label:"多识别选项",value:-2},
+        {label:"单选题多涂",value:-3},
+        {label:"考号异常,少识别选项",value:-11},
+        {label:"考号异常,多识别选项",value:-12},
+        {label:"考号异常,单选题多涂",value:-13}
+    ]
 }

+ 10 - 4
src/views/papers/cutPaper.vue

@@ -105,8 +105,8 @@
               </el-form-item>
               <el-form-item label="题型">
                 <el-select size="mini" v-model="addQueForm.qtype">
-                  <el-option label="单选" value="单选">单选</el-option>
-                  <el-option label="多选" value="多选">多选</el-option>
+                  <el-option label="单选" value="1">单选</el-option>
+                  <el-option label="多选" value="2">多选</el-option>
                 </el-select>
               </el-form-item>
               <!-- <el-form-item label="标准答案">
@@ -124,7 +124,12 @@
               <el-table-column label="序号" prop="qno" width="60px"></el-table-column>
               <el-table-column label="题号" prop="qno"></el-table-column>
               <el-table-column label="分数" prop="score"></el-table-column>
-              <el-table-column label="题型" prop="qtype"></el-table-column>
+              <el-table-column label="题型" prop="qtype">
+                  <template slot-scope="scope">
+                    <span v-if="scope.row.qtype==1">单选</span>
+                    <span v-if="scope.row.qtype==2">多选</span>
+                  </template>
+              </el-table-column>
               <el-table-column label="标准答案" prop="stdAns" width="240px">
                 <template slot-scope="scope">
                   <el-tag
@@ -312,7 +317,7 @@
         ansImgLoading: false,
         optionDir: 1,
         queDir: 2,
-        addQueForm: {},
+        addQueForm: {score:0},
         stdQueList: [],
         stdQnoPoints: [],
         curPaperImg: "",
@@ -679,6 +684,7 @@
       },
       setStdAns(row,item){
         let orgAns = row.stdAns.split(",")
+        orgAns = orgAns.filter((item)=>{return item.length>0})
         if(orgAns.indexOf(item.value)==-1){
           orgAns.push(item.value)
         }else{

+ 25 - 4
src/views/tasks/Index.vue

@@ -89,7 +89,8 @@
             </el-form-item>
             <el-form-item label="识别异常">
               <el-select v-model="queryMarkStatus" size="mini" clearable>
-                <el-option label="考号识别异常" :value="0"></el-option>
+                <el-option v-for="item in $const.recErrorList" :label="item.label" :value="item.value"></el-option>
+
               </el-select>
             </el-form-item>
             <el-form-item>
@@ -103,7 +104,7 @@
             <el-col :span="24">
               <el-tabs v-model="activeName" @tab-click="handleTabClick">
                 <el-tab-pane :label="'正常('+recSucTotal+')'" name="1"></el-tab-pane>
-                <el-tab-pane :label="'异常('+recErrTotal+')'" name="0"></el-tab-pane>
+                <el-tab-pane :label="'异常('+recErrTotal+')'" name="100"></el-tab-pane>
               </el-tabs>
             </el-col>
           </el-row>
@@ -121,9 +122,9 @@
                 <span v-if="scope.row.mark_status==1" style="color:#85ce61;">已上传</span>
               </template>
             </el-table-column> -->
-            <el-table-column align="center" prop="mark_status" label="识别状态">
+            <el-table-column align="center" prop="mark_status_name" label="识别状态">
               <template slot-scope="scope">
-                <span v-if="scope.row.mark_status==0" style="color:#f78989;">异常</span>
+                <span v-if="scope.row.mark_status<=0" style="color:#f78989;">{{scope.row.mark_status_name}}</span>
                 <span v-if="scope.row.mark_status==1" style="color:#85ce61;">正常</span>
               </template>
             </el-table-column>
@@ -346,6 +347,16 @@
         }
         this.$api.getMarkTaskStudents(this.recParams).then(res=>{
           this.studentsList = res.data.data.list;
+          this.studentsList.forEach(item=>{
+            let mark_status = item.mark_status;
+            if(mark_status!=1){
+              item.mark_status_name = this.$const.recErrorList.filter((ritem)=>{
+                return ritem.value == mark_status;
+              })[0].label
+            }else{
+              item.mark_status_name = "正常"
+            }
+          })
           this.recTotal = res.data.data.total;
           this.recSucTotal = res.data.data.suc_total;
           this.recErrTotal = res.data.data.err_total;
@@ -355,6 +366,16 @@
         this.timer = setInterval(function(){
           that.$api.getMarkTaskStudents(that.recParams).then(res=>{
             that.studentsList = res.data.data.list;
+            that.studentsList.forEach(item=>{
+              let mark_status = item.mark_status;
+              if(mark_status!=1){
+                item.mark_status_name = that.$const.recErrorList.filter((ritem)=>{
+                  return ritem.value == mark_status;
+                })[0].label
+              }else{
+                item.mark_status_name = "正常"
+              }
+            })
             that.recTotal = res.data.data.total;
             that.recSucTotal = res.data.data.suc_total;
             that.recErrTotal = res.data.data.err_total;