user1
2024-06-25 a011cee7908a8f26c992949619bd2293d46a2b3b
Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout
2个文件已修改
31 ■■■■■ 已修改文件
src/books/artAndDrama/view/components/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/dragQuestion/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/artAndDrama/view/components/index.vue
@@ -155,8 +155,8 @@
    }, 500);
    // 测试页面跳转
    //setTimeout(() => {
    //this.gotoPage(3,16);
    setTimeout(() => {
    this.gotoPage(3,16);
    //   setTimeout(() => {
    //     this.renderSign("Highlight", {
    //       id: "2ACA9359",
@@ -184,7 +184,7 @@
    //   txt: " 运动系统是由骨、骨连结和骨骼肌三部分组成的。全身的骨通过骨连结组成人体骨骼(见图1-1)。骨骼是人体的支架,具有保护内脏器官、供肌肉附着和作为肌肉运动的杠杆等作用。在神经系统的支配下,肌肉收缩牵动所附着的骨绕着关节转动,使身体产生各种动作。所以,运动系统具有运动、支持和保护等功能,幼年时期的骨骼还具有造血功能。 ",
    //   txtIndex: 57
    // });
    //}, 500);
    }, 500);
  },
  methods: {
    // setZoom1() {
src/components/dragQuestion/index.vue
@@ -194,6 +194,7 @@
      maxY: null,
      spaceList: [],
      submitState:false,
      isLift:false
    };
  },
  mounted() {
@@ -206,6 +207,7 @@
    mousedown(e) {
      e.preventDefault();
      if(this.submitState) return false
      this.isLift = false
      console.log("鼠标按下", e);
      this.moveDom = e.toElement;
      this.parentDom = this.getParentWithClass(e.toElement, "question-box");
@@ -238,6 +240,7 @@
              e.y >= item.minY &&
              e.y <= item.maxY
            ) {
              if(!this.isLift) return false
              this.$set(
                this.drageQuestion[this.questionIndex].userAnswer,
                index,
@@ -247,6 +250,7 @@
                }
              );
              this.moveDom.style.display = "none";
              this.moveDom = null;
            }
          }
        }
@@ -255,8 +259,11 @@
    // 鼠标抬起
    mouseup(e) {
      if (this.moveDom) {
        this.moveDom = null;
        // this.moveDom = null;
      }
      this.isLift = true
    },
    // 获取题目空格坐标
    getSpaceInfo(parentDom) {
@@ -265,10 +272,10 @@
      for (let index = 0; index < list.length; index++) {
        const itemInfo = list[index].getBoundingClientRect();
        arr.push({
          minX: itemInfo.x,
          maxX: itemInfo.x + itemInfo.width,
          minY: itemInfo.y,
          maxY: itemInfo.y + itemInfo.height,
          minX: itemInfo.x -10,
          maxX: itemInfo.x + itemInfo.width + 10,
          minY: itemInfo.y -10 ,
          maxY: itemInfo.y + itemInfo.height + 10,
        });
      }
      this.spaceList = arr;
@@ -309,7 +316,7 @@
          let citem = item.userAnswer[cindex];
          arr[cindex] = citem.value
        }
        item.isRight = arr == item.answer
        item.isRight = JSON.stringify(arr)  == JSON.stringify(item.answer)
        item.isComplete = true
      }
      console.log(arr,this.drageQuestion[0]);
@@ -412,6 +419,7 @@
}
.drag-bottom-btn {
  width: 100%;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
@@ -423,7 +431,7 @@
}
.analysis {
  margin: 20px 0;
  width: 94%;
  width: 100%;
  // margin-left: 12px;
}
.judge-icon {
@@ -466,9 +474,8 @@
          text-align: left;
          display: flex;
          span:nth-child(1) {
            display: inline-block;
            text-indent: 0;
            width: 82px;
            width: 100px;
          }
        }
        .correctBox {