Prechádzať zdrojové kódy

查看更多改为一页4行

natasha 1 rok pred
rodič
commit
458560e53c
1 zmenil súbory, kde vykonal 38 pridanie a 34 odobranie
  1. 38 34
      src/views/learn-center/ListPage.vue

+ 38 - 34
src/views/learn-center/ListPage.vue

@@ -9,19 +9,19 @@
     <!-- 课程列表 -->
     <div class="main" v-if="CourseList" v-loading="loading">
       <div v-if="navName == 'TEXTBOOK'" class="classify_box">
-        <label>{{$t('Key243')}}</label>
+        <label>{{ $t('Key243') }}</label>
         <el-select
-            v-model="typeId"
-            :placeholder="$t('Key295')"
-            multiple
-            @change="getData"
-            >
-            <el-option
-                v-for="(item, index) in typeList"
-                :key="'type' + index"
-                :label="item.name"
-                :value="item.id"
-            />
+          v-model="typeId"
+          :placeholder="$t('Key295')"
+          multiple
+          @change="getData"
+        >
+          <el-option
+            v-for="(item, index) in typeList"
+            :key="'type' + index"
+            :label="item.name"
+            :value="item.id"
+          />
         </el-select>
       </div>
       <div>
@@ -41,7 +41,9 @@
           :page-sizes="pageSizes"
           layout="prev, pager, next,total, sizes,jumper"
           :current-page="pageNum"
-          :page-size="pageSize"
+          :page-size="
+            navName == 'COURSE' ? pageSize : pageSize === 16 ? 20 : pageSize
+          "
           :total="CourseList.total_count"
         >
         </el-pagination>
@@ -75,7 +77,7 @@ export default {
       targetPage: 1,
       gotoPage: null,
       pageNum: 1,
-      pageSize: 8,
+      pageSize: 16,
       loading: false,
       headerOneTitle: '',
       pageSizes: [],
@@ -83,7 +85,7 @@ export default {
       pageSizes2: [10, 20, 30, 40],
       isData: false,
       typeList: [],
-      typeId: []
+      typeId: [],
     }
   },
   computed: {
@@ -153,7 +155,7 @@ export default {
         }).then((res) => {
           this.CourseList = res
           this.CourseList.course_list.forEach((item, index) => {
-            item.teacherName = item.teacher_name_desc.replace(/;/g, " ");
+            item.teacherName = item.teacher_name_desc.replace(/;/g, ' ')
           })
           this.loading = false
         })
@@ -161,12 +163,13 @@ export default {
       if (this.navName == 'TEXTBOOK') {
         this.pageSizes = this.pageSizes2
         TextbookAPI('book-book_manager-PageQueryBookList', {
-          page_capacity: this.pageSize == 8 ? this.pageSize + 2 : this.pageSize,
+          page_capacity:
+            this.pageSize == 16 ? this.pageSize + 4 : this.pageSize,
           cur_page: this.pageNum,
           publish_status: 1,
           is_control_publish_scope: 'true',
-          is_enable_book_org_free_license_query: "true",
-          type_id_list: this.typeId
+          is_enable_book_org_free_license_query: 'true',
+          type_id_list: this.typeId,
         }).then((res) => {
           this.CourseList = res
           this.loading = false
@@ -176,11 +179,12 @@ export default {
       if (this.navName == 'LEARNRESOURCE') {
         this.pageSizes = this.pageSizes2
         TextbookAPI('book-book_manager-PageQueryBookList', {
-          page_capacity: this.pageSize == 8 ? this.pageSize + 2 : this.pageSize,
+          page_capacity:
+            this.pageSize == 16 ? this.pageSize + 4 : this.pageSize,
           cur_page: this.pageNum,
           publish_status: 1,
           is_control_publish_scope: 'true',
-          is_enable_book_org_free_license_query: "true"
+          is_enable_book_org_free_license_query: 'true',
         }).then((res) => {
           this.CourseList = res
           this.loading = false
@@ -189,11 +193,11 @@ export default {
     },
     // 教材类型列表
     getTypeList() {
-      let MethodName = "dict_manager-GetBookTypeList";
-      let data = {};
-      getStaticContent(MethodName, data).then(res => {
-        this.typeList = res.type_list;
-      });
+      let MethodName = 'dict_manager-GetBookTypeList'
+      let data = {}
+      getStaticContent(MethodName, data).then((res) => {
+        this.typeList = res.type_list
+      })
     },
   },
   async created() {
@@ -209,7 +213,7 @@ export default {
         'Key323',
         'Key215',
         'Key243',
-        'Key295'
+        'Key295',
       ],
     })
     this.isData = true
@@ -223,7 +227,7 @@ export default {
       this.headerOneTitle = '学习资源' //this.$t("Key44");
     }
 
-    this.getTypeList();
+    this.getTypeList()
     this.getData()
   },
 }
@@ -256,13 +260,13 @@ export default {
       text-align: center;
     }
   }
-  .classify_box{
+  .classify_box {
     width: 1200px;
     margin: 0 auto 24px auto;
-    label{
-        font-size: 14px;
-        line-height: 150%;
-        margin-right: 12px;
+    label {
+      font-size: 14px;
+      line-height: 150%;
+      margin-right: 12px;
     }
   }
 }
@@ -287,4 +291,4 @@ export default {
   height: 32px;
   line-height: 32px;
 }
-</style>
+</style>