From 23ebc0d9ee7d4b06916478f84b411d0406f11a3a Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 05 六月 2024 18:49:07 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout

---
 src/books/lifeCare/index.vue |   87 +++++++++++++++++++++++++++----------------
 1 files changed, 54 insertions(+), 33 deletions(-)

diff --git a/src/books/lifeCare/index.vue b/src/books/lifeCare/index.vue
index 6da3efd..3e54086 100644
--- a/src/books/lifeCare/index.vue
+++ b/src/books/lifeCare/index.vue
@@ -12,52 +12,64 @@
       <front001
         v-if="showCatalogList.indexOf(1) > -1"
         :showPageList="loadPageList"
+        :isSearch="isSearch"
       />
       <ChapterOne
         v-if="showCatalogList.indexOf(2) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <ChapterTwo
         v-if="showCatalogList.indexOf(3) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <ChapterThree
         v-if="showCatalogList.indexOf(4) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <ChapterFour
         v-if="showCatalogList.indexOf(5) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <ChapterFive
         v-if="showCatalogList.indexOf(6) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        @Upload_initViewer="changeDomViewer"
+        :isSearch="isSearch"
       />
       <chapterSix
         v-if="showCatalogList.indexOf(7) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <chapterSeven
         v-if="showCatalogList.indexOf(8) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
         @eventSwdt="swdtChange"
+        @Upload_initViewer="changeDomViewer"
+        :isSearch="isSearch"
       />
       <chapterEight
         v-if="showCatalogList.indexOf(9) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <chapterNine
         v-if="showCatalogList.indexOf(10) > -1"
         :showPageList="loadPageList"
         :questionData="questionData"
+        :isSearch="isSearch"
       />
       <chapter010
         v-if="showCatalogList.indexOf(11) > -1"
@@ -141,6 +153,7 @@
       loadPageList: [],
       questionData: {},
       renderSignMap: {},
+      isSearch: false,
     };
   },
   computed: {
@@ -186,7 +199,7 @@
   },
   mounted() {
     // 榛樿鍔犺浇绔犺妭
-    this.showCatalogList = [2];
+    this.showCatalogList = [1];
     // 婊氬姩鐩戝惉鑺傛祦
     this.throttledScrollHandler = _.throttle(
       this.scrollFun,
@@ -251,6 +264,11 @@
     // }, 1000);
   },
   methods: {
+    changeDomViewer() {
+      setTimeout(() => {
+        this.initViewer();
+      }, 500);
+    },
     // 婊氬姩鐩戝惉
     scrollFun(event) {
       // 鍒ゆ柇鍚戜笂婊氬姩杩樻槸鍚戜笅婊氬姩
@@ -658,40 +676,40 @@
       for (let i = 0; i < pptDoms.length; i++) {
         const dom = pptDoms[i];
         new Swiper(dom, {
-        loop: false, // 鏃犵紳
-        autoplay: false,
-        paginationClickable: true,
-        slidesPerView: 1, // 涓�缁勪笁涓�
-        spaceBetween: 30, // 闂撮殧
-        // 濡傛灉闇�瑕佸墠杩涘悗閫�鎸夐挳
-        navigation: {
-          nextEl: (this.container ? this.container : document).querySelector(
-            ".swiper-button-next"
-          ),
-          prevEl: (this.container ? this.container : document).querySelector(
-            ".swiper-button-prev"
-          ),
-        },
-        // 绐楀彛鍙樺寲,閲嶆柊init,閽堝F11鍏ㄥ睆鍜屾斁澶х缉灏�,蹇呴』鍔�
-        observer: true,
-        observeParents: true,
-        on: {
-          init:(value) => {
-            let currentPage = value.activeIndex + 1; // 鑾峰彇褰撳墠椤碉紙浠�1寮�濮嬭鏁帮級
-            let totalPages = value.slides.length; // 鑾峰彇鎬婚〉鏁�
-            var paginationInfoEl = dom.querySelector('.pageBox');
-            if(paginationInfoEl)
-              paginationInfoEl.textContent = currentPage + '/' + totalPages;
+          loop: false, // 鏃犵紳
+          autoplay: false,
+          paginationClickable: true,
+          slidesPerView: 1, // 涓�缁勪笁涓�
+          spaceBetween: 30, // 闂撮殧
+          // 濡傛灉闇�瑕佸墠杩涘悗閫�鎸夐挳
+          navigation: {
+            nextEl: (this.container ? this.container : document).querySelector(
+              ".swiper-button-next"
+            ),
+            prevEl: (this.container ? this.container : document).querySelector(
+              ".swiper-button-prev"
+            ),
           },
-          slideChange:(value) => {
-            let currentPage = value.activeIndex + 1; // 鑾峰彇褰撳墠椤碉紙浠�1寮�濮嬭鏁帮級
-            let totalPages = value.slides.length; // 鑾峰彇鎬婚〉鏁�
-            var paginationInfoEl = dom.querySelector('.pageBox');
-            if(paginationInfoEl)
-              paginationInfoEl.textContent = currentPage + '/' + totalPages;
+          // 绐楀彛鍙樺寲,閲嶆柊init,閽堝F11鍏ㄥ睆鍜屾斁澶х缉灏�,蹇呴』鍔�
+          observer: true,
+          observeParents: true,
+          on: {
+            init: (value) => {
+              let currentPage = value.activeIndex + 1; // 鑾峰彇褰撳墠椤碉紙浠�1寮�濮嬭鏁帮級
+              let totalPages = value.slides.length; // 鑾峰彇鎬婚〉鏁�
+              var paginationInfoEl = dom.querySelector(".pageBox");
+              if (paginationInfoEl)
+                paginationInfoEl.textContent = currentPage + "/" + totalPages;
+            },
+            slideChange: (value) => {
+              let currentPage = value.activeIndex + 1; // 鑾峰彇褰撳墠椤碉紙浠�1寮�濮嬭鏁帮級
+              let totalPages = value.slides.length; // 鑾峰彇鎬婚〉鏁�
+              var paginationInfoEl = dom.querySelector(".pageBox");
+              if (paginationInfoEl)
+                paginationInfoEl.textContent = currentPage + "/" + totalPages;
+            },
           },
-        },
-      });
+        });
       }
     },
     initViewer() {
@@ -701,6 +719,9 @@
       for (let i = 0; i < doms.length; i++) {
         const dom = doms[i];
         new Viewer(dom, {
+          container: this.container
+            ? this.container.querySelector("#app")
+            : "body",
           navbar: true, // 鏄剧ず瀵艰埅鏍�
           toolbar: true, // 鏄剧ず宸ュ叿鏍�
           title: true, // 鏄剧ず鏍囬

--
Gitblit v1.9.1