qq 2 年之前
父节点
当前提交
c4953b3da7

+ 59 - 2
src/App.vue

@@ -76,6 +76,13 @@ ul,li{
 }
 .screen .el-input__icon{
     line-height: 32px;
+    height: 32px;
+}
+.screen .small{
+  width: 120px;
+}
+.screen .mini{
+  width: 90px;
 }
 /* .el-input__suffix{
   display: none;
@@ -112,10 +119,21 @@ border-radius: 4px;
 }
 .screen {
   margin: 20px 0;
+    margin-top: 0;
+  background: #fff;
+  padding: 15px 5px;
+  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
+  margin-bottom: 10px;
+  position: relative;
 }
 .screen span {
   line-height: 32px;
   font-size: 14px;
+
+}
+
+.screen>span{
+  margin-left: 10px;
 }
 .screen .bar {
   padding: 0 5px;
@@ -130,8 +148,11 @@ border-radius: 4px;
   color: #CCCCCC;
   margin-bottom: 100px;
 }
+.pagePagin .el-pagination {
+  margin-left: auto;
+}
 .el-table{
-  font-size: 13px;
+  font-size: 14px;
   color: #333;
 }
 .el-table td, .el-table th{
@@ -174,7 +195,7 @@ border-radius: 4px;
   font-size: 14px;
 }
 .el-table--striped .el-table__body tr.el-table__row--striped td{
-  background: #FBFBFB;
+  background: #F5F9FB;
 }
 .el-button--text{
   color: #2DAFF9;
@@ -230,4 +251,40 @@ input::-webkit-input-placeholder {
    width: 0px;
     height: 0px;
  }
+ .el-table thead{
+   color: #999;
+  
+ }
+ .el-table th.is-leaf{
+ border-bottom: 1px solid #e4e4e4;
+ }
+ .el-table__empty-block{
+   display: none;
+ }
+ .none {
+  color: #999;
+  text-align: center;
+  margin: 0 0 60px 0;
+}
+.none div:nth-child(1) {
+  width: 416px;
+  height: 276px;
+  margin: 0 auto 40px auto;
+}
+.recordTitle {
+  font-size: 13px;
+  color: #cccccc;
+  margin: 0 0 15px 0;
+}
+.recordTitle span:last-child {
+  color: #666;
+}
+.bold{
+  font-weight: bold;
+}
+.red{
+  color: #fa0a2f;
+  font-weight: bold;
+  font-size: 14px;
+}
 </style>

+ 64 - 0
src/components/assembly/err_nav.vue

@@ -0,0 +1,64 @@
+<template>
+  <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>{{item.name}}</span>
+        </li>
+      </div>
+</template>
+<script>
+export default {
+  name: "leftmenu",
+  data() {
+    return {
+        list:[{name:'班级错题',src:'/topic',icon:'iconcuotiku'},
+        {name:'学生错题',src:'/student_err',icon:'iconcuotiben'},
+        {name:'错题推送',src:'/push_err',icon:'iconcuoti1'}],
+        l_id:0,
+    };
+  },
+  created() {
+    if(localStorage.getItem('sonNav')){
+        this.l_id = localStorage.getItem('sonNav');
+              console.log( this.l_id )
+    }
+  },
+  methods: {
+    jump(url,i){
+      console.log(i)
+              this.l_id = i;
+        localStorage.setItem('sonNav',i)
+
+        this.$router.push(url);
+    },
+  },
+};
+</script>
+<style scoped>
+.leftMenu {
+  width: 230px;
+  padding: 10px 0;
+  background-color: #fff;
+  height: 130px;
+}
+.leftMenu i {
+  display: inline-block;
+  margin-left: 24px;
+  margin-right: 16px;
+}
+.leftMenu li {
+  height: 44px;
+  line-height: 44px;
+  width: 100%;
+  color: #666;
+  font-size: 14px;
+  cursor: pointer;
+  border-left: 2px solid #fff;
+  box-sizing: border-box;
+}
+.leftMenu li.active {
+  background: #ffe8ec;
+  border-left: 2px solid #fa0a2f;
+  color: #fa0a2f;
+}
+</style>

+ 65 - 0
src/components/assembly/exam_works_nav.vue

@@ -0,0 +1,65 @@
+<template>
+  <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>
+        </li>
+      </div>
+</template>
+<script>
+export default {
+  name: "leftmenu",
+  data() {
+    return {
+        list:[{name:'我的班级',src:'/myClass',icon:'iconbanji'},
+        {name:'阅卷任务',src:'/task',icon:'iconyuejuan'},
+        {name:'错题推送',src:'/work_analysis',icon:'iconzuoye1'}],
+        l_id:0,
+        navKey:2,
+    };
+  },
+  created() {
+      this.navKey = localStorage.getItem("navKey");
+    if(localStorage.getItem('sonNav')){
+        this.l_id = localStorage.getItem('sonNav');
+              console.log( this.l_id )
+    }
+  },
+  methods: {
+    jump(url,i){
+      console.log(i)
+              this.l_id = i;
+        localStorage.setItem('sonNav',i)
+        this.$router.push(url);
+    },
+  },
+};
+</script>
+<style scoped>
+.leftMenu {
+  width: 230px;
+  padding: 10px 0;
+  background-color: #fff;
+  height: 130px;
+}
+.leftMenu i {
+  display: inline-block;
+  margin-left: 24px;
+  margin-right: 16px;
+}
+.leftMenu li {
+  height: 44px;
+  line-height: 44px;
+  width: 100%;
+  color: #666;
+  font-size: 14px;
+  cursor: pointer;
+  border-left: 2px solid #fff;
+  box-sizing: border-box;
+}
+.leftMenu li.active {
+  background: #ffe8ec;
+  border-left: 2px solid #fa0a2f;
+  color: #fa0a2f;
+}
+</style>

+ 0 - 1
src/components/assembly/head.vue

@@ -61,7 +61,6 @@ export default {
   created() {
     if(localStorage.getItem("is_user") != 1){
         this.info = JSON.parse(localStorage.getItem('user_info')) 
-        console.log(this.info)
     }else{
       // this.$router.go(0)
       this.axios({

+ 2 - 0
src/components/assembly/topnav.vue

@@ -46,6 +46,7 @@ export default {
     handleSelect(key, keyPath) {
       this.coll = 0;
       localStorage.setItem('navKey',key)
+        localStorage.setItem('sonNav',0)
         if(key == 1){
         this.$router.push("/");
       }else if(key == 2){
@@ -53,6 +54,7 @@ export default {
       }else if(key == 3){
        this.$router.push("/myClass");
       }else if(key == 4){
+      
        this.$router.push("/topic");
       }
       this.$emit('navKey',key)

+ 46 - 22
src/components/customer/answer_analysis.vue

@@ -124,7 +124,7 @@
                 </div>
                 <div class="d-f">
                   <span>解析:</span>
-                  <span>{{ item.analysis }}</span>
+                  <span v-html="item.analysis"></span>
                 </div>
               </div>
 
@@ -170,35 +170,56 @@
         </div>
           </div>
           <div class="xs_fx" v-show="selectNav == 1">
-            
-            <div class="d-f j-s table_head">
-              <li>姓名</li>
-              <li>字号</li>
-              <li>得分</li>
-              <li>客观题</li>
-              <li>主观题</li>
-              <li>名次</li>
-              <li>失分题</li>
-              <li>操作</li>
-            </div>
-            <div class="cap_table">
+             <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column prop="student_name" label="姓名">
+          </el-table-column>
+          <el-table-column prop="student_sno" label="学号">
+          </el-table-column>
+          <el-table-column prop="score" label="得分">
+              <template slot-scope="scope">
+                <div class="bold">{{scope.row.score}}</div>
+              </template>
+             </el-table-column>
+          <el-table-column prop="objective_score" label="客观题"> 
+              <template slot-scope="scope">
+                <div class="bold">{{scope.row.objective_score}}</div>
+              </template>
+          </el-table-column>
+          <el-table-column prop="subjective_score" label="主观题"> 
+             <template slot-scope="scope">
+                <div class="bold">{{scope.row.subjective_score}}</div>
+              </template>
+          </el-table-column>
+          <el-table-column prop="rank" label="名次">
+             <template slot-scope="scope">
+                <div class="bold">{{scope.row.rank}}</div>
+              </template> </el-table-column>
+          <el-table-column prop="age" label="失分题" width="240">
+            <template slot-scope="scope">
+                 <div v-if="scope.row.wrong_questions" class="wrong_question">
+                    <span v-for="(ite,j) in scope.row.wrong_questions" :key="j+'kk'">{{ite}}</span>
+                  </div>
+              </template>
+             </el-table-column>
+          <el-table-column prop="phone" label="操作">
+               <template slot-scope="scope">
+        <el-button  @click="jump('/tk_xs_fx?title='+title+'&names='+scope.row.student_name+'&id='+scope.row.id+'&score='+scope.row.score+'&subjective='+scope.row.subjective_score+'&parent_id='+id)" type="text" size="small">查看</el-button>
+      </template>
+             </el-table-column>
+        </el-table>
+            <!-- <div class="cap_table">
               <li v-for="(item, i) in tableData" :key="i" class="d-f j-s">
-                <div>{{ item.student_name }}</div>
-                <div>{{ item.student_sno }}</div>
-                <div>{{ item.score }}</div>
                 <div>{{ item.objective_score }}</div>
                 <div>{{ item.subjective_score }}</div>
                 <div class="d-f">{{ item.rank }}</div>
                 <div>
-                  <div v-if="item.wrong_questions" class="wrong_question">
-                    <span v-for="(ite,j) in item.wrong_questions" :key="j+'kk'">{{ite}}</span>
-                  </div>
+                 
                 </div>
                 <div class="operation">
-                  <span @click="jump('/tk_xs_fx?title='+title+'&names='+item.student_name+'&id='+item.id+'&score='+item.score+'&subjective='+item.subjective_score+'&parent_id='+id)">查看</span>
+                  <span>查看</span>
                 </div>
               </li>
-            </div>
+            </div> -->
             <div class="cap_table" v-if="tableData.length == 0">
                <div class="none">
               <div>
@@ -348,7 +369,7 @@ export default {
           if (res.errcode == 0) {
             res.data.forEach((item,i) => {
               item.wrong_questions.forEach((ite,j)=>{
-                console.log(ite.split(','))
+                // console.log(ite.split(','))
                   res.data[i].wrong_questions[j] = '第'+ite.split(',')[1]
                   ite.split(',')[2]!=0?res.data[i].wrong_questions[j]+='-'+ite.split(',')[2]+'题':'题'
               })
@@ -590,6 +611,9 @@ export default {
 </script>
 
 <style scoped>
+.wrong_question{
+  color: #0a9dff;
+}
 .wrong_question span::after{
   content: ',';
   display: inline-block;

+ 18 - 155
src/components/customer/myClass.vue

@@ -3,22 +3,7 @@
     <topHead></topHead>
     <topNav @navKey="navKeys"></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li class="active">
-          <i class="iconfont iconbanji"></i>
-          <span>我的班级</span>
-        </li>
-        <li @click="jump('/task')">
-          <i class="iconfont iconyuejuan"></i> <span>阅卷任务</span>
-        </li>
-        <li @click="jump('/work_analysis')">
-          <i class="iconfont iconzuoye1"></i
-          ><span>{{ navKey == 2 ? "作业分析" : "成绩分析" }}</span>
-        </li>
-        <!-- <li @click="jump()">
-          <i class="iconfont iconcuoti1"></i><span>错题分析</span>
-        </li> -->
-      </div>
+      <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>{{ navKey == 2 ? "作业中心" : "考试中心" }}> </span>
@@ -50,32 +35,26 @@
           <el-button @click="search">搜索</el-button>
           <el-button @click="exports" class="reset">导出</el-button>
         </div>
-        <div class="d-f j-s table_head">
-          <li>学号</li>
-          <li>姓名</li>
-          <li>性别</li>
-          <li>年龄</li>
-          <li>手机号</li>
-        </div>
+          <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column prop="sno" label="学号">
+          </el-table-column>
+          <el-table-column prop="name" label="姓名">
+          </el-table-column>
+          <el-table-column prop="total_errors" label="性别">
+              <template slot-scope="scope">
+                {{scope.row.sex > 0 ? "男" : "女"}}
+              </template>
+             </el-table-column>
+          <el-table-column prop="age" label="年龄"> </el-table-column>
+          <el-table-column prop="phone" label="手机号">
+             </el-table-column>
+        </el-table>
         <div class="none" v-if="tableData.length == 0">
           <div>
             <img src="../../assets/none.png" alt="" />
           </div>
           <div>暂无数据</div>
         </div>
-        <div
-          v-else
-          class="cap_table"
-          :style="{ minHeight: $c.cle - 400 + 'px' }"
-        >
-          <li v-for="(item, i) in tableData" :key="i" class="d-f j-s">
-            <div>{{ item.sno }}</div>
-            <div>{{ item.name }}</div>
-            <div>{{ item.sex > 0 ? "男" : "女" }}</div>
-            <div>{{ item.age }}</div>
-            <div>{{ item.phone }}</div>
-          </li>
-        </div>
         <div class="d-f j-s pagePagin" v-if="total > 0">
           <el-pagination
             background
@@ -96,6 +75,7 @@
 import topNav from "@/components/assembly/topnav";
 import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
+import sonNav from "@/components/assembly/exam_works_nav";
 import { searchClass, classes } from "@/util/api";
 export default {
   data() {
@@ -112,16 +92,6 @@ export default {
     };
   },
   created() {
-    //   var time = parseInt(new Date().getTime()/1000) 
-    //     if(this.$c.timeLogin() ==2){
-    //     localStorage.setItem('open_tiem',time)
-    //     this.$router.go(0);
-    //   return
-    // }else if(this.$c.timeLogin() ==1){
-    //   this.$router.push('/login');
-    //     localStorage.setItem('open_tiem',time)
-    //     return
-    // }
     var that = this;
     this.navKey = localStorage.getItem("navKey");
     //班级
@@ -222,120 +192,13 @@ export default {
       }
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot ,sonNav},
 };
 </script>
 <style scoped>
-.cap_table {
-  background-color: #fff;
-}
-.cap_table .el-progress.el-progress--line {
-  width: 88px;
-}
-.cap_table .operation span {
-  color: #0a9dff;
-  margin-right: 20px;
-  cursor: pointer;
-}
 .container {
   background: #f4f4f4;
-  /* margin-bottom: 40px; */
   margin-top: 30px;
 }
