| | |
| | | <div v-if="scribeData.noteList.length > 0"> |
| | | <div v-for="(noteItem, index) in scribeData.noteList" :key="noteItem"> |
| | | <div class="chapterName"> |
| | | <el-icon @click="noteClose(index)" v-if="scribeData.isShow && scribeData.openIndex == index" class="hover"><ArrowDown /></el-icon> |
| | | <el-icon |
| | | @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> |
| | | <span>{{ noteItem.chapterName }}</span></div> |
| | | <div v-for="(item, index1) in noteItem.noteList" :key="item.key" class="listItem" v-show="scribeData.isShow && scribeData.openIndex == index"> |
| | | <span>{{ noteItem.chapterName }}</span> |
| | | </div> |
| | | <div |
| | | v-for="(item, index1) in noteItem.noteList" |
| | | :key="item.key" |
| | | class="listItem" |
| | | v-show="scribeData.isShow && scribeData.openIndex == index" |
| | | > |
| | | <div class="textBox"> |
| | | <div class="title"> |
| | | <div class="title-con"> |
| | |
| | | @mouseover="showHandle = index" |
| | | @mouseleave="showHandle = null" |
| | | > |
| | | <img :src="item.icon" mode="" v-if="item.icon" /> |
| | | <el-icon v-else-if="activeClassify == 'image'" size="30"><Picture /></el-icon> |
| | | <img :src="item.resourcePath" mode="" v-if="activeClassify == 'image'"/> |
| | | <img :src="item.icon" mode="" 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" |
| | | ><VideoCamera |
| | |
| | | <div class="list-box"> |
| | | <div v-if="reMarkList.length > 0"> |
| | | <div v-for="(item, index) in reMarkList" :key="index" class="reMarkItem"> |
| | | <div class="reMarkCon">{{ item.chapterName }} P{{ item.page }}</div> |
| | | <div class="reMarkCon"> |
| | | <span class="con">{{ item.content }}</span> <span>P{{ item.page }}</span> |
| | | </div> |
| | | <div class="deleteReMarkImg"> |
| | | <img :src="shanchu" class="icon hover" @click="deleteReMark(item)" /> |
| | | </div> |
| | |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div :class="['openBox', toolState.open ? 'right' : '']"> |
| | | <div |
| | | :class="['openBox', toolState.open ? 'right' : '']" |
| | | v-if="teachToolsMenuData.length > 0" |
| | | > |
| | | <!-- <img :src="shouqiR" v-if="toolState.open" @click="toolState.open = false" /> --> |
| | | <!-- <img :src="shouqiL" v-if="!toolState.open" @click="toolState.open = true" /> --> |
| | | <svg |
| | |
| | | </div> |
| | | </template> |
| | | </el-popover> |
| | | <div class="floatToolItem mark" |
| | | v-if="floatingToolData.activeToolData == '书签'" |
| | | > |
| | | <el-tooltip class="box-item" effect="dark" :content="item.name" placement="right"> |
| | | <div class="imgBox"> |
| | | <img :src="tagW" alt="" v-if="floatingToolData.activeToolData == item.name"/> |
| | | <img :src="item.icon" alt="" v-else/> |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | <div |
| | | :class=" |
| | | floatingToolData.activeToolData == item.name |
| | |
| | | :style="{ top: `${dialogToolData.top}px`, left: `${dialogToolData.left}px` }" |
| | | > |
| | | <div class="content"> |
| | | <div class="word">{{ dictionaryData.data.word }}</div> |
| | | <div class="phone_con"> |
| | | <div class="per-phone"> |
| | | 英 /<span>{{ dictionaryData.data.ukPhone }}</span |
| | | >/ |
| | | 英 <span>/{{ dictionaryData.data.ukPhone }}/</span |
| | | ><img |
| | | :src="sound" |
| | | class="soundBtn hover" |
| | | @click="soundWord(dictionaryData.data.word, 'en-UK')" |
| | | /> |
| | | </div> |
| | | <div class="per-phone"> |
| | | 美 /<span>{{ dictionaryData.data.usPhone }}</span |
| | | >/ |
| | | 美 <span>/{{ dictionaryData.data.usPhone }}/</span |
| | | ><img |
| | | :src="sound" |
| | | class="soundBtn hover" |
| | | @click="soundWord(dictionaryData.data.word, 'en-US')" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="trans"> |
| | |
| | | import setting from '@/assets/images/operation/setting.png' |
| | | import search from '@/assets/images/operation/search.png' |
| | | import search1 from '@/assets/images/operation/search1.png' |
| | | import sound from '@/assets/images/operation/sound.png' |
| | | |
| | | import aIzhinengwenda from '@/assets/images/menu/AIzhinengwenda.png' |
| | | import aIyuyinyuedu from '@/assets/images/menu/AIyuyinyuedu.png' |
| | |
| | | import daiban from '@/assets/images/menu/daiban.png' |
| | | import shouqiR from '@/assets/images/menu/shouqi-R.png' |
| | | import shouqiL from '@/assets/images/menu/shouqi-L.png' |
| | | import charuziyuan from '../assets/images/operation/charuziyuan.png' |
| | | import charuziyuan_blue from '../assets/images/operation/charuziyuan_blue.png' |
| | | import dati_charu from '../assets/images/operation/dati_charu.png' |
| | | import dati_charu_blue from '../assets/images/operation/dati_charu_blue.png' |
| | | import xiake from '../assets/images/operation/xiake.png' |
| | | import charuziyuan from '@/assets/images/operation/charuziyuan.png' |
| | | import charuziyuan_blue from '@/assets/images/operation/charuziyuan_blue.png' |
| | | import dati_charu from '@/assets/images/operation/dati_charu.png' |
| | | import dati_charu_blue from '@/assets/images/operation/dati_charu_blue.png' |
| | | import xiake from '@/assets/images/operation/xiake.png' |
| | | |
| | | import huabi from '../assets/images/operation/huabi-w.png' |
| | | import wenzi2 from '../assets/images/operation/wenzi.png' |
| | | import biaoqianw from '../assets/images/operation/biaoqian-w.png' |
| | | import tagW from '../assets/images/operation/tag-w.svg' |
| | | import baiban from '../assets/images/operation/baiban-w.png' |
| | | import biaozhu from '../assets/images/operation/pencil-minus.svg' |
| | | import jieping from '../assets/images/operation/screenshot-w.png' |
| | |
| | | console.log('父层state变化', state) |
| | | window.qiankunState = state |
| | | if (window.qiankunState && window.qiankunState.initTestBook) { |
| | | window.qiankunState.initTestBook(localStorage.getItem('bookId') + '',localStorage.getItem('tryPageCount')) |
| | | window.qiankunState.initTestBook( |
| | | localStorage.getItem('bookId') + '', |
| | | localStorage.getItem('tryPageCount') |
| | | ) |
| | | } |
| | | }) |
| | | |
| | |
| | | dialogToolData.top = data.y + 20 |
| | | getSearchResult() |
| | | } |
| | | |
| | | |
| | | }, |
| | | getBookConfig: (data) => { |
| | | console.log(data.bookConfig, '图书配置') |
| | | bookConfig.value = data.bookConfig |
| | | getCatalogueData() |
| | | getResourceData() |
| | | // getResourceData() |
| | | getTextbookComponents() |
| | | getReMarkList() |
| | | // getReMarkList() |
| | | }, |
| | | catalogChange: (data) => { |
| | | activeCatalog.value = data.showCatalogList |
| | |
| | | pageChange: (data) => { |
| | | headerData.process = Number(data.page) |
| | | currentChapter.value = data.catalog |
| | | // catalogTree.value.filter(Number(data.start)) |
| | | console.log(data, '页面切换:目前显示页面和对应的章节信息') |
| | | if (catalogTree.value) { |
| | | catalogTree.value.setCurrentKey(Number(data.page)) |
| | |
| | | showToolBox.value = false |
| | | lineDelete.showLineDelete = false |
| | | dictionaryData.showContent = false |
| | | |
| | | reMarkCon.value = data.text |
| | | reMarResult.value = reMarkData.value.find((item) => { |
| | | return item.chapterNum == data.catalog && item.page == data.page |
| | | }) |
| | |
| | | const defaultProps = { |
| | | children: 'children', |
| | | label: 'label', |
| | | page: 'page' |
| | | start: 'start' |
| | | } |
| | | |
| | | const filterNode = (value, data) => { |
| | |
| | | teacherResourceList.value = [] |
| | | // 获取数组中所有对象的age属性的数量 |
| | | json.forEach((item) => { |
| | | if(item.iconPath){ |
| | | item.icon = bookConfig.value.resourceUrl + '/' + item.iconPath |
| | | }else{ |
| | | item.icon = '' |
| | | } |
| | | if (resourceType.value == 'default') { |
| | | if (item.isTeacherResource == '否') { |
| | | defaultResourceList.value.push(item) |
| | |
| | | resourceDataList.value = [] |
| | | defaultResourceList.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) |
| | | } |
| | |
| | | count: imgCount, |
| | | key: 'image' |
| | | }) |
| | | imgPreviewList.value = resourceDataList.value |
| | | |
| | | } |
| | | if (audioCount > 0) { |
| | | classifySelectList.value.push({ |
| | |
| | | } |
| | | }) |
| | | } |
| | | console.log(resourceDataList.value,"图片") |
| | | // if(activeClassify.value == "video"){ |
| | | // resourceDataList.value.forEach((item,index)=>{ |
| | | // console.log(item,"item") |
| | | // let video = document.createElement("video"); |
| | | // video.src = bookConfig.value.requestCtx + '/file/api/ApiDownload?md5=' + item.md5; |
| | | // const canvas = document.createElement('canvas') |
| | | // canvas.width = 130 |
| | | // canvas.height = 80 |
| | | // const ctx:any = canvas.getContext('2d'); |
| | | // video.crossOrigin = 'anonymous' // 解决跨域问题,也就是提示污染资源无法转换视频 |
| | | // video.currentTime = 1 // 第一帧 |
| | | |
| | | // video.oncanplay = () => { //视频准备播放 |
| | | // ctx.drawImage(video, 0, 0, canvas.width, canvas.height) |
| | | // item.icon = canvas.toDataURL("image/png"); //获取base64格式的图片 |
| | | // } |
| | | // }) |
| | | |
| | | // } |
| | | } else { |
| | | let imgCount = 0 |
| | | let audioCount = 0 |
| | |
| | | resourceDataList.value = [] |
| | | teacherResourceList.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) |
| | | } |
| | |
| | | count: imgCount, |
| | | key: 'image' |
| | | }) |
| | | imgPreviewList.value = resourceDataList.value |
| | | } |
| | | if (audioCount > 0) { |
| | | classifySelectList.value.push({ |
| | |
| | | |
| | | //资源跳转到指定位置 |
| | | const JumpPosition = (data) => { |
| | | console.log(data,"跳转") |
| | | if (window.qiankunState && window.qiankunState.gotoPage) { |
| | | window.qiankunState.gotoPage(Number(data.chapterNum), Number(data.pagination)) |
| | | } |
| | |
| | | getNotesList() |
| | | break |
| | | case '资源': |
| | | getResourceData() |
| | | break |
| | | case '知识图谱': |
| | | break |
| | |
| | | const reMarkList = ref([]) |
| | | const reMarkData = ref([]) |
| | | const reMarkId = ref([]) |
| | | const reMarkCon = ref('') |
| | | |
| | | const reMark = () => { |
| | | let chapterData = catalogueData.value.find((item) => item.chapter == Number(currentChapter.value)) |
| | | console.log(chapterData) |
| | | if (catalogueData.value.length > 0) { |
| | | catalogueData.value.forEach((item1) => { |
| | | if (item1.chapter == Number(currentChapter.value) && item1.start == headerData.process) { |
| | | chapterData.label = item1.label |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (chapterData) { |
| | | reMarkData.value.push({ |
| | | id: toolClass.uuid(8), |
| | | createDate: new Date(), |
| | | page: headerData.process, |
| | | chapterNum: currentChapter.value, |
| | | chapterName: chapterData.label |
| | | chapterName: chapterData.label, |
| | | content: reMarkCon.value || chapterData.label |
| | | }) |
| | | MG.identity |
| | | .setUserKey({ |
| | |
| | | ] |
| | | }) |
| | | .then((res) => { |
| | | floatingToolData.activeToolData = '' |
| | | // floatingToolData.activeToolData = '' |
| | | ElMessage({ |
| | | message: '添加书签成功!', |
| | | type: 'success' |
| | |
| | | if (isUpdateImg.value) { |
| | | screenshotData.value = [] |
| | | screenshotList.value.forEach((itemNote) => { |
| | | if ((itemNote.id = screenshotId.value)) { |
| | | if ((itemNote.id == screenshotId.value)) { |
| | | itemNote.name = nameData.value |
| | | } |
| | | }) |
| | |
| | | colorActive.value = '' |
| | | switch (item.name) { |
| | | case 'AI阅读': |
| | | 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 |
| | |
| | | // 储值 |
| | | dialogToolData.lineHeight[item.key] = data |
| | | // 渲染 |
| | | if (data.length > 0) { |
| | | for (let j = 0; j < data.length; j++) { |
| | | const citem = data[j] |
| | | if (window.qiankunState && window.qiankunState.renderSign) |
| | | window.qiankunState.renderSign(citem.type, citem) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | dialogToolData.scribeList[item.key] = data |
| | | |
| | | // 渲染 |
| | | if (data.length > 0) { |
| | | for (let j = 0; j < data.length; j++) { |
| | | const citem = data[j] |
| | | if (window.qiankunState && window.qiankunState.renderSign) |
| | | window.qiankunState.renderSign(citem.type, citem) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | // 储值 |
| | | dialogToolData.notesList[item.key] = data |
| | | // 渲染 |
| | | if (data.length > 0) { |
| | | for (let j = 0; j < data.length; j++) { |
| | | const citem = data[j] |
| | | if (window.qiankunState && window.qiankunState.renderSign) |
| | | window.qiankunState.renderSign(citem.type, citem) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | // console.log(data,'666') |
| | | let dataList = [] |
| | | if(catalogueData.value.length > 0 ){ |
| | | catalogueData.value.forEach(item1 =>{ |
| | | catalogueData.value.forEach((item1) => { |
| | | if(item1.chapter == Number(item.key)){ |
| | | dataList.push(item1) |
| | | } |
| | | }) |
| | | } |
| | | let labels = "" |
| | | if(dataList.length > 1) |
| | | labels = dataList.map(item => item.label).join('/'); |
| | | let labels = '' |
| | | if (dataList.length > 1) labels = dataList.map((item) => item.label).join('/') |
| | | |
| | | let list = JSON.parse(item.value) |
| | | let itemList = [] |
| | |
| | | lineDelete.id = id |
| | | lineDelete.showLineDelete = true |
| | | if (type == 'Note') { |
| | | noteContent.show = false |
| | | let list = dialogToolData.notesList[chapterNum] |
| | | let data = list.find((item) => item.id == id) |
| | | formData.id = id |
| | |
| | | let data = list.find((item) => item.id == id) |
| | | noteContent.note = data.note |
| | | noteContent.color = data.color |
| | | noteContent.show = true |
| | | document.addEventListener('mousemove', function (event) { |
| | | var x = event.offsetX |
| | | var y = event.offsetY |
| | | // console.log('鼠标坐标位置:', x, y) |
| | | noteContent.top = event.clientY + 10 |
| | | noteContent.top = event.clientY + 20 |
| | | noteContent.left = event.clientX |
| | | noteContent.show = true |
| | | }) |
| | | } |
| | | window.noteOut = () => { |
| | | console.log(123) |
| | | window.noteOut = (type) => { |
| | | console.log(type, 123) |
| | | noteContent.show = false |
| | | } |
| | | |
| | |
| | | } |
| | | ]) |
| | | .then((res) => { |
| | | console.log(res[0][0],"cid") |
| | | 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") |
| | | console.log(dictionaryData.data, '14') |
| | | dictionaryData.showContent = true |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | //单词阅读 |
| | | const soundWord = (word, en) => { |
| | | window.speechSynthesis.cancel() |
| | | const synth = window.speechSynthesis |
| | | const utterances = new SpeechSynthesisUtterance(word) |
| | | // utterances.lang = en // 设置语言为中文 |
| | | synth.speak(utterances) |
| | | } |
| | | //内容区域顶部显示 |
| | | |
| | |
| | | display: inline-block; |
| | | width: 32px; |
| | | height: 32px; |
| | | } |
| | | .name { |
| | | text-align: center; |
| | | line-height: 1; |
| | | color: #2c3e50; |
| | | } |
| | | } |
| | | } |
| | | .reload { |
| | |
| | | border-radius: 10px; |
| | | padding: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .reMarkCon { |
| | | width: 240px; |
| | | // width: 240px; |
| | | // white-space: nowrap; |
| | | // overflow: hidden; |
| | | // text-overflow: ellipsis; |
| | | // margin-right: 8px; |
| | | display: flex; |
| | | .con { |
| | | width: 200px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-right: 8px; |
| | | } |
| | | } |
| | | .deleteReMarkImg { |
| | | display: flex; |
| | |
| | | } |
| | | } |
| | | .noteContentBox { |
| | | max-width: 240px; |
| | | position: fixed; |
| | | z-index: 2; |
| | | padding: 10px; |
| | |
| | | padding: 5px 20px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | .word { |
| | | font-weight: bold; |
| | | } |
| | | .phone_con { |
| | | .per-phone { |
| | | width: 150px; |
| | | min-width: 150px; |
| | | align-items: center; |
| | | // justify-content: space-between; |
| | | background: #f4f5f7; |
| | | border-radius: 15px; |
| | | box-sizing: border-box; |
| | |
| | | padding: 8px 10px; |
| | | span { |
| | | margin: 0 10px; |
| | | flex: 1; |
| | | } |
| | | } |
| | | .soundBtn { |
| | | width: 16px; |
| | | height: 14px; |
| | | } |
| | | } |
| | | .trans { |
| | | padding: 20px 0; |