examinationList.vue 1.52 KB
<template>
  <div style="width: 100%;">
    <el-table v-loading="loading" border :data="list">
      <el-table-column type="index" width="55" align="center" label="序号" />
      <el-table-column label="姓名" min-width="100" align="center" prop="perName" />
      <el-table-column min-width="130" label="会员号" align="center" prop="perCode" />
      <el-table-column label="证件号码" align="center" prop="perIdcCode" min-width="170" />
      <el-table-column
        label="注册单位" align="center" show-overflow-tooltip prop="memName" min-width="180"
      />
      <el-table-column v-if="!disabled" label="操作" align="center" class-name="small-padding fixed-width">
        <template #default="{row}">
          <el-button link type="primary" @click="handleDel(row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>

import { getCurrentInstance, ref, computed } from 'vue'
import { examinerDel } from '@/api/exam/examinationAudit'

const emit = defineEmits(['getList'])


const { proxy } = getCurrentInstance()
const loading = ref(false)

const props = defineProps({
  list: {
    type: Array,
    default: () => {
      return []
    }
  },
  disabled: {
    type: Boolean,
    default: false
  }
})

const list = computed(() => props.list)

async function handleDel(row) {
  await proxy.$modal.confirm('确定删除该考官吗?')
  await examinerDel(row.id)
  await proxy.$modal.msgSuccess('删除成功')
  emit('getList')
}

</script>

<style scoped>

</style>