qq 2 years ago
parent
commit
6c452813b9

+ 1 - 1
src/components/assembly/exam_works_nav.vue

@@ -2,7 +2,7 @@
   <div class="leftMenu">
         <li @click="jump(item.src,i)" v-for="item,i in list" :key="i" :class="i==l_id?'active':''">
           <i class="iconfont" :class="item.icon"></i>
-          <span>{{i==2&&navKey==2?'作业中心':i==2&&navKey!=2?'成绩分析':item.name}}</span>
+          <span>{{i==2&&navKey==2?'作业分析':i==2&&navKey!=2?'成绩分析':item.name}}</span>
         </li>
       </div>
 </template>

+ 322 - 153
src/components/assembly/tk_st_qp.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="full">
     <div class="d-f j-s full_top">
-      <div class="title">{{navId ==1?'按学生批阅':'按试题批阅'}}</div>
+      <div class="title">{{ navId == 1 ? "按学生批阅" : "按试题批阅" }}</div>
       <div class="oper_i">
         <i class="iconfont icondaikuanjisuanqi1"></i>
         <i
@@ -38,16 +38,21 @@
     <div class="d-f j-s full_content">
       <div class="full_c_left">
         <div class="tk_box">
-          <div class="d-f j-s title" v-if="navId!=1">
+          <div class="d-f j-s title" v-if="navId != 1">
             <span
-              >第 <span class="blue">{{ num_id + 1 }}</span> 题</span
+              >第 <span class="blue">{{ num_id }}</span> 题</span
             >
             <span
               ><span class="blue">{{ selectId + 1 }}</span>
-              <span class="gray">/{{ tk_list.length}}</span></span
+              <span class="gray">/{{ tk_list.length }}</span></span
             >
           </div>
-          <div class="tk_list" :style="{height:navId==1?$c.cle-65+'px':$c.cle-130+'px'}">
+          <div
+            class="tk_list"
+            :style="{
+              height: navId == 1 ? $c.cle - 65 + 'px' : $c.cle - 130 + 'px',
+            }"
+          >
             <li
               class="tk_item"
               v-for="(item, i) in tk_list"
@@ -58,17 +63,10 @@
               <div class="d-f j-s tk_name">
                 <span>{{ i + 1 }}.{{ item.student_name }}</span>
                 <span
-                  :class="
-                    item.status ? 'reds' : ''
-                  "
-                  >{{
-                    item.status
-                      ? item.marked_score
-                      : "--"
-                  }}分</span
+                  >{{ item.marked_amount}} / {{ item.question_amount}}题</span
                 >
               </div>
-              <div class="img_box" v-if="navId!=1">
+              <div class="img_box" v-if="navId != 1">
                 <img :src="item.qimg" alt="" />
               </div>
             </li>
@@ -83,41 +81,70 @@
       </div>
       <div class="full_c_right">
         <div class="full_r_top d-f j-s">
-          <span>{{navId==1?'试题':'批阅进度'}}</span>
+          <span>{{ navId == 1 ? "试题" : "批阅进度" }}</span>
+          <div class="task_num" v-if="navId==1">
+            <li class="d-f">
+            <span>第{{ tk_num[num_index].qno }}题</span>
+            <el-progress
+              :percentage="
+                tk_list[selectId].marked_amount == 0
+                  ? 0
+                  : (tk_list[selectId].marked_amount / tk_list[selectId].question_amount) * 100
+              "
+              :stroke-width="10"
+              :color="
+                tk_list[selectId].marked_amount == tk_list[selectId].question_amount
+                  ? '#0A9DFF'
+                  : '#FA0A2F'
+              "
+            ></el-progress>
+            <span>{{ tk_list[selectId].marked_amount }}/{{ tk_list[selectId].question_amount }}</span>
+          </li>
+          </div>
           <span @click="full_submit">确认提交</span>
         </div>
-        <div class="tk_num" v-if="navId!=1">
+        <div class="tk_num" v-if="navId != 1">
           <li
             v-for="(item, i) in tk_num"
             :key="i + '批阅'"
             class="d-f j-s"
-            :class="i == num_id ? 'active' : ''"
-             @click="pnoChange(i)"
+            :class="i == num_index ? 'active' : ''"
+            @click="pnoChange(i, item.qno)"
           >
-            <span>第{{ i + 1 }}题</span>
-           <el-progress
-                      :percentage="
-                        item.marked_amount == 0 ? 0 : (item.marked_amount / item.question_amount) * 100
-                      "
-                      :stroke-width="10"
-                      :color="item.marked_amount == item.question_amount ? '#0A9DFF' : '#FA0A2F'"
-                    ></el-progress>
-                    <span>{{ item.marked_amount }}/{{item.question_amount }}</span>
+            <span>第{{ item.qno }}题</span>
+            <el-progress
+              :percentage="
+                item.marked_amount == 0
+                  ? 0
+                  : (item.marked_amount / item.question_amount) * 100
+              "
+              :stroke-width="10"
+              :color="
+                item.marked_amount == item.question_amount
+                  ? '#0A9DFF'
+                  : '#FA0A2F'
+              "
+            ></el-progress>
+            <span>{{ item.marked_amount }}/{{ item.question_amount }}</span>
+          </li>
+        </div>
+        <div class="st_tk_num" v-else :style="{ height: $c.cle - 130 + 'px' }">
+          <li
+            v-for="(item, i) in tk_num"
+            :key="i + '批阅'"
+            :class="i == num_index ? 'active' : ''"
+            @click="pnoChange(i, item.qno)"
+          >
+            <div class="img_box">
+              <img src="../../assets/tk_img.png" alt="" />
+            </div>
+            <div>
+               <span>第{{ item.qno }}题</span>
+               <span v-if="tk_list[selectId].qno == item.qno">({{tk_list[selectId].marked_score}})分</span>
+            </div>
+           
           </li>
         </div>
-          <div class="st_tk_num" v-else :style="{height:$c.cle-130+'px'}">
-                  <li
-                    v-for="(item, i) in tk_num"
-                    :key="i + '批阅'"
-                    :class="i == num_id ? 'active' : ''"
-                    @click="pnoChange(i)"
-                  >
-                    <div class="img_box">
-                  <img src="../../assets/tk_img.png" alt="" />
-                </div>
-                    <span>第{{ i + 1 }}题</span>
-                  </li>
-                </div>
       </div>
       <div
         class="tk_df"
@@ -130,11 +157,13 @@
           <div>
             <span class="df">智能阅卷打分版</span>
             <div class="ts_num">
-              <span>第{{selectId + 1}}题</span>
-              <span v-if="tk_list&&tk_list.length>0">满分:{{tk_list[selectId].score}}分</span>
+              <span>第{{ selectId + 1 }}题</span>
+              <span v-if="tk_list && tk_list.length > 0"
+                >满分:{{ tk_list[selectId].score }}分</span
+              >
             </div>
           </div>
-          <div class="tk_fs"> <el-input type="text" v-model="score"/></div>
+          <div class="tk_fs"><el-input type="text" v-model="score" /></div>
         </div>
         <div class="d-f j-s dfp_box">
           <div class="tk_dfp">
@@ -163,42 +192,48 @@
               >
             </li>
             <li>
-              <span @click="score=tk_list[selectId].score">满分</span>
+              <span @click="score = tk_list[selectId].score">满分</span>
               <span @click="scoreChnage(0)">0</span>
               <span @click="score = ''">X</span>
             </li>
           </div>
           <div class="tk_qh">
-            <span @click="per_tk">上一题</span>
-            <span @click="next_tk">下一题</span>
+            <span @click="per_tk">{{ navId == 1 ? "上一题" : "上一位" }}</span>
+            <span @click="next_tk">{{ navId == 1 ? "下一题" : "下一位" }}</span>
           </div>
         </div>
       </div>
     </div>
-      <!--查看答案 -->
+    <!--查看答案 -->
     <div class="bg_box" v-if="is_answer">
       <div class="answers">
-        <span class="el-icon-circle-close" @click="is_answer=false"></span>
-           <img :src="answer.full_img" alt="">
-            <div> <span>答案:</span> <span class="option">{{answer.answer}}</span></div>
-            <div> <span>解析:</span> <span>{{answer.analysis}}</span></div>
+        <span class="el-icon-circle-close" @click="is_answer = false"></span>
+        <img :src="answer.full_img" alt="" />
+        <div>
+          <span>答案:</span> <span class="option">{{ answer.answer }}</span>
+        </div>
+        <div>
+          <span>解析:</span> <span v-html="answer.analysis "></span>
+        </div>
       </div>
     </div>
   </div>
 </template>
 <script>
