feat(api): 添加百色中学和诊所相关API接口

- 新增百色中学报名记录相关接口和数据模型
- 新增百色中学分部、班级、年代、年级管理接口
- 新增百色中学捐款记录和排行相关接口
- 新增诊所挂号和医生入驻申请接口
- 添加相应的数据传输对象和搜索参数模型
- 实现分页查询、增删改查等基础操作接口
- 集成请求处理和错误处理机制
This commit is contained in:
2026-01-07 14:44:06 +08:00
parent 424e5641bb
commit d32fd4f711
459 changed files with 79443 additions and 1460 deletions

View File

@@ -4,13 +4,13 @@
<template #extra>
<a-button>编辑</a-button>
</template>
<TenantInfo/>
<TenantInfo />
</a-card>
<a-card title="服务器信息" style="margin-bottom: 20px">
<ServerInfo/>
<ServerInfo />
</a-card>
<a-card title="源代码" style="margin-bottom: 20px">
<CodeInfo/>
<CodeInfo />
</a-card>
<a-card title="其他信息" style="margin-bottom: 20px">
<ParamInfo />
@@ -19,16 +19,15 @@
</template>
<script lang="ts" setup>
import {getPageTitle, push} from "@/utils/common";
import TenantInfo from './components/TenantInfo.vue'
import ServerInfo from './components/ServerInfo.vue'
import CodeInfo from "./components/CodeInfo.vue";
import ParamInfo from "./components/ParamInfo.vue";
import { getPageTitle, push } from '@/utils/common';
import TenantInfo from './components/TenantInfo.vue';
import ServerInfo from './components/ServerInfo.vue';
import CodeInfo from './components/CodeInfo.vue';
import ParamInfo from './components/ParamInfo.vue';
</script>
<script lang="ts">
export default {
name: 'SystemDeveloper'
};
export default {
name: 'SystemDeveloper'
};
</script>

View File

@@ -14,161 +14,160 @@
</a-space>
<!-- 导入弹窗 -->
<import v-model:visible="showImport" @done="reload"/>
<import v-model:visible="showImport" @done="reload" />
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { message } from 'ant-design-vue';
import { utils, writeFile } from 'xlsx';
import { listMenus } from '@/api/system/menu';
import type { Menu, MenuParam } from '@/api/system/menu/model';
import useSearch from '@/utils/use-search';
import Import from "./Import.vue";
import {getTenantId} from "@/utils/domain";
import { ref } from 'vue';
import { message } from 'ant-design-vue';
import { utils, writeFile } from 'xlsx';
import { listMenus } from '@/api/system/menu';
import type { Menu, MenuParam } from '@/api/system/menu/model';
import useSearch from '@/utils/use-search';
import Import from './Import.vue';
import { getTenantId } from '@/utils/domain';
// 定义包含关键词的参数类型
interface MenuSearchParam extends MenuParam {
keywords?: string;
}
const props = withDefaults(
defineProps<{
// 选中的数据
selection?: Menu[];
}>(),
{}
);
// 请求状态
const loading = ref(false);
const menuList = ref<Menu[]>([]);
// 是否显示导入弹窗
const showImport = ref(false);
// 表单数据
const { where, resetFields } = useSearch<MenuSearchParam>({
keywords: ''
});
const emit = defineEmits<{
(e: 'search', where?: MenuSearchParam): void;
(e: 'add'): void;
}>();
// 新增
const add = () => {
emit('add');
};
const reload = () => {
emit('search', where);
};
// 导出
const handleExport = async () => {
if (loading.value) {
return;
// 定义包含关键词的参数类型
interface MenuSearchParam extends MenuParam {
keywords?: string;
}
loading.value = true;
message.loading('正在准备导出数据...', 0);
const props = withDefaults(
defineProps<{
// 选中的数据
selection?: Menu[];
}>(),
{}
);
try {
const array: (string | number)[][] = [
[
'菜单ID',
'父级ID',
'菜单名称',
'路由地址',
'组件路径',
'权限标识',
'菜单类型',
'图标',
'排序号',
'是否隐藏'
]
];
// 请求状态
const loading = ref(false);
const menuList = ref<Menu[]>([]);
// 是否显示导入弹窗
const showImport = ref(false);
// 按搜索结果导出
const list = await listMenus({
title: where.keywords,
path: where.keywords,
authority: where.keywords
});
// 表单数据
const { where, resetFields } = useSearch<MenuSearchParam>({
keywords: ''
});
if (!list || list.length === 0) {
message.warning('没有数据可以导出');
loading.value = false;
const emit = defineEmits<{
(e: 'search', where?: MenuSearchParam): void;
(e: 'add'): void;
}>();
// 新增
const add = () => {
emit('add');
};
const reload = () => {
emit('search', where);
};
// 导出
const handleExport = async () => {
if (loading.value) {
return;
}
menuList.value = list as Menu[];
loading.value = true;
message.loading('正在准备导出数据...', 0);
list.forEach((d: Menu) => {
array.push([
`${d.menuId || ''}`,
`${d.parentId || 0}`,
`${d.title || ''}`,
`${d.path || ''}`,
`${d.component || ''}`,
`${d.authority || ''}`,
`${d.menuType !== undefined ? d.menuType : ''}`,
`${d.icon || ''}`,
`${d.sortNumber !== undefined ? d.sortNumber : ''}`,
`${d.hide !== undefined ? d.hide : ''}`
]);
});
try {
const array: (string | number)[][] = [
[
'菜单ID',
'父级ID',
'菜单名称',
'路由地址',
'组件路径',
'权限标识',
'菜单类型',
'图标',
'排序号',
'是否隐藏'
]
];
const sheetName = `bak_menu_${getTenantId()}`;
const workbook = {
SheetNames: [sheetName],
Sheets: {}
};
const sheet = utils.aoa_to_sheet(array);
workbook.Sheets[sheetName] = sheet;
// 按搜索结果导出
const list = await listMenus({
title: where.keywords,
path: where.keywords,
authority: where.keywords
});
// 设置列宽
sheet['!cols'] = [
{ wch: 10 }, // 菜单ID
{ wch: 10 }, // 父级ID
{ wch: 20 }, // 菜单名称
{ wch: 25 }, // 路由地址
{ wch: 25 }, // 组件路径
{ wch: 20 }, // 权限标识
{ wch: 10 }, // 菜单类型
{ wch: 15 }, // 图标
{ wch: 10 }, // 排序号
{ wch: 10 }, // 是否隐藏
{ wch: 20 }, // 创建时间
{ wch: 20 } // 更新时间
];
if (!list || list.length === 0) {
message.warning('没有数据可以导出');
loading.value = false;
return;
}
message.destroy();
message.loading('正在生成Excel文件...', 0);
menuList.value = list as Menu[];
setTimeout(() => {
writeFile(workbook, `${sheetName}.xlsx`);
list.forEach((d: Menu) => {
array.push([
`${d.menuId || ''}`,
`${d.parentId || 0}`,
`${d.title || ''}`,
`${d.path || ''}`,
`${d.component || ''}`,
`${d.authority || ''}`,
`${d.menuType !== undefined ? d.menuType : ''}`,
`${d.icon || ''}`,
`${d.sortNumber !== undefined ? d.sortNumber : ''}`,
`${d.hide !== undefined ? d.hide : ''}`
]);
});
const sheetName = `bak_menu_${getTenantId()}`;
const workbook = {
SheetNames: [sheetName],
Sheets: {}
};
const sheet = utils.aoa_to_sheet(array);
workbook.Sheets[sheetName] = sheet;
// 设置列宽
sheet['!cols'] = [
{ wch: 10 }, // 菜单ID
{ wch: 10 }, // 父级ID
{ wch: 20 }, // 菜单名称
{ wch: 25 }, // 路由地址
{ wch: 25 }, // 组件路径
{ wch: 20 }, // 权限标识
{ wch: 10 }, // 菜单类型
{ wch: 15 }, // 图标
{ wch: 10 }, // 排序号
{ wch: 10 }, // 是否隐藏
{ wch: 20 }, // 创建时间
{ wch: 20 } // 更新时间
];
message.destroy();
message.loading('正在生成Excel文件...', 0);
setTimeout(() => {
writeFile(workbook, `${sheetName}.xlsx`);
loading.value = false;
message.destroy();
message.success(`成功导出 ${list.length} 条记录`);
}, 1000);
} catch (error: any) {
loading.value = false;
message.destroy();
message.success(`成功导出 ${list.length} 条记录`);
}, 1000);
message.error(error.message || '导出失败,请重试');
}
};
} catch (error: any) {
loading.value = false;
message.destroy();
message.error(error.message || '导出失败,请重试');
}
};
/* 打开导入弹窗 */
const openImport = () => {
showImport.value = true;
};
/* 打开导入弹窗 */
const openImport = () => {
showImport.value = true;
};
/* 重置 */
const reset = () => {
resetFields();
reload();
};
/* 重置 */
const reset = () => {
resetFields();
reload();
};
</script>