1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| import { WEB_BASE_URL } from "../../api/request";
| import { useAuth } from "../../stores/auth";
|
| export interface ReportEntryConfig {
| title: string;
| subtitle: string;
| path: string;
| tags: string[];
| }
|
| export const reportEntries: Record<string, ReportEntryConfig> = {
| jimuReport: {
| title: "报表设计器",
| subtitle: "移动端用于快速进入 Web 报表设计器,复杂设计建议在 PC 端完成",
| path: "/jmreport/list",
| tags: ["报表", "模板", "数据集"],
| },
| jimuBi: {
| title: "仪表盘设计器",
| subtitle: "进入 Web 仪表盘设计器维护图表、组件和数据源",
| path: "/jmreport/list?jimuType=drag",
| tags: ["仪表盘", "图表", "设计"],
| },
| goView: {
| title: "大屏设计器",
| subtitle: "进入 Web 大屏设计器维护可视化大屏页面",
| path: "/go-view",
| tags: ["大屏", "可视化", "发布"],
| },
| };
|
| export function buildReportUrl(config: ReportEntryConfig) {
| const { state } = useAuth();
| const separator = config.path.includes("?") ? "&" : "?";
| const token = encodeURIComponent(state.refreshToken || state.accessToken || "");
| return `${WEB_BASE_URL}${config.path}${separator}token=${token}`;
| }
|
|