-import {base64 } from "@/util/api";
-import { get} from "@/util/common.js";
+import { base64 } from "@/util/api";
+import { get } from "@/util/common.js";
+// import { set } from "vue/types/umd";
 export default {
-  props: ["tk_lists", "selectIds",'navIds','tk_nums','num_ids'],
+  props: ["tk_lists", "selectIds", "navIds", "tk_nums", "num_ids",'processs'],
   data() {
     return {
-      is_answer:false,
-        answer:{},
-      score:'',
-      navId:this.navIds,
+      is_answer: false,
+      answer: {},
+      score: "",
+      navId: this.navIds,
       selectId: this.selectIds,
       num_id: this.num_ids,
+      process:this.processs,
       mouseFrom: {},
       mouseTo: {},
       moveCount: 1,
@@ -268,6 +303,7 @@ export default {
       ],
       fabricObj: null,
       initIdx: 0,
+      num_index: 0,
       tk_num: this.tk_nums,
       tk_list: this.tk_lists,
       flags: false,
@@ -281,14 +317,22 @@ export default {
       xPum: "",
       yPum: "",
       base64s: "",
+      lock: true,
+      is_df_success: false,
     };
   },
-  watch:{
-    tk_lists:{
-      immediate:true,
-      handler(val){
-        this.tk_list = val
-      }
+  watch: {
+    tk_lists: {
+      immediate: true,
+      handler(val) {
+        this.tk_list = val;
+      },
+    },
+    tk_nums: {
+      immediate: true,
+      handler(val) {
+        this.tk_num = val;
+      },
     },
   },
   mounted() {
@@ -303,20 +347,29 @@ export default {
     },
   },
   methods: {
-      //查看答案
-    seeAnswer(){
-      console.log(111)
+    //查看答案
+    seeAnswer() {
+      console.log(111);
       var that = this;
-      get('v1/api/papers/'+this.tk_list[this.selectId].pid+'/questions/'+this.tk_list[this.selectId].qno+'-'+this.tk_list[this.selectId].sqno+'/answer').then(res=>{
-        if(res.errcode==0){
+      get(
+        "v1/api/papers/" +
+          this.tk_list[this.selectId].pid +
+          "/questions/" +
+          this.tk_list[this.selectId].qno +
+          "-" +
+          this.tk_list[this.selectId].sqno +
+          "/answer"
+      ).then((res) => {
+        if (res.errcode == 0) {
           that.answer = res.data;
-          that.is_answer=true;
+          that.is_answer = true;
         }
-      })
+      });
     },
     //打分板
-    scoreChnage(i){
-      this.score = this.score.length<2? this.score+i.toString():i.toString()
+    scoreChnage(i) {
+      this.score =
+        this.score.length < 2 ? this.score + i.toString() : i.toString();
     },
     down() {
       this.flags = true; //是否开启拖拽
@@ -375,54 +428,141 @@ export default {
     },
     //退出全屏
     sign_out() {
-      this.$emit("sign", 1,this.selectId);
+      this.$emit("sign", 1, this.selectId);
     },
     //切换题号
-    pnoChange(i){
-      this.num_id=i;
-      this.selectId= 0;
-      this.$emit("pnoChange", i);
+    pnoChange(i, qno) {
+      this.num_id = qno;
+      this.num_index = i;
+      if(this.navId!=1){
+         this.selectId = 0;
+      }
+     
+      this.$emit("pnoChange", i, qno);
+      setTimeout(() => {
+        this.choice_studen(this.selectId, this.tk_list[this.selectId].qimg);
+      }, 700);
     },
     //下一题
     next_tk() {
-        console.log(111)
-      if (this.num_id == this.tk_num.length - 1) {
-        this.$message({
-          message: "已经是最后一题了哦",
-          type: "warning",
-        });
+      if (this.navIds == 1) {
+        if (this.num_index == this.tk_num.length - 1) {
+          this.full_submit();
+          setTimeout(() => {
+            this.$message({
+              message: "已经是最后一题了哦",
+              type: "warning",
+            });
+          }, 2000);
+        } else {
+          this.is_df_success = false;
+          this.full_submit();
+            setTimeout(() => {
+              if (this.is_df_success) {
+                this.num_index = this.num_index + 1;
+                this.$emit(
+                  "pnoChange",
+                  this.num_index,
+                  this.tk_num[this.num_index].qno
+                );
+                setTimeout(()=>{
+                  this.choice_studen(this.selectId, this.tk_list[this.selectId].qimg);
+                },1500)
+              }
+            }, 2000);
+        }
       } else {
-        this.num_id = this.num_id + 1;
-        console.log(this.num_id)
-        this.$emit("pnoChange", this.num_id)
+        if (this.selectId == this.tk_list.length - 1) {
+          this.downLoadImage(this.tk_list[this.selectId].id, this.score);
+          this.$message({
+            message: "已经是最后一位了哦,请选择下一题",
+            type: "warning",
+          });
+        } else {
+          this.is_df_success = false;
+          this.full_submit();
+          setTimeout(() => {
+            if (this.is_df_success) {
+              // this.selectId = this.selectId + 1;
+              this.choice_studen(
+                this.selectId,
+                this.tk_list[this.selectId].qimg
+              );
+            }
+          }, 2000);
+        }
       }
     },
     //上一题
     per_tk() {
-      if (this.num_id + 1 == 1) {
-        this.$message({
-          message: "已经是第一题了哦",
-          type: "warning",
-        });
+      if (this.navIds == 1) {
+        if (this.num_index + 1 == 1) {
+          this.$message({
+            message: "已经是第一题了哦",
+            type: "warning",
+          });
+        } else {
+          this.num_index = this.num_index - 1;
+          this.$emit(
+            "pnoChange",
+            this.num_index,
+            this.tk_num[this.num_index].qno
+          );
+          setTimeout(() => {
+            this.choice_studen(this.selectId, this.tk_list[this.selectId].qimg);
+          }, 700);
+        }
       } else {
-        this.num_id = this.num_id - 1;
-        this.$emit("pnoChange", this.num_id)
+        if (this.selectId + 1 == 1) {
+          this.$message({
+            message: "已经是第一位了哦",
+            type: "warning",
+          });
+        } else {
+          this.selectId = this.selectId - 1;
+          this.choice_studen(this.selectId, this.tk_list[this.selectId].qimg);
+        }
       }
     },
     //提交
     full_submit() {
-      var pattern=/^([1-9]\d*|0)$/;
-      if(!this.score){
-        this.$message.warning('还没打分哦')
-        return
-      }else if(!pattern.test(this.score)){
-         this.$message.warning('输入的分数不正确')
-        return
+      if (!this.lock) {
+        this.$message.warning("正在打分中~");
+        return;
       }
-      this.downLoadImage(this.tk_list[this.selectId].id,this.score,)
+      this.lock = false;
+      var that = this;
+      setTimeout(() => {
+        that.lock = true;
+      }, 2000);
+      var pattern = /^([1-9]\d*|0)$/;
+      if (!this.score) {
+        this.$message.warning("还没打分哦");
+        return;
+      } else if (!pattern.test(this.score)) {
+        this.$message.warning("输入的分数不正确");
+        return;
+      } else if (Number(this.score) > this.tk_list[this.selectId].score) {
+        this.$message.warning(
+          "批阅得分大于试题满分,本题满分为:" +
+            this.tk_list[this.selectId].score +
+            "分"
+        );
+        return;
+      }
+      this.downLoadImage(this.tk_list[this.selectId].id, this.score);
     },
-     downLoadImage(topic_id,score) {
+    downLoadImage(topic_id, score) {
       this.done = true;
+      var text = new fabric.Textbox(score + "分", {
+        left: 690,
+        top: 30,
+        width: 20,
+        fontSize: 32,
+        fill: this.drawColor,
+        hasControls: true,
+      });
+      this.fabricObj.add(text);
       //生成双倍像素比的图片
       let base64URl = this.fabricObj.toDataURL({
         formart: "jpg",
@@ -434,18 +574,24 @@ export default {
       var that = this;
       base64({
         content: base64URl,
-        filename: that.tk_list[this.selectId].student_sno+that.tk_list[this.selectId].id+that.tk_list[this.selectId].student_id+Date.parse(new Date()),
+        filename:
+          that.tk_list[this.selectId].student_sno +
+          that.tk_list[this.selectId].id +
+          that.tk_list[this.selectId].student_id +
+          Date.parse(new Date()),
       }).then((res) => {
         if (res.errcode == 0) {
           that.tk_list[that.selectId].qimg = res.data;
           that.tk_list[that.selectId].marked_score = score;
           that.tk_list[that.selectId].status = true;
           // that.review_succ(res.data, topic_id,score);
-          that.$emit("fatherMethod", res.data, topic_id,score);
+          that.is_df_success = true;
+          that.$emit("fatherMethod", res.data, topic_id, score);
           // console.log(that.tk_list.length-1,that.selectId)
-          if(that.selectId<that.tk_list.length-1){
-            that.selectId = that.selectId+1
-            that.choice_studen(that.selectId,this.tk_list[this.selectId].qimg)
+          if (that.selectId < that.tk_list.length - 1 &&this.navId!=1) {
+            that.selectId = that.selectId + 1;
+            that.choice_studen(that.selectId, this.tk_list[this.selectId].qimg);
+          }else{
           }
         }
       });
@@ -504,7 +650,7 @@ export default {
       this.fabricObj.setHeight(350);
       //绑定画板事件
       this.fabricObjAddEvent();
-      this.choice_studen(this.selectId,this.tk_list[this.selectId].qimg)
+      this.choice_studen(this.selectId, this.tk_list[this.selectId].qimg);
     },
     //时间监听
     fabricObjAddEvent() {
@@ -816,25 +962,28 @@ export default {
 };
 </script>
 <style scoped>
-.bg_box{
+.task_num{
+  margin: auto 0;
+}
+.bg_box {
   width: 100%;
   height: 100%;
   position: fixed;
   top: 0;
   left: 0;
-  background:rgba(0, 0, 0, 0.6);
+  background: rgba(0, 0, 0, 0.6);
   z-index: 99;
-} 
-.answers>span{
+}
+.answers > span {
   position: absolute;
   color: #fff;
   font-size: 40px;
-  top:-50px;
+  top: -50px;
   right: -50px;
   cursor: pointer;
 }
-.bg_box>div{
-  width:650px;
+.bg_box > div {
+  width: 650px;
   padding: 20px;
   box-sizing: border-box;
   border-radius: 4px;
@@ -842,19 +991,27 @@ export default {
   position: absolute;
   top: 50%;
   left: 50%;
-  transform: translate(-50%,-50%);
+  transform: translate(-50%, -50%);
 }
-.answers>div{
+.answers > div {
   margin: 20px 0;
   font-size: 14px;
- 
 }
-.answers .option{
- color: #57c77c;
+.answers .option {
+  color: #57c77c;
 }
 .full .el-progress.el-progress--line {
   width: 180px;
 }
+.full .task_num .el-progress.el-progress--line {
+  width: 70px;
+  margin: auto 5px;
+}
+.task_num span{
+  margin: auto 0;
+  font-weight: normal;
+  font-size: 13px;
+}
 .full {
   position: fixed;
   z-index: 99;
@@ -870,14 +1027,14 @@ export default {
 .full_r_top {
   margin: 13px 0;
 }
-.full_r_top span:first-child {
+.full_r_top>span:first-child {
   font-size: 15px;
   font-family: Microsoft YaHei;
   font-weight: bold;
   color: #333333;
   line-height: 32px;
 }
-.full_r_top span:last-child {
+.full_r_top>span:last-child {
   width: 69px;
   height: 32px;
   background: #fa0a2f;
@@ -995,7 +1152,8 @@ export default {
   color: #333;
   padding: 24px 30px;
 }
-.tk_list,.st_tk_num {
+.tk_list,
+.st_tk_num {
   overflow-y: scroll;
   padding: 10px 10px;
   margin: 0 10px;
@@ -1123,6 +1281,7 @@ export default {
   padding: 11px 5px;
   box-sizing: border-box;
   margin: 10px 0;
+  cursor: pointer;
 }
 .tk_num li.active {
   background: #ffe8ec;
@@ -1169,6 +1328,7 @@ export default {
   margin: 0;
   padding: 0;
   width: 100%;
+
 }
 .tk_dfp li {
   display: flex;
@@ -1222,6 +1382,7 @@ export default {
   right: 3.2rem;
   border-radius: 0.8rem;
   background-color: rgba(0, 0, 0, 0.55);
+    cursor: pointer;
 }
 .tk_df > div:first-child {
   height: 60px;
@@ -1247,8 +1408,8 @@ export default {
   line-height: 36px;
   margin: auto 0;
 }
-.tk_df .tk_fs input{
-  width:100%;
+.tk_df .tk_fs input {
+  width: 100%;
   height: 100%;
 }
 .tk_df .ts_num {
@@ -1281,52 +1442,60 @@ export default {
   padding: 9px;
   box-sizing: border-box;
   width: 100%;
-    height: 152px;
-    /* background: #FFE8EC; */
-    border-radius: 4px;
-    margin: 0 5px;
-    cursor: pointer;
-    text-align: center;
-    margin-bottom: 10px;
+  height: 152px;
+  /* background: #FFE8EC; */
+  border-radius: 4px;
+  margin: 0 5px;
+  cursor: pointer;
+  text-align: center;
+  margin-bottom: 10px;
 }
-.st_tk_num li>div.img_box{
-    width: 80%;
-height: 90px;
-background: #F7F7F7;
-margin: 0 auto;
+.st_tk_num li {
+  position: relative;
 }
-.st_tk_num li>div.img_box img{
-    width: 112px;
-height: 18px;
-margin-top: 35px;
+.st_tk_num li > div.img_box {
+  width: 80%;
+  height: 90px;
+  background: #f7f7f7;
+  margin: 0 auto;
+}
+.st_tk_num li > div.img_box img {
+  width: 112px;
+  height: 18px;
+  margin-top: 35px;
 }
 .st_tk_num li.active {
   background: #ffe8ec;
   border-radius: 4px;
 }
-.st_tk_num li.active>div.img_box{
-    background: #fff;
-    border-radius: 4px;
+.st_tk_num li.active > div.img_box {
+  background: #fff;
+  border-radius: 4px;
 }
-.st_tk_num li.active span{
-    color: #FA0A2F;
+.st_tk_num li.active span {
+  color: #fa0a2f;
 }
 .st_tk_num span {
-    display: inline-block;
+  display: inline-block;
   width: 100%;
   font-size: 13px;
-font-family: Microsoft YaHei;
-font-weight: 400;
-color: #333333;
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #333333;
   text-align: center;
   line-height: 50px;
 }
+.st_tk_num span:nth-child(2){
+  position: absolute;
+  right: -75px;
+  bottom: 4px;
+}
 </style>
 <style>
-.tk_num .el-progress-bar {
+.tk_num .el-progress-bar,.task_num .el-progress-bar {
   padding-right: 0;
 }
-.tk_num .el-progress__text {
+.tk_num .el-progress__text, .task_num .el-progress__text  {
   display: none;
 }
 </style>

+ 0 - 9
src/components/customer/answer_analysis.vue

@@ -296,13 +296,6 @@ export default {
     //答题分析列表
     getList(){
       var that = this;
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-
       get('/v1/api/tasks/'+this.id+'/answers',{page:this.page,size:this.size}).then((res)=>{
         if(res.errcode == 0){
           that.answer_list = res.data;
@@ -312,8 +305,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-        //关闭loading
-          load.close();
       });
     },
     //分页

+ 2 - 12
src/components/customer/capital.vue

@@ -38,7 +38,7 @@
         </div>
         <div class="d-f screen">
           <span>地区:</span>
-          <el-select v-model="params.area" clearable placeholder="请选择">
+          <el-select v-model="params.area" class="small" clearable placeholder="请选择">
             <el-option
               :label="item.name"
               :value="item.name"
@@ -47,7 +47,7 @@
             ></el-option>
           </el-select>
           <span>年份:</span>
-          <el-select v-model="params.year" clearable placeholder="请选择">
+          <el-select v-model="params.year" class="small" clearable placeholder="请选择">
             <el-option
               :label="item.name"
               :value="item.name"
@@ -406,12 +406,6 @@ export default {
     },
     //获取列表
     getList() {
-      // const load = this.$loading({
-      //   lock: true,
-      //   text: "Loading",
-      //   spinner: "el-icon-loading",
-      //   background: "rgba(0, 0, 0, 0.7)",
-      // });
       var that = this;
       var obj = JSON.parse(JSON.stringify(this.params));
       for (let key in obj) {
@@ -428,7 +422,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess);
         }
-        // load.close();
       });
     },
     //排序
@@ -702,7 +695,4 @@ export default {
 .filtering_box .el-checkbox__label {
   font-size: 13px;
 }
-.screen .el-select {
-  width: 140px;
-}
 </style>

+ 0 - 8
src/components/customer/cite.vue

@@ -105,12 +105,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       relQuestions(this.id).then((res) => {
         if (res.errcode == 0) {
@@ -121,8 +115,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-         //关闭loading
-          load.close();
       });
     },
      jump(url) {

+ 0 - 8
src/components/customer/err_book.vue

@@ -114,12 +114,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var obj= this.params.id+'/errbook?page='+this.params.page+'&size='+this.params.size;
       errbook(obj).then((res) => {
@@ -131,8 +125,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-         //关闭loading
-          load.close();
       });
     },
      jump(url) {

+ 3 - 39
src/components/customer/examination.vue

@@ -13,7 +13,7 @@
              <img src="@/assets/su6.png" alt="" v-if="info.subject=='政治'" />
              <img src="@/assets/su7.png" alt="" v-if="info.subject=='历史'" />
              <img src="@/assets/su8.png" alt="" v-if="info.subject=='生物'" />
-             <img src="@/assets/su9.png" alt="" v-if="info.subject=='化学'" />
+             <img src="@/assets/su9.png" alt="" v-if="info.subject=='地理'" />
         </div>
         <div class="bg-white">
           <div class="Menu_list d-f">
@@ -38,7 +38,7 @@
         </div>
         <div class="d-f screen">
           <span>地区:</span>
-          <el-select v-model="params.area" clearable placeholder="请选择">
+          <el-select v-model="params.area" class="small" clearable placeholder="请选择">
             <el-option
               :label="item.name"
               :value="item.name"
@@ -47,7 +47,7 @@
             ></el-option>
           </el-select>
           <span>年份:</span>
-          <el-select v-model="params.year" clearable placeholder="请选择">
+          <el-select v-model="params.year" class="small" clearable placeholder="请选择">
             <el-option
               :label="item.name"
               :value="item.name"
@@ -55,20 +55,6 @@
               :key="item.name"
             ></el-option>
           </el-select>
-          <!-- <span>资源类别:</span>
-          <el-select
-            v-model="params.ctgid"
-            clearable
-            placeholder="请选择"
-          >
-            <el-option
-              v-for="item in cateList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select> -->
           <div class="search_box">
             <i class="el-icon-search"></i>
             <el-input
@@ -238,15 +224,6 @@ export default {
     //  var time = parseInt(new Date().getTime()/1000)
     localStorage.setItem("navKey", "1");
     localStorage.setItem('ctype','exam');
-    //     if(this.Common.timeLogin() ==2){
-    //     localStorage.setItem('open_tiem',time)
-    //     this.$router.go(0);
-    //   return
-    // }else if(this.Common.timeLogin() ==1){
-    //   this.$router.push('/login');
-    //     localStorage.setItem('open_tiem',time)
-    //     return
-    // }
     var that = this;
     categories({ ctype: "exam" }).then((res) => {
       if (res.errcode == 0) {
@@ -400,12 +377,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var obj = JSON.parse(JSON.stringify(this.params));
       for (let key in obj) {
@@ -422,7 +393,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-             load.close();
       });
     },
     changeScreen(val) {
@@ -751,12 +721,6 @@ export default {
 .recordTitle span:last-child {
   color: #666;
 }
-.el-select {
-  width: 140px;
-}
-.el-pagination {
-  margin-left: auto;
-}
 </style>
 <style>
 .filtering_box .el-checkbox__input.is-checked .el-checkbox__inner {

+ 0 - 7
src/components/customer/myClass.vue

@@ -158,12 +158,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var obj = JSON.parse(JSON.stringify(this.params));
       obj.cid=obj.cid?obj.cid:0
@@ -176,7 +170,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-             load.close();
       });
     },
     jump(url) {

+ 0 - 7
src/components/customer/per_err.vue

@@ -132,12 +132,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var par =
         "/" +
@@ -151,7 +145,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-             load.close();
       });
     },
     jump(url) {

+ 3 - 13
src/components/customer/push_err.vue

@@ -12,11 +12,10 @@
         <div class="d-f screen screen1">
            <span>学校:</span>
           <el-select
-          class="small"
+            class="small"
             v-model="params.sid"
             disabled
             placeholder="请选择"
-            style="width:150px"
           >
             <el-option
               :label="item.name"
@@ -61,7 +60,6 @@
             placeholder="请选择"
             v-model="source"
             @change="sourceList"
-            style="width:85px"
           >
             <el-option value="exam" label="考试"></el-option>
             <el-option value="work" label="作业"></el-option>
@@ -71,7 +69,7 @@
             v-model="params.tid"
             clearable
             placeholder="请选择"
-            style="width: 150px; margin-left: 5px"
+            style="margin-left: 5px"
           >
             <el-option
               v-for="(item, i) in sour_list"
@@ -403,7 +401,7 @@ export default {
     },
     getStudent(){
       var that = this;
-      searchClass({ cid: that.params.cid }).then((res) => {
+      searchClass({ cid: that.params.cid,_all:1 }).then((res) => {
           if (res.errcode == 0) {
             var l = [];
             res.data.forEach((item) => {
@@ -524,12 +522,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var obj =  JSON.parse(JSON.stringify(this.params)) 
       for(let key  in obj){
@@ -546,9 +538,7 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-        load.close();
       }).catch(res=>{
-         load.close();
         console.log(res)
       })
     },

+ 0 - 7
src/components/customer/see_pusherr.vue

@@ -96,12 +96,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       clsPushEp(this.params.prid+'?page='+this.params.page+'&size='+this.params.size).then((res) => {
         if (res.errcode == 0) {
@@ -112,7 +106,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-         load.close();
       });
     },
     jump(url) {

+ 2 - 8
src/components/customer/student_err.vue

@@ -59,7 +59,7 @@
           <el-table-column prop="error_ratio" label="综合出错率">
               <template slot-scope="scope">
                 <div class="red">
-                   {{Number(scope.row.error_ratio).toFixed(2)}}%
+                   {{scope.row.error_ratio}}
                 </div>
               </template>
              </el-table-column>
@@ -95,6 +95,7 @@
         </div>
       </div>
     </div>
+
     <!-- <foot></foot> -->
   </div>
 </template>
@@ -148,12 +149,6 @@ export default {
     //查看
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var obj = JSON.parse(JSON.stringify(this.params));
       stuErr(obj).then((res) => {
@@ -165,7 +160,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess);
         }
-        load.close();
       });
     },
     jump(url) {

+ 1 - 8
src/components/customer/student_per_err.vue

@@ -50,7 +50,7 @@
              <template slot-scope="scope">
         <el-button @click="
                 jump(
-                  '/per_err?sid=' +
+                  '/student_per_jh?sid=' +
                     params.sid +
                     '&tid=' +
                      scope.row.student_task_id +
@@ -121,12 +121,6 @@ export default {
     //查看
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       stu_err_stati(this.params.sid).then((res) => {
         if (res.errcode == 0) {
@@ -137,7 +131,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess);
         }
-        load.close();
       });
     },
     jump(url) {

+ 523 - 0
src/components/customer/student_per_jh.vue

@@ -0,0 +1,523 @@
+<template>
+  <div class="page scroll-x">
+    <topHead></topHead>
+    <topNav></topNav>
+    <div class="container d-f">
+      <sonNav></sonNav>
+      <div class="rightContent">
+        <div class="recordTitle">
+          <span>错题中心> </span>
+          <span class="black" @click="jump('/student_err')">学生错题></span>
+          <span>{{ name }}{{title}}</span>
+        </div>
+        <div class=" d-f j-s census_box">
+          <div class="title">
+              <div>{{ name}}</div>
+              <div>《 {{title}}》答题情况</div>
+          </div>
+          <div class="d-f census_fbx">
+            <li>
+              <div>
+                <img src="../../assets/zy1.png" alt="" />
+              </div>
+              <div>
+                <span>总题数</span>
+                <span>{{total_score.total_questions}}</span>
+              </div>
+            </li>
+            <li>
+              <div>
+                <img src="../../assets/zy2.png" alt="" />
+              </div>
+              <div>
+                <span>错题数</span>
+                <span>{{total_score.total_errors}}</span>
+              </div>
+            </li>
+            <li>
+              <div>
+                <img src="../../assets/zy3.png" alt="" />
+              </div>
+              <div>
+                <span>错题率</span>
+                <span>{{total_score.error_ratio}}</span>
+              </div>
+            </li>
+          </div>
+        </div>
+        <div class="error_coll">
+          <li class="d-f j-s" v-for="(item, i) in tableData" :key="i + 'a'">
+            <div>
+              <div class="t_img">
+                <img :src="item.marked_img" alt="">
+                <!-- <div class="stem" v-html="item.stem"></div> -->
+                <div class="d-f j-s">
+                  <span
+                    >来源:{{ item.task_type == "work" ? "作业" : "考试" }}-{{
+                      item.task_name
+                    }}</span
+                  >
+                  <span
+                    >答案: <span class="bold">{{ item.answer }}</span>
+                  </span>
+                  <span @click="is_answer = true,index=i">
+                    <i class="iconfont icondengpao1"></i> 答案解析</span
+                  >
+                </div>
+              </div>
+              <!-- <div class="d-f j-s probability">
+                <div>错误率:{{ item.error_ratio }}</div>
+                <div class="d-f j-s">
+                  <span>总人数:{{ item.student_count }}</span>
+                  <span
+                    >错误/正确人数:{{ item.error_count }}/{{
+                      item.right_count
+                    }}</span
+                  >
+                </div>
+              </div> -->
+            </div>
+            <!-- <div
+              class="roseChart"
+              :style="{
+                width: '240px',
+                height: '180px',
+              }"
+            ></div> -->
+          </li>
+        </div>
+        <div class="none" v-if="tableData.length == 0">
+          <div>
+            <img src="../../assets/none.png" alt="" />
+          </div>
+          <div>暂无数据</div>
+        </div>
+        <div class="d-f j-s pagePagin" v-if="total > 0">
+          <el-pagination
+            background
+            layout="prev, pager, next"
+            :total="total"
+            :page-size="params.size"
+            :current-page="params.page"
+            @current-change="handleCurrentChange"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+         <!-- 答案解析 -->
+    <div class="fit" v-if="is_answer">
+      <div>
+        <div class="titl">答案解析</div>
+        <div class="del el-icon-close" @click="is_answer = false"></div>
+        <div>
+           <div class="analysis" v-html=" tableData[index].analysis"></div>
+        </div>
+      </div>
+    </div>
+    <!-- <foot></foot> -->
+  </div>
+</template>
+<script>
+import topNav from "@/components/assembly/topnav";
+import topHead from "@/components/assembly/head";
+import foot from "@/components/assembly/foot";
+import sonNav from "@/components/assembly/err_nav";
+import { stuErrPer, errbook } from "@/util/api";
+export default {
+  data() {
+    return {
+      params: {
+        page: 1,
+        size: 10,
+      },
+      tableData: [],
+      classL: [],
+      total: 0,
+       name: "",
+      title: "",
+      sid:'',
+      tid:"",
+      is_answer:false,
+      total_score:{},
+    };
+  },
+  created() {
+     this.name = this.$route.query.name;
+    this.title = this.$route.query.title;
+    this.sid = this.$route.query.sid;
+    this.tid = this.$route.query.tid;
+    this.getList();
+    var obj =  this.sid+'/tasks/'+this.tid+'/error-info'
+    errbook(obj).then(res=>{
+      if(res.errcode==0){
+        this.total_score = res.data
+      }
+    })
+  },
+  //   mounted() {
+  //   var that = this;
+  //   this.$nextTick(function () {
+  //     //这里写方法
+  //     that.drawRose();
+  //   });
+  // },
+  // watch: {
+  //   tableData: function () {
+  //     //tableData为需要监听的data
+  //     var that = this;
+  //     this.$nextTick(function () {
+  //       //这里写方法
+  //       that.drawRose();
+  //     });
+  //   },
+  // },
+  methods: {
+    //搜索
+    search() {
+      this.params.page = 1;
+      this.getList();
+    },
+    //分页
+    handleCurrentChange(val) {
+      this.params.page = val;
+      this.getList();
+    },
+    //查看
+    //获取列表
+    //获取列表
+    getList() {
+      var that = this;
+      var obj ='/'+ this.sid+'/tasks/'+this.tid+'/questions?page='+this.params.page+'&size='+this.params.size;
+      stuErrPer(obj).then((res) => {
+        if (res.errcode == 0) {
+          that.tableData = res.data ? res.data : [];
+          that.total = res.total;
+        }else{
+          that.tableData = [];
+          that.total = 0;
+          that.$message.warning(res.mess)
+        }
+      }).catch(res=>{
+        console.log(res)
+      })
+    },
+     drawRose() {
+      var roseCharts = document.getElementsByClassName("roseChart");
+      var index = 0;
+      for (var i = 0; i < this.tableData.length; i++) {
+        index = i;
+        var xdata = [];
+        var ydata = [];
+        var maxNum = "";
+        if (this.tableData[i].dist.length < 0) {
+          return;
+        }
+        for (var j = 0; j < this.tableData[i].dist.length; j++) {
+          xdata.push(this.tableData[i].dist[j].key);
+          ydata.push(this.tableData[i].dist[j].val);
+        }
+        maxNum = Math.max(...ydata);
+        for (var q = 0; q < ydata.length; q++) {
+          ydata[q] = {
+            value: ydata[q],
+            itemStyle: {
+              color: ydata[q] >= 75 ? "#39D095" : "#508CEE",
+            },
+          };
+        }
+        var itemChart = this.$echarts.init(roseCharts[index]);
+        // console.log(itemChart);
+        // 绘制图表
+        itemChart.setOption({
+          tooltip: {
+            trigger: "axis",
+            axisPointer: {
+              // 坐标轴指示器,坐标轴触发有效
+              type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
+            },
+          },
+          grid: {
+            left: "0%",
+            right: "0%",
+            bottom: "0%",
+            containLabel: true,
+            height: 170,
+          },
+          xAxis: [
+            {
+              type: "category",
+              data: xdata,
+              axisTick: {
+                alignWithLabel: true,
+              },
+              axisLine: {
+                lineStyle: {
+                  color: "#D9D9D9",
+                },
+              },
+              axisLabel: {
+                //x轴文字的配置
+                show: true,
+                textStyle: {
+                  color: "#999",
+                  fontSize: 13,
+                  // align: "right",
+                },
+              },
+              axisTick: {
+                show: false,
+              },
+            },
+          ],
+          yAxis: [
+            {
+              type: "value",
+              axisLabel: {
+                formatter: "{value}",
+                textStyle: {
+                  color: "#999",
+                },
+              },
+              max: maxNum,
+              min: 0,
+              interval: 2,
+              splitLine: {
+                show: true,
+                lineStyle: {
+                  type: "dashed",
+                  color: "#D9D9D9",
+                },
+              },
+              axisTick: {
+                //y轴刻度线
+                show: false,
+              },
+              axisLine: {
+                //y轴
+                show: false,
+              },
+              axisLabel: {
+                //x轴文字的配置
+                show: true,
+                margin: 40,
+                textStyle: {
+                  color: "#999",
+                  fontSize: 13,
+                  align: "left",
+                },
+              },
+            },
+          ],
+          series: [
+            {
+              name: "学生人数",
+              type: "bar",
+              barWidth: "20",
+              itemStyle: {
+                normal: {
+                  color: function (params) {
+                    //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
+                    var colorList = [];
+                    if (params.value < 26) {
+                      colorList.push("#508CEE");
+                    } else if (25 < params.value && params.value < 51) {
+                      colorList.push("#1FDA9A");
+                    } else {
+                      colorList.push("#FA0A2F");
+                    }
+                    return colorList;
+                  },
+                },
+              },
+              data: ydata,
+            },
+          ],
+        });
+      }
+    },
+    jump(url) {
+      this.$router.push(url);
+    },
+  },
+  components: { topHead, topNav, foot,sonNav},
+};
+</script>
+<style scoped>
+.container {
+  background: #f4f4f4;
+  margin-top: 30px;
+}
+.fit .form_box > div {
+  display: flex;
+  margin: 10px 0;
+}
+.fit .analysis {
+  font-size: 13px;
+  background: #fff8e8;
+  margin-top: 35px;
+  padding: 10px 15px;
+  line-height: 27px;
+}
+.fit .del {
+  color: #bebebe;
+  font-size: 22px;
+  cursor: pointer;
+  position: absolute;
+  top: 20px;
+  right: 20px;
+}
+.fit img {
+  width: 100%;
+  margin-top: 10px;
+}
+.fit .btn .el-button {
+  padding: 10px 20px;
+}
+.fit .btn {
+  margin: 25px 0 5px 0;
+  text-align: right;
+}
+.fit .form_box > div span {
+  width: 75px;
+  font-size: 14px;
+  color: #666666;
+  line-height: 35px;
+}
+.fit {
+  position: fixed;
+  z-index: 99;
+  background: rgba(0, 0, 0, 0.4);
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+.census_box {
+  background: #fff;
+  width: 100%;
+  padding: 20px;
+  box-sizing: border-box;
+}
+
+.census_box .title div:first-child {
+  font-size: 17px;
+  font-family: Microsoft YaHei;
+  font-weight: bold;
+  color: #333333;
+  margin-top: 20px;
+}
+.census_box .title>div:last-child{
+    font-size: 15px;
+font-family: Microsoft YaHei;
+font-weight: 400;
+color: #50AFF6;
+margin-top: 16px;
+}
+.census_fbx li > div:first-child {
+  width: 48px;
+  height: 48px;
+  margin: auto 0;
+  margin-right: 17px;
+}
+.census_fbx li {
+  display: flex;
+  margin-top: 30px;
+  margin-right: 85px;
+  margin-bottom: 10px;
+}
+.census_fbx li span {
+  display: block;
+}
+.census_box li span:first-child {
+  font-size: 13px;
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #666666;
+  margin-bottom: 10px;
+}
+.census_box li span:last-child {
+  font-size: 28px;
+  font-family: Bahnschrift;
+  font-weight: 400;
+  color: #333333;
+}
+.fit > div {
+  width: 400px;
+  padding: 20px;
+  box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.1);
+  border-radius: 10px;
+  background: #ffffff;
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+}
+.fit .tit {
+  font-size: 16px;
+  color: #000000;
+  margin-bottom: 20px;
+}
+.error_coll li {
+  background: #ffff;
+  margin: 10px 0;
+  /* height: 222px; */
+  padding: 20px;
+  box-sizing: border-box;
+}
+.error_coll li > div {
+  width: 100%;
+}
+.error_coll .probability {
+  font-size: 13px;
+  color: #999999;
+}
+.error_coll .probability > div:first-child {
+  color: #fa0a2f;
+}
+.error_coll .probability > div:last-child {
+  width: 35%;
+}
+.error_coll .t_img {
+  /* border-bottom: 1px solid #ededed; */
+  padding-bottom: 10px;
+  margin-bottom: 10px;
+  color: #999999;
+  font-size: 13px;
+}
+.error_coll .t_img > div > span:last-child {
+  color: #52c4ff;
+  cursor: pointer;
+}
+.error_coll .t_img .bold {
+  font-weight: bold;
+}
+.error_coll .t_img img {
+  width: 100%;
+  height: 155px;
+  margin-bottom: 30px;
+}
+.error_coll .t_img .stem {
+  font-size: 14px;
+  color: #333;
+  min-height: 130px;
+}
+.error {
+  width: 100%;
+  height: 32px;
+  background: #ffeabe;
+  border: 0px solid #030000;
+  font-size: 13px;
+  color: #f08216;
+  text-align: center;
+  line-height: 32px;
+}
+.reset {
+  font-size: 13px;
+  color: #1fb3ff;
+  cursor: pointer;
+  position: absolute;
+  right: 20px;
+}
+
+</style>

+ 0 - 17
src/components/customer/task.vue

@@ -174,16 +174,6 @@ export default {
     };
   },
   created() {
-    //   var time = parseInt(new Date().getTime()/1000)
-    //     if(this.Common.timeLogin() ==2){
-    //     localStorage.setItem('open_tiem',time)
-    //     this.$router.go(0);
-    //   return
-    // }else if(this.Common.timeLogin() ==1){
-    //   this.$router.push('/login');
-    //     localStorage.setItem('open_tiem',time)
-    //     return
-    // }
     var thta = this;
     this.navKey = localStorage.getItem("navKey");
     this.params.mtype = this.navKey == 2 ? "work" : "exam";
@@ -223,12 +213,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       var obj = JSON.parse(JSON.stringify(this.params));
       for (let key in obj) {
@@ -254,7 +238,6 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess);
         }
-        load.close();
       });
     },
     jump(url,id) {

+ 0 - 2
src/components/customer/tk_xs_fx.vue

@@ -170,8 +170,6 @@ export default {
          that.list = res.data
          that.total = res.total
         }
-        //关闭loading
-          load.close();
       });
     },
     drawRose() {

+ 361 - 185
src/components/customer/tk_yp.vue

@@ -12,7 +12,8 @@
           <i class="iconfont iconyuejuan"></i> <span>阅卷任务</span>
         </li>
         <li @click="jump('/work_analysis')">
-          <i class="iconfont iconzuoye1"></i><span>{{navKey==2?'作业分析':'成绩分析'}}</span>
+          <i class="iconfont iconzuoye1"></i
+          ><span>{{ navKey == 2 ? "作业分析" : "成绩分析" }}</span>
         </li>
         <!-- <li @click="jump()">
           <i class="iconfont iconcuoti1"></i><span>错题分析</span>
@@ -20,25 +21,32 @@
       </div>
       <div class="rightContent">
         <div class="recordTitle">
-          <span>{{navKey==2?'作业中心':'考试中心'}} > </span>
+          <span>{{ navKey == 2 ? "作业中心" : "考试中心" }} > </span>
           <span @click="jump('/task')" class="black">阅卷任务 ></span>
           <span>{{ title }}</span>
         </div>
         <div class="d-f j-s screen">
           <div>
-            <span :class="i==nav_id?'active':''" v-for="(item,i) in nav_list" :key='i+"k"' @click="navChange(i)">{{item}}</span>
+            <span
+              :class="i == nav_id ? 'active' : ''"
+              v-for="(item, i) in nav_list"
+              :key="i + 'k'"
+              @click="navChange(i)"
+              >{{ item }}</span
+            >
           </div>
-          <div @click="sure_submit(tk_list[selectId].id,score)">确认提交</div>
+          <div @click="sure_submit(tk_list[selectId].id, score)">确认提交</div>
         </div>
         <div class="d-f">
-          <div class="tk_box" v-if="nav_id!=1">
-            <div class="d-f j-s title" v-if="tk_list.length>0">
+          <div class="tk_box" v-if="nav_id != 1">
+            <div class="d-f j-s title" v-if="tk_list.length > 0">
               <span
-                >第 <span class="blue">{{tk_list[0].qno }}</span> 题</span
+                >第 <span class="blue">{{ tk_list[0].qno }}</span> 题</span
               >
               <span
                 ><span class="blue">{{ selectId + 1 }}</span>
-                <span class="gray">/{{ student_total}}</span></span>
+                <span class="gray">/ {{ student_total }}人</span></span
+              >
             </div>
             <div class="tk_list">
               <li
@@ -50,15 +58,8 @@
               >
                 <div class="d-f j-s tk_name">
                   <span>{{ i + 1 }}.{{ item.student_name }}</span>
-                  <span
-                    :class="
-                      item.status ? 'reds' : ''
-                    "
-                    >{{
-                      item.status
-                        ? item.marked_score
-                        : "--"
-                    }}分</span
+                  <span :class="item.status ? 'reds' : ''"
+                    >{{ item.status ? item.marked_score : "--" }}分</span
                   >
                 </div>
                 <div class="img_box">
@@ -79,14 +80,7 @@
                 <div class="d-f j-s tk_name">
                   <span>{{ i + 1 }}.{{ item.student_name }}</span>
                   <span
-                    :class="
-                      item.status? 'reds' : ''
-                    "
-                    >{{
-                      item.status
-                        ? item.marked_score
-                        : "--"
-                    }}分</span
+                    >{{ item.marked_amount}} / {{ item.question_amount}}题</span
                   >
                 </div>
               </li>
@@ -146,39 +140,89 @@
               </div>
             </div>
             <div class="d-f j-s tk-foot">
-              <div class="py_jd" v-if="nav_id!=1">
+              <div class="py_jd" v-if="nav_id != 1">
                 <div class="tk_tit">批阅进度</div>
                 <div class="tk_num">
                   <li
                     v-for="(item, i) in tk_num"
                     :key="i + '批阅'"
                     class="d-f j-s"
-                    :class="i == (tk_list[0].qno-1) ? 'active' : ''"
-                    @click="pnoChange(i,item.marked_amount,item.question_amount)"
+                    :class="i == num_index ? 'active' : ''"
+                    @click="
+                      pnoChange(
+                        i,
+                        item.qno,
+                        item.marked_amount,
+                        item.question_amount
+                      )
+                    "
                   >
                     <span>第{{ item.qno }}题</span>
                     <el-progress
-                      :percentage="item.marked_amount == 0 ? 0 : (item.marked_amount / item.question_amount) * 100"
+                      :percentage="
+                        item.marked_amount == 0
+                          ? 0
+                          : (item.marked_amount / item.question_amount) * 100
+                      "
                       :stroke-width="10"
-                      :color="item.marked_amount == item.question_amount ? '#0A9DFF' : '#FA0A2F'"
+                      :color="
+                        item.marked_amount == item.question_amount
+                          ? '#0A9DFF'
+                          : '#FA0A2F'
+                      "
                     ></el-progress>
-                    <span>{{ item.marked_amount }}/{{ item.question_amount}}</span>
+                    <span
+                      >{{ item.marked_amount }} / {{ item.question_amount }}人</span
+                    >
                   </li>
                 </div>
               </div>
               <div class="py_jd" v-else>
-                <div class="tk_tit">试题</div>
+                <div class="d-f j-s ">
+                    <div class="tk_tit">试题</div>
+                  <li class="d-f task_num">
+                    <span>第{{ tk_num[num_index].qno }}题</span>
+                    <el-progress
+                      :percentage="
+                        tk_list[selectId].marked_amount == 0
+                          ? 0
+                          : (tk_list[selectId].marked_amount / tk_list[selectId].question_amount) * 100
+                      "
+                      :stroke-width="10"
+                      :color="
+                        tk_list[selectId].marked_amount == tk_list[selectId].question_amount
+                          ? '#0A9DFF'
+                          : '#FA0A2F'
+                      "
+                    ></el-progress>
+                    <span
+                      >{{ tk_list[selectId].marked_amount }} / {{tk_list[selectId].question_amount }}题</span
+                    >
+                  </li>
+                </div>
+              
                 <div class="d-f st_tk_num">
                   <li
                     v-for="(item, i) in tk_num"
                     :key="i + '批阅'"
-                    :class="i == (tk_list[0].qno-1) ? 'active' : ''"
-                    @click="pnoChange(i,item.marked_amount,item.question_amount)"
+                    :class="i == num_index ? 'active' : ''"
+                    @click="
+                      pnoChange(
+                        i,
+                        item.qno,
+                        item.marked_amount,
+                        item.question_amount
+                      )
+                    "
                   >
                     <div class="img_box">
-                  <img src="../../assets/tk_img.png" alt="" />
-                </div>
-                    <span>第{{ item.qno}}题</span>
+                      <img src="../../assets/tk_img.png" alt="" />
+                    </div>
+                    <div>
+                      <span>第{{ item.qno }}题</span>
+                      <span v-if="tk_list[selectId].qno == item.qno">({{tk_list[selectId].marked_score}})分</span>
+                    </div>
+                    
                   </li>
                 </div>
               </div>
@@ -187,11 +231,15 @@
                   <div>
                     <span class="df">智能阅卷打分版</span>
                     <div class="ts_num">
-                      <span>第{{ num_id + 1}}题</span>
-                      <span v-if="tk_list&&tk_list.length>0">满分:{{tk_list[selectId].score}}分</span>
+                      <span>第{{ num_id + 1 }}题</span>
+                      <span v-if="tk_list && tk_list.length > 0"
+                        >满分:{{ tk_list[selectId].score }}分</span
+                      >
                     </div>
                   </div>
-                  <div class="tk_fs"><el-input type="text" v-model="score"/></div>
+                  <div class="tk_fs">
+                    <el-input type="text" v-model="score" />
+                  </div>
                 </div>
                 <div class="d-f j-s dfp_box">
                   <div class="tk_dfp">
@@ -199,7 +247,7 @@
                       <span
                         v-for="(item, i) in 3"
                         :key="i + '1-3'"
-                        @click="scoreChnage(i + 1) "
+                        @click="scoreChnage(i + 1)"
                         >{{ i + 1 }}</span
                       >
                     </li>
@@ -220,14 +268,18 @@
                       >
                     </li>
                     <li>
-                      <span @click="score=tk_list[selectId].score">满分</span>
+                      <span @click="score = tk_list[selectId].score">满分</span>
                       <span @click="scoreChnage(0)">0</span>
                       <span @click="score = ''">X</span>
                     </li>
                   </div>
                   <div class="tk_qh">
-                    <span @click="per_tk">上一题</span>
-                    <span @click="next_tk">下一题</span>
+                    <span @click="per_tk">{{
+                      nav_id == 1 ? "上一题" : "上一位"
+                    }}</span>
+                    <span @click="next_tk">{{
+                      nav_id == 1 ? "下一题" : "下一位"
+                    }}</span>
                   </div>
                 </div>
               </div>
@@ -240,13 +292,26 @@
     <!--查看答案 -->
     <div class="bg_box" v-if="is_answer">
       <div class="answers">
-        <span class="el-icon-circle-close" @click="is_answer=false"></span>
-           <!-- <img :src="answer.full_img" alt=""> -->
-            <div> <span>答案:</span> <span class="option">{{answer.answer}}</span></div>
-            <div> <span>解析:</span> <span v-html="answer.analysis"></span></div>
+        <span class="el-icon-circle-close" @click="is_answer = false"></span>
+        <!-- <img :src="answer.full_img" alt=""> -->
+        <div>
+          <span>答案:</span> <span class="option">{{ answer.answer }}</span>
+        </div>
+        <div><span>解析:</span> <span v-html="answer.analysis"></span></div>
       </div>
     </div>
-    <full v-if="full" @sign="sign" @fatherMethod='review_succ' :tk_lists='tk_list' :tk_nums='tk_num' :selectIds='selectId' :num_ids='num_id' :navIds='nav_id' @pnoChange='pnoChange'></full>
+    <full
+      v-if="full"
+      @sign="sign"
+      @fatherMethod="review_succ"
+      :tk_lists="tk_list"
+      :tk_nums="tk_num"
+      :selectIds="selectId"
+      :num_ids="num_id"
+      :navIds="nav_id"
+      :processs ='process'
+      @pnoChange="pnoChange"
+    ></full>
   </div>
 </template>
 <script>
@@ -255,28 +320,29 @@ import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
 import full from "@/components/assembly/tk_st_qp";
 import { fabric } from "fabric";
-import {base64 } from "@/util/api";
-import { get, put } from "@/util/common.js";
+import { base64 ,taskshg} from "@/util/api";
+import { get, put} from "@/util/common.js";
 export default {
   data() {
     return {
-      is_answer:false,
+      is_answer: false,
       base64s: "",
       params: {
         region: "全部",
       },
-      nav_list:['按试题批阅','按学生批阅'],
-      nav_id:0,
+      nav_list: ["按试题批阅", "按学生批阅"],
+      nav_id: 0,
       listP: {
         page: 1,
         size: 100,
-        qno:0,
+        qno: "",
       },
       title: "",
       full: false,
       score: "",
       selectId: 0,
       num_id: 0,
+      num_index: 0,
       mouseFrom: {},
       mouseTo: {},
       moveCount: 1,
@@ -350,20 +416,26 @@ export default {
       tk_list: [],
       id: "",
       student_total: 0,
-      pid:'',
-      answer:{},
-      navKey:'',
-      lock:true,
+      pid: "",
+      answer: {},
+      navKey: "",
+      lock: true,
+      is_df_success: false,
+      process:[],
     };
   },
   created() {
-     this.navKey = localStorage.getItem('navKey');
+    this.navKey = localStorage.getItem("navKey");
     this.title = this.$route.query.title;
     this.id = this.$route.query.id;
     this.pid = this.$route.query.tid;
-  
-    this.getquestions(this.listP);
-   this.getpaperjd();
+    this.getpaperjd();
+    var obj = this.id+'/stu-process'
+    taskshg(obj).then(res=>{
+      if(res.errcode==0){
+        this.process = res.data
+      }
+    })
   },
   mounted() {
     //初始化canvas
@@ -376,84 +448,103 @@ export default {
   },
   methods: {
     //查看答案
-    seeAnswer(){
+    seeAnswer() {
       var that = this;
-      get('v1/api/papers/'+this.tk_list[this.selectId].pid+'/questions/'+this.tk_list[this.selectId].qno+'-'+this.tk_list[this.selectId].sqno+'/answer').then(res=>{
-        if(res.errcode==0){
+      get(
+        "v1/api/papers/" +
+          this.tk_list[this.selectId].pid +
+          "/questions/" +
+          this.tk_list[this.selectId].qno +
+          "-" +
+          this.tk_list[this.selectId].sqno +
+          "/answer"
+      ).then((res) => {
+        if (res.errcode == 0) {
           that.answer = res.data;
-          that.is_answer=true;
+          that.is_answer = true;
         }
-      })
+      });
     },
-     //打分板
-    scoreChnage(i){
-      this.score = this.score.length<2? this.score+i.toString():i.toString()
+    //打分板
+    scoreChnage(i) {
+      this.score =
+        this.score.length < 2 ? this.score + i.toString() : i.toString();
     },
     //切换nav
-    navChange(i){
-      this.nav_id = i
+    navChange(i) {
+      this.nav_id = i;
       // if(i==1){
       //   this.getpaper();
       // }else{
-        // this.getpaperjd();
+      // this.getpaperjd();
       // }
     },
     //切换试题
-    pnoChange(i,num,py_num){
-      console.log(num,py_num)
-      if(num==py_num){
-        this.$message.warning('第'+(i+1)+'题已经批阅完成~')
-        return
-      }
-      this.num_id = i;
+    pnoChange(i, qmo, num, py_num) {
+      this.num_id = qmo;
+      this.num_index = i;
       var p = this.listP;
-          p.qno= i+1
-      this.getquestions(p)
+      p.qno = qmo;
+      if (this.nav_id != 1) {
+        this.selectId = 0;
+      }
+      this.getquestions(p);
     },
     //试题进度
-    getpaperjd(){
-        var that = this;
-       get("/v1/api/tasks/"+ this.id +"/process").then((res) => {
-      if (res.errcode == 0) {
-        that.tk_num = res.data;
-      }
-    });
+    getpaperjd() {
+      var that = this;
+      console.log(that.listP.qno);
+      get("/v1/api/tasks/" + this.id + "/process").then((res) => {
+        if (res.errcode == 0) {
+          that.tk_num = res.data;
+          if (!this.is_df_success) {
+            that.listP.qno = res.data[0].qno;
+          }
+          that.num_id = res.data[0].qno;
+          that.getquestions(this.listP);
+        }
+      });
     },
     //确认提交
-    sure_submit(id,score) {
-      if(!this.lock){
+    sure_submit(id, score) {
+      if (!this.lock) {
         this.$message.warning("正在打分中~");
-          return;
+        return;
       }
       this.lock = false;
-     var pattern=/^([1-9]\d*|0)$/;
+      var that = this;
+      setTimeout(() => {
+        that.lock = true;
+      }, 2000);
+      var pattern = /^([1-9]\d*|0)$/;
       if (!score) {
         this.$message.warning("还没打分哦~");
         return;
-      }else if(!pattern.test(this.score)){
-         this.$message.warning('分数输入不正确');
-        return
-      }else if(Number(this.score) > this.tk_list[this.selectId].score){
-          this.$message.warning('批阅得分大于试题满分,本题满分为:'+this.tk_list[this.selectId].score+'分');
-             return
+      } else if (!pattern.test(this.score)) {
+        this.$message.warning("分数输入不正确");
+        return;
+      } else if (Number(this.score) > this.tk_list[this.selectId].score) {
+        this.$message.warning(
+          "批阅得分大于试题满分,本题满分为:" +
+            this.tk_list[this.selectId].score +
+            "分"
+        );
+        return;
       }
-        setTimeout(()=>{
-          that.lock = true;
-        },2000)
-      this.downLoadImage(id,score);
+
+      this.downLoadImage(id, score);
     },
-    downLoadImage(topic_id,score) {
+    downLoadImage(topic_id, score) {
       this.done = true;
-      var text = new fabric.Textbox('2', {
-        left: 500,
-        top: 500,
-        width: 220,
-        fontSize: 18,
+      var text = new fabric.Textbox(score + "分", {
+        left: 690,
+        top: 30,
+        width: 20,
+        fontSize: 32,
         fill: this.drawColor,
         hasControls: true,
       });
       this.fabricObj.add(text);
-      return
       //生成双倍像素比的图片
       let base64URl = this.fabricObj.toDataURL({
         formart: "jpg",
@@ -465,26 +556,31 @@ export default {
       var that = this;
       base64({
         content: base64URl,
-        filename: this.tk_list[this.selectId].student_sno+this.tk_list[this.selectId].id+this.tk_list[this.selectId].student_id+Date.parse(new Date()),
+        filename:
+          this.tk_list[this.selectId].student_sno +
+          this.tk_list[this.selectId].id +
+          this.tk_list[this.selectId].student_id +
+          Date.parse(new Date()),
       }).then((res) => {
         if (res.errcode == 0) {
           that.tk_list[that.selectId].qimg = res.data;
-          that.review_succ(res.data, topic_id,score);
+          that.review_succ(res.data, topic_id, score);
         }
       });
     },
     //提交
-    review_succ(img_url, topic_id,score) {
+    review_succ(img_url, topic_id, score) {
       var that = this;
-      put("/v1/api/tasks/"+this.id+"/questions/" + topic_id, {
+      put("/v1/api/tasks/" + this.id + "/questions/" + topic_id, {
         score: score,
         img: img_url,
       }).then((res) => {
         if (res.errcode == 0) {
           // console.log( that.tk_list,that.selectId)
-           that.tk_list[that.selectId].marked_score = score;
-           that.tk_list[that.selectId].status = true;
-            that.$message.success('批阅成功')
+          that.tk_list[that.selectId].marked_score = score;
+          that.tk_list[that.selectId].status = true;
+          that.is_df_success = true;
+          that.$message.success("批阅成功");
           that.getpaperjd();
         }
       });
@@ -495,7 +591,7 @@ export default {
       this.fabricObj.clear();
       // this.initCanvas(img);
       var that = this;
-      this.getUrlBase64(img, function (base64,tmpimg) {
+      this.getUrlBase64(img, function (base64, tmpimg) {
         that.base64s = base64;
         // console.log('base64编码值',base64);//base64编码值
         var imgElement = that.$refs.imgElement;
@@ -517,13 +613,25 @@ export default {
     //获取试题批阅列表
     getquestions(p) {
       var that = this;
-      get("/v1/api/tasks/"+this.id+"/questions", p).then((res) => {
+      get("/v1/api/tasks/" + this.id + "/questions", p).then((res) => {
         console.log(res);
         if (res.errcode == 0) {
+          res.data.forEach(item=>{
+            this.process.forEach(ite=>{
+              if(item.student_id == ite.student_id){
+                item.question_amount = ite.question_amount
+                item.marked_amount = ite.marked_amount
+              }
+            })
+          
+          })
           that.tk_list = res.data;
           that.student_total = res.total;
-          if(that.listP.page ==1){
-            that.choice_student(that.selectId, that.tk_list[that.selectId].qimg)
+          if (that.listP.page == 1) {
+            that.choice_student(
+              that.selectId,
+              that.tk_list[that.selectId].qimg
+            );
           }
         }
       });
@@ -544,33 +652,85 @@ export default {
     //     }
     //   });
     // },
-    sign(id,selectid) {
+    sign(id, selectid) {
       this.full = id == 1 ? false : true;
-      this.selectId = selectid
+      this.selectId = selectid;
     },
     //下一题
     next_tk() {
-      if (this.num_id == this.tk_num.length - 1) {
-        this.$message({
-          message: "已经是最后一题了哦",
-          type: "warning",
-        });
+      if (this.nav_id == 1) {
+        if (this.num_index == this.tk_num.length - 1) {
+          this.sure_submit(this.tk_list[this.selectId].id, this.score);
+          setTimeout(() => {
+            this.$message(
+              {
+                message: "已经是最后一题了哦,可选择下一个学生进行批阅",
+                type: "warning",
+              },
+              1000
+            );
+          });
+        } else {
+          this.is_df_success = false;
+          this.sure_submit(this.tk_list[this.selectId].id, this.score);
+          setTimeout(() => {
+            if (this.is_df_success) {
+               this.num_index = this.num_index + 1;
+              this.pnoChange(this.num_index, this.tk_num[this.num_index].qno);
+              this.choice_student(
+                this.selectId,
+                this.tk_list[this.selectId].qimg
+              );
+            }
+          }, 2000);
+        }
       } else {
-        this.num_id = this.num_id + 1;
-         this.pnoChange(this.num_id)
+        if (this.selectId == this.tk_list.length - 1) {
+          this.sure_submit(this.tk_list[this.selectId].id, this.score);
+          setTimeout(() => {
+            this.$message({
+              message: "已经是最后一位了哦,请选择下一题",
+              type: "warning",
+            });
+          }, 1000);
+        } else {
+          this.is_df_success = false;
+          this.sure_submit(this.tk_list[this.selectId].id, this.score);
+          setTimeout(() => {
+            if (this.is_df_success) {
+              this.selectId = this.selectId + 1;
+              this.choice_student(
+                this.selectId,
+                this.tk_list[this.selectId].qimg
+              );
+            }
+          }, 2000);
+        }
       }
     },
-  
+
     //上一题
     per_tk() {
-      if (this.num_id + 1 == 1) {
-        this.$message({
-          message: "已经是第一题了哦",
-          type: "warning",
-        });
+      if (this.nav_id == 1) {
+        if (this.num_index + 1 == 1) {
+          this.$message({
+            message: "已经是第一题了哦",
+            type: "warning",
+          });
+        } else {
+          this.num_index = this.num_index - 1;
+          this.pnoChange(this.num_index, this.tk_num[this.num_index].qno);
+        }
       } else {
-        this.num_id = this.num_id - 1;
-         this.pnoChange(this.num_id)
+        if (this.selectId + 1 == 1) {
+          this.$message({
+            message: "已经是第一位了哦",
+            type: "warning",
+          });
+        } else {
+          this.selectId = this.selectId - 1;
+          this.choice_student(this.selectId, this.tk_list[this.selectId].qimg);
+        }
       }
     },
     jump(url) {
@@ -584,14 +744,14 @@ export default {
       var img = new Image();
       img.crossOrigin = "Anonymous";
       img.src = url;
-     
+
       img.onload = function () {
         //  console.log(img.width,img.height)
         canvas.height = 370; //指定画板的高度,自定义
         canvas.width = 750; //指定画板的宽度,自定义
         ctx.drawImage(img, 0, 0, 750, 370); //参数可自定义
         var dataURL = canvas.toDataURL("image/");
-        callback.call(this, dataURL,img); //回掉函数获取Base64编码
+        callback.call(this, dataURL, img); //回掉函数获取Base64编码
         canvas = null;
       };
     },
@@ -920,25 +1080,29 @@ export default {
 };
 </script>
 <style scoped>
-.bg_box{
+.task_num{
+    margin-left: 20px;
+    font-size: 14px;
+}
+.bg_box {
   width: 100%;
   height: 100%;
   position: fixed;
   top: 0;
   left: 0;
-  background:rgba(0, 0, 0, 0.6);
+  background: rgba(0, 0, 0, 0.6);
   z-index: 99;
-} 
-.answers>span{
+}
+.answers > span {
   position: absolute;
   color: #fff;
   font-size: 40px;
-  top:-50px;
+  top: -50px;
   right: -50px;
   cursor: pointer;
 }
-.bg_box>div{
-  width:650px;
+.bg_box > div {
+  width: 650px;
   padding: 20px;
   box-sizing: border-box;
   border-radius: 4px;
@@ -946,15 +1110,14 @@ export default {
   position: absolute;
   top: 50%;
   left: 50%;
-  transform: translate(-50%,-50%);
+  transform: translate(-50%, -50%);
 }
-.answers>div{
+.answers > div {
   margin: 20px 0;
   font-size: 14px;
- 
 }
-.answers .option{
- color: #57c77c;
+.answers .option {
+  color: #57c77c;
 }
 .oper_i {
   position: relative;
@@ -1091,8 +1254,8 @@ export default {
   line-height: 36px;
   margin: auto 0;
 }
-.tk_df .tk_fs input{
-  width:100%;
+.tk_df .tk_fs input {
+  width: 100%;
   height: 100%;
 }
 .tk_df .ts_num {
@@ -1115,6 +1278,10 @@ export default {
 .tk_cont .el-progress.el-progress--line {
   width: 370px;
 }
+.tk_cont .task_num .el-progress.el-progress--line{
+  width: 150px;
+  margin: 0 10px;
+}
 .tk_num li {
   padding: 11px 5px;
   box-sizing: border-box;
@@ -1148,18 +1315,19 @@ export default {
   box-sizing: border-box;
 }
 .py_jd .tk_tit {
-  font-size: 13px;
+  font-size: 14px;
   font-family: Microsoft YaHei;
   font-weight: bold;
   color: #333333;
+  line-height: 22px;
   margin-bottom: 5px;
 }
 .tk_cont .tk_num {
   height: 195px;
   overflow-y: scroll;
 }
-.tk_cont .st_tk_num{
-   height: 175px;
+.tk_cont .st_tk_num {
+  height: 175px;
   display: -webkit-box;
   overflow-x: scroll;
   overflow-y: hidden;
@@ -1351,10 +1519,10 @@ export default {
 }
 </style>
 <style>
-.tk_num .el-progress-bar {
+.tk_num .el-progress-bar ,.task_num .el-progress-bar{
   padding-right: 0;
 }
-.tk_num .el-progress__text {
+.tk_num .el-progress__text ,.task_num .el-progress__text{
   display: none;
 }
 
@@ -1416,42 +1584,50 @@ export default {
   padding: 9px;
   box-sizing: border-box;
   width: 130px;
-    height: 152px;
-    /* background: #FFE8EC; */
-    border-radius: 4px;
-    margin: 0 5px;
-    cursor: pointer;
-    text-align: center;
-}
-.st_tk_num li>div.img_box{
-    width: 112px;
-height: 90px;
-background: #F7F7F7;
-}
-.st_tk_num li>div.img_box img{
-    width: 112px;
-height: 18px;
-margin-top: 35px;
+  height: 152px;
+  /* background: #FFE8EC; */
+  border-radius: 4px;
+  margin: 0 5px;
+  cursor: pointer;
+  text-align: center;
+}
+.st_tk_num li{
+  position: relative;
+}
+.st_tk_num li > div.img_box {
+  width: 112px;
+  height: 90px;
+  background: #f7f7f7;
+}
+.st_tk_num li > div.img_box img {
+  width: 112px;
+  height: 18px;
+  margin-top: 35px;
 }
 .st_tk_num li.active {
   background: #ffe8ec;
   border-radius: 4px;
 }
-.st_tk_num li.active>div.img_box{
-    background: #fff;
-    border-radius: 4px;
+.st_tk_num li.active > div.img_box {
+  background: #fff;
+  border-radius: 4px;
 }
-.st_tk_num li.active span{
-    color: #FA0A2F;
+.st_tk_num li.active span {
+  color: #fa0a2f;
 }
 .st_tk_num span {
-    display: inline-block;
+  display: inline-block;
   width: 100%;
   font-size: 13px;
-font-family: Microsoft YaHei;
-font-weight: 400;
-color: #333333;
+  font-family: Microsoft YaHei;
+  font-weight: 400;
+  color: #333333;
   text-align: center;
   line-height: 50px;
 }
+.st_tk_num span:nth-child(2){
+   position: absolute;
+  right: -40px;
+  bottom: 4px;
+}
 </style>

+ 0 - 15
src/components/customer/topic.vue

@@ -414,13 +414,6 @@ export default {
         });
       }
     },
-    // //班级筛选
-    // classC(i) {
-    //   console.log(i);
-    //   this.params.page = 1;
-    //   this.params.cid = i;
-    //   this.getList();
-    // },
     //搜索
     search() {
       this.params.page = 1;
@@ -433,12 +426,6 @@ export default {
     },
     //获取列表
     getList() {
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       var that = this;
       this.params.tid = this.tid ? this.tid : 0;
       this.params.cid = this.cid ? this.cid : 0;
@@ -452,9 +439,7 @@ export default {
           that.total = 0;
           that.$message.warning(res.mess)
         }
-         load.close();
       }).catch(res=>{
-         load.close();
         console.log(res)
       })
     },

+ 1 - 9
src/components/customer/work_analysis.vue

@@ -182,7 +182,7 @@ export default {
       if (this.params.year) {
         obj.year = this.params.year;
       }
-      obj.cid = this.params.cid?this.params.cid:0;
+      obj.cid = this.params.cid?obj.cid=this.params.cid:0;
       analysis(obj).then((res) => {
         if (res.errcode == 0) {
           if (that.navKey == 2) {
@@ -212,18 +212,10 @@ export default {
       if (!obj1.cid) {
         delete obj1.cid;
       }
-      const load = this.$loading({
-        lock: true,
-        text: "Loading",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       tasks(obj1).then((res) => {
         if (res.errcode == 0) {
           this.tableData = res.data;
           this.total = res.total;
-          //关闭loading
-          load.close();
         }
       });
     },

+ 3 - 1
src/components/log.vue

@@ -236,7 +236,7 @@ export default {
         this.$message.warning("请输入新密码");
         return;
       }
-      if(this.pwd.newpwd<6 || this.pwd.newpwd>12){
+      if(this.pwd.newpwd.length<6 || this.pwd.newpwd.length>12){
         this.$message.warning("新密码长度请设置在6-12位之间");
         return;
       }
@@ -252,6 +252,8 @@ export default {
         if(res.data.errcode == 0){
           this.$message.success("密码修改成功,请重新登录");
           this.is_login = true
+        }else{
+          this.$message.error(res.data.mess);
         }
       })
     },

+ 10 - 0
src/router/index.js

@@ -15,6 +15,7 @@ import MyClass from '@/components/customer/myClass'
 import Student_err from '@/components/customer/student_err'
 import Student_per_err from '@/components/customer/student_per_err'
 import Push_err from '@/components/customer/push_err'
+import Student_per_jh from '@/components/customer/student_per_jh'
 import See_pusherr from '@/components/customer/see_pusherr'
 import Per_err from '@/components/customer/per_err'
 import Err_book from '@/components/customer/err_book'
@@ -180,6 +181,15 @@ export default new Router({
             }
         },
         {
+            path: '/student_per_jh',
+            name: 'Student_per_jh',
+            component: Student_per_jh,
+            meta: {
+                title: '个人错题集',
+                requiresAuth: true
+            }
+        },
+        {
             path: '/err_book',
             name: 'Err_book',
             component: Err_book,