dxd 2 years ago
parent
commit
e84daf8034

+ 8 - 1
src/api/wrong.js

@@ -24,7 +24,14 @@ const WrongApi = {
     },
     getListSD2(data) {
         return request({
-            url: `/v1/admin/stu-errs/${data.sprid}/errbook`,
+            url: `/v1/admin/stu-errs/${data.sid}/tasks/${data.tid}/questions`,
+            method: 'get',
+            params: data
+        })
+    },
+    getListSD3(data) {
+        return request({
+            url: `/v1/admin/stu-errs/${data.sid}/tasks/${data.tid}/error-info`,
             method: 'get',
             params: data
         })

+ 10 - 5
src/router/index.js

@@ -233,7 +233,8 @@ export const asyncRoutes = [{
         component: () => import('@/views/menu5/cutPage/cutPage.vue'),
         meta: {
           title: '试卷切割',
-          icon: ''
+          icon: '',
+          roles: "menu5.menu5-1"
         },
         hidden: true
       },
@@ -243,7 +244,8 @@ export const asyncRoutes = [{
         component: () => import('@/views/menu5/scorePage/scorePage.vue'),
         meta: {
           title: '设置分值',
-          icon: ''
+          icon: '',
+          roles: "menu5.menu5-1"
         },
         hidden: true
       },
@@ -253,7 +255,8 @@ export const asyncRoutes = [{
         component: () => import('@/views/menu5/answerPage/answerPage.vue'),
         meta: {
           title: '设置答题卡',
-          icon: ''
+          icon: '',
+          roles: "menu5.menu5-1"
         },
         hidden: true
       },
@@ -297,7 +300,8 @@ export const asyncRoutes = [{
         component: () => import('@/views/menu6/menu6-2/detail.vue'),
         meta: {
           title: '学生错题列表',
-          icon: ''
+          icon: '',
+          roles: "menu6.menu6-2"
         },
         hidden: true,
       },
@@ -307,7 +311,8 @@ export const asyncRoutes = [{
         component: () => import('@/views/menu6/menu6-2/detail2.vue'),
         meta: {
           title: '学生错题详情',
-          icon: ''
+          icon: '',
+          roles: "menu6.menu6-2"
         },
         hidden: true
       },

+ 1 - 1
src/views/menu5/menu5-1/index.vue

@@ -811,7 +811,7 @@ export default {
       // let fileList = new FormData();
       var token = this.Cookies.get("www-authenticate");
       axios({
-        url: "http://127.0.0.1:19882/parsedocx.aspx",
+        url: "http://47.108.130.28:19882/parsedocx.aspx",
         // url: "http://10.10.153.242:19882/parsedocx.aspx",
         method: "post",
         data: formData,

+ 2 - 1
src/views/menu6/menu6-2/detail.vue

@@ -190,7 +190,8 @@ export default {
           this.$router.push({
             name: "stu-detail2",
             query: {
-              id: row.task_id,
+              sid:this.curStudentId,
+              tid: row.student_task_id,
             },
           });
           break;

+ 99 - 14
src/views/menu6/menu6-2/detail2.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="menu6-2">
-    <cloudSearch :advance="false" @search="getList()" @reset="reset()">
+    <!-- <cloudSearch :advance="false" @search="getList()" @reset="reset()">
       <template slot="normal">
         <div class="cloudSearch-item">
           <div class="form-label">学校:</div>
@@ -20,7 +20,15 @@
           </el-select>
         </div>
       </template>
-    </cloudSearch>
+    </cloudSearch> -->
+    <div class="student-card">
+      <div><span>{{studentInfo.student_name}}({{studentInfo.student_sno}})</span></div>
+      <div><span>{{studentInfo.task_name}}</span></div>
+      <div>总题数:<span>{{studentInfo.total_questions}}</span></div>
+      <div>错题数:<span>{{studentInfo.total_errors}}</span></div>
+      <div>错题率:<span>{{studentInfo.error_ratio}}</span></div>
+      <!-- <div>主观题:<span>50</span></div> -->
+    </div>
     <div class="quesList">
       <div class="infinite-list-wrapper" style="overflow: auto">
         <ul
@@ -31,9 +39,10 @@
           <li v-for="(item, index) in resList" class="list-item" :key="index">
             <el-row>
               <el-col :span="18">
-                <div class="tm" v-exchangeHtml:foo="item.stem"></div>
+                <!-- <div class="tm" v-exchangeHtml:foo="item.analysis"></div> -->
                 <!-- <div class="tm">{{ item.stem }}</div> -->
                 <div class="da">
+                  <img :src="item.marked_img" alt="">
                   <!-- <span>A.xxxxxxxxxxxxxxxxxx</span>
                   <span>B.xxxxxxxxxxxxxxxxxx</span>
                   <span>C.xxxxxxxxxxxxxxxxxx</span>
@@ -63,11 +72,11 @@
                 </div>
               </el-col>
               <el-col :span="6">
-                <bar1
+                <!-- <bar1
                   :id="`bar${index + 1}`"
                   :data="item.barOption"
                   style="width: 100%; height: 100%"
-                ></bar1>
+                ></bar1> -->
               </el-col>
             </el-row>
             <cloudDialog :ref="'dialog' + index" :config="dialogConfig">
@@ -96,7 +105,7 @@ export default {
   name: "stu-detail2",
   metaDataType: ["schools", "grades"],
   computed: {
-     noMore() {
+    noMore() {
       return this.count >= 20;
     },
     disabled() {
@@ -107,6 +116,7 @@ export default {
     return {
       count: 10,
       curTaskId: null,
+      sid: null,
       loading: false,
       ctime: "",
       listQuery: {
@@ -184,9 +194,9 @@ export default {
       },
       dialogType: "",
       dialogConfig: {
-        top: "20vh",
-        width: "800px",
-        title: "新增班级",
+        top: "8vh",
+        width: "600px",
+        title: "答案解析",
         center: true,
         btnTxt: ["取消", "保存"],
       },
@@ -198,10 +208,13 @@ export default {
       gradesBySchool: [],
       gradesBySchoolF: [],
       selRows: "",
+      studentInfo: {},
+      resList: [],
     };
   },
   created() {
-    this.curTaskId = +this.$route.query.id;
+    this.curTaskId = +this.$route.query.tid;
+    this.sid = +this.$route.query.sid;
     this.getList();
   },
   watch: {
@@ -224,16 +237,25 @@ export default {
     getList() {
       WrongApi.getListSD2(
         Object.assign(
-          { sprid: this.curTaskId },
+          { tid: this.curTaskId, sid: this.sid },
           {
             page: this.dataTable.paginationOpt.pageIndex,
             size: this.dataTable.paginationOpt.pageRows,
-            ...this.listQuery,
           }
         )
       ).then((res) => {
-        this.dataTable.data = res.data;
-        this.dataTable.paginationOpt.total = res.total;
+        this.resList = res.data;
+      });
+      WrongApi.getListSD3(
+        Object.assign(
+          { tid: this.curTaskId, sid: this.sid },
+          {
+            page: this.dataTable.paginationOpt.pageIndex,
+            size: this.dataTable.paginationOpt.pageRows,
+          }
+        )
+      ).then((res) => {
+        this.studentInfo = res.data;
       });
     },
     add(type) {
@@ -360,6 +382,11 @@ export default {
         }
       });
     },
+    analysis(row) {
+      this.$refs[`dialog${row}`][0].open((cancel) => {
+        cancel();
+      });
+    },
   },
 };
 </script>
@@ -367,5 +394,63 @@ export default {
 <style lang="scss" scoped>
 .menu6-2 {
   display: block;
+  .student-card {
+    margin: 20px 20px;
+    display: flex;
+    justify-content: space-between;
+    font-size:20px;
+  }
+  .infinite-list-wrapper {
+    .list {
+      padding: 0;
+      margin: 0;
+      list-style: none;
+      // height: 500px;
+      .list-item {
+        height: 100%;
+        margin: 10px 20px;
+        // box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
+        border-bottom: 1px solid #e0e0e0;
+        .el-row {
+          height: 100%;
+          .el-col {
+            padding: 20px;
+            height: 100%;
+            font-size: 16px;
+            .tm {
+              // height: 120px;
+              line-height: 30px;
+            }
+            .da {
+              display: flex;
+              width: 80%;
+              flex-wrap: wrap;
+              img {
+                display: inline-flex;
+                // height: 50px;
+                width: 50%;
+              }
+            }
+            .ly {
+              display: flex;
+              justify-content: space-between;
+              width: 100%;
+              padding-bottom: 10px;
+              border-bottom: 1px solid #ededed;
+            }
+            .tj {
+              display: flex;
+              padding-top: 10px;
+              justify-content: space-between;
+              width: 100%;
+            }
+          }
+        }
+        &:nth-child(1) {
+          border-top: 1px solid #e0e0e0;
+        }
+      }
+    }
+  }
 }
 </style>