litian
2024-11-22 020d40734a2062300d8b1651a1688fc987590c0a
src/views/readerPages/webHome.vue
@@ -6,8 +6,15 @@
      <span></span>
      <div class="userInfoBox">
        <div class="userName" v-if="userInfo.name">{{ userInfo.name }}</div>
        <div v-if="token"><div class="layout hover" @click="layoutBtn">退出</div></div>
        <div v-else><div class="layout hover" @click="goLogin">登录</div></div>
        <div v-if="token">
          <div class="layout hover" @click="layoutBtn">退出</div>
        </div>
        <div v-else>
          <div class="layout hover" @click="goLogin">登录</div>
        </div>
        <!-- <div>
          <div class="layout hover" @click="openFormulaDialog">公式</div>
        </div> -->
      </div>
    </div>
    <div class="contentBox">
@@ -196,9 +203,12 @@
                    @click="searchClose(index)"
                    v-if="searchReaultData.isShow && searchReaultData.openIndex == index"
                    class="hover"
                    ><ArrowDown
                  /></el-icon>
                  <el-icon @click="searchOpen(index)" v-else class="hover"><ArrowRight /></el-icon>
                  >
                    <ArrowDown />
                  </el-icon>
                  <el-icon @click="searchOpen(index)" v-else class="hover">
                    <ArrowRight />
                  </el-icon>
                  <span>{{ reault.chapterName }} ({{ reault.itemList.length }})</span>
                </div>
                <div
@@ -249,9 +259,12 @@
                    @click="noteClose(index)"
                    v-if="scribeData.isShow && scribeData.openIndex == index"
                    class="hover"
                    ><ArrowDown
                  /></el-icon>
                  <el-icon @click="noteOpen(index)" v-else class="hover"><ArrowRight /></el-icon>
                  >
                    <ArrowDown />
                  </el-icon>
                  <el-icon @click="noteOpen(index)" v-else class="hover">
                    <ArrowRight />
                  </el-icon>
                  <span>{{ noteItem.chapterName }}</span>
                </div>
                <div
@@ -363,71 +376,102 @@
                        v-else-if="item.icon && activeClassify != 'image'"
                      />
                      <!-- <el-icon v-else-if="activeClassify == 'image'" size="30"></el-icon> -->
                      <el-icon v-else-if="activeClassify == 'audio'" size="30"><Headset /></el-icon>
                      <el-icon v-else-if="activeClassify == 'video'" size="30"
                      <!-- <el-icon v-else-if="activeClassify == 'audio'" size="30"><Headset /></el-icon> -->
                      <!-- <el-icon v-else-if="activeClassify == 'video'" size="30"
                        ><VideoCamera
                      /></el-icon>
                      <el-icon v-else-if="activeClassify == 'other'" size="30"><Files /></el-icon>
                      <el-icon v-else-if="activeClassify == 'exercises'" size="30"
                        ><Tickets
                      /></el-icon>
                      /></el-icon> -->
                      <!-- <el-icon v-else-if="activeClassify == 'other'" size="30"><Files /></el-icon> -->
                      <img
                        src="@/assets/images/resource/yp-mr.png"
                        v-else-if="activeClassify == 'audio'"
                      />
                      <img
                        src="@/assets/images/resource/sp-mr.png"
                        v-else-if="activeClassify == 'video'"
                      />
                      <img
                        src="@/assets/images/resource/qt-mr.png"
                        v-else-if="activeClassify == 'other'"
                      />
                      <div class="handleBox" v-if="showHandle == index">
                        <div class="delImg">
                          <el-icon
                            class="icon hover"
                            size="20"
                            @click="JumpPosition(item)"
                            v-if="resourceType == 'default'"
                            ><LocationInformation
                          /></el-icon>
                            v-if="item.pagination"
                          >
                            <LocationInformation />
                          </el-icon>
                          <el-icon
                            @click="goPlay(item)"
                            size="20"
                            class="icon hover"
                            v-if="item.resourceType == '视频'"
                            ><VideoPlay
                          /></el-icon>
                          >
                            <VideoPlay />
                          </el-icon>
                          <el-icon
                            @click="goPlay(item, index)"
                            size="20"
                            class="icon hover"
                            v-if="item.resourceType == '音频' && playIndex != index"
                            ><VideoPlay
                          /></el-icon>
                          >
                            <VideoPlay />
                          </el-icon>
                          <el-icon
                            @click="goPause()"
                            size="20"
                            class="icon hover"
                            v-if="item.resourceType == '音频' && playIndex == index"
                            ><VideoPause
                          /></el-icon>
                          >
                            <VideoPause />
                          </el-icon>
                          <el-icon
                            @click="getCapture(item, index)"
                            size="20"
                            class="icon hover"
                            v-if="item.resourceType == '图片'"
                            ><View
                          /></el-icon>
                          >
                            <View />
                          </el-icon>
                          <!-- 其他类型预览或直接下载 -->
                          <el-icon
                            @click="goPlay(item)"
                            size="20"
                            class="icon hover"
                            v-if="item.resourceType != '视频' && item.resourceType != '音频' && item.resourceType != '图片'"
                          >
                            <View />
                          </el-icon>
                          <el-icon
                            size="20"
                            class="icon hover"
                            @click="goPlay(item)"
                            v-if="
                              !(
                                item.resourceType == '视频' ||
                                item.resourceType == '音频' ||
                                item.resourceType == '习题' ||
                                item.resourceType == '图片'
                              ) && item.isDownload == '是'
                            "
                            ><Download
                          /></el-icon>
                            @click="goDownload(item)"
                            v-if="item.isDownload == '是'"
                          >
                            <Download />
                          </el-icon>
                          <!-- 收藏按钮 -->
                           <img
                            :src="collectResourceList.findIndex(citem => citem.id == item.id) > -1 ? isHeart : heart  "
                            class="icon hover"
                            style="width: 15px;"
                            @click="handleCollectResource(item.id,item.md5 ? item.md5 : '',item.resourcePath ? item.resourcePath : '',item.resourceType,item.resourceType == '视频' || '音频' ? 'bits' : 'json',item.resourceName)" />
                          <img
                            :src="
                              collectResourceList.findIndex((citem) => citem.id == item.id) > -1
                                ? isHeart
                                : heart
                            "
                            class="icon hover"
                            style="width: 15px"
                            @click="
                              handleCollectResource(
                                item.id,
                                item.md5 ? item.md5 : '',
                                item.resourcePath ? item.resourcePath : '',
                                item.resourceType,
                                item.resourceType == '视频' || '音频' ? 'bits' : 'json',
                                item.resourceName
                              )
                            "
                          />
                        </div>
                      </div>
                    </div>
