feat(app): 初始化项目配置和页面结构
- 添加 .dockerignore 和 .env.example 配置文件 - 添加 .gitignore 忽略规则配置 - 创建服务端代理API路由(_file、_modules、_server) - 集成 Ant Design Vue 组件库并配置SSR样式提取 - 定义API响应类型封装 - 创建基础布局组件(blank、console) - 实现应用中心页面和组件(AppsCenter) - 添加文章列表测试页面 - 配置控制台导航菜单结构 - 实现控制台头部组件 - 创建联系页面表单
This commit is contained in:
112
app/api/clinic/clinicPrescriptionItem/index.ts
Normal file
112
app/api/clinic/clinicPrescriptionItem/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicPrescriptionItem, ClinicPrescriptionItemParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询处方明细表
|
||||
|
||||
*/
|
||||
export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicPrescriptionItem>>>(
|
||||
'/clinic/clinic-prescription-item/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方明细表
|
||||
列表
|
||||
*/
|
||||
export async function listClinicPrescriptionItem(params?: ClinicPrescriptionItemParam) {
|
||||
const res = await request.get<ApiResult<ClinicPrescriptionItem[]>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加处方明细表
|
||||
|
||||
*/
|
||||
export async function addClinicPrescriptionItem(data: ClinicPrescriptionItem) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方明细表
|
||||
|
||||
*/
|
||||
export async function updateClinicPrescriptionItem(data: ClinicPrescriptionItem) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方明细表
|
||||
|
||||
*/
|
||||
export async function removeClinicPrescriptionItem(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除处方明细表
|
||||
|
||||
*/
|
||||
export async function removeBatchClinicPrescriptionItem(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询处方明细表
|
||||
|
||||
*/
|
||||
export async function getClinicPrescriptionItem(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicPrescriptionItem>>(
|
||||
'/clinic/clinic-prescription-item/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
49
app/api/clinic/clinicPrescriptionItem/model/index.ts
Normal file
49
app/api/clinic/clinicPrescriptionItem/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
|
||||
*/
|
||||
export interface ClinicPrescriptionItem {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 关联处方
|
||||
prescriptionId?: number;
|
||||
// 订单编号
|
||||
prescriptionNo?: string;
|
||||
// 关联药品
|
||||
medicineId?: number;
|
||||
// 剂量(如“10g”)
|
||||
dosage?: string;
|
||||
// 用法频率(如“每日三次”)
|
||||
usageFrequency?: string;
|
||||
// 服用天数
|
||||
days?: number;
|
||||
// 购买数量
|
||||
amount?: number;
|
||||
// 单价
|
||||
unitPrice?: string;
|
||||
// 数量
|
||||
quantity?: number;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 更新时间
|
||||
updateTime?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
搜索条件
|
||||
*/
|
||||
export interface ClinicPrescriptionItemParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user