This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { Method } from "alova";
|
import { Method } from "alova";
|
||||||
import { alovaInstance } from "@/utils/alova/alova-iview";
|
import { alovaInstance } from "@/utils/alova/alova-iview";
|
||||||
|
import config from "@/assets/config/host.config";
|
||||||
import type {
|
import type {
|
||||||
ApplyVo,
|
ApplyVo,
|
||||||
FlowProgressVo,
|
FlowProgressVo,
|
||||||
@@ -139,9 +140,10 @@ class SvcFlowApi {
|
|||||||
list(siteCode: string) {
|
list(siteCode: string) {
|
||||||
return get<FlowSummary[]>(`${SVC}/flow/list`, { siteCode });
|
return get<FlowSummary[]>(`${SVC}/flow/list`, { siteCode });
|
||||||
}
|
}
|
||||||
/** 流程图地址(同源 <img src>/window.open;后端换免签 token 取图,前端不碰 flow-center 地址) */
|
/** 流程图地址(同源 <img src>/window.open;后端换免签 token 取图,前端不碰 flow-center 地址)。
|
||||||
|
* img/window.open 不走 alova,须显式带 serviceHost——/{ctx}/front/ 子路径部署下裸 /api 404。 */
|
||||||
diagramUrl(siteCode: string, flowGuid: string, mode = "dept") {
|
diagramUrl(siteCode: string, flowGuid: string, mode = "dept") {
|
||||||
return `${SVC}/flow/diagram.png?siteCode=${encodeURIComponent(siteCode)}`
|
return `${config.serviceHost}${SVC}/flow/diagram.png?siteCode=${encodeURIComponent(siteCode)}`
|
||||||
+ `&flowGuid=${encodeURIComponent(flowGuid)}&mode=${encodeURIComponent(mode)}`;
|
+ `&flowGuid=${encodeURIComponent(flowGuid)}&mode=${encodeURIComponent(mode)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,9 +161,9 @@ class ApplyApi {
|
|||||||
progress(id: number) {
|
progress(id: number) {
|
||||||
return get<FlowProgressVo>(`${APPLY}/${id}/progress`);
|
return get<FlowProgressVo>(`${APPLY}/${id}/progress`);
|
||||||
}
|
}
|
||||||
/** 流程图地址(同源图片;后端换免签 token 取图) */
|
/** 流程图地址(同源图片;后端换免签 token 取图;serviceHost 前缀原因同上) */
|
||||||
diagramUrl(id: number, mode = "dept") {
|
diagramUrl(id: number, mode = "dept") {
|
||||||
return `${APPLY}/${id}/diagram.png?mode=${encodeURIComponent(mode)}`;
|
return `${config.serviceHost}${APPLY}/${id}/diagram.png?mode=${encodeURIComponent(mode)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user