| | |
| | | <div id="searchDomBox" style="display: none"> |
| | | <div id="searchContent"></div> |
| | | </div> |
| | | <div class="page-content" :style="{ |
| | | <div |
| | | class="page-content" |
| | | :style="{ |
| | | fontSize: fontSize + 'px', |
| | | transform: `scale(${pageZoom})`, |
| | | transformOrigin: 'center top', |
| | | }"> |
| | | <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader> |
| | | <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | }" |
| | | > |
| | | <pageHeader |
| | | v-if="showCatalogList.indexOf(1) > -1" |
| | | :showPageList="loadPageList" |
| | | |
| | | ></pageHeader> |
| | | <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" |
| | | :resourceList="resourceList" |
| | | > |
| | | </chapterTwo> |
| | | <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterThree |
| | | v-if="showCatalogList.indexOf(4) > -1" |
| | | :showPageList="loadPageList" |
| | | :resourceList="resourceList" |
| | | > |
| | | </chapterThree> |
| | | <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterFour |
| | | v-if="showCatalogList.indexOf(5) > -1" |
| | | :showPageList="loadPageList" |
| | | :resourceList="resourceList" |
| | | > |
| | | </chapterFour> |
| | | <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" |
| | | :resourceList="resourceList"> |
| | | <chapterFive |
| | | v-if="showCatalogList.indexOf(6) > -1" |
| | | :showPageList="loadPageList" |
| | | :resourceList="resourceList" |
| | | > |
| | | </chapterFive> |
| | | </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 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 NoteIcon from "@/assets/images/biji.png"; |
| | | import _ from "lodash"; |
| | |
| | | audioPath: "", |
| | | currentTime: null, |
| | | videoList: [], |
| | | resourceList: {}, |
| | | resourceList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | // 启动页码观察 |
| | | setTimeout(() => { |
| | | this.initObservation(); |
| | | this.initThemeColor(); |
| | | }, 500); |
| | | }, |
| | | }, |
| | |
| | | this.initViewer(); |
| | | this.closeAudio(); |
| | | this.closeVideo(); |
| | | this.initThemeColor(); |
| | | }, 200); |
| | | }, |
| | | }, |
| | |
| | | threshold: 0, // 指定交叉比例,这里设为 0.5,表示当目标元素一半或更多显示在视窗中时触发回调函数。 |
| | | }); |
| | | |
| | | // this.getBookResourceList(); |
| | | |
| | | this.getBookResourceList(); |
| | | // 获取整本书题目 |
| | | this.getBookQuestionList(); |
| | | // 启动页码观察 |
| | | setTimeout(() => { |
| | | this.initObservation(); |
| | | this.initThemeColor(); |
| | | }, 500); |
| | | |
| | | // 测试页面跳转 |
| | |
| | | // txtIndex: 57 |
| | | // }); |
| | | // }, 500); |
| | | |
| | | }, |
| | | methods: { |
| | | // setZoom1() { |
| | |
| | | // }, |
| | | // 请求资源Json |
| | | async getBookResourceList() { |
| | | this.resourceList = await this.config.getBookResources( |
| | | process.env.VUE_APP_RESOURCE_CTX + (process.env.VUE_APP_ENV == "product" |
| | | this.resourceList = await this.config |
| | | .getBookResources( |
| | | process.env.VUE_APP_RESOURCE_CTX + |
| | | (process.env.VUE_APP_ENV == "product" |
| | | ? process.env.VUE_APP_BOOK_ID |
| | | : "clinicalDiseasesSummary") |
| | | ); |
| | | ) |
| | | .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) { |