diff --git a/src/api/person/index.ts b/src/api/person/index.ts new file mode 100644 index 00000000..0080b4e9 --- /dev/null +++ b/src/api/person/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +// 用户基本信息 VO +export interface PersonVO { + id: number // 主键ID + phone: string // 手机号(登录账号) + password: string // 密码 + name: string // 姓名 + address: string // 地址 + orgid: number // 机构ID + orgname: string // 机构名称 + familyid: string // 家庭组号 + familyrelation: number // 家庭关系:1-本人,2-兄弟,3-父亲,4-母亲,5-子女,6-其他 + isvip: number // 是否会员:0-否,1-是 + idcard: string // 身份证号 + createtime: Date // 创建时间 + updatetime: Date // 更新时间 + createby: string // 创建人 + updateby: string // 更新人 +} + +// 用户基本信息 API +export const PersonApi = { + // 查询用户基本信息分页 + getPersonPage: async (params: any) => { + return await request.get({ url: `/system/person/page`, params }) + }, + + // 查询用户基本信息详情 + getPerson: async (id: number) => { + return await request.get({ url: `/system/person/get?id=` + id }) + }, + + // 新增用户基本信息 + createPerson: async (data: PersonVO) => { + return await request.post({ url: `/system/person/create`, data }) + }, + + // 修改用户基本信息 + updatePerson: async (data: PersonVO) => { + return await request.put({ url: `/system/person/update`, data }) + }, + + // 删除用户基本信息 + deletePerson: async (id: number) => { + return await request.delete({ url: `/system/person/delete?id=` + id }) + }, + + // 导出用户基本信息 Excel + exportPerson: async (params) => { + return await request.download({ url: `/system/person/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/api/personarchive/index.ts b/src/api/personarchive/index.ts new file mode 100644 index 00000000..16b2d6bb --- /dev/null +++ b/src/api/personarchive/index.ts @@ -0,0 +1,73 @@ +import request from '@/config/axios' + +// 人员档案 VO +export interface PersonArchiveVO { + id: number // 主键ID + userid: number // 人员表ID + orgid: number // 机构ID + orgname: string // 机构名称 + name: string // 姓名 + gender: number // 性别 1男 2女 + age: number // 年龄 + idcard: string // 身份证号 + address: string // 户籍住址 + phone: string // 联系电话 + bloodtype: string // 血型 + sleepsituation: string // 睡眠情况 + height: number // 身高cm + weight: number // 体重kg + waist: number // 腰围cm + hip: number // 臀围cm + drinking: string // 饮酒情况 + disability: number // 残疾情况 0无 1有 + drugallergy: number // 药物过敏史 0无 1有 + exposure: number // 暴露史 0无 1有 + diseasehistory: number // 疾病史 0无 1有 + surgeryhistory: number // 手术史 0无 1有 + traumahistory: number // 外伤史 0无 1有 + transfusionhistory: number // 输血史 0无 1有 + disabilitydesc: string // 残疾情况描述 + drugallergydesc: string // 药物过敏史描述 + exposuredesc: string // 暴露史描述 + diseasehistorydesc: string // 疾病史描述 + surgeryhistorydesc: string // 手术史描述 + traumahistorydesc: string // 外伤史描述 + transfusionhistorydesc: string // 输血史描述 + createtime: Date // 创建时间 + updatetime: Date // 更新时间 + createby: string // 创建人 + updateby: string // 更新人 +} + +// 人员档案 API +export const PersonArchiveApi = { + // 查询人员档案分页 + getPersonArchivePage: async (params: any) => { + return await request.get({ url: `/system/person-archive/page`, params }) + }, + + // 查询人员档案详情 + getPersonArchive: async (id: number) => { + return await request.get({ url: `/system/person-archive/get?id=` + id }) + }, + + // 新增人员档案 + createPersonArchive: async (data: PersonArchiveVO) => { + return await request.post({ url: `/system/person-archive/create`, data }) + }, + + // 修改人员档案 + updatePersonArchive: async (data: PersonArchiveVO) => { + return await request.put({ url: `/system/person-archive/update`, data }) + }, + + // 删除人员档案 + deletePersonArchive: async (id: number) => { + return await request.delete({ url: `/system/person-archive/delete?id=` + id }) + }, + + // 导出人员档案 Excel + exportPersonArchive: async (params) => { + return await request.download({ url: `/system/person-archive/export-excel`, params }) + }, +} diff --git a/src/views/person/PersonFrom.vue b/src/views/person/PersonFrom.vue index 72d5bf94..0c0bc51d 100644 --- a/src/views/person/PersonFrom.vue +++ b/src/views/person/PersonFrom.vue @@ -1,69 +1,78 @@ + + \ No newline at end of file diff --git a/src/views/person/index.vue b/src/views/person/index.vue index b2058c94..c7f30cbe 100644 --- a/src/views/person/index.vue +++ b/src/views/person/index.vue @@ -19,18 +19,18 @@ class="!w-240px" /> - + - + - + + + + + - - - + + + + + @@ -88,11 +110,30 @@ - + + + +