From 532a8cc76cc751db41f599dc300cfd7b07dc9775 Mon Sep 17 00:00:00 2001 From: liuyun Date: Thu, 15 Oct 2026 07:46:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(c5):=20=E5=90=8E=E5=8F=B0=207=20=E4=B8=AA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE/=E6=96=87=E4=B9=A6=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/api/agency.ts | 9 + src/api/catalog.ts | 23 +- src/api/document.ts | 103 ++++++++ src/pages/ltc/config/catalog/index.vue | 104 +++++++- src/pages/ltc/config/docking/index.vue | 68 +++++- src/pages/ltc/config/info/index.vue | 125 +++++++++- src/pages/ltc/config/l4-projects.ts | 29 +++ src/pages/ltc/config/loc/index.vue | 166 ++++++++++++- src/pages/ltc/config/photo/index.vue | 136 ++++++++++- src/pages/ltc/config/qc/index.vue | 64 ++++- src/pages/ltc/document/index.vue | 322 ++++++++++++++++++++++++- 11 files changed, 1141 insertions(+), 8 deletions(-) create mode 100644 src/api/document.ts create mode 100644 src/pages/ltc/config/l4-projects.ts diff --git a/src/api/agency.ts b/src/api/agency.ts index eba4783..9a271a8 100644 --- a/src/api/agency.ts +++ b/src/api/agency.ts @@ -15,6 +15,12 @@ export interface Agency { contactPhone: string bedCount: number | null signDate: number | null + /** 质控时限(小时)。 */ + qcThreshold: number | null + /** 对接档位:A/B/C。 */ + dockingTier: string | null + /** 国家新增项通知开关。 */ + newNationalNotify: boolean createdAt: number createdBy: string | null updatedAt: number @@ -35,6 +41,9 @@ export type AgencyUpdateData = Partial< | 'contactPhone' | 'bedCount' | 'signDate' + | 'qcThreshold' + | 'dockingTier' + | 'newNationalNotify' > > diff --git a/src/api/catalog.ts b/src/api/catalog.ts index d632534..a8d6bb6 100644 --- a/src/api/catalog.ts +++ b/src/api/catalog.ts @@ -27,7 +27,7 @@ export interface SvcNational { version: number } -/** L4 机构项目库记录(机构勾选 + 配价)。 */ +/** L4 机构项目库记录(机构勾选 + 配价 + 拍照分档)。 */ export interface SvcOrg { id: string tenantCode: string @@ -36,6 +36,8 @@ export interface SvcOrg { isEnabled: boolean price: string | null priceEffective: number | null + /** 拍照分档:must/free/optional。 */ + photoTier: string isNewNational: boolean createdAt: number createdBy: string | null @@ -69,3 +71,22 @@ export function configSvcOrg(data: ConfigSvcOrgData): Promise { export function listNewNational(signal?: AbortSignal): Promise { return http.get('/svc/org/new-national', { signal }) } + +/** 拍照分档批量更新项。 */ +export interface UpdatePhotoTierItem { + id: string + /** must/free/optional。 */ + photoTier: string +} + +/** 拍照分档批量更新结果:must→free/optional 视为「放宽」,收集进 warnings。 */ +export interface UpdatePhotoTierResult { + updated: number + warnings: { id: string; from: string; to: string }[] + message?: string +} + +/** 批量更新拍照分档。 */ +export function updatePhotoTier(items: UpdatePhotoTierItem[]): Promise { + return http.post('/svc/org/photo-tier/batch', { items }) +} diff --git a/src/api/document.ts b/src/api/document.ts new file mode 100644 index 0000000..eeb4f23 --- /dev/null +++ b/src/api/document.ts @@ -0,0 +1,103 @@ +import { http } from '@/api/http' + +/** + * 文书档案(一人一档)导出 API。 + * 后端返回结构化 JSON(身份证已掩码),前端负责组装下载文件。 + * 字段锚点见 shared/data-model spec(document 导出契约)。 + */ + +/** 导出水印头。 */ +export interface DocumentWatermark { + orgName: string + exportTime: string + operator: string + notice: string +} + +/** 老人基本信息(@db.Date 字段已转 YYYY-MM-DD,idCardNo 已掩码)。 */ +export interface DocumentElderInfo { + name: string + gender: string + birthDate: string | null + idCardNo: string + phone: string | null + address: string | null + insurNo: string | null + careLevel: string | null + treatStatus: string + benefitStart: string | null + benefitEnd: string | null +} + +/** 计划项(项目名快照)。 */ +export interface DocumentPlanItem { + svcId: string + svcName: string + freqType: string | null + freqValue: number | null + durationMin: number | null + photoTier: string | null +} + +/** 服务计划。 */ +export interface DocumentPlan { + id: string + planPeriodStart: string | null + planPeriodEnd: string | null + careLevel: string + careMode: string + planStatus: string + items: DocumentPlanItem[] +} + +/** 留痕项目明细。 */ +export interface DocumentRecordItem { + svcId: string + svcName: string + execResult: string + undoReason: string | null + extraFlag: boolean +} + +/** 履约留痕。 */ +export interface DocumentRecord { + id: string + checkinTime: string | null + checkoutTime: string | null + durationMin: number | null + recordStatus: string + items: DocumentRecordItem[] +} + +/** 异常上报。 */ +export interface DocumentAbnormal { + id: string + type: string + desc: string | null + handleStatus: string +} + +/** 一人一档结构化导出。 */ +export interface DocumentExportData { + watermark: DocumentWatermark + elder: DocumentElderInfo + plans: DocumentPlan[] + records: DocumentRecord[] + abnormals: DocumentAbnormal[] +} + +export interface ExportDocumentQuery { + elderId: string + /** 留痕起始日期(YYYY-MM-DD)。 */ + startDate?: string + /** 留痕结束日期(YYYY-MM-DD)。 */ + endDate?: string +} + +/** 按老人(+可选时间范围)导出一人一档。 */ +export function exportDocument(query: ExportDocumentQuery, signal?: AbortSignal): Promise { + const params: Record = { elderId: query.elderId } + if (query.startDate) params.startDate = query.startDate + if (query.endDate) params.endDate = query.endDate + return http.get('/document/export', { params, signal }) +} diff --git a/src/pages/ltc/config/catalog/index.vue b/src/pages/ltc/config/catalog/index.vue index fab8737..5700876 100644 --- a/src/pages/ltc/config/catalog/index.vue +++ b/src/pages/ltc/config/catalog/index.vue @@ -1,7 +1,109 @@ + + diff --git a/src/pages/ltc/config/docking/index.vue b/src/pages/ltc/config/docking/index.vue index 3815477..4afc481 100644 --- a/src/pages/ltc/config/docking/index.vue +++ b/src/pages/ltc/config/docking/index.vue @@ -1,7 +1,73 @@ + + diff --git a/src/pages/ltc/config/info/index.vue b/src/pages/ltc/config/info/index.vue index dd51eaa..5717fe0 100644 --- a/src/pages/ltc/config/info/index.vue +++ b/src/pages/ltc/config/info/index.vue @@ -1,7 +1,130 @@ + + diff --git a/src/pages/ltc/config/l4-projects.ts b/src/pages/ltc/config/l4-projects.ts new file mode 100644 index 0000000..22ac02c --- /dev/null +++ b/src/pages/ltc/config/l4-projects.ts @@ -0,0 +1,29 @@ +import { getAgency } from '@/api/agency' +import { listLocal, listNewNational, listOrg, type SvcOrg } from '@/api/catalog' + +/** L4 机构项目 + 解析后的展示名(join L2 属地目录 / L1 国家目录)。 */ +export interface L4ProjectRow extends SvcOrg { + name: string +} + +/** + * 加载当前机构 L4 项目库,并按 srcType/srcId join 目录解析展示名。 + * L4(svc_org)只有 srcType/srcId,无名称,需按来源 join L2/L1 目录。 + */ +export async function loadL4Projects(): Promise { + const [agency, orgs, nationals] = await Promise.all([getAgency(), listOrg(), listNewNational()]) + const locals = await listLocal(agency.locCode) + + const localMap = new Map() + const nationalMap = new Map() + for (const it of locals) { + if ('localItemName' in it) localMap.set(it.id, it.localItemName) + else if ('natName' in it) nationalMap.set(it.id, it.natName) + } + for (const it of nationals) nationalMap.set(it.id, it.natName) + + return orgs.map((o) => { + const name = o.srcType === 'local' ? localMap.get(o.srcId) : nationalMap.get(o.srcId) + return { ...o, name: name ?? o.srcId } + }) +} diff --git a/src/pages/ltc/config/loc/index.vue b/src/pages/ltc/config/loc/index.vue index dfeb245..db01dab 100644 --- a/src/pages/ltc/config/loc/index.vue +++ b/src/pages/ltc/config/loc/index.vue @@ -1,7 +1,171 @@ + + diff --git a/src/pages/ltc/config/photo/index.vue b/src/pages/ltc/config/photo/index.vue index 962507e..4dc2557 100644 --- a/src/pages/ltc/config/photo/index.vue +++ b/src/pages/ltc/config/photo/index.vue @@ -1,7 +1,141 @@ + + diff --git a/src/pages/ltc/config/qc/index.vue b/src/pages/ltc/config/qc/index.vue index df5cfaf..5c111e4 100644 --- a/src/pages/ltc/config/qc/index.vue +++ b/src/pages/ltc/config/qc/index.vue @@ -1,7 +1,69 @@ + + diff --git a/src/pages/ltc/document/index.vue b/src/pages/ltc/document/index.vue index a8673f7..9c2b7ff 100644 --- a/src/pages/ltc/document/index.vue +++ b/src/pages/ltc/document/index.vue @@ -1,7 +1,327 @@ + +