|
@@ -7,6 +7,17 @@
|
|
|
<a-button block type="primary"> 导入 </a-button>
|
|
|
</Upload>
|
|
|
</template>
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction
|
|
|
+ :actions="[
|
|
|
+ {
|
|
|
+ label: '删除',
|
|
|
+ color: 'error',
|
|
|
+ onClick: handleDelete.bind(null, record),
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
<template #facePhotoUrl="{ text }">
|
|
|
<TableImg :size="40" :simpleShow="true" :showBadge="false" :imgList="[text]" />
|
|
|
</template>
|
|
@@ -17,9 +28,10 @@
|
|
|
<script setup lang="ts">
|
|
|
import { reactive } from 'vue';
|
|
|
import { PageWrapper } from '/@/components/Page';
|
|
|
- import { BasicTable, useTable, TableImg } from '/@/components/Table';
|
|
|
+ import { BasicTable, useTable, TableImg, TableAction } from '/@/components/Table';
|
|
|
import DeptTree from '/@/views/system/user/components/DeptTree.vue';
|
|
|
import {
|
|
|
+ deletePersonnelTeacherFaceProcess,
|
|
|
getTeacherFaceProcessPage,
|
|
|
postTeacherFaceProcessBatchImport,
|
|
|
} from '/@/services/apis/TeacherFaceProcessController';
|
|
@@ -27,7 +39,8 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { Upload } from 'ant-design-vue';
|
|
|
|
|
|
- const { createMessage } = useMessage();
|
|
|
+ const { createConfirm, createMessage } = useMessage();
|
|
|
+
|
|
|
const [openFullLoading, closeFullLoading] = useLoading({
|
|
|
tip: '处理中...',
|
|
|
});
|
|
@@ -95,6 +108,12 @@
|
|
|
bordered: true,
|
|
|
immediate: false,
|
|
|
canResize: true,
|
|
|
+ actionColumn: {
|
|
|
+ width: 100,
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
const searchInfo = reactive<Recordable>({});
|
|
@@ -116,6 +135,25 @@
|
|
|
}
|
|
|
return false;
|
|
|
};
|
|
|
+
|
|
|
+ const handleDelete = (record: any) => {
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '温馨提醒',
|
|
|
+ content: '是否删除该记录?',
|
|
|
+ onOk: async () => {
|
|
|
+ try {
|
|
|
+ await deletePersonnelTeacherFaceProcess([record.id]);
|
|
|
+ createMessage.success('删除成功');
|
|
|
+ await reload();
|
|
|
+ } catch (e) {
|
|
|
+ createMessage.error('删除失败');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ });
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less"></style>
|