@@ -458,9 +502,9 @@
                  <img :src="item.imgUrl" class="capture hover" mode="aspectFill" />
                  <div class="deleteBox" v-if="showDelete == index">
                    <div class="delImg">
                      <el-icon @click="getCapture(item, index)" size="18" class="icon hover"
                        ><View
                      /></el-icon>
                      <el-icon @click="getCapture(item, index)" size="18" class="icon hover">
                        <View />
                      </el-icon>
                      <img :src="bianji" class="icon hover" @click="updateScreenshot(item)" />
                      <img :src="shanchu" class="icon hover" @click="deleteScreenshot(item)" />
                    </div>
@@ -537,9 +581,9 @@
        </div>
        <!-- 题库底部收藏夹和错题集 -->
        <ul class="question-bottom" v-if="activeMenu == '题库'">
            <li @click="selectExercisesType('collection')">收藏夹</li>
            <li @click="selectExercisesType('wrong')">错题本</li>
          </ul>
          <li @click="selectExercisesType('collection')">收藏夹</li>
          <li @click="selectExercisesType('wrong')">错题本</li>
        </ul>
        <!-- 菜单内容收起 -->
        <div class="menuStateBox" v-if="menuState.open">
          <svg
@@ -815,6 +859,10 @@
            </div>
          </div>
        </div>
        <!-- 语音阅读组件 -->
        <!-- <div class="voice-reader">
          <voiceReader />
         </div> -->
      </div>
      <!-- 教学组件 -->
      <div class="toolBox">
@@ -1104,9 +1152,17 @@
      <video controls controlslist="nodownload" :src="testVideo"></video>
    </div>
    <!-- <div class="wordBox" v-if="resourType == 'word'">
      <vue-office-docx :src="testWord" />
    </div> -->
    <div class="wordBox" v-if="resourType == 'PDF' || resourType == 'PPT' || resourType == 'WORD'">
          <div
            v-for="(item, index) in showData"
            :key="index"
            class="pdfItem"
            :page="index + 1"
          >
            <img :src="item.showSrc" alt="" style="min-height: 550px" loading="lazy" />
            <el-divider content-position="center"> 第 {{ index + 1 }} 页 </el-divider>
          </div>
        </div>
  </el-dialog>
  <div class="audioBox" v-show="false">
    <!-- <video controls controlslist="nodownload" :src="testVideo"></video> -->
@@ -1215,7 +1271,12 @@
  </el-dialog>
  <el-dialog title="模型工具" align-center v-model="modelToolVisble" width="80%" class="myDialogs">
    <div class="wendabox">
      <iframe src="https://adjam93.github.io/threejs-model-viewer/#" frameborder="0"></iframe>
      <iframe :src="sceneUrl" frameborder="0"></iframe>
    </div>
  </el-dialog>
  <el-dialog title="模型工具" align-center v-model="modelTool" width="80%" class="myDialogs">
    <div class="wendabox">
      <iframe src='https://adjam93.github.io/threejs-model-viewer/#' frameborder="0"></iframe>
    </div>
  </el-dialog>
  <el-dialog title="生词卡片" align-center v-model="shengciVisble" width="800" class="myDialogs">
@@ -1234,6 +1295,16 @@
      <wrongQuestion />
    </div>
  </el-dialog>
  <el-dialog
    title="公式编辑"
    align-center
    v-model="formulaDialog"
    class="myDialogs"
  >
    <div class="wendabox">
      <formula />
    </div>
  </el-dialog>
  <!-- 答题器 -->
  <examination
    ref="examinationRef"
@@ -1242,19 +1313,21 @@
    :type="examinationData.type"
    :infoType="examinationData.infoType"
  />
  <!-- 计算器 -->
  <el-dialog title="计算器" align-center v-model="calculatorVisble" width="850" class="myDialogs">
    <!-- <calculatorNew></calculatorNew> -->
    <iframe src="https://www.geogebra.org/scientific" frameborder="0" class="iframe-box"></iframe>
  </el-dialog>
</template>
<script setup lang="ts">
import heart from '@/assets/images/examination/collectIcon.png'
import isHeart from '@/assets/images/examination/collectClickIcon.png'
import examination from '@/views/examination/index.vue'
import { ref, reactive, watch, onMounted, onBeforeMount, onBeforeUnmount, inject } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { ElMessage, ElMessageBox, valueEquals } from 'element-plus'
import useClipboard from 'vue-clipboard3'
import examination from '../examination/index.vue'
const { toClipboard } = useClipboard()
const MG: any = inject('MG')
const toolClass = inject('toolClass')
const qiankunActions = inject('qiankunActions')
//获取路由器
let router = useRouter()
//获取当前路由的信息
@@ -1262,8 +1335,9 @@
import moment from 'moment'
import dictionary from '@/views/components/dictionary.vue'
import newWord from '@/views/components/newWord.vue'
import formula from '@/views/components/formula.vue'
import wrongQuestion from '@/views/components/wrongQuestion.vue'
import { ElMessage, ElMessageBox, valueEquals } from 'element-plus'
import voiceReader from '@/views/components/voiceReader.vue'
import logo from '@/assets/images/header/logo.png'
import mulu from '@/assets/images/menu/mulu.png'
import biji from '@/assets/images/menu/biji.png'
@@ -1372,9 +1446,16 @@
const bookConfig = ref({})
const activeCatalog = ref()
const reMarResult = ref()
const bookInfo = ref()
const isBuy = ref(false)
const tryPageCount = ref(0)
const searchText = ref()
onMounted(() => {
  if (token) {
    getUserInfo()
  }
  if (localStorage.getItem('bookId')) {
    getBookInfo()
  }
  setTimeout(() => {
    canvasWith.value = document.querySelector('.content-box').offsetWidth
@@ -1405,13 +1486,16 @@
  window.qiankunActions.onGlobalStateChange((state, prev) => {
    console.log('父层state变化', state)
    window.qiankunState = state
    if (window.qiankunState && window.qiankunState.initTestBook) {
      window.qiankunState.initTestBook(
        localStorage.getItem('bookId') + '',
        localStorage.getItem('tryPageCount')
      )
    if (isBuy.value) {
      if (window.qiankunState && window.qiankunState.initTestBook) {
        window.qiankunState.initTestBook(localStorage.getItem('bookId') + '')
      }
    } else {
      if (window.qiankunState && window.qiankunState.initTestBook) {
        window.qiankunState.initTestBook(localStorage.getItem('bookId') + '', tryPageCount.value)
      }
    }
  })
  // 定义父层方法
@@ -1501,6 +1585,7 @@
  // if (window.qiankunState && window.qiankunState.getAnswers){
  //   window.qiankunState.getAnswers(localStorage.getItem(""))
  // }
})
onBeforeUnmount(() => {
@@ -1522,6 +1607,44 @@
//     }
//   }
// )
//根据refcode获取图书信息
const getBookInfo = () => {
  const obj = {
    storeInfo: 'jsek_digitalTextbooks',
    path: '*',
    queryType: '*',
    coverSize: {
      width: 150
    },
    paging: {
      start: 0,
      size: 6
    },
    filterList: [
      {
        value: 'Normal',
        field: 'state'
      }
    ],
    fields: {
      author: [],
      RefCodes: [localStorage.getItem('bookId')],
      probationPage: []
    }
  }
  MG.store.getProductList(obj).then((res) => {
    console.log(res.datas, '图书信息')
    bookInfo.value = res.datas[0]
    if (res.datas[0].purchasedSaleMethodIdList.includes(res.datas[0].defaultSaleMethodId)) {
      isBuy.value = true
    } else {
      isBuy.value = false
    }
    tryPageCount.value = Number(res.datas[0].probationPage)
  })
}
const getUserInfo = () => {
  MG.identity.getCurrentAppUser().then((res) => {
@@ -1691,6 +1814,7 @@
      icon: huabi,
      name: '画笔',
      isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1
      // isShow: true
    },
    {
      icon: baiban,
@@ -1772,10 +1896,20 @@
      catalogueData.value = json.data
      headerData.totlePage = json.data[json.data.length - 1].end
      listLoading.value = false
      if (localStorage.getItem('chapter') && localStorage.getItem('startPage')) {
        let chapter = Number(localStorage.getItem('chapter'))
        let start = Number(localStorage.getItem('startPage'))
        if (window.qiankunState && window.qiankunState.gotoPage) {
          window.qiankunState.gotoPage(chapter,start)
          localStorage.removeItem('chapter')
          localStorage.removeItem('startPage')
        }
      }
    })
    .catch(function (error) {
      listLoading.value = false
      console.log(error)
    })
}
const defaultProps = {
@@ -1790,9 +1924,8 @@
}
const handleNodeClick = (data) => {
  console.log(data)
  if (localStorage.getItem('tryPageCount')) {
    if (data.start < localStorage.getItem('tryPageCount')) {
  if (!isBuy.value) {
    if (data.start < tryPageCount.value) {
      headerData.process = data.start
      if (window.qiankunState && window.qiankunState.gotoPage)
        window.qiankunState.gotoPage(data.chapter, data.start)
@@ -1930,6 +2063,11 @@
                if (resItem1.resourceType == classifySelectList.value[0].title) {
                  resourceDataList.value.push(resItem1)
                }
                if(activeClassify.value == 'other'){
                  if (resItem1.resourceType != '图片' && resItem1.resourceType != '视频' && resItem1.resourceType != '音频') {
                    resourceDataList.value.push(resItem1)
                  }
                }
              })
            }
          } else {
@@ -2004,6 +2142,11 @@
                if (resItem1.resourceType == classifySelectList.value[0].title) {
                  resourceDataList.value.push(resItem1)
                }
                if(activeClassify.value == 'other'){
                  if (resItem1.resourceType != '图片' && resItem1.resourceType != '视频' && resItem1.resourceType != '音频') {
                    resourceDataList.value.push(resItem1)
                  }
                }
              })
            }
          }
@@ -2036,7 +2179,10 @@
  }
}
//资源播放视频
const sceneUrl = ref()
const showData = ref()
const goPlay = (data, index) => {
  console.log(data.resourceType,123)
  resourType.value = data.resourceType
  if (data.resourceType == '视频') {
    if (data.md5) {
@@ -2053,7 +2199,54 @@
      testAudio.value = bookConfig.value.resourceUrl + '/' + data.resourcePath
    }
    autoPlay()
  } else {
  } else if (data.resourceType == '模型') {
    console.log(data,222)
    let file = bookConfig.value.requestCtx + '/file/api/ApiDownload?md5=' + data.md5
    console.log(file.exd,777)
    const ctx = 'https://jsek.bnuic.com'
    if (data.md5) {
      sceneUrl.value = 'https://jsek.bnuic.com/books/book/civilAviation/static/modelView/index.html?md5=' + data.md5 + '&name=je' + '&domain=' + ctx + '&exd=obj' + '&target=iframe'
    } else {
      sceneUrl.value = bookConfig.value.resourceUrl + '/' + data.resourcePath
    }
    modelToolVisble.value = true
    // if (data.md5) {
    //   window.open(bookConfig.value.requestCtx + '/file/api/ApiDownload?md5=' + data.md5)
    // } else if (data.resourcePath) {
    //   window.open(bookConfig.value.resourceUrl + '/' + data.resourcePath)
    // }
  }else if(data.resourceType == 'PPT' || data.resourceType == 'PDF'){
    let md5 = data.md5
    let dataList = []
      MG.file
        .getPdfInfo({
          md5
        })
        .then((res: any) => {
          console.log()
          if (res && res.totalPages) {
            for (let i = 0; i < res.totalPages; i++) {
              const src =
              bookConfig.value.requestCtx +
                '/file/GetPdfPageImage?md5=' +
                md5 +
                '&index=' +
                (i + 1) +
                '&dpi=300'
              dataList.push({
                showSrc: src
              })
            }
            console.log(dataList)
            showData.value = dataList
            // 启动页码观察
            setTimeout(() => {
              resourVisble.value = true
            }, 500)
          }
        })
  }else {
    if (data.md5) {
      window.open(bookConfig.value.requestCtx + '/file/api/ApiDownload?md5=' + data.md5)
    } else if (data.resourcePath) {
@@ -2064,6 +2257,13 @@
  //  else if (data.resourceType == 'word') {
  //   testWord.value = bookConfig.value.resourceUrl + '/' + data.resourcePath
  // }
}
const goDownload =(data) =>{
  if (data.md5) {
    window.open(bookConfig.value.requestCtx + '/file/api/ApiDownload?md5=' + data.md5)
  } else if (data.resourcePath) {
    window.open(bookConfig.value.resourceUrl + '/' + data.resourcePath)
  }
}
// 关闭视频
const resourVisbleClose = () => {
@@ -2091,6 +2291,9 @@
//资源类型选择默认/教师
const selectResourceType = (type) => {
  resourceType.value = type
  resourceDataList.value = []
  classifySelectList.value = []
  activeClassify.value = ''
  searchText.value = ''
  if (type == 'collect') {
    getCollectResource()
@@ -2103,12 +2306,11 @@
  activeClassify.value = item.key
  resourceDataList.value = []
  searchText.value = ''
  if(resourceType.value == 'collect') {
  if (resourceType.value == 'collect') {
    getCollectResource()
  } else {
    getResourceData()
  }
}
const searchBtn = () => {
  if (searchShow.value) {
@@ -2120,17 +2322,17 @@
// 获取收藏的资源
const getCollectResource = () => {
  if(token) {
  if (token) {
    MG.identity
    .getUserKey({
      domain: 'collectResource',
      keys: [bookConfig.value.bookId]
    })
    .then((res) => {
      if (res.length) {
        collectResourceList.value = JSON.parse(res[0].value)
        console.log('收藏资源列表', collectResourceList.value)
        if(collectResourceList.value.length > 0) {
      .getUserKey({
        domain: 'collectResource',
        keys: [bookConfig.value.bookId]
      })
      .then((res) => {
        if (res.length) {
          collectResourceList.value = JSON.parse(res[0].value)
          console.log('收藏资源列表', collectResourceList.value)
          if (collectResourceList.value.length > 0) {
            let imgCount = 0
            let audioCount = 0
            let videoCount = 0
@@ -2203,13 +2405,18 @@
                if (resItem1.resourceType == classifySelectList.value[0].title) {
                  resourceDataList.value.push(resItem1)
                }
                if(activeClassify.value == 'other'){
                  if (resItem1.resourceType != '图片' && resItem1.resourceType != '视频' && resItem1.resourceType != '音频') {
                    resourceDataList.value.push(resItem1)
                  }
                }
              })
            }
          }
        } else {
          resourceDataList.value = []
        }
      } else {
        resourceDataList.value = []
      }
    })
      })
  } else {
    ElMessageBox.confirm('请先登录!', {
      confirmButtonText: '去登录',
@@ -2230,27 +2437,27 @@
  }
}
// 收藏按钮
const handleCollectResource = (id,md5,resourcePath,resourceType,source,resourceName) => {
    if(collectResourceList.value.findIndex(item => item.id == id) > -1) {
      collectResourceList.value = collectResourceList.value.filter(item => item.id != id)
    } else {
      collectResourceList.value.push({
        id,
        md5,
        resourcePath:resourcePath.replace(bookConfig.value.resourceUrl + '/',''),
        resourceType,
        source,
        resourceName
      })
    }
    MG.identity.setUserKey({
const handleCollectResource = (id, md5, resourcePath, resourceType, source, resourceName) => {
  if (collectResourceList.value.findIndex((item) => item.id == id) > -1) {
    collectResourceList.value = collectResourceList.value.filter((item) => item.id != id)
  } else {
    collectResourceList.value.push({
      id,
      md5,
      resourcePath: resourcePath.replace(bookConfig.value.resourceUrl + '/', ''),
      resourceType,
      source,
      resourceName
    })
  }
  MG.identity.setUserKey({
    setKeyRequests: [
      {
        domain: "collectResource",
        key:bookConfig.value.bookId,
        value: JSON.stringify(collectResourceList.value),
      },
    ],
        domain: 'collectResource',
        key: bookConfig.value.bookId,
        value: JSON.stringify(collectResourceList.value)
      }
    ]
  })
}
@@ -2347,15 +2554,14 @@
//错题本
const wrongQuestionVisble = ref(false)
const selectExercisesType = (type) => {
  if (type == 'exercises') {
    getExercisesList()
      exercisesType.value = type
      searchText.value = ''
    exercisesType.value = type
    searchText.value = ''
  } else if (type == 'additional') {
    getAdditionalList()
      exercisesType.value = type
      searchText.value = ''
    exercisesType.value = type
    searchText.value = ''
  } else if (type == 'wrong') {
    openExaminationDialog(true, {}, 'errorQuestion')
  } else {
@@ -2436,7 +2642,6 @@
  // }
}
const searchText = ref<string>('') //筛选
const menuState = reactive({
  open: true,
  notesColor: 'all' //笔记颜色
@@ -2697,7 +2902,9 @@
const functionVisible = ref(false)
const siweiVisble = ref(false)
const modelToolVisble = ref(false)
const modelTool = ref(false)
const shengciVisble = ref(false)
const calculatorVisble = ref(false)
const activeTool = ref(0)
const toolState = reactive({
  open: true
@@ -2718,7 +2925,7 @@
        siweiVisble.value = true
        break
      case '模型工具':
        modelToolVisble.value = true
      modelTool.value = true
        break
      case '词典':
        cidianVisible.value = true
@@ -2726,6 +2933,10 @@
      case '生词卡片':
        resourceUrl.value = bookConfig.value.resourceUrl
        shengciVisble.value = true
        break
      case '计算器':
        calculatorVisble.value = true
        break
    }
  } else {
    ElMessageBox.confirm('请先登录!', {
@@ -2803,7 +3014,6 @@
//浮窗工具栏点击事件
const floatItemHandle = (item) => {
  console.log(floatingToolData.activeToolData, 'floatingToolData.activeToolData')
  if (floatingToolData.activeToolData == '画笔') {
    floatingToolData.activeToolData = ''
  } else {
@@ -3040,7 +3250,6 @@
//跳转
const goReMark = (item) => {
  console.log(item)
  if (window.qiankunState && window.qiankunState.gotoPage) {
    window.qiankunState.gotoPage(Number(item.chapterNum), Number(item.page))
  }
@@ -3125,7 +3334,6 @@
}
//取消回调
const closeFn = (base64: any) => {
  console.log(base64)
  floatingToolData.activeToolData = ''
}
//保存截图
@@ -3372,7 +3580,6 @@
        window.speechSynthesis.cancel()
        const synth = window.speechSynthesis
        const utterance = new SpeechSynthesisUtterance(dialogToolData.txt)
        console.log(utterance, 1)
        utterance.lang = 'zh-CN' // 设置语言为中文
        synth.speak(utterance)
        showToolBox.value = false
@@ -3409,10 +3616,8 @@
        showToolBox.value = false
        // cidianVisible.value = true
        console.log(dialogToolData.txt)
        break
      case '百科':
        console.log('https://baike.baidu.com/item/' + dialogToolData.txt)
        baiduVisible.value = true
        break
    }
@@ -3653,7 +3858,6 @@
            const item = res[i]
            // 储值
            let data = catalogueData.value.find((item1) => item1.chapter == Number(item.key))
            // console.log(data,'666')
            let dataList = []
            if (catalogueData.value.length > 0) {
              catalogueData.value.forEach((item1) => {
@@ -3695,7 +3899,6 @@
              })
            }
          }
          console.log(scribeData.noteList, 'scribeData.noteList')
        }
        listLoading.value = false
      })
@@ -3769,13 +3972,11 @@
  document.addEventListener('mousemove', function (event) {
    var x = event.offsetX
    var y = event.offsetY
    // console.log('鼠标坐标位置:', x, y)
    noteContent.top = event.clientY + 20
    noteContent.left = event.clientX
  })
}
window.noteOut = (type) => {
  console.log(type, 123)
  noteContent.show = false
}
@@ -3825,7 +4026,6 @@
//笔记跳转
const jumpContent = (item) => {
  console.log(item)
  if (window.qiankunState && window.qiankunState.gotoPage) {
    window.qiankunState.gotoPage(Number(item.chapterNum), Number(item.page))
  }
@@ -3833,7 +4033,6 @@
//菜单笔记编辑
const update = (item) => {
  console.log(item)
  dialogToolData.chapter = item.chapterNum
  noteColorActive.value = item.color
  formData.id = item.id
@@ -3916,13 +4115,11 @@
        }
      ])
      .then((res) => {
        console.log(res[0][0], 'cid')
        if (res.length > 0 && res[0].length > 0) {
          res[0].map((item) => {
            item.trans = JSON.parse(item.trans)
          })
          dictionaryData.data = res[0][0]
          console.log(dictionaryData.data, '14')
          dictionaryData.showContent = true
        }
      })
@@ -4013,6 +4210,11 @@
    })
  }
}
const formulaDialog = ref(false)
const openFormulaDialog = () => {
  formulaDialog.value = true
}
</script>
<style lang="less">
@@ -4034,15 +4236,18 @@
    display: flex;
    justify-content: space-between;
    align-items: center;
    .logoTxt {
      font-size: 24px;
      color: #333;
      letter-spacing: 2px;
      font-weight: bold;
    }
    .userInfoBox {
      display: flex;
      align-items: center;
      .userName {
        font-size: 18px;
        margin-right: 15px;
@@ -4050,6 +4255,7 @@
        border-right: 1px solid #e0e0e0;
        color: #2c2c2c;
      }
      .layout {
        width: 69px;
        height: 30px;
@@ -4061,11 +4267,13 @@
      }
    }
  }
  .contentBox {
    overflow: hidden;
    flex: 1;
    display: flex;
    position: relative;
    .menuBox {
      width: 80px;
      flex-shrink: 0;
@@ -4088,30 +4296,36 @@
        width: 63px;
        margin: 10px auto;
        border-radius: 10px;
        &.active,
        &:hover {
          background-color: rgba(0, 147, 255, 0.1);
          p {
            color: #0093ff;
          }
        }
        .menuIcon {
          display: inline-block;
          width: 32px;
          height: 32px;
        }
        .name {
          text-align: center;
          line-height: 1;
          color: #2c3e50;
        }
      }
      .reload {
        width: 80px;
        position: absolute;
        bottom: 100px;
        text-align: center;
      }
      .setting {
        width: 80px;
        position: absolute;
@@ -4119,6 +4333,7 @@
        text-align: center;
      }
    }
    .menuContent {
      // position: relative;
      width: 300px;
@@ -4129,6 +4344,7 @@
      -moz-user-select: none;
      -khtml-user-select: none;
      user-select: none;
      .searchBox {
        width: 100%;
        height: 60px;
@@ -4138,22 +4354,27 @@
        align-items: center;
        border-bottom: 1px solid #efefef;
      }
      .resourceSearchBox {
        padding: 10px 0;
        margin: 0 20px;
        border-bottom: 1px solid rgba(204, 204, 204, 0.32);
        .classification {
          width: 100%;
          display: flex;
          justify-content: space-between;
          align-items: center;
          .flex1 {
            flex: 1;
            text-align: center;
          }
          .title {
            color: #999999;
          }
          .count {
            width: 35px;
            margin: 0 auto;
@@ -4164,16 +4385,19 @@
            height: 18px;
            font-size: 12px;
          }
          .activeClassify,
          .classifyItem:hover {
            .title {
              color: #0093ff;
            }
            .count {
              background: #0093ff;
              color: #fff;
            }
          }
          .showSearch {
            .imgBox {
              width: 39px;
@@ -4181,17 +4405,20 @@
              border-radius: 16px;
              margin: 0 auto;
            }
            .imgBox:hover,
            .activeSearch {
              border: 1px solid #0093ff;
            }
          }
        }
        .inputBox {
          margin-top: 10px;
          width: 100% !important;
        }
      }
      .resourceTab {
        width: 100%;
        height: 60px;
@@ -4199,18 +4426,22 @@
        justify-content: center;
        align-items: center;
        font-size: 16px;
        .hr {
          height: 25px;
          color: #dbdbdb !important;
        }
        .tabItem:first-child(1) {
          border-right: 1px solid #707070;
        }
        .tabItem {
          flex: 1;
          text-align: center;
          line-height: 57px;
        }
        .text {
          width: 43px;
          height: 3px;
@@ -4218,12 +4449,15 @@
          background: #0093ff;
          border-radius: 3px 3px 0px 0px;
        }
        .line {
          height: 3px;
        }
      }
      .inputBox {
        width: 85%;
        .custom-input {
          border: 1px solid #0093ff !important;
          border-radius: 50px;
@@ -4235,19 +4469,23 @@
        .is-focus,
        .el-input__wrapper {
          box-shadow: none !important;
          .el-input__inner {
            border: none !important;
            height: 34px !important;
          }
        }
        .el-input-group__append {
          padding: 0 10px !important;
          background: none !important;
        }
      }
      .screenBox {
        display: flex;
        padding: 0 10px;
        .title {
          margin: 10px 0;
          line-height: 40px;
@@ -4298,14 +4536,17 @@
          border: 1px solid #0093ff;
        }
      }
      .menuList {
        height: calc(100% - 60px);
        overflow-y: auto;
        padding: 10px 0;
      }
      .list-box {
        .resourceList {
          padding: 10px;
          .resourceItem {
            padding: 10px 0;
            align-items: center;
@@ -4320,11 +4561,13 @@
              align-items: center;
              justify-content: center;
              position: relative;
              img {
                height: 100%;
                width: 100%;
                object-fit: contain;
              }
              .handleBox {
                position: absolute;
                top: 0;
@@ -4334,11 +4577,13 @@
                background: rgba(44, 44, 44, 0.6);
                text-align: center;
                padding: 2px;
                .delImg {
                  height: 100%;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  .icon {
                    position: static;
                    margin: 5px;
@@ -4354,21 +4599,25 @@
            }
          }
        }
        .screenshot {
          padding: 20px;
          display: flex;
          flex-wrap: wrap;
          justify-content: space-between;
          .captureItem {
            margin-bottom: 10px;
            width: 46%;
            position: relative;
            .imgBox {
              border: 1px solid #d8d8d8;
              width: 100%;
              height: 80px;
              margin-bottom: 5px;
            }
            .deleteBox {
              position: absolute;
              top: 0;
@@ -4378,11 +4627,13 @@
              background: rgba(44, 44, 44, 0.6);
              text-align: center;
              padding: 2px;
              .delImg {
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                .icon {
                  position: static;
                  margin: 5px;
@@ -4390,6 +4641,7 @@
                }
              }
            }
            // .capture {
            //   width: 100%;
            // }
@@ -4413,22 +4665,26 @@
          background: #fff;
          border-radius: 5px;
          padding: 10px 0;
          .textBox {
            .title {
              display: flex;
              justify-content: space-between;
              align-items: center;
              margin-right: 10px;
              .border-left {
                height: 25px;
                border-right: 4px solid;
                border-radius: 0 5px 5px 0;
                margin-right: 10px;
              }
              .title-con {
                display: flex;
                align-items: center;
                color: #949494;
                .round {
                  width: 10px;
                  height: 10px;
@@ -4441,6 +4697,7 @@
                margin-left: 5px;
              }
            }
            .chapter {
              color: #b7b7b7;
              margin: 5px 5px 5px 14px;
@@ -4453,10 +4710,12 @@
              padding: 0 5px;
            }
          }
          .noteText {
            margin: 10px 10px 10px 15px;
            border-radius: 3px;
            padding: 2px 5px;
            .con {
              max-height: 65px;
              display: -webkit-box;
@@ -4466,14 +4725,17 @@
            }
          }
        }
        .chapterName {
          margin: 15px;
          display: flex;
          align-items: center;
          span {
            margin-left: 5px;
          }
        }
        .reMarkItem {
          margin: 15px;
          background: #fff;
@@ -4481,8 +4743,10 @@
          padding: 10px;
          display: flex;
          justify-content: space-between;
          .reMarkCon {
            display: flex;
            .con {
              width: 200px;
              white-space: nowrap;
@@ -4491,10 +4755,12 @@
              margin-right: 8px;
            }
          }
          .deleteReMarkImg {
            display: flex;
            align-items: center;
          }
          .questionCon {
            width: 240px;
            white-space: nowrap;
@@ -4510,10 +4776,12 @@
            border-radius: 10px;
            padding: 10px;
            display: flex;
            .index {
              line-height: 24px;
              margin-right: 10px;
            }
            .searchCon {
              flex: 1;
              width: 240px;
@@ -4525,6 +4793,7 @@
              -webkit-box-orient: vertical;
              -webkit-line-clamp: 2;
              text-overflow: ellipsis;
              .searchColor {
                background: rgb(245, 225, 42, 0.5);
              }
@@ -4532,6 +4801,7 @@
          }
        }
      }
      .allSearch,
      .notesBox,
      .resourceBox,
@@ -4541,30 +4811,33 @@
        height: calc(100% - 60px);
        overflow-y: auto;
      }
      .questionList {
        height:83%
        height: 83%;
      }
      .question-bottom {
        position: absolute;
        bottom: 0;
        display: flex;
        justify-content: space-evenly;
        width:300px;
        padding:20px 0;
        background-color:#fff;
        width: 300px;
        padding: 20px 0;
        background-color: #fff;
        li {
          cursor: pointer;
          width: 65px;
          height:65px;
          border:1px solid #cfcfcf;
          border-radius:10px;
          background-color:#f9f9f9;
          display:flex;
          height: 65px;
          border: 1px solid #cfcfcf;
          border-radius: 10px;
          background-color: #f9f9f9;
          display: flex;
          justify-content: center;
          align-items: center;
        }
      }
    }
    .menuStateBox {
      width: 25px;
      height: 25px;
@@ -4576,6 +4849,7 @@
      text-align: center;
      box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.3);
      z-index: 2;
      img {
        height: 10px;
        width: 18px;
@@ -4586,6 +4860,7 @@
      flex: 1;
      font-size: 16px;
      position: relative;
      .pageBox-header {
        height: 57px;
        padding: 0 20px;
@@ -4594,6 +4869,7 @@
        z-index: 99;
        align-items: center;
        justify-content: space-between;
        .classTime {
          display: flex;
          align-items: center;
@@ -4601,6 +4877,7 @@
          border-radius: 20px 20px 20px 20px;
          color: #0093ff;
          padding: 8px;
          .qureIcon {
            width: 9px;
            height: 9px;
@@ -4609,16 +4886,20 @@
            margin: 0 5px;
          }
        }
        .progress {
          text-align: center;
          .bookName {
            font-weight: 800;
            margin-bottom: 5px;
            color: #333;
          }
        }
        .rightBox {
          display: flex;
          .pageSizeBox {
            display: flex;
            align-items: center;
@@ -4628,21 +4909,25 @@
              padding: 5px;
              display: flex;
              align-items: center;
              img {
                width: 18px;
                height: 18px;
              }
            }
          }
          .brushImgBox {
            display: flex;
            align-items: center;
            border-left: 1px solid #d8d8d8;
            div {
              padding: 5px;
              display: flex;
              align-items: center;
            }
            .brushImg {
              width: 22px;
              margin-left: 20px;
@@ -4651,21 +4936,26 @@
          }
        }
      }
      .pageBox-content {
        height: calc(100% - 57px);
        background: #fbf9f4;
        padding: 10px 0;
        .content-box {
          height: 100%;
          position: relative;
          #container {
            background: #fbf9f4;
            height: 100%;
            #__qiankun_microapp_wrapper_for_app_content__ {
              height: 100%;
            }
          }
        }
        .canvas-box {
          height: 100%;
          width: 100%;
@@ -4677,6 +4967,7 @@
        }
      }
    }
    .toolBox {
      position: relative;
      box-shadow: -3px 0px 6px 1px rgba(0, 0, 0, 0.07);
@@ -4685,11 +4976,13 @@
      -moz-user-select: none;
      -khtml-user-select: none;
      user-select: none;
      .toolTitle {
        height: 57px;
        line-height: 53px;
        text-align: center;
        border-bottom: 1px solid #efefef;
        .text {
          width: 43px;
          height: 3px;
@@ -4698,8 +4991,10 @@
          border-radius: 3px 3px 0px 0px;
        }
      }
      .menu {
        padding-top: 20px;
        li > div {
          // height: 50px;
          padding: 10px 36px;
@@ -4719,6 +5014,7 @@
          }
        }
      }
      .openBox {
        width: 25px;
        height: 25px;
@@ -4737,22 +5033,27 @@
          width: 18px;
        }
      }
      .right {
        right: 198px !important;
        border-radius: 0px 3px 3px 0px !important;
      }
      .classRoomBox {
        position: absolute;
        bottom: 0;
        width: 100%;
        .el-tabs__nav {
          width: 100% !important;
        }
        .el-tabs__item {
          flex: 1 !important;
          padding: 0 !important;
          text-align: center;
        }
        .el-tabs__active-bar {
          width: 43px !important;
          left: 30px !important;
@@ -4760,13 +5061,16 @@
          bottom: 1px;
          border-radius: 3px 3px 0px 0px;
        }
        .tabBox {
          height: 100px;
          padding: 10px 17px;
          text-align: center;
          .insertSelect {
            display: flex;
            justify-content: space-between;
            .selectItem {
              text-align: center;
              background: rgba(207, 207, 207, 0.13);
@@ -4774,6 +5078,7 @@
              border-radius: 5px;
              border: 2px solid #cfcfcf;
            }
            .typeActive {
              text-align: center;
              color: #0093ff;
@@ -4783,6 +5088,7 @@
              background: rgba(0, 147, 255, 0.13);
            }
          }
          .giveLessons {
            color: #0093ff;
            width: 90px;
@@ -4793,6 +5099,7 @@
            display: flex;
            align-items: center;
            justify-content: center;
            span {
              margin-left: 10px;
            }
@@ -4813,6 +5120,7 @@
      border-radius: 10px;
      padding: 6px;
      overflow: hidden;
      .floatToolItem {
        margin: 10px 0;
        height: 30px;
@@ -4822,11 +5130,13 @@
        border-radius: 5px;
        color: #fff;
        cursor: pointer;
        .imgBox {
          width: 24px;
          height: 24px;
          margin: 0 auto;
          position: relative;
          img {
            width: 100%;
            height: 100%;
@@ -4842,10 +5152,12 @@
            margin: auto;
          }
        }
        .text {
          margin-right: 5px;
        }
      }
      .floatToolItem:hover,
      .floatToolActive {
        background-color: rgba(255, 255, 255, 0.3);
@@ -4864,10 +5176,12 @@
      background: #fff;
      overflow: hidden;
      box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.3);
      .toolList {
        display: flex;
        justify-content: center;
        align-items: center;
        .floatToolItem {
          margin: 6px 8px;
          padding: 5px;
@@ -4878,6 +5192,7 @@
          align-items: center;
          // flex: 1;
          font-size: 14px;
          .imgBox {
            height: 18px;
            width: 18px;
@@ -4885,9 +5200,11 @@
            margin: 0 auto;
          }
        }
        .floatToolItem:hover {
          background-color: rgba(44, 44, 44, 0.2);
        }
        .layOutTool {
          height: 20px;
          margin-right: 5px;
@@ -4899,6 +5216,7 @@
    .dialogToolBox {
      position: fixed;
      z-index: 2;
      .toolSelectBox {
        height: 40px;
        display: flex;
@@ -4908,6 +5226,7 @@
        overflow: hidden;
        padding: 5px;
        background-color: rgba(90, 90, 90, 0.9);
        // background-image: linear-gradient(to right, #0093ff, #005dff);
        .dialogToolItem {
          user-select: none;
@@ -4918,10 +5237,12 @@
          margin: 0 5px;
          cursor: pointer;
          text-align: center;
          span {
            color: #fff;
          }
        }
        .dialogToolItem:hover,
        .active {
          background-color: rgba(255, 255, 255, 0.2);
@@ -4931,6 +5252,7 @@
        }
      }
    }
    .colorSelectBox {
      padding: 5px 10px;
      width: 190px;
@@ -4940,8 +5262,10 @@
      box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.16);
      border-radius: 5px;
      margin-bottom: 10px;
      .flex1 {
        flex: 1;
        .scribeItem {
          width: 18px;
          height: 18px;
@@ -4956,6 +5280,7 @@
    }
  }
}
.lineDeleteBox {
  position: fixed;
  z-index: 2;
@@ -4965,6 +5290,7 @@
  background-color: rgba(90, 90, 90, 0.9);
  border-radius: 5px;
  display: flex;
  .dialogToolItem {
    padding: 3px;
    margin: 0 5px;
@@ -4973,10 +5299,12 @@
    justify-content: center;
    align-items: center;
  }
  .dialogToolItem:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }
}
.noteContentBox {
  max-width: 240px;
  position: fixed;
@@ -4984,6 +5312,7 @@
  padding: 10px;
  border-radius: 5px;
}
.dictionaryDataBox {
  position: fixed;
  z-index: 2;
@@ -4991,9 +5320,11 @@
  padding: 5px 20px;
  background: #fff;
  border-radius: 5px;
  .word {
    font-weight: bold;
  }
  .phone_con {
    .per-phone {
      align-items: center;
@@ -5007,33 +5338,40 @@
      margin-right: 10px;
      margin-top: 10px;
      padding: 8px 10px;
      span {
        margin: 0 10px;
        flex: 1;
      }
    }
    .soundBtn {
      width: 16px;
      height: 14px;
    }
  }
  .trans {
    padding: 20px 0;
    .itemList {
      display: flex;
      padding: 10px 0;
      .index {
        margin-right: 15px;
      }
      .pos {
        margin-right: 30px;
      }
    }
  }
}
.wendabox {
  width: 100%;
  height: 80vh;
  height: 82vh;
  iframe {
    width: 100%;
@@ -5065,38 +5403,48 @@
    top: 0px !important;
    right: 0px !important;
  }
  .el-dialog__body {
    padding: 20px !important;
  }
  .el-dialog__footer {
    padding: 10px 20px 20px !important;
    text-align: right;
    box-sizing: border-box;
  }
}
.myDialogs {
  height: 90vh;
}
.myAnserDialogs {
  width: 700px;
  height: 90vh;
}
.myNoteDialogs {
  width: 500px !important;
}
.screenshotDialog {
  width: 400px !important;
}
.baiduDialog {
  width: 90vw;
  height: 90vh;
}
.noteColorSelectBox {
  margin-top: 10px;
  width: 190px;
  display: flex;
  .flex1 {
    flex: 1;
    .scribeItem {
      width: 18px;
      height: 18px;
@@ -5109,24 +5457,50 @@
    }
  }
}
.videoBox {
  text-align: center;
  video {
    width: 100%;
  }
}
.audioBox {
  // display:none;
}
.wordBox {
  height: 600px;
  width: 100%;
  overflow-y: scroll;
    img {
      display: block;
      margin: 0 auto;
      width: 90%;
      height: auto;
      box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.1);
      object-fit: contain;
    }
}
.imgUrlBox {
  width: 100%;
  text-align: center;
  img {
    width: 100%;
  }
}
.voice-reader {
  position: absolute;
  bottom: 30px;
  left: 50px;
}
.iframe-box {
  width:100%;
  height: 800px;
}
</style>