Files
flow-center-front/src/utils/appUrl.ts
T
chenxing c93313cdb7
build / build (push) Successful in 1m28s
feat(flow): 流程图入口/失败提示/指派预览/线级停发闭环/配置分层/选人宿主
- 修复办理页「查看流程图」双 hash URL:改 router.resolve + toAppHashUrl 单 hash
- 修复管理端办件抽屉「查看大图」域名尾点(origin + BASE_URL("./") 拼接)
- 新增 flowError 口径层与办理页内联失败条,审批失败提示可读、不泄漏堆栈
- 审批节点抽屉新增「预览候选人」真入口 + AssigneePreviewModal(只读,不写回定义)
- 线级停发/恢复失败改为单条错误面,避免同错双 toast
- 审批抽屉核心区/高级设置分层;插入菜单常用/高级分组
- 新增 FlowAssignEmbed 选人 iframe 父侧宿主(origin/source/信封/context 四校验)
- 修复 /diagram、/assign-preview 面包屑误显示「流程编辑器」
2026-10-28 03:18:54 +08:00

14 lines
816 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 整页跳转用的应用内地址(hash 路由)。
*
* 线上缺陷(FL上线独立验收报告 P1-3):入口把 `router.resolve(...).href`(自带前导 `#`)当成
* path 再拼一次,得到 `index.html#/task/339#/diagram?…` 双 hash——浏览器只认第一个 `#`,
* 页面停在原路由且无任何报错;另一处用 `origin + BASE_URL` 拼基址,BASE_URL 构建期是 "./",
* 拼出 `https://host./#/diagram?…`(域名尾点)。
* 统一口径:先丢掉当前地址里已有的 hash 段,再接上目标路由解析出的唯一 hash。
*/
export function toAppHashUrl(hashHref: string, currentHref: string = window.location.href): string {
const hash = hashHref.startsWith("#") ? hashHref : `#${hashHref}`;
return `${currentHref.split("#")[0]}${hash}`;
}