From f9d49455368b557eb10915d7cc56c4b5e17d338b Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期二, 13 八月 2024 15:34:11 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout --- src/books/sportsAndHealth/view/components/chapter006.vue | 119 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 98 insertions(+), 21 deletions(-) diff --git a/src/books/sportsAndHealth/view/components/chapter006.vue b/src/books/sportsAndHealth/view/components/chapter006.vue index 76be14c..e00013b 100644 --- a/src/books/sportsAndHealth/view/components/chapter006.vue +++ b/src/books/sportsAndHealth/view/components/chapter006.vue @@ -1,5 +1,5 @@ <template> - <div class="chapter" num="7"> + <div class="chapter" num="3"> <div class="page-box" page="202"> <div v-if="showPageList.indexOf(202) > -1"> <div class="bodystyle textHeader"> @@ -317,10 +317,7 @@ <div class="bk-xyx" style="margin-top: 20px"> <div class="bj1-xyx publicxbc">娉ㄦ剰浜嬮」</div> - <p>1. 鍏� 鍒� 鍋� 濂� 鍑� 澶� 娲� 鍔紝 - 鍏嬫湇韬綋鍚勬満鑳界殑鎯版�с�� - 2. 鍔犲己涓嬭偄鍔涢噺鍜岃啙鍏� - 鑺傜ǔ瀹氭�х殑璁粌銆傘��</p> + <p>1.鍏呭垎鍋氬ソ鍑嗗娲诲姩锛屽厠鏈嶈韩浣撳悇鏈鸿兘鐨勬儼鎬с�� 2. 鍔犲己涓嬭偄鍔涢噺鍜岃啙鍏宠妭绋冲畾鎬х殑璁粌銆�</p> </div> @@ -2290,7 +2287,7 @@ </div> </div> <br /> - <p class="public-tips">椤圭洰涓� 路 瑙嗛搴撻泦</p> + <p class="public-tips">椤圭洰浜� 路 瑙嗛搴撻泦</p> <div class="parentVideo" v-if="isShowXyx02"> <div class="videoItem" v-if="chapter006.videoShow6"> <video webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" @@ -3737,7 +3734,7 @@ </div> </div> <br /> - <p class="public-tips">椤圭洰涓� 路 瑙嗛搴撻泦</p> + <p class="public-tips">椤圭洰涓� 路 瑙嗛搴撻泦</p> <div class="parentVideo" v-if="isShowXyx03"> <div class="videoItem" v-if="chapter006.videoShow11"> @@ -4490,7 +4487,7 @@ <p>鍦ㄥ墠闈㈠銆佺粌銆佽禌鐨勮繃绋嬩腑锛屽悓瀛︿滑瀵硅嚜宸卞拰韬竟鍚屽鐨勫涔犳晥鏋滄湁浜嗗垵姝ョ殑璇勫垽锛岄偅 涔堝浣曠郴缁熷湴璇勪环鑷繁瀵硅涪姣藉瓙杩愬姩鎶�鏈殑鎺屾彙绋嬪害鍜屾暣涓繍鍔ㄧ殑鐞嗚В绋嬪害鍛紵璇峰悓瀛︿滑鐧� 褰曡绋嬪钩鍙帮紝杩涜绯荤粺銆佸叏闈㈢殑鑷富璇勪环銆�</p> - <div class="pdf-text"> + <div class="pdf-text"> <div class="pdf-con pdf-con-15"> <div class="pdf-view"> <span> @@ -4566,11 +4563,23 @@ </div> + <el-dialog :visible.sync="dialogVisible" width="60vw" top="2vh" append-to-body lock-scroll :show-close="false" + class="custom-dialog"> + <div slot="title" class="header_title"> + <span>{{ pdfTitle }}</span> + <span @click="closeDialog"> x </span> + </div> + <div class="pdfModal" v-if="dialogVisible"> + <preView :isClear="dialogVisible" :md5="p_md5"></preView> + </div> + </el-dialog> </div> </template> <script> + +import preView from '@/components/pdfview' import { getResourcePath } from '@/assets/methods/resources' export default { name: "chapter006-page", @@ -4586,9 +4595,14 @@ default: false, }, }, - components: {}, + components: { + preView, + }, data() { return { + pdfTitle: '', + p_md5: '', + dialogVisible: false, isShowXyx01: false, isShowXyx02: false, isShowXyx03: false, @@ -5332,9 +5346,9 @@ watch: {}, created() { const localData = JSON.parse(localStorage.getItem('chapter006')) - if (localData) { - this.chapter006 = { ...Object.assign(this.chapter006, localData) } - } + if (localData) { + this.chapter006 = { ...Object.assign(this.chapter006, localData) } + } if (!this.isSearch) { this.getVideo(this.chapter006.videoMd5.v1.md5, 'v1') this.getVideo(this.chapter006.videoMd5.v2.md5, 'v2') @@ -5417,16 +5431,14 @@ this.chapter006.videoUrl[val] = data }, + closeDialog() { + this.dialogVisible = false + }, toUrl(val) { if (val) { - const obj = { - type: 'pdf', - data: { - md5: this.chapter006.pdfMd5[val].md5, - title: this.chapter006.pdfMd5[val].name, - }, - } - this.$emit('openPDFChange', obj) + this.dialogVisible = true; + this.p_md5 = this.chapter006.pdfMd5[val].md5; + this.pdfTitle = this.chapter006.pdfMd5[val].name; } }, @@ -5484,4 +5496,69 @@ } </script> -<style lang="less" scoped></style> \ No newline at end of file +<style lang="less" scoped> +.pdfModal { + width: 100%; + height: 90vh; +} + +.custom-dialog { + overflow: hidden !important; + + /deep/ .el-dialog__body { + padding: 0; + } + + /deep/ .el-dialog__header { + background-color: rgba(0, 0, 0, 0.8); + + .header_title { + display: flex; + justify-content: space-between; + align-items: center; + color: #fff; + font-weight: 900; + font-size: 16px; + font-family: 'FZLTXIHJW'; + + span:nth-child(2):hover { + cursor: pointer; + } + } + + /deep/.el-dialog__title, + /deep/ .el-dialog__headerbtn .el-dialog__close { + color: #fff; + font-weight: 900; + font-size: 16px; + font-family: 'FZLTXIHJW'; + } + } +} + +@media screen and (max-width: 1024px) { + .pdfModal { + width: 100%; + height: 80vh; + } + + .custom-dialog { + /deep/ .el-dialog { + width: 90vw !important; + } + } +} + +@media screen and (max-width: 800px) { + .pdfModal { + width: 100%; + height: 60vh; + } + + .custom-dialog { + /deep/ .el-dialog { + width: 90vw !important; + } + } +} +</style> \ No newline at end of file -- Gitblit v1.9.1