Parcourir la source

feat:添加查看成绩

DESKTOP-USV654P\pc il y a 4 mois
Parent
commit
ad508e43ee

+ 40 - 0
src/services/apis/ExamPlanController.ts

@@ -0,0 +1,40 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Exam Plan Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增考试计划维护 POST /xycxedu/examPlan */
+export async function postXycxeduExamPlan(params:API.AddExamPlanDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/xycxedu/examPlan', data:params},{errorMessageMode:mode});}
+/** 修改考试计划维护 PUT /xycxedu/examPlan */
+export async function putXycxeduExamPlan(params:API.UpdateExamPlanDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/xycxedu/examPlan', data:params},{errorMessageMode:mode});}
+/** 删除考试计划维护 DELETE /xycxedu/examPlan */
+export async function deleteXycxeduExamPlan(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/xycxedu/examPlan', data:params},{errorMessageMode:mode});}
+/** 查询所有考试记录 GET /xycxedu/examPlan/exam-list */
+export async function getExamPlanExamList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.XycxeduExamListVo[]>
+        ({url: '/xycxedu/examPlan/exam-list', params:params},{errorMessageMode:mode});}
+/** 考试记录(分页) GET /xycxedu/examPlan/exam-statistics */
+export async function getExamPlanExamStatistics(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ExamStatisticsPageVo>>
+        ({url: '/xycxedu/examPlan/exam-statistics', params:params},{errorMessageMode:mode});}
+/** 根据id查询考试计划维护信息 GET /xycxedu/examPlan/info */
+export async function getExamPlanInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ExamPlanVo>
+        ({url: '/xycxedu/examPlan/info', params:params},{errorMessageMode:mode});}
+/** 考试计划维护列表(分页) GET /xycxedu/examPlan/page */
+export async function getExamPlanPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ExamPlanPageVo>>
+        ({url: '/xycxedu/examPlan/page', params:params},{errorMessageMode:mode});}
+/** 查询所有考试计划 GET /xycxedu/examPlan/plan-list */
+export async function getExamPlanPlanList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ExamPlanListVo[]>
+        ({url: '/xycxedu/examPlan/plan-list', params:params},{errorMessageMode:mode});}
+            

+ 17 - 0
src/services/apis/ExamSubjectScoreController.ts

@@ -0,0 +1,17 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Exam Subject Score Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 考试成绩查询(分页) GET /xycxedu/ExamSubjectScore/page */
+export async function getExamSubjectScorePage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ExamSubjectScorePageVo>>
+        ({url: '/xycxedu/ExamSubjectScore/page', params:params},{errorMessageMode:mode});}
+            

+ 6 - 0
src/services/apis/index.ts

@@ -195,6 +195,8 @@ import * as WorkflowSchemaController from './WorkflowSchemaController';
 import * as WorkflowSchemaHistoryController from './WorkflowSchemaHistoryController';
 import * as WorkflowSpecialMenuController from './WorkflowSpecialMenuController';
 import * as WorkflowApproveRecordController from './WorkflowApproveRecordController';
+import * as ExamSubjectScoreController from './ExamSubjectScoreController';
+import * as ExamPlanController from './ExamPlanController';
 
 
         export default {
@@ -582,6 +584,10 @@ WorkflowSchemaHistoryController,
 WorkflowSpecialMenuController,
 /** Workflow Approve Record Controller */
 WorkflowApproveRecordController,
+/** Exam Subject Score Controller */
+ExamSubjectScoreController,
+/** Exam Plan Controller */
+ExamPlanController,
 
         };
         

+ 118 - 0
src/services/typing.d.ts

@@ -1815,6 +1815,15 @@ status?: number;
 total?: number;
 }
 
+type AddExamPlanDto = {
+/** 晓羊策学考试计划id */
+milexamids?: string;
+/** 考试计划名称 */
+name?: string;
+/** 学期id */
+semesterId?: string;
+}
+
 type AddFormCodeFirstDto = {
 /** 表单分类 关联 数据字典 */
 category?: string;
@@ -8327,6 +8336,74 @@ startTime?: string;
 sumScore?: number;
 }
 
