Your Name 1 year ago
parent
commit
70347f9b0f

+ 3 - 0
src/api.js

@@ -346,6 +346,9 @@ export default {
     saveObjectiveQue: params => {
 	    return axios.put(`${baseURL}/api/admin/papers/objective/update`, params)
     },
+    saveTaskObjectiveQue: params => {
+	    return axios.put(`${baseURL}/api/admin/papers/task/objective/update`, params)
+    },
     // 保存主观题
     saveSubjectiveQue: params => {
 	    return axios.put(`${baseURL}/api/admin/papers/subjective/update`, params)

+ 9 - 3
src/views/papers/cutPaper.vue

@@ -152,7 +152,11 @@
 
             <el-table :data="curStdQueList.slice((currentPage-1)*pageSize,currentPage*pageSize)">
               <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="qno">
+                <template slot-scope="scope">
+                    <el-input size="mini" v-model="scope.row.qno" />
+                </template>
+              </el-table-column>
               <el-table-column label="分数" prop="score"></el-table-column>
               <el-table-column label="题型" prop="qtype">
                 <template slot-scope="scope">
@@ -521,7 +525,7 @@
             id: this.$route.query.id,
             stdQnoPoints: this.stdQnoPoints,
             khPoints: this.snoImg,
-            ansPoints: this.ansPointsCrop,
+            ansPoints: this.ansPoints,
             stdChoices: this.stdChoiceList,
             stdQueList: this.stdQueList,
             khType: this.khType,
@@ -546,6 +550,8 @@
           stdQnoPoints: this.stdQnoPoints,
           stdChoices: this.stdChoiceList,
           stdQueList: this.stdQueList,
+          ansPoints:this.ansPoints,
+          ansPointsCrop:this.ansCardImgList
         }
         this.$api.savePaperTplObjectiveQue(params).then(res => {
           if(!res.data.code){
@@ -643,7 +649,7 @@
 
                   khPointsCrop["x"] = khPointsCrop["x"] - that.stdPoints["x"];
                   khPointsCrop["y"] = khPointsCrop["y"] - that.stdPoints["y"];
-                  that.ansPointsCrop.push(khPointsCrop);
+                  that.ansPoints.push(khPointsCrop);
                   that.ansCardImgList.push(cropperImgData);
                   console.log(that.ansCardImgList,3333333333333)
                 }

+ 3 - 8
src/views/tasks/Index.vue

@@ -175,14 +175,9 @@
                 </el-button>
               </template>
             </el-table-column>
-            <el-table-column align="center" prop="objective_score" label="得分" />
-            <!-- <el-table-column align="center" prop="mark_status" label="试卷状态">
-              <template slot-scope="scope">
-                <span v-if="scope.row.mark_status==0" style="color:#e6a23c;">待上传</span>
-                <span v-if="scope.row.mark_status==1" style="color:#85ce61;">已上传</span>
-              </template>
-            </el-table-column> -->
-            <el-table-column align="center" prop="mark_status_name" label="识别状态">
+            <el-table-column align="center" prop="objective_ans" label="客观题识别结果"/>
+            <el-table-column align="center" prop="objective_score" label="客观题得分" width="100" />
+            <el-table-column align="center" prop="mark_status_name" label="识别状态" width="80">
               <template slot-scope="scope">
                 <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>

+ 13 - 7
src/views/tasks/components/MarkTaskSetDialog.vue

@@ -263,7 +263,7 @@ export default {
             this.remarkSetVisibleTmp = this.remarkSetVisible
             this.curTaskId = this.taskId
             this.curPaperId = this.paperId
-            this.getPaperPieces(this.activeSetName,this.curPaperId)
+            this.getPaperPieces(this.activeSetName,this.curPaperId,this.curTaskId)
         },
     },
     methods:{
@@ -279,15 +279,21 @@ export default {
             this.markPointsSetVisible = false;
         },
         handleClick(){
-          this.getPaperPieces(this.activeSetName,this.curPaperId);
+          this.getPaperPieces(this.activeSetName,this.curPaperId,this.curTaskId);
           this.getMarkPaperTeachers();
         },
         addQues(){
 
         },
-        getPaperPieces(quetype,paper_id){
-          this.$api.getStdQueList({"quetype":quetype,"paper_id":paper_id}).then(res=>{
+        getPaperPieces(quetype,paper_id,task_id){
+          this.$api.getStdQueList({"quetype":quetype,"paper_id":paper_id,"task_id":task_id}).then(res=>{
             if(quetype==1){
+              // this.objectiveQueList = [];
+              // res.data.data.forEach((item,index)=>{
+              //   item.forEach((iitem,iindex)=>{
+              //     this.objectiveQueList.push(iitem)
+              //   })
+              // })
               this.objectiveQueList = res.data.data;
             }else{
               this.subjectiveQueList = res.data.data;
@@ -346,10 +352,10 @@ export default {
           this.markPointsSetVisible = false
         },
         saveObjectiveQue(){
-          this.$api.saveObjectiveQue({paper_id:this.curPaperId,objectiveQueList:this.objectiveQueList}).then(res=>{
+          this.$api.saveTaskObjectiveQue({task_id:this.curTaskId,paper_id:this.curPaperId,objectiveQueList:this.objectiveQueList}).then(res=>{
               if(!res.data.code){
                 this.msgSuccess("成功!");
-                this.getPaperPieces(this.activeSetName,this.curPaperId)
+                this.getPaperPieces(this.activeSetName,this.curPaperId,this.curTaskId)
               }
           })
         },
@@ -357,7 +363,7 @@ export default {
           this.$api.saveSubjectiveQue({paper_id:this.curPaperId,subjectiveQueList:this.subjectiveQueList}).then(res=>{
               if(!res.data.code){
                 this.msgSuccess("成功!");
-                this.getPaperPieces(this.activeSetName,this.curPaperId)
+                this.getPaperPieces(this.activeSetName,this.curPaperId,this.curTaskId)
               }
           })
         },