From b1ee986edd5ea1c55186b795bf4b54215e4e9331 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 25 四月 2025 11:09:07 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout --- src/books/policiesAndRegulations/view/components/index.vue | 56 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/books/policiesAndRegulations/view/components/index.vue b/src/books/policiesAndRegulations/view/components/index.vue index 1f0968e..e4466c1 100644 --- a/src/books/policiesAndRegulations/view/components/index.vue +++ b/src/books/policiesAndRegulations/view/components/index.vue @@ -11,7 +11,7 @@ <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> + <chapterSix v-if="showCatalogList.indexOf(2) > -1" :showPageList="loadPageList" :questionData="questionDataMap"></chapterSix> <!-- <chapterSeven v-if="showCatalogList.indexOf(8) > -1" :showPageList="loadPageList"> </chapterSeven> <chapterEight v-if="showCatalogList.indexOf(9) > -1" :showPageList="loadPageList"></chapterEight> @@ -22,6 +22,7 @@ </template> <script> +import Vue from "vue"; import pageHeader from "./header.vue"; // import chapterOne from "./chapter001.vue"; // import chapterTwo from "./chapter002.vue"; @@ -34,6 +35,8 @@ // import chapterNine from "./chapter009.vue" // import chapterTen from "./chapter010.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"; @@ -171,7 +174,7 @@ // 娴嬭瘯椤甸潰璺宠浆 setTimeout(() => { - this.gotoPage(11, 290); + // this.gotoPage(11, 290); // setTimeout(() => { // this.renderSign("Highlight", { // id: "2ACA9359", @@ -556,30 +559,31 @@ // 娣诲姞椤电爜 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])) { + const datas = await getQuestionList( + page, + testData[catalog][page], + this.config.activeBook + ); + this.$set(this.questionDataMap,page,datas) + } else { + const obj = {}; + for (let key in testData[catalog][page]) { + obj[key] = await getQuestionList( + [], + testData[catalog][page][key], + this.config.activeBook + ); + } + this.$set(this.questionDataMap,page,obj) + // this.questionDataMap[page] = obj; + } + } + } + } // 娓叉煋杩欎竴椤电殑鏍囪 for (const key in this.renderSignMap) { if (this.renderSignMap[key][page]) { -- Gitblit v1.9.1