zhongshujie
11 小时以前 e33672cf85da88d515d5fe6ccc0a139c3cfaa5db
src/books/preventiveDentistry/view/components/chapter001.vue
@@ -48,10 +48,13 @@
              <p class="content">
                请从三级预防策略的角度为家长制订一份龋病预防的项目书。
              </p>
              <p class="content">
                <textarea class="textarea-box" v-model="questionData.one" placeholder="请输入内容" rows="5"
                  @change="setQuestionData"></textarea>
              </p>
            </div>
          </div>
          <div class="knowledgeExpansion" @click="toUrl(getResourceInfo('A1', 'md5'), '教学课件')">
          <div class="knowledgeExpansion" @click="toUrl(getResourceInfo('A1'))">
            <div class="questionBank">
              <img src="../../assets/images/sanJiao.svg" alt="" />
              <span>教学课件</span>
@@ -61,8 +64,7 @@
              <span>教学课件</span>
            </div>
          </div>
          <p class="center mb-30">
          <p class="center mb-30 pt-70">
            <img class="g-pic" src="../../assets/images/0023_04.jpg" alt="" />
          </p>
          <p class="content">
@@ -81,7 +83,7 @@
          <h3 class="thirdTitle pt-70 mb-40">
            第一节&nbsp;&nbsp;&nbsp;&nbsp;口腔预防医学的基本概述
          </h3>
          <bookVideo :videoInfo="getResourceInfo('Z17')"  :BookId="config.activeBook.bookId"></bookVideo>
          <bookVideo :videoInfo="getResourceInfo('Z17')" :BookId="config.activeBook.bookId"></bookVideo>
          <h4 class="fourthTitle">一、口腔预防医学的定义</h4>
          <p class="content">
            口腔预防医学是一门通过有组织性的社会努力,预防口腔疾病,维护口腔健康及提高生命质量的科学。口腔预防医学是口腔医学的一门分支学科和重要组成部分,它以人群为主要研究对象,应用生物学、环境医学、预防医学、临床医学及社会医学的理论和方法,研究口腔健康及其影响因素、预防口腔疾病的措施及对策,达到预防口腔疾病、促进口腔健康及提高生命质量的目的。
@@ -134,8 +136,7 @@
            从口腔预防医学发展历程看,大致可分为3个阶段:原始启蒙时代、科学基础形成时代、口腔预防医学诞生与发展时代。
          </p>
          <h4 class="fourthTitle">一、原始启蒙时期</h4>
          <div class="theme-color">123</div>
          <bookVideo  :videoInfo="getResourceInfo('Z15')" :BookId="config.activeBook.bookId"></bookVideo>
          <bookVideo :videoInfo="getResourceInfo('Z15')" :BookId="config.activeBook.bookId"></bookVideo>
          <p class="content">
            中华民族文化源远流长,对健康的探索和认识已逾数千年。公元前约1400年殷墟甲骨文清晰记载了象形文字并刻有了“齿”字和“龋”字。用齿字上面加一个小虫来表示“龋”字,认为是由虫蛀所致,至今民间仍有“虫牙”和“蛀牙”之说(图1-1)。古书中还记载了多种口腔卫生保健的方法,如漱口、咽津、剔牙、揩齿等,部分方法沿用至今。
          </p>
@@ -335,7 +336,7 @@
            </div>
            <div class="knowledgeExpansion-box">
              <img src="../../assets/images/tuoZhan.svg" alt="" />
              <span>拓展练习</span>
              <span @click="openQuestion(0)">拓展练习</span>
            </div>
          </div>
          <p class="right-info fm-kt">
@@ -346,12 +347,17 @@
      </div>
    </div>
    <preView :md5="p_md5" :pdfTitle="somePdfTitleValue" ref="pdfDialogRef"></preView>
    <dialogExaminations :cardList="interfaceQuestion" :questionIDList=questionIDList :page="questionNum"
      :questionTitle="questionTitleMain" ref="dialogRef">
    </dialogExaminations>
  </div>
</template>
<script>
import testData from "../../assets/examinationList";
import preView from "@/components/pdfview/index.vue";
import bookVideo from "@/components/bookVideo/index.vue";
import dialogExaminations from "@/components/dialogExaminations/index.vue";
export default {
  props: {
    showPageList: {
@@ -361,19 +367,61 @@
      type: Function, // 明确指定它是一个函数
      required: true
    },
    interfaceQuestion: {
      type: Array,
      required: true,
      default: () => [],
    }
  },
  components: {
    preView,
    bookVideo,
    dialogExaminations
  },
  data() {
    return {
      p_md5: "",
      somePdfTitleValue: "",
      // 题目相关
      questionNum: 0,
      questionTitleMain: "",
      questionIDList: [],
      chapterNum: 2,
      cardArrayList: [],
      examinations: [
        {
          questionTitleMain: "拓展练习",
          questionNum: 18,
        },
      ],
      questionData: {
        one: "",
      },
    };
  },
  mounted() { },
  watch: {
    interfaceQuestion: {
      handler(newValue, oldValue) {
        console.log('--- 子组件:interfaceQuestion 更新了! ---');
        console.log('新值 (newValue):', newValue);
        console.log('旧值 (oldValue):', oldValue);
        if (newValue && newValue.length > 0) {
        }
      },
      deep: true,
      immediate: true
    },
  },
  mounted() {
    console.log(this.interfaceQuestion, "interfaceQuestion");
    this.getQuestionData()
  },
  methods: {
    toUrl(val) {
      if (val != null) {
        this.p_md5 = val.md5;
@@ -381,6 +429,32 @@
        this.$refs.pdfDialogRef.openDialog();
      }
    },
    setQuestionData() {
      localStorage.setItem(
        "preventiveDentistry-book-chapter01-questionData",
        JSON.stringify(this.questionData)
      );
    },
    getQuestionData() {
      let questionData = localStorage.getItem("preventiveDentistry-book-chapter01-questionData");
      if (questionData) {
        this.questionData = JSON.parse(questionData);
      }
    },
    openQuestion(num) {
      if (num != undefined) {
        this.questionNum = this.examinations[num].questionNum;
        console.log(this.questionNum);
        this.questionTitleMain = this.examinations[num].questionTitleMain;
        console.log(this.questionTitleMain);
        this.cardArrayList = this.interfaceQuestion;
        console.log(this.cardArrayList);
        this.questionIDList = testData[this.chapterNum][this.questionNum];
        console.log(this.questionIDList);
        this.$refs.dialogRef.openDialogQuestion();
      }
    },
  },
};
</script>