From 2cac4a0f4ea0b1cf7bff4759fae8136c72792563 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 14 四月 2025 15:30:29 +0800 Subject: [PATCH] 番茄闹钟 --- src/views/readerPages/webHome.vue | 1127 ++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 996 insertions(+), 131 deletions(-) diff --git a/src/views/readerPages/webHome.vue b/src/views/readerPages/webHome.vue index 9e000d8..f709147 100644 --- a/src/views/readerPages/webHome.vue +++ b/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"> @@ -93,7 +100,7 @@ <!-- 鑿滃崟鍐呭 --> <div class="menuContent" v-if="menuState.open"> <div class="searchBox"> - <div class="inputBox" v-if="activeMenu !== '璧勬簮' && activeMenu !== '涔犻'"> + <div class="inputBox" v-if="activeMenu !== '璧勬簮' && activeMenu !== '棰樺簱'"> <el-input class="custom-input" placeholder="璇疯緭鍏ュ唴瀹�" @@ -117,17 +124,48 @@ <div>鏁欏笀璧勬簮</div> <div :class="resourceType == 'teacher' ? 'text' : 'line'"></div> </div> + <hr class="hr" /> + <div class="tabItem hover" @click="selectResourceType('collect')"> + <div>鏀惰棌璧勬簮</div> + <div :class="resourceType == 'collect' ? 'text' : 'line'"></div> + </div> </div> - <div v-if="activeMenu == '涔犻'" class="resourceTab"> - <div class="tabItem hover" @click="selectExercisesType('exercises')"> + <div v-if="activeMenu == '棰樺簱'" class="resourceTab"> + <div + class="tabItem hover" + @click="selectExercisesType('exercises')" + v-if="bookConfig.textbookComponents.indexOf('3D3B4F55') > -1" + > <div>涔犻</div> <div :class="exercisesType == 'exercises' ? 'text' : 'line'"></div> </div> - <hr class="hr" /> - <div class="tabItem hover" @click="selectExercisesType('wrong')"> + <hr class="hr" v-if="bookConfig.textbookComponents.indexOf('A4821F71') > -1" /> + <div + class="tabItem hover" + @click="selectExercisesType('additional')" + v-if="bookConfig.textbookComponents.indexOf('A4821F71') > -1" + > + <div>闄勫姞棰�</div> + <div :class="exercisesType == 'additional' ? 'text' : 'line'"></div> + </div> + <!-- <hr class="hr" v-if="bookConfig.textbookComponents.indexOf('AFC1A288') > -1" /> + <div + class="tabItem hover" + @click="selectExercisesType('wrong')" + v-if="bookConfig.textbookComponents.indexOf('AFC1A288') > -1" + > <div>閿欓鏈�</div> <div :class="exercisesType == 'wrong' ? 'text' : 'line'"></div> - </div> + </div> --> + <!-- <hr class="hr" v-if="bookConfig.textbookComponents.indexOf('A434F2C0') > -1" /> + <div + class="tabItem hover" + @click="selectExercisesType('collection')" + v-if="bookConfig.textbookComponents.indexOf('A434F2C0') > -1" + > + <div>鏀惰棌澶�</div> + <div :class="exercisesType == 'collection' ? 'text' : 'line'"></div> + </div> --> </div> </div> <!-- 鐩綍 --> @@ -165,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 @@ -192,7 +233,7 @@ </div> </div> <!-- 绗旇 --> - <div class="notesBox" v-if="activeMenu == '绗旇'"> + <div class="notesBox" v-if="activeMenu == '绗旇'" v-loading="listLoading"> <div class="screenBox"> <div class="title">绛涢��</div> <div class="flex1 hover" @click="searchClick('all')"> @@ -210,7 +251,7 @@ ></div> </div> </div> - <div class="list-box" v-loading="listLoading"> + <div class="list-box"> <div v-if="scribeData.noteList.length > 0"> <div v-for="(noteItem, index) in scribeData.noteList" :key="noteItem"> <div class="chapterName"> @@ -218,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 @@ -332,65 +376,106 @@ 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 == '鏄�' + @click="goDownload(item)" + v-if="item.isDownload == '鏄�'" + > + <Download /> + </el-icon> + <!-- 鏀惰棌鎸夐挳 --> + <img + :src=" + collectResourceList.findIndex((citem) => citem.id == item.id) > -1 + ? isHeart + : heart " - ><Download - /></el-icon> + 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> @@ -413,17 +498,17 @@ </div> </div> <!-- 鎴浘 --> - <div class="screenshotList" v-if="activeMenu == '鎴浘'"> - <div class="list-box" v-loading="listLoading"> + <div class="screenshotList" v-if="activeMenu == '鎴浘'" v-loading="listLoading"> + <div class="list-box"> <div class="screenshot" v-if="screenshotList.length > 0"> <div v-for="(item, index) in screenshotList" :key="item" class="captureItem"> <div class="imgBox" @mouseover="showDelete = index" @mouseleave="showDelete = null"> <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> @@ -438,8 +523,8 @@ </div> </div> <!-- 涔︾ --> - <div class="reMarkList" v-if="activeMenu == '涔︾'"> - <div class="list-box" v-loading="listLoading"> + <div class="reMarkList" v-if="activeMenu == '涔︾'" v-loading="listLoading"> + <div class="list-box"> <div v-if="reMarkList.length > 0"> <div v-for="(item, index) in reMarkList" :key="index" class="reMarkItem"> <div class="reMarkCon hover" @click="goReMark(item)"> @@ -455,8 +540,11 @@ </div> </div> </div> - <div class="questionList" v-if="activeMenu == '涔犻'"> - <div class="resourceSearchBox"> + <div class="questionList" v-if="activeMenu == '棰樺簱'" v-loading="listLoading"> + <div + class="resourceSearchBox" + v-if="exercisesType !== 'collection' && exercisesType !== 'wrong'" + > <div class="inputBox"> <el-input class="custom-input" @@ -477,18 +565,29 @@ <div v-for="(item, index) in questionList" :key="index" class="reMarkItem"> <div class="questionCon hover" - @click="JumpPosition(item)" + @click="clickQuestion(exercisesType, item)" :title="item.resourceName" > {{ item.resourceName }} </div> </div> </div> - <div v-else> + <div + v-if=" + questionList.length == 0 && + exercisesType !== 'collection' && + exercisesType !== 'wrong' + " + > <el-empty :image-size="60" description="鏆傛棤鏁版嵁" /> </div> </div> </div> + <!-- 棰樺簱搴曢儴鏀惰棌澶瑰拰閿欓闆� --> + <ul class="question-bottom" v-if="activeMenu == '棰樺簱'"> + <li @click="selectExercisesType('collection')">鏀惰棌澶�</li> + <li @click="selectExercisesType('wrong')">閿欓鏈�</li> + </ul> <!-- 鑿滃崟鍐呭鏀惰捣 --> <div class="menuStateBox" v-if="menuState.open"> <svg @@ -549,6 +648,18 @@ <!-- 鐢荤瑪鐢诲竷 --> <div class="canvas-box" v-show="canvasShow"> <canvas id="canvasRef" :width="canvasWith" :height="canvasheight"></canvas> + </div> + <!-- 鐣寗闂归挓缁勪欢 --> + <div + class="watch-box" + v-if="pomodoroRef && pomodoroRef.isShow" + :style="{ top:position.x + 'px', left:position.y + 'px'}" + > + <p @mousedown.native="mouseDown">{{ formatTime(pomodoroRef.pageData.currentTime) }}</p> + <span @click="()=> pomodoroRef.isRuning ? pomodoroRef.pauseFun() : pomodoroRef.startFun()">{{pomodoroRef.isRuning ? '鏆傚仠': '寮�濮�'}}</span> + <span @click="pomodoroRef.resetFun" >閲嶇疆</span> + <span @click="pomodoroRef.handleRestFun(false)">闀夸紤鎭�</span> + <span @click="pomodoroRef.handleRestFun(true)">鐭紤鎭�</span> </div> </div> </div> @@ -764,6 +875,10 @@ </div> </div> </div> + <!-- 璇煶闃呰缁勪欢 --> + <!-- <div class="voice-reader"> + <voiceReader /> + </div> --> </div> <!-- 鏁欏缁勪欢 --> <div class="toolBox"> @@ -1053,9 +1168,12 @@ <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> --> @@ -1164,6 +1282,11 @@ </el-dialog> <el-dialog title="妯″瀷宸ュ叿" align-center v-model="modelToolVisble" width="80%" class="myDialogs"> <div class="wendabox"> + <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> @@ -1172,16 +1295,50 @@ <newWord :resourceUrl="resourceUrl" /> </div> </el-dialog> + <el-dialog + title="閿欓鏈�" + align-center + v-model="wrongQuestionVisble" + width="800" + class="myDialogs" + > + <div class="wendabox"> + <wrongQuestion /> + </div> + </el-dialog> + <el-dialog title="鍏紡缂栬緫" align-center v-model="formulaDialog" class="myDialogs"> + <div class="wendabox"> + <formula /> + </div> + </el-dialog> + <!-- 绛旈鍣� --> + <examination + ref="examinationRef" + :activeBook="bookConfig" + :info="examinationData.info" + :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> + <!-- 鐣寗闂归挓 --> + <!-- <pomodoro ref="pomodoroRef" /> --> </template> - <script setup lang="ts"> +import examination from '@/views/examination/index.vue' +import pomodoro from '@/views/components/pomodoro.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 { useFormatData } from '@/hooks/public' import useClipboard from 'vue-clipboard3' const { toClipboard } = useClipboard() +const { formatTime } = useFormatData() const MG: any = inject('MG') const toolClass = inject('toolClass') -const qiankunActions = inject('qiankunActions') //鑾峰彇璺敱鍣� let router = useRouter() //鑾峰彇褰撳墠璺敱鐨勪俊鎭� @@ -1189,7 +1346,9 @@ import moment from 'moment' import dictionary from '@/views/components/dictionary.vue' import newWord from '@/views/components/newWord.vue' -import { ElMessage, ElMessageBox, valueEquals } from 'element-plus' +import formula from '@/views/components/formula.vue' +import wrongQuestion from '@/views/components/wrongQuestion.vue' +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' @@ -1198,6 +1357,7 @@ import jietu from '@/assets/images/menu/jietu.png' import biaoqian from '@/assets/images/menu/biaoqian.png' import allSearch from '@/assets/images/menu/allSearch.svg' +import question from '@/assets/images/menu/question.svg' import topbg from '@/assets/images/header/top-bg.png' import setting from '@/assets/images/operation/setting.png' import search from '@/assets/images/operation/search.png' @@ -1211,7 +1371,7 @@ import shengzikapian from '@/assets/images/menu/shengzikapian.png' import hudongwenda from '@/assets/images/menu/hudongwenda.png' import siweidaotu from '@/assets/images/menu/siweidaotu.png' -import GGB from '@/assets/images/menu/GGB.png' +import GGB from '@/assets/images/menu/function.png' import jihe from '@/assets/images/menu/jihe.png' import python from '@/assets/images/menu/python.png' import cjiajia from '@/assets/images/menu/C++.png' @@ -1285,6 +1445,7 @@ import { loadMicroApp } from 'qiankun' import { microApps } from '@/child.ts' +import { open } from 'fs' let token = localStorage.getItem('token') const canvasWith = ref(1000) const canvasheight = ref(3000) @@ -1296,9 +1457,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 @@ -1329,12 +1497,14 @@ 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) + } } }) @@ -1447,6 +1617,45 @@ // } // ) +//鏍规嵁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, '鍥句功淇℃伅') + if (!res.datas.length) return + 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) => { console.log(res, '鐢ㄦ埛淇℃伅') @@ -1529,9 +1738,13 @@ isShow: bookConfig.value.textbookComponents.indexOf('CF2E1400') > -1 }, { - name: '涔犻', - icon: zhishitupu, - isShow: true + name: '棰樺簱', + icon: question, + isShow: + bookConfig.value.textbookComponents.indexOf('3D3B4F55') > -1 || + bookConfig.value.textbookComponents.indexOf('AFC1A288') > -1 || + bookConfig.value.textbookComponents.indexOf('A434F2C0') > -1 || + bookConfig.value.textbookComponents.indexOf('A4821F71') > -1 } ] teachToolsMenuData = [ @@ -1605,12 +1818,18 @@ icon: fanqiezhong, isShow: bookConfig.value.textbookComponents.indexOf('E4DC9777') > -1 } + // { + // name: '鐣寗闂归挓', + // icon: fanqiezhong, + // isShow: true + // } ] floatingToolBox = [ { icon: huabi, name: '鐢荤瑪', isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1 + // isShow: true }, { icon: baiban, @@ -1692,9 +1911,19 @@ 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) { - console.log(error) + listLoading.value = false }) } const defaultProps = { @@ -1709,9 +1938,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) @@ -1746,6 +1974,7 @@ const showHandle = ref(null) const playIndex = ref(null) //闊抽鎾斁 const audioPlayer = ref(null) +const collectResourceList = ref([]) const getResourceData = () => { if (token) { imgPreviewList.value = [] @@ -1848,6 +2077,15 @@ 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 { @@ -1922,6 +2160,15 @@ 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) + } + } }) } } @@ -1930,6 +2177,9 @@ }) .catch(function (error) { console.log(error) + resourceDataList.value = [] + classifySelectList.value = [] + listLoading.value = false }) } else { ElMessageBox.confirm('璇峰厛鐧诲綍锛�', { @@ -1939,13 +2189,22 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } } //璧勬簮鎾斁瑙嗛 +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) { @@ -1962,6 +2221,59 @@ testAudio.value = bookConfig.value.resourceUrl + '/' + data.resourcePath } autoPlay() + } 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) @@ -1973,6 +2285,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 = () => { @@ -1992,7 +2311,6 @@ //璧勬簮璺宠浆鍒版寚瀹氫綅缃� const JumpPosition = (data) => { - console.log(data, '璺宠浆') if (window.qiankunState && window.qiankunState.gotoPage) { window.qiankunState.gotoPage(Number(data.chapterNum), Number(data.pagination)) } @@ -2001,15 +2319,26 @@ //璧勬簮绫诲瀷閫夋嫨榛樿/鏁欏笀 const selectResourceType = (type) => { resourceType.value = type + resourceDataList.value = [] + classifySelectList.value = [] + activeClassify.value = '' searchText.value = '' - getResourceData() + if (type == 'collect') { + getCollectResource() + } else { + getResourceData() + } } //璧勬簮绫诲瀷鍥剧墖/瑙嗛/闊抽/涔犻/鍏朵粬 const classifyClick = (item) => { activeClassify.value = item.key resourceDataList.value = [] searchText.value = '' - getResourceData() + if (resourceType.value == 'collect') { + getCollectResource() + } else { + getResourceData() + } } const searchBtn = () => { if (searchShow.value) { @@ -2019,32 +2348,227 @@ } } +// 鑾峰彇鏀惰棌鐨勮祫婧� +const getCollectResource = () => { + 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) { + let imgCount = 0 + let audioCount = 0 + let videoCount = 0 + let exercisesCount = 0 + let otherCount = 0 + resourceDataList.value = [] + collectResourceList.value.forEach((resItem) => { + if (resItem.resourceType == '鍥剧墖') { + if (resItem.resourcePath) { + resItem.resourcePath = bookConfig.value.resourceUrl + '/' + resItem.resourcePath + } else { + resItem.resourcePath = + bookConfig.value.requestCtx + '/file/GetPreViewImage?md5=' + resItem.md5 + } + + imgPreviewList.value.push(resItem.resourcePath) + if (activeClassify.value == 'image') { + resourceDataList.value.push(resItem) + } + imgCount++ + } else if (resItem.resourceType == '闊抽') { + if (activeClassify.value == 'audio') { + resourceDataList.value.push(resItem) + } + audioCount++ + } else if (resItem.resourceType == '瑙嗛') { + if (activeClassify.value == 'video') { + resourceDataList.value.push(resItem) + } + videoCount++ + } else { + if (activeClassify.value == 'other') { + resourceDataList.value.push(resItem) + } + otherCount++ + } + }) + classifySelectList.value = [] + if (imgCount > 0) { + classifySelectList.value.push({ + title: '鍥剧墖', + count: imgCount, + key: 'image' + }) + } + if (audioCount > 0) { + classifySelectList.value.push({ + title: '闊抽', + count: audioCount, + key: 'audio' + }) + } + if (videoCount > 0) { + classifySelectList.value.push({ + title: '瑙嗛', + count: videoCount, + key: 'video' + }) + } + if (otherCount > 0) { + classifySelectList.value.push({ + title: '鍏朵粬', + count: otherCount, + key: 'other' + }) + } + if (!activeClassify.value) { + activeClassify.value = classifySelectList.value[0].key + collectResourceList.value.forEach((resItem1) => { + 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 { + ElMessageBox.confirm('璇峰厛鐧诲綍锛�', { + confirmButtonText: '鍘荤櫥褰�', + cancelButtonText: '鍙栨秷', + autofocus: false, + type: 'warning' + }) + .then(() => { + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } + }) + .catch(() => {}) + } +} +// 鏀惰棌鎸夐挳 +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) + } + ] + }) +} + //涔犻 const exercisesType = ref('exercises') //涔犻绫诲瀷 const questionList = ref([]) +const examinationRef = ref() // 绛旈鍣ㄥ疄渚� +const examinationData = reactive({ + type: '', // 绛旈绫诲瀷 option 娴嬭瘯 + infoType: '', // 鏁版嵁鏉ユ簮 bits 姣旂壒鍚庡彴 json 鍋囨暟鎹� + info: {} // 杩欏棰樼殑淇℃伅 +}) +// 鑾峰彇涔犻 const getExercisesList = () => { if (token) { listLoading.value = true questionList.value = [] - axios.get(bookConfig.value.resourceUrl + '/resource.json').then(function (response) { - var json = response.data - // 澶勭悊鑾峰彇鍒扮殑json鏁版嵁 - if (json.length > 0) { - json.forEach((item) => { - if (item.resourceType == '涔犻') { - let text = searchText.value.replace(/^\s*|\s*$/g, '') - if (searchText.value) { - if (item.resourceName.indexOf(text) > -1) { + axios + .get(bookConfig.value.resourceUrl + '/resource.json') + .then(function (response) { + var json = response.data + // 澶勭悊鑾峰彇鍒扮殑json鏁版嵁 + if (json.length > 0) { + json.forEach((item) => { + if (item.resourceType == '涔犻') { + let text = searchText.value.replace(/^\s*|\s*$/g, '') + if (searchText.value) { + if (item.resourceName.indexOf(text) > -1) { + questionList.value.push(item) + } + } else { questionList.value.push(item) } - } else { - questionList.value.push(item) } - } - }) - } - listLoading.value = false + }) + } + listLoading.value = false + }) + .catch(() => { + listLoading.value = false + }) + } else { + ElMessageBox.confirm('璇峰厛鐧诲綍锛�', { + confirmButtonText: '鍘荤櫥褰�', + cancelButtonText: '鍙栨秷', + autofocus: false, + type: 'warning' }) + .then(() => { + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } + }) + .catch(() => {}) + } +} + +// 鑾峰彇闄勫姞棰� +const getAdditionalList = () => { + if (token) { + listLoading.value = true + questionList.value = [] + axios + .get(bookConfig.value.resourceUrl + '/bits-question.json') + .then((res) => { + // 澶勭悊鑾峰彇鍒扮殑json鏁版嵁 + if (res.data.data.length > 0) { + questionList.value = res.data.data + examinationData.infoType = res.data.type + } + listLoading.value = false + }) + .catch(() => { + listLoading.value = false + }) } else { ElMessageBox.confirm('璇峰厛鐧诲綍锛�', { confirmButtonText: '鍘荤櫥褰�', @@ -2058,14 +2582,42 @@ .catch(() => {}) } } -const selectExercisesType = (type) => { - exercisesType.value = type - searchText.value = '' +//閿欓鏈� +const wrongQuestionVisble = ref(false) +const selectExercisesType = (type) => { if (type == 'exercises') { getExercisesList() + exercisesType.value = type + searchText.value = '' + } else if (type == 'additional') { + getAdditionalList() + exercisesType.value = type + searchText.value = '' + } else if (type == 'wrong') { + openExaminationDialog(true, {}, 'errorQuestion') } else { - questionList.value = [] + openExaminationDialog(true, {}, 'collectQuestion') + } +} +// 棰樺垪琛ㄧ偣鍑� +const clickQuestion = (type: string, data: any) => { + switch (type) { + case 'exercises': + JumpPosition(data) + break + case 'additional': + openExaminationDialog(true, data, 'option') + break + default: + break + } +} +const openExaminationDialog = (isSHow: boolean, data: any, type: string) => { + if (examinationRef.value) { + examinationRef.value.handleExaminationDialog(isSHow) + examinationData.type = type + examinationData.info = data } } @@ -2101,7 +2653,7 @@ break case '妫�绱�': break - case '涔犻': + case '棰樺簱': getExercisesList() break } @@ -2122,7 +2674,6 @@ // } } -const searchText = ref<string>('') //绛涢�� const menuState = reactive({ open: true, notesColor: 'all' //绗旇棰滆壊 @@ -2253,7 +2804,7 @@ case '涔︾': getReMarkList() break - case '涔犻': + case '棰樺簱': getExercisesList() break case '妫�绱�': @@ -2371,26 +2922,29 @@ case '妫�绱�': allSearchReault.value = [] break - case '涔犻': + case '棰樺簱': getExercisesList() break } } - +type pomodoroType = InstanceType<typeof Pomodoro> const baiduVisible = ref(false) const wendaVisible = ref(false) const cidianVisible = ref(false) 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 pomodoroRef = ref<pomodoroType>() const activeTool = ref(0) const toolState = reactive({ open: true }) const resourceUrl = ref('') -const selectTeachTools = (item) => { +const selectTeachTools = (item: any) => { if (token) { activeTool.value = item.name switch (item.name) { @@ -2404,7 +2958,7 @@ siweiVisble.value = true break case '妯″瀷宸ュ叿': - modelToolVisble.value = true + modelTool.value = true break case '璇嶅吀': cidianVisible.value = true @@ -2412,6 +2966,12 @@ case '鐢熻瘝鍗$墖': resourceUrl.value = bookConfig.value.resourceUrl shengciVisble.value = true + break + case '璁$畻鍣�': + calculatorVisble.value = true + case '鐣寗闂归挓': + pomodoroRef.value.setDialogVisable(true) + break } } else { ElMessageBox.confirm('璇峰厛鐧诲綍锛�', { @@ -2421,7 +2981,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -2483,7 +3049,6 @@ //娴獥宸ュ叿鏍忕偣鍑讳簨浠� const floatItemHandle = (item) => { - console.log(floatingToolData.activeToolData, 'floatingToolData.activeToolData') if (floatingToolData.activeToolData == '鐢荤瑪') { floatingToolData.activeToolData = '' } else { @@ -2660,7 +3225,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -2700,7 +3271,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -2708,7 +3285,6 @@ //璺宠浆 const goReMark = (item) => { - console.log(item) if (window.qiankunState && window.qiankunState.gotoPage) { window.qiankunState.gotoPage(Number(item.chapterNum), Number(item.page)) } @@ -2774,7 +3350,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -2787,7 +3369,6 @@ } //鍙栨秷鍥炶皟 const closeFn = (base64: any) => { - console.log(base64) floatingToolData.activeToolData = '' } //淇濆瓨鎴浘 @@ -2879,7 +3460,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -3028,7 +3615,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 @@ -3065,10 +3651,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 } @@ -3080,7 +3664,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => { showToolBox.value = false @@ -3180,7 +3770,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -3264,7 +3860,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -3291,7 +3893,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) => { @@ -3333,7 +3934,6 @@ }) } } - console.log(scribeData.noteList, 'scribeData.noteList') } listLoading.value = false }) @@ -3345,7 +3945,13 @@ type: 'warning' }) .then(() => { - router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } }) .catch(() => {}) } @@ -3401,13 +4007,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 } @@ -3457,7 +4061,6 @@ //绗旇璺宠浆 const jumpContent = (item) => { - console.log(item) if (window.qiankunState && window.qiankunState.gotoPage) { window.qiankunState.gotoPage(Number(item.chapterNum), Number(item.page)) } @@ -3465,7 +4068,6 @@ //鑿滃崟绗旇缂栬緫 const update = (item) => { - console.log(item) dialogToolData.chapter = item.chapterNum noteColorActive.value = item.color formData.id = item.id @@ -3548,13 +4150,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 } }) @@ -3625,11 +4225,53 @@ const layoutBtn = () => { localStorage.removeItem('token') localStorage.removeItem('userInfo') - router.push('/login') + // router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } } const goLogin = () => { localStorage.removeItem('userInfo') - router.push('/login') + // router.push('/login') + if (sessionStorage.getItem('loginCtx')) { + window.open(sessionStorage.getItem('loginCtx')) + } else { + router.replace({ + path: '/login' + }) + } +} + +const formulaDialog = ref(false) +const openFormulaDialog = () => { + formulaDialog.value = true +} + +// 鐣寗閽熺Щ鍔� +const isMove = ref<boolean>(false) +const position = reactive({x:100,y:100}) +const dragOffset = reactive({x:0,y:0}) +const mouseDown = (e: MouseEvent) => { + isMove.value = true + dragOffset.x = e.clientX - position.x + dragOffset.y = e.clientY - position.y + document.addEventListener('mousemove', mouseMove) + document.addEventListener('mouseup', mouseUp) +} +const mouseUp = (e: MouseEvent) => { + isMove.value = false + document.removeEventListener('mousemove', mouseMove) + document.removeEventListener('mouseup', mouseUp) +} +const mouseMove = (e: MouseEvent) => { + if (isMove.value) { + position.x = e.clientX - dragOffset.x + position.y = e.clientY - dragOffset.y + } } </script> @@ -3652,15 +4294,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; @@ -3668,6 +4313,7 @@ border-right: 1px solid #e0e0e0; color: #2c2c2c; } + .layout { width: 69px; height: 30px; @@ -3679,11 +4325,13 @@ } } } + .contentBox { overflow: hidden; flex: 1; display: flex; position: relative; + .menuBox { width: 80px; flex-shrink: 0; @@ -3706,30 +4354,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; @@ -3737,7 +4391,9 @@ text-align: center; } } + .menuContent { + // position: relative; width: 300px; flex-shrink: 0; height: calc(100vh - 48px); @@ -3746,6 +4402,7 @@ -moz-user-select: none; -khtml-user-select: none; user-select: none; + .searchBox { width: 100%; height: 60px; @@ -3755,22 +4412,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; @@ -3781,16 +4443,19 @@ height: 18px; font-size: 12px; } + .activeClassify, .classifyItem:hover { .title { color: #0093ff; } + .count { background: #0093ff; color: #fff; } } + .showSearch { .imgBox { width: 39px; @@ -3798,17 +4463,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; @@ -3816,18 +4484,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; @@ -3835,12 +4507,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; @@ -3852,19 +4527,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; @@ -3915,14 +4594,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; @@ -3937,11 +4619,13 @@ align-items: center; justify-content: center; position: relative; + img { height: 100%; width: 100%; object-fit: contain; } + .handleBox { position: absolute; top: 0; @@ -3951,11 +4635,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; @@ -3971,21 +4657,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; @@ -3995,11 +4685,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; @@ -4007,6 +4699,7 @@ } } } + // .capture { // width: 100%; // } @@ -4030,22 +4723,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; @@ -4058,6 +4755,7 @@ margin-left: 5px; } } + .chapter { color: #b7b7b7; margin: 5px 5px 5px 14px; @@ -4070,10 +4768,12 @@ padding: 0 5px; } } + .noteText { margin: 10px 10px 10px 15px; border-radius: 3px; padding: 2px 5px; + .con { max-height: 65px; display: -webkit-box; @@ -4083,14 +4783,17 @@ } } } + .chapterName { margin: 15px; display: flex; align-items: center; + span { margin-left: 5px; } } + .reMarkItem { margin: 15px; background: #fff; @@ -4098,8 +4801,10 @@ padding: 10px; display: flex; justify-content: space-between; + .reMarkCon { display: flex; + .con { width: 200px; white-space: nowrap; @@ -4108,10 +4813,12 @@ margin-right: 8px; } } + .deleteReMarkImg { display: flex; align-items: center; } + .questionCon { width: 240px; white-space: nowrap; @@ -4127,10 +4834,12 @@ border-radius: 10px; padding: 10px; display: flex; + .index { line-height: 24px; margin-right: 10px; } + .searchCon { flex: 1; width: 240px; @@ -4142,6 +4851,7 @@ -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: ellipsis; + .searchColor { background: rgb(245, 225, 42, 0.5); } @@ -4149,6 +4859,7 @@ } } } + .allSearch, .notesBox, .resourceBox, @@ -4158,7 +4869,33 @@ height: calc(100% - 60px); overflow-y: auto; } + + .questionList { + height: 83%; + } + + .question-bottom { + position: absolute; + bottom: 0; + display: flex; + justify-content: space-evenly; + 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; + justify-content: center; + align-items: center; + } + } } + .menuStateBox { width: 25px; height: 25px; @@ -4170,6 +4907,7 @@ text-align: center; box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.3); z-index: 2; + img { height: 10px; width: 18px; @@ -4180,6 +4918,7 @@ flex: 1; font-size: 16px; position: relative; + .pageBox-header { height: 57px; padding: 0 20px; @@ -4188,6 +4927,7 @@ z-index: 99; align-items: center; justify-content: space-between; + .classTime { display: flex; align-items: center; @@ -4195,6 +4935,7 @@ border-radius: 20px 20px 20px 20px; color: #0093ff; padding: 8px; + .qureIcon { width: 9px; height: 9px; @@ -4203,16 +4944,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; @@ -4222,21 +4967,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; @@ -4245,21 +4994,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%; @@ -4269,8 +5023,36 @@ z-index: 96; background: rgba(255, 255, 255, 0.2); } + .watch-box { + display: flex; + align-items: center; + position: absolute; + background-color: #555; + color: #fff; + padding: 10px; + border-radius: 5px; + width: max-content; + p { + cursor: move; + padding: 0 8px; + font-size: 18px; + border-radius: 4px; + margin-right: 10px; + background-color: #666; + } + span { + cursor: pointer; + border-right: 1px solid #fff; + padding: 0 4px; + font-size: 14px; + &:last-child { + border-right: none; + } + } + } } } + .toolBox { position: relative; box-shadow: -3px 0px 6px 1px rgba(0, 0, 0, 0.07); @@ -4279,11 +5061,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; @@ -4292,8 +5076,10 @@ border-radius: 3px 3px 0px 0px; } } + .menu { padding-top: 20px; + li > div { // height: 50px; padding: 10px 36px; @@ -4313,6 +5099,7 @@ } } } + .openBox { width: 25px; height: 25px; @@ -4331,22 +5118,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; @@ -4354,13 +5146,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); @@ -4368,6 +5163,7 @@ border-radius: 5px; border: 2px solid #cfcfcf; } + .typeActive { text-align: center; color: #0093ff; @@ -4377,6 +5173,7 @@ background: rgba(0, 147, 255, 0.13); } } + .giveLessons { color: #0093ff; width: 90px; @@ -4387,6 +5184,7 @@ display: flex; align-items: center; justify-content: center; + span { margin-left: 10px; } @@ -4407,6 +5205,7 @@ border-radius: 10px; padding: 6px; overflow: hidden; + .floatToolItem { margin: 10px 0; height: 30px; @@ -4416,11 +5215,13 @@ border-radius: 5px; color: #fff; cursor: pointer; + .imgBox { width: 24px; height: 24px; margin: 0 auto; position: relative; + img { width: 100%; height: 100%; @@ -4436,10 +5237,12 @@ margin: auto; } } + .text { margin-right: 5px; } } + .floatToolItem:hover, .floatToolActive { background-color: rgba(255, 255, 255, 0.3); @@ -4458,10 +5261,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; @@ -4472,6 +5277,7 @@ align-items: center; // flex: 1; font-size: 14px; + .imgBox { height: 18px; width: 18px; @@ -4479,9 +5285,11 @@ margin: 0 auto; } } + .floatToolItem:hover { background-color: rgba(44, 44, 44, 0.2); } + .layOutTool { height: 20px; margin-right: 5px; @@ -4493,6 +5301,7 @@ .dialogToolBox { position: fixed; z-index: 2; + .toolSelectBox { height: 40px; display: flex; @@ -4502,6 +5311,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; @@ -4512,10 +5322,12 @@ margin: 0 5px; cursor: pointer; text-align: center; + span { color: #fff; } } + .dialogToolItem:hover, .active { background-color: rgba(255, 255, 255, 0.2); @@ -4525,6 +5337,7 @@ } } } + .colorSelectBox { padding: 5px 10px; width: 190px; @@ -4534,8 +5347,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; @@ -4550,6 +5365,7 @@ } } } + .lineDeleteBox { position: fixed; z-index: 2; @@ -4559,6 +5375,7 @@ background-color: rgba(90, 90, 90, 0.9); border-radius: 5px; display: flex; + .dialogToolItem { padding: 3px; margin: 0 5px; @@ -4567,10 +5384,12 @@ justify-content: center; align-items: center; } + .dialogToolItem:hover { background-color: rgba(255, 255, 255, 0.3); } } + .noteContentBox { max-width: 240px; position: fixed; @@ -4578,6 +5397,7 @@ padding: 10px; border-radius: 5px; } + .dictionaryDataBox { position: fixed; z-index: 2; @@ -4585,9 +5405,11 @@ padding: 5px 20px; background: #fff; border-radius: 5px; + .word { font-weight: bold; } + .phone_con { .per-phone { align-items: center; @@ -4601,33 +5423,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%; @@ -4659,38 +5488,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; @@ -4703,24 +5542,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> -- Gitblit v1.9.1