-.table_head {
-  border-bottom: 1px solid #f4f4f4;
-}
-.table_head,
-.cap_table li {
-  background-color: #fff;
-  line-height: 44px;
-  padding: 0 15px;
-  box-sizing: border-box;
-  color: #999;
-  font-size: 13px;
-}
-.cap_table .contrasts {
-  margin-left: 10px;
-}
-.cap_table li:nth-child(even) {
-  background-color: #f5f9fb;
-}
-.cap_table li div {
-  line-height: 44px;
-  font-size: 14px;
-  color: #333;
-}
-.table_head li,
-.cap_table li > div {
-  width: 20%;
-}
 
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 135px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
-</style>
-<style>
-.cap_table .el-progress-bar {
-  padding-right: 0;
-}
-.cap_table .el-progress__text {
-  display: none;
-}
-.none {
-  color: #999;
-  text-align: center;
-  margin: 0 0 60px 0;
-}
-.none div:nth-child(1) {
-  width: 416px;
-  height: 276px;
-  margin: 0 auto 40px auto;
-}
-</style>
+</style>

+ 4 - 86
src/components/customer/per_err.vue

@@ -3,19 +3,7 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li @click="jump('/topic')">
-          <i class="iconfont iconcuotiku"></i>
-          <span>班级错题</span>
-          <span></span>
-        </li>
-        <li class="active" @click="jump('/student_err')">
-          <i class="iconfont iconcuotiben"></i> <span>学生错题</span>
-        </li>
-        <li @click="jump('/push_err')">
-          <i class="iconfont iconcuoti1"></i> <span>错题推送</span>
-        </li>
-      </div>
+   <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>错题中心> </span>
@@ -117,6 +105,7 @@
 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 { tasks, stuErrPer } from "@/util/api";
 export default {
   data() {
@@ -199,7 +188,7 @@ export default {
       this.$router.push(url);
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot,sonNav },
 };
 </script>
 <style scoped>
@@ -311,76 +300,5 @@ export default {
   color: #333;
   min-height: 70px;
 }
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-  position: relative;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 130px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
-</style>
-<style>
-.screen1 .el-select {
-  width: 120px;
-}
-.cap_table .el-progress-bar {
-  padding-right: 0;
-}
-.cap_table .el-progress__text {
-  display: none;
-}
-.none {
-  color: #999;
-  text-align: center;
-  margin: 0 0 60px 0;
-}
-.none div:nth-child(1) {
-  width: 416px;
-  height: 276px;
-  margin: 0 auto 40px auto;
-}
 </style>
+

+ 8 - 77
src/components/customer/push_err.vue

@@ -3,18 +3,7 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li @click="jump('/topic')">
-          <i class="iconfont iconcuotiku"></i>
-          <span>班级错题</span>
-        </li>
-        <li @click="jump('student_err')">
-         <i class="iconfont iconcuotiben"></i> <span>学生错题</span>
-        </li>
-        <li class="active">
-         <i class="iconfont iconcuoti1"></i> <span>错题推送</span>
-        </li>
-      </div>
+           <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>错题中心 > </span>
@@ -23,6 +12,7 @@
         <div class="d-f screen screen1">
            <span>学校:</span>
           <el-select
+          class="small"
             v-model="params.sid"
             disabled
             placeholder="请选择"
@@ -37,6 +27,7 @@
           </el-select>
               <span>年级:</span>
           <el-select
+              class="small"
             v-model="params.gid"
             clearable
             placeholder="请选择"
@@ -51,6 +42,7 @@
           </el-select>
           <span>班级:</span>
           <el-select
+              class="small"
             v-model="params.cid"
             clearable
             placeholder="请选择"
@@ -65,6 +57,7 @@
           <span>来源:</span>
           <el-select
             clearable
+                class="mini"
             placeholder="请选择"
             v-model="source"
             @change="sourceList"
@@ -74,6 +67,7 @@
             <el-option value="work" label="作业"></el-option>
           </el-select>
           <el-select
+              class="small"
             v-model="params.tid"
             clearable
             placeholder="请选择"
@@ -328,6 +322,7 @@
 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 { searchClass, classes, tasks,clsErrPost,clsPushE,school_s,grades_s,cleDel,classes_s} from "@/util/api";
 import {put} from '@/util/common.js';
 export default {
@@ -561,7 +556,7 @@ export default {
       this.$router.push(url);
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot ,sonNav},
 };
 </script>
 <style scoped>
@@ -680,81 +675,17 @@ export default {
   width: 25%;
 }
 
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-  position: relative;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 130px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
 </style>
 <style>
 .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label{
   font-size: 14px;
 }
-.screen1 .el-select {
-  width: 120px;
-}
 .cap_table .el-progress-bar {
   padding-right: 0;
 }
 .cap_table .el-progress__text {
   display: none;
 }
-.none {
-  color: #999;
-  text-align: center;
-  margin: 0 0 60px 0;
-}
-.none div:nth-child(1) {
-  width: 416px;
-  height: 276px;
-  margin: 0 auto 40px auto;
-}
 .transfer_box .el-transfer {
   display: flex;
   justify-content: space-between;

+ 73 - 193
src/components/customer/student_err.vue

@@ -3,26 +3,21 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-         <li  @click="jump('/topic')">
-          <i class="iconfont iconcuotiku"></i>
-          <span>班级错题</span>
-        </li>
-        <li class="active">
-          <i class="iconfont iconcuotiben"></i> <span>学生错题</span>
-        </li>
-        <li @click="jump('/push_err')">
-           <i class="iconfont iconcuoti1"></i> <span>错题推送</span>
-        </li>
-      </div>
+      <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>错题中心> </span>
           <span>学生错题</span>
         </div>
-        <div class="d-f screen screen1">
+        <div class="d-f screen">
           <span>班级:</span>
-          <el-select @change="classC" v-model="params.cid" clearable placeholder="请选择">
+          <el-select
+            class="small"
+            @change="classC"
+            v-model="params.cid"
+            clearable
+            placeholder="请选择"
+          >
             <el-option
               :label="item.name"
               :value="item.id"
@@ -39,36 +34,55 @@
           </div>
           <el-button @click="search">搜索</el-button>
         </div>
-        <div class="d-f j-s table_head">
-         
-          <li>姓名</li>
-           <li>学号</li>
-          <li>错题数</li>
-          <li>作业错题</li>
-          <li>考试错题</li>
-          <li>综合出错率</li>
-          <li>操作</li>
-        </div>
-          <div class="none" v-if="tableData.length == 0">
-            <div>
-              <img src="../../assets/none.png" alt="" />
-            </div>
-            <div>暂无数据</div>
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column prop="student_name" label="姓名">
+          </el-table-column>
+          <el-table-column prop="student_sno" label="学号"> </el-table-column>
+          <el-table-column prop="total_errors" label="错题数">
+            <template slot-scope="scope">
+                <div class="bold">
+                   {{scope.row.total_errors}}
+                </div>
+              </template> </el-table-column>
+          <el-table-column prop="work_error_count" label="作业错题">
+            <template slot-scope="scope">
+                <div class="bold">
+                    {{scope.row.work_error_count}}
+                </div>
+              </template> </el-table-column>
+          <el-table-column prop="exam_error_count" label="考试错题">
+            <template slot-scope="scope">
+                  <div class="bold">
+                    {{scope.row.exam_error_count}}
+                </div>
+              </template> </el-table-column>
+          <el-table-column prop="error_ratio" label="综合出错率">
+              <template slot-scope="scope">
+                <div class="red">
+                   {{Number(scope.row.error_ratio).toFixed(2)}}%
+                </div>
+              </template>
+             </el-table-column>
+          <el-table-column label="操作"> 
+             <template slot-scope="scope">
+        <el-button @click="
+                jump(
+                  '/student_per_err?sid=' +
+                    scope.row.student_id +
+                    '&cid=' +
+                    params.cid +
+                    '&name=' +
+                    scope.row.student_name
+                )
+              " type="text" size="small">查看</el-button>
+      </template>
+          </el-table-column>
+        </el-table>
+        <div class="none" v-if="tableData.length == 0">
+          <div>
+            <img src="../../assets/none.png" alt="" />
           </div>
-        <div
-        v-else
-          class="cap_table"
-          :style="{ minHeight: $c.cle - 400 + 'px' }"
-        >
-          <li v-for="(item, i) in tableData" :key="i" class="d-f j-s">
-            <div>{{item.student_name}}</div>
-            <div>{{item.student_sno}}</div>
-            <div>{{item.total_errors}}</div>
-            <div>{{item.work_error_count}}</div>
-            <div>{{item.exam_error_count}}</div>
-            <div>{{item.error_ratio}}%</div>
-            <div @click="jump('/per_err?sid='+item.student_id+'&cid='+params.cid+'&name='+item.student_name)">查看</div>
-          </li>
+          <div>暂无数据</div>
         </div>
         <div class="d-f j-s pagePagin" v-if="total > 0">
           <el-pagination
@@ -90,14 +104,15 @@
 import topNav from "@/components/assembly/topnav";
 import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
-import { stuErr,  classes } from "@/util/api";
+import sonNav from "@/components/assembly/err_nav";
+import { stuErr, classes } from "@/util/api";
 export default {
   data() {
     return {
       params: {
         page: 1,
         size: 10,
-        cid:'',
+        cid: "",
       },
       tableData: [],
       classL: [],
@@ -105,36 +120,25 @@ 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 that = this;
     //班级
     classes().then((res) => {
       if (res.errcode == 0) {
         that.classL = res.data;
-        that.params.cid = res.total>0?res.data[0].id:'';
+        that.params.cid = res.total > 0 ? res.data[0].id : "";
         that.getList();
       }
     });
-
   },
   methods: {
-      classC(i){
-          console.log(i)
-          this.params.page = 1
-          this.params.cid = i
-        this.getList();
-      },
+    classC(i) {
+      console.log(i);
+      this.params.page = 1;
+      this.params.cid = i;
+      this.getList();
+    },
     //搜索
-    search(){
+    search() {
       this.params.page = 1;
       this.getList();
     },
@@ -158,148 +162,24 @@ export default {
         if (res.errcode == 0) {
           that.tableData = res.data;
           that.total = res.total;
-        }else{
+        } else {
           that.tableData = [];
           that.total = 0;
-          that.$message.warning(res.mess)
+          that.$message.warning(res.mess);
         }
-           load.close();
+        load.close();
       });
     },
     jump(url) {
-        this.$router.push(url);
+      this.$router.push(url);
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot,sonNav},
 };
 </script>
 <style scoped>
-.cap_table {
-  background-color: #fff;
-}
-.cap_table .el-progress.el-progress--line {
-  width: 88px;
-}
-.cap_table .operation span {
-  color: #0a9dff;
-  margin-right: 20px;
-  cursor: pointer;
-}
 .container {
   background: #f4f4f4;
-  /* margin-bottom: 40px; */
   margin-top: 30px;
 }
-.table_head {
-  border-bottom: 1px solid #f4f4f4;
-}
-.table_head,
-.cap_table li {
-  background-color: #fff;
-  line-height: 44px;
-  padding: 0 15px;
-  box-sizing: border-box;
-  color: #999;
-  font-size: 13px;
-}
-.table_head>li:last-child{
-    text-align: right;
-}
-.cap_table li>div:last-child{
-    text-align: right;
-    color: #0A9DFF;
-        cursor: pointer;
-}
-.cap_table li>div:nth-child(6){
-    color: #FA0A2F;
-    font-weight: bold;
-    font-size: 14px;
-}
-.cap_table .contrasts {
-  margin-left: 10px;
-}
-.cap_table li:nth-child(even) {
-  background-color: #f5f9fb;
-}
-.cap_table li div {
-  line-height: 44px;
-  font-size: 14px;
-  color: #333;
-}
-.table_head li,
-.cap_table li > div{
-  width: 20%;
-}
-
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 130px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
-</style>
-<style>
-.screen1 .el-select {
-  width: 120px;
-}
-.cap_table .el-progress-bar {
-  padding-right: 0;
-}
-.cap_table .el-progress__text {
-  display: none;
-}
-.none {
-  color: #999;
-  text-align: center;
-  margin: 0 0 60px 0;
-}
-.none div:nth-child(1) {
-  width: 416px;
-  height: 276px;
-  margin: 0 auto 40px auto;
-}
 </style>

+ 58 - 137
src/components/customer/student_per_err.vue

@@ -3,22 +3,12 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li @click="jump('/topic')">
-          <i class="iconfont iconcuotiku"></i>
-          <span>班级错题</span>
-        </li>
-        <li class="active">
-          <i class="iconfont iconcuotiben"></i> <span>学生错题</span>
-        </li>
-        <li @click="jump('/push_err')">
-          <i class="iconfont iconcuoti1"></i> <span>错题推送</span>
-        </li>
-      </div>
+      <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>错题中心> </span>
-          <span>学生错题</span>
+          <span>学生错题></span>
+          <span>{{name}}</span>
         </div>
         <div class="d-f screen screen1">
           <span>来源:</span>
@@ -39,44 +29,55 @@
           </div>
           <el-button @click="search">搜索</el-button>
         </div>
-        <div class="d-f j-s table_head">
-          <li>名称</li>
-          <li>总题数</li>
-          <li>错题数</li>
-          <li>错题率</li>
-          <li>操作</li>
-        </div>
-        <div class="none" v-if="tableData.length == 0">
-          <div>
-            <img src="../../assets/none.png" alt="" />
-          </div>
-          <div>暂无数据</div>
-        </div>
-        <div
-          v-else
-          class="cap_table"
-          :style="{ minHeight: $c.cle - 400 + 'px' }"
-        >
-          <li v-for="(item, i) in tableData" :key="i" class="d-f j-s">
-            <div>{{ item.student_name }}</div>
-            <div>{{ item.student_sno }}</div>
-            <div>{{ item.total_errors }}</div>
-            <div>{{ item.error_ratio }}%</div>
-            <div
-              @click="
+              <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column prop="student_name" label="姓名">
+          </el-table-column>
+          <el-table-column prop="student_sno" label="学号"> </el-table-column>
+          <el-table-column prop="total_errors" label="错题数">
+            <template slot-scope="scope">
+                <div class="bold">
+                   {{scope.row.total_errors}}
+                </div>
+              </template> </el-table-column>
+          <el-table-column prop="work_error_count" label="作业错题">
+            <template slot-scope="scope">
+                <div class="bold">
+                    {{scope.row.work_error_count}}
+                </div>
+              </template> </el-table-column>
+          <el-table-column prop="exam_error_count" label="考试错题">
+            <template slot-scope="scope">
+                  <div class="bold">
+                    {{scope.row.exam_error_count}}
+                </div>
+              </template> </el-table-column>
+          <el-table-column prop="error_ratio" label="综合出错率">
+              <template slot-scope="scope">
+                <div class="red">
+                   {{Number(scope.row.error_ratio).toFixed(2)}}%
+                </div>
+              </template>
+             </el-table-column>
+          <el-table-column label="操作"> 
+             <template slot-scope="scope">
+        <el-button @click="
                 jump(
-                  '/per_err?sid=' +
-                    item.student_id +
+                  '/student_per_err?sid=' +
+                    scope.row.student_id +
                     '&cid=' +
                     params.cid +
                     '&name=' +
-                    item.student_name
+                    scope.row.student_name
                 )
-              "
-            >
-              查看
-            </div>
-          </li>
+              " type="text" size="small">查看</el-button>
+      </template>
+          </el-table-column>
+        </el-table>
+        <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
@@ -98,15 +99,17 @@
 import topNav from "@/components/assembly/topnav";
 import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
-import { stuErr, classes } from "@/util/api";
+import sonNav from "@/components/assembly/err_nav";
+import { stu_err_stati} from "@/util/api";
 export default {
   data() {
     return {
       params: {
         page: 1,
         size: 10,
-        cid: "",
+        sid: "",
       },
+      name:'',
       tableData: [],
       classL: [],
       total: 0,
@@ -114,6 +117,9 @@ export default {
   },
   created() {
     var that = this;
+    this.params.sid = this.$route.query.sid;
+    this.name = this.$route.query.name;
+    this.getList();
   },
   methods: {
     //搜索
@@ -136,8 +142,7 @@ export default {
         background: "rgba(0, 0, 0, 0.7)",
       });
       var that = this;
-      var obj = JSON.parse(JSON.stringify(this.params));
-      stuErr(obj).then((res) => {
+      stu_err_stati(this.params.sid).then((res) => {
         if (res.errcode == 0) {
           that.tableData = res.data;
           that.total = res.total;
@@ -153,66 +158,16 @@ export default {
       this.$router.push(url);
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot,sonNav },
 };
 </script>
 <style scoped>
-.cap_table {
-  background-color: #fff;
-}
-.cap_table .el-progress.el-progress--line {
-  width: 88px;
-}
-.cap_table .operation span {
-  color: #0a9dff;
-  margin-right: 20px;
-  cursor: pointer;
-}
+
 .container {
   background: #f4f4f4;
   /* margin-bottom: 40px; */
   margin-top: 30px;
 }
-.table_head {
-  border-bottom: 1px solid #f4f4f4;
-}
-.table_head,
-.cap_table li {
-  background-color: #fff;
-  line-height: 44px;
-  padding: 0 15px;
-  box-sizing: border-box;
-  color: #999;
-  font-size: 13px;
-}
-.table_head > li:last-child {
-  text-align: right;
-}
-.cap_table li > div:last-child {
-  text-align: right;
-  color: #0a9dff;
-  cursor: pointer;
-}
-.cap_table li > div:nth-child(6) {
-  color: #fa0a2f;
-  font-weight: bold;
-  font-size: 14px;
-}
-.cap_table .contrasts {
-  margin-left: 10px;
-}
-.cap_table li:nth-child(even) {
-  background-color: #f5f9fb;
-}
-.cap_table li div {
-  line-height: 44px;
-  font-size: 14px;
-  color: #333;
-}
-.table_head li,
-.cap_table li > div {
-  width: 20%;
-}
 
 .recordTitle {
   font-size: 13px;
@@ -232,35 +187,7 @@ export default {
 .screen span {
   margin-left: 10px;
 }
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 130px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
+
 .pagePagin .el-pagination {
   margin-left: auto;
 }
@@ -269,12 +196,6 @@ export default {
 .screen1 .el-select {
   width: 120px;
 }
-.cap_table .el-progress-bar {
-  padding-right: 0;
-}
-.cap_table .el-progress__text {
-  display: none;
-}
 .none {
   color: #999;
   text-align: center;

+ 122 - 228
src/components/customer/task.vue

@@ -3,29 +3,20 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li @click="jump('/myClass')">
-          <i class="iconfont iconbanji"></i>
-          <span>我的班级</span>
-        </li>
-        <li class="active">
-          <i class="iconfont iconyuejuan"></i> <span>阅卷任务</span>
-        </li>
-        <li @click="jump('/work_analysis')">
-          <i class="iconfont iconzuoye1"></i><span>{{navKey==2?'作业分析':'成绩分析'}}</span>
-        </li>
-        <!-- <li @click="jump()">
-          <i class="iconfont iconcuoti1"></i><span>错题分析</span>
-        </li> -->
-      </div>
+      <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
-          <span>{{navKey==2?'作业中心':'考试中心'}} > </span>
+          <span>{{ navKey == 2 ? "作业中心" : "考试中心" }} > </span>
           <span>阅卷任务</span>
         </div>
         <div class="d-f screen screen1">
           <span>班级:</span>
-          <el-select v-model="params.cid" clearable placeholder="请选择">
+          <el-select
+            v-model="params.cid"
+            class="small"
+            clearable
+            placeholder="请选择"
+          >
             <el-option
               :label="item.name"
               :value="item.id"
@@ -33,12 +24,13 @@
               :key="item.name"
             ></el-option>
           </el-select>
-          <!-- <span>分类:</span>
-          <el-select v-model="params.ctgid" clearable placeholder="请选择">
-            <el-option label="分类" value="分类"></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"
@@ -46,10 +38,6 @@
               :key="item.name"
             ></el-option>
           </el-select>
-          <!-- <span>状态:</span>
-          <el-select v-model="params.status" clearable placeholder="请选择">
-            <el-option label="状态1" value="状态1"> </el-option>
-          </el-select> -->
           <div class="search_box">
             <i class="el-icon-search"></i>
             <el-input
@@ -60,54 +48,85 @@
           <el-button @click="search">搜索</el-button>
           <el-button @click="reset" class="reset">重置</el-button>
         </div>
-        <div class="d-f j-s table_head">
-          <li>作业名称</li>
-          <li>满分</li>
-          <li>最高分</li>
-          <li>平均分</li>
-          <li>及格率</li>
-          <li>批阅进度</li>
-          <li>上传时间</li>
-          <li>操作</li>
-        </div>
-          <div class="none" v-if="tableData.length == 0">
-            <div>
-              <img src="../../assets/none.png" alt="" />
-            </div>
-            <div>暂无数据</div>
-          </div>
-        <div
-        v-else
-          class="cap_table"
-          :style="{ minHeight: $c.cle - 400 + 'px' }"
-        >
-          <li v-for="(item, i) in tableData" :key="i" class="d-f j-s">
-            <div>{{ item.name }}</div>
-            <div>{{ item.score }}</div>
-            <div>{{ item.high_score }}</div>
-            <div>{{ item.avg_score }}</div>
-            <div>{{ item.pass_rate }}</div>
-            <div class="d-f">
-              <el-progress
-                :percentage="item.ww"
-                :stroke-width="8"
-                :color="
-                  item.student_amount == item.marked_amount
-                    ? '#0A9DFF'
-                    : '#FA0A2F'
-                "
-              ></el-progress>
-              <div class="contrasts">
-                <span>{{ item.marked_amount }}/</span>
-                <span>{{ item.student_amount }}</span>
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column prop="name" label="作业名称"> </el-table-column>
+          <el-table-column prop="score" label="满分">
+            <template slot-scope="scope">
+              <div class="bold">{{scope.row.score}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="high_score" label="最高分">
+             <template slot-scope="scope">
+              <div class="bold">{{scope.row.high_score}}</div>
+            </template> </el-table-column>
+          <el-table-column prop="avg_score" label="平均分"> 
+             <template slot-scope="scope">
+              <div class="bold">{{scope.row.avg_score}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="pass_rate" label="及格率">
+               <template slot-scope="scope">
+              <div class="bold" style="color:#0A9DFF">{{scope.row.pass_rate}}</div>
+            </template> </el-table-column>
+          <el-table-column prop="phone" label="批阅进度" width="180">
+            <template slot-scope="scope">
+              <div class="d-f prosss_box">
+                <el-progress
+                  :percentage="scope.row.ww"
+                  :stroke-width="8"
+                  :color="
+                    scope.row.student_amount == scope.row.marked_amount
+                      ? '#0A9DFF'
+                      : '#FA0A2F'
+                  "
+                ></el-progress>
+                <div class="contrasts">
+                  <span>{{ scope.row.marked_amount }}/</span>
+                  <span>{{ scope.row.student_amount }}</span>
+                </div>
               </div>
-            </div>
-            <div>{{ item.updated_at }}</div>
-            <div class="operation">
-              <span @click="jump('/tk_yp?title='+item.name+'&id='+item.id+'&tid='+item.pid)">批阅</span>
-              <span @click="jump('/Answer_analysis?title='+item.name+'&id='+item.id)">查看</span>
-            </div>
-          </li>
+            </template>
+          </el-table-column>
+          <el-table-column prop="updated_at" label="上传时间" width="160">
+          </el-table-column>
+          <el-table-column prop="phone" label="操作">
+            <template slot-scope="scope">
+              <el-button
+                @click="
+                  jump(
+                    '/tk_yp?title=' +
+                      scope.row.name +
+                      '&id=' +
+                      scope.row.id +
+                      '&tid=' +
+                      scope.row.pid
+                  )
+                "
+                type="text"
+                size="small"
+                >批阅</el-button
+              >
+              <el-button
+                type="text"
+                size="small"
+                @click="
+                  jump(
+                    '/Answer_analysis?title=' +
+                      scope.row.name +
+                      '&id=' +
+                      scope.row.id
+                  )
+                "
+                >查看</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+        <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
@@ -129,6 +148,7 @@
 import topNav from "@/components/assembly/topnav";
 import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
+import sonNav from "@/components/assembly/exam_works_nav";
 import { tasks, years, classes } from "@/util/api";
 export default {
   data() {
@@ -146,11 +166,11 @@ export default {
       tableData: [],
       classL: [],
       total: 0,
-      navKey:2,
+      navKey: 2,
     };
   },
   created() {
-    //   var time = parseInt(new Date().getTime()/1000) 
+    //   var time = parseInt(new Date().getTime()/1000)
     //     if(this.Common.timeLogin() ==2){
     //     localStorage.setItem('open_tiem',time)
     //     this.$router.go(0);
@@ -161,8 +181,8 @@ export default {
     //     return
     // }
     var thta = this;
-    this.navKey = localStorage.getItem('navKey');
-    this.params.mtype = this.navKey==2?'work':'exam';
+    this.navKey = localStorage.getItem("navKey");
+    this.params.mtype = this.navKey == 2 ? "work" : "exam";
     //年份
     years().then((res) => {
       if (res.errcode == 0) {
@@ -171,7 +191,7 @@ export default {
     });
     //班级
     classes().then((res) => {
-      console.log(res)
+      console.log(res);
       if (res.errcode == 0) {
         thta.classL = res.data;
       }
@@ -180,15 +200,15 @@ export default {
   },
   methods: {
     //重置
-    reset(){
-      this.params.year='';
-      this.params.page=1;
-      this.params.name='';
-      this.params.cid='';
+    reset() {
+      this.params.year = "";
+      this.params.page = 1;
+      this.params.name = "";
+      this.params.cid = "";
       this.getList();
     },
     //搜索
-    search(){
+    search() {
       this.params.page = 1;
       this.getList();
     },
@@ -214,19 +234,21 @@ export default {
       }
       tasks(obj).then((res) => {
         if (res.errcode == 0) {
-          res.data.forEach(item => {
-           if(item.marked_amount){
-             item.ww = Math.round(item.marked_amount/item.student_amount*100)
-           }else{
-             item.ww =0
-           }
+          res.data.forEach((item) => {
+            if (item.marked_amount) {
+              item.ww = Math.round(
+                (item.marked_amount / item.student_amount) * 100
+              );
+            } else {
+              item.ww = 0;
+            }
           });
           that.tableData = res.data;
           that.total = res.total;
-        }else{
+        } else {
           that.tableData = [];
           that.total = 0;
-          that.$message.warning(res.mess)
+          that.$message.warning(res.mess);
         }
         load.close();
       });
@@ -237,154 +259,26 @@ export default {
       }
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot, sonNav },
 };
 </script>
 <style scoped>
-.cap_table {
-  background-color: #fff;
-}
-.cap_table .el-progress.el-progress--line {
-  width: 88px;
-}
-.cap_table .operation span {
-  color: #0a9dff;
-  margin-right: 12px;
-  cursor: pointer;
-}
-.cap_table .operation span:last-child{
-  margin-right: 0;
-}
 .container {
   background: #f4f4f4;
   /* margin-bottom: 40px; */
   margin-top: 30px;
 }
-.table_head {
-  border-bottom: 1px solid #f4f4f4;
-}
-.table_head,
-.cap_table li {
-  background-color: #fff;
-  line-height: 44px;
-  padding: 0 15px;
-  box-sizing: border-box;
-  color: #999;
-  font-size: 13px;
-}
-.cap_table .contrasts {
-  margin-left: 10px;
-}
-.cap_table li:nth-child(even) {
-  background-color: #f5f9fb;
-}
-.cap_table li div {
-  line-height: 44px;
-  font-size: 14px;
-  color: #333;
-}
-.cap_table li > div:nth-child(1) {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.cap_table li > div:nth-child(2),
-.cap_table li > div:nth-child(3),
-.cap_table li > div:nth-child(4),
-.cap_table li > div:nth-child(5) {
-  font-weight: bold;
-}
-.cap_table li > div:nth-child(5) {
-  color: #0a9dff;
-}
-.table_head li:nth-child(1),
-.table_head li:nth-child(7),
-.cap_table li > div:nth-child(1),
-.cap_table li > div:nth-child(7) {
-  width: 15%;
-}
-.table_head li:nth-child(2),
-.table_head li:nth-child(3),
-.table_head li:nth-child(4),
-.table_head li:nth-child(5),
-.table_head li:nth-child(8),
-.cap_table li > div:nth-child(2),
-.cap_table li > div:nth-child(3),
-.cap_table li > div:nth-child(4),
-.cap_table li > div:nth-child(5),
-.cap_table li > div:nth-child(8) {
-  width: 8%;
-}
-.table_head li:nth-child(6),
-.cap_table li > div:nth-child(6) {
-  width: 16%;
-}
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 135px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
 </style>
 <style>
-.cap_table .el-progress-bar {
+.prosss_box .el-progress.el-progress--line{
+  width: 88px;
+  margin:auto 5px auto 0
+}
+.prosss_box .el-progress-bar{
   padding-right: 0;
 }
-.cap_table .el-progress__text {
+.prosss_box .el-progress__text{
   display: none;
 }
-.none {
-  color: #999;
-  text-align: center;
-  margin: 0 0 60px 0;
-}
-.none div:nth-child(1) {
-  width: 416px;
-  height: 276px;
-  margin: 0 auto 40px auto;
-}
 </style>
+

+ 8 - 87
src/components/customer/topic.vue

@@ -3,26 +3,16 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li class="active">
-          <i class="iconfont iconcuotiku"></i>
-          <span>班级错题</span>
-        </li>
-        <li @click="jump('/student_err')">
-          <i class="iconfont iconcuotiben"></i> <span>学生错题</span>
-        </li>
-        <li @click="jump('/push_err')">
-          <i class="iconfont iconcuoti1"></i> <span>错题推送</span>
-        </li>
-      </div>
+        <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>错题中心> </span>
           <span>班级错题</span>
         </div>
-        <div class="d-f screen screen1">
+        <div class="d-f screen">
           <span>班级:</span>
           <el-select
+          class="small"
             @change="classC"
             v-model="params.cid"
             clearable
@@ -37,6 +27,7 @@
           </el-select>
           <span>来源:</span>
           <el-select
+            class="mini"
             clearable
             placeholder="请选择"
             v-model="source"
@@ -210,6 +201,7 @@
 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 { classes, clsErr, tasks } from "@/util/api";
 export default {
   data() {
@@ -477,7 +469,7 @@ export default {
       this.$router.push(url);
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot,sonNav },
 };
 </script>
 <style scoped>
@@ -492,7 +484,7 @@ export default {
 .fit .analysis {
   font-size: 13px;
   background: #fff8e8;
-  margin-top: 20px;
+  margin-top: 35px;
   padding: 10px 15px;
   line-height: 27px;
 }
@@ -606,76 +598,5 @@ export default {
   position: absolute;
   right: 20px;
 }
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-  position: relative;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 130px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
-</style>
-<style>
-.screen1 .el-select {
-  width: 120px;
-}
-.cap_table .el-progress-bar {
-  padding-right: 0;
-}
-.cap_table .el-progress__text {
-  display: none;
-}
-.none {
-  color: #999;
-  text-align: center;
-  margin: 0 0 60px 0;
-}
-.none div:nth-child(1) {
-  width: 416px;
-  height: 276px;
-  margin: 0 auto 40px auto;
-}
+
 </style>

+ 5 - 75
src/components/customer/work_analysis.vue

@@ -3,22 +3,7 @@
     <topHead></topHead>
     <topNav></topNav>
     <div class="container d-f">
-      <div class="leftMenu">
-        <li @click="jump('/myClass')">
-          <i class="iconfont iconbanji"></i>
-          <span>我的班级</span>
-        </li>
-        <li @click="jump('/task')">
-          <i class="iconfont iconyuejuan"></i> <span>阅卷任务</span>
-        </li>
-        <li class="active">
-          <i class="iconfont iconzuoye1"></i
-          ><span>{{ navKey == 2 ? "作业分析" : "成绩分析" }}</span>
-        </li>
-        <!-- <li @click="jump()">
-          <i class="iconfont iconcuoti1"></i><span>错题分析</span>
-        </li> -->
-      </div>
+      <sonNav></sonNav>
       <div class="rightContent">
         <div class="recordTitle">
           <span>{{ navKey == 2 ? "作业中心" : "考试中心" }} > </span>
@@ -27,8 +12,8 @@
         <div class="d-f screen screen1 time_w">
           <span>班级:</span>
           <el-select
+          class="small"
             v-model="params.cid"
-            style="width: 130px"
             clearable
             placeholder="请选择"
             @change="nav_change"
@@ -42,8 +27,8 @@
           </el-select>
           <span>年份:</span>
           <el-select
+              class="small"
             v-model="params.year"
-            style="width: 100px"
             clearable
             placeholder="请选择"
             @change="nav_change"
@@ -132,6 +117,7 @@
 import topNav from "@/components/assembly/topnav";
 import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
+import sonNav from "@/components/assembly/exam_works_nav";
 import { years, classes, analysis, tasks } from "@/util/api";
 export default {
   data() {
@@ -393,7 +379,7 @@ export default {
       });
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot,sonNav },
 };
 </script>
 <style scoped>
@@ -487,64 +473,8 @@ export default {
 .cap_table li > div:nth-child(6) {
   width: 12%;
 }
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
-.screen {
-  margin-top: 0;
-  background: #fff;
-  padding: 15px 5px;
-  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-  margin-bottom: 10px;
-}
-.screen span {
-  margin-left: 10px;
-}
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 135px;
-}
-.leftMenu i {
-  /* width: 14px;
-  height: 14px;*/
-  /* vertical-align: middle;  */
-  display: inline-block;
-  margin-left: 24px;
-  margin-right: 16px;
-}
-.leftMenu li {
-  height: 44px;
-  line-height: 44px;
-  width: 100%;
-  color: #666;
-  font-size: 14px;
-  cursor: pointer;
-  border-left: 2px solid #fff;
-  box-sizing: border-box;
-}
-.leftMenu li.active {
-  background: #ffe8ec;
-  border-left: 2px solid #fa0a2f;
-  color: #fa0a2f;
-}
-.pagePagin .el-pagination {
-  margin-left: auto;
-}
 </style>
 <style>
-.cap_table .el-progress-bar {
-  padding-right: 0;
-}
-.cap_table .el-progress__text {
-  display: none;
-}
 .time_w .el-date-editor .el-range__icon,
 .time_w .el-date-editor .el-range__close-icon,
 .time_w .el-date-editor .el-range-separator {

+ 33 - 32
src/util/api.js

@@ -1,36 +1,37 @@
-import {get, post,del,put} from './common.js';
+import {get, post, del, put } from './common.js';
 export const login = p => post('/v1/api/login', p)
-export const base64 = p => post('/v1/common/upfile/base64', p)//上传base64
+export const base64 = p => post('/v1/common/upfile/base64', p) //上传base64
 export const logout = p => del('/v1/logout', p)
-export const categories = p => get('/v1/api/resource/categories', p)//资源左侧列表
+export const categories = p => get('/v1/api/resource/categories', p) //资源左侧列表
 export const resource_items = p => get('/v1/api/resource/items', p)
-export const resourcehg= p => get('/v1/api/resource/items/'+p,)
-export const years = p => get('/v1/common/years/search', p)//年份列表
-export const regions = p => get('/v1/common/regions/search', p)//地区列表
-// export const resource_itemsp = p => post('/v1/api/resource/items/'+p, )//资源列表
+export const resourcehg = p => get('/v1/api/resource/items/' + p, )
+export const years = p => get('/v1/common/years/search', p) //年份列表
+export const regions = p => get('/v1/common/regions/search', p) //地区列表
+    // export const resource_itemsp = p => post('/v1/api/resource/items/'+p, )//资源列表
 export const resource_type = p => get('/v1/api/resource/categories', p)
-export const update_pwd = p => put('/v1/profile', p)//改密码
-export const tasks = p => get('/v1/api/tasks', p)//作业考试中心
-export const taskshg = p => get('/v1/api/tasks/'+p,)//作业考试中心
-export const  answerslist= p => get('/v1/api/tasks/'+p+'/answers',)
-export const stutasks = p => get('/v1/api/stutasks?tid='+p,)//学生阅卷任务列表
-export const answers = p => get('/v1/api/stutasks/'+p+"/answers",)//学生阅卷任务列表
-export const classes = p => get('/v1/api/myclasses',p)//班级列表
-export const analysis = p => get('/v1/api/analysis/line',p)//作业分析
-export const studenttasks = p => get('/v1/api/studenttasks',p)//答题统计
-export const questions = p => get('v1/api/papers/'+p)//作业分析-答题分析
-export const account = p => get('/v1/api/account',p)//获取用户信息
-export const searchClass = p => get('/v1/api/students',p)//学生列表
-export const collected = p => get('/v1/api/resource/collected',p)//收藏列表
-export const clsErr = p => get('/v1/api/cls-errs',p)//班级错题
-export const clsErrPost = p => post('/v1/api/cls-push-errs',p)//创建错题推送
-export const stuErr = p => get('/v1/api/stu-errs',p)//学生错题综合
-export const stuErrPer = p => get('/v1/api/stu-errs'+p,)//学生错题个人
-export const clsPushE = p => get('/v1/api/cls-push-errs',p)//错题推送列表
-export const school_s = p => get('/v1/common/schools/search',p)//学校列表
-export const grades_s = p => get('/v1/common/grades/search',p)//年级列表
-export const classes_s = p => get('/v1/common/classes/search',p)//班级列表
-export const clsPushEp = p => get('/v1/api/cls-push-errs/'+p,)//班级错题推送详情
-export const errbook = p => get('/v1/api/stu-errs/'+p,)//班级错题推送详情
-export const cleDel = p => del('/v1/api/cls-push-errs/'+p,)//错题推送删除
-export const relQuestions = p => get('/v1/api/stu-errs/'+p+'/rel-questions',)//举一反三
+export const update_pwd = p => put('/v1/profile', p) //改密码
+export const tasks = p => get('/v1/api/tasks', p) //作业考试中心
+export const taskshg = p => get('/v1/api/tasks/' + p, ) //作业考试中心
+export const answerslist = p => get('/v1/api/tasks/' + p + '/answers', )
+export const stutasks = p => get('/v1/api/stutasks?tid=' + p, ) //学生阅卷任务列表
+export const answers = p => get('/v1/api/stutasks/' + p + "/answers", ) //学生阅卷任务列表
+export const classes = p => get('/v1/api/myclasses', p) //班级列表
+export const analysis = p => get('/v1/api/analysis/line', p) //作业分析
+export const studenttasks = p => get('/v1/api/studenttasks', p) //答题统计
+export const questions = p => get('v1/api/papers/' + p) //作业分析-答题分析
+export const account = p => get('/v1/api/account', p) //获取用户信息
+export const searchClass = p => get('/v1/api/students', p) //学生列表
+export const collected = p => get('/v1/api/resource/collected', p) //收藏列表
+export const clsErr = p => get('/v1/api/cls-errs', p) //班级错题
+export const clsErrPost = p => post('/v1/api/cls-push-errs', p) //创建错题推送
+export const stuErr = p => get('/v1/api/stu-errs', p) //学生错题综合
+export const stuErrPer = p => get('/v1/api/stu-errs' + p, ) //学生错题个人
+export const clsPushE = p => get('/v1/api/cls-push-errs', p) //错题推送列表
+export const school_s = p => get('/v1/common/schools/search', p) //学校列表
+export const grades_s = p => get('/v1/common/grades/search', p) //年级列表
+export const classes_s = p => get('/v1/common/classes/search', p) //班级列表
+export const clsPushEp = p => get('/v1/api/cls-push-errs/' + p, ) //班级错题推送详情
+export const errbook = p => get('/v1/api/stu-errs/' + p, ) //班级错题推送详情
+export const cleDel = p => del('/v1/api/cls-push-errs/' + p, ) //错题推送删除
+export const relQuestions = p => get('/v1/api/stu-errs/' + p + '/rel-questions', ) //举一反三
+export const stu_err_stati = p => get('/v1/api/stu-errs/' + p + '/tasks', ) //学生错题-任务错题统一