src/views/singleperformance/index.vue
@@ -1,10 +1,5 @@
/*
 * @Author: Morpheus
 * @Date: 2021-08-02 09:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-10-09 17:13:00
 * menu-name 成绩管理
 */
/* * @Author: Morpheus * @Date: 2021-08-02 09:31:54 * @Last Modified by: liu *
@Last Modified time: 2021-10-09 17:13:00 * menu-name 成绩管理 */
<template>
  <div class="exam-end">
    <!-- <button class="logout" 
@@ -80,7 +75,7 @@
      paddWord: "",
      UserData: window.localStorage.getItem("useInfo")
        ? JSON.parse(window.localStorage.getItem("useInfo"))
        : "",
        : ""
    };
  },
  created() {
@@ -88,12 +83,12 @@
  },
  computed: {
    ...mapState({
      examUserData: (state) => state.exam.examUserData,
      scoreId: (state) =>
      examUserData: state => state.exam.examUserData,
      scoreId: state =>
        state.exam.scoreId
          ? state.exam.scoreId
          : window.localStorage.getItem("scoreId"),
    }),
          : window.localStorage.getItem("scoreId")
    })
  },
  mounted() {
    //获取考试成绩
@@ -106,7 +101,7 @@
      this.$confirm("是否退出系统, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        type: "warning"
      }).then(() => {
        this.$store.dispatch("LogOut").then(() => {
          this.$router.push({ path: "/login" });
@@ -117,9 +112,9 @@
      var data = {
        // userId: this.$route.query.userId,
        // examId: this.$route.query.examId,
        id: this.scoreId,
        id: this.scoreId
      };
      getExamScore(data).then((res) => {
      getExamScore(data).then(res => {
        if (res.data.data.theoryGrade != undefined) {
          this.score = res.data.data.theoryGrade;
        }
@@ -136,43 +131,49 @@
          this.$message({
            showClose: true,
            message: "密码错误!请联系管理员",
            type: "warning",
            type: "warning"
          });
          return;
        }
        reselfExamScore(this.scoreId).then((res) => {
        reselfExamScore(this.scoreId).then(res => {
          if ((res.data.success = true)) {
            this.$message({
              showClose: true,
              message: "重置成功,返回主页重新点击开始考试!",
              type: "success",
              type: "success"
            });
            this.paddWord = "";
            this.$router.push({
              path: `/exam/startexam`,
              path: `/exam/startexam`
            });
          } else {
            this.$message({
              showClose: true,
              message: "重置错误!请联系管理员",
              type: "warning",
              type: "warning"
            });
          }
        });
      } else {
        this.dialogVisible = true;
      }
    },
  },
    }
  }
};
</script>
<style lang="scss" scoped>
.exam-end {
  // width: calc(100% - 100px);
  // height: 89%;
  // margin: 2.5% 50px;
  // background-color: rgba($color: #fff, $alpha: 1);
  // display: flex;
  // align-items: center;
  // justify-content: center;
  // flex-direction: column;
  width: calc(100% - 100px);
  height: 89%;
  margin: 2.5% 50px;
  background-color: rgba($color: #fff, $alpha: 1);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
@@ -187,6 +188,7 @@
    width: 960px;
    height: 300px;
    // border: 1px solid red;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;