|
@@ -347,6 +347,7 @@ func (this *PredictEdbClassifyController) Delete() {
|
|
|
resp = data_manage.AddEdbInfoResp{
|
|
|
EdbInfoId: nextItem.EdbInfoId,
|
|
|
UniqueCode: nextItem.UniqueCode,
|
|
|
+ ClassifyId: nextItem.ClassifyId,
|
|
|
}
|
|
|
}
|
|
|
br.Ret = 200
|
|
@@ -554,20 +555,6 @@ func (this *PredictEdbClassifyController) ListV2() {
|
|
|
edbInfoMap[v.ClassifyId] = append(edbInfoMap[v.ClassifyId], v)
|
|
|
}
|
|
|
}
|
|
|
- //rootChildMap := make(map[int][]*data_manage.EdbClassifyItems)
|
|
|
-
|
|
|
- //for _, v := range rootList {
|
|
|
- // button := data.GetPredictEdbClassifyOpButton(this.SysUser, v.SysUserId)
|
|
|
- // v.Button = button
|
|
|
- //
|
|
|
- // rootChildMap[v.ParentId] = append(rootChildMap[v.ParentId], v)
|
|
|
- // if existItems, ok := edbInfoMap[v.ClassifyId]; ok {
|
|
|
- // v.Children = existItems
|
|
|
- // } else {
|
|
|
- // items := make([]*data_manage.EdbClassifyItems, 0)
|
|
|
- // v.Children = items
|
|
|
- // }
|
|
|
- //}
|
|
|
rootTwoList, err := data_manage.GetEdbClassifyByParentIdTwo( 1)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取失败"
|
|
@@ -603,12 +590,27 @@ func (this *PredictEdbClassifyController) ListV2() {
|
|
|
if existItems, ok := rootTwoMap[v.ClassifyId]; ok {
|
|
|
v.Children = existItems
|
|
|
for _, item := range existItems {
|
|
|
- button := data.GetPredictEdbOpButton(this.SysUser, v.SysUserId)
|
|
|
- button.AddButton = false //不管有没有权限,指标都是没有添加按钮的
|
|
|
item.Button = button
|
|
|
|
|
|
if existItems, ok := rootTwoChildMap[item.ClassifyId]; ok {
|
|
|
item.Children = existItems
|
|
|
+ for _, existItem := range existItems {
|
|
|
+ if _, ok := noPermissionEdbInfoIdMap[existItem.EdbInfoId]; ok {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ button := data.GetPredictEdbOpButton(this.SysUser, v.SysUserId)
|
|
|
+ button.AddButton = false //不管有没有权限,指标都是没有添加按钮的
|
|
|
+ button.OpButton = false
|
|
|
+ button.DeleteButton = false
|
|
|
+ existItem.Button = button
|
|
|
+ if isOnlyMe {
|
|
|
+ if existItem.SysUserId == this.SysUser.AdminId {
|
|
|
+ edbInfoMap[existItem.ClassifyId] = append(edbInfoMap[v.ClassifyId], v)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ edbInfoMap[v.ClassifyId] = append(edbInfoMap[v.ClassifyId], v)
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
items := make([]*data_manage.EdbClassifyItems, 0)
|
|
|
item.Children = items
|