forked from nsjcy/frontEnd/nsjcy

Mr Ke
2020-05-27 0ec802e93557b2b1422ddbd68aafa994fa68f455
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
import home from '../asset/icons/home.png';
import homeCheck from '../asset/icons/homeCheck.png';
import active from '../asset/icons/active.png';
import activeCheck from '../asset/icons/activeCheck.png';
import msgManage from '../asset/icons/msgManage.png';
import msgCheck from '../asset/icons/msgCheck.png';
import infoManage from '../asset/icons/infoManage.png';
import infoCheck from '../asset/icons/infoCheck.png';
import statistics from '../asset/icons/statistical.png';
import statisticsCheck from '../asset/icons/statisticalCheck.png';
import busManage from '../asset/icons/busManage.png';
import busCheck from '../asset/icons/busCheck.png';
import userCenter from '../asset/icons/userCenter.png';
import userCenterCheck from '../asset/icons/userCenterCheck.png';
import sys from '../asset/icons/sys.png';
import sysCheck from '../asset/icons/sysCheck.png';
import video from '../asset/icons/vedio.png';
 
 
const full = [{
  id: 'backIndex',
  name: '后台首页',
  icon: home,
  iconCheck: homeCheck,
  path: '/'
}, {
  id: 'busManage',
  name: '业务管理',
  icon: busManage,
  iconCheck: busCheck,
  children: [{
    id: 'onlineAppeal',
    name: '在线申诉',
    path: '/busManage/onlineAppeal'
  }, {
    id: 'stateCompen',
    name: '国家赔偿',
    path: '/busManage/stateCompen'
  }, {
    id: 'appointment',
    name: '信访预约',
    path: '/busManage/appointment'
  }, {
    id: 'judicialRelief',
    name: '司法救助',
    path: '/busManage/judicialRelief'
  }, {
    id: 'caseProgress',
    name: '案件进度',
    path: '/busManage/caseProgress'
  }]
}, {
  id: 'complaintSugges',
  name: '投诉建议',
  icon: home,
  iconCheck: homeCheck,
  children: [{
    id: 'onlineAdvice',
    name: '在线建议',
    path: '/complaintSugges/onlineAdvice'
  }, {
    id: 'onlineComplaints',
    name: '在线投诉',
    path: '/complaintSugges/onlineComplaints'
  }, {
    id: 'onlineLetter',
    name: '在线信访',
    path: '/complaintSugges/onlineLetter'
  }, {
    id: 'another',
    name: '其他',
    path: '/complaintSugges/another'
  }]
}, {
  id: 'snapshot',
  name: '公益随手拍',
  icon: active,
  iconCheck: activeCheck,
  path: '/snapshot'
}, {
  id: 'criminalExecution',
  name: '刑执监督管理',
  icon: infoManage,
  iconCheck: infoCheck,
  path: '/criminalExecution'
},{
  id: 'crimeCrackdown',
  name: '扫黑除恶',
  icon: active,
  iconCheck: activeCheck,
  path: '/sweeping'
}, {
  id: 'activeManage',
  name: '法治活动',
  icon: active,
  iconCheck: activeCheck,
  path: '/activeManage'
},
 
{
  id: 'childManage',
  name: '智慧未检',
  icon: home,
  iconCheck: homeCheck,
  children: [{
    id: 'careList',
    name: '社会观护管理',
    path: '/careList'
  }, {
    id: 'underAgeList',
    name: '社会组织维护',
    path: '/underAgeList'
  }, {
    id: 'lawSubscribe',
    name: '普法预约',
    path: '/lawSubscribe'
  }, {
    id: 'topImage',
    name: '顶部图片设置',
    path: '/topImage'
  }]
},
 
{
  id: 'keyWord',
  name: '关键词维护',
  icon: home,
  iconCheck: activeCheck,
  children: [{
    id: 'dxWords',
    name: '典型案例关键词',
    path: '/dxWords'
  }]
},
 
 
{
  id: 'noInspectionReportList',
  name: '举报管理',
  icon: active,
  iconCheck: activeCheck,
  path: '/noInspectionReportList'
},
{
  id: 'questionnaire',
  name: '调查问卷管理',
  icon: msgManage,
  iconCheck: activeCheck,
  children: [{
    id: 'newlyList',
    name: '问卷管理',
    path: '/questionnaire/newlyList'
  }, {
    id: 'newly',
    name: '新建问卷',
    path: '/questionnaire/newly/new'
  }]
},
{
  id: 'entry',
  name: '入职查询',
  icon: msgManage,
  iconCheck: activeCheck,
  children: [{
    id: 'applyFor',
    name: '入职申请',
    path: '/entry/applyFor'
  }, {
    id: 'examine',
    name: '检察院审核',
    path: '/entry/examine'
  }, {
    id: 'policeSecurity',
    name: '公安审核',
    path: '/entry/policeSecurity'
  }]
},
{
  id: 'msgManage',
  name: '消息管理',
  icon: msgManage,
  iconCheck: msgCheck,
  children: [{
    id: 'deputy',
    name: '人大代表联络站',
    path: '/msgList/deputy'
  }, {
    id: 'committee',
    name: '政协委员联络站',
    path: '/msgList/committee'
  }, {
    id: 'peopleSupervise',
    name: '人民监督员联络站',
    path: '/msgList/peopleSupervise'
  }, {
    id: 'authProcurator',
    name: '特约检察员联络站',
    path: '/msgList/authProcurator'
  }, {
    id: 'online',
    name: '在线咨询(个人)',
    path: '/msgList/online'
  }, {
    id: 'onlineCompany',
    name: '在线咨询(企业)',
    path: '/msgList/onlineCompany'
  }]
}, {
  id: 'infoManage',
  name: '信息维护',
  icon: infoManage,
  iconCheck: infoCheck,
  children: [{
    id: 'knowledgeBase',
    name: '知识库',
    path: '/knowledgeBase'
  }, {
    id: 'leadership',
    name: '监督人员',
    path: '/supPerson'
  }, {
    id: 'company',
    name: '自贸区企业',
    path: '/company'
  }, {
    id: 'articlePublish',
    name: '信息公布',
    path: '/articlePublish'
  }, {
    id: 'typeManage',
    name: '信息分类',
    path: '/typeManage'
  }]
}, {
  id: 'statistics',
  name: '统计分析',
  icon: statistics,
  iconCheck: statisticsCheck,
  path: '/statistical'
}, {
  id: 'userCenter',
  name: '用户审核',
  icon: userCenter,
  iconCheck: userCenterCheck,
  path: '/userCenter'
}, {
  id: 'videoContant',
  name: '视频聊天平台',
  icon: video,
  iconCheck: video,
  path: 'https://xnwj.gznsjc.gov.cn/nsjc-charge/web/index.html#/'
}
  , {
  id: 'insideUser',
  name: '内部用户管理',
  icon: userCenter,
  iconCheck: userCenterCheck,
  path: '/insideUser'
}
  , {
  id: 'proManage',
  name: '系统管理',
  icon: sys,
  iconCheck: sysCheck,
  path: 'http://nsjcy.hugeinfo.com.cn/nsjc-charge/base/home.html'
}];
 
 
export default function (ids) {
  const reduce = tl => tl.reduce((list, { id, children, ...other }) => {
    if (children) {
      children = reduce(children);
      if (children.length) {
        list.push({ ...other, children, count: (ids.find(({ name }) => name === id) || { count: 0 }).count });
      }
    } else {
      const found = ids.find(({ name }) => name === id);
      if (found) {
        other.count = found.count;
        list.push(other);
      }
    }
    return list;
  }, []);
  return reduce(full);
};