bug
lohir
2024-10-16 181c340d82dfa6353521e0218a52dd4b827843d8
bug
1个文件已修改
33 ■■■■■ 已修改文件
src/views/exam/paper/list.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)
          }
        })
      })
    },
    // 获取科目