72 lines
2.1 KiB
TypeScript
72 lines
2.1 KiB
TypeScript
import { http } from '@/api/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 })
|
||
}
|