d7bee17c1d8fdb9a2a3c0303d7c38bc74a778e31..80561b2bc83bb35582ba62e0c21a63c3ee5a0e82
2024-10-16 lohir
bug
80561b 对比 | 目录
2024-10-16 lohir
bug
648075 对比 | 目录
2024-10-16 lohir
bug
876476 对比 | 目录
2024-10-16 lohir
bug
dd6ff8 对比 | 目录
2024-10-16 lohir
bug
fcb896 对比 | 目录
2024-10-16 lohir
bug
181c34 对比 | 目录
2024-10-16 lohir
bug
e61737 对比 | 目录
9个文件已修改
158 ■■■■ 已修改文件
src/api/exam.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/Logo.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/class-management/Class.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/education/resource/list.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/ExamManage.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/exam/monitor.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/list.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/train/data-list/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/student/list.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/exam.js
@@ -108,3 +108,19 @@
    data: data
  })
}
// 考试记录作废
export const cancel = (id) => {
  return axios({
    url: '/api/admin/exam/cancel/' + id,
    method: 'PUT'
  })
}
// 考试记录恢复
export const recover = (id) => {
  return axios({
    url: "/api/admin/exam/recover/" + id,
    method: "PUT"
  })
}
src/layout/components/Sidebar/Logo.vue
@@ -1,11 +1,11 @@
<template>
  <div class="sidebar-logo-container" :class="{'collapse':collapse}">
    <transition name="sidebarLogoFade">
      <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
      <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/dashboard">
        <img  src="@/assets/logo.png" class="sidebar-logo">
        <h1  class="sidebar-title">{{ title }} </h1>
      </router-link>
      <router-link v-else key="expand" class="sidebar-logo-link" to="/">
      <router-link v-else key="expand" class="sidebar-logo-link" to="/dashboard">
        <img  src="@/assets/logo.png" class="sidebar-logo">
        <h1 class="sidebar-title">{{ title }} </h1>
      </router-link>