+type ExamPlanListVo = {
+id?: string;
+/** 考试计划名称 */
+name?: string;
+}
+
+type ExamPlanPageVo = {
+/** 创建时间 */
+createDate?: string;
+/** 创建人 */
+createUserId?: string;
+/** 删除标记 */
+deleteMark?: number;
+/** 有效标记 */
+enabledMark?: number;
+id?: string;
+/** 晓羊策学考试计划id */
+milexamids?: string;
+/** 晓羊策学考试计划名称 */
+milexamnames?: string;
+/** 修改日期 */
+modifyDate?: string;
+/** 修改人 */
+modifyUserId?: string;
+/** 考试计划名称 */
+name?: string;
+/** 学期id */
+semesterId?: string;
+}
+
+type ExamPlanVo = {
+id?: string;
+/** 晓羊策学考试计划id */
+milexamids?: string;
+/** 考试计划名称 */
+name?: string;
+/** 学期id */
+semesterId?: string;
+}
+
+type ExamStatisticsPageVo = {
+/** 班级数量 */
+classCount?: number;
+/** 主键 */
+id?: string;
+/** 考试名称 */
+milexamname?: string;
+/** 考试时间 */
+sdate?: string;
+/** 学期名称 */
+semesterName?: string;
+/** 学生数量 */
+studentCount?: number;
+}
+
+type ExamSubjectScorePageVo = {
+/** 科目 */
+coursename?: string;
+/** 年级排名 */
+gradeRanking?: number;
+/** 考试名称 */
+milexamname?: string;
+/** 成绩 */
+score?: number;
+/** 学期名称 */
+semesterName?: string;
+}
+
 type FaceIdentifyRecordsVo = {
 /** 设备名称 */
 deviceName?: string;
@@ -10859,6 +10936,30 @@ total?: number;
 totalPage?: number;
 }
 
