| | |
| | | <div>默认资源</div> |
| | | <div :class="resourceType == 'default' ? 'text' : 'line'"></div> |
| | | </div> |
| | | <hr class="hr" /> |
| | | <div class="tabItem hover" @click="selectResourceType('teacher')"> |
| | | <hr class="hr" v-if="userInfo.role == 'Teacher'" /> |
| | | <div |
| | | class="tabItem hover" |
| | | @click="selectResourceType('teacher')" |
| | | v-if="userInfo.role == 'Teacher'" |
| | | > |
| | | <div>教师资源</div> |
| | | <div :class="resourceType == 'teacher' ? 'text' : 'line'"></div> |
| | | </div> |
| | |
| | | class="icon hover" |
| | | size="20" |
| | | @click="JumpPosition(item)" |
| | | v-if="resourceType == 'default'" |
| | | v-if="item.pagination" |
| | | > |
| | | <LocationInformation /> |
| | | </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> |
| | |
| | | </div> |
| | | <!-- 题库底部收藏夹和错题集 --> |
| | | <ul class="question-bottom" v-if="activeMenu == '题库'"> |
| | | <li @click="selectExercisesType('collection')">收藏夹</li> |
| | | <li @click="selectExercisesType('wrong')">错题本</li> |
| | | <li |
| | | @click="selectExercisesType('collection')" |
| | | v-if="bookConfig.textbookComponents.indexOf('A434F2C0') > -1" |
| | | > |
| | | <div><img :src="shouCang" class="hover" /></div> |
| | | <div>收藏夹</div> |
| | | </li> |
| | | <li |
| | | @click="selectExercisesType('wrong')" |
| | | v-if="bookConfig.textbookComponents.indexOf('AFC1A288') > -1" |
| | | > |
| | | <div><img :src="cuoTi" class="hover" /></div> |
| | | <div>错题本</div> |
| | | </li> |
| | | </ul> |
| | | <!-- 菜单内容收起 --> |
| | | <div class="menuStateBox" v-if="menuState.open"> |
| | |
| | | <!-- 画笔画布 --> |
| | | <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> |
| | |
| | | <div class="graphBox"> |
| | | <div class="graphSelect"> |
| | | <div class="flex1"> |
| | | <div class="square hover" @click="graphSelect('square')"></div> |
| | | <div :class="toolSelectData.graphType == 'square' ? 'acitveGraphType' : ''"> |
| | | <div class="square hover" @click="graphSelect('square')"></div> |
| | | </div> |
| | | </div> |
| | | <div class="flex1"> |
| | | <div class="rotundity hover" @click="graphSelect('rotundity')"></div> |
| | | <div |
| | | :class="toolSelectData.graphType == 'rotundity' ? 'acitveGraphType' : ''" |
| | | > |
| | | <div class="rotundity hover" @click="graphSelect('rotundity')"></div> |
| | | </div> |
| | | </div> |
| | | <div class="flex1"> |
| | | <div class="triangle hover" @click="graphSelect('triangle')"></div> |
| | | <div :class="toolSelectData.graphType == 'triangle' ? 'acitveGraphType' : ''"> |
| | | <div class="triangle hover" @click="graphSelect('triangle')"></div> |
| | | </div> |
| | | </div> |
| | | <div class="flex1"> |
| | | <div class="lineSegment hover" @click="graphSelect('lineSegment')">/</div> |
| | | <div |
| | | :class="toolSelectData.graphType == 'lineSegment' ? 'acitveGraphType' : ''" |
| | | > |
| | | <div class="lineSegment hover" @click="graphSelect('lineSegment')">/</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="lineStyle"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 白板 --> |
| | | <div v-if="whiteBoard" class="whiteBoardBox"> |
| | | <whiteBoardBox @whiteBoardClose="whiteBoardClose"></whiteBoardBox> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | title="资源" |
| | | align-center |
| | |
| | | <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> --> |
| | |
| | | title="AI智能问答" |
| | | align-center |
| | | v-model="wendaVisible" |
| | | width="60%" |
| | | width="80%" |
| | | class="myAnserDialogs" |
| | | > |
| | | <div class="wendabox"> |
| | | <iframe src="https://yiyan.baidu.com/" frameborder="0"></iframe> |
| | | <iframe :src="aiQuestion" frameborder="0"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="词典" align-center v-model="cidianVisible" width="60%" class="myAnserDialogs"> |
| | | <div class="wendabox"> |
| | | <!-- <iframe src="https://www.vocabulary.com/" frameborder="0"></iframe> --> |
| | | <dictionary /> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="名词索引" |
| | | align-center |
| | | v-model="nounIndexVisible" |
| | | width="80%" |
| | | class="myAnserDialogs" |
| | | > |
| | | <div class="nounBox"> |
| | | <div class="leftBox"> |
| | | <ul> |
| | | <li |
| | | v-for="item in nounIndexData" |
| | | class="itemIndex" |
| | | :class="{ activeNoun: item == activeNoun }" |
| | | :key="item" |
| | | @click="clickNounIndex(item)" |
| | | > |
| | | {{ item }} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div class="rightBox"> |
| | | <div class="searchBox"> |
| | | <el-input |
| | | v-model="nounIndexKeyWords" |
| | | placeholder="请输入搜索关键字" |
| | | style="width: 70%" |
| | | > |
| | | <template #append> |
| | | <el-button @click="searchNounIndex" :icon="Search" /> |
| | | </template> |
| | | </el-input > |
| | | <el-select |
| | | v-model="nounState" |
| | | class="m-2" |
| | | placeholder="Select" |
| | | size="large" |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="item in nounOption" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <div class="collapseBox"> |
| | | <el-collapse v-model="activeNames" @change="handleChange"> |
| | | <el-collapse-item :name="index + 1" v-for="(item, index) in temp_nounIndexList" :key="index"> |
| | | <template #title> |
| | | <div class="collapseTitle"> |
| | | <div class="titleName"> |
| | | {{ item.name + `(${item.english})` }} |
| | | </div> |
| | | <div class="pageInfoBox"> |
| | | <div class="pageItem" @click.stop="toPage(citem)" v-for="(citem, cindex) in item.pageInfo" :key="cindex"> |
| | | <el-icon><Position /></el-icon> {{citem}} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <div style="padding: 10px"> |
| | | {{ item.explain }} |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | </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> |
| | |
| | | <wrongQuestion /> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="公式编辑" |
| | | align-center |
| | | v-model="formulaDialog" |
| | | class="myDialogs" |
| | | > |
| | | <el-dialog title="公式编辑" align-center v-model="formulaDialog" class="myDialogs"> |
| | | <div class="wendabox"> |
| | | <formula /> |
| | | </div> |
| | |
| | | <!-- <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') |
| | | import { Search } from '@element-plus/icons-vue' |
| | | //获取路由器 |
| | | let router = useRouter() |
| | | //获取当前路由的信息 |
| | |
| | | import formula from '@/views/components/formula.vue' |
| | | import wrongQuestion from '@/views/components/wrongQuestion.vue' |
| | | import voiceReader from '@/views/components/voiceReader.vue' |
| | | import whiteBoardBox from '@/views/components/whiteBoard.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' |
| | |
| | | import shanchu from '@/assets/images/operation/delete.png' |
| | | import bianji from '@/assets/images/operation/bianji.png' |
| | | import video from '@/assets/images/content/resource.png' |
| | | |
| | | import shouCang from '@/assets/images/menu/shouCang.svg' |
| | | import cuoTi from '@/assets/images/menu/cuoTi.svg' |
| | | //引入VueOfficeDocx组件 |
| | | import VueOfficeDocx from '@vue-office/docx' |
| | | //引入相关样式 |
| | |
| | | import { loadMicroApp } from 'qiankun' |
| | | import { microApps } from '@/child.ts' |
| | | import { open } from 'fs' |
| | | let token = localStorage.getItem('token') |
| | | const canvasWith = ref(1000) |
| | | import { digitalTextbooks, tokenKey } from '@/assets/js/config.ts' |
| | | let token = localStorage.getItem(tokenKey) |
| | | const canvasWith = ref(800) |
| | | const canvasheight = ref(3000) |
| | | const screenWidth = ref( |
| | | window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth |
| | |
| | | const bookInfo = ref() |
| | | const isBuy = ref(false) |
| | | const tryPageCount = ref(0) |
| | | const nounIndexKeyWords = ref('') |
| | | const searchText = ref() |
| | | |
| | | const nounIndexData = reactive([ |
| | | 'a', |
| | | 'b', |
| | | 'c', |
| | | 'd', |
| | | 'e', |
| | | 'f', |
| | | 'g', |
| | | 'h', |
| | | 'i', |
| | | 'j', |
| | | 'k', |
| | | 'l', |
| | | 'm', |
| | | 'n', |
| | | 'o', |
| | | 'p', |
| | | 'q', |
| | | 'r', |
| | | 's', |
| | | 't', |
| | | 'u', |
| | | 'v', |
| | | 'w', |
| | | 'x', |
| | | 'y', |
| | | 'z' |
| | | ]) |
| | | |
| | | |
| | | const searchNounIndex = () => { |
| | | console.log(nounIndexKeyWords.value); |
| | | if (nounIndexKeyWords.value) { |
| | | temp_nounIndexList.value = temp_nounIndexList.value.filter(item => item.name.toLowerCase().includes(nounIndexKeyWords.value.toLowerCase())) |
| | | }else{ |
| | | temp_nounIndexList.value = nounIndexList.value |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | if (token) { |
| | | getUserInfo() |
| | |
| | | if (localStorage.getItem('bookId')) { |
| | | getBookInfo() |
| | | } |
| | | temp_nounIndexList.value = nounIndexList.value |
| | | setTimeout(() => { |
| | | canvasWith.value = document.querySelector('.content-box').offsetWidth |
| | | canvasheight.value = document.querySelector('.content-box').offsetHeight |
| | |
| | | window.qiankunState.initTestBook(localStorage.getItem('bookId') + '', tryPageCount.value) |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | // 定义父层方法 |
| | |
| | | // if (window.qiankunState && window.qiankunState.getAnswers){ |
| | | // window.qiankunState.getAnswers(localStorage.getItem("")) |
| | | // } |
| | | |
| | | }) |
| | | |
| | | onBeforeUnmount(() => { |
| | |
| | | |
| | | const getBookInfo = () => { |
| | | const obj = { |
| | | storeInfo: 'jsek_digitalTextbooks', |
| | | storeInfo: digitalTextbooks, |
| | | path: '*', |
| | | queryType: '*', |
| | | coverSize: { |
| | |
| | | } |
| | | } |
| | | 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 |
| | | if (res.datas.length > 0) { |
| | | bookInfo.value = res.datas[0] |
| | | if (res.datas[0].purchasedSaleMethodIdList.indexOf(res.datas[0].defaultSaleMethodId) > -1) { |
| | | isBuy.value = true |
| | | } else { |
| | | isBuy.value = false |
| | | } |
| | | tryPageCount.value = Number(res.datas[0].probationPage) |
| | | } else { |
| | | isBuy.value = false |
| | | tryPageCount.value = 0 |
| | | } |
| | | tryPageCount.value = Number(res.datas[0].probationPage) |
| | | }) |
| | | } |
| | | |
| | |
| | | name: '知识图谱', |
| | | icon: zhishitupu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('6BE6A3DC') > -1 |
| | | }, |
| | | { |
| | | name: '截图', |
| | | icon: jietu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('CB0EACEC') > -1 |
| | | // isShow: true |
| | | }, |
| | | { |
| | | name: '书签', |
| | |
| | | bookConfig.value.textbookComponents.indexOf('AFC1A288') > -1 || |
| | | bookConfig.value.textbookComponents.indexOf('A434F2C0') > -1 || |
| | | bookConfig.value.textbookComponents.indexOf('A4821F71') > -1 |
| | | }, |
| | | { |
| | | name: '截图', |
| | | icon: jietu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('CB0EACEC') > -1 |
| | | } |
| | | ] |
| | | teachToolsMenuData = [ |
| | |
| | | name: '番茄闹钟', |
| | | icon: fanqiezhong, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('E4DC9777') > -1 |
| | | }, |
| | | { |
| | | name: '待办事项', |
| | | icon: daiban, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('FA3A4284') > -1 |
| | | }, |
| | | { |
| | | name: '名词索引', |
| | | icon: ziyuan, |
| | | isShow: true |
| | | } |
| | | // { |
| | | // name: '番茄闹钟', |
| | | // icon: fanqiezhong, |
| | | // isShow: true |
| | | // } |
| | | ] |
| | | floatingToolBox = [ |
| | | { |
| | | icon: huabi, |
| | | name: '画笔', |
| | | // isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1 |
| | | isShow: true |
| | | isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1 |
| | | // isShow: true |
| | | }, |
| | | { |
| | | icon: baiban, |
| | | name: '白板', |
| | | isShow: bookConfig.value.textbookComponents.indexOf('029DB3E0') > -1 |
| | | // isShow: true |
| | | }, |
| | | { |
| | | icon: biaozhu, |
| | |
| | | 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) |
| | | window.qiankunState.gotoPage(chapter, start) |
| | | localStorage.removeItem('chapter') |
| | | localStorage.removeItem('startPage') |
| | | } |
| | |
| | | }) |
| | | .catch(function (error) { |
| | | listLoading.value = false |
| | | |
| | | }) |
| | | } |
| | | const defaultProps = { |
| | |
| | | } |
| | | |
| | | const handleNodeClick = (data) => { |
| | | if (!isBuy.value) { |
| | | if (!isBuy.value && tryPageCount.value > 0) { |
| | | if (data.start < tryPageCount.value) { |
| | | headerData.process = data.start |
| | | if (window.qiankunState && window.qiankunState.gotoPage) |
| | |
| | | const playIndex = ref(null) //音频播放 |
| | | const audioPlayer = ref(null) |
| | | const collectResourceList = ref([]) |
| | | |
| | | const clickNounIndex = (value) => { |
| | | activeNoun.value = value |
| | | } |
| | | |
| | | const temp_nounIndexList = ref([]) |
| | | |
| | | |
| | | const nounIndexList = ref( |
| | | [ |
| | | { |
| | | name: '鞍背', |
| | | english: 'dorsum sellae', |
| | | pageInfo: ['p36' ,'p93'], |
| | | explain: |
| | | '鞍背是马背的一部分,位于马背的前部,是马背的支撑部分。鞍背的形状和质地对马的舒适性和骑乘体验有很大影响。' |
| | | }, |
| | | { |
| | | name: '鞍膈', |
| | | english: 'diaphragma sellae', |
| | | pageInfo: ['p36'], |
| | | explain: |
| | | '鞍膈是马背的一部分,位于马背的前部,是马背的支撑部分。鞍膈的形状和质地对马的舒适性和骑乘体验有很大影响。' |
| | | }, |
| | | { |
| | | name: '鞍状关节', |
| | | english: 'saddle joint', |
| | | pageInfo: ['p36'], |
| | | explain: |
| | | '鞍状关节是马背的一部分,位于马背的前部,是马背的支撑部分。鞍状关节的形状和质地对马的舒适性和骑乘体验有很大影响。' |
| | | } |
| | | ] |
| | | ) |
| | | |
| | | const getResourceData = () => { |
| | | if (token) { |
| | | imgPreviewList.value = [] |
| | |
| | | item.icon = '' |
| | | } |
| | | if (resourceType.value == 'default') { |
| | | if (item.isTeacherResource == '否') { |
| | | if (item.isDefaultResource == '是') { |
| | | defaultResourceList.value.push(item) |
| | | } |
| | | } else { |
| | | if (item.isTeacherResource == '是') { |
| | | if (item.isTeacherResource == '是' && item.isDefaultResource == '否') { |
| | | teacherResourceList.value.push(item) |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | if (!activeClassify.value) { |
| | | activeClassify.value = classifySelectList.value[0].key |
| | | activeClassify.value = classifySelectList.value[0]?.key |
| | | defaultResourceList.value.forEach((resItem1) => { |
| | | if (resItem1.resourceType == classifySelectList.value[0].title) { |
| | | 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) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | if (!activeClassify.value) { |
| | | activeClassify.value = classifySelectList.value[0].key |
| | | activeClassify.value = classifySelectList.value[0]?.key |
| | | teacherResourceList.value.forEach((resItem1) => { |
| | | if (resItem1.resourceType == classifySelectList.value[0].title) { |
| | | 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) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | } |
| | | //资源播放视频 |
| | | 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) { |
| | |
| | | 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 |
| | | 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' || |
| | | data.resourceType == 'WORD' |
| | | ) { |
| | | 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.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 = () => { |
| | |
| | | } |
| | | } |
| | | |
| | | const toPage = (data) => { |
| | | nounIndexVisible.value = false |
| | | |
| | | window.qiankunState.gotoPage(1, 4) |
| | | } |
| | | |
| | | //资源类型选择默认/教师 |
| | | const selectResourceType = (type) => { |
| | | resourceType.value = type |
| | | resourceDataList.value = [] |
| | | classifySelectList.value = [] |
| | | activeClassify.value = '' |
| | | searchText.value = '' |
| | | if (type == 'collect') { |
| | | getCollectResource() |
| | |
| | | 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) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | const menuItemClick = (name) => { |
| | | searchText.value = '' |
| | | allSearchReault.value = [] |
| | | listLoading.value = false |
| | | if (menuState.open && activeMenu.value == name) { |
| | | menuState.open = false |
| | | } else { |
| | |
| | | open: true, |
| | | notesColor: 'all' //笔记颜色 |
| | | }) |
| | | |
| | | const nounOption = [ |
| | | { label: '显示名词解释', key: 'showExplain', value: true }, |
| | | { label: '隐藏名词解释', key: 'hideExplain', value: false } |
| | | ] |
| | | const nounState = ref(true) |
| | | const activeNoun = ref('a') |
| | | |
| | | const settingForm = reactive({ |
| | | fontSizeList: [ |
| | |
| | | getExercisesList() |
| | | break |
| | | case '检索': |
| | | listLoading.value = true |
| | | allSearchReault.value = [] |
| | | console.log(window.qiankunState.searchBookByKeyword) |
| | | if (window.qiankunState && window.qiankunState.searchBookByKeyword) { |
| | | console.log(window.qiankunState.searchBookByKeyword) |
| | | let searchReault = window.qiankunState.searchBookByKeyword(searchText.value) |
| | | if (searchReault.length > 0) { |
| | | listLoading.value = true |
| | | let catalogueList = sortArr(catalogueData.value, 'chapter') |
| | | if (catalogueList.length > 0) { |
| | | catalogueList.forEach((item) => { |
| | |
| | | } |
| | | }) |
| | | } |
| | | console.log(allSearchReault.value, 444) |
| | | listLoading.value = false |
| | | } else { |
| | | listLoading.value = false |
| | | } |
| | | } |
| | |
| | | break |
| | | } |
| | | } |
| | | |
| | | type pomodoroType = InstanceType<typeof Pomodoro> |
| | | const baiduVisible = ref(false) |
| | | const wendaVisible = ref(false) |
| | | const nounIndexVisible = 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 aiQuestion = ref('') |
| | | const selectTeachTools = (item: any) => { |
| | | if (token) { |
| | | activeTool.value = item.name |
| | | switch (item.name) { |
| | | case 'AI智能问答': |
| | | aiQuestion.value = '' |
| | | wendaVisible.value = true |
| | | aiQuestion.value = bookConfig.value.aiQuestion |
| | | ? bookConfig.value.aiQuestion |
| | | : 'https://yiyan.baidu.com/' |
| | | break |
| | | case 'GGB函数工具': |
| | | functionVisible.value = true |
| | |
| | | siweiVisble.value = true |
| | | break |
| | | case '模型工具': |
| | | modelToolVisble.value = true |
| | | modelTool.value = true |
| | | break |
| | | case '词典': |
| | | cidianVisible.value = true |
| | |
| | | break |
| | | case '计算器': |
| | | calculatorVisble.value = true |
| | | case '番茄闹钟': |
| | | pomodoroRef.value.setDialogVisable(true) |
| | | break |
| | | case '名词索引': |
| | | nounIndexVisible.value = true |
| | | break |
| | | } |
| | | } else { |
| | |
| | | |
| | | //画布悬浮操作 |
| | | |
| | | let canvas = null |
| | | let canvasBox: any = null |
| | | const floatingToolData = reactive({ |
| | | activeToolData: '', //选中工具 |
| | | activeBookmark: '', //选中书签 |
| | |
| | | |
| | | //画布 |
| | | const canvasShow = ref(false) |
| | | let textBox: any = null |
| | | let activeElBox: any = null |
| | | //白板 |
| | | const whiteBoard = ref(false) |
| | | |
| | | //截图事件 |
| | | const nameRef = ref() |
| | |
| | | |
| | | //浮窗工具栏点击事件 |
| | | const floatItemHandle = (item) => { |
| | | console.log(floatingToolData.activeToolData, 'floatingToolData.activeToolData') |
| | | if (floatingToolData.activeToolData == '画笔') { |
| | | floatingToolData.activeToolData = '' |
| | | } else { |
| | |
| | | } |
| | | |
| | | canvasShow.value = false |
| | | whiteBoard.value = false |
| | | switch (floatingToolData.activeToolData) { |
| | | case '画笔': |
| | | canvasShow.value = true |
| | | toolSelectData.activeTool = 'huabi' |
| | | canvasBox = new fabric.Canvas('canvasRef') |
| | | canvasBox.setZoom(1) // 设置画布缩放比例为1 |
| | | canvasBox.absolutePan({ x: 0, y: 0 }) |
| | | break |
| | | case '白板': |
| | | whiteBoard.value = true |
| | | break |
| | | case '标记': |
| | | break |
| | |
| | | const toolSelectHandle = (title) => { |
| | | toolSelectData.activeTool = title |
| | | toolSelectData.lineColorActive = '' |
| | | canvasBox.isDrawingMode = false |
| | | switch (title) { |
| | | case 'huabi': |
| | | init() |
| | | canvasBox.skipTargetFind = false |
| | | canvasBox.isDrawingMode = true |
| | | toolSelectData.graphType = '' |
| | | canvasBox.freeDrawingBrush.color = '#333' |
| | | canvasBox.freeDrawingBrush.width = '3' |
| | | canvasBox.on('mouse:down', '') // 鼠标在画布上按下 |
| | | canvasBox.on('mouse:up', '') |
| | | canvasBox.on('mouse:move', '') |
| | | break |
| | | case 'wenzi': |
| | | canvasBox.skipTargetFind = false |
| | | canvasBox.isDrawingMode = false |
| | | toolSelectData.graphType = '' |
| | | textBox = new fabric.IText('请输入文本', { |
| | | left: 50, |
| | | top: 50, |
| | | fontSize: toolSelectData.fontSizeActive |
| | | }) |
| | | canvasBox.add(textBox) |
| | | canvasBox.on('mouse:down', '') // 鼠标在画布上按下 |
| | | canvasBox.on('mouse:up', '') |
| | | canvasBox.on('mouse:move', '') |
| | | break |
| | | case 'tuxing': |
| | | canvasBox.isDrawingMode = false |
| | | canvasBox.selectionColor = 'transparent' |
| | | canvasBox.skipTargetFind = true |
| | | toolSelectData.lineColorActive = '#000' |
| | | break |
| | | case 'chexiao': |
| | | canvasBox.skipTargetFind = false |
| | | canvasBox.isDrawingMode = false |
| | | canvasBox.remove(activeElBox) |
| | | canvasBox.requestRenderAll() |
| | | activeElBox = null |
| | | break |
| | | case 'tuichu': |
| | | canvasBox.skipTargetFind = false |
| | | canvasBox.isDrawingMode = false |
| | | canvasShow.value = false |
| | | floatingToolData.activeToolData = '' |
| | | break |
| | | case 'qingchu': |
| | | canvas.clear() |
| | | canvasBox.clear() |
| | | break |
| | | } |
| | | } |
| | |
| | | //选中画笔粗细 |
| | | const selectThickness = (str) => { |
| | | toolSelectData.thicknessActive = str |
| | | canvas.freeDrawingBrush.color = toolSelectData.thicknessActive |
| | | canvasBox.freeDrawingBrush.width = toolSelectData.thicknessActive |
| | | } |
| | | |
| | | const selectLineType = (str) => { |
| | | toolSelectData.lineTypeActive = str |
| | | init() |
| | | if (toolSelectData.lineTypeActive == 'dashed') { |
| | | canvasBox.freeDrawingBrush.strokeDashArray = [10] |
| | | } else { |
| | | canvasBox.freeDrawingBrush.strokeDashArray = null |
| | | } |
| | | } |
| | | //画笔颜色选择 |
| | | const lineColorSelect = (item) => { |
| | | toolSelectData.lineColorActive = item.key |
| | | canvas.freeDrawingBrush.color = item.key |
| | | } |
| | | //画布属性 |
| | | const isDrawing = ref(true) // 是否开启绘图,true 开启;false 关闭 |
| | | const init = () => { |
| | | canvas = new fabric.Canvas('canvasRef', { |
| | | isDrawingMode: isDrawing.value // 启用绘画模式 |
| | | }) |
| | | canvas.freeDrawingBrush.color = toolSelectData.lineColorActive |
| | | canvas.freeDrawingBrush.width = toolSelectData.thicknessActive |
| | | if (toolSelectData.activeTool == 'huabi') { |
| | | canvasBox.freeDrawingBrush.color = item.key |
| | | } |
| | | if (toolSelectData.activeTool == 'wenzi') { |
| | | textBox.fill = toolSelectData.lineColorActive |
| | | } |
| | | } |
| | | |
| | | //文字大小 |
| | | const selectfontSize = (str) => { |
| | | toolSelectData.fontSizeActive = str |
| | | textBox.fontSize = toolSelectData.fontSizeActive |
| | | } |
| | | |
| | | //选择图形 |
| | |
| | | toolSelectData.graphType = type |
| | | switch (type) { |
| | | case 'square': |
| | | canvasBox.on('mouse:down', canvasMouseDown) // 鼠标在画布上按下 |
| | | canvasBox.on('mouse:up', canvasMouseUp) |
| | | canvasBox.selectionBorderColor = toolSelectData.lineColorActive |
| | | break |
| | | case 'rotundity': |
| | | canvasBox.on('mouse:down', canvasMouseDown) // 鼠标在画布上按下 |
| | | canvasBox.on('mouse:up', canvasMouseUp) |
| | | canvasBox.on('mouse:move', canvasMouseMove) |
| | | break |
| | | case 'triangle': |
| | | canvasBox.on('mouse:down', canvasMouseDown) // 鼠标在画布上按下 |
| | | canvasBox.on('mouse:up', canvasMouseUp) |
| | | canvasBox.on('mouse:move', canvasMouseMove) |
| | | break |
| | | case 'lineSegment': |
| | | canvasBox.on('mouse:down', canvasMouseDown) // 鼠标在画布上按下 |
| | | canvasBox.on('mouse:move', canvasMouseMove) // 鼠标在画布上移动 |
| | | canvasBox.on('mouse:up', canvasMouseUp) |
| | | break |
| | | } |
| | | } |
| | | |
| | | let downPoint = null // 鼠标按下的坐标 |
| | | let upPoint = null |
| | | let currentCircle = null // 临时圆,创建圆的时候使用 |
| | | let currentTriangle = null // 临时三角形 |
| | | let currentLine = null // 临时线段 |
| | | function canvasOnMouseDownDel(opt) { |
| | | // 右键,且在元素上右键 |
| | | // button: 1-左键;2-中键;3-右键 |
| | | // 在画布上右键,target 为 null |
| | | if (opt.button === 1 && opt.target) { |
| | | // 获取当前元素 |
| | | activeElBox = opt.target |
| | | } |
| | | } |
| | | // 鼠标在画布上按下 |
| | | function canvasMouseDown(e) { |
| | | downPoint = e.absolutePointer |
| | | if (toolSelectData.graphType === 'rotundity') { |
| | | currentCircle = new fabric.Circle({ |
| | | top: downPoint.y, |
| | | left: downPoint.x, |
| | | radius: 0, |
| | | fill: 'transparent', |
| | | stroke: toolSelectData.lineColorActive |
| | | }) |
| | | |
| | | canvasBox.add(currentCircle) |
| | | } |
| | | if (toolSelectData.graphType === 'triangle') { |
| | | currentTriangle = new fabric.Triangle({ |
| | | top: downPoint.y, |
| | | left: downPoint.x, |
| | | width: 0, |
| | | height: 0, |
| | | fill: 'transparent', |
| | | stroke: toolSelectData.lineColorActive |
| | | }) |
| | | canvasBox.add(currentTriangle) |
| | | } |
| | | if (toolSelectData.graphType === 'lineSegment') { |
| | | currentLine = new fabric.Line( |
| | | [ |
| | | downPoint.x, |
| | | downPoint.y, // 起始点坐标 |
| | | downPoint.x, |
| | | downPoint.y // 结束点坐标 |
| | | ], |
| | | { |
| | | stroke: toolSelectData.lineColorActive // 笔触颜色 |
| | | } |
| | | ) |
| | | canvasBox.add(currentLine) |
| | | } |
| | | } |
| | | // 鼠标在画布上松开 |
| | | function canvasMouseUp(e) { |
| | | if (toolSelectData.graphType === 'square') { |
| | | // 创建矩形 |
| | | createRect(e.absolutePointer) |
| | | } |
| | | |
| | | if (toolSelectData.graphType === 'rotundity') { |
| | | if (JSON.stringify(downPoint) === JSON.stringify(upPoint)) { |
| | | canvasBox.remove(currentCircle) |
| | | } else { |
| | | if (currentCircle) { |
| | | currentCircle.set('stroke', toolSelectData.lineColorActive) |
| | | } |
| | | } |
| | | currentCircle = null |
| | | } |
| | | |
| | | if (toolSelectData.graphType === 'triangle') { |
| | | if (JSON.stringify(downPoint) === JSON.stringify(upPoint)) { |
| | | canvasBox.remove(currentTriangle) |
| | | } else { |
| | | currentTriangle.set('stroke', toolSelectData.lineColorActive) |
| | | } |
| | | currentTriangle = null |
| | | } |
| | | |
| | | if (toolSelectData.graphType === 'lineSegment') { |
| | | if (JSON.stringify(downPoint) === JSON.stringify(upPoint)) { |
| | | canvasBox.remove(currentLine) |
| | | } else { |
| | | currentLine.set('stroke', toolSelectData.lineColorActive) |
| | | } |
| | | currentLine = null |
| | | } |
| | | } |
| | | // 创建矩形 |
| | | function createRect(pointer) { |
| | | // 点击事件,不生成矩形 |
| | | if (JSON.stringify(downPoint) === JSON.stringify(pointer)) { |
| | | return |
| | | } |
| | | |
| | | // 创建矩形 |
| | | // 矩形参数计算 |
| | | let top = Math.min(downPoint.y, pointer.y) |
| | | let left = Math.min(downPoint.x, pointer.x) |
| | | let width = Math.abs(downPoint.x - pointer.x) |
| | | let height = Math.abs(downPoint.y - pointer.y) |
| | | |
| | | // 矩形对象 |
| | | const rect = new fabric.Rect({ |
| | | top, |
| | | left, |
| | | width, |
| | | height, |
| | | fill: 'transparent', |
| | | stroke: toolSelectData.lineColorActive |
| | | }) |
| | | // 将矩形添加到画布上 |
| | | canvasBox.add(rect) |
| | | downPoint = null |
| | | } |
| | | // 鼠标在画布上移动 |
| | | function canvasMouseMove(e) { |
| | | if (toolSelectData.graphType === 'rotundity' && currentCircle) { |
| | | const currentPoint = e.absolutePointer |
| | | |
| | | let radius = |
| | | Math.min(Math.abs(downPoint.x - currentPoint.x), Math.abs(downPoint.y - currentPoint.y)) / 2 |
| | | let top = currentPoint.y > downPoint.y ? downPoint.y : downPoint.y - radius * 2 |
| | | let left = currentPoint.x > downPoint.x ? downPoint.x : downPoint.x - radius * 2 |
| | | |
| | | currentCircle.set('radius', radius) |
| | | currentCircle.set('top', top) |
| | | currentCircle.set('left', left) |
| | | |
| | | canvasBox.requestRenderAll() |
| | | } |
| | | if (toolSelectData.graphType === 'triangle' && currentTriangle) { |
| | | const currentPoint = e.absolutePointer |
| | | |
| | | let width = Math.abs(downPoint.x - currentPoint.x) |
| | | let height = Math.abs(downPoint.y - currentPoint.y) |
| | | |
| | | let top = currentPoint.y > downPoint.y ? downPoint.y : currentPoint.y |
| | | let left = currentPoint.x > downPoint.x ? downPoint.x : currentPoint.x |
| | | |
| | | currentTriangle.set('width', width) |
| | | currentTriangle.set('height', height) |
| | | currentTriangle.set('top', top) |
| | | currentTriangle.set('left', left) |
| | | canvasBox.requestRenderAll() |
| | | } |
| | | if (toolSelectData.graphType === 'lineSegment' && currentLine) { |
| | | const currentPoint = e.absolutePointer |
| | | |
| | | currentLine.set('x2', currentPoint.x) |
| | | currentLine.set('y2', currentPoint.y) |
| | | |
| | | canvasBox.requestRenderAll() |
| | | } |
| | | } |
| | | |
| | | //白板关闭 |
| | | const whiteBoardClose = () => { |
| | | whiteBoard.value = false |
| | | floatingToolData.activeToolData = '' |
| | | } |
| | | //标记显示隐藏 |
| | | const labelShow = (str) => { |
| | |
| | | |
| | | //跳转 |
| | | const goReMark = (item) => { |
| | | console.log(item) |
| | | if (window.qiankunState && window.qiankunState.gotoPage) { |
| | | window.qiankunState.gotoPage(Number(item.chapterNum), Number(item.page)) |
| | | } |
| | |
| | | } |
| | | //取消回调 |
| | | const closeFn = (base64: any) => { |
| | | console.log(base64) |
| | | floatingToolData.activeToolData = '' |
| | | } |
| | | //保存截图 |
| | |
| | | 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 |
| | |
| | | |
| | | 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 |
| | | } |
| | |
| | | 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) => { |
| | |
| | | }) |
| | | } |
| | | } |
| | | console.log(scribeData.noteList, 'scribeData.noteList') |
| | | } |
| | | listLoading.value = false |
| | | }) |
| | |
| | | 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 |
| | | } |
| | | |
| | |
| | | |
| | | //笔记跳转 |
| | | const jumpContent = (item) => { |
| | | console.log(item) |
| | | if (window.qiankunState && window.qiankunState.gotoPage) { |
| | | window.qiankunState.gotoPage(Number(item.chapterNum), Number(item.page)) |
| | | } |
| | |
| | | |
| | | //菜单笔记编辑 |
| | | const update = (item) => { |
| | | console.log(item) |
| | | dialogToolData.chapter = item.chapterNum |
| | | noteColorActive.value = item.color |
| | | formData.id = item.id |
| | |
| | | } |
| | | ]) |
| | | .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 |
| | | } |
| | | }) |
| | |
| | | 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> |
| | | |
| | |
| | | border: 1px solid #cfcfcf; |
| | | border-radius: 10px; |
| | | background-color: #f9f9f9; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | text-align: center; |
| | | padding-top: 10px; |
| | | // display: flex; |
| | | // justify-content: center; |
| | | // align-items: center; |
| | | img { |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | li > div { |
| | | // height: 50px; |
| | | padding: 10px 36px; |
| | | padding: 10px 36px 10px 25px; |
| | | font-size: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | |
| | | .wendabox { |
| | | width: 100%; |
| | | height: 95vh; |
| | | height: 82vh; |
| | | padding: 20px; |
| | | |
| | | iframe { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .whiteBoardBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: 2000; |
| | | background-color: rgba(2, 2, 2, 0.3); |
| | | } |
| | | |
| | | .myDialogs, |
| | |
| | | right: 0px !important; |
| | | } |
| | | |
| | | .el-dialog__body { |
| | | padding: 20px !important; |
| | | } |
| | | // .el-dialog__body { |
| | | // padding: 20px !important; |
| | | // } |
| | | |
| | | .el-dialog__footer { |
| | | padding: 10px 20px 20px !important; |
| | |
| | | } |
| | | |
| | | .myAnserDialogs { |
| | | width: 700px; |
| | | width: 80%; |
| | | height: 90vh; |
| | | } |
| | | |
| | |
| | | |
| | | .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 { |
| | |
| | | left: 50px; |
| | | } |
| | | .iframe-box { |
| | | width:100%; |
| | | width: 100%; |
| | | height: 800px; |
| | | } |
| | | |
| | | .nounBox { |
| | | display: flex; |
| | | padding: 10px; |
| | | height: 82vh; |
| | | width: 100%; |
| | | .leftBox { |
| | | width: 50px; |
| | | height: 100%; |
| | | border: 1px solid #ccc; |
| | | overflow-y: scroll; |
| | | } |
| | | } |
| | | .leftBox::-webkit-scrollbar { |
| | | display: none; /* 对于Chrome, Safari, Edge */ |
| | | } |
| | | .itemIndex { |
| | | width: 100%; |
| | | height: 50px; |
| | | text-align: center; |
| | | line-height: 50px; |
| | | border-bottom: 1px solid #ccc; |
| | | } |
| | | .itemIndex:last-child { |
| | | border-bottom: none; |
| | | } |
| | | .activeNoun { |
| | | background-color: #0093ff; |
| | | color: #fff; |
| | | } |
| | | .rightBox { |
| | | width: calc(100% - 50px); |
| | | border: 1px solid #ccc; |
| | | padding: 10px; |
| | | .searchBox { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | } |
| | | .rightBox { |
| | | width: calc(100% - 50px); |
| | | border: 1px solid #ccc; |
| | | padding: 10px; |
| | | .searchBox { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | } |
| | | .collapseBox{ |
| | | margin-top: 20px; |
| | | padding: 10px 20px; |
| | | } |
| | | .collapseTitle { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 5px; |
| | | } |
| | | .pageInfoBox{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .pageItem{ |
| | | margin-right: 10px; |
| | | text-align: center; |
| | | } |
| | | .titleName:hover { |
| | | color: #0093ff; |
| | | } |
| | | .pageItem:hover { |
| | | color: #0093ff; |
| | | } |
| | | </style> |