dxd 2 роки тому
батько
коміт
971d51aaa6

+ 14 - 0
src/api/wrong.js

@@ -15,6 +15,20 @@ const WrongApi = {
             params: data
         })
     },
+    getListSD(data) {
+        return request({
+            url: `/v1/admin/stu-errs/${data.sid}/tasks`,
+            method: 'get',
+            params: data
+        })
+    },
+    getListSD2(data) {
+        return request({
+            url: `/v1/admin/stu-errs/${data.sprid}/errbook`,
+            method: 'get',
+            params: data
+        })
+    },
     getListPush(data) {
         return request({
             url: '/v1/admin/cls-push-errs',

+ 22 - 21
src/router/index.js

@@ -243,29 +243,30 @@ export const constantRoutes = [{
           title: '学生错题',
           icon: ''
         },
-        children: [{
-          path: 'detail',
-          name: 'stu-detail',
-          component: () => import('@/views/menu6/menu6-2/detail.vue'),
-          meta: {
-            title: '学生错题列表',
-            icon: ''
-          },
-          hidden: true,
-          children: [{
-            path: 'detail2',
-            name: 'stu-detail2',
-            component: () => import('@/views/menu6/menu6-2/detail2.vue'),
-            meta: {
-              title: '学生错题详情',
-              icon: ''
-            },
-            hidden: true
-          }]
-        }]
-      },
 
 
+      },
+      {
+        path: 'detail',
+        name: 'stu-detail',
+        component: () => import('@/views/menu6/menu6-2/detail.vue'),
+        meta: {
+          title: '学生错题列表',
+          icon: ''
+        },
+        hidden: true,
+      },
+      {
+        path: 'detail2',
+        name: 'stu-detail2',
+        component: () => import('@/views/menu6/menu6-2/detail2.vue'),
+        meta: {
+          title: '学生错题详情',
+          icon: ''
+        },
+        hidden: true
+      },
+
       {
         path: 'menu6-3',
         name: 'menu6-3',

+ 3 - 1
src/views/menu3/menu3-1/index.vue

@@ -169,6 +169,7 @@
             v-model="dialogForm.cid"
             placeholder="请选择班级"
             :disabled="!dialogForm.gid"
+            multiple
           >
             <el-option
               v-for="item in metaData['classes']"
@@ -474,7 +475,7 @@ export default {
               phone: res.data.phone,
               sid: res.data.school_id,
               gid: res.data.grade_id,
-              cid: res.data.class_id,
+              cid: res.data.class_id.split(',').map(item=>+item),
               rid: res.data.role_id,
               subject: res.data.subject,
             };
@@ -565,6 +566,7 @@ export default {
       }
       this.$refs.dialog.config.title = "新增教师信息";
       this.$refs.dialog.open((cancel) => {
+        this.dialogForm.cid = this.dialogForm.cid.join(',')
         TeacherApi.add(this.dialogForm).then((res) => {
           this.getList();
           cancel();

+ 5 - 5
src/views/menu5/cutPage/cutPage.vue

@@ -5,7 +5,7 @@
       <div
         :class="[index == curLeftIndex ? 'cur' : '', 'paperBox']"
         v-for="(img, index) in leftImgs"
-        :key="index"
+        :key="index+'paper'"
         @click="leftClick(index)"
       >
         <span class="paper">
@@ -140,7 +140,7 @@
         <li
           :class="[curBoxIndex == 'answerBox' ? ' cur' : '', 'cutBox']"
           v-for="(element, index) in answerList"
-          :key="index"
+          :key="index+'answer'"
           @click="cutBoxClick('answerBox')"
         >
           <!-- <el-input
@@ -154,7 +154,7 @@
             <div
               style="position: relative"
               v-for="(item, index2) in element.ele"
-              :key="index2"
+              :key="index2+'anbk'"
             >
               <!-- <el-input
                 v-show="curOpt != 'fast'"
@@ -197,7 +197,7 @@
           <li
             :class="[index == curBoxIndex ? ' cur' : '', 'cutBox']"
             v-for="(element, index) in list"
-            :key="index"
+            :key="index+'cut'"
             @click="cutBoxClick(index)"
           >
             <el-input
@@ -216,7 +216,7 @@
               <div
                 style="position: relative"
                 v-for="(item, index2) in element.ele"
-                :key="index2"
+                :key="index2+'cutbk'"
               >
                 <el-input
                   v-show="curOpt != 'fast' && curOpt != 'answer'"

+ 44 - 30
src/views/menu6/menu6-2/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="menu6-2">
+  <div class="aaabbb">
     <cloudSearch :advance="false" @search="getList()" @reset="reset()">
       <template slot="normal">
         <div class="cloudSearch-item">
@@ -18,6 +18,18 @@
             </el-option>
           </el-select>
         </div>
+        <div class="cloudSearch-item">
+          <div class="form-label">阅卷任务:</div>
+          <el-select v-model="listQuery.tid" placeholder="请选择阅卷任务">
+            <el-option
+              v-for="item in taskOpt"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </div>
       </template>
     </cloudSearch>
     <cloudTable
@@ -36,55 +48,45 @@
 
 <script>
 import { WrongApi } from "@/api/wrong";
-
+import { paperApi } from "@/api/paper";
 import { DictsApi } from "@/api/dict";
 import store from "@/store";
 
 export default {
-  name: "menu6-2",
+  name: "stu-detail",
   metaDataType: ["schools", "grades"],
   computed: {},
   data() {
     return {
+      curStudentId: 0,
       ctime: "",
       listQuery: {},
+      taskOpt: [],
       num: 10,
       checked: true,
       dataTable: {
         hasSelect: true,
         columns: [
           {
-            label: "名",
-            prop: "student_name",
+            label: "名",
+            prop: "task_name",
             show: true,
           },
           {
             id: "1",
-            label: "学号",
-            prop: "student_sno",
+            label: "总题数",
+            prop: "total_count",
             show: true,
           },
           {
             id: "2",
             label: "错题数",
-            prop: "total_errors",
+            prop: "error_count",
             show: true,
           },
           {
             id: "3",
-            label: "作业错题",
-            prop: "work_error_count",
-            show: true,
-          },
-          {
-            id: "4",
-            label: "考试错题",
-            prop: "exam_error_count",
-            show: true,
-          },
-          {
-            id: "5",
-            label: "综合错题率",
+            label: "错题率",
             prop: "error_ratio",
             show: true,
           },
@@ -133,8 +135,8 @@ export default {
     };
   },
   created() {
-    debugger;
-    // this.getList();
+    this.curStudentId = +this.$route.query.id;
+    this.getList();
   },
   computed: {
     srcList() {
@@ -155,11 +157,15 @@ export default {
   },
   methods: {
     getList() {
-      WrongApi.getListS(
-        Object.assign(this.listQuery, {
-          page: this.dataTable.paginationOpt.pageIndex,
-          size: this.dataTable.paginationOpt.pageRows,
-        })
+      WrongApi.getListSD(
+        Object.assign(
+          { sid: this.curStudentId },
+          {
+            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;
@@ -181,11 +187,10 @@ export default {
       let _this = this;
       switch (name) {
         case "handleDetail":
-            debugger
           this.$router.push({
             name: "stu-detail2",
             query: {
-              id: row.id,
+              id: row.task_id,
             },
           });
           break;
@@ -270,6 +275,7 @@ export default {
         }
       });
     },
+
     Gchange(e, from) {
       DictsApi.classes({ gid: e }).then((res) => {
         this.metaData["classes"] = res.data;
@@ -280,6 +286,14 @@ export default {
         }
       });
     },
+    srcChange(val) {
+      let params = {
+        mtype: val,
+      };
+      paperApi.getMarkTaskList(params).then((res) => {
+        this.taskOpt = res.data;
+      });
+    },
   },
 };
 </script>

+ 87 - 33
src/views/menu6/menu6-2/detail2.vue

@@ -4,37 +4,85 @@
       <template slot="normal">
         <div class="cloudSearch-item">
           <div class="form-label">学校:</div>
-          <el-select v-model="listQuery.sid" filterable placeholder="请选择学校" @change="Schange($event, 'search')">
-            <el-option v-for="item in metaData['schools']" :key="item.value" :label="item.name" :value="item.id">
+          <el-select
+            v-model="listQuery.sid"
+            filterable
+            placeholder="请选择学校"
+            @change="Schange($event, 'search')"
+          >
+            <el-option
+              v-for="item in metaData['schools']"
+              :key="item.value"
+              :label="item.name"
+              :value="item.id"
+            >
             </el-option>
           </el-select>
         </div>
-        <div class="cloudSearch-item">
-          <div class="form-label">年级:</div>
-          <el-select v-model="listQuery.gid" filterable placeholder="请选择年级前先选学校" @change="Gchange($event, 'search')" :disabled="!listQuery.sid">
-            <el-option v-for="item in metaData['grades']" :key="item.value" :label="item.name" :value="item.id">
-            </el-option>
-          </el-select>
-        </div>
-        <div class="cloudSearch-item">
-          <div class="form-label">班级:</div>
-          <el-select v-model="listQuery.cid" filterable placeholder="请选择班级前先选年级" :disabled="!listQuery.gid">
-            <el-option v-for="item in metaData['classes']" :key="item.value" :label="item.name" :value="item.id">
-            </el-option>
-          </el-select>
-        </div>
-        <div class="cloudSearch-item">
-          <div class="form-label" style="width:90px">学生/学号:</div>
-          <el-input v-model="listQuery.op_content" placeholder="请输入学生/学号" size="small"></el-input>
-        </div>
       </template>
     </cloudSearch>
-    <cloudTable :table="dataTable" @refresh-table="getList" @handle="handle" @handleSelectionChange="selRow">
-      <!-- <template slot="tableBtn">
-        <el-button size="small" @click="batchDel()">批量删除</el-button>
-        <el-button class="add" size="small" @click="add('add')">新增班级</el-button>
-      </template> -->
-    </cloudTable>
+    <div class="quesList">
+      <div class="infinite-list-wrapper" style="overflow: auto">
+        <ul
+          class="list"
+          v-infinite-scroll="load"
+          infinite-scroll-disabled="disabled"
+        >
+          <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">{{ item.stem }}</div> -->
+                <div class="da">
+                  <!-- <span>A.xxxxxxxxxxxxxxxxxx</span>
+                  <span>B.xxxxxxxxxxxxxxxxxx</span>
+                  <span>C.xxxxxxxxxxxxxxxxxx</span>
+                  <span>D.xxxxxxxxxxxxxxxxxx</span> -->
+                </div>
+                <div class="ly">
+                  <span style="color: #999999">{{ item.task_name }}</span>
+                  <span style="color: #999999">答案:{{ item.answer }}</span>
+                  <span
+                    style="color: #52c4ff; cursor: pointer"
+                    @click="analysis(index)"
+                    >答案解析</span
+                  >
+                </div>
+                <div class="tj">
+                  <span style="color: #fa0a2f"
+                    >错题率:{{ item.error_ratio }}</span
+                  >
+                  <span
+                    ><span style="margin-right: 20px"
+                      >总人数:{{ item.student_count }}</span
+                    >
+                    错误/正确人数:{{ item.error_count }}/{{
+                      item.right_count
+                    }}</span
+                  >
+                </div>
+              </el-col>
+              <el-col :span="6">
+                <bar1
+                  :id="`bar${index + 1}`"
+                  :data="item.barOption"
+                  style="width: 100%; height: 100%"
+                ></bar1>
+              </el-col>
+            </el-row>
+            <cloudDialog :ref="'dialog' + index" :config="dialogConfig">
+              <div style="margin-bottom: 30px">
+                <span v-exchangeHtml:foo="item.analysis"></span>
+              </div>
+            </cloudDialog>
+          </li>
+        </ul>
+        <p v-if="loading">加载中...</p>
+        <p style="text-align: center" v-if="noMore">
+          {{ resList.length > 0 ? "没有更多了" : "暂无数据" }}
+        </p>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -45,11 +93,12 @@ import { DictsApi } from "@/api/dict";
 import store from "@/store";
 
 export default {
-  name: "menu6-2",
+  name: "stu-detail2",
   metaDataType: ["schools", "grades"],
   computed: {},
   data() {
     return {
+      curTaskId: null,
       ctime: "",
       listQuery: {
         // op_user_realname: "",
@@ -143,7 +192,8 @@ export default {
     };
   },
   created() {
-    // this.getList();
+    this.curTaskId = +this.$route.query.id;
+    this.getList();
   },
   watch: {
     ctime: function (val) {
@@ -156,11 +206,15 @@ export default {
   },
   methods: {
     getList() {
-      WrongApi.getListS(
-        Object.assign(this.listQuery, {
-          page: this.dataTable.paginationOpt.pageIndex,
-          size: this.dataTable.paginationOpt.pageRows,
-        })
+      WrongApi.getListSD2(
+        Object.assign(
+          { sprid: this.curTaskId },
+          {
+            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;

+ 1 - 3
src/views/menu6/menu6-2/index.vue

@@ -219,14 +219,12 @@ export default {
       });
     },
     async handle(name, index, row) {
-      let _this = this;
       switch (name) {
         case "handleDetail":
-          debugger
           this.$router.push({
             name: "stu-detail",
             query: {
-              id: row.id,
+              id: row.student_id,
             },
           });
           break;

+ 1 - 35
src/views/menu6/menu6-3/index.vue

@@ -19,41 +19,7 @@
             </el-option>
           </el-select>
         </div>
-        <div class="cloudSearch-item">
-          <div class="form-label">年级:</div>
-          <el-select
-            v-model="listQuery.gid"
-            filterable
-            placeholder="请选择年级前先选学校"
-            @change="Gchange($event, 'search')"
-            :disabled="!listQuery.sid"
-          >
-            <el-option
-              v-for="item in metaData['grades']"
-              :key="item.value"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-        </div>
-        <div class="cloudSearch-item">
-          <div class="form-label">班级:</div>
-          <el-select
-            v-model="listQuery.cid"
-            filterable
-            placeholder="请选择班级前先选年级"
-            :disabled="!listQuery.gid"
-          >
-            <el-option
-              v-for="item in metaData['classes']"
-              :key="item.value"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-        </div>
+        
         <div class="cloudSearch-item">
           <div class="form-label">来源:</div>
           <el-select