修复问题
This commit is contained in:
parent
a81c4f0986
commit
0e90165e9f
@ -125,7 +125,7 @@ public interface IApiConsts {
|
|||||||
/**
|
/**
|
||||||
* 职位zTree
|
* 职位zTree
|
||||||
*/
|
*/
|
||||||
String LIST_ZTREE_POSITION = "%s/resource/role/listztreeposition";
|
String LIST_ZTREE_POSITION = "%s/resource/position/listztreeposition";
|
||||||
/**
|
/**
|
||||||
* 获取所有用户列表(通过上级区域ID)
|
* 获取所有用户列表(通过上级区域ID)
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +8,7 @@ import com.cm.common.exception.SearchException;
|
|||||||
import com.cm.common.plugin.oauth.service.position.IPositionService;
|
import com.cm.common.plugin.oauth.service.position.IPositionService;
|
||||||
import com.cm.common.result.ErrorResult;
|
import com.cm.common.result.ErrorResult;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -46,4 +47,19 @@ public class PositionController extends AbstractController {
|
|||||||
return positionService.listUserPosition(params);
|
return positionService.listUserPosition(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "zTree列表", notes = "zTree列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "上级ID", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listztreeposition")
|
||||||
|
public JSONArray listZTreePosition() throws SearchException {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
String positionParentId = "0";
|
||||||
|
if (!StringUtils.isBlank(params.get("id") == null ? null : params.get("id").toString())) {
|
||||||
|
positionParentId = params.get("id").toString();
|
||||||
|
}
|
||||||
|
return positionService.listZTreePosition(positionParentId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -213,9 +213,18 @@
|
|||||||
zTree.checkNode(item, false, true);
|
zTree.checkNode(item, false, true);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
var exist = false;
|
||||||
|
for(var j = 0, jItem; jItem = selectedNodes[j++];) {
|
||||||
|
if(item.id === jItem.id) {
|
||||||
|
exist = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!exist) {
|
||||||
selectedNodes.push(item);
|
selectedNodes.push(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// if(treeNode[selectTree.primaryKey] == '0') {
|
// if(treeNode[selectTree.primaryKey] == '0') {
|
||||||
// zTree.checkNode(treeNode, false, true);
|
// zTree.checkNode(treeNode, false, true);
|
||||||
// return;
|
// return;
|
||||||
|
Loading…
Reference in New Issue
Block a user