| | |
| | | <!-- 菜单内容 --> |
| | | <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="请输入内容" |
| | |
| | | <div :class="resourceType == 'teacher' ? '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('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> |
| | | <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> |
| | |
| | | </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')"> |
| | |
| | | ></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"> |
| | |
| | | </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"> |
| | |
| | | </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)"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="questionList" v-if="activeMenu == '习题'"> |
| | | <div class="questionList" v-if="activeMenu == '题库'" v-loading="listLoading"> |
| | | <div class="resourceSearchBox"> |
| | | <div class="inputBox"> |
| | | <el-input |
| | |
| | | <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> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | import moment from 'moment' |
| | | import dictionary from '@/views/components/dictionary.vue' |
| | | import newWord from '@/views/components/newWord.vue' |
| | | import wrongQuestion from '@/views/components/wrongQuestion.vue' |
| | | import { ElMessage, ElMessageBox, valueEquals } from 'element-plus' |
| | | import logo from '@/assets/images/header/logo.png' |
| | | import mulu from '@/assets/images/menu/mulu.png' |
| | |
| | | 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' |
| | |
| | | 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' |
| | |
| | | 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 |
| | | } |
| | | ] |
| | | teachToolsMenuData = [ |
| | |
| | | listLoading.value = false |
| | | }) |
| | | .catch(function (error) { |
| | | listLoading.value = false |
| | | console.log(error) |
| | | }) |
| | | } |
| | |
| | | }) |
| | | .catch(function (error) { |
| | | console.log(error) |
| | | listLoading.value = false |
| | | }) |
| | | } else { |
| | | ElMessageBox.confirm('请先登录!', { |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | 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: '去登录', |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | | } |
| | | |
| | | //错题本 |
| | | const wrongQuestionVisble = ref(false) |
| | | const selectExercisesType = (type) => { |
| | | exercisesType.value = type |
| | | searchText.value = '' |
| | | |
| | | if (type == 'exercises') { |
| | | getExercisesList() |
| | | } else if (type == 'wrong') { |
| | | questionList.value = [] |
| | | } else { |
| | | questionList.value = [] |
| | | } |
| | |
| | | break |
| | | case '检索': |
| | | break |
| | | case '习题': |
| | | case '题库': |
| | | getExercisesList() |
| | | break |
| | | } |
| | |
| | | case '书签': |
| | | getReMarkList() |
| | | break |
| | | case '习题': |
| | | case '题库': |
| | | getExercisesList() |
| | | break |
| | | case '检索': |
| | |
| | | case '检索': |
| | | allSearchReault.value = [] |
| | | break |
| | | case '习题': |
| | | case '题库': |
| | | getExercisesList() |
| | | break |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | showToolBox.value = false |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | router.push('/login') |
| | | if (sessionStorage.getItem('loginCtx')) { |
| | | window.open(sessionStorage.getItem('loginCtx')) |
| | | } else { |
| | | router.replace({ |
| | | path: '/login' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | |
| | | 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' |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |