闫增涛
2024-05-28 cb636fc0da716e6719ebaf3a848cdab47b130d96
答题保存
2个文件已修改
17 ■■■■■ 已修改文件
src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/examinations/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -58,7 +58,7 @@
    } else {
      this.activeBook = await this.config.getBookConfig(
        // childHealth
        this.config.resourceCtx + "lifeCare"
        this.config.resourceCtx + "childHealth"
      );
      // 测试试读30页
      // this.activeBook.tryPageCount = 30;
src/components/examinations/index.vue
@@ -510,7 +510,7 @@
    },
    // 批改题目  (练习,我的做题,我的收藏模式下)
    handleQuestion() {
      const list = this.$props.cardData;
      const list = this.cardData;
      for (let index = 0; index < list.length; index++) {
        const item = list[index];
        for (let cindex = 0; cindex < item.infoList.length; cindex++) {
@@ -555,8 +555,8 @@
          }
        }
      }
      this.$props.cardData = list;
      console.log(this.$props.cardData);
      this.cardData = list;
      console.log(this.cardData);
    },
    getParentWithClass(element, className) {
      while (element.parentElement) {
@@ -580,8 +580,8 @@
        );
        let oldData = oldAnswerData ? JSON.parse(oldAnswerData) : {};
        const asnwerList = [];
        for (let index = 0; index < this.$props.cardData.length; index++) {
          const item = this.$props.cardData[index];
        for (let index = 0; index < this.cardData.length; index++) {
          const item = this.cardData[index];
          for (let cindex = 0; cindex < item.infoList.length; cindex++) {
            const citem = item.infoList[cindex];
            asnwerList.push({
@@ -591,11 +591,8 @@
          }
        }
        if(oldData[pageNum]) {
          oldData[pageNum] = oldData[pageNum].filter(citem => asnwerList.findIndex(ditem => ditem.id == citem.id) == -1 )
          oldData[pageNum].push(asnwerList)
          // for (let dindex = 0; dindex < oldData[pageNum].length; dindex++) {
          //   const ditem = oldData[pageNum][dindex];
          //   for(let eindex = 0; eindex < asnwerList.)
          // }
        } else {
          oldData[pageNum] = asnwerList
        }