lsc 2 gadi atpakaļ
vecāks
revīzija
89dfbbef44

BIN
src/assets/icon/thirdToolList/han.png


BIN
src/assets/icon/thirdToolList/hanClass.png


+ 117 - 121
src/components/index.vue

@@ -17,43 +17,24 @@
             <div class="search" @click="selectAll">
               <img src="../assets/icon/search.png" alt="" />
             </div>
-            <input
-              class="sInput"
-              type="text"
-              placeholder="请输入关键字"
-              v-model="sCourse"
-            />
+            <input class="sInput" type="text" placeholder="请输入关键字" v-model="sCourse" />
           </div>
         </div>
         <div class="choose">
-          <div
-            class="all_choose"
-            v-for="(item, index) in CourseType[0]"
-            :key="index"
-          >
+          <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
             <span>{{ item.name }}:</span>
             <div class="typeCss">
-              <div
-                class="cName"
-                @click="getCourse(item.name, '', item.id, 1)"
-                :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''"
-              >
+              <div class="cName" @click="getCourse(item.name, '', item.id, 1)"
+                :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
                 全部
               </div>
-              <div
-                v-for="item1 in CourseTypeJson[item.id]"
-                :key="item1.id"
-                :label="item1.id"
-                @click="getCourse(item.name, item.id, item1.id, 2)"
-              >
-                <div
-                  class="cName"
-                  :class="
-                    typea == item1.id || typeb == item1.id || typed == item1.id
-                      ? 'isCType'
-                      : ''
-                  "
-                >
+              <div v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id"
+                @click="getCourse(item.name, item.id, item1.id, 2)">
+                <div class="cName" :class="
+                  typea == item1.id || typeb == item1.id || typed == item1.id
+                    ? 'isCType'
+                    : ''
+                ">
                   {{ item1.name }}
                 </div>
               </div>
@@ -77,46 +58,33 @@
           </div> -->
         <div>
           <div class="main_box">
-            <div
-              class="box_course"
-              v-for="(item, index) in zoneClass"
-              :key="index"
-            >
+            <div class="box_course" v-for="(item, index) in zoneClass" :key="index">
               <div class="wheel">
-                <img
-                  :src="
-                    item.cover
-                      ? JSON.parse(item.cover)[0].url
-                      : require('../assets/wheel.png')
-                  "
-                  alt=""
-                />
+                <img :src="
+                  item.cover
+                    ? JSON.parse(item.cover)[0].url
+                    : require('../assets/wheel.png')
+                " alt="" />
               </div>
               <div class="middle_white">
                 <div class="textOverflow">{{ item.title }}</div>
                 <div class="nameAndLength">
-                  <el-tooltip
-                    class="typeN"
-                    effect="light"
-                    :content="item.typename"
-                    placement="top"
-                  >
+                  <el-tooltip class="typeN" effect="light" :content="item.typename" placement="top">
                     <div>{{ item.typename }}</div>
                   </el-tooltip>
 
-                  <div style="min-width: 50px">
+                  <div>
                     {{ JSON.parse(item.chapters).length }}阶段
                   </div>
                 </div>
-                <el-tooltip
-                  effect="light"
-                  :content="item.school"
-                  placement="top"
-                >
-                  <div class="school">
-                    {{ item.school }}
-                  </div>
-                </el-tooltip>
+                <div class="school_box">
+                  <el-tooltip effect="light" :content="item.school" placement="top">
+                    <div class="school">
+                      {{ item.school }}
+                    </div>
+                  </el-tooltip>
+                  <div style="color: #b4b4b4;">{{item.utime}}</div>
+                </div>
                 <!-- <div class="people">
                   <div class="man">
                     <img src="../assets/people.png" alt="" />
@@ -128,27 +96,24 @@
                   </div>
                 </div> -->
               </div>
-              <div
-                class="now_study"
-                @click="
-                  goTo(
-                    '/courseDetail?courseId=' +
-                      item.courseId +
-                      '&userid=' +
-                      userid +
-                      '&oid=' +
-                      oid +
-                      '&org=' +
-                      org +
-                      '&cid=' +
-                      classId +
-                      '&tType=' +
-                      tType +
-                      '&screenType=' +
-                      screenType
-                  )
-                "
-              >
+              <div class="now_study" @click="
+                goTo(
+                  '/courseDetail?courseId=' +
+                    item.courseId +
+                    '&userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&cid=' +
+                    classId +
+                    '&tType=' +
+                    tType +
+                    '&screenType=' +
+                    screenType
+                )
+              ">
                 立即学习
               </div>
             </div>
@@ -157,28 +122,12 @@
             </div>
           </div>
         </div>
-        <div
-          class="student_page"
-          style="margin: 15px 0 0"
-          v-if="zoneClass.length > 0"
-        >
-          <el-pagination
-            background
-            layout="prev, pager, next"
-            :page-size="10"
-            :total="total"
-            v-if="page && zoneListId != 0"
-            @current-change="handleCurrentChange"
-          >
+        <div class="student_page" style="margin: 15px 0 0" v-if="zoneClass.length > 0">
+          <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
+            v-if="page && zoneListId != 0" @current-change="handleCurrentChange">
           </el-pagination>
-          <el-pagination
-            background
-            layout="prev, pager, next"
-            :page-size="10"
-            :total="total"
-            v-if="page && zoneListId == 0"
-            @current-change="handleCurrentChange1"
-          >
+          <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
+            v-if="page && zoneListId == 0" @current-change="handleCurrentChange1">
           </el-pagination>
         </div>
       </div>
@@ -235,7 +184,7 @@ export default {
     //获取专区下的课程
     getZoneClass(zid) {
       this.isListAjax = true;
-      const loading = this.openLoading(document.querySelector(".main_box"));
+      // const loading = this.openLoading(document.querySelector(".main_box"));
       let params = {
         bid: zid,
         oid: this.oid,
@@ -244,7 +193,7 @@ export default {
       this.ajax
         .get(this.$store.state.api + "getZoneClassStudent", params)
         .then((res) => {
-          loading.close();
+          // loading.close();
           this.isListAjax = false;
           this.zoneClass = res.data[0];
           this.total = res.data[0].length ? res.data[0][0].num : 0;
@@ -381,9 +330,9 @@ export default {
     selectAll() {
       this.zoneListId = 0;
       this.isListAjax = true;
-      if (!this.loading) {
-        this.loading = this.openLoading(document.querySelector(".main_box"));
-      }
+      // if (!this.loading) {
+      //   this.loading = this.openLoading(document.querySelector(".main_box"));
+      // }
       let params = {
         uid: this.userid,
         oid: this.oid,
@@ -551,10 +500,19 @@ export default {
         });
     },
   },
+  beforeDestroy() {
+    clearInterval(this.timer)
+    this.timer = null
+  },
   created() {
+    this.loading = this.openLoading(document.querySelector(".main_box"));
     this.selectType();
     this.selectAll();
     this.getBanner();
+    this.timer = setInterval(() => {
+      this.selectAll();
+      this.getBanner();
+    }, 5000);
     document.scrollingElement.scrollTop = 0;
   },
 };
@@ -566,6 +524,7 @@ export default {
     margin: 0px 5px 20px 5px !important;
   }
 }
+
 .student_head .imgS {
   width: 100%;
   height: 100%;
@@ -605,20 +564,24 @@ export default {
   background: #0e71e6;
   margin-right: 5px;
 }
+
 .wheel {
   width: 100%;
   height: 140px;
 }
+
 .man {
   width: 16px;
   height: 16px;
 }
-.wheel > img,
-.man > img {
+
+.wheel>img,
+.man>img {
   width: 100%;
   height: 100%;
   object-fit: cover;
 }
+
 .box_course {
   display: flex;
   flex-direction: column;
@@ -633,17 +596,21 @@ export default {
     0px 2px 1px -1px rgb(0 0 0 / 12%);
   justify-content: space-between;
 }
+
 .middle_white {
   font-size: 14px;
-  margin: 5px 0 5px 10px;
+  margin: 5px 10px;
 }
+
 .people {
   display: flex;
   align-items: center;
 }
-.people > div:nth-child(2) {
+
+.people>div:nth-child(2) {
   margin-left: 10px;
 }
+
 .now_study {
   width: 100%;
   height: 40px;
@@ -654,9 +621,11 @@ export default {
   font-size: 13px;
   cursor: pointer;
 }
+
 .now_study:hover {
   background: #205cc6;
 }
+
 .main_box {
   width: 100%;
   display: flex;
@@ -665,20 +634,24 @@ export default {
   justify-content: flex-start;
   margin: 0 auto;
 }
+
 .right_bottom_flex {
   width: 219px;
   height: 144px;
   margin: auto 0;
 }
-.right_bottom_flex > img {
+
+.right_bottom_flex>img {
   width: 100%;
   height: 100%;
 }
+
 .body_student {
   margin: 10px auto;
   width: 91.5%;
   height: 100%;
 }
+
 .student_head {
   width: 100%;
   /* height: 30%; */
@@ -697,6 +670,7 @@ export default {
 .student_page {
   margin-top: 10px;
 }
+
 .course_empty {
   width: 100%;
   height: 200px;
@@ -723,15 +697,17 @@ export default {
   width: 100%;
 }
 
-.all_choose > span {
+.all_choose>span {
   min-width: 80px;
   display: block;
   letter-spacing: 14px;
 }
-.all_choose > span:nth-child(1) {
+
+.all_choose>span:nth-child(1) {
   font-weight: bold;
 }
-.all_choose >>> .el-checkbox-group {
+
+.all_choose>>>.el-checkbox-group {
   display: flex;
   flex-direction: row;
   width: 820px;
@@ -741,13 +717,15 @@ export default {
   align-items: center;
   margin-top: 3px;
 }
-.all_choose > .el-checkbox-group >>> .el-checkbox {
+
+.all_choose>.el-checkbox-group>>>.el-checkbox {
   margin-bottom: 10px;
   display: flex;
   flex-direction: row;
   align-items: center;
 }
-.all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label {
+
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
   min-width: 80px;
   overflow: hidden;
   width: 80px;
@@ -755,7 +733,7 @@ export default {
   white-space: nowrap;
 }
 
-.all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label:hover {
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
   width: auto;
 }
 
@@ -780,6 +758,7 @@ export default {
   border-radius: 5px;
   padding-left: 20px;
 }
+
 .reTop {
   padding: 20px 0 0 0;
   border-bottom: 1px solid #eee;
@@ -790,7 +769,8 @@ export default {
   align-items: center;
   justify-content: space-between;
 }
-.reTop > div:nth-child(1) {
+
+.reTop>div:nth-child(1) {
   font-weight: bold;
   width: 40px;
   border-bottom: 1px solid #205cc6;
@@ -798,7 +778,8 @@ export default {
   color: #205cc6;
   font-size: 20px;
 }
-.reTop > div:nth-child(2) {
+
+.reTop>div:nth-child(2) {
   display: flex;
   flex-direction: row;
   align-items: center;
@@ -808,21 +789,26 @@ export default {
   padding: 5px 0;
   margin-bottom: 10px;
 }
+
 .search {
   width: 20px;
   padding: 0 5px;
 }
-.search > img {
+
+.search>img {
   width: 100%;
   height: 100%;
 }
+
 .sInput {
   border: none;
   width: 85%;
 }
+
 .sInput:focus-visible {
   outline: none;
 }
+
 .nameAndLength {
   display: flex;
   flex-direction: row;
@@ -831,15 +817,18 @@ export default {
   justify-content: space-between;
   margin: 5px 0;
 }
+
 .typeN {
   width: 200px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
 }
+
 .isCType {
   color: #6282c2;
 }
+
 .typeCss {
   display: flex;
   flex-direction: row;
@@ -847,11 +836,18 @@ export default {
   justify-content: flex-start;
   align-items: center;
 }
+
 .school {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
-  max-width: 100%;
+  max-width: 50%;
   box-sizing: border-box;
 }
+
+.school_box {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
 </style>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 246 - 481
src/components/study.vue


+ 15 - 4
src/components/studyStudent.vue

@@ -630,6 +630,11 @@
                               src="../assets/icon/thirdToolList/select.png" alt />
                             <div style="margin: 5px 0">选择填空</div>
                           </div>
+                          <div v-if="tooC == 44">
+                            <img @click="addTools(tooC, toolIndex, taskCount)"
+                              src="../assets/icon/thirdToolList/hanClass.png" alt />
+                            <div style="margin: 5px 0">汉字宫</div>
+                          </div>
                         </div>
                       </div>
                     </div>
@@ -4730,6 +4735,8 @@ export default {
         }
         this.isSelect = false;
         this.dialogVisibleSelect = true;
+      } else if (t == 44) {
+        window.parent.postMessage({ tools: "44" }, "*");
       }
     },
     toolsCount(a, t) {
@@ -4838,9 +4845,11 @@ export default {
       window.open(url)
     },
     resize() {
-      var a = document.getElementsByClassName("box_course")[0].offsetHeight;
-      document.getElementsByClassName("vedioList")[0].style.height = a + "px";
-      document.getElementsByClassName("navBox")[0].style.height = a - 40 + "px";
+      if (document.getElementsByClassName("box_course")) {
+        var a = document.getElementsByClassName("box_course")[0].offsetHeight;
+        document.getElementsByClassName("vedioList")[0].style.height = a + "px";
+        document.getElementsByClassName("navBox")[0].style.height = a - 40 + "px"; 
+      }
       this.Stbodywidth = document.getElementsByClassName('student_body').length && document.getElementsByClassName('student_body')[0].offsetWidth
     }
   },
@@ -4863,8 +4872,10 @@ export default {
       }
     }
   },
-  destroyed() {
+  beforeDestroy() {
     window.onresize = null;
+    clearInterval(this.timer)
+    this.timer = null
   },
   computed: {
     contentConvent() {

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels