diff --git a/src/api/agency.ts b/src/api/agency.ts new file mode 100644 index 0000000..56e7bac --- /dev/null +++ b/src/api/agency.ts @@ -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 { + return http.get('/agency', { signal }) +} + +/** 更新当前机构信息。 */ +export function updateAgency(data: AgencyUpdateData): Promise { + return http.patch('/agency', data) +} diff --git a/src/api/catalog.ts b/src/api/catalog.ts new file mode 100644 index 0000000..64d988a --- /dev/null +++ b/src/api/catalog.ts @@ -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 { + return http.get('/svc/local/list', { params: { loc_code: locCode }, signal }) +} + +/** 当前机构项目库(L4)。 */ +export function listOrg(signal?: AbortSignal): Promise { + return http.get('/svc/org/list', { signal }) +} + +/** 勾选 + 配价。 */ +export function configSvcOrg(data: ConfigSvcOrgData): Promise { + return http.post('/svc/org/config', data) +} + +/** 国家新增项(昆明 L2 缺而 L1 有的过渡期新增,勾选界面需显式提示)。 */ +export function listNewNational(signal?: AbortSignal): Promise { + return http.get('/svc/org/new-national', { signal }) +} diff --git a/src/api/staff.ts b/src/api/staff.ts new file mode 100644 index 0000000..921a195 --- /dev/null +++ b/src/api/staff.ts @@ -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 + +/** 人员分页列表。 */ +export function listStaff(query: StaffListQuery, signal?: AbortSignal): Promise> { + const params: Record = { 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>('/staff', { params, signal }) +} + +/** 建档。 */ +export function createStaff(data: StaffCreateData): Promise { + return http.post('/staff', data) +} + +/** 改人员。 */ +export function updateStaff(id: string, data: StaffUpdateData): Promise { + return http.patch(`/staff/${id}`, data) +} + +/** 删除(软删)。 */ +export function deleteStaff(id: string): Promise { + return http.delete(`/staff/${id}`) +} + +/** 指定归属组长(groupLeaderId 传 null 解除归属)。 */ +export function assignGroupLeader(id: string, groupLeaderId: string | null): Promise { + return http.post(`/staff/${id}/group`, { groupLeaderId }) +} diff --git a/src/config/login.ts b/src/config/login.ts index 1ca9db0..16f1df5 100644 --- a/src/config/login.ts +++ b/src/config/login.ts @@ -56,5 +56,5 @@ export const defaultLoginConfig: LoginConfig = { showForgetPassword: false, showRegister: false, showCaptcha: true, - homePath: '/', + homePath: '/ltc/elder', } diff --git a/src/pages/ltc/config/catalog/index.vue b/src/pages/ltc/config/catalog/index.vue new file mode 100644 index 0000000..fab8737 --- /dev/null +++ b/src/pages/ltc/config/catalog/index.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/pages/ltc/config/info/index.vue b/src/pages/ltc/config/info/index.vue new file mode 100644 index 0000000..dd51eaa --- /dev/null +++ b/src/pages/ltc/config/info/index.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/pages/ltc/config/photo/index.vue b/src/pages/ltc/config/photo/index.vue new file mode 100644 index 0000000..962507e --- /dev/null +++ b/src/pages/ltc/config/photo/index.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/pages/ltc/config/qc/index.vue b/src/pages/ltc/config/qc/index.vue new file mode 100644 index 0000000..df5cfaf --- /dev/null +++ b/src/pages/ltc/config/qc/index.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/pages/ltc/elder/index.vue b/src/pages/ltc/elder/index.vue new file mode 100644 index 0000000..543c6cf --- /dev/null +++ b/src/pages/ltc/elder/index.vue @@ -0,0 +1,7 @@ + + + diff --git a/typed-router.d.ts b/typed-router.d.ts index 227d33f..1efb6fc 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -72,6 +72,41 @@ declare module 'vue-router/auto-routes' { Record, | never >, + '/ltc/config/catalog/': RouteRecordInfo< + '/ltc/config/catalog/', + '/ltc/config/catalog', + Record, + Record, + | never + >, + '/ltc/config/info/': RouteRecordInfo< + '/ltc/config/info/', + '/ltc/config/info', + Record, + Record, + | never + >, + '/ltc/config/photo/': RouteRecordInfo< + '/ltc/config/photo/', + '/ltc/config/photo', + Record, + Record, + | never + >, + '/ltc/config/qc/': RouteRecordInfo< + '/ltc/config/qc/', + '/ltc/config/qc', + Record, + Record, + | never + >, + '/ltc/elder/': RouteRecordInfo< + '/ltc/elder/', + '/ltc/elder', + Record, + Record, + | 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/'