指标库新增web页面树形接口
This commit is contained in:
parent
ce016b07ff
commit
83d7a7bdee
@ -56,14 +56,6 @@ public class IndexLibController extends DefaultBaseController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "修改指标状态", notes = "修改指标状态接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "indexLibId", value = "ID", paramType = "path"),
|
||||
|
@ -9,6 +9,8 @@ package com.tenlion.twoduty.pojo.dtos.indexlib;
|
||||
*/
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class IndexLibZTreeDTO {
|
||||
|
||||
@ -22,6 +24,8 @@ public class IndexLibZTreeDTO {
|
||||
private String name;
|
||||
@ApiModelProperty(name = "isParent",value = "是否父节点")
|
||||
private Boolean isParent;
|
||||
@ApiModelProperty(name = "childrens",value = "子集节点列表")
|
||||
private List<IndexLibZTreeDTO> childrens;
|
||||
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
@ -61,4 +65,11 @@ public class IndexLibZTreeDTO {
|
||||
}
|
||||
|
||||
|
||||
public List<IndexLibZTreeDTO> getChildrens() {
|
||||
return childrens;
|
||||
}
|
||||
|
||||
public void setChildrens(List<IndexLibZTreeDTO> childrens) {
|
||||
this.childrens = childrens;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import java.util.Map;
|
||||
public interface IIndexLibService {
|
||||
|
||||
/**
|
||||
* web页面树形列表
|
||||
* web页面树形列表(递归处理)
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
|
@ -38,13 +38,16 @@ public class IndexLibServiceImpl extends DefaultBaseService implements IIndexLib
|
||||
List<IndexLibZTreeDTO> list = indexLibDao.listZTreeWeb(params);
|
||||
for (IndexLibZTreeDTO indexLibZTreeDTO : list) {
|
||||
Map<String,Object> data = new HashMap<>();
|
||||
data.put("parentId",indexLibZTreeDTO.getId());
|
||||
Integer count = countByParentIdWeb(data);
|
||||
if (count > 0){
|
||||
indexLibZTreeDTO.setIsParent(true);
|
||||
}else{
|
||||
indexLibZTreeDTO.setIsParent(false);
|
||||
}
|
||||
data.put("indexLibParentId",indexLibZTreeDTO.getId());
|
||||
indexLibZTreeDTO.setChildrens(this.listZTreeWeb(data));
|
||||
// Map<String,Object> data = new HashMap<>();
|
||||
//// data.put("parentId",indexLibZTreeDTO.getId());
|
||||
//// Integer count = countByParentIdWeb(data);
|
||||
//// if (count > 0){
|
||||
//// indexLibZTreeDTO.setIsParent(true);
|
||||
//// }else{
|
||||
//// indexLibZTreeDTO.setIsParent(false);
|
||||
//// }
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@ -365,16 +365,16 @@
|
||||
},
|
||||
// 获取左侧菜单
|
||||
getNav: function () {
|
||||
var self = this
|
||||
var self = this;
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/indexlib/listztreeweb', []), {}, null, function(code, data) {
|
||||
console.log(data)
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
loadLayerIndex = dialog.msg('加载中', {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
dialog.close(loadLayerIndex)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user