|
@@ -0,0 +1,70 @@
|
|
|
+<script setup lang="ts">
|
|
|
+ import { PageWrapper } from '/@/components/Page';
|
|
|
+ import { useTable } from '/@/components/Table';
|
|
|
+ import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
|
+ import { searchSchema, TableColumns } from './components/data.config';
|
|
|
+ import TableAction from '/@/components/Table/src/components/TableAction.vue';
|
|
|
+ import { getBaseappfunctionPage } from '/@/services/apis/BaseAppFunctionController';
|
|
|
+ import formEdit from './components/formEdit.vue';
|
|
|
+ import BasicTree from '/@/components/Tree/src/Tree.vue';
|
|
|
+ import achievementImport from './components/achievementImport.vue';
|
|
|
+ import { useModal } from '/@/components/Modal';
|
|
|
+ const [formReg, { openModal }] = useModal();
|
|
|
+ const [importReg, { openModal: openImportModal }] = useModal();
|
|
|
+ const [registerTable, { reload }] = useTable({
|
|
|
+ api: getBaseappfunctionPage,
|
|
|
+ columns: TableColumns,
|
|
|
+ title: '新生列表',
|
|
|
+ bordered: true,
|
|
|
+ rowKey: 'id',
|
|
|
+ showTableSetting: true,
|
|
|
+ beforeFetch: (params) => {
|
|
|
+ return params;
|
|
|
+ },
|
|
|
+ rowSelection: {
|
|
|
+ type: 'checkbox',
|
|
|
+ onChange: (selectedRowKeys, selectedRows) => {
|
|
|
+ console.log(selectedRowKeys, selectedRows);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ useSearchForm: true,
|
|
|
+ formConfig: {
|
|
|
+ labelWidth: 120,
|
|
|
+ schemas: searchSchema,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ const handleEdit = (record: any, isUpdate: boolean) => {
|
|
|
+ openModal(true, { ...record, isUpdate: isUpdate });
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
|
|
+ <BasicTree title="年级列表" search class="min-w-[200px]" />
|
|
|
+ <div class="ml-[12px] w-full overflow-x-auto">
|
|
|
+ <BasicTable @register="registerTable">
|
|
|
+ <template #toolbar>
|
|
|
+ <a-button type="primary" @click="handleEdit({}, false)">手动分班</a-button>
|
|
|
+ <a-button type="primary" @click="openImportModal(true, {})">成绩导入</a-button>
|
|
|
+ <a-button>导出</a-button>
|
|
|
+ </template>
|
|
|
+ <template #action="{ record }">
|
|
|
+ <div style="display: flex; justify-content: center">
|
|
|
+ <TableAction
|
|
|
+ :actions="[
|
|
|
+ {
|
|
|
+ label: '编辑',
|
|
|
+ onClick: handleEdit.bind(null, record, true),
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </BasicTable>
|
|
|
+ </div>
|
|
|
+ <formEdit @register="formReg" @success="reload" />
|
|
|
+ <achievementImport @register="importReg" />
|
|
|
+ </PageWrapper>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped lang="less"></style>
|