Kaynağa Gözat

feat:添加课时删除

DESKTOP-USV654P\pc 5 ay önce
ebeveyn
işleme
0c206dc9d0

+ 31 - 0
src/services/apis/ClassTimeCalendarController.ts

@@ -0,0 +1,31 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Class Time Calendar Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增节假日调课设置 POST /classtime/classTimeCalendar */
+export async function postClasstimeClassTimeCalendar(params:API.AddClassTimeCalendarDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/classtime/classTimeCalendar', data:params},{errorMessageMode:mode});}
+/** 修改节假日调课设置 PUT /classtime/classTimeCalendar */
+export async function putClasstimeClassTimeCalendar(params:API.UpdateClassTimeCalendarDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/classtime/classTimeCalendar', data:params},{errorMessageMode:mode});}
+/** 删除节假日调课设置 DELETE /classtime/classTimeCalendar */
+export async function deleteClasstimeClassTimeCalendar(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/classtime/classTimeCalendar', data:params},{errorMessageMode:mode});}
+/** 根据id查询节假日调课设置信息 GET /classtime/classTimeCalendar/info */
+export async function getClassTimeCalendarInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ClassTimeCalendarVo>
+        ({url: '/classtime/classTimeCalendar/info', params:params},{errorMessageMode:mode});}
+/** 节假日调课设置列表(分页) GET /classtime/classTimeCalendar/page */
+export async function getClassTimeCalendarPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ClassTimeCalendarPageVo>>
+        ({url: '/classtime/classTimeCalendar/page', params:params},{errorMessageMode:mode});}
+            

+ 35 - 0
src/services/apis/ClassTimeDeleteController.ts

@@ -0,0 +1,35 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Class Time Delete Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增课时删除 POST /classtime/classTimeDelete */
+export async function postClasstimeClassTimeDelete(params:API.AddClassTimeDeleteDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/classtime/classTimeDelete', data:params},{errorMessageMode:mode});}
+/** 修改课时删除 PUT /classtime/classTimeDelete */
+export async function putClasstimeClassTimeDelete(params:API.UpdateClassTimeDeleteDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/classtime/classTimeDelete', data:params},{errorMessageMode:mode});}
+/** 删除课时删除 DELETE /classtime/classTimeDelete */
+export async function deleteClasstimeClassTimeDelete(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/classtime/classTimeDelete', data:params},{errorMessageMode:mode});}
+/** 修改状态 POST /classtime/classTimeDelete/change-status */
+export async function postClassTimeDeleteChangeStatus(params:API.ChangeStatusDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/classtime/classTimeDelete/change-status', data:params},{errorMessageMode:mode});}
+/** 根据id查询课时删除信息 GET /classtime/classTimeDelete/info */
+export async function getClassTimeDeleteInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ClassTimeDeleteVo>
+        ({url: '/classtime/classTimeDelete/info', params:params},{errorMessageMode:mode});}
+/** 课时删除列表(分页) GET /classtime/classTimeDelete/page */
+export async function getClassTimeDeletePage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ClassTimeDeletePageVo>>
+        ({url: '/classtime/classTimeDelete/page', params:params},{errorMessageMode:mode});}
+            

+ 7 - 0
src/services/apis/ClassTimeStatisticsController.ts

@@ -29,7 +29,14 @@ export async function postClassTimeStatisticsChangeStatus(params:API.ChangeStatu
 /** 根据id查询课时统计信息 GET /classtime/classTimeStatistics/info */
 export async function getClassTimeStatisticsInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ClassTimeStatisticsVo>
         ({url: '/classtime/classTimeStatistics/info', params:params},{errorMessageMode:mode});}
+/** 查询最新统计的结束日期 GET /classtime/classTimeStatistics/last-date */
+export async function getClassTimeStatisticsLastDate(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.LocalDate>
+        ({url: '/classtime/classTimeStatistics/last-date', params:params},{errorMessageMode:mode});}
 /** 课时统计列表(分页) GET /classtime/classTimeStatistics/page */
 export async function getClassTimeStatisticsPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ClassTimeStatisticsPageVo>>
         ({url: '/classtime/classTimeStatistics/page', params:params},{errorMessageMode:mode});}
+/** 刷新课时统计 POST /classtime/classTimeStatistics/refresh-statistics */
+export async function postClassTimeStatisticsRefreshStatistics(params:API.RefreshStatisticsDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/classtime/classTimeStatistics/refresh-statistics', data:params},{errorMessageMode:mode});}
             

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

@@ -29,6 +29,8 @@ import * as WhitelistManagementController from './WhitelistManagementController'
 import * as BaseClassController from './BaseClassController';
 import * as ClassroomController from './ClassroomController';
 import * as ClassTimeController from './ClassTimeController';
+import * as ClassTimeCalendarController from './ClassTimeCalendarController';
+import * as ClassTimeDeleteController from './ClassTimeDeleteController';
 import * as ClassTimeStatisticsController from './ClassTimeStatisticsController';
 import * as ClassTimeStatisticsSetController from './ClassTimeStatisticsSetController';
 import * as ConcatController from './ConcatController';
@@ -271,6 +273,10 @@ BaseClassController,
 ClassroomController,
 /** Class Time Controller */
 ClassTimeController,
+/** Class Time Calendar Controller */
+ClassTimeCalendarController,
+/** Class Time Delete Controller */
+ClassTimeDeleteController,
 /** Class Time Statistics Controller */
 ClassTimeStatisticsController,
 /** Class Time Statistics Set Controller */

+ 149 - 49
src/services/typing.d.ts

@@ -1790,6 +1790,28 @@ name?: string;
 sortCode?: number;
 }
 
+type AddClassTimeCalendarDto = {
+/** 课时统计(class_time_statistics) */
+classTimeStatisticsId?: string;
+/** 补课日期 */
+replaceDate?: string;
+/** 补班日期 */
+supplementDate?: number;
+}
+
+type AddClassTimeDeleteDto = {
+/** 类别(1:权重 2:费用设置) */
+classId?: number;
+/** 结束日期 */
+endDate?: string;
+/** 删除说明 */
+remark?: string;
+/** 开始日期 */
+startDate?: string;
+/** 删除类型(xjr_dictionary_item[class_time_delete]) */
+type?: string;
+}
+
 type AddClassTimeDto = {
 /** 全称 */
 fullName?: string;
@@ -7998,6 +8020,82 @@ ygLeaveSchoolCount?: number;
 yjLeaveSchoolCount?: number;
 }
 
+type ClassTimeCalendarPageVo = {
+/** 课时统计(class_time_statistics) */
+classTimeStatisticsId?: string;
+/** 创建时间 */
+createDate?: string;
+/** 创建人 */
+createUserId?: string;
+/** 删除标记 */
+deleteMark?: number;
+/** 有效标志 */
+enabledMark?: number;
+/** 主键编号 */
+id?: string;
+/** 修改时间 */
+modifyDate?: string;
+/** 修改人 */
+modifyUserId?: string;
+/** 补课日期 */
+replaceDate?: string;
+/** 补班日期 */
+supplementDate?: number;
+}
+
+type ClassTimeCalendarVo = {
+/** 课时统计(class_time_statistics) */
+classTimeStatisticsId?: string;
+/** 主键编号 */
+id?: string;
+/** 补课日期 */
+replaceDate?: string;
+/** 补班日期 */
+supplementDate?: number;
+}
+
+type ClassTimeDeletePageVo = {
+/** 类别(1:权重 2:费用设置) */
+classId?: number;
+/** 创建时间 */
+createDate?: string;
+/** 创建人 */
+createUserId?: string;
+/** 删除标记 */
+deleteMark?: number;
+/** 有效标志(0:作废 1:启用 2:锁定) */
+enabledMark?: number;
+/** 结束日期 */
+endDate?: string;
+/** 主键编号 */
+id?: string;
+/** 修改时间 */
+modifyDate?: string;
+/** 修改人 */
+modifyUserId?: string;
+/** 删除说明 */
+remark?: string;
+/** 开始日期 */
+startDate?: string;
+/** 删除类型(xjr_dictionary_item[class_time_delete]) */
+type?: string;
+}
+
+type ClassTimeDeleteVo = {
+/** 类别(1:权重 2:费用设置) */
+classId?: number;
+/** 结束日期 */
+endDate?: string;
+/** 主键编号 */
+id?: string;
+/** 删除说明 */
+remark?: string;
+/** 开始日期 */
+startDate?: string;
+/** 删除类型(xjr_dictionary_item[class_time_delete]) */
+type?: string;
+}
+
 type ClassTimePageVo = {
 /** 全称 */
 fullName?: string;
@@ -8056,53 +8154,6 @@ totalAmount?: number;
 year?: number;
 }
 
-type ClassTimeStatisticsRecordVo = {
-/** 总课时 */
-allClassTime?: number;
-/** 外聘教师超课时费 */
-beyondClassTimeAmount?: number;
-/** 教研会 */
-classTime1?: number;
-/** 顶课 */
-classTime10?: number;
-/** 调课 */
-classTime11?: number;
-/** 督导听课 */
-classTime2?: number;
-/** 临近三年退休政策 */
-classTime3?: number;
-/** 出题 */
-classTime4?: number;
-/** 阅卷 */
-classTime5?: number;
-/** 周末培优 */
-classTime6?: number;
-/** 早自习 */
-classTime7?: number;
-/** 正课(包含调顶课时) */
-classTime8?: number;
-/** 晚辅(包含调顶课时) */
-classTime9?: number;
-/** 课时费用 */
-classTimeAmount?: number;
-/** 课时统计(class_time_statistics) */
-classTimeStatisticsId?: string;
-/** 权重json */
-costSetJson?: string;
-/** 聘用类型 */
-employType?: string;
-/** 主键编号 */
-id?: string;
-/** 总金额 */
-totalAmount?: number;
-/** 教师id(xjr_user) */
-userId?: string;
-/** 每周数据 */
-weekData?: string;
-/** 权重json */
-weightSetJson?: string;
-}
-
 type ClassTimeStatisticsSetPageVo = {
 /** 类别(1:权重 2:费用设置) */
 category?: number;
@@ -8140,8 +8191,8 @@ allClassTime?: number;
 beyondClassTimeAmount?: number;
 /** 总课时费用 */
 classTimeAmount?: number;
-/** classTimeStatisticsRecord子表 */
-classTimeStatisticsRecordList?: ClassTimeStatisticsRecordVo[];
+/** 权重json */
+costSetJson?: string;
 /** 结束日期 */
 endDate?: string;
 /** 主键编号 */
@@ -8154,6 +8205,8 @@ startDate?: string;
 status?: number;
 /** 总金额 */
 totalAmount?: number;
+/** 权重json */
+weightSetJson?: string;
 /** 统计年份 */
 year?: number;
 }
@@ -12202,6 +12255,22 @@ total?: number;
 totalPage?: number;
 }
 
+type PageOutput<ClassTimeCalendarPageVo> = {
+currentPage?: number;
+list?: ClassTimeCalendarPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
+type PageOutput<ClassTimeDeletePageVo> = {
+currentPage?: number;
+list?: ClassTimeDeletePageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
 type PageOutput<ClassTimePageVo> = {
 currentPage?: number;
 list?: ClassTimePageVo[];
@@ -14029,6 +14098,11 @@ type RecycleDeleteDto = {
 processIds?: string[];
 }
 
+type RefreshStatisticsDto = {
+/** id */
+id?: string;
+}
+
 type RegisterDto = {
 /** 地址 */
 address?: string;
@@ -18606,6 +18680,32 @@ name?: string;
 sortCode?: number;
 }
 
+type UpdateClassTimeCalendarDto = {
+/** 课时统计(class_time_statistics) */
+classTimeStatisticsId?: string;
+/** 主键编号 */
+id?: string;
+/** 补课日期 */
+replaceDate?: string;
+/** 补班日期 */
+supplementDate?: number;
+}
+
+type UpdateClassTimeDeleteDto = {
+/** 类别(1:权重 2:费用设置) */
+classId?: number;
+/** 结束日期 */
+endDate?: string;
+/** 主键编号 */
+id?: string;
+/** 删除说明 */
+remark?: string;
+/** 开始日期 */
+startDate?: string;
+/** 删除类型(xjr_dictionary_item[class_time_delete]) */
+type?: string;
+}
+
 type UpdateClassTimeDto = {
 /** 全称 */
 fullName?: string;

+ 88 - 0
src/views/course/erasure/components/edit.vue

@@ -0,0 +1,88 @@
+<template>
+  <BasicModal
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    showFooter
+  >
+    <BasicForm @register="registerForm">
+      <template #remark>
+        <div class="text-red-700">
+          说明:补班日期是指需要补班的日期(一般是周六或周日),补课日期是指在补班日期这一天补上哪一天的课;因为每周课表都不一样,因此不能按星期进行选择。
+        </div>
+      </template>
+    </BasicForm>
+  </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 { formatToDate } from '/@/utils/dateUtil';
+  import { formSchema } from '../data.config';
+  import {
+    getClassTimeDeleteInfo,
+    postClasstimeClassTimeDelete,
+    putClasstimeClassTimeDelete,
+  } from '/@/services/apis/ClassTimeDeleteController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref<Recordable>({});
+  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 getClassTimeDeleteInfo({ id: data.baseData.id });
+      resData['date'] = [resData['startDate'], resData['endDate']];
+      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);
+      postParams['startDate'] = values['date'][0];
+      postParams['endDate'] = values['date'][1];
+      delete postParams['date'];
+      Object.assign(postParams, values);
+
+      if (unref(isUpdate)) {
+        await putClasstimeClassTimeDelete(postParams as API.UpdateClassTimeDeleteDto);
+      } else {
+        await postClasstimeClassTimeDelete(postParams as API.AddClassTimeDeleteDto);
+      }
+
+      createMessage.success('操作成功');
+      closeModal();
+      emit('success');
+    } catch {
+      createMessage.error('重复设置');
+    } finally {
+      setModalProps({ confirmLoading: false });
+    }
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 144 - 0
src/views/course/erasure/data.config.ts

@@ -0,0 +1,144 @@
+import { requestMagicApi } from '/@/api/magicApi';
+import { BasicOptionModel } from '/@/api/model/baseModel';
+import { getDataOption } from '/@/api/system/dic';
+import { BasicColumn, FormSchema } from '/@/components/Table';
+import { formatToDate } from '/@/utils/dateUtil';
+
+export const enabledOptions: BasicOptionModel[] = [
+  { label: '作废', value: 0 },
+  { label: '生效', value: 1 },
+  { label: '锁定', value: 2 },
+];
+
+export const tableColumns: BasicColumn[] = [
+  {
+    title: '删除班级',
+    dataIndex: 'className',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '删除类型',
+    dataIndex: 'typeCn',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '删除时间',
+    dataIndex: 'startDate',
+    align: 'left',
+    width: 180,
+    customRender: ({ record }) => {
+      return `${formatToDate(record.startDate)}~${formatToDate(record.endDate)}`;
+    },
+  },
+  {
+    title: '删除说明',
+    dataIndex: 'remark',
+    align: 'left',
+  },
+  {
+    title: '操作人',
+    dataIndex: 'createUserName',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '操作时间',
+    dataIndex: 'createDate',
+    align: 'left',
+    width: 120,
+    customRender: ({ record }) => {
+      return `${formatToDate(record.createDate)}`;
+    },
+  },
+  {
+    title: '状态',
+    dataIndex: 'enabledMark',
+    align: 'left',
+    width: 80,
+    customRender: ({ text }) => {
+      return enabledOptions.filter((item) => item.value == text)[0]?.label;
+    },
+  },
+];
+
+export const searchFormSchema: FormSchema[] = [
+  {
+    field: 'type',
+    label: '删除类型',
+    component: 'ApiSelect',
+    colProps: { span: 8 },
+    componentProps: {
+      api: getDataOption,
+      params: { code: 'class_time_delete' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'classId',
+    label: '删除班级',
+    colProps: { span: 8 },
+    component: 'ApiSelect',
+    componentProps: {
+      api: requestMagicApi,
+      params: { url: 'educational/class/option' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'enabledMark',
+    label: '状态',
+    component: 'Select',
+    colProps: { span: 8 },
+    componentProps: {
+      options: enabledOptions,
+      getPopupContainer: () => document.body,
+    },
+  },
+];
+export const formSchema: FormSchema[] = [
+  {
+    label: '删除班级',
+    field: 'classId',
+    component: 'ApiSelect',
+    colProps: { span: 24 },
+    required: true,
+    componentProps: {
+      api: requestMagicApi,
+      params: { url: 'educational/class/option' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    label: '删除类型',
+    field: 'type',
+    component: 'ApiSelect',
+    colProps: { span: 24 },
+    required: true,
+    componentProps: {
+      api: getDataOption,
+      params: { code: 'class_time_delete' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    label: '删除时间',
+    field: 'date',
+    component: 'RangePicker',
+    colProps: { span: 24 },
+    required: true,
+    componentProps: {
+      getPopupContainer: () => document.body,
+      placeholder: ['开始时间', '结束时间'],
+      format: 'YYYY-MM-DD',
+      showTime: false,
+    },
+  },
+  {
+    label: '删除说明',
+    field: 'remark',
+    component: 'InputTextArea',
+    colProps: { span: 24 },
+  },
+];

+ 131 - 0
src/views/course/erasure/index.vue

@@ -0,0 +1,131 @@
+<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),
+            // },
+            {
+              label: '作废',
+              disabled: record.status !== 1,
+              onClick: handleStatus.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 { formatToDate } from '/@/utils/dateUtil';
+  import FormEdit from './components/edit.vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import {
+    deleteClasstimeClassTimeDelete,
+    getClassTimeDeletePage,
+    postClassTimeDeleteChangeStatus,
+  } from '/@/services/apis/ClassTimeDeleteController';
+
+  const [registerModal, { openModal }] = useModal();
+
+  const [registerTable, { reload }] = useTable({
+    api: getClassTimeDeletePage,
+    title: '课时补充记录表',
+    rowKey: 'id',
+    columns: tableColumns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    actionColumn: {
+      width: 100,
+      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 deleteClasstimeClassTimeDelete([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 handleStatus = (record: any) => {
+    createConfirm({
+      iconType: 'warning',
+      title: '温馨提醒',
+      content: '是否作废该记录?',
+      onOk: async () => {
+        try {
+          await postClassTimeDeleteChangeStatus({
+            id: record.id,
+            status: 0,
+          });
+          createMessage.success('作废成功');
+          await reload();
+        } catch (e) {
+          createMessage.error('作废失败');
+        }
+      },
+      okText: '确认',
+      cancelText: '取消',
+    });
+  };
+
+  const handleSuccess = () => {
+    reload();
+  };
+
+  onMounted(async () => {});
+</script>
+
+<style scoped lang="less"></style>

+ 141 - 0
src/views/course/statistics/components/adjust.vue

@@ -0,0 +1,141 @@
+<template>
+  <BasicModal
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    showFooter
+  >
+    <BasicForm @register="registerForm">
+      <template #remark>
+        <div class="text-red-700">
+          说明:补班日期是指需要补班的日期(一般是周六或周日),补课日期是指在补班日期这一天补上哪一天的课;因为每周课表都不一样,因此不能按星期进行选择。
+        </div>
+      </template>
+    </BasicForm>
+  </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 { getHolidayDateInfo } from '/@/services/apis/HolidayDateController';
+  import { formatToDate } from '/@/utils/dateUtil';
+  import {
+    postClasstimeClassTimeCalendar,
+    putClasstimeClassTimeCalendar,
+  } from '/@/services/apis/ClassTimeCalendarController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref<Recordable>({});
+  const emit = defineEmits(['success', 'register']);
+  const { createMessage } = useMessage();
+  const [registerForm, { validate, setFieldsValue, resetFields, updateSchema }] = useForm({
+    labelWidth: 100,
+    schemas: [
+      {
+        field: 'supplementDate',
+        label: '补班日期',
+        component: 'DatePicker',
+        colProps: { span: 24 },
+        required: true,
+        componentProps: {
+          showTime: false,
+          format: 'YYYY-MM-DD',
+          valueFormat: 'YYYY-MM-DD',
+          getPopupContainer: () => document.body,
+        },
+      },
+      {
+        field: 'replaceDate',
+        label: '补课日期',
+        component: 'DatePicker',
+        colProps: { span: 24 },
+        required: true,
+        componentProps: {
+          showTime: false,
+          format: 'YYYY-MM-DD',
+          valueFormat: 'YYYY-MM-DD',
+          getPopupContainer: () => document.body,
+        },
+      },
+      {
+        field: 'remark',
+        label: ' ',
+        component: 'Input',
+        colProps: { span: 24 },
+        slot: 'remark',
+      },
+    ],
+    showActionButtonGroup: false,
+  });
+
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+    resetFields();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+
+    updateSchema([
+      {
+        field: 'supplementDate',
+        componentProps: {
+          disabledDate: disabledDate,
+        },
+      },
+      {
+        field: 'replaceDate',
+        componentProps: {
+          disabledDate: disabledDate,
+        },
+      },
+    ]);
+
+    if (unref(isUpdate)) {
+      const resData = await getHolidayDateInfo({ id: data.baseData.id });
+      resData['startDate'] = [resData['startDate'], resData['endDate']];
+      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);
+
+      if (unref(isUpdate)) {
+        await putClasstimeClassTimeCalendar(postParams as API.UpdateClassTimeCalendarDto);
+      } else {
+        await postClasstimeClassTimeCalendar(postParams as API.AddClassTimeCalendarDto);
+      }
+
+      createMessage.success('操作成功');
+      closeModal();
+      emit('success');
+    } catch {
+      createMessage.error('重复设置');
+    } finally {
+      setModalProps({ confirmLoading: false });
+    }
+  };
+
+  const disabledDate = (current) => {
+    return (
+      current &&
+      (formatToDate(current) < formatToDate(modelRef.value.startDate) ||
+        formatToDate(current) > formatToDate(modelRef.value.endDate))
+    );
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 16 - 6
src/views/course/statistics/components/cost.vue

@@ -48,7 +48,7 @@
     showActionButtonGroup: false,
   });
 
-  const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
     resetFields();
     setModalProps({ confirmLoading: false });
     isUpdate.value = false;
@@ -71,16 +71,26 @@
 
     resetSchema(formWeightSchema);
 
-    const resData = await getClassTimeStatisticsSetLastInfo({ category: category.value });
-    if (resData) {
-      modelRef.value = { ...resData };
-      const jsonContent = JSON.parse(resData.jsonContent);
+    if (data?.baseData?.jsonContent) {
+      modelRef.value = { ...data.baseData };
+      const jsonContent = JSON.parse(data.baseData.jsonContent);
       const values: Recordable = {};
       jsonContent.forEach((item) => {
         values[item.field] = item.value;
       });
       setFieldsValue(values);
-      isUpdate.value = true;
+    } else {
+      const resData = await getClassTimeStatisticsSetLastInfo({ category: category.value });
+      if (resData) {
+        modelRef.value = { ...resData };
+        const jsonContent = JSON.parse(resData.jsonContent);
+        const values: Recordable = {};
+        jsonContent.forEach((item) => {
+          values[item.field] = item.value;
+        });
+        setFieldsValue(values);
+        // isUpdate.value = true;
+      }
     }
   });
 

+ 27 - 6
src/views/course/statistics/components/edit.vue

@@ -17,7 +17,7 @@
             {{ modelRef?.year }}年{{ modelRef?.month }}月
           </Descriptions.Item>
           <Descriptions.Item label="时间">
-            {{ modelRef?.startDate }}-{{ modelRef?.endDate }}
+            {{ formatToDate(modelRef?.startDate) }}~{{ formatToDate(modelRef?.endDate) }}
           </Descriptions.Item>
           <Descriptions.Item label="总课时">
             {{ modelRef?.allClassTime }}
@@ -37,7 +37,7 @@
         <BasicTable @register="registerTable">
           <template #toolbar>
             <a-button type="primary">刷新统计</a-button>
-            <a-button type="primary">节假日调课设置</a-button>
+            <a-button type="primary" @click="handleHoliday">节假日调课设置</a-button>
             <a-button type="primary" @click="handleWeight">权重设置</a-button>
             <a-button type="primary" @click="handleCost">费用设置</a-button>
             <a-button type="primary">导出</a-button>
@@ -50,6 +50,7 @@
     </div>
     <FormWeight @register="registerWeightModal" />
     <FormCost @register="registerCostModal" />
+    <FormHoliday @register="registerHolidayModal" />
   </BasicModal>
 </template>
 <script setup lang="ts">
@@ -57,16 +58,19 @@
   import { BasicModal, useModal, useModalInner } from '/@/components/Modal';
   import { formDetailSchema } from '../data.config';
   import { getClassTimeStatisticsInfo } from '/@/services/apis/ClassTimeStatisticsController';
-  import { useTable } from '/@/components/Table';
+  import { useTable, BasicTable } from '/@/components/Table';
   import { Descriptions } from 'ant-design-vue';
   import FormWeight from './weight.vue';
   import FormCost from './cost.vue';
+  import { formatToDate } from '/@/utils/dateUtil';
+  import FormHoliday from './holiday.vue';
 
   const isUpdate = ref(true);
   const modelRef = ref<Recordable>({});
   const emit = defineEmits(['success', 'register']);
   const [registerWeightModal, { openModal: openWeightModal }] = useModal();
   const [registerCostModal, { openModal: openCostModal }] = useModal();
+  const [registerHolidayModal, { openModal: openHolidayModal }] = useModal();
 
   const [registerTable, { setTableData }] = useTable({
     title: '课时统计表',
@@ -75,7 +79,7 @@
     useSearchForm: false,
     showTableSetting: true,
     bordered: true,
-    immediate: true,
+    immediate: false,
     canResize: true,
     pagination: false,
   });
@@ -103,13 +107,30 @@
   const handleWeight = () => {
     openWeightModal(true, {
       isUpdate: true,
-      baseData: {},
+      baseData: {
+        classTimeStatisticsId: unref(modelRef).id,
+        jsonContent: unref(modelRef).weightSetJson,
+      },
     });
   };
   const handleCost = () => {
     openCostModal(true, {
       isUpdate: false,
-      baseData: {},
+      baseData: {
+        classTimeStatisticsId: unref(modelRef).id,
+        weightSetJson: unref(modelRef).costSetJson,
+      },
+    });
+  };
+
+  const handleHoliday = () => {
+    openHolidayModal(true, {
+      isUpdate: false,
+      baseData: {
+        classTimeStatisticsId: unref(modelRef).id,
+        startDate: unref(modelRef).startDate,
+        endDate: unref(modelRef).endDate,
+      },
     });
   };
 </script>

+ 141 - 0
src/views/course/statistics/components/holiday.vue

@@ -0,0 +1,141 @@
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    title="节假日调整"
+    :width="1002"
+    :footer="null"
+    :default-fullscreen="true"
+  >
+    <div>
+      <a-button type="primary" @click="handleEdit({}, false)">节假日调课设置</a-button>
+    </div>
+    <Calendar
+      v-model:value="dataValue"
+      @panelChange="handelChange"
+      v-if="isLoad"
+      :disabledDate="disabledDate"
+    >
+      <template #dateCellRender="{ current }">
+        <div
+          class="c-item"
+          v-for="(item, index) in getListData(current)"
+          :key="index"
+          @click="handleDelete(item)"
+        >
+          <Tag :color="item.status === 3 ? '#f50' : '#108ee9'" closable @close.prevent>
+            {{ item.name }}
+          </Tag>
+        </div>
+      </template>
+    </Calendar>
+    <FormAdjust @register="registerFormModal" @success="handelSuccess" />
+  </BasicModal>
+</template>
+<script setup lang="ts">
+  import { ref, unref } from 'vue';
+  import { Calendar, Tag } from 'ant-design-vue';
+  import { BasicModal, useModal, useModalInner } from '/@/components/Modal';
+  import { Dayjs } from 'dayjs';
+  import { dateUtil, formatToDate } from '/@/utils/dateUtil';
+  import {
+    deleteHolidayHolidayDate,
+    getHolidayDateList,
+  } from '/@/services/apis/HolidayDateController';
+  import FormAdjust from './adjust.vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+
+  const { createConfirm, createMessage } = useMessage();
+  const [registerFormModal, { openModal }] = useModal();
+
+  const modelDataRef = ref<Recordable[]>([]);
+  const modelRef = ref<Recordable>({});
+
+  const dataValue = ref<Dayjs>();
+  const isLoad = ref<Boolean>(false);
+  defineEmits(['success', 'register']);
+
+  const [registerModal, { setModalProps }] = useModalInner(async (data) => {
+    dataValue.value = dateUtil(data.baseData.startDate);
+
+    modelRef.value = { ...data.baseData };
+    await getPageData(dataValue.value);
+    isLoad.value = true;
+  });
+
+  const getPageData = async (value) => {
+    setModalProps({ confirmLoading: true });
+
+    modelDataRef.value = await getHolidayDateList({
+      year: dateUtil(value).year(),
+      endDate: dateUtil(value).month() + 1,
+    });
+
+    setModalProps({ confirmLoading: false });
+  };
+
+  const handelChange = async (value: Dayjs) => {
+    await getPageData(value);
+  };
+
+  const getListData = (value: Dayjs) => {
+    const current = formatToDate(value);
+    const data = unref(modelDataRef);
+    const itemFilter = data.filter((item) => item.date === current);
+
+    const tabList: Recordable[] = [];
+    itemFilter.forEach((item) => {
+      // const status = statusOptions.filter((row) => row.value === item.status)[0]?.label;
+      if (item.status === 2 || item.status === 3) {
+        tabList.push({ id: item.id, status: item.status, name: item.status === 2 ? '班' : '休' });
+      }
+    });
+
+    return tabList;
+  };
+
+  const handleEdit = (record: any, isUpdate: boolean) => {
+    openModal(true, {
+      isUpdate: isUpdate,
+      baseData: {
+        ...record,
+        ...unref(modelRef),
+      },
+    });
+  };
+
+  const handleDelete = (record: any) => {
+    createConfirm({
+      iconType: 'warning',
+      title: '温馨提醒',
+      content: '是否删除该记录?',
+      onOk: async () => {
+        try {
+          await deleteHolidayHolidayDate([record.id]);
+          createMessage.success('删除成功');
+          await handelSuccess();
+        } catch (e) {
+          createMessage.error('删除失败');
+        }
+      },
+      okText: '确认',
+      cancelText: '取消',
+    });
+  };
+
+  const handelSuccess = async () => {
+    await getPageData(dataValue.value);
+  };
+
+  const disabledDate = (current) => {
+    return (
+      current &&
+      (formatToDate(current) < formatToDate(modelRef.value.startDate) ||
+        formatToDate(current) > formatToDate(modelRef.value.endDate))
+    );
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 48 - 4
src/views/course/statistics/components/select.vue

@@ -16,16 +16,46 @@
   import { ref, computed, unref } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, useForm } from '/@/components/Form/index';
-  import { formSchema } from '../data.config';
-  import { postClasstimeClassTimeStatistics } from '/@/services/apis/ClassTimeStatisticsController';
+  import {
+    getClassTimeStatisticsLastDate,
+    postClasstimeClassTimeStatistics,
+  } from '/@/services/apis/ClassTimeStatisticsController';
   import { formatToDate } from '/@/utils/dateUtil';
 
   const isUpdate = ref(true);
   const emit = defineEmits(['success', 'register']);
+  const lastDate = ref('');
 
-  const [registerForm, { validate, resetFields }] = useForm({
+  const [registerForm, { validate, resetFields, updateSchema }] = useForm({
     labelWidth: 100,
-    schemas: formSchema,
+    schemas: [
+      {
+        label: '统计月份',
+        field: 'yearMonth',
+        component: 'DatePicker',
+        colProps: { span: 24 },
+        required: true,
+        componentProps: {
+          showTime: false,
+          format: 'YYYY-MM',
+          valueFormat: 'YYYY-MM',
+          getPopupContainer: () => document.body,
+        },
+      },
+      {
+        label: '统计时间',
+        field: 'date',
+        component: 'RangePicker',
+        colProps: { span: 24 },
+        required: true,
+        componentProps: {
+          getPopupContainer: () => document.body,
+          placeholder: ['开始时间', '结束时间'],
+          format: 'YYYY-MM-DD',
+          showTime: false,
+        },
+      },
+    ],
     showActionButtonGroup: false,
   });
 
@@ -33,8 +63,22 @@
     resetFields();
     setModalProps({ confirmLoading: false });
     isUpdate.value = !!data?.isUpdate;
+
+    lastDate.value = await getClassTimeStatisticsLastDate({});
+    if (lastDate.value) {
+      updateSchema({
+        field: 'date',
+        componentProps: {
+          disabledDate: disabledDate,
+        },
+      });
+    }
   });
 
+  const disabledDate = (current) => {
+    return current && formatToDate(current) <= formatToDate(lastDate.value);
+  };
+
   const getTitle = computed(() =>
     !unref(isUpdate) ? '请选择需要统计课时时间段' : '请选择需要统计课时时间段',
   );

+ 16 - 6
src/views/course/statistics/components/weight.vue

@@ -47,7 +47,7 @@
     showActionButtonGroup: false,
   });
 
-  const [registerModal, { closeModal, setModalProps }] = useModalInner(async () => {
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
     resetFields();
     setModalProps({ confirmLoading: false });
     isUpdate.value = false;
@@ -70,16 +70,26 @@
 
     resetSchema(formWeightSchema);
 
-    const resData = await getClassTimeStatisticsSetLastInfo({ category: category.value });
-    if (resData) {
-      modelRef.value = { ...resData };
-      const jsonContent = JSON.parse(resData.jsonContent);
+    if (data?.baseData?.jsonContent) {
+      modelRef.value = { ...data.baseData };
+      const jsonContent = JSON.parse(data.baseData.jsonContent);
       const values: Recordable = {};
       jsonContent.forEach((item) => {
         values[item.field] = item.value;
       });
       setFieldsValue(values);
-      isUpdate.value = true;
+    } else {
+      const resData = await getClassTimeStatisticsSetLastInfo({ category: category.value });
+      if (resData) {
+        modelRef.value = { ...resData };
+        const jsonContent = JSON.parse(resData.jsonContent);
+        const values: Recordable = {};
+        jsonContent.forEach((item) => {
+          values[item.field] = item.value;
+        });
+        setFieldsValue(values);
+        // isUpdate.value = true;
+      }
     }
   });
 

+ 3 - 31
src/views/course/statistics/data.config.ts

@@ -1,11 +1,12 @@
 import { BasicColumn, FormSchema } from '/@/components/Table';
+import { formatToDate } from '/@/utils/dateUtil';
 
 export const tableColumns: BasicColumn[] = [
   {
     title: '年月',
     dataIndex: 'year',
     align: 'left',
-    width: 80,
+    width: 100,
     customRender: ({ record }) => {
       return `${record.year}年${record.month}月`;
     },
@@ -16,7 +17,7 @@ export const tableColumns: BasicColumn[] = [
     align: 'left',
     width: 180,
     customRender: ({ record }) => {
-      return `${record.startDate}-${record.endDate}`;
+      return `${formatToDate(record.startDate)}~${formatToDate(record.endDate)}`;
     },
   },
   {
@@ -68,35 +69,6 @@ export const searchFormSchema: FormSchema[] = [
   },
 ];
 
-export const formSchema: FormSchema[] = [
-  {
-    label: '统计月份',
-    field: 'yearMonth',
-    component: 'DatePicker',
-    colProps: { span: 24 },
-    required: true,
-    componentProps: {
-      showTime: false,
-      format: 'YYYY-MM',
-      valueFormat: 'YYYY-MM',
-      getPopupContainer: () => document.body,
-    },
-  },
-  {
-    label: '统计时间',
-    field: 'date',
-    component: 'RangePicker',
-    colProps: { span: 24 },
-    required: true,
-    componentProps: {
-      getPopupContainer: () => document.body,
-      placeholder: ['开始时间', '结束时间'],
-      format: 'YYYY-MM-DD',
-      showTime: false,
-    },
-  },
-];
-
 export const formDetailSchema: BasicColumn[] = [
   {
     title: '工号',

+ 30 - 1
src/views/course/statistics/index.vue

@@ -14,6 +14,11 @@
               label: '查看',
               onClick: handleView.bind(null, record),
             },
+            {
+              label: '删除',
+              color: 'error',
+              onClick: handleDelete.bind(null, record),
+            },
           ]"
         />
       </template>
@@ -33,11 +38,15 @@
 
   import FormSelect from './components/select.vue';
   import { useModal } from '/@/components/Modal';
-  import { getClassTimeStatisticsPage } from '/@/services/apis/ClassTimeStatisticsController';
+  import {
+    deleteClasstimeClassTimeStatistics,
+    getClassTimeStatisticsPage,
+  } from '/@/services/apis/ClassTimeStatisticsController';
   import { formatToDate } from '/@/utils/dateUtil';
   import FormWeight from './components/weight.vue';
   import FormCost from './components/cost.vue';
   import FormEdit from './components/edit.vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
 
   const [registerSelectModal, { openModal: openSelectModal }] = useModal();
   const [registerWeightModal, { openModal: openWeightModal }] = useModal();
@@ -75,6 +84,26 @@
     },
   });
 
+  const { createConfirm, createMessage } = useMessage();
+  const handleDelete = (record: any) => {
+    createConfirm({
+      iconType: 'warning',
+      title: '温馨提醒',
+      content: '是否删除该记录?',
+      onOk: async () => {
+        try {
+          await deleteClasstimeClassTimeStatistics([record.id]);
+          createMessage.success('删除成功');
+          await reload();
+        } catch (e) {
+          createMessage.error('删除失败');
+        }
+      },
+      okText: '确认',
+      cancelText: '取消',
+    });
+  };
+
   const handleAdd = () => {
     openSelectModal(true, {
       isUpdate: false,

+ 83 - 1
src/views/examineManager/classExamine/components/data.config.ts

@@ -1,43 +1,68 @@
-import { BasicColumn } from '/@/components/Table';
+import { requestMagicApi } from '/@/api/magicApi';
+import { BasicColumn, FormSchema } from '/@/components/Table';
 import { h } from 'vue';
 
 export const columns: BasicColumn[] = [
   {
     title: '考核年级',
     dataIndex: 'gradeName',
+    width: 80,
+    align: 'left',
   },
   {
     title: '受影响班级',
     dataIndex: 'assessmentClassNames',
+    width: 120,
+    align: 'left',
   },
   {
     title: '考核时间',
     dataIndex: 'assessmentDate',
+    width: 150,
+    align: 'left',
   },
   {
     title: '考核类别',
     dataIndex: 'assessmentProjectName',
+    width: 150,
+    align: 'left',
   },
   {
     title: '考核类型',
     dataIndex: 'scoreTypeCn',
+    width: 80,
+    align: 'left',
   },
   {
     title: '考核项目',
     dataIndex: 'assessmentCategoryName',
+    width: 90,
+    align: 'left',
   },
+  // {
+  //   title: '考核对象',
+  //   dataIndex: 'assessmentTypeNames',
+  //   width: 90,
+  //   align: 'left',
+  // },
   {
     title: '考核学期',
     dataIndex: 'semesterName',
+    width: 90,
+    align: 'left',
   },
   {
     title: '考核人',
     dataIndex: 'assessmentUserName',
+    width: 80,
+    align: 'left',
   },
 
   {
     title: '分数',
     dataIndex: 'score',
+    width: 80,
+    align: 'left',
     customRender: ({ text, record }) => {
       if (record.scoreType !== 'score_add') {
         //  显示红色
@@ -50,13 +75,17 @@ export const columns: BasicColumn[] = [
   {
     title: '受影响学生人数',
     dataIndex: 'studentCount',
+    width: 80,
+    align: 'left',
   },
   {
     title: '考核原因',
     dataIndex: 'reason',
+    align: 'left',
   },
   {
     title: '操作',
+    width: 80,
     dataIndex: 'action',
     slots: { customRender: 'action' },
   },
@@ -70,3 +99,56 @@ export const enum showConfig {
   score = '加扣分',
   reason = '考核原因',
 }
+
+export const searchFormSchema: FormSchema[] = [
+  {
+    field: 'semesterId',
+    label: '学期',
+    component: 'ApiSelect',
+    colProps: { span: 8 },
+    componentProps: {
+      api: requestMagicApi,
+      params: { url: 'baseData/semester/option' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'gradeId',
+    label: '年级',
+    component: 'ApiSelect',
+    colProps: { span: 8 },
+    componentProps: {
+      api: requestMagicApi,
+      params: { url: 'baseData/grade/option' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'projectIds',
+    label: '考核项目',
+    component: 'ApiSelect',
+    colProps: { span: 8 },
+    componentProps: {
+      api: requestMagicApi,
+      params: { url: 'educational/assessment/assessment-category' },
+      getPopupContainer: () => document.body,
+    },
+  },
+  {
+    field: 'assessmentUserName',
+    label: '考核人',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    field: '[startDate,endDate]',
+    label: '考核日期',
+    component: 'RangePicker',
+    componentProps: {
+      getPopupContainer: () => document.body,
+      format: 'YYYY-MM-DD HH:mm:ss',
+      placeholder: ['开始时间', '结束时间'],
+      showTime: { format: 'HH:mm:ss' },
+    },
+  },
+];

+ 15 - 3
src/views/examineManager/classExamine/index.vue

@@ -1,7 +1,10 @@
 <script setup lang="ts">
   import { useTable } from '/@/components/Table';
   import BasicTable from '/@/components/Table/src/BasicTable.vue';
-  import { columns } from '/@/views/examineManager/classExamine/components/data.config';
+  import {
+    columns,
+    searchFormSchema,
+  } from '/@/views/examineManager/classExamine/components/data.config';
   import viewModal from './components/viewModal.vue';
   import { getBasestudentassessmentinspectionPage } from '/@/services/apis/BaseStudentAssessmentInspectionController';
   import TableAction from '/@/components/Table/src/components/TableAction.vue';
@@ -9,9 +12,18 @@
   import PageWrapper from '/@/components/Page/src/PageWrapper.vue';
   const [tableReg, {}] = useTable({
     title: '班级考核记录',
-    showTableSetting: true,
-    columns: columns,
     api: getBasestudentassessmentinspectionPage,
+    rowKey: 'id',
+    columns: columns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
   });
   const [viewReg, { openModal }] = useModal();
   const handleView = (record) => {