智慧保安考试系统
zhongrj
2023-08-31 ae65e215975ea5fec83e24a35583992d93c5d1c2
考試bug 修復,同时2台电脑登录考试页面时,会产生2个成绩修改
3 files modified
18 ■■■■ changed files
src/store/modules/exam.js 5 ●●●●● patch | view | raw | blame | history
src/views/exam/startexam.vue 7 ●●●●● patch | view | raw | blame | history
src/views/startexam/index.vue 6 ●●●●● patch | view | raw | blame | history
src/store/modules/exam.js
@@ -24,6 +24,7 @@
    }) || {},
    // 签到
    scoreId: '',
    scoreType: 0,
    isClears: false,
    cardInfor: {},
    haveCardid: false,
@@ -93,6 +94,10 @@
      window.localStorage.setItem("scoreId", data)
      state.scoreId = data;
    },
    SetScoreType(state, data) {
      window.localStorage.setItem("scoreType", data)
      state.scoreType = data;
    },
    SetexamUserData(state, data) {
      window.localStorage.setItem("useInfo", JSON.stringify(data))
      state.examUserData = data;
src/views/exam/startexam.vue
@@ -183,9 +183,9 @@
      // return;
      // debugger;
      updateApplyStatus(data).then(res => {
        that.resData["examScoreId"] = res.data.id;
        this.$store.commit("SetScoreId", res.data.id);
        // console.log(res.data.id, "ididididiidididididid");
        that.resData["examScoreId"] = res.data.examScore.id;
        this.$store.commit("SetScoreId", res.data.examScore.id);
        this.$store.commit("SetScoreType", res.data.type);
        window.name = "";
        this.$notify({
          message:
@@ -202,7 +202,6 @@
      });
    },
    getUserInfoBYExam() {
      console.log(this.option,456123)
      var that = this;
      let setData = ({ color, subtext, isExam }) => {
        that.option.data = [
src/views/startexam/index.vue
@@ -211,6 +211,8 @@
  created() {
    var useInfo = this.$store.state.exam.examUserData;
    var scoreType = this.$store.state.exam.scoreType
    if (useInfo.isExam == 3) {
      window.name = "first";
      this.first = false;
@@ -225,6 +227,10 @@
      }
    }
    if(scoreType==1){
      this.first = false;
    }
    const examInfo = this.$route.params.id;
    if (isNotEmpty(examInfo)) {