src/books/aviationBasicSkills/view/components/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/books/aviationEtiquette/view/components/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/books/aviationSafety/view/components/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/books/civilAviation/view/components/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/books/civilServices/view/components/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/books/aviationBasicSkills/view/components/index.vue
@@ -3,20 +3,50 @@ <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"></chapterOne> <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"></chapterTwo> <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"></chapterThree> <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList"></chapterFour> <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList"></chapterFive> <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList"></chapterSix> <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList"></chapterSeven> <chapterEight v-if="showCatalogList.indexOf(9) > -1" :showPageList="loadPageList"></chapterEight> }" > <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList" ></pageHeader> <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" ></chapterOne> <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" ></chapterTwo> <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" ></chapterThree> <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" ></chapterFour> <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" ></chapterFive> <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList" ></chapterSix> <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList" ></chapterSeven> <chapterEight v-if="showCatalogList.indexOf(9) > -1" :showPageList="loadPageList" ></chapterEight> </div> </div> </template> @@ -60,11 +90,15 @@ }, computed: { fontSize() { this.transformDom(this.$store.state.qiankun.fontSize) return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18; this.transformDom(this.$store.state.qiankun.fontSize); return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18; }, pageZoom() { return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1; return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1; }, }, watch: { @@ -89,7 +123,7 @@ loadPageList: { handler(newVal, oldVal) { setTimeout(() => { this.transformDom(this.$store.state.qiankun.fontSize) this.transformDom(this.$store.state.qiankun.fontSize); this.initSwiper(); this.initViewer(); this.closeAudio(); @@ -212,7 +246,7 @@ // }, // 滚动监听 scrollFun(event) { this.handleVideoPicture() this.handleVideoPicture(); // 判断向上滚动还是向下滚动 if (event.target.scrollTop > this.previousScrollTop) { this.getAduio(); @@ -724,7 +758,7 @@ chapterFive, chapterSix, chapterSeven, chapterEight chapterEight, }; // 遍历所有章节文件 for (const key in pageData) { @@ -915,34 +949,36 @@ }, // 视频小窗 handleVideoPicture() { let doms = ( this.container ? this.container : document ).querySelectorAll(".video"); doms = Array.from(doms) if (!doms.length) return false const playVudio = doms .reverse() .find((item) => item.paused == false); let doms = (this.container ? this.container : document).querySelectorAll( ".video" ); doms = Array.from(doms); if (!doms.length) return false; const playVudio = doms.reverse().find((item) => item.paused == false); if (playVudio) { const bottomGap = playVudio.getBoundingClientRect().bottom; const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { playVudio.requestPictureInPicture(); try { if (playVudio.readyState) playVudio.requestPictureInPicture(); } catch (error) { console.log(error, "小窗错误error"); } } } }, //其他类名下字体大小变化 transformDom(fs) { if(!fs) return let doms = ( this.container ? this.container : document ).querySelectorAll('.block') if(!doms.length) return if (!fs) return; let doms = (this.container ? this.container : document).querySelectorAll( ".block" ); if (!doms.length) return; for (let index = 0; index < doms.length; index++) { const dom = doms[index]; dom.style.fontSize = fs + 'px' dom.style.fontSize = fs + "px"; } } }, }, components: { pageHeader, @@ -953,7 +989,7 @@ chapterFive, chapterSix, chapterSeven, chapterEight chapterEight, }, }; </script> @@ -972,4 +1008,3 @@ } } </style> src/books/aviationEtiquette/view/components/index.vue
@@ -917,7 +917,11 @@ const bottomGap = playVudio.getBoundingClientRect().bottom; const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { playVudio.requestPictureInPicture(); try { if(playVudio.readyState) playVudio.requestPictureInPicture(); } catch (error) { console.log(error,"小窗错误error"); } } } }, src/books/aviationSafety/view/components/index.vue
@@ -927,7 +927,11 @@ const bottomGap = playVudio.getBoundingClientRect().bottom; const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { playVudio.requestPictureInPicture(); try { if(playVudio.readyState) playVudio.requestPictureInPicture(); } catch (error) { console.log(error,"小窗错误error"); } } } }, src/books/civilAviation/view/components/index.vue
@@ -3,17 +3,38 @@ <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"></chapterOne> <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"></chapterTwo> <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"></chapterThree> <chapterfour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList"></chapterfour> <chapterfive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList"></chapterfive> }" > <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList" ></pageHeader> <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" ></chapterOne> <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" ></chapterTwo> <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" ></chapterThree> <chapterfour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" ></chapterfour> <chapterfive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" ></chapterfive> </div> </div> </template> @@ -24,7 +45,7 @@ import chapterTwo from "./chapter002.vue"; import chapterThree from "./chapter003.vue"; import chapterfour from "./chapter004.vue"; import chapterfive from "./chapter005.vue" import chapterfive from "./chapter005.vue"; import NoteIcon from "@/assets/images/biji.png"; import _ from "lodash"; import Swiper from "swiper/bundle"; @@ -54,11 +75,15 @@ }, computed: { fontSize() { this.transformDom(this.$store.state.qiankun.fontSize) return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18; this.transformDom(this.$store.state.qiankun.fontSize); return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18; }, pageZoom() { return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1; return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1; }, }, watch: { @@ -83,7 +108,7 @@ loadPageList: { handler(newVal, oldVal) { setTimeout(() => { this.transformDom(this.$store.state.qiankun.fontSize) this.transformDom(this.$store.state.qiankun.fontSize); this.initSwiper(); this.initViewer(); this.closeAudio(); @@ -206,7 +231,7 @@ // }, // 滚动监听 scrollFun(event) { this.handleVideoPicture() this.handleVideoPicture(); // 判断向上滚动还是向下滚动 if (event.target.scrollTop > this.previousScrollTop) { this.getAduio(); @@ -906,34 +931,36 @@ }, // 视频小窗 handleVideoPicture() { let doms = ( this.container ? this.container : document ).querySelectorAll(".video"); doms = Array.from(doms) if (!doms.length) return false const playVudio = doms .reverse() .find((item) => item.paused == false); let doms = (this.container ? this.container : document).querySelectorAll( ".video" ); doms = Array.from(doms); if (!doms.length) return false; const playVudio = doms.reverse().find((item) => item.paused == false); if (playVudio) { const bottomGap = playVudio.getBoundingClientRect().bottom; const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { try { if(playVudio.readyState) playVudio.requestPictureInPicture(); } catch (error) { console.log(error, "小窗错误error"); } } } }, //其他类名下字体大小变化 transformDom(fs) { if(!fs) return let doms = ( this.container ? this.container : document ).querySelectorAll('.block') if(!doms.length) return if (!fs) return; let doms = (this.container ? this.container : document).querySelectorAll( ".block" ); if (!doms.length) return; for (let index = 0; index < doms.length; index++) { const dom = doms[index]; dom.style.fontSize = fs + 'px' dom.style.fontSize = fs + "px"; } } }, }, components: { pageHeader, src/books/civilServices/view/components/index.vue
@@ -3,16 +3,34 @@ <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"></chapterOne> <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList"></chapterTwo> <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList"></chapterThree> <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList"></chapterFour> }" > <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList" ></pageHeader> <chapterOne v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" ></chapterOne> <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" ></chapterTwo> <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" ></chapterThree> <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" ></chapterFour> </div> </div> </template> @@ -52,11 +70,15 @@ }, computed: { fontSize() { this.transformDom(this.$store.state.qiankun.fontSize) return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18; this.transformDom(this.$store.state.qiankun.fontSize); return this.$store.state.qiankun.fontSize ? this.$store.state.qiankun.fontSize : 18; }, pageZoom() { return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1; return this.$store.state.qiankun.scale ? this.$store.state.qiankun.scale / 100 : 1; }, }, watch: { @@ -81,7 +103,7 @@ loadPageList: { handler(newVal, oldVal) { setTimeout(() => { this.transformDom(this.$store.state.qiankun.fontSize) this.transformDom(this.$store.state.qiankun.fontSize); this.initSwiper(); this.initViewer(); this.closeAudio(); @@ -204,7 +226,7 @@ // }, // 滚动监听 scrollFun(event) { this.handleVideoPicture() this.handleVideoPicture(); // 判断向上滚动还是向下滚动 if (event.target.scrollTop > this.previousScrollTop) { this.getAduio(); @@ -903,34 +925,36 @@ }, // 视频小窗 handleVideoPicture() { let doms = ( this.container ? this.container : document ).querySelectorAll(".video"); doms = Array.from(doms) if (!doms.length) return false const playVudio = doms .reverse() .find((item) => item.paused == false); let doms = (this.container ? this.container : document).querySelectorAll( ".video" ); doms = Array.from(doms); if (!doms.length) return false; const playVudio = doms.reverse().find((item) => item.paused == false); if (playVudio) { const bottomGap = playVudio.getBoundingClientRect().bottom; const topGap = playVudio.getBoundingClientRect().top; if (bottomGap < 0 || topGap > window.innerHeight) { try { if(playVudio.readyState) playVudio.requestPictureInPicture(); } catch (error) { console.log(error, "小窗错误error"); } } } }, //其他类名下字体大小变化 transformDom(fs) { if(!fs) return let doms = ( this.container ? this.container : document ).querySelectorAll('.block') if(!doms.length) return if (!fs) return; let doms = (this.container ? this.container : document).querySelectorAll( ".block" ); if (!doms.length) return; for (let index = 0; index < doms.length; index++) { const dom = doms[index]; dom.style.fontSize = fs + 'px' dom.style.fontSize = fs + "px"; } } }, }, components: { pageHeader, @@ -956,4 +980,3 @@ } } </style>