fuliqi
2024-07-11 8269775d78f974a266c848ea15e73a85dafec2a5
监控展示还没开始做题的学生
7个文件已修改
94 ■■■■■ 已修改文件
src/router.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/info.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/ExamManage.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/MarkPaper.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/MarkPaperDetail.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/monitor.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/meet/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router.js
@@ -291,7 +291,7 @@
        component: () => import('@/views/education/cheat/list'),
        name: 'EducationCheatPage',
        meta: { title: '作弊记录', noCache: true }
      },
      }
    ]
  },
  {
@@ -345,7 +345,7 @@
          affix: true
        },
        component: () => import('@/views/sys/SysSetting')
      },
      }
    ]
  },
src/views/answer/info.vue
@@ -36,7 +36,11 @@
                {{ row.questionCorrect }} / {{ row.questionCount }}
              </template>
            </el-table-column>
            <el-table-column prop="doTime" label="耗时" width="80px" align="center" />
            <el-table-column prop="doTime" label="耗时" width="100px" align="center">
              <template slot-scope="{row}">
                {{ formattedDoTime(row) }}
              </template>
            </el-table-column>
            <el-table-column prop="submitTime" label="提交时间" width="240px" align="center">
              <template slot-scope="{row}">
                <span :style="row.status === 0 ? '' : 'color: red'">
@@ -82,14 +86,20 @@
      tableData: [],
      visible: false,
      subjects: []
    };
    }
  },
  created() {
    this.queryParam.examId = this.$route.query.id;
    this.queryParam.userId = this.$route.query.userId;
    this.search();
    this.queryParam.examId = this.$route.query.id
    this.queryParam.userId = this.$route.query.userId
    this.search()
  },
  methods: {
    formattedDoTime (row) {
      const totalSeconds = row.doTime
      const minutes = Math.floor(totalSeconds / 60)
      const seconds = totalSeconds % 60
      return `${minutes}分${seconds < 10 ? '0' + seconds : seconds}秒`
    },
    // 获取列表
    search() {
      this.listLoading = true
@@ -102,28 +112,28 @@
      })
    },
    view(row) {
      this.$router.push({ path: '/answer/answer-detail', query: { id: row.id } });
      this.$router.push({ path: '/answer/answer-detail', query: { id: row.id } })
    },
    handleExport() {
      let that = this
      let url = '/api/admin/examPaperAnswer/exportExcel?userName=' + this.queryParam.userName;
      if (this.queryParam.userId) url += '&userId=' + this.queryParam.userId;
      if (this.queryParam.examId) url += '&examId=' + this.queryParam.examId;
      var x = new XMLHttpRequest();
      x.open("POST", url, true);
      x.responseType = "blob";
      let url = '/api/admin/examPaperAnswer/exportExcel?userName=' + this.queryParam.userName
      if (this.queryParam.userId) url += '&userId=' + this.queryParam.userId
      if (this.queryParam.examId) url += '&examId=' + this.queryParam.examId
      var x = new XMLHttpRequest()
      x.open('POST', url, true)
      x.responseType = 'blob'
      x.onload = function () {
        var url = window.URL.createObjectURL(x.response);
        var a = document.createElement("a");
        a.href = url;
        if (that.queryParam.examId) a.download = that.tableData[0].examName + '.xlsx';
        if (that.queryParam.userId) a.download = that.tableData[0].userName + '.xlsx';
        a.click();
      };
      x.send();
        var url = window.URL.createObjectURL(x.response)
        var a = document.createElement('a')
        a.href = url
        if (that.queryParam.examId) a.download = that.tableData[0].examName + '.xlsx'
        if (that.queryParam.userId) a.download = that.tableData[0].userName + '.xlsx'
        a.click()
      }
      x.send()
    }
  }
};
}
</script>
<style scoped lang="scss">
.flex {
src/views/exam/exam/ExamManage.vue
@@ -81,8 +81,10 @@
            <el-button slot="reference" type="danger" size="small">删除</el-button>
          </el-popconfirm>
          <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)">阅卷</el-button>
          <el-button type="danger" size="small" @click="deleteExam(scope.row.id)">删除</el-button>
          <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)">
            阅卷
          </el-button>
          <el-button type="danger" size="small" @click="deleteExam(scope.row)">删除</el-button>
          <el-button type="warning" size="small" @click="monitor(scope.row)">监控</el-button>
        </template>
      </el-table-column>
@@ -245,11 +247,17 @@
        this.classesList = res.data.data
      })
    },
    deleteExam (id) {
      deleteExamById(id).then(res => {
    deleteExam (row) {
      this.$confirm('确认是否删除' + row.examName + '?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteExamById(row.id).then(res => {
        this.$message.success('删除成功')
        this.page()
      })
      })
    },
    handlerEdit (row) {
      this.examForm = {
src/views/exam/exam/MarkPaper.vue
@@ -91,7 +91,6 @@
  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()
    }
src/views/exam/exam/MarkPaperDetail.vue
@@ -56,6 +56,7 @@
        </el-row>
      </el-form>
    </div>
    <el-empty v-if="empty" style="width:1200px;height:500px;"></el-empty>
  </div>
</template>
@@ -71,11 +72,13 @@
    getStudentExam(this.$route.query.examId, this.$route.query.userId).then(re => {
      this.formLoading = true
      this.form = re.data.data
      if (!this.form.titleItems) this.empty = true;
      this.formLoading = false
    })
  },
  data () {
    return {
      empty: false,
      paperQuestionList: [],
      form: {},
      formLoading: false,
src/views/exam/exam/monitor.vue
@@ -117,18 +117,19 @@
          { required: true, message: '请输入加时时间', trigger: 'blur' }
        ]
      },
    };
    }
  },
  created() {
    this.queryParam.examId = this.$route.query.examId;
    this.queryParam.examId = this.$route.query.examId
    this.search()
  },
  methods: {
    // 处理加时
    handlerAddTime() {
    handlerAddTime (row) {
      this.$refs['addTimeForm'].validate((valid) => {
        if (valid) {
          this.addTimeForm.examId = this.queryParam.examId
          this.addTimeForm.userId = row.userId
          addTime(this.addTimeForm).then(res => {
            this.$message.success('加时成功')
          })
@@ -144,9 +145,9 @@
      })
    },
    handleNullify(row) {
      let cheatObj = { examId: row.examId, cheatUser: row.userId };
      let cheatObj = { examId: row.examId, cheatUser: row.userId }
      cheatApi.edit(cheatObj).then(res => {
        this.$message.success(res.message);
        this.$message.success(res.message)
      })
    },
    statusFormatter(row) {
@@ -154,6 +155,8 @@
        return '进行中'
      } else if (row.status === 'finish') {
        return '已结束'
      } else if (!row.status) {
        return '未开始'
      }
    },
    // 获取列表
@@ -171,8 +174,8 @@
    edit(row) {
      cheatApi.select(row.id).then(re => {
        if (re.code === 1) {
          this.form = re.data;
          this.visible = true;
          this.form = re.data
          this.visible = true
        } else {
          this.$message.error(re.message)
        }
src/views/meet/index.vue
@@ -34,6 +34,7 @@
    jitsiApi.addListener('readyToClose', () => {
      window.close()
    })
  }
}