|
@@ -213,26 +213,98 @@ func (this *RoleAPIController) EditPurviewInitData() {
|
213
|
213
|
|
214
|
214
|
role, _ := service.GetRoleByRoleID(roleId)
|
215
|
215
|
|
216
|
|
- purviews_xt, getPurviewsErr := service.GetAllGeneralPurviewVMsProcessed(3)
|
|
216
|
+ //purviews_xt, getPurviewsErr := service.GetAllGeneralPurviewVMsProcessed(3)
|
217
|
217
|
purviews_scrm, getPurviewsErr := service.GetAllGeneralPurviewVMsProcessed(6)
|
218
|
218
|
purviews_cdm, getPurviewsErr := service.GetAllGeneralPurviewVMsProcessed(4)
|
219
|
219
|
purviews_mall, getPurviewsErr := service.GetAllGeneralPurviewVMsProcessed(7)
|
|
220
|
+ purviews_ky_mall, getPurviewsErr := service.GetAllGeneralPurviewVMsProcessed(8)
|
|
221
|
+
|
|
222
|
+ //purviews_func/**/, getPurviewsErr := service.GetAllFuncPurview()
|
|
223
|
+
|
|
224
|
+ //门诊
|
|
225
|
+ outpatientRegistration, _ := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/manage")
|
|
226
|
+ //电子病历
|
|
227
|
+ ele, _ := service.GetOtherAllGeneralPurviewVMsProcessed("/patinets/ele")
|
|
228
|
+ //透析管理
|
|
229
|
+ dialysis, _ := service.GetOtherAllGeneralPurviewVMsProcessed("/dialysis/manage")
|
|
230
|
+ //库房管理
|
|
231
|
+ stock, _ := service.GetOtherAllGeneralPurviewVMsProcessed("/stock/manage")
|
|
232
|
+ //配置管理
|
|
233
|
+ config, _ := service.GetOtherAllGeneralPurviewVMsProcessed("/config/manage")
|
|
234
|
+
|
|
235
|
+ //sub_outpatientRegistration,_ := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/index")
|
|
236
|
+
|
|
237
|
+ //GetNewAllPurview("/outpatientRegistration/index")
|
|
238
|
+
|
|
239
|
+ //ele,_ := service.GetOtherNewAllPurview("/patinets/ele")
|
|
240
|
+ //dialysis,_ := service.GetOtherNewAllPurview("/dialysis/manage")
|
|
241
|
+ //stock,_ := service.GetOtherNewAllPurview("/stock/manage")
|
|
242
|
+ //config,_ := service.GetOtherNewAllPurview("/config/manage")
|
|
243
|
+ //outpatientRegistration,_ := service.GetOtherNewAllPurview("/outpatientRegistration/manage")
|
|
244
|
+
|
|
245
|
+ //
|
|
246
|
+ //for _, item := range dialysis {
|
|
247
|
+ // if item.Name == "透析记录" {
|
|
248
|
+ // item.Childs = purviews_func
|
|
249
|
+ // }
|
|
250
|
+ //}
|
|
251
|
+ //
|
|
252
|
+ //for _, item := range outpatientRegistration {
|
|
253
|
+ // if item.Name == "门诊挂号" {
|
|
254
|
+ // fmt.Println("111111")
|
|
255
|
+ // item.Childs = purviews_func
|
|
256
|
+ //
|
|
257
|
+ // }
|
|
258
|
+ //}
|
220
|
259
|
|
221
|
|
- purviews_func, getPurviewsErr := service.GetAllGeneralFuncPurviewVMsProcessed()
|
222
|
|
- for _, item := range purviews_xt {
|
223
|
|
- for _, childItem := range item.Childs {
|
224
|
|
- if childItem.Name == "透析记录" {
|
225
|
|
- childItem.Childs = purviews_func
|
226
|
|
- }
|
227
|
|
- }
|
|
260
|
+ purviews := []*service.PurviewTreeViewModel{}
|
|
261
|
+
|
|
262
|
+ menzhen := &service.PurviewTreeViewModel{
|
|
263
|
+ ID: 0,
|
|
264
|
+ PID: 0,
|
|
265
|
+ Name: "门诊管理",
|
|
266
|
+ Number: 3,
|
|
267
|
+ Childs: outpatientRegistration,
|
228
|
268
|
}
|
229
|
|
- scrm := &service.PurviewTreeViewModel{
|
|
269
|
+ purviews = append(purviews, menzhen)
|
|
270
|
+
|
|
271
|
+ //purviews =
|
|
272
|
+
|
|
273
|
+ dianzi := &service.PurviewTreeViewModel{
|
230
|
274
|
ID: 0,
|
231
|
275
|
PID: 0,
|
232
|
|
- Name: "SCRM",
|
|
276
|
+ Name: "电子病历",
|
233
|
277
|
Number: 3,
|
234
|
|
- Childs: purviews_scrm,
|
|
278
|
+ Childs: ele,
|
235
|
279
|
}
|
|
280
|
+ purviews = append(purviews, dianzi)
|
|
281
|
+
|
|
282
|
+ touxi := &service.PurviewTreeViewModel{
|
|
283
|
+ ID: 0,
|
|
284
|
+ PID: 0,
|
|
285
|
+ Name: "透析管理",
|
|
286
|
+ Number: 3,
|
|
287
|
+ Childs: dialysis,
|
|
288
|
+ }
|
|
289
|
+ purviews = append(purviews, touxi)
|
|
290
|
+
|
|
291
|
+ kufang := &service.PurviewTreeViewModel{
|
|
292
|
+ ID: 0,
|
|
293
|
+ PID: 0,
|
|
294
|
+ Name: "库房管理",
|
|
295
|
+ Number: 3,
|
|
296
|
+ Childs: stock,
|
|
297
|
+ }
|
|
298
|
+ purviews = append(purviews, kufang)
|
|
299
|
+
|
|
300
|
+ ky_mall := &service.PurviewTreeViewModel{
|
|
301
|
+ ID: 0,
|
|
302
|
+ PID: 0,
|
|
303
|
+ Name: "酷医商城",
|
|
304
|
+ Number: 3,
|
|
305
|
+ Childs: purviews_ky_mall,
|
|
306
|
+ }
|
|
307
|
+ purviews = append(purviews, ky_mall)
|
236
|
308
|
|
237
|
309
|
cdm := &service.PurviewTreeViewModel{
|
238
|
310
|
ID: 0,
|
|
@@ -242,11 +314,36 @@ func (this *RoleAPIController) EditPurviewInitData() {
|
242
|
314
|
Childs: purviews_cdm,
|
243
|
315
|
}
|
244
|
316
|
|
245
|
|
- purviews_xt = append(purviews_xt, scrm)
|
246
|
|
- purviews_xt = append(purviews_xt, cdm)
|
247
|
|
- purviews_xt = append(purviews_xt, purviews_mall...)
|
|
317
|
+ purviews = append(purviews, cdm)
|
|
318
|
+
|
|
319
|
+ scrm := &service.PurviewTreeViewModel{
|
|
320
|
+ ID: 0,
|
|
321
|
+ PID: 0,
|
|
322
|
+ Name: "营销管理",
|
|
323
|
+ Number: 3,
|
|
324
|
+ Childs: purviews_scrm,
|
|
325
|
+ }
|
|
326
|
+
|
|
327
|
+ purviews = append(purviews, scrm)
|
|
328
|
+
|
|
329
|
+ mall := &service.PurviewTreeViewModel{
|
|
330
|
+ ID: 0,
|
|
331
|
+ PID: 0,
|
|
332
|
+ Name: "分销商城",
|
|
333
|
+ Number: 3,
|
|
334
|
+ Childs: purviews_mall,
|
|
335
|
+ }
|
248
|
336
|
|
249
|
|
- //purviews_xt = append(purviews_xt,purviews_cdm...)
|
|
337
|
+ purviews = append(purviews, mall)
|
|
338
|
+
|
|
339
|
+ peizhi := &service.PurviewTreeViewModel{
|
|
340
|
+ ID: 0,
|
|
341
|
+ PID: 0,
|
|
342
|
+ Name: "配置管理",
|
|
343
|
+ Number: 3,
|
|
344
|
+ Childs: config,
|
|
345
|
+ }
|
|
346
|
+ purviews = append(purviews, peizhi)
|
250
|
347
|
|
251
|
348
|
if getPurviewsErr != nil {
|
252
|
349
|
//beego.Error("获取所有权限时出错:", getPurviewsErr)
|
|
@@ -282,7 +379,7 @@ func (this *RoleAPIController) EditPurviewInitData() {
|
282
|
379
|
}
|
283
|
380
|
|
284
|
381
|
this.ServeSuccessJSON(map[string]interface{}{
|
285
|
|
- "purviews": purviews_xt,
|
|
382
|
+ "purviews": purviews,
|
286
|
383
|
"role": role,
|
287
|
384
|
"role_purview_ids": rolePurviewIdStr + "," + roleFuncPurview.PurviewIds,
|
288
|
385
|
})
|