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