feat(c0): 长护服务菜单占位页 + 机构/目录/人员 api
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da7a5b703e
commit
ce68c4bbd2
49
src/api/agency.ts
Normal file
49
src/api/agency.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import { http } from './http'
|
||||
|
||||
/** 机构(=租户)信息实体。字段字典锚点见 shared/data-model spec。 */
|
||||
export interface Agency {
|
||||
code: string
|
||||
orgName: string
|
||||
orgType: string
|
||||
creditCode: string
|
||||
locCode: string
|
||||
locName: string
|
||||
svcSource: string
|
||||
licenseNo: string | null
|
||||
address: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
bedCount: number | null
|
||||
signDate: number | null
|
||||
createdAt: number
|
||||
createdBy: string | null
|
||||
updatedAt: number
|
||||
deletedAt: number | null
|
||||
}
|
||||
|
||||
/** 机构可编辑字段(code/locCode/locName 只读,由服务端按租户 code 注入)。 */
|
||||
export type AgencyUpdateData = Partial<
|
||||
Pick<
|
||||
Agency,
|
||||
| 'orgName'
|
||||
| 'orgType'
|
||||
| 'creditCode'
|
||||
| 'svcSource'
|
||||
| 'licenseNo'
|
||||
| 'address'
|
||||
| 'contactName'
|
||||
| 'contactPhone'
|
||||
| 'bedCount'
|
||||
| 'signDate'
|
||||
>
|
||||
>
|
||||
|
||||
/** 当前机构信息(code = 当前租户 code)。 */
|
||||
export function getAgency(signal?: AbortSignal): Promise<Agency> {
|
||||
return http.get<Agency>('/agency', { signal })
|
||||
}
|
||||
|
||||
/** 更新当前机构信息。 */
|
||||
export function updateAgency(data: AgencyUpdateData): Promise<Agency> {
|
||||
return http.patch<Agency>('/agency', data)
|
||||
}
|
||||
71
src/api/catalog.ts
Normal file
71
src/api/catalog.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import { http } from './http'
|
||||
|
||||
/** L2 属地目录项(有本地目录的州市)。 */
|
||||
export interface SvcLocal {
|
||||
id: string
|
||||
locCode: string
|
||||
localItemName: string
|
||||
localCategory: string | null
|
||||
svcTime: string | null
|
||||
minFreq: string | null
|
||||
staffQual: string | null
|
||||
isMedical: boolean
|
||||
sourceDoc: string | null
|
||||
mapStatus: string
|
||||
}
|
||||
|
||||
/** L1 国家基准库目录项(新建制州市无本地目录时回退全量)。 */
|
||||
export interface SvcNational {
|
||||
id: string
|
||||
natCode: string
|
||||
natName: string
|
||||
natCategory: string
|
||||
natSubCategory: string | null
|
||||
recommendStaff: string | null
|
||||
recommendDuration: string | null
|
||||
isMedical: boolean
|
||||
version: number
|
||||
}
|
||||
|
||||
/** L4 机构项目库记录(机构勾选 + 配价)。 */
|
||||
export interface SvcOrg {
|
||||
id: string
|
||||
tenantCode: string
|
||||
srcType: string
|
||||
srcId: string
|
||||
isEnabled: boolean
|
||||
price: string | null
|
||||
priceEffective: number | null
|
||||
isNewNational: boolean
|
||||
createdAt: number
|
||||
createdBy: string | null
|
||||
updatedAt: number
|
||||
deletedAt: number | null
|
||||
}
|
||||
|
||||
/** 勾选 + 配价入参(机构只能改 isEnabled/price,其余业务字段只读)。 */
|
||||
export interface ConfigSvcOrgData {
|
||||
id: string
|
||||
isEnabled?: boolean
|
||||
price?: string
|
||||
}
|
||||
|
||||
/** 按属地加载目录(L2 优先,无本地目录回退 L1 国家全量)。 */
|
||||
export function listLocal(locCode: string, signal?: AbortSignal): Promise<SvcLocal[] | SvcNational[]> {
|
||||
return http.get<SvcLocal[] | SvcNational[]>('/svc/local/list', { params: { loc_code: locCode }, signal })
|
||||
}
|
||||
|
||||
/** 当前机构项目库(L4)。 */
|
||||
export function listOrg(signal?: AbortSignal): Promise<SvcOrg[]> {
|
||||
return http.get<SvcOrg[]>('/svc/org/list', { signal })
|
||||
}
|
||||
|
||||
/** 勾选 + 配价。 */
|
||||
export function configSvcOrg(data: ConfigSvcOrgData): Promise<SvcOrg> {
|
||||
return http.post<SvcOrg>('/svc/org/config', data)
|
||||
}
|
||||
|
||||
/** 国家新增项(昆明 L2 缺而 L1 有的过渡期新增,勾选界面需显式提示)。 */
|
||||
export function listNewNational(signal?: AbortSignal): Promise<SvcNational[]> {
|
||||
return http.get<SvcNational[]>('/svc/org/new-national', { signal })
|
||||
}
|
||||
90
src/api/staff.ts
Normal file
90
src/api/staff.ts
Normal file
@ -0,0 +1,90 @@
|
||||
import { http } from './http'
|
||||
import type { PageResult } from '@/types/crud'
|
||||
|
||||
/** 人员(staff)实体。字段字典锚点见 shared/data-model spec。 */
|
||||
export interface Staff {
|
||||
id: string
|
||||
tenantCode: string
|
||||
userId: string | null
|
||||
name: string
|
||||
idCardNo: string
|
||||
personCode: string | null
|
||||
phone: string
|
||||
jobType: string
|
||||
workType: string
|
||||
entryDate: number | null
|
||||
leaveDate: number | null
|
||||
employStatus: string
|
||||
certType: string | null
|
||||
certNo: string | null
|
||||
certLevel: string | null
|
||||
certExpire: number | null
|
||||
certStatus: string | null
|
||||
certVerifyUrl: string | null
|
||||
groupLeaderId: string | null
|
||||
createdAt: number
|
||||
createdBy: string | null
|
||||
updatedAt: number
|
||||
deletedAt: number | null
|
||||
}
|
||||
|
||||
export interface StaffListQuery {
|
||||
page: number
|
||||
pageSize: number
|
||||
name?: string
|
||||
jobType?: string
|
||||
employStatus?: string
|
||||
}
|
||||
|
||||
/** 建档入参(日期字段为 YYYY-MM-DD 字符串)。 */
|
||||
export interface StaffCreateData {
|
||||
userId?: string
|
||||
name: string
|
||||
idCardNo: string
|
||||
personCode?: string
|
||||
phone: string
|
||||
jobType: string
|
||||
workType: string
|
||||
entryDate?: string
|
||||
leaveDate?: string
|
||||
employStatus: string
|
||||
certType?: string
|
||||
certNo?: string
|
||||
certLevel?: string
|
||||
certExpire?: string
|
||||
certStatus?: string
|
||||
certVerifyUrl?: string
|
||||
groupLeaderId?: string
|
||||
}
|
||||
|
||||
/** 改人员入参(全部可选)。 */
|
||||
export type StaffUpdateData = Partial<StaffCreateData>
|
||||
|
||||
/** 人员分页列表。 */
|
||||
export function listStaff(query: StaffListQuery, signal?: AbortSignal): Promise<PageResult<Staff>> {
|
||||
const params: Record<string, unknown> = { page: query.page, pageSize: query.pageSize }
|
||||
if (query.name) params.name = query.name
|
||||
if (query.jobType) params.jobType = query.jobType
|
||||
if (query.employStatus) params.employStatus = query.employStatus
|
||||
return http.get<PageResult<Staff>>('/staff', { params, signal })
|
||||
}
|
||||
|
||||
/** 建档。 */
|
||||
export function createStaff(data: StaffCreateData): Promise<Staff> {
|
||||
return http.post<Staff>('/staff', data)
|
||||
}
|
||||
|
||||
/** 改人员。 */
|
||||
export function updateStaff(id: string, data: StaffUpdateData): Promise<Staff> {
|
||||
return http.patch<Staff>(`/staff/${id}`, data)
|
||||
}
|
||||
|
||||
/** 删除(软删)。 */
|
||||
export function deleteStaff(id: string): Promise<unknown> {
|
||||
return http.delete(`/staff/${id}`)
|
||||
}
|
||||
|
||||
/** 指定归属组长(groupLeaderId 传 null 解除归属)。 */
|
||||
export function assignGroupLeader(id: string, groupLeaderId: string | null): Promise<Staff> {
|
||||
return http.post<Staff>(`/staff/${id}/group`, { groupLeaderId })
|
||||
}
|
||||
@ -56,5 +56,5 @@ export const defaultLoginConfig: LoginConfig = {
|
||||
showForgetPassword: false,
|
||||
showRegister: false,
|
||||
showCaptcha: true,
|
||||
homePath: '/',
|
||||
homePath: '/ltc/elder',
|
||||
}
|
||||
|
||||
7
src/pages/ltc/config/catalog/index.vue
Normal file
7
src/pages/ltc/config/catalog/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>服务项目与配价(C1 实现)</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'svc-config-catalog' })
|
||||
</script>
|
||||
7
src/pages/ltc/config/info/index.vue
Normal file
7
src/pages/ltc/config/info/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>机构信息(C1 实现)</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'svc-config-info' })
|
||||
</script>
|
||||
7
src/pages/ltc/config/photo/index.vue
Normal file
7
src/pages/ltc/config/photo/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>拍照分档配置(C1 实现)</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'svc-config-photo' })
|
||||
</script>
|
||||
7
src/pages/ltc/config/qc/index.vue
Normal file
7
src/pages/ltc/config/qc/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>质控提醒配置(C1 实现)</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'svc-config-qc' })
|
||||
</script>
|
||||
7
src/pages/ltc/elder/index.vue
Normal file
7
src/pages/ltc/elder/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>服务对象(C1 实现)</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: 'elder' })
|
||||
</script>
|
||||
65
typed-router.d.ts
vendored
65
typed-router.d.ts
vendored
@ -72,6 +72,41 @@ declare module 'vue-router/auto-routes' {
|
||||
Record<never, never>,
|
||||
| never
|
||||
>,
|
||||
'/ltc/config/catalog/': RouteRecordInfo<
|
||||
'/ltc/config/catalog/',
|
||||
'/ltc/config/catalog',
|
||||
Record<never, never>,
|
||||
Record<never, never>,
|
||||
| never
|
||||
>,
|
||||
'/ltc/config/info/': RouteRecordInfo<
|
||||
'/ltc/config/info/',
|
||||
'/ltc/config/info',
|
||||
Record<never, never>,
|
||||
Record<never, never>,
|
||||
| never
|
||||
>,
|
||||
'/ltc/config/photo/': RouteRecordInfo<
|
||||
'/ltc/config/photo/',
|
||||
'/ltc/config/photo',
|
||||
Record<never, never>,
|
||||
Record<never, never>,
|
||||
| never
|
||||
>,
|
||||
'/ltc/config/qc/': RouteRecordInfo<
|
||||
'/ltc/config/qc/',
|
||||
'/ltc/config/qc',
|
||||
Record<never, never>,
|
||||
Record<never, never>,
|
||||
| never
|
||||
>,
|
||||
'/ltc/elder/': RouteRecordInfo<
|
||||
'/ltc/elder/',
|
||||
'/ltc/elder',
|
||||
Record<never, never>,
|
||||
Record<never, never>,
|
||||
| never
|
||||
>,
|
||||
'/monitor/audit/': RouteRecordInfo<
|
||||
'/monitor/audit/',
|
||||
'/monitor/audit',
|
||||
@ -239,6 +274,36 @@ declare module 'vue-router/auto-routes' {
|
||||
views:
|
||||
| never
|
||||
}
|
||||
'src/pages/ltc/config/catalog/index.vue': {
|
||||
routes:
|
||||
| '/ltc/config/catalog/'
|
||||
views:
|
||||
| never
|
||||
}
|
||||
'src/pages/ltc/config/info/index.vue': {
|
||||
routes:
|
||||
| '/ltc/config/info/'
|
||||
views:
|
||||
| never
|
||||
}
|
||||
'src/pages/ltc/config/photo/index.vue': {
|
||||
routes:
|
||||
| '/ltc/config/photo/'
|
||||
views:
|
||||
| never
|
||||
}
|
||||
'src/pages/ltc/config/qc/index.vue': {
|
||||
routes:
|
||||
| '/ltc/config/qc/'
|
||||
views:
|
||||
| never
|
||||
}
|
||||
'src/pages/ltc/elder/index.vue': {
|
||||
routes:
|
||||
| '/ltc/elder/'
|
||||
views:
|
||||
| never
|
||||
}
|
||||
'src/pages/monitor/audit/index.vue': {
|
||||
routes:
|
||||
| '/monitor/audit/'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user