examinationList.vue
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<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>