lex преди 1 година
родител
ревизия
ec7b03f6f3

+ 12 - 4
src/components/TheQrCode/index.tsx

@@ -1,6 +1,6 @@
 import { defineComponent } from 'vue';
 import { AwesomeQR } from 'vue-qr/src/lib/awesome-qr';
-import { px2vw } from '@/utils/index'
+import { px2vw } from '@/utils/index';
 function toBoolean(val: any): boolean {
   if (val === '') return val;
   return val === 'true' || val == '1';
@@ -185,7 +185,7 @@ export default defineComponent({
         backgroundColor: this.backgroundColor,
         backgroundImage: img,
         backgroundDimming: this.backgroundDimming,
-        logoImage: logoImg + '?' + new Date().getTime(),
+        logoImage: logoImg ? logoImg + '?' + new Date().getTime() : undefined,
         logoScale: this.logoScale,
         logoBackgroundColor: this.logoBackgroundColor,
         correctLevel: this.correctLevel,
@@ -206,9 +206,17 @@ export default defineComponent({
   },
   render() {
     return (
-      < >
+      <>
         {this.bindElement && this.imgUrl && (
-          <img style={{ width: px2vw(this.size), height: px2vw(this.size), display: 'inline-block', zIndex: 1000 }} src={this.imgUrl} />
+          <img
+            style={{
+              width: px2vw(this.size),
+              height: px2vw(this.size),
+              display: 'inline-block',
+              zIndex: 1000
+            }}
+            src={this.imgUrl}
+          />
         )}
       </>
     );

+ 2 - 1
src/views/attend-class/index.module.less

@@ -56,10 +56,11 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
-  height: 40px;
+  height: 50px;
   background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
   transition: transform 0.5s;
   box-sizing: border-box;
+  font-size: 18px;
 
   div {
     box-sizing: border-box;

+ 35 - 7
src/views/attend-class/index.tsx

@@ -4,7 +4,8 @@ import {
   reactive,
   onUnmounted,
   ref,
-  Transition
+  Transition,
+  computed
 } from 'vue';
 import styles from './index.module.less';
 import 'plyr/dist/plyr.css';
@@ -125,6 +126,7 @@ export default defineComponent({
             });
           }
         });
+
         data.knowledgePointList = temp;
         data.itemList = data.knowledgePointList.map((m: any) => {
           return {
@@ -163,12 +165,36 @@ export default defineComponent({
       getDetail();
     });
 
+    const onFullScreen = () => {
+      if (data.type === 'preview') {
+        const el: any = document.querySelector('#app');
+
+        if (el.mozRequestFullScreen) {
+          el.mozRequestFullScreen();
+        } else if (el.webkitRequestFullscreen) {
+          el.webkitRequestFullscreen();
+        } else if (el.requestFullScreen) {
+          el.requestFullscreen();
+        }
+      }
+    };
+
     const popupData = reactive({
       open: false,
       activeIndex: 0,
       toolOpen: false // 工具弹窗控制
     });
 
+    const activeName = computed(() => {
+      let name = '';
+      data.knowledgePointList.forEach((item: any, index: number) => {
+        if (popupData.activeIndex === index) {
+          name = item.title;
+        }
+      });
+      return name;
+    });
+
     /**停止所有的播放 */
     const handleStop = () => {
       for (let i = 0; i < data.itemList.length; i++) {
@@ -660,16 +686,17 @@ export default defineComponent({
           </div>
         </div>
 
-        {/* <div
+        <div
           style={{ transform: activeData.model ? '' : 'translateY(-100%)' }}
           class={styles.headerContainer}
-          ref={headeRef}>
-          <div class={styles.backBtn} onClick={() => goback()}>
+          // ref={headeRef}
+        >
+          {/* <div class={styles.backBtn} onClick={() => goback()}>
             <Icon name={iconBack} />
             返回
-          </div>
-          <div class={styles.menu}>{popupData.itemName}</div>
-        </div> */}
+          </div> */}
+          <div class={styles.menu}>{activeName.value}</div>
+        </div>
         {/* 布置作业按钮 */}
         <div
           id="attent-3"
@@ -680,6 +707,7 @@ export default defineComponent({
           onClick={async () => {
             if (data.type === 'preview') {
               window.close();
+              // onFullScreen();
             } else {
               const res = await lessonPreTrainingPage({
                 coursewareKnowledgeDetailId: data.detailId,

BIN
src/views/prepare-lessons/components/directory-main/images/icon-d-active.png


BIN
src/views/prepare-lessons/components/directory-main/images/icon-d.png


+ 22 - 2
src/views/prepare-lessons/components/directory-main/index.module.less

@@ -68,10 +68,26 @@
     text-overflow: ellipsis;
     max-width: 280px !important;
     color: rgba(0, 0, 0, .5);
+    display: flex;
+    align-items: center;
+
+    .dir {
+      display: inline-block;
+      width: 16px;
+      height: 18px;
+      background: url('./images/icon-d.png') no-repeat center;
+      background-size: contain;
+      margin-right: 6px;
+    }
 
     &.titleSelect {
       color: var(--n-color);
       font-weight: bold;
+
+      .dir {
+        background: url('./images/icon-d-active.png') no-repeat center;
+        background-size: contain;
+      }
     }
   }
 
@@ -92,8 +108,12 @@
     width: 12px;
   }
 
-  &.childItem .title {
-    color: #131415;
+  &.childItem {
+    padding-left: 30px;
+
+    .title {
+      color: #131415;
+    }
   }
 
   &.childSelect {

+ 6 - 1
src/views/prepare-lessons/components/directory-main/index.tsx

@@ -101,7 +101,7 @@ export default defineComponent({
       <div class={styles.directoryList}>
         {forms.showSelectBookStatus && (
           <div
-          id='lessons-0'
+            id="lessons-0"
             class={styles['select-directory']}
             onClick={() => (forms.coursewareStatus = true)}>
             <span
@@ -171,6 +171,11 @@ export default defineComponent({
                         styles.title,
                         item.selected ? styles.titleSelect : ''
                       ]}>
+                      <span
+                        class={[
+                          styles.dir,
+                          item.selected ? styles.dirSelect : ''
+                        ]}></span>
                       {item.name}
                     </p>
                   </div>

+ 1 - 1
src/views/prepare-lessons/components/lesson-main/courseware/index.module.less

@@ -77,7 +77,7 @@
   display: flex;
   flex-flow: row wrap;
   justify-content: flex-start;
-  gap: 20px;
+  gap: 25px;
 }
 
 .attendClassModal {

+ 2 - 2
src/views/prepare-lessons/components/lesson-main/courseware/index.tsx

@@ -273,7 +273,7 @@ export default defineComponent({
               预览
             </NButton>
             <NButton
-            {...{ id: 'lessons-3' }}
+              {...{ id: 'lessons-3' }}
               type="primary"
               onClick={() => {
                 let count = 0;
@@ -293,7 +293,7 @@ export default defineComponent({
           </NSpace>
         </div>
 
-        <NScrollbar class={styles.listContainer}{...{id:'lessons-2'}} >
+        <NScrollbar class={styles.listContainer} {...{ id: 'lessons-2' }}>
           <NSpin show={forms.loadingStatus}>
             <div
               class={[

+ 7 - 7
src/views/prepare-lessons/components/resource-main/index.tsx

@@ -14,7 +14,7 @@ export default defineComponent({
   setup() {
     const prepareStore = usePrepareStore();
     const forms = reactive({
-      tabType: 'shareResources',
+      tabType: 'myResources',
       selectMusicStatus: false,
       selectResourceStatus: false,
       editStatus: false,
@@ -88,18 +88,18 @@ export default defineComponent({
               default: () => (
                 <>
                   <NTabPane
-                    name="shareResources"
-                    tab="共享资源"
-                    displayDirective="show:lazy">
-                    <ResourceItem type="shareResources" />
-                  </NTabPane>
-                  <NTabPane
                     name="myResources"
                     tab="我的资源"
                     displayDirective="show:lazy">
                     <ResourceItem type="myResources" />
                   </NTabPane>
                   <NTabPane
+                    name="shareResources"
+                    tab="共享资源"
+                    displayDirective="show:lazy">
+                    <ResourceItem type="shareResources" />
+                  </NTabPane>
+                  <NTabPane
                     name="myCollect"
                     tab="我的收藏"
                     displayDirective="show:lazy">

+ 5 - 6
src/views/prepare-lessons/index.tsx

@@ -7,18 +7,17 @@ import { useResizeObserver } from '@vueuse/core';
 import { onBeforeRouteLeave } from 'vue-router';
 import { usePrepareStore } from '/src/store/modules/prepareLessons';
 import { storeToRefs } from 'pinia';
-import LessonsGuide from '@/custom-plugins/guide-page/lessons-guide'
+import LessonsGuide from '@/custom-plugins/guide-page/lessons-guide';
 export default defineComponent({
   name: 'prepare-lessons',
   setup() {
     const prepareStore = usePrepareStore();
 
-    console.log(prepareStore, 'prepareStore')
-    const { treeList, coursewareList } = storeToRefs(prepareStore)
+    console.log(prepareStore, 'prepareStore');
+    const { treeList, coursewareList } = storeToRefs(prepareStore);
     const showGuide = computed(() => {
-
-      return treeList.value.length > 0 && coursewareList.value.length > 0
-    })
+      return treeList.value.length > 0 && coursewareList.value.length > 0;
+    });
     const directroyRef = ref();
     onMounted(() => {
       useResizeObserver(

+ 0 - 1
src/views/studentList/index.module.less

@@ -11,7 +11,6 @@
 }
 
 .addBtn {
-  margin-bottom: 30px;
   height: 43px;
   background: #198cfe;
   border-radius: 8px;

+ 23 - 16
src/views/studentList/index.tsx

@@ -18,7 +18,7 @@ import { useRoute, useRouter } from 'vue-router';
 import { getStudentList } from './api';
 import { classGroupList } from '@/views/classList/api';
 import AddStudentModel from './modals/addStudentModel';
-import Studentguide from '@/custom-plugins/guide-page/student-guide'
+import Studentguide from '@/custom-plugins/guide-page/student-guide';
 export default defineComponent({
   name: 'student-studentList',
   setup(props, { emit }) {
@@ -43,12 +43,11 @@ export default defineComponent({
       },
       tableList: [] as any,
       classList: [],
-      addStudentVisible: false,
-
+      addStudentVisible: false
     });
     const route = useRoute();
     const router = useRouter();
-    const showGuide = ref(false)
+    const showGuide = ref(false);
     const search = () => {
       state.pagination.page = 1;
       getList();
@@ -83,8 +82,8 @@ export default defineComponent({
         });
         state.tableList = res.data.rows;
         state.pagination.pageTotal = res.data.total;
-        if(state.tableList.length >0){
-          showGuide.value= true;
+        if (state.tableList.length > 0) {
+          showGuide.value = true;
         }
       } catch (e) {
         console.log(e);
@@ -119,7 +118,8 @@ export default defineComponent({
               </>
             );
           }
-        },     {
+        },
+        {
           title: '年级班级',
           key: 'classGroupName'
         },
@@ -134,15 +134,22 @@ export default defineComponent({
         {
           title: '操作',
           key: 'id',
-          render(row: any,index:number) {
+          render(row: any, index: number) {
             return (
               <>
-                {index==0? <NButton {...{id:'student-1'}} text type="primary" onClick={() => gotoDetail(row)}>
-                详情
-              </NButton>: <NButton text type="primary" onClick={() => gotoDetail(row)}>
-                详情
-              </NButton>}
-
+                {index == 0 ? (
+                  <NButton
+                    {...{ id: 'student-1' }}
+                    text
+                    type="primary"
+                    onClick={() => gotoDetail(row)}>
+                    详情
+                  </NButton>
+                ) : (
+                  <NButton text type="primary" onClick={() => gotoDetail(row)}>
+                    详情
+                  </NButton>
+                )}
               </>
             );
           }
@@ -246,7 +253,7 @@ export default defineComponent({
           </NForm>
         </div>
         <NButton
-        {...{id:'student-0'}}
+          {...{ id: 'student-0' }}
           onClick={() => {
             state.addStudentVisible = true;
           }}
@@ -284,7 +291,7 @@ export default defineComponent({
               }}></AddStudentModel>
           </div>
         ) : null}
-          {showGuide.value?<Studentguide></Studentguide>:null}
+        {showGuide.value ? <Studentguide></Studentguide> : null}
       </div>
     );
   }

+ 9 - 4
src/views/studentList/modals/addStudentModel.tsx

@@ -20,7 +20,7 @@ import studentTitle from '../images/studentTitle.png';
 import studentInfo from '../images/strudentCore.png';
 import btnBg from '../images/btnBg.png';
 import html2canvas from 'html2canvas';
-import codewrap from '../images/cordWrap.png'
+import codewrap from '../images/cordWrap.png';
 export default defineComponent({
   props: {
     activeRow: {
@@ -47,7 +47,7 @@ export default defineComponent({
     const foemsRef = ref();
     const url = ref(
       vaildUrl() +
-      `/classroom-app/#/student-register?sId=${userStore.getUserInfo.schoolInfos[0].id}`
+        `/classroom-app/#/student-register?sId=${userStore.getUserInfo.schoolInfos[0].id}`
     );
     const imgs = reactive({
       saveLoading: false,
@@ -125,7 +125,6 @@ export default defineComponent({
           previewDisabled
           src={studentTitle}></NImage>
         <div class={styles.addStudentInfo} id="preview-container">
-
           <NImage
             class={styles.studentInfoBg}
             previewDisabled
@@ -148,7 +147,13 @@ export default defineComponent({
               </p>
               <div class={styles.codewrap}>
                 <img src={codewrap} class={styles.codewrapBg} alt="" />
-                <TheQrCode margin={0} logoSrc={logo} class={styles.codewrapImg} text={url.value} size={119} />
+                <TheQrCode
+                  margin={0}
+                  // logoSrc={logo}
+                  class={styles.codewrapImg}
+                  text={url.value}
+                  size={119}
+                />
               </div>
               <div class={styles.codewrapSubmit}>
                 <NImage previewDisabled src={btnBg}></NImage>

+ 128 - 124
src/views/xiaoku-ai/index.module.less

@@ -1,152 +1,156 @@
 .container {
-    display: flex;
-    flex-direction: column;
-    background: #FFFFFF;
-    border-radius: 20Px;
+  display: flex;
+  flex-direction: column;
+  background: #FFFFFF;
+  border-radius: 20Px;
 }
 
 .tools {
-    padding: 32px 32px 20px 32px;
-    display: flex;
-    align-items: flex-start;
-    flex-shrink: 0;
+  padding: 32px 32px 20px 32px;
+  display: flex;
+  align-items: flex-start;
+  flex-shrink: 0;
+
+  :global {
+    .n-input {
+      margin-left: auto;
+      width: 360px;
+    }
 
-    :global {
-        .n-input {
-            margin-left: auto;
-            width: 360px;
-        }
-
-        .n-button.n-button--disabled {
-            cursor: initial;
-            padding: 0;
-        }
+    .n-button.n-button--disabled {
+      cursor: initial;
+      padding: 0;
     }
+  }
+
+  .tagWrap {
+    flex: 1;
+    margin-right: 20Px;
+  }
 
-    .tagWrap {
-        flex: 1;
-        margin-right: 20Px;
+  .tags {
+    &:first-child {
+      padding-top: 6px;
     }
 
-    .tags {
-        padding: 12px 0;
-
-        :global {
-            .n-button {
-                min-width: 102px;
-                height: 37px;
-                padding: 0 24px;
-                font-size: 18px;
-            }
-        }
+    padding: 12px 0;
+
+    :global {
+      .n-button {
+        min-width: 102px;
+        height: 37px;
+        padding: 0 24px;
+        font-size: 18px;
+      }
     }
+  }
 }
 
 .content {
-    flex: 1;
-    padding: 20Px 36Px 36Px 36Px;
+  flex: 1;
+  padding: 20Px 36Px 36Px 36Px;
 }
 
 .item {
+  position: relative;
+  width: 214Px;
+  cursor: pointer;
+  transition: all .3s;
+
+  .cover {
     position: relative;
-    width: 214Px;
-    cursor: pointer;
-    transition: all .3s;
+    overflow: hidden;
+
+    &::before {
+      content: '';
+      position: absolute;
+      top: 107Px;
+      left: 0;
+      width: 214Px;
+      height: 214Px;
+      background: #DDF2FF;
+      border-radius: 50%;
+    }
+  }
+
+  &:hover {
+    transform: scale(1.1);
+  }
+
+  .itemImg {
+    position: relative;
+    width: 158Px;
+    height: 223Px;
+    margin: auto;
+    background-color: #EDEFF2;
+    background-image: url('./icon_default.svg');
+    background-repeat: no-repeat;
+    background-position: center center;
+
+    &::before {
+      content: '';
+      position: absolute;
+      top: 4Px;
+      right: -4Px;
+      width: 4Px;
+      height: calc(100% - 8Px);
+      background-color: #C5C5C5;
+      z-index: 1;
+
 
-    .cover {
-        position: relative;
-        overflow: hidden;
-
-        &::before {
-            content: '';
-            position: absolute;
-            top: 107Px;
-            left: 0;
-            width: 214Px;
-            height: 214Px;
-            background: #DDF2FF;
-            border-radius: 50%;
-        }
     }
 
-    &:hover {
-        transform: scale(1.1);
+
+    &::after {
+      content: '';
+      position: absolute;
+      top: 2Px;
+      right: -2Px;
+      width: 4Px;
+      height: calc(100% - 4Px);
+      background-color: #E7E7E7;
+      z-index: 2;
     }
 
-    .itemImg {
-        position: relative;
-        width: 158Px;
-        height: 223Px;
-        margin: auto;
-        background-color: #EDEFF2;
-        background-image: url('./icon_default.svg');
-        background-repeat: no-repeat;
-        background-position: center center;
-
-        &::before {
-            content: '';
-            position: absolute;
-            top: 4Px;
-            right: -4Px;
-            width: 4Px;
-            height: calc(100% - 8Px);
-            background-color: #C5C5C5;
-            z-index: 1;
-
-
-        }
-
-
-        &::after {
-            content: '';
-            position: absolute;
-            top: 2Px;
-            right: -2Px;
-            width: 4Px;
-            height: calc(100% - 4Px);
-            background-color: #E7E7E7;
-            z-index: 2;
-        }
-
-        .itemBg {
-            position: absolute;
-            top: 0;
-            left: 0;
-            width: 100%;
-            height: 100%;
-            z-index: 4;
-            background-repeat: no-repeat;
-            background-image: linear-gradient(to right, rgba(0, 0, 0, 0.2) 0, rgba(255, 255, 255, 0.08) 0%, transparent 0.5%), linear-gradient(to right, rgba(0, 0, 0, 0.1) 0.3%, rgba(255, 255, 255, 0.09) 1.1%, transparent 1.3%);
-            background-size: 50% 100%, 50% 100%;
-            background-position: 0% top, 9% top;
-        }
-
-        :global {
-            .n-image {
-                position: relative;
-                width: 100%;
-                height: 100%;
-                z-index: 3;
-            }
-        }
-
-        img {
-            transition: opacity .3s;
-            opacity: 0;
-        }
-
-        img[data-loaded="true"] {
-            opacity: 1;
-        }
+    .itemBg {
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+      z-index: 4;
+      background-repeat: no-repeat;
+      background-image: linear-gradient(to right, rgba(0, 0, 0, 0.2) 0, rgba(255, 255, 255, 0.08) 0%, transparent 0.5%), linear-gradient(to right, rgba(0, 0, 0, 0.1) 0.3%, rgba(255, 255, 255, 0.09) 1.1%, transparent 1.3%);
+      background-size: 50% 100%, 50% 100%;
+      background-position: 0% top, 9% top;
+    }
 
+    :global {
+      .n-image {
+        position: relative;
+        width: 100%;
+        height: 100%;
+        z-index: 3;
+      }
+    }
 
+    img {
+      transition: opacity .3s;
+      opacity: 0;
     }
 
-    .itemName {
-        margin-top: 16Px;
-        font-size: 16Px;
-        font-weight: 500;
-        color: #333;
-        text-align: center;
+    img[data-loaded="true"] {
+      opacity: 1;
     }
+
+
+  }
+
+  .itemName {
+    margin-top: 16Px;
+    font-size: 16Px;
+    font-weight: 500;
+    color: #333;
+    text-align: center;
+  }
 }

+ 1 - 1
src/views/xiaoku-ai/index.tsx

@@ -113,7 +113,7 @@ export default defineComponent({
             <div class={styles.tags}>
               <NSpace size={[24, 12]}>
                 <NButton quaternary disabled>
-                  {data.tags[0]?.columnName}
+                  类型
                 </NButton>
 
                 {data.tags.map((item: any, index: number) => {

+ 1 - 0
src/views/xiaoku-music/index.module.less

@@ -86,6 +86,7 @@
   overflow-x: hidden;
   overflow-y: auto;
   min-width: 330Px;
+  // max-height: 100vh;
 
   &::-webkit-scrollbar {
     width: 0;