| | |
| | | transformOrigin: 'center top', |
| | | }"> |
| | | <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader> |
| | | <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" :getResourceInfo="resourceListFun" |
| | | :interfaceQuestion="bookQuestionsList"> |
| | | </chapterOne> |
| | | <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" :getResourceInfo="resourceListFun" |
| | | :interfaceQuestion="bookQuestionsList"> |
| | | </chapterTwo> |
| | | <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" :getResourceInfo="resourceListFun" |
| | | :interfaceQuestion="bookQuestionsList"> |
| | | </chapterThree> |
| | | <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | :getResourceInfo="resourceListFun" :interfaceQuestion="bookQuestionsList"> |
| | | </chapterFour> |
| | | <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | :getResourceInfo="resourceListFun" :interfaceQuestion="bookQuestionsList"> |
| | | </chapterFive> |
| | | <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList" :getResourceInfo="resourceListFun" |
| | | :interfaceQuestion="bookQuestionsList"> |
| | | </chapterSix> |
| | | <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | :getResourceInfo="resourceListFun" :interfaceQuestion="bookQuestionsList"> |
| | | </chapterSeven> |
| | | </div> |
| | | </div> |
| | |
| | | <script> |
| | | import Vue from "vue"; |
| | | import pageHeader from "./header.vue"; |
| | | import chapterOne from "./chapter001.vue" |
| | | import chapterTwo from "./chapter002.vue" |
| | | import chapterThree from "./chapter003.vue" |
| | | import chapterFour from "./chapter004.vue" |
| | | import chapterFive from "./chapter005.vue" |
| | | import chapterSix from "./chapter006.vue" |
| | | import chapterSeven from "./chapter007.vue" |
| | | import chapterOne from "./chapter001.vue"; |
| | | import chapterTwo from "./chapter002.vue"; |
| | | import chapterThree from "./chapter003.vue"; |
| | | import chapterFour from "./chapter004.vue"; |
| | | import chapterFive from "./chapter005.vue"; |
| | | import chapterSix from "./chapter006.vue"; |
| | | import chapterSeven from "./chapter007.vue"; |
| | | import NoteIcon from "@/assets/images/biji.png"; |
| | | import MG from "@/assets/js/middleGround/WebMiddleGroundApi"; |
| | | import _ from "lodash"; |
| | | import Swiper from "swiper/bundle"; |
| | | import "swiper/swiper-bundle.css"; |
| | |
| | | audioPath: "", |
| | | currentTime: null, |
| | | videoList: [], |
| | | resourceList: {}, |
| | | resourceList: [], |
| | | bookQuestionsList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | // 启动页码观察 |
| | | setTimeout(() => { |
| | | this.initObservation(); |
| | | this.initThemeColor(); |
| | | }, 500); |
| | | }, |
| | | }, |
| | |
| | | this.initViewer(); |
| | | this.closeAudio(); |
| | | this.closeVideo(); |
| | | this.initThemeColor(); |
| | | }, 200); |
| | | }, |
| | | }, |
| | |
| | | resourceList: { |
| | | handler(newVal, oldVal) { |
| | | this.resourceList = newVal; |
| | | }, |
| | | }, |
| | | bookQuestionsList: { |
| | | handler(newVal, oldVal) { |
| | | this.bookQuestionsList = newVal; |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | threshold: 0, // 指定交叉比例,这里设为 0.5,表示当目标元素一半或更多显示在视窗中时触发回调函数。 |
| | | }); |
| | | |
| | | // this.getBookResourceList(); |
| | | this.getBookResourceList(); |
| | | // 获取整本书题目 |
| | | this.getBookQuestionList(); |
| | | |
| | | // 启动页码观察 |
| | | setTimeout(() => { |
| | | this.initObservation(); |
| | | this.initThemeColor(); |
| | | }, 500); |
| | | |
| | | // 测试页面跳转 |
| | | // setTimeout(() => { |
| | | // this.gotoPage(8, 143); |
| | | // this.gotoPage(7, 125); |
| | | // }, 500); |
| | | |
| | | // const pageDom = (this.container ? this.container : document) |
| | | // .querySelector("#app") |
| | | // .querySelectorAll(".page-box"); |
| | | // 检索 |
| | | // console.log(this.searchTextByPage("保护内脏器官"), "searchTextByPage"); |
| | | // 检索跳转 |
| | | // this.searchItemLocation({ |
| | | // catalog: 2, |
| | | // page: 10, |
| | | // txt: " 运动系统是由骨、骨连结和骨骼肌三部分组成的。全身的骨通过骨连结组成人体骨骼(见图1-1)。骨骼是人体的支架,具有保护内脏器官、供肌肉附着和作为肌肉运动的杠杆等作用。在神经系统的支配下,肌肉收缩牵动所附着的骨绕着关节转动,使身体产生各种动作。所以,运动系统具有运动、支持和保护等功能,幼年时期的骨骼还具有造血功能。 ", |
| | | // txtIndex: 57 |
| | | // }); |
| | | // }, 500); |
| | | |
| | | }, |
| | | methods: { |
| | | // setZoom1() { |
| | | // let scale = this.$store.state.qiankun.scale + 10; |
| | | // const scrollBox = ( |
| | | // this.container ? this.container : document |
| | | // ).querySelector(".page-main"); |
| | | // this.$store.commit("setZoom", scale); |
| | | // }, |
| | | // setZoom2() { |
| | | // let scale = this.$store.state.qiankun.scale - 10; |
| | | // const scrollBox = ( |
| | | // this.container ? this.container : document |
| | | // ).querySelector(".page-main"); |
| | | // this.$store.commit("setZoom", scale); |
| | | // }, |
| | | // 请求资源Json |
| | | async getBookResourceList() { |
| | | this.resourceList = await this.config.getBookResources( |
| | | process.env.VUE_APP_RESOURCE_CTX + (process.env.VUE_APP_ENV == "product" |
| | | getBookResourceList() { |
| | | this.config |
| | | .getBookResources( |
| | | process.env.VUE_APP_RESOURCE_CTX + |
| | | (process.env.VUE_APP_ENV == "product" |
| | | ? process.env.VUE_APP_BOOK_ID |
| | | : "clinicalDiseasesSummary") |
| | | ); |
| | | : "digitalDentalRestorationTechnology") |
| | | ) |
| | | .then((data) => { |
| | | this.resourceList = data; |
| | | }) |
| | | .catch((error) => { |
| | | console.error("获取图书资源列表失败:", error); |
| | | }); |
| | | }, |
| | | // 获取图书问题列表 |
| | | getBookQuestionList() { |
| | | let query = { |
| | | storeInfo: this.config.activeBook.storeRefcode, |
| | | path: "*", |
| | | cmsPath: this.config.activeBook.rootCmsItemId, |
| | | cmsType: "*", |
| | | productId: this.config.activeBook.bookId, |
| | | queryType: "*", |
| | | itemFields: { |
| | | Embedded_QuestionBank_Stem: [], |
| | | Embedded_QuestionBank_AnalysisCon: [], |
| | | Embedded_QuestionBank_Answer: [], |
| | | Embedded_QuestionBank_Option: [], |
| | | Embedded_QuestionBank_QuestionType: [], |
| | | Embedded_QuestionBank_StemStyle: [], |
| | | Embedded_QuestionBank_OptionStyle: [], |
| | | Embedded_QuestionBank_KnowledgePoint: [], |
| | | Embedded_QuestionBank_Difficulty: [], |
| | | }, |
| | | }; |
| | | MG.store |
| | | .getProductDetail(query) |
| | | .then((res) => { |
| | | let bookQuestionList = []; |
| | | if (res.datas.cmsDatas[0].datas.length > 0) { |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | if (item.datas.Type === "questionBankItem") { |
| | | bookQuestionList.push(item); |
| | | } |
| | | }); |
| | | } |
| | | this.bookQuestionsList = bookQuestionList; |
| | | }) |
| | | .catch((error) => { |
| | | console.error("获取图书问题列表失败:", error); |
| | | }); |
| | | }, |
| | | |
| | | resourceListFun(id, key) { |
| | | let data = this.resourceList.find(item => item.key == id) |
| | | return key ? data[key] : data |
| | | }, |
| | | |
| | | // 滚动监听 |
| | | scrollFun(event) { |
| | | this.handleVideoPicture(); |
| | |
| | | currentScrollTop >= |
| | | event.target.scrollHeight - this.loadThreshold |
| | | ) { |
| | | console.log(1); |
| | | |
| | | // 到达阈值 |
| | | if ( |
| | | this.showCatalogList[this.showCatalogList.length - 1] < |
| | |
| | | chapterFour, |
| | | chapterFive, |
| | | chapterSix, |
| | | chapterSeven |
| | | chapterSeven, |
| | | }; |
| | | // 遍历所有章节文件 |
| | | for (const key in pageData) { |
| | |
| | | chapterFour, |
| | | chapterFive, |
| | | chapterSix, |
| | | chapterSeven |
| | | chapterSeven, |
| | | }, |
| | | }; |
| | | </script> |