|
@@ -0,0 +1,180 @@
|
|
|
|
+<template>
|
|
|
|
+ <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
|
|
|
+ <ClassTree class="w-1/3 xl:w-1/4" @select="handleSelect" />
|
|
|
|
+ <BasicTable @register="registerTable" class="w-2/3 xl:w-3/4" :searchInfo="searchInfo">
|
|
|
|
+ <template #toolbar>
|
|
|
|
+ <Upload :showUploadList="false" :before-upload="beforeUpload" accept=".rar,.zip">
|
|
|
|
+ <a-button block type="primary"> 导入 </a-button>
|
|
|
|
+ </Upload>
|
|
|
|
+ </template>
|
|
|
|
+ <template #action="{ record }">
|
|
|
|
+ <TableAction
|
|
|
|
+ :actions="[
|
|
|
|
+ {
|
|
|
|
+ label: '移出',
|
|
|
|
+ onClick: handleDelete.bind(null, record),
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </BasicTable>
|
|
|
|
+ </PageWrapper>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup lang="ts">
|
|
|
|
+ import { reactive } from 'vue';
|
|
|
|
+ import { Upload } from 'ant-design-vue';
|
|
|
|
+ import { getDataOption } from '/@/api/system/dic';
|
|
|
|
+ import { PageWrapper } from '/@/components/Page';
|
|
|
|
+ import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
|
+ import ClassTree from '/@/views/educational/class/components/ClassTree.vue';
|
|
|
|
+ import {
|
|
|
|
+ getStundentFaceProcessPage,
|
|
|
|
+ postStundentFaceProcessBatchImport,
|
|
|
|
+ } from '/@/services/apis/StundentFaceProcessController';
|
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
+
|
|
|
|
+ import { useLoading } from '/@/components/Loading';
|
|
|
|
+
|
|
|
|
+ const { createConfirm, createMessage } = useMessage();
|
|
|
|
+
|
|
|
|
+ const [openFullLoading, closeFullLoading] = useLoading({
|
|
|
|
+ tip: '处理中...',
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const [registerTable, { reload }] = useTable({
|
|
|
|
+ api: getStundentFaceProcessPage,
|
|
|
|
+ title: '白名单登记列表',
|
|
|
|
+ rowKey: 'id',
|
|
|
|
+ columns: [
|
|
|
|
+ {
|
|
|
|
+ title: '学号',
|
|
|
|
+ dataIndex: 'studentId',
|
|
|
|
+ align: 'left',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '姓名',
|
|
|
|
+ dataIndex: 'name',
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '手机号',
|
|
|
|
+ dataIndex: 'mobile',
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 120,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '性别',
|
|
|
|
+ dataIndex: 'gender',
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 70,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '班级',
|
|
|
|
+ dataIndex: 'classCn',
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 120,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '班主任',
|
|
|
|
+ dataIndex: 'teacherCn',
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '就读方式',
|
|
|
|
+ dataIndex: 'stduyStatus',
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ formConfig: {
|
|
|
|
+ labelWidth: 120,
|
|
|
|
+ schemas: [
|
|
|
|
+ {
|
|
|
|
+ field: 'studentId',
|
|
|
|
+ label: '学号',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ colProps: { span: 8 },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'name',
|
|
|
|
+ label: '姓名',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ colProps: { span: 8 },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'mobile',
|
|
|
|
+ label: '手机号',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ colProps: { span: 8 },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'stduyStatus',
|
|
|
|
+ label: '就读方式',
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
+ colProps: { span: 8 },
|
|
|
|
+ componentProps: {
|
|
|
|
+ api: getDataOption,
|
|
|
|
+ params: { code: 'stduy_status' },
|
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ useSearchForm: true,
|
|
|
|
+ showTableSetting: true,
|
|
|
|
+ bordered: true,
|
|
|
|
+ immediate: true,
|
|
|
|
+ canResize: true,
|
|
|
|
+ actionColumn: {
|
|
|
|
+ width: 100,
|
|
|
|
+ title: '操作',
|
|
|
|
+ dataIndex: 'action',
|
|
|
|
+ slots: { customRender: 'action' },
|
|
|
|
+ fixed: 'right',
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const searchInfo = reactive<Recordable>({});
|
|
|
|
+
|
|
|
|
+ function handleSelect(id) {
|
|
|
|
+ searchInfo.classId = id;
|
|
|
|
+ reload();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const beforeUpload = async (e) => {
|
|
|
|
+ try {
|
|
|
|
+ openFullLoading();
|
|
|
|
+ await postStundentFaceProcessBatchImport({ file: e });
|
|
|
|
+ closeFullLoading();
|
|
|
|
+ createMessage.success('导入成功');
|
|
|
|
+ reload();
|
|
|
|
+ } catch {
|
|
|
|
+ closeFullLoading();
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const handleDelete = (record: any) => {
|
|
|
|
+ createConfirm({
|
|
|
|
+ iconType: 'warning',
|
|
|
|
+ title: '温馨提醒',
|
|
|
|
+ content: '是否删除该记录?',
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ try {
|
|
|
|
+ // await deleteEvaluationmanagemenEvaluateTemplate([record.id]);
|
|
|
|
+ createMessage.success('删除成功');
|
|
|
|
+ await reload();
|
|
|
|
+ } catch (e) {
|
|
|
|
+ createMessage.error('删除失败');
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ okText: '确认',
|
|
|
|
+ cancelText: '取消',
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped lang="less"></style>
|