src/views/class-management/Class.vue
@@ -322,7 +322,7 @@
        this.page()
      })
    },
    recover(id) {
    recover (id) {
      recover(id).then(res => {
        this.$message.success(res.data.message)
        this.page()
src/views/education/resource/list.vue
@@ -33,7 +33,9 @@
      </el-form>
      <div>
        <el-button type="primary" @click="handlerAdd" size="small">添加</el-button>
        <el-button type="danger" @click="batchRemove" size="small" style="margin-left: 5px">删除</el-button>
        <el-popconfirm title="确认批量删除吗?" @confirm="batchRemove">
          <el-button slot="reference" type="danger" size="small" style="margin-left: 5px">删除</el-button>
        </el-popconfirm>
      </div>
    </div>
src/views/exam/exam/ExamManage.vue
@@ -75,21 +75,43 @@
            size="small"
            @click="handlerEdit(scope.row)"
            v-if="scope.row.status === 'not_start'"
            v-show="scope.row.status !== 'cancel'"
          >修改
          </el-button>
          <el-popconfirm
            v-if="scope.row.status === 'not_start'"
            v-show="scope.row.status !== 'cancel'"
            style="margin: 0 5px"
            title="确定要删除该考试吗?"
            @confirm="deleteExam(scope.row.id)"
          >
            <el-button slot="reference" type="danger" size="small">删除</el-button>
            <el-button slot="reference" type="danger" size="small" v-show="scope.row.status !== 'cancel'">删除</el-button>
          </el-popconfirm>
          <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)">
          <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)" v-show="scope.row.status !== 'cancel'">
            阅卷
          </el-button>
          <el-button v-if="scope.row.status === 'ing'" type="warning" size="small" @click="monitor(scope.row)">监控</el-button>
          <el-button v-if="scope.row.status === 'ing'" type="warning" size="small" @click="monitor(scope.row)" v-show="scope.row.status !== 'cancel'">监控</el-button>
          <el-popconfirm
            class="confirm"
            style="margin: 0 5px"
            title="确定要作废该考试记录吗?"
            @confirm="cancel(scope.row.id)"
          >
            <el-button slot="reference" v-show="scope.row.status !== 'cancel'" type="danger"
                       size="small"
                       v-if="scope.row.status !== 'ing'">作废
            </el-button>
          </el-popconfirm>
          <el-popconfirm
            class="confirm"
            title="确定要恢复该考试记录吗?"
            @confirm="recover(scope.row.id)"
          >
            <el-button slot="reference" v-show="scope.row.status === 'cancel'" type="success"
                       size="small">恢复正常
            </el-button>
          </el-popconfirm>
        </template>
      </el-table-column>
    </el-table>
@@ -150,8 +172,7 @@
<script>
import Pagination from '@/components/Pagination'
import { getExams, addExam, editExam, deleteExamById } from '@/api/exam'
import { myClasses } from '@/api/classes'
import { getExams, addExam, editExam, deleteExamById, cancel, recover } from '@/api/exam'
import examPaperAPI from '@/api/examPaper'
export default {
@@ -211,6 +232,20 @@
    this.MyExamPaperList()
  },
  methods: {
    // 作废考试
    cancel (id) {
      cancel(id).then(res => {
        this.$message.success(res.data.message)
        this.page()
      })
    },
    // 恢复考试
    recover (id) {
      recover(id).then(res => {
        this.$message.success(res.data.message)
        this.page()
      })
    },
    // 考试监控列表
    monitor (row) {
      this.$router.push({ path: '/exam/monitor', query: { examId: row.id } })
@@ -229,6 +264,8 @@
        return '未开始'
      } else if (row.status === 'finished') {
        return '已结束'
      } else if (row.status === 'cancel') {
        return '已作废'
      }
    },
    MyExamPaperList () {
src/views/exam/exam/monitor.vue
@@ -2,10 +2,10 @@
  <div class="app-container">
    <el-form :model="queryParam" ref="queryForm" :inline="true">
      <el-form-item>
        <el-input v-model="queryParam.keyword" placeholder="请输入名称" clearable></el-input>
        <el-input v-model="queryParam.keyword" placeholder="请输入名称" @input="search" clearable></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="search">查询</el-button>
        <el-button type="primary" @click="search" size="small">查询</el-button>
      </el-form-item>
    </el-form>
src/views/exam/paper/list.vue
@@ -35,7 +35,13 @@
      <el-table-column label="操作" align="center" width="160px">
        <template slot-scope="{row}">
          <el-button size="mini" @click="$router.push({ path: '/exam/paper/edit', query: { id: row.id } })">编辑</el-button>
          <el-button size="mini" type="danger" @click="deletePaper(row)" class="link-left">删除</el-button>
          <el-popconfirm
            style="margin: 0 5px"
            title="确定要删除该试卷吗?"
            @confirm="deletePaper(row)"
          >
            <el-button slot="reference" type="danger" size="mini" class="link-left">删除</el-button>
          </el-popconfirm>
        </template>
      </el-table-column>
    </el-table>
@@ -49,6 +55,7 @@
import subjectApi from '@/api/subject'
import examPaperApi from '@/api/examPaper'
import { downloadExcel } from '@/utils/download'
import userApi from "@/api/user";
export default {
  components: { Pagination },
@@ -92,15 +99,21 @@
        this.listLoading = false
      })
    },
    deletePaper(row) {
      let _this = this
      examPaperApi.deletePaper(row.id).then(re => {
        if (re.code === 1) {
          _this.search()
          _this.$message.success(re.message)
        } else {
          _this.$message.error(re.message)
        }
    deletePaper (row) {
      this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let _this = this
        examPaperApi.deletePaper(row.id).then(re => {
          if (re.code === 1) {
            _this.search()
            _this.$message.success(re.message)
          } else {
            _this.$message.error(re.message)
          }
        })
      })
    },
    // 获取科目
src/views/train/data-list/index.vue
@@ -28,7 +28,13 @@
              <div class="button-container">
                <el-button v-if="item.status!==2" @click="start(item)" type="primary" size="small">开始上课</el-button>
                <el-button @click="handleUpdate(item)" type="warning" size="small">编辑</el-button>
                <el-button @click="remove(item)" type="danger" size="small">删除</el-button>
                <el-popconfirm
                  style="margin: 0 5px"
                  title="确定要删除该培训吗?"
                  @confirm="remove(item)"
                >
                  <el-button slot="reference" type="danger" size="small" >删除</el-button>
                </el-popconfirm>
              </div>
            </div>
          </el-card>
@@ -40,6 +46,8 @@
<script>
import examPaperApi from "@/api/examPaper";
export default {
  props: {
    tableData: []
@@ -49,7 +57,13 @@
      this.$emit('handleUpdate', item)
    },
    remove (item) {
      this.$emit('remove', item)
      this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$emit('remove', item)
      })
    },
    start (item) {
      this.$emit('start', item)
src/views/user/student/list.vue
@@ -49,7 +49,13 @@
          <router-link :to="{path:'/log/user/list', query:{userId:row.id}}" class="link-left">
            <el-button size="mini" >日志</el-button>
          </router-link>
          <el-button  size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button>
          <el-popconfirm
            style="margin: 0 5px"
            title="确定要删除该成员吗?"
            @confirm="deleteUser(row)"
          >
            <el-button slot="reference" type="danger" size="mini">删除</el-button>
          </el-popconfirm>
        </template>
      </el-table-column>
    </el-table>
@@ -122,14 +128,20 @@
      })
    },
    deleteUser (row) {
      let _this = this
      userApi.deleteUser(row.id).then(re => {
        if (re.code === 1) {
          _this.search()
          _this.$message.success(re.message)
        } else {
          _this.$message.error(re.message)
        }
      this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let _this = this
        userApi.deleteUser(row.id).then(re => {
          if (re.code === 1) {
            _this.search()
            _this.$message.success(re.message)
          } else {
            _this.$message.error(re.message)
          }
        })
      })
    },
    submitForm () {