From 8ce8082e891624d30132607c6291cd07e259f372 Mon Sep 17 00:00:00 2001 From: chenxing Date: Tue, 20 Oct 2026 18:01:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(hall):=20=E6=96=B0=E5=A2=9E=E4=BA=8B?= =?UTF-8?q?=E9=A1=B9=E6=8C=87=E5=8D=97=E9=A1=B5=EF=BC=88=E5=85=88=E7=9C=8B?= =?UTF-8?q?=E6=8C=87=E5=8D=97=E5=86=8D=E5=8A=9E=E7=90=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /#/item?siteCode=&itemCode= 新页面:元数据 + 五 tab + 底部固定操作条 - HallApi.guide() 接匿名接口 /api/hall/item(契约 §3.2) - HallItem 补 10 个承诺字段、新增 ItemGuideVo/ItemGuideAttachment(契约 §4) - 状态角标三态与办理分流按契约 §5 - .gitignore 忽略 vite.config.ts.timestamp-* 临时文件 --- .gitignore | 3 + src/api/module/svc.ts | 5 + src/router/routes.ts | 9 +- src/types/svc.ts | 59 +++++++ src/views/ItemGuide.vue | 358 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 433 insertions(+), 1 deletion(-) create mode 100644 src/views/ItemGuide.vue diff --git a/.gitignore b/.gitignore index c00039c..9230e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ yarn.lock # scratch .temp + +# Vite 配置热重载产生的临时文件(构建时自动生成,勿入库) +vite.config.ts.timestamp-* diff --git a/src/api/module/svc.ts b/src/api/module/svc.ts index 8bcdd18..0ce1d30 100644 --- a/src/api/module/svc.ts +++ b/src/api/module/svc.ts @@ -7,6 +7,7 @@ import type { FlowProgressVo, HallFilters, HallItem, + ItemGuideVo, PageResult, } from "@/types/svc"; @@ -68,6 +69,10 @@ class HallApi { site(siteCode: string) { return get(`${HALL}/site`, { siteCode }); } + /** 事项指南(匿名;游客可读) */ + guide(siteCode: string, itemCode: string) { + return get(`${HALL}/item`, { siteCode, itemCode }); + } } class ApplyApi { diff --git a/src/router/routes.ts b/src/router/routes.ts index d186684..5398fca 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -2,7 +2,7 @@ import type { RouteRecordRaw } from "vue-router"; /** * 公共办事大厅路由(用户面;后台管理路由在 svc-hall/front,两仓互不引用)。 - * 五个页面:事项大厅(入口)/ 在线办理 / 我的办件 / 我的审批 / 办件详情。 + * 六个页面:事项大厅(入口)/ 事项指南 / 在线办理 / 我的办件 / 我的审批 / 办件详情。 * 全部走 hash 路由(部署于 /{contextPath}/hall/,hash 免服务端 rewrite)。 * 参数页用 query 传参(与 CMS 指南页"我要办理"外链形态一致: * {svc_hall_base}/#/apply?siteCode=&itemCode=&from=<指南页绝对URL>; @@ -16,6 +16,13 @@ const routes: RouteRecordRaw[] = [ component: () => import("@/views/Hall.vue"), meta: { title: "办事大厅" }, }, + // 事项指南(P0-1「先看指南再办理」):{base}/#/item?siteCode=&itemCode=,匿名可读 + { + path: "/item", + name: "item_guide", + component: () => import("@/views/ItemGuide.vue"), + meta: { title: "事项指南" }, + }, { path: "/apply", name: "apply", diff --git a/src/types/svc.ts b/src/types/svc.ts index 7b1f80e..f1082aa 100644 --- a/src/types/svc.ts +++ b/src/types/svc.ts @@ -71,6 +71,65 @@ export interface HallItem { handleMode?: number; onlineFlag?: number; publishTime?: string; + // ===== 《svc-hall一期接口契约》§2.2/§3.1 追加字段(全部可空,旧事项为 null)===== + /** 外链办理地址:非空即"外链最高优先"(§5 三态判定第一态) */ + applyUrl?: string | null; + /** 承诺办结时限(面向用户的口径,展示优先于 handleTimeLimit) */ + promiseTimeLimit?: string | null; + handleTimeLimit?: string | null; + /** 跑现场次数:0=零跑动 */ + runCount?: number | null; + /** 是否快递送达:0 否 / 1 是(到付)/ 2 是(学校承担) */ + expressFlag?: number | null; + /** 协办部门(顿号分隔文本快照) */ + coopDepts?: string | null; + handlerName?: string | null; + /** 办理时间(办公时段,区别于办理时限) */ + handleTimeDesc?: string | null; + feeDesc?: string | null; + feeBasis?: string | null; +} + +/** 事项指南附件(《契约》§3.2 attachments) */ +export interface ItemGuideAttachment { + fileName: string; + fileUrl: string; + fileSize?: number; +} + +/** 事项指南(GET /api/hall/item 出参,匿名;《契约》§3.2/§4) */ +export interface ItemGuideVo { + id: number; + itemCode: string; + title: string; + summary?: string; + /** 服务对象字典 key(中文名需查 /api/hall/filters,接口不返回 objectName) */ + objectKey?: string; + categoryName?: string; + deptName?: string; + /** 办理方式:1 线上 / 2 线下 / 3 线上线下结合 */ + handleMode?: number; + onlineFlag?: number; + applyUrl?: string | null; + handlePlace?: string; + handleTimeLimit?: string; + promiseTimeLimit?: string; + contactPhone?: string; + supervisePhone?: string; + coverImage?: string; + viewCount?: number; + coopDepts?: string; + handlerName?: string; + handleTimeDesc?: string; + runCount?: number; + expressFlag?: number; + feeDesc?: string; + feeBasis?: string; + /** 以下三段为入库时已 jsoup 白名单清洗的富文本,前端原样 v-html(《契约》§3.2 规则) */ + processHtml?: string; + materialHtml?: string; + noticeHtml?: string; + attachments?: ItemGuideAttachment[]; } export interface HallFilterOption { diff --git a/src/views/ItemGuide.vue b/src/views/ItemGuide.vue new file mode 100644 index 0000000..6676c8b --- /dev/null +++ b/src/views/ItemGuide.vue @@ -0,0 +1,358 @@ + + + + +