data.ts
4.71 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Static reference data — sidebar tree, mega-nav, dropdowns. Not backed by backend.
// Copied from prototype/src/data.jsx. USER_TYPES and LANGUAGES trimmed to match
// backend enum constraints (UserServiceImpl.USER_TYPES / LANGUAGES).
export interface NavNode {
id: string;
label: string;
icon?: string;
leaf?: boolean;
badge?: string;
children?: NavNode[];
screen?: string;
}
export const COMPANIES = [
{ id: "std", name: "标准版 (Standard Edition) / 8s" },
{ id: "ent", name: "企业版 (Enterprise Edition) / 8s" },
{ id: "trial", name: "试用版 (Trial Edition) / 30d" },
];
// Backend USER_TYPES enum: 普通用户 | 超级管理员
export const USER_TYPES = ["超级管理员", "普通用户"];
// Backend LANGUAGES enum: zh | en | zh-TW. Display strings for the form.
export const LANGUAGE_OPTIONS: { value: string; label: string }[] = [
{ value: "zh", label: "中文" },
{ value: "en", label: "英文" },
{ value: "zh-TW", label: "繁体" },
];
// Backend list-API field names (Chinese — see UserServiceImpl.FIELD_MAP)
export const USER_LIST_FIELDS: { value: string; label: string }[] = [
{ value: "员工名", label: "员工名" },
{ value: "用户名", label: "用户名" },
{ value: "用户号", label: "用户号" },
{ value: "部门", label: "部门" },
];
export const USER_LIST_MATCHES: { value: string; label: string }[] = [
{ value: "包含", label: "包含" },
{ value: "不包含", label: "不包含" },
{ value: "等于", label: "等于" },
];
export const NAV_TREE: NavNode[] = [
{ id: "home", label: "首页", icon: "home", leaf: true },
{
id: "kpi",
label: "KPI 流程作业单",
icon: "doc",
children: [
{
id: "quote",
label: "估价管理流程",
children: [
{ id: "quote-01", label: "01/04 【新增】新报价单", leaf: true, badge: "估价" },
{ id: "quote-02", label: "02/04 审核报价单->客户确认...", leaf: true },
{ id: "quote-03", label: "03/04 客户确认->二次确认", leaf: true },
{ id: "quote-04", label: "04/04 报价单->销售订单", leaf: true },
],
},
{ id: "order", label: "订单生产流程" },
{ id: "panel", label: "自动拼版流程" },
{ id: "ship", label: "销售送货流程" },
{ id: "purch", label: "物料采购流程" },
],
},
{ id: "crm", label: "CRM 管理", icon: "folder" },
{ id: "plm", label: "PLM 管理", icon: "folder" },
{ id: "prod", label: "产品管理", icon: "folder" },
{ id: "sales", label: "销售管理", icon: "folder" },
{ id: "mfg", label: "生产管理", icon: "folder" },
{
id: "sys",
label: "系统管理",
icon: "settings",
children: [
{ id: "userlist", label: "用户列表", leaf: true, screen: "userlist" },
{ id: "module", label: "系统模块配置", leaf: true, screen: "module" },
{ id: "roles", label: "角色管理", leaf: true },
{ id: "menucfg", label: "菜单配置", leaf: true },
{ id: "log", label: "操作日志", leaf: true },
],
},
];
export const MEGA_NAV = [
{ id: "sales-mgmt", label: "销售管理" },
{ id: "dcs", label: "DCS 系统" },
{ id: "prod-mgmt", label: "产品管理" },
{ id: "prod-ops", label: "生产运营" },
{ id: "prod-exec", label: "生产执行" },
{ id: "mold", label: "模具管理" },
{ id: "purch", label: "采购管理" },
{ id: "matwh", label: "材料库存" },
{ id: "fgwh", label: "成品库存" },
{ id: "outsrc", label: "外协管理" },
{ id: "logistics", label: "物流管理" },
{ id: "qc", label: "质量管理" },
{ id: "fin", label: "财务管理" },
{ id: "equip", label: "设备管理" },
{ id: "hr", label: "人事行政" },
{ id: "oa", label: "OA 系统" },
{ id: "base", label: "基础设置" },
{ id: "sys", label: "系统设置", active: true },
];
export const MEGA_COLUMNS: Record<
string,
{ title: string; items: { label: string; screen?: string; featured?: boolean }[] }[]
> = {
sys: [
{
title: "用户管理",
items: [
{ label: "用户列表", screen: "userlist", featured: true },
{ label: "系统权限" },
{ label: "权限组" },
],
},
{
title: "系统模块",
items: [
{ label: "系统模块配置", screen: "module", featured: true },
{ label: "菜单配置" },
{ label: "模块字段配置" },
],
},
{
title: "系统参数",
items: [{ label: "系统参数" }, { label: "财务结准" }, { label: "系统常量配置" }],
},
{
title: "日志",
items: [{ label: "操作日志" }, { label: "MYSQL 监听器" }],
},
],
};
export const MODULE_DISPLAY_TYPES = ["手机端", "前端业务", "系统配置", "接口"];