From 23cbeff293c7f71b7769d1a94bd5def3a24c20b1 Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期一, 28 七月 2025 09:43:32 +0800
Subject: [PATCH] 幼儿园语言教育与活动指导

---
 src/books/toddlerSportsSafetyProtection/view/components/index.vue |  129 +++++++++++++++---------------------------
 1 files changed, 47 insertions(+), 82 deletions(-)

diff --git a/src/books/toddlerSportsSafetyProtection/view/components/index.vue b/src/books/toddlerSportsSafetyProtection/view/components/index.vue
index 21129c1..39dd967 100644
--- a/src/books/toddlerSportsSafetyProtection/view/components/index.vue
+++ b/src/books/toddlerSportsSafetyProtection/view/components/index.vue
@@ -3,38 +3,14 @@
     <div id="searchDomBox" style="display: none">
       <div id="searchContent"></div>
     </div>
-    <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> -->
+    <div class="page-content" :style="{
+      fontSize: fontSize + 'px',
+      transform: `scale(${pageZoom})`,
+      transformOrigin: 'center top',
+    }">
+      <pageHeader v-if="showCatalogList.indexOf(1) > -1" :showPageList="loadPageList"></pageHeader>
+      <chapterFive v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList"
+        :interfaceQuestion="questionDataMap"></chapterFive>
     </div>
   </div>
 </template>
@@ -45,8 +21,10 @@
 //   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 getQuestionList from "@/assets/methods/examination";
+import testData from "../../assets/examinationList";
 import _ from "lodash";
 import Swiper from "swiper/bundle";
 import "swiper/swiper-bundle.css";
@@ -56,7 +34,7 @@
   name: "pageContent",
   data() {
     return {
-      catalogLength: 1, // 鎬荤珷鑺傛暟
+      catalogLength: 2, // 鎬荤珷鑺傛暟
       showCatalogList: [], // 鏄剧ず鐨勭珷鑺�
       loadThreshold: 300, // 瑙﹀彂鍔犺浇闃堝��
       throttleThreshold: 100, // 鑺傛祦闃堝��
@@ -183,22 +161,9 @@
     }, 500);
 
     // 娴嬭瘯椤甸潰璺宠浆
-    setTimeout(() => {
-      this.gotoPage(1, 1);
-    //   setTimeout(() => {
-    //     this.renderSign("Highlight", {
-    //       id: "2ACA9359",
-    //       txt: "棰樹竴瀛︿範涓婚涓� 杩愬姩",
-    //       page: "10",
-    //       type: "Highlight",
-    //       color: "#F5E12A"
-    //     });
     // setTimeout(() => {
-    //   this.delSign({
-    //     ids: ["2ACA9359"]
-    //   });
-    // }, 2000);
-    }, 500);
+    //   this.gotoPage(2, 163);
+    // }, 500);
 
     // const pageDom = (this.container ? this.container : document)
     //   .querySelector("#app")
@@ -474,8 +439,8 @@
           page && pageThemeColor && pageThemeColor[page]
             ? pageThemeColor[page]
             : chapterNum && chapterThemeColor && chapterThemeColor[chapterNum]
-            ? chapterThemeColor[chapterNum]
-            : bookThemeColor;
+              ? chapterThemeColor[chapterNum]
+              : bookThemeColor;
         if (themeColor) {
           domItem.style.color = themeColor;
         }
@@ -492,8 +457,8 @@
           page && pageThemeColor && pageThemeColor[page]
             ? pageThemeColor[page]
             : chapterNum && chapterThemeColor && chapterThemeColor[chapterNum]
-            ? chapterThemeColor[chapterNum]
-            : bookThemeColor;
+              ? chapterThemeColor[chapterNum]
+              : bookThemeColor;
         if (themeColor) {
           domItem.style.backgroundColor = themeColor;
         }
@@ -510,8 +475,8 @@
           page && pageThemeColor && pageThemeColor[page]
             ? pageThemeColor[page]
             : chapterNum && chapterThemeColor && chapterThemeColor[chapterNum]
-            ? chapterThemeColor[chapterNum]
-            : bookThemeColor;
+              ? chapterThemeColor[chapterNum]
+              : bookThemeColor;
         if (themeColor) {
           domItem.style.borderColor = themeColor;
         }
@@ -569,30 +534,30 @@
             // 娣诲姞椤电爜
             this.loadPageList.push(Number(page));
             const catalog = catalogDom.getAttribute("num");
-            // if (!this.questionDataMap[page]) {
-            //   if (testData && testData[catalog]) {
-            //     if (testData[catalog][page]) {
-            //       if (Array.isArray(testData[catalog][page])) {
-            //         this.questionDataMap[page] = await getQuestionList(
-            //           page,
-            //           testData[catalog][page],
-            //           this.config.activeBook
-            //         );
-            //       } else {
-            //         const obj = {};
-            //         for (let key in testData[catalog][page]) {
-            //           obj[key] = await getQuestionList(
-            //             [],
-            //             testData[catalog][page][key],
-            //             this.config.activeBook
-            //           );
-            //         }
-            //         this.questionDataMap[page] = obj;
-            //       }
-            //       console.log("棰樼洰", this.questionDataMap);
-            //     }
-            //   }
-            // }
+            if (!this.questionDataMap[page]) {
+              if (testData && testData[catalog]) {
+                if (testData[catalog][page]) {
+                  if (Array.isArray(testData[catalog][page])) {
+                    this.questionDataMap[page] = await getQuestionList(
+                      page,
+                      testData[catalog][page],
+                      this.config.ceShiActiveBook
+                    );
+                  } else {
+                    const obj = {};
+                    for (let key in testData[catalog][page]) {
+                      obj[key] = await getQuestionList(
+                        [],
+                        testData[catalog][page][key],
+                        this.config.ceShiActiveBook
+                      );
+                    }
+                    this.questionDataMap[page] = obj;
+                  }
+                  console.log("棰樼洰", this.questionDataMap);
+                }
+              }
+            }
             // 娓叉煋杩欎竴椤电殑鏍囪
             for (const key in this.renderSignMap) {
               if (this.renderSignMap[key][page]) {
@@ -740,7 +705,7 @@
         //   chapterTwo,
         //   chapterThree,
         //   chapterFour,
-        //   chapterFive,
+        chapterFive,
       };
       // 閬嶅巻鎵�鏈夌珷鑺傛枃浠�
       for (const key in pageData) {
@@ -840,7 +805,7 @@
       // 璁板綍楂樹寒淇℃伅
       this.highlightData = data;
       // 璺宠浆
-      this.gotoPage(data.catalog, data.page, () => {});
+      this.gotoPage(data.catalog, data.page, () => { });
     },
     // 椤甸潰鍚戜笅婊氬姩锛岄煶棰戝皬绐楁挱鏀惧姛鑳�
     getAduio() {
@@ -968,7 +933,7 @@
     //   chapterTwo,
     //   chapterThree,
     //   chapterFour,
-    //   chapterFive,
+    chapterFive,
   },
 };
 </script>

--
Gitblit v1.9.1