qq 2 年之前
父節點
當前提交
d3650ca936

+ 6 - 0
src/App.vue

@@ -287,4 +287,10 @@ input::-webkit-input-placeholder {
   font-weight: bold;
   font-size: 14px;
 }
+.recordTitle .black {
+  cursor: pointer;
+}
+.recordTitle .black:hover{
+  color: #333;
+}
 </style>

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

@@ -27,7 +27,6 @@ export default {
   },
   methods: {
     jump(url,i){
-      console.log(i)
               this.l_id = i;
         localStorage.setItem('sonNav',i)
         this.$router.push(url);

+ 10 - 153
src/components/customer/answer_analysis.vue

@@ -3,21 +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>
@@ -26,7 +12,7 @@
         </div>
         <div class="census_box">
           <div class="title">{{ title }}</div>
-          <div class="d-f census_fbx">
+          <div class="d-f j-s census_fbx">
             <li>
               <div>
                 <img src="../../assets/zy1.png" alt="" />
@@ -117,7 +103,8 @@
               :key="i + 'a'"
             >
               <div class="analysis">
-                <img :src="item.img" alt="" />
+                <!-- <img :src="item.img" alt="" /> -->
+                <div v-html="item.stem" class="stems"></div>
                 <div class="d-f">
                   <span>答案:</span>
                   <span>{{ item.answer }}</span>
@@ -250,6 +237,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 histogram from "@/components/assembly/histogram";
 import { taskshg, stutasks, answerslist,questions } from "@/util/api";
 import {get} from '@/util/common.js';
@@ -272,16 +260,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
-    // }
      this.navKey = localStorage.getItem('navKey');
     this.title = this.$route.query.title;
     this.id = this.$route.query.id;
@@ -606,7 +584,7 @@ export default {
       });
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot,sonNav },
 };
 </script>
 
@@ -648,8 +626,6 @@ content: '';
 }
 .df_tj .df_tit {
   font-size: 13px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
   color: #15213d;
   margin-bottom: 15px;
 }
@@ -658,23 +634,20 @@ content: '';
 }
 .dt_fx .analysis span:first-child {
   font-size: 14px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
   color: #333333;
+  line-height: 46px;
 }
-.dt_fx .analysis > div {
-  margin: 15px 0;
+.dt_fx .analysis .stems{
+  min-height:185px
 }
 .dt_fx .analysis > div:nth-child(2) span:last-child {
   font-size: 14px;
-  font-family: Microsoft YaHei;
   font-weight: bold;
   color: #57c77c;
+  line-height: 46px;
 }
 .dt_fx .analysis > div:nth-child(3) span:last-child {
   font-size: 13px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
   color: #333333;
 }
 .df_tj .df_table {
@@ -812,7 +785,6 @@ content: '';
 .census_fbx li {
   display: flex;
   margin-top: 30px;
-  margin-right: 85px;
   margin-bottom: 10px;
 }
 .census_fbx li span {
@@ -844,121 +816,6 @@ content: '';
   /* 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(3),
-.cap_table li > div:nth-child(4),
-.cap_table li > div:nth-child(6),
-.cap_table li > div:nth-child(5) {
-  font-weight: bold;
-}
-.cap_table li  div:nth-child(7) span {
-  color: #0a9dff ;
-}
-.table_head li:nth-child(7),
-.cap_table li > div:nth-child(7) {
-  width: 25%;
-}
-.table_head li:nth-child(1),
-.cap_table li > div:nth-child(1),
-.table_head li:nth-child(2),
-.table_head li:nth-child(3),
-.table_head li:nth-child(4),
-.table_head li:nth-child(5),
-.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) {
-  width: 10%;
-}
-.table_head li:nth-child(8),
-.cap_table li > div:nth-child(8) {
-  width: 50px;
-}
-.table_head li:nth-child(6),
-.cap_table li > div:nth-child(6) {
-  width: 10%;
-}
-.rightContent {
-  width: 970px;
-  padding: 0 0 0 20px;
-  box-sizing: border-box;
-}
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child,.recordTitle .black:hover {
-  color: #666;
-}
 
-.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;
-}
-.pagePagin {
-  margin-bottom: 20px;
-}
- .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>
 

+ 1 - 1
src/components/customer/capital.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">

+ 2 - 9
src/components/customer/myClass.vue

@@ -13,7 +13,6 @@
           <span>班级:</span>
           <el-select
           style="width:130px"
-            @change="classC"
             v-model="params.cid"
             clearable
             placeholder="请选择"
@@ -99,10 +98,9 @@ export default {
       console.log(res.data[0]);
       if (res.errcode == 0) {
         that.classL = res.data;
-        that.params.cid = res.total > 0 ? res.data[0].id : "";
-        that.getList();
       }
     });
+     that.getList();
   },
   methods: {
     navKeys(i) {
@@ -142,12 +140,6 @@ export default {
       });
       return data;
     },
-    classC(i) {
-      // console.log(i);
-      this.params.page = 1;
-      this.params.cid = i;
-      this.getList();
-    },
     //重置
     reset() {
       this.params.page = 1;
@@ -174,6 +166,7 @@ export default {
       });
       var that = this;
       var obj = JSON.parse(JSON.stringify(this.params));
+      obj.cid=obj.cid?obj.cid:0
       searchClass(obj).then((res) => {
         if (res.errcode == 0) {
           that.tableData = res.data;

+ 6 - 38
src/components/customer/per_err.vue

@@ -8,33 +8,7 @@
         <div class="recordTitle">
           <span>错题中心> </span>
           <span class="black" @click="jump('/student_err')">学生错题></span>
-          <span>{{ name }}</span>
-        </div>
-        <div class="d-f screen screen1">
-          <span>来源:</span>
-          <el-select
-            clearable
-            placeholder="请选择"
-            v-model="source"
-            @change="sourceList"
-          >
-            <el-option value="exam" label="考试"></el-option>
-            <el-option value="work" label="作业"></el-option>
-          </el-select>
-          <el-select
-            v-model="params.tid"
-            clearable
-            placeholder="请选择"
-            style="width: 150px; margin-left: 5px"
-          >
-            <el-option
-              v-for="(item, i) in sour_list"
-              :key="i + 'j'"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-          <el-button @click="search">搜索</el-button>
+          <span>{{ name }}{{title}}</span>
         </div>
         <div class="error_coll">
           <li class="d-f j-s" v-for="(item, i) in tableData" :key="i + 'a'">
@@ -123,11 +97,14 @@ export default {
       source: "", //来源
       sour_list: [],
       name: "",
+      title: "",
     };
   },
   created() {
     this.name = this.$route.query.name;
+    this.title = this.$route.query.title;
     this.params.sid = this.$route.query.sid;
+    this.params.tid = this.$route.query.tid;
     this.getList();
   },
   methods: {
@@ -164,14 +141,7 @@ export default {
       var that = this;
       var par =
         "/" +
-        this.params.sid +
-        "?page=" +
-        this.params.page +
-        "&size=" +
-        this.params.size;
-      if (this.params.tid) {
-        par = par + "&tid=" + this.params.tid;
-      }
+        this.params.sid +'/tasks/'+this.params.tid+'/questions'
       stuErrPer(par).then((res) => {
         if (res.errcode == 0) {
           that.tableData = res.data ? res.data : [];
@@ -292,9 +262,7 @@ export default {
   width: 100%;
   height: 122px;
 }
-.recordTitle .black {
-  cursor: pointer;
-}
+
 .error_coll .t_img .stem {
   font-size: 14px;
   color: #333;

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

@@ -69,8 +69,6 @@
                 jump(
                   '/student_per_err?sid=' +
                     scope.row.student_id +
-                    '&cid=' +
-                    params.cid +
                     '&name=' +
                     scope.row.student_name
                 )

+ 12 - 26
src/components/customer/student_per_err.vue

@@ -7,7 +7,7 @@
       <div class="rightContent">
         <div class="recordTitle">
           <span>错题中心> </span>
-          <span>学生错题></span>
+          <span class="black" @click="jump('/student_err')">学生错题></span>
           <span>{{name}}</span>
         </div>
         <div class="d-f screen screen1">
@@ -30,44 +30,31 @@
           <el-button @click="search">搜索</el-button>
         </div>
               <el-table :data="tableData" stripe style="width: 100%">
-          <el-table-column prop="student_name" label="姓名">
+          <el-table-column prop="task_name" label="名称">
           </el-table-column>
-          <el-table-column prop="student_sno" label="学号"> </el-table-column>
-          <el-table-column prop="total_errors" label="错题数">
+          <el-table-column prop="total_count" label="总题数"> </el-table-column>
+          <el-table-column prop="error_count" label="错题数">
             <template slot-scope="scope">
                 <div class="bold">
-                   {{scope.row.total_errors}}
+                   {{scope.row.error_count}}
                 </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="综合出错率">
+          <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="操作"> 
+          <el-table-column label="操作" width="80"> 
              <template slot-scope="scope">
         <el-button @click="
                 jump(
-                  '/student_per_err?sid=' +
-                    scope.row.student_id +
-                    '&cid=' +
-                    params.cid +
-                    '&name=' +
-                    scope.row.student_name
+                  '/per_err?sid=' +
+                    params.sid +
+                    '&tid=' +
+                     scope.row.student_task_id +
+                    '&name=' +name+'&title='+scope.row.task_name
                 )
               " type="text" size="small">查看</el-button>
       </template>
@@ -116,7 +103,6 @@ export default {
     };
   },
   created() {
-    var that = this;
     this.params.sid = this.$route.query.sid;
     this.name = this.$route.query.name;
     this.getList();

+ 21 - 16
src/components/customer/task.vue

@@ -52,22 +52,26 @@
           <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>
+              <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 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>
+            <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">
@@ -114,7 +118,7 @@
                     '/Answer_analysis?title=' +
                       scope.row.name +
                       '&id=' +
-                      scope.row.id
+                      scope.row.id,2
                   )
                 "
                 >查看</el-button
@@ -253,7 +257,8 @@ export default {
         load.close();
       });
     },
-    jump(url) {
+    jump(url,id) {
+      id==2?localStorage.setItem("sonNav",2):'';
       if (url) {
         this.$router.push(url);
       }
@@ -270,14 +275,14 @@ export default {
 }
 </style>
 <style>
-.prosss_box .el-progress.el-progress--line{
+.prosss_box .el-progress.el-progress--line {
   width: 88px;
-  margin:auto 5px auto 0
+  margin: auto 5px auto 0;
 }
-.prosss_box .el-progress-bar{
+.prosss_box .el-progress-bar {
   padding-right: 0;
 }
-.prosss_box .el-progress__text{
+.prosss_box .el-progress__text {
   display: none;
 }
 </style>

+ 9 - 101
src/components/customer/tk_xs_fx.vue

@@ -3,26 +3,12 @@
     <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>
           <span @click="jump('/work_analysis')" class="black">{{navKey==2?'作业分析':'成绩分析'}}></span>
-          <span @click="jump('/tk_dt_fx?title='+title+'&id='+parent_id)" class="black">{{ title }}></span>
+          <span @click="jump('/Answer_analysis?title='+title+'&id='+parent_id)" class="black">{{ title }}></span>
           <span>{{ names }}</span>
         </div>
         <div class=" d-f j-s census_box">
@@ -83,7 +69,7 @@
                 </div>
                 <div class="d-f">
                   <span>解析:</span>
-                  <span>{{ item.analysis }}</span>
+                  <span v-html="item.analysis"></span>
                 </div>
               </div>
               <div>
@@ -137,8 +123,7 @@
 import topNav from "@/components/assembly/topnav";
 import topHead from "@/components/assembly/head";
 import foot from "@/components/assembly/foot";
-// import histogram from "@/components/assembly/histogram";
-// import {answers} from "@/util/api";
+import sonNav from "@/components/assembly/exam_works_nav";
 import {get} from '@/util/common.js';
 export default {
   data() {
@@ -156,23 +141,12 @@ 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
-    // }
     this.title = this.$route.query.title;
     this.names = this.$route.query.names;
     this.score = this.$route.query.score;
     this.id = this.$route.query.id
     this.parent_id = this.$route.query.parent_id
     this.subjective = this.$route.query.subjective;
-    
     this.get_list()
   },
    watch: {
@@ -329,7 +303,7 @@ export default {
       }
     },
   },
-  components: { topHead, topNav, foot },
+  components: { topHead, topNav, foot ,sonNav},
 };
 </script>
 <style scoped>
@@ -350,7 +324,7 @@ export default {
   width: 100%;
   background: #f9f9f9;
   border: 1px solid #dfdfdf;
-  height: 333px;
+  min-height: 333px;
   padding: 20px;
   box-sizing: border-box;
   margin-bottom: 20px;
@@ -361,23 +335,17 @@ export default {
 }
 .dt_fx .analysis span:first-child {
   font-size: 14px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
   color: #333333;
-}
-.dt_fx .analysis > div {
-  margin: 15px 0;
+  line-height: 46px;
 }
 .dt_fx .analysis > div:nth-child(2) span:last-child {
   font-size: 14px;
-  font-family: Microsoft YaHei;
   font-weight: bold;
   color: #57c77c;
+  line-height: 46px;
 }
 .dt_fx .analysis > div:nth-child(3) span:last-child {
   font-size: 13px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
   color: #333333;
 }
 .df_tj .df_tit {
@@ -506,9 +474,7 @@ margin-top: 16px;
   font-weight: 400;
   color: #333333;
 }
-.recordTitle .black {
-  cursor: pointer;
-}
+
 .operation span {
   color: #0a9dff;
   font-size: 14px;
@@ -519,64 +485,6 @@ margin-top: 16px;
   /* margin-bottom: 40px; */
   margin-top: 30px;
 }
-.rightContent {
-  width: 100%;
-  padding: 0 20px;
-  box-sizing: border-box;
-}
-.recordTitle {
-  font-size: 13px;
-  color: #cccccc;
-  margin: 0 0 15px 0;
-}
-.recordTitle span:last-child {
-  color: #666;
-}
 
-.leftMenu {
-  width: 230px;
-  padding: 10px 0;
-  background-color: #fff;
-  height: 176px;
-}
-.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;
-}
-.pagePagin {
-  margin-bottom: 20px;
-}
- .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>
 

+ 49 - 47
src/components/customer/tk_yp.vue

@@ -34,11 +34,11 @@
           <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">{{ num_id + 1 }}</span> 题</span
+                >第 <span class="blue">{{tk_list[0].qno }}</span> 题</span
               >
               <span
                 ><span class="blue">{{ selectId + 1 }}</span>
-                <span class="gray">/{{ tk_list.length }}</span></span>
+                <span class="gray">/{{ student_total}}</span></span>
             </div>
             <div class="tk_list">
               <li
@@ -153,10 +153,10 @@
                     v-for="(item, i) in tk_num"
                     :key="i + '批阅'"
                     class="d-f j-s"
-                    :class="i == num_id ? 'active' : ''"
-                    @click="pnoChange(i)"
+                    :class="i == (tk_list[0].qno-1) ? 'active' : ''"
+                    @click="pnoChange(i,item.marked_amount,item.question_amount)"
                   >
-                    <span>第{{ i + 1 }}题</span>
+                    <span>第{{ item.qno }}题</span>
                     <el-progress
                       :percentage="item.marked_amount == 0 ? 0 : (item.marked_amount / item.question_amount) * 100"
                       :stroke-width="10"
@@ -172,13 +172,13 @@
                   <li
                     v-for="(item, i) in tk_num"
                     :key="i + '批阅'"
-                    :class="i == num_id ? 'active' : ''"
-                    @click="pnoChange(i)"
+                    :class="i == (tk_list[0].qno-1) ? 'active' : ''"
+                    @click="pnoChange(i,item.marked_amount,item.question_amount)"
                   >
                     <div class="img_box">
                   <img src="../../assets/tk_img.png" alt="" />
                 </div>
-                    <span>第{{ i + 1 }}题</span>
+                    <span>第{{ item.qno}}题</span>
                   </li>
                 </div>
               </div>
@@ -269,8 +269,8 @@ export default {
       nav_id:0,
       listP: {
         page: 1,
-        size: 10,
-        qno:1,
+        size: 100,
+        qno:0,
       },
       title: "",
       full: false,
@@ -357,16 +357,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
-    // }
      this.navKey = localStorage.getItem('navKey');
     this.title = this.$route.query.title;
     this.id = this.$route.query.id;
@@ -402,14 +392,19 @@ export default {
     //切换nav
     navChange(i){
       this.nav_id = i
-      if(i==1){
-        this.getpaper();
-      }else{
-        this.getpaperjd();
-      }
+      // if(i==1){
+      //   this.getpaper();
+      // }else{
+        // this.getpaperjd();
+      // }
     },
     //切换试题
-    pnoChange(i){
+    pnoChange(i,num,py_num){
+      console.log(num,py_num)
+      if(num==py_num){
+        this.$message.warning('第'+(i+1)+'题已经批阅完成~')
+        return
+      }
       this.num_id = i;
       var p = this.listP;
           p.qno= i+1
@@ -421,7 +416,6 @@ export default {
        get("/v1/api/tasks/"+ this.id +"/process").then((res) => {
       if (res.errcode == 0) {
         that.tk_num = res.data;
-        that.lock = true;
       }
     });
     },
@@ -443,10 +437,23 @@ export default {
           this.$message.warning('批阅得分大于试题满分,本题满分为:'+this.tk_list[this.selectId].score+'分');
              return
       }
+        setTimeout(()=>{
+          that.lock = true;
+        },2000)
       this.downLoadImage(id,score);
     },
     downLoadImage(topic_id,score) {
       this.done = true;
+      var text = new fabric.Textbox('2', {
+        left: 500,
+        top: 500,
+        width: 220,
+        fontSize: 18,
+        fill: this.drawColor,
+        hasControls: true,
+      });
+      this.fabricObj.add(text);
+      return
       //生成双倍像素比的图片
       let base64URl = this.fabricObj.toDataURL({
         formart: "jpg",
@@ -478,10 +485,6 @@ export default {
            that.tk_list[that.selectId].marked_score = score;
            that.tk_list[that.selectId].status = true;
             that.$message.success('批阅成功')
-          // if(that.selectId<that.tk_list.length-1){
-            // that.selectId = that.selectId + 1;
-            // that.choice_student(that.selectId ,that.tk_list[that.selectId].qimg) 
-          // }
           that.getpaperjd();
         }
       });
@@ -526,22 +529,21 @@ export default {
       });
     },
     //获取试卷列表
-    getpaper() {
-      var p = this.listP
-      p.size = 100;
-      delete p.qno;
-      var that = this;
-      get("/v1/api/papers/"+this.pid+"/questions", p).then((res) => {
-        console.log(res);
-        if (res.errcode == 0) {
-          that.tk_num = res.data;
-          that.student_total = res.total;
-          if(that.listP.page ==1){
-            that. choice_student(0, that.tk_list[0].qimg)
-          }
-        }
-      });
-    },
+    // getpaper() {
+    //   var p = this.listP
+    //   p.size = 100;
+    //   delete p.qno;
+    //   var that = this;
+    //   get("/v1/api/papers/"+this.pid+"/questions", p).then((res) => {
+    //     console.log(res);
+    //     if (res.errcode == 0) {
+    //       that.tk_num = res.data;
+    //       if(that.listP.page ==1){
+    //         that.choice_student(0, that.tk_list[0].qimg)
+    //       }
+    //     }
+    //   });
+    // },
     sign(id,selectid) {
       this.full = id == 1 ? false : true;
       this.selectId = selectid

+ 18 - 25
src/components/customer/topic.vue

@@ -13,8 +13,7 @@
           <span>班级:</span>
           <el-select
           class="small"
-            @change="classC"
-            v-model="params.cid"
+            v-model="cid"
             clearable
             placeholder="请选择"
           >
@@ -129,8 +128,7 @@
           <div>
             <span>班级</span>
             <el-select
-              @change="classC"
-              v-model="params.cid"
+              v-model="cid"
               clearable
               placeholder="请选择"
               style="width: 325px"
@@ -179,7 +177,7 @@
           </div>
         </div>
         <div class="btn">
-          <el-button @click="is_show = false">取消</el-button>
+          <el-button @click="is_show = false,cid='',tid='',ratio='',source=''">取消</el-button>
           <el-button type="primary" @click="sure_ratio">确认</el-button>
         </div>
       </div>
@@ -209,8 +207,8 @@ export default {
       params: {
         page: 1,
         size: 10,
-        cid: "0",
       },
+       cid: "",
       tid: "",
       ratio: 0,
       index: 0,
@@ -224,21 +222,10 @@ 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.params.cid = res.total > 0 ? res.data[0].id : "";
         that.classL = res.data;
       }
     });
@@ -266,6 +253,11 @@ export default {
     sure_ratio() {
       var regs = /^([1-9]{1}[0-9]{0,7})\d*$/;
       if (!this.ratio) {
+        this.$message.warning("请输入1-100内的整数");
+        return;
+      }
+      if(this.ratio<1 || 100<this.ratio){
+        this.$message.warning("请输入1-100内的整数");
         return;
       }
       if (regs.test(this.ratio)) {
@@ -273,7 +265,7 @@ export default {
         this.is_show = false;
         this.getList();
       } else {
-        this.$message.warning("请输入100内的整数");
+        this.$message.warning("请输入1-100内的整数");
       }
     },
     //来源
@@ -422,13 +414,13 @@ export default {
         });
       }
     },
-    //班级筛选
-    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() {
       this.params.page = 1;
@@ -449,6 +441,7 @@ export default {
       });
       var that = this;
       this.params.tid = this.tid ? this.tid : 0;
+      this.params.cid = this.cid ? this.cid : 0;
       this.params.ratio = this.ratio;
       clsErr(this.params).then((res) => {
         if (res.errcode == 0) {

+ 49 - 43
src/components/customer/work_analysis.vue

@@ -57,39 +57,52 @@
           :style="{ width: '100%', height: '300px' }"
           v-if="navKey == 2"
         ></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="cap_table" v-if="tableData.length > 0">
-          <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">
-              <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">
+                {{ scope.row.pass_rate }}
               </div>
-            </div>
-            <div>{{ item.updated_at }}</div>
-            <div class="operation">
-              <span
-                @click="jump('/answer_analysis?title=' + item.name + '&id=' + item.id)"
-                >查看</span
+            </template>
+          </el-table-column>
+          <el-table-column prop="phone" label="答题人数">
+            <template slot-scope="scope">
+               <div style="color: #0a9dff">
+                <span>{{ scope.row.marked_amount }}/</span>
+                <span>{{ scope.row.student_amount }}</span>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="updated_at" label="上传时间" width="160">
+          </el-table-column>
+          <el-table-column prop="phone" label="操作" width="80">
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                size="small"
+                @click="jump('/answer_analysis?title=' + scope.row.name + '&id=' + scope.row.id)"
+                >查看</el-button
               >
-            </div>
-          </li>
-        </div>
-        <div class="cap_table" v-else>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="cap_table" v-if="tableData.length == 0">
           <div class="none">
             <div>
               <img src="../../assets/none.png" alt="" />
@@ -123,7 +136,7 @@ export default {
   data() {
     return {
       params: {
-        cid: 1,
+        cid: '',
         year: "",
         page: 1,
         size: 10,
@@ -138,16 +151,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 that = this;
     this.navKey = localStorage.getItem("navKey");
     //年份
@@ -179,7 +182,7 @@ export default {
       if (this.params.year) {
         obj.year = this.params.year;
       }
-      obj.cid = this.params.cid;
+      obj.cid = this.params.cid?this.params.cid:0;
       analysis(obj).then((res) => {
         if (res.errcode == 0) {
           if (that.navKey == 2) {
@@ -206,6 +209,9 @@ export default {
       }
     },
     get_list(obj1) {
+      if (!obj1.cid) {
+        delete obj1.cid;
+      }
       const load = this.$loading({
         lock: true,
         text: "Loading",

+ 6 - 0
src/components/log.vue

@@ -236,6 +236,10 @@ export default {
         this.$message.warning("请输入新密码");
         return;
       }
+      if(this.pwd.newpwd<6 || this.pwd.newpwd>12){
+        this.$message.warning("新密码长度请设置在6-12位之间");
+        return;
+      }
       this.axios({
         method: "put",
         headers: {
@@ -308,6 +312,8 @@ export default {
             that.$message.success("登录成功");
             that.$router.push("/");
           }
+        }else{
+          that.$message.error(res.detail)
         }
       });
     },

+ 60 - 59
src/util/common.js

@@ -1,45 +1,46 @@
 import axios from 'axios';
-import QS from 'qs';//引入qs模块,为post型数据提供序列化(非常重要)
+import QS from 'qs'; //引入qs模块,为post型数据提供序列化(非常重要)
 import router from './../router';
+import Message from 'element-ui';
 
 // 设置请求超时
-axios.defaults.timeout = 10000;//设置超时时间为10s```
-console.log(localStorage.token)
+axios.defaults.timeout = 10000; //设置超时时间为10s```
+// console.log(localStorage.token)
 // 设置post请求方式请求头
 axios.defaults.headers.post['Content-Type'] = 'application/json';
 axios.defaults.headers.put['Content-Type'] = 'application/json';
-if(localStorage.getItem('token') ){
-    axios.defaults.headers.delete['Authorization'] = ' Bearer ' + localStorage.getItem('token') ;
-axios.defaults.headers.put['Authorization'] = ' Bearer ' + localStorage.getItem('token') ;
-axios.defaults.headers.get['Authorization'] = ' Bearer ' + localStorage.getItem('token') ;
-axios.defaults.headers.post['Authorization'] = ' Bearer ' + localStorage.getItem('token') ;
+if (localStorage.getItem('token')) {
+    axios.defaults.headers.delete['Authorization'] = ' Bearer ' + localStorage.getItem('token');
+    axios.defaults.headers.put['Authorization'] = ' Bearer ' + localStorage.getItem('token');
+    axios.defaults.headers.get['Authorization'] = ' Bearer ' + localStorage.getItem('token');
+    axios.defaults.headers.post['Authorization'] = ' Bearer ' + localStorage.getItem('token');
 }
 
-axios.interceptors.response.use(    
-    response => {  
+axios.interceptors.response.use(
+    response => {
         // console.log(response) 
-        if (response.status === 200) {            
-            return Promise.resolve(response);        
-        } else {            
-            return Promise.reject(response);        
-        }    
+        if (response.status === 200) {
+            return Promise.resolve(response);
+        } else {
+            return Promise.reject(response);
+        }
     },
-    error => {       
-        console.log(error.response) 
-        if (error.response) {      
+    error => {
+        console.log(error.response)
+        if (error.response) {
             // console.log(error.response.status)      
-            if(error.response.status == 403){
+            if (error.response.status == 403) {
                 localStorage.removeItem('token');
-                setTimeout(() => {                        
-                    router.replace({                            
-                        path: '/login',                            
-                    });                    
-                }, 1000); 
-            }else{
-                Message.error(error.response.data.detail)
+                setTimeout(() => {
+                    router.replace({
+                        path: '/login',
+                    });
+                }, 1000);
+            } else {
+                return Promise.resolve(error.response);
             }
             // switch (error.response.status) {    
-               
+
             // //请求返回的错误妈需要与后台开发人员协商好,以便更快的定位错误。          
             //     case 401:    //用户未登录       
             //         router.replace({                        
@@ -55,7 +56,7 @@ axios.interceptors.response.use(
             //             duration: 1000,
             //             forbidClick: true
             //         });
-                                     
+
             //         break; 
             //     case 404:   //请求错误
             //         Toast({
@@ -72,47 +73,47 @@ axios.interceptors.response.use(
             //         });
             // }
             return Promise.reject(error.response.status);
-        }   
-})
-export function get(url, params){    
-    return new Promise((resolve, reject) =>{        
-        axios.get(url, {            
-            params: params        
+        }
+    })
+export function get(url, params) {
+    return new Promise((resolve, reject) => {
+        axios.get(url, {
+            params: params
         }).then(res => {
             resolve(res.data);
-        }).catch(err =>{
-            reject(err.data)        
-    })    
-})
+        }).catch(err => {
+            reject(err.data)
+        })
+    })
 }
-export function del(url, params){    
-    return new Promise((resolve, reject) =>{        
-        axios.delete(url, {            
-            params: params        
+export function del(url, params) {
+    return new Promise((resolve, reject) => {
+        axios.delete(url, {
+            params: params
         }).then(res => {
             resolve(res.data);
-        }).catch(err =>{
-            reject(err.data)        
-    })    
-})
+        }).catch(err => {
+            reject(err.data)
+        })
+    })
 }
-export function put(url, params){    
-    return new Promise((resolve, reject) =>{        
+export function put(url, params) {
+    return new Promise((resolve, reject) => {
         axios.put(url, params).then(res => {
             resolve(res.data);
-        }).catch(err =>{
-            reject(err.data)        
-    })    
-})
+        }).catch(err => {
+            reject(err.data)
+        })
+    })
 }
 export function post(url, params) {
     return new Promise((resolve, reject) => {
-         axios.post(url, params)
-        .then(res => {
-            resolve(res.data);
-        })
-        .catch(err =>{
-            reject(err.data)
-        })
+        axios.post(url, params)
+            .then(res => {
+                resolve(res.data);
+            })
+            .catch(err => {
+                reject(err.data)
+            })
     })
 }