Переглянути джерело

FIX:视频资源 题库筛选子分类处理、题库序号改为真实序号

Long 1 місяць тому
батько
коміт
1952f87c3e
1 змінених файлів з 12 додано та 4 видалено
  1. 12 4
      src/views/course/videoResource/index.vue

+ 12 - 4
src/views/course/videoResource/index.vue

@@ -559,7 +559,7 @@
             <el-table-column type="selection" reserve-selection width="55" align="center" />
             <el-table-column label="序号" width="60" align="center">
               <template slot-scope="scope">
-                {{ scope.$index + 1 }}
+                {{ scope.row.sort }}
               </template>
             </el-table-column>
             <el-table-column label="题目标题" align="center" prop="title" min-width="200" show-overflow-tooltip />
@@ -751,6 +751,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         questionType: null,
+        questionSubType: null,
         title: null
       },
       projectLoading: false,
@@ -1489,15 +1490,22 @@ export default {
       return data.cateName.indexOf(value) !== -1;
     },
     /** 处理分类点击 */
-    handleCategoryClick(data) {
+    handleCategoryClick(data, node) {
       // 更新查询参数
       this.projectQueryParams.pageNum = 1;
 
       // 如果是全部分类,则清空分类过滤
-      if (data.cateId === 0) {
+      if (node.level === 1) {
         this.projectQueryParams.questionType = null;
-      } else {
+        this.projectQueryParams.questionSubType = null;
+      }
+      else if (node.level === 2) {
         this.projectQueryParams.questionType = data.cateId;
+        this.projectQueryParams.questionSubType = null;
+      }
+      else if (node.level === 3) {
+        this.projectQueryParams.questionType = null;
+        this.projectQueryParams.questionSubType = data.cateId;
       }
 
       // 重新加载项目列表