qq 2 gadi atpakaļ
vecāks
revīzija
26c9e5abba
2 mainītis faili ar 470 papildinājumiem un 173 dzēšanām
  1. 288 0
      src/components/customer/student_per_err.vue
  2. 182 173
      src/router/index.js

+ 288 - 0
src/components/customer/student_per_err.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="page scroll-x">
+    <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>
+      <div class="rightContent">
+        <div class="recordTitle">
+          <span>错题中心> </span>
+          <span>学生错题</span>
+        </div>
+        <div class="d-f screen screen1">
+          <span>来源:</span>
+          <el-select
+            v-model="params.cid"
+            clearable
+            placeholder="请选择"
+          >
+            <el-option label="作业" value="作业"></el-option>
+            <el-option label="考试" value="考试"></el-option>
+          </el-select>
+          <div class="search_box">
+            <i class="el-icon-search"></i>
+            <el-input
+              v-model="params.kw"
+              placeholder="请输入关键字搜索"
+            ></el-input>
+          </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="
+                jump(
+                  '/per_err?sid=' +
+                    item.student_id +
+                    '&cid=' +
+                    params.cid +
+                    '&name=' +
+                    item.student_name
+                )
+              "
+            >
+              查看
+            </div>
+          </li>
+        </div>
+        <div class="d-f j-s pagePagin" v-if="total > 0">
+          <el-pagination
+            background
+            layout="prev, pager, next"
+            :total="total"
+            :page-size="params.size"
+            :current-page="params.page"
+            @current-change="handleCurrentChange"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <!-- <foot></foot> -->
+  </div>
+</template>
+<script>
+import topNav from "@/components/assembly/topnav";
+import topHead from "@/components/assembly/head";
+import foot from "@/components/assembly/foot";
+import { stuErr, classes } from "@/util/api";
+export default {
+  data() {
+    return {
+      params: {
+        page: 1,
+        size: 10,
+        cid: "",
+      },
+      tableData: [],
+      classL: [],
+      total: 0,
+    };
+  },
+  created() {
+    var that = this;
+  },
+  methods: {
+    //搜索
+    search() {
+      this.params.page = 1;
+      this.getList();
+    },
+    //分页
+    handleCurrentChange(val) {
+      this.params.page = val;
+      this.getList();
+    },
+    //查看
+    //获取列表
+    getList() {
+      const load = this.$loading({
+        lock: true,
+        text: "Loading",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+      var that = this;
+      var obj = JSON.parse(JSON.stringify(this.params));
+      stuErr(obj).then((res) => {
+        if (res.errcode == 0) {
+          that.tableData = res.data;
+          that.total = res.total;
+        } else {
+          that.tableData = [];
+          that.total = 0;
+          that.$message.warning(res.mess);
+        }
+        load.close();
+      });
+    },
+    jump(url) {
+      this.$router.push(url);
+    },
+  },
+  components: { topHead, topNav, foot },
+};
+</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>

+ 182 - 173
src/router/index.js

@@ -13,6 +13,7 @@ import Answer_analysis from '@/components/customer/answer_analysis'
 import Tk_xs_fx from '@/components/customer/tk_xs_fx'
 import MyClass from '@/components/customer/myClass'
 import Student_err from '@/components/customer/student_err'
+import Student_per_err from '@/components/customer/student_per_err'
 import Push_err from '@/components/customer/push_err'
 import See_pusherr from '@/components/customer/see_pusherr'
 import Per_err from '@/components/customer/per_err'
@@ -25,178 +26,186 @@ import Cite from '@/components/customer/cite'
 Vue.use(Router)
 const originalPush = Router.prototype.push
 Router.prototype.push = function push(location) {
-  return originalPush.call(this, location).catch(err => err)
+    return originalPush.call(this, location).catch(err => err)
 }
 export default new Router({
-  // mode:'history',
-  routes: [
-    {
-      path: '/login',
-      name: 'Log',
-      component: Log,
-    },
-    {
-      path: '/',
-      name: 'Capital',
-      component: Capital,
-      meta:{
-        title:'作业资源中心',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/examination',
-      name: 'Examination',
-      component: Examination,
-      meta:{
-        title:'考试资源中心',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/answer_analysis',
-      name: 'Answer_analysis',
-      component: Answer_analysis,
-      meta:{
-        title:'答题分析',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/tk_xs_fx',
-      name: 'Tk_xs_fx',
-      component: Tk_xs_fx,
-      meta:{
-        title:'学生答题分析',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/task',
-      name: 'Task',
-      component: Task,
-      meta:{
-        title:'阅卷任务',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/test',
-      name: 'Test',
-      component: Test,
-      meta:{
-        title:'考试中心',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/topic',
-      name: 'Topic',
-      component: Topic,
-      meta:{
-        title:'班级错题',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/student_err',
-      name: 'Student_err',
-      component: Student_err,
-      meta:{
-        title:'学生错题',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/push_err',
-      name: 'Push_err',
-      component: Push_err,
-      meta:{
-        title:'错题推送',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/tk_yp',
-      name: 'Tk_yp',
-      component: Tk_yp,
-      meta:{
-        title:'按题批阅',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/tk_xsyp',
-      name: 'Tk_xsyp',
-      component: Tk_xsyp,
-      meta:{
-        title:'按学生批阅',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/work_analysis',
-      name: 'Work_analysis',
-      component: Work_analysis,
-      meta:{
-        title:'作业分析',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/myClass',
-      name: 'MyClass',
-      component: MyClass,
-      meta:{
-        title:'我的班级',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/see_pusherr',
-      name: 'See_pusherr',
-      component: See_pusherr,
-      meta:{
-        title:'错题推送',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/per_err',
-      name: 'Per_err',
-      component: Per_err,
-      meta:{
-        title:'个人错题',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/err_book',
-      name: 'Err_book',
-      component: Err_book,
-      meta:{
-        title:'错题本',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/coll',
-      name: 'Coll',
-      component: Coll,
-      meta:{
-        title:'我的收藏',
-        requiresAuth: true 
-      }
-    },
-    {
-      path: '/cite',
-      name: 'Cite',
-      component: Cite,
-      meta:{
-        title:'举一反三',
-        requiresAuth: true 
-      }
-    },
-    
-  ]
-})
+    // mode:'history',
+    routes: [{
+            path: '/login',
+            name: 'Log',
+            component: Log,
+        },
+        {
+            path: '/',
+            name: 'Capital',
+            component: Capital,
+            meta: {
+                title: '作业资源中心',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/examination',
+            name: 'Examination',
+            component: Examination,
+            meta: {
+                title: '考试资源中心',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/answer_analysis',
+            name: 'Answer_analysis',
+            component: Answer_analysis,
+            meta: {
+                title: '答题分析',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/tk_xs_fx',
+            name: 'Tk_xs_fx',
+            component: Tk_xs_fx,
+            meta: {
+                title: '学生答题分析',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/task',
+            name: 'Task',
+            component: Task,
+            meta: {
+                title: '阅卷任务',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/test',
+            name: 'Test',
+            component: Test,
+            meta: {
+                title: '考试中心',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/topic',
+            name: 'Topic',
+            component: Topic,
+            meta: {
+                title: '班级错题',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/student_err',
+            name: 'Student_err',
+            component: Student_err,
+            meta: {
+                title: '学生错题',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/push_err',
+            name: 'Push_err',
+            component: Push_err,
+            meta: {
+                title: '错题推送',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/tk_yp',
+            name: 'Tk_yp',
+            component: Tk_yp,
+            meta: {
+                title: '按题批阅',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/tk_xsyp',
+            name: 'Tk_xsyp',
+            component: Tk_xsyp,
+            meta: {
+                title: '按学生批阅',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/work_analysis',
+            name: 'Work_analysis',
+            component: Work_analysis,
+            meta: {
+                title: '作业分析',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/myClass',
+            name: 'MyClass',
+            component: MyClass,
+            meta: {
+                title: '我的班级',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/student_per_err',
+            name: 'Student_per_err',
+            component: Student_per_err,
+            meta: {
+                title: '学生错题',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/see_pusherr',
+            name: 'See_pusherr',
+            component: See_pusherr,
+            meta: {
+                title: '错题推送',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/per_err',
+            name: 'Per_err',
+            component: Per_err,
+            meta: {
+                title: '个人错题',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/err_book',
+            name: 'Err_book',
+            component: Err_book,
+            meta: {
+                title: '错题本',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/coll',
+            name: 'Coll',
+            component: Coll,
+            meta: {
+                title: '我的收藏',
+                requiresAuth: true
+            }
+        },
+        {
+            path: '/cite',
+            name: 'Cite',
+            component: Cite,
+            meta: {
+                title: '举一反三',
+                requiresAuth: true
+            }
+        },
+
+    ]
+})