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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
| const _MENU = [
| {
| icon: 'solar:monitor-camera-line-duotone',
| name: '监测监控',
| children: [
| {
| path: '/index/monitor/data-dashboard',
| icon: 'solar:window-frame-line-duotone',
| name: '污染态势',
| },
| {
| path: '/index/monitor/data-exception',
| icon: 'solar:siren-line-duotone',
| name: '监测预警',
| },
| {
| icon: 'solar:structure-line-duotone',
| name: '数据管理',
| children: [
| {
| path: '/index/monitor/data-analysis-all',
| icon: 'solar:presentation-graph-line-duotone',
| name: '数据分析',
| },
| {
| path: '/index/monitor/data-history',
| icon: 'solar:graph-new-line-duotone',
| name: '历史数据',
| },
| ],
| },
|
| // {
| // icon: 'solar:presentation-graph-line-duotone',
| // name: '数据分析',
| // children: [
| // {
| // path: '/index/monitor/data-analysis-all',
| // icon: 'solar:structure-line-duotone',
| // name: '全要素分析',
| // },
| // {
| // icon: 'solar:round-graph-line-duotone',
| // name: '分要素分析',
| // children: [
| // {
| // path: '/index/monitor/data-analysis-concentration',
| // icon: 'solar:graph-new-line-duotone',
| // name: '油烟浓度',
| // },
| // {
| // path: '/index/monitor/data-analysis-online-rate',
| // icon: 'solar:graph-new-line-duotone',
| // name: '在线率',
| // },
| // {
| // path: '/index/monitor/data-analysis-open-rate',
| // icon: 'solar:graph-new-line-duotone',
| // name: '开启率',
| // },
| // {
| // path: '/index/monitor/data-analysis-over-standard-rate',
| // icon: 'solar:graph-new-line-duotone',
| // name: '超标率',
| // },
| // ],
| // },
| // ],
| // },
| ],
| },
| {
| icon: 'solar:people-nearby-line-duotone',
| name: '监管巡查',
| children: [
| {
| path: '/index/inspection/task-manage',
| icon: 'solar:file-text-line-duotone',
| name: '任务管理',
| },
| {
| path: '/index/inspection/scene-info',
| icon: 'solar:shop-2-line-duotone',
| name: '店铺管理',
| },
| {
| path: '/index/inspection/pro-check',
| icon: 'solar:checklist-minimalistic-line-duotone',
| name: '问题整改',
| },
| ],
| },
| {
| icon: 'solar:widget-5-line-duotone',
| name: '环信码',
| children: [
| {
| path: '/index/analysis/auto-evalution',
| icon: 'solar:pie-chart-3-line-duotone',
| name: '自动评估',
| },
| {
| path: '/index/analysis/huanxincode-manage',
| icon: 'solar:archive-down-minimlistic-line-duotone',
| name: '环信码管理',
| },
| {
| path: '/index/inspection/report-manage',
| icon: 'solar:folder-favourite-bookmark-line-duotone',
| name: '评估报告',
| },
| // {
| // path: '/index/analysis/data-product',
| // icon: 'solar:document-add-line-duotone',
| // name: '数据产品',
| // },
| ],
| },
| {
| icon: 'solar:settings-minimalistic-line-duotone',
| name: '系统管理',
| path: '/index/system/system-manage',
| },
| ]
|
| const MENU = () => {
| // // 深拷贝原始菜单数组,避免修改原数据
| // const menuCopy = JSON.parse(JSON.stringify(_MENU))
|
| // // 递归处理菜单项
| // const processMenuItem = (item) => {
| // // 如果当前项有children属性
| // if (item.children && Array.isArray(item.children)) {
| // // 根据环境过滤children数组
| // item.children = item.children.filter((child) => {
| // // 递归处理子项的children
| // processMenuItem(child)
|
| // // 开发环境保留所有项(包括debug: true的),生产环境过滤掉debug: true的项
| // // 注意:只有设置了debug: true的项才需要在非开发环境过滤
| // // 如果没有debug属性,应该保留
| // return import.meta.env.DEV || child.debug !== true
| // })
| // }
| // return item
| // }
|
| // // 处理整个菜单数组
| // return menuCopy.map(processMenuItem)
|
| return _MENU
| }
|
| export { MENU }
|
|