+type PageOutput<ExamPlanPageVo> = {
+currentPage?: number;
+list?: ExamPlanPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
+type PageOutput<ExamStatisticsPageVo> = {
+currentPage?: number;
+list?: ExamStatisticsPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
+type PageOutput<ExamSubjectScorePageVo> = {
+currentPage?: number;
+list?: ExamSubjectScorePageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
 type PageOutput<FaceIdentifyRecordsVo> = {
 currentPage?: number;
 list?: FaceIdentifyRecordsVo[];
@@ -16729,6 +16830,16 @@ id?: string;
 status?: number;
 }
 
+type UpdateExamPlanDto = {
+id?: string;
+/** 晓羊策学考试计划id */
+milexamids?: string;
+/** 考试计划名称 */
+name?: string;
+/** 学期id */
+semesterId?: string;
+}
+
 type UpdateFaceManagementStatusDto = {
 enabledMark?: number;
 id?: string;
@@ -19911,6 +20022,13 @@ systemId?: string;
 userId?: string;
 }
 
+type XycxeduExamListVo = {
+/** 晓羊策学考试计划id */
+milexamid?: string;
+/** 考试计划名称 */
+milexamname?: string;
+}
+
 type 委托 = {
 /** 被委托人 */
 delegateUserIds?: string;

+ 137 - 0
src/views/educational/studentScore/detail.vue

@@ -0,0 +1,137 @@
+<script setup lang="ts">
+  import { useModalInner, BasicModal } from '/@/components/Modal';
+  import { useTable, BasicTable } from '/@/components/Table';
+  import { reactive, ref } from 'vue';
+  import { Recordable } from 'vite-plugin-mock';
+  import { requestMagicApi } from '/@/api/magicApi';
+  import { getExamPlanPlanList } from '/@/services/apis/ExamPlanController';
+  import { getExamSubjectScorePage } from '/@/services/apis/ExamSubjectScoreController';
+
+  const modelRef = ref<Recordable>({});
+  const status = ref<Number>(0);
+
+  const emit = defineEmits(['success', 'register']);
+  const searchInfo = reactive<Recordable>({});
+
+  const [registerTable, { reload }] = useTable({
+    api: getExamSubjectScorePage,
+    title: '满足学生列表',
+    rowKey: 'id',
+    columns: [
+      {
+        title: '学期',
+        dataIndex: 'semesterName',
+        align: 'left',
+        width: 100,
+      },
+      {
+        title: '考试计划',
+        dataIndex: 'milexamname',
+        align: 'left',
+      },
+      {
+        title: '科目',
+        dataIndex: 'coursename',
+        align: 'left',
+        width: 120,
+      },
+      {
+        title: '成绩',
+        dataIndex: 'score',
+        align: 'left',
+        width: 80,
+      },
+      {
+        title: '班级排名',
+        dataIndex: 'gradeRanking1',
+        align: 'left',
+        width: 80,
+      },
+      {
+        title: '年级排名',
+        dataIndex: 'gradeRanking',
+        align: 'left',
+        width: 80,
+      },
+    ],
+    formConfig: {
+      labelWidth: 120,
+      schemas: [
+        {
+          field: 'semesterId',
+          label: '学期',
+          component: 'ApiSelect',
+          colProps: { span: 8 },
+          componentProps: {
+            getPopupContainer: () => document.body,
+            api: requestMagicApi,
+            params: {
+              url: '/baseData/semester/option',
+            },
+            showSearch: true,
+            filterOption: (input: string, option: any) => {
+              return (
+                option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+                option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+              );
+            },
+          },
+        },
+        {
+          field: 'examPlanId',
+          label: '考试计划',
+          component: 'ApiSelect',
+          colProps: { span: 8 },
+          componentProps: {
+            getPopupContainer: () => document.body,
+            api: getExamPlanPlanList,
+            valueField: 'id',
+            labelField: 'name',
+            filterOption: (input: string, option: any) => {
+              return (
+                option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+                option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+              );
+            },
+          },
+        },
+      ],
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: false,
+    canResize: true,
+  });
+
+  const [registerModal, { setModalProps }] = useModalInner((data) => {
+    setModalProps({ confirmLoading: false });
+    modelRef.value = { ...data.baseData };
+    searchInfo.userId = data.baseData.id;
+    status.value = data.status;
+    reload();
+  });
+
+  const handleCancel = () => {
+    emit('success');
+  };
+</script>
+
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :width="1002"
+    title="查看成绩"
+    :footer="null"
+    @cancel="handleCancel"
+  >
+    <div style="height: 600px">
+      <BasicTable @register="registerTable" :searchInfo="searchInfo" />
+    </div>
+  </BasicModal>
+</template>
+
+<style scoped lang="less"></style>

+ 126 - 0
src/views/educational/studentScore/index.vue

@@ -0,0 +1,126 @@
+<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 #action="{ record }">
+        <TableAction
+          :actions="[
+            {
+              label: '查看成绩',
+              onClick: handleView.bind(null, record),
+            },
+          ]"
+        />
+      </template>
+    </BasicTable>
+    <FormDetail @register="registerModal" />
+  </PageWrapper>
+</template>
+
+<script setup lang="ts">
+  import { reactive } from 'vue';
+  import { PageWrapper } from '/@/components/Page';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
+  import ClassTree from '/@/views/educational/class/components/ClassGroup.vue';
+  import { getXjrUserPage } from '/@/api/dev/studentbasemanager';
+  import { Recordable } from 'vite-plugin-mock';
+  import { useModal } from '/@/components/Modal';
+  import FormDetail from './detail.vue';
+
+  const [registerTable, { reload }] = useTable({
+    api: getXjrUserPage,
+    title: '学生信息列表',
+    rowKey: 'id',
+    columns: [
+      {
+        title: '学号',
+        dataIndex: 'credentialNumber',
+        align: 'left',
+      },
+      {
+        title: '姓名',
+        dataIndex: 'name',
+        align: 'left',
+        width: 100,
+      },
+      {
+        title: '手机号',
+        dataIndex: 'mobile',
+        align: 'left',
+        width: 120,
+      },
+      {
+        title: '性别',
+        dataIndex: 'genderCn',
+        align: 'left',
+        width: 70,
+      },
+      {
+        title: '班级',
+        dataIndex: 'className',
+        align: 'left',
+        width: 120,
+      },
+      {
+        title: '班主任',
+        dataIndex: 'teacherName',
+        align: 'left',
+        width: 100,
+      },
+    ],
+    formConfig: {
+      labelWidth: 120,
+      schemas: [
+        {
+          field: 'credentialNumber',
+          label: '学号',
+          component: 'Input',
+          colProps: { span: 8 },
+        },
+        {
+          field: 'name',
+          label: '姓名',
+          component: 'Input',
+          colProps: { span: 8 },
+        },
+        {
+          field: 'phone',
+          label: '手机号',
+          component: 'Input',
+          colProps: { span: 8 },
+        },
+      ],
+    },
+    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>({});
+  const [registerModal, { openModal }] = useModal();
+
+  function handleSelect(data) {
+    searchInfo.treeId = data.id;
+    searchInfo.treeType = data.type;
+    reload();
+  }
+
+  const handleView = (record: any) => {
+    openModal(true, {
+      baseData: {
+        ...record,
+      },
+    });
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 98 - 0
src/views/educational/studentScore/plan/data.config.ts

@@ -0,0 +1,98 @@
+import { BasicColumn, FormSchema } from '/@/components/Table';
+
+import { requestMagicApi } from '/@/api/magicApi';
+import { getExamPlanExamList } from '/@/services/apis/ExamPlanController';
+
+export const tableColumns: BasicColumn[] = [
+  {
+    title: '考试学期',
+    dataIndex: 'semesterCn',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '考试计划',
+    dataIndex: 'name',
+    align: 'left',
+    width: 150,
+  },
+  {
+    title: '考试记录',
+    dataIndex: 'milexamnames',
+    align: 'left',
+  },
+];
+
+export const searchFormSchema: FormSchema[] = [
+  {
+    field: 'semesterId',
+    label: '学期',
+    component: 'ApiSelect',
+    colProps: { span: 8 },
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: requestMagicApi,
+      params: {
+        url: '/baseData/semester/option',
+      },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
+    },
+  },
+  {
+    field: 'name',
+    label: '计划名称',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+];
+
+export const formSchema: FormSchema[] = [
+  {
+    label: '学期',
+    field: 'semesterId',
+    component: 'ApiSelect',
+    required: true,
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: requestMagicApi,
+      params: {
+        url: '/baseData/semester/option',
+      },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
+    },
+    colProps: { span: 24 },
+  },
+  {
+    field: 'name',
+    label: '计划名称',
+    component: 'Input',
+    required: true,
+    colProps: { span: 24 },
+  },
+  {
+    label: '考试记录',
+    field: 'milexamids',
+    component: 'ApiSelect',
+    required: true,
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: getExamPlanExamList,
+      labelField: 'milexamname',
+      valueField: 'milexamid',
+      mode: 'multiple',
+    },
+    colProps: { span: 24 },
+  },
+];

+ 78 - 0
src/views/educational/studentScore/plan/edit.vue

@@ -0,0 +1,78 @@
+<template>
+  <BasicModal
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    showFooter
+  >
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
+<script setup lang="ts">
+  import { ref, computed, unref } from 'vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form/index';
+  import { formSchema } from './data.config';
+  import {
+    getExamPlanInfo,
+    postXycxeduExamPlan,
+    putXycxeduExamPlan,
+  } from '/@/services/apis/ExamPlanController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref({});
+  const emit = defineEmits(['success', 'register']);
+  const { createMessage } = useMessage();
+  const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
+    labelWidth: 100,
+    schemas: formSchema,
+    showActionButtonGroup: false,
+  });
+
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+    resetFields();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+
+    if (unref(isUpdate)) {
+      const resData = await getExamPlanInfo({ id: data.baseData.id });
+      resData['milexamids'] = resData['milexamids'].split(',');
+
+      modelRef.value = { ...resData };
+      setFieldsValue({
+        ...resData,
+      });
+    }
+  });
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '新增考试计划' : '编辑考试计划'));
+  const handleSubmit = async () => {
+    try {
+      const values = await validate();
+      setModalProps({ confirmLoading: true });
+      const postParams = unref(modelRef);
+      Object.assign(postParams, values);
+      postParams['milexamids'] = postParams['milexamids'].join(',');
+
+      if (unref(isUpdate)) {
+        await putXycxeduExamPlan(postParams as API.UpdateExamPlanDto);
+      } else {
+        await postXycxeduExamPlan(postParams as API.AddExamPlanDto);
+      }
+
+      createMessage.success('操作成功');
+      closeModal();
+      emit('success');
+    } finally {
+      setModalProps({ confirmLoading: false });
+    }
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 98 - 0
src/views/educational/studentScore/plan/index.vue

@@ -0,0 +1,98 @@
+<template>
+  <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
+    <BasicTable @register="registerTable">
+      <template #toolbar>
+        <a-button type="primary" @click="handleEdit({}, false)">新增</a-button>
+      </template>
+      <template #action="{ record }">
+        <TableAction
+          :actions="[
+            {
+              label: '编辑',
+              onClick: handleEdit.bind(null, record, true),
+            },
+            {
+              label: '删除',
+              color: 'error',
+              onClick: handleDelete.bind(null, record),
+            },
+          ]"
+        />
+      </template>
+    </BasicTable>
+    <FormEdit @register="registerModal" @success="handleSuccess" />
+  </PageWrapper>
+</template>
+
+<script setup lang="ts">
+  import { onMounted } from 'vue';
+  import { PageWrapper } from '/@/components/Page';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
+  import { tableColumns, searchFormSchema } from './data.config';
+  import { useModal } from '/@/components/Modal';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import FormEdit from './edit.vue';
+  import { deleteXycxeduExamPlan, getExamPlanPage } from '/@/services/apis/ExamPlanController';
+
+  const [registerModal, { openModal }] = useModal();
+
+  const [registerTable, { reload }] = useTable({
+    api: getExamPlanPage,
+    title: '考试计划列表',
+    rowKey: 'id',
+    columns: tableColumns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    actionColumn: {
+      width: 120,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
+  });
+  const { createConfirm, createMessage } = useMessage();
+
+  const handleDelete = (record: any) => {
+    createConfirm({
+      iconType: 'warning',
+      title: '温馨提醒',
+      content: '是否删除该记录?',
+      onOk: async () => {
+        try {
+          await deleteXycxeduExamPlan([record.id]);
+          createMessage.success('删除成功');
+          await reload();
+        } catch (e) {
+          createMessage.error('删除失败');
+        }
+      },
+      okText: '确认',
+      cancelText: '取消',
+    });
+  };
+
+  const handleEdit = (record: any, isUpdate: boolean) => {
+    openModal(true, {
+      isUpdate: isUpdate,
+      baseData: {
+        ...record,
+      },
+    });
+  };
+
+  const handleSuccess = async () => {
+    await reload();
+  };
+
+  onMounted(async () => {});
+</script>
+
+<style scoped lang="less"></style>

+ 125 - 0
src/views/educational/studentScore/record/index.vue

@@ -0,0 +1,125 @@
+<template>
+  <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
+    <BasicTable @register="registerTable">
+      <template #action="{ record }">
+        <TableAction
+          :actions="[
+            {
+              label: '下载考试成功',
+              onClick: handleView.bind(null, record),
+            },
+          ]"
+        />
+      </template>
+    </BasicTable>
+  </PageWrapper>
+</template>
+
+<script setup lang="ts">
+  import { requestMagicApi } from '/@/api/magicApi';
+  import { PageWrapper } from '/@/components/Page';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
+  import { getExamPlanExamStatistics } from '/@/services/apis/ExamPlanController';
+
+  const [registerTable] = useTable({
+    api: getExamPlanExamStatistics,
+    title: '考试记录列表',
+    rowKey: 'id',
+    columns: [
+      {
+        title: '考试名称',
+        dataIndex: 'milexamname',
+        align: 'left',
+      },
+      {
+        title: '考试学期',
+        dataIndex: 'semesterName',
+        align: 'left',
+        width: 120,
+      },
+      {
+        title: '考试日期',
+        dataIndex: 'sdate',
+        align: 'left',
+        width: 120,
+      },
+      {
+        title: '参考班级数',
+        dataIndex: 'classCount',
+        align: 'left',
+        width: 100,
+      },
+      {
+        title: '参考人数',
+        dataIndex: 'studentCount',
+        align: 'left',
+        width: 100,
+      },
+    ],
+    formConfig: {
+      labelWidth: 120,
+      schemas: [
+        {
+          field: 'milexamname',
+          label: '考试名称',
+          component: 'Input',
+          colProps: { span: 8 },
+        },
+        {
+          field: 'semesterId',
+          label: '考试学期',
+          component: 'ApiSelect',
+          colProps: { span: 8 },
+          componentProps: {
+            getPopupContainer: () => document.body,
+            api: requestMagicApi,
+            params: {
+              url: '/baseData/semester/option',
+            },
+            showSearch: true,
+            filterOption: (input: string, option: any) => {
+              return (
+                option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+                option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+              );
+            },
+          },
+        },
+        {
+          field: '[startDate,endDate]',
+          label: '考试日期',
+          component: 'RangePicker',
+          colProps: { span: 8 },
+          componentProps: {
+            getPopupContainer: () => document.body,
+            placeholder: ['开始时间', '结束时间'],
+            format: 'YYYY-MM-DD', //HH:mm:ss
+            // showTime: { format: 'HH:mm:ss' },
+          },
+        },
+      ],
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    // actionColumn: {
+    //   width: 100,
+    //   title: '操作',
+    //   dataIndex: 'action',
+    //   slots: { customRender: 'action' },
+    //   fixed: 'right',
+    // },
+  });
+
+  const handleView = (record: any) => {
+    // openModal(true, {
+    //   baseData: {
+    //     ...record,
+    //   },
+    // });
+  };
+</script>
+
+<style scoped lang="less"></style>