From 7d7744fe006714f6be0341d03d4de9b1e90d775d Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期五, 23 五月 2025 22:45:09 +0800 Subject: [PATCH] 5.23 婴幼儿游戏活动实施(wb) --- src/books/toddlerGameImplementation/view/components/index.vue | 122 +++++++++++++++++----------------------- 1 files changed, 53 insertions(+), 69 deletions(-) diff --git a/src/books/toddlerGameImplementation/view/components/index.vue b/src/books/toddlerGameImplementation/view/components/index.vue index 0010ed5..5f94df2 100644 --- a/src/books/toddlerGameImplementation/view/components/index.vue +++ b/src/books/toddlerGameImplementation/view/components/index.vue @@ -3,43 +3,26 @@ <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> - <chapterSix v-if="showCatalogList.indexOf(7) > -1" - :showPageList="loadPageList" > + <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" + :interfaceQuestion="questionDataMap"></chapterOne> + <chapterTwo v-if="showCatalogList.indexOf(3) > -1" :showPageList="loadPageList" + :interfaceQuestion="questionDataMap"></chapterTwo> + <chapterThree v-if="showCatalogList.indexOf(4) > -1" :showPageList="loadPageList" + :interfaceQuestion="questionDataMap"></chapterThree> + <chapterFour v-if="showCatalogList.indexOf(5) > -1" :showPageList="loadPageList" + :interfaceQuestion="questionDataMap"></chapterFour> + <chapterFive v-if="showCatalogList.indexOf(6) > -1" :showPageList="loadPageList" + :interfaceQuestion="questionDataMap"></chapterFive> + <chapterSix v-if="showCatalogList.indexOf(7) > -1" :showPageList="loadPageList" + :interfaceQuestion="questionDataMap"> </chapterSix> - <chapterSeven v-if="showCatalogList.indexOf(8) > -1" - :showPageList="loadPageList" > + <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList"> </chapterSeven> </div> </div> @@ -56,6 +39,8 @@ import chapterSix from "./chapter006.vue"; import chapterSeven from "./chapter007.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"; @@ -193,9 +178,8 @@ // 娴嬭瘯椤甸潰璺宠浆 setTimeout(() => { - this.gotoPage(3,40); + this.gotoPage(3, 46); }, 500); - // const pageDom = (this.container ? this.container : document) // .querySelector("#app") // .querySelectorAll(".page-box"); @@ -470,8 +454,8 @@ page && pageThemeColor && pageThemeColor[page] ? pageThemeColor[page] : chapterNum && chapterThemeColor && chapterThemeColor[chapterNum] - ? chapterThemeColor[chapterNum] - : bookThemeColor; + ? chapterThemeColor[chapterNum] + : bookThemeColor; if (themeColor) { domItem.style.color = themeColor; } @@ -488,8 +472,8 @@ page && pageThemeColor && pageThemeColor[page] ? pageThemeColor[page] : chapterNum && chapterThemeColor && chapterThemeColor[chapterNum] - ? chapterThemeColor[chapterNum] - : bookThemeColor; + ? chapterThemeColor[chapterNum] + : bookThemeColor; if (themeColor) { domItem.style.backgroundColor = themeColor; } @@ -506,8 +490,8 @@ page && pageThemeColor && pageThemeColor[page] ? pageThemeColor[page] : chapterNum && chapterThemeColor && chapterThemeColor[chapterNum] - ? chapterThemeColor[chapterNum] - : bookThemeColor; + ? chapterThemeColor[chapterNum] + : bookThemeColor; if (themeColor) { domItem.style.borderColor = themeColor; } @@ -565,30 +549,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.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); + } + } + } // 娓叉煋杩欎竴椤电殑鏍囪 for (const key in this.renderSignMap) { if (this.renderSignMap[key][page]) { @@ -838,7 +822,7 @@ // 璁板綍楂樹寒淇℃伅 this.highlightData = data; // 璺宠浆 - this.gotoPage(data.catalog, data.page, () => {}); + this.gotoPage(data.catalog, data.page, () => { }); }, // 椤甸潰鍚戜笅婊氬姩锛岄煶棰戝皬绐楁挱鏀惧姛鑳� getAduio() { -- Gitblit v1.9.1