fuliqi
2024-07-10 46d10dd9feb1f76399b14ddb078299ed863e2b32
阅卷页面不缓存
2个文件已修改
48 ■■■■ 已修改文件
src/router.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/MarkPaper.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router.js
@@ -50,21 +50,21 @@
        path: '/exam/mark/paper',
        component: () => import('@/views/exam/exam/MarkPaper'),
        name: 'MarkPaper',
        meta: { title: '阅卷'},
        meta: { title: '阅卷', noCache: true },
        hidden: true
      },
      {
        path: '/exam/mark/paper/detail',
        component: () => import('@/views/exam/exam/MarkPaperDetail'),
        name: 'MarkPaperDetail',
        meta: { title: '阅卷'},
        meta: { title: '阅卷详情', noCache: true },
        hidden: true
      },
      {
        path: '/exam/monitor',
        component: () => import('@/views/exam/exam/monitor'),
        name: 'monitor',
        meta: { title: '监控'},
        meta: { title: '监控', noCache: true },
        hidden: true
      }
    ]
@@ -385,7 +385,8 @@
      }
    ]
  },
  { path: '*',
  {
    path: '*',
    hidden: true,
    component: () => import('@/views/error-page/404'),
    meta: { title: '404', noCache: true }
src/views/exam/exam/MarkPaper.vue
@@ -4,31 +4,31 @@
      <el-col :span="5">
        <div class="nameClass">
          <div class="bottom5">考试名称</div>
          <div class="title">{{examInfo.examName}}</div>
          <div class="title">{{ examInfo.examName }}</div>
        </div>
      </el-col>
      <el-col :span="5">
        <div class="nameClass">
          <div class="bottom5">试卷名称</div>
          <div class="title">{{examInfo.examPaperName}}</div>
          <div class="title">{{ examInfo.examPaperName }}</div>
        </div>
      </el-col>
      <el-col :span="4">
        <div class="staticNum">
          <div class="bottom5">应考人数</div>
          <div class="title">{{examInfo.shouldJoinNum}}</div>
          <div class="title">{{ examInfo.shouldJoinNum }}</div>
        </div>
      </el-col>
      <el-col :span="4">
        <div class="staticNum">
          <div class="bottom5">缺考人数</div>
          <div class="title">{{examInfo.missJoinNum}}</div>
          <div class="title">{{ examInfo.missJoinNum }}</div>
        </div>
      </el-col>
      <el-col :span="4">
        <div class="staticNum">
          <div class="bottom5">参加但未完成人数</div>
          <div class="title">{{examInfo.joinButNotFinishNum}}</div>
          <div class="title">{{ examInfo.joinButNotFinishNum }}</div>
        </div>
      </el-col>
    </el-row>
@@ -76,7 +76,7 @@
        width="300px"
      >
        <template slot-scope="scope">
          <el-button @click="markPaper(scope.row.userId)" type="warning">阅卷</el-button>
          <el-button @click="markPaper(scope.row)" type="warning">阅卷</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -91,10 +91,18 @@
  mounted () {
    this.examInfo.examName = this.$route.query.examName
    this.examInfo.examId = this.$route.query.examId
    console.log('------->' + this.examInfo.examName + '------->' + this.examInfo.examId)
    if (this.examInfo.examId) {
      this.getExamInfo()
    }
  },
  // watch: {
  //   $route: {
  //     handler () {
  //       this.reloadPage()
  //     }
  //   }
  // },
  data () {
    return {
      examInfo: {
@@ -111,6 +119,14 @@
    }
  },
  methods: {
    // reloadPage () {
    //   this.examInfo.examName = this.$route.query.examName
    //   this.examInfo.examId = this.$route.query.examId
    //   console.log('------->' + this.examInfo.examName + '------->' + this.examInfo.examId)
    //   if (this.examInfo.examId) {
    //     this.getExamInfo()
    //   }
    // },
    statusFormatter (row, column, cellValue, index) {
      if (cellValue === 'finish') {
        return '完成'
@@ -118,9 +134,12 @@
        return '未完成'
      }
    },
    markPaper (userId) {
    markPaper (row) {
      // todo打开阅卷页面
      this.$router.push({path: "/exam/mark/paper/detail", query: {examId: this.examInfo.examId, examName: this.examInfo.examName, userId: userId}})
      this.$router.push({
        path: '/exam/mark/paper/detail',
        query: { examId: this.examInfo.examId, examName: this.examInfo.examName, userId: row.userId }
      })
    },
    getExamInfo () {
      getExamMarkPaperInfo(this.examInfo.examId).then(res => {
@@ -136,14 +155,17 @@
.title {
  font-size: 18px;
}
.bottom5 {
  margin-bottom: 5px;
}
.nameInfo {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.nameClass {
  width: 100%;
  display: flex;
@@ -153,6 +175,7 @@
  height: 70px;
  background-color: #cb5858;
}
.staticNum {
  width: 100%;
  display: flex;