Commit 6e345392 by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into master-dc

parents b6a89479 190897f0
...@@ -364,7 +364,6 @@ public class ServiceHGWD001D extends TreeService { ...@@ -364,7 +364,6 @@ public class ServiceHGWD001D extends TreeService {
List<HGWD003> dbWd003s = HGWDTools.HgWd003.list(fileIds); List<HGWD003> dbWd003s = HGWDTools.HgWd003.list(fileIds);
for (HGWD001 dbWd001 : dbWd001s) { for (HGWD001 dbWd001 : dbWd001s) {
Map leafMap = buildLeaf(parentId, dbWd001.getFileId(), dbWd001.getFileName(), HgWdConstant.LeafType.C); Map leafMap = buildLeaf(parentId, dbWd001.getFileId(), dbWd001.getFileName(), HgWdConstant.LeafType.C);
int count = getChildCount(dbWd001.getFileId(), isManager, isSourceAuth, pageCode); int count = getChildCount(dbWd001.getFileId(), isManager, isSourceAuth, pageCode);
leafMap.put("projCode", dbWd001.getProjCode()); leafMap.put("projCode", dbWd001.getProjCode());
leafMap.put("projName", dbWd001.getProjName()); leafMap.put("projName", dbWd001.getProjName());
...@@ -372,8 +371,8 @@ public class ServiceHGWD001D extends TreeService { ...@@ -372,8 +371,8 @@ public class ServiceHGWD001D extends TreeService {
leafMap.put("type", dbWd001.getFileType()); leafMap.put("type", dbWd001.getFileType());
leafMap.put("leafLevel", dbWd001.getLeafLevel()); leafMap.put("leafLevel", dbWd001.getLeafLevel());
leafMap.put("count", count); leafMap.put("count", count);
leafMap.put("filePath",dbWd001.getFilePath()); leafMap.put("filePath", dbWd001.getFilePath());
if ("HGWD002".equals(pageCode)&& count == 0){ if ("HGWD002".equals(pageCode) && count == 0) {
continue; continue;
} }
if (!isManager && isSourceAuth) { if (!isManager && isSourceAuth) {
...@@ -435,9 +434,10 @@ public class ServiceHGWD001D extends TreeService { ...@@ -435,9 +434,10 @@ public class ServiceHGWD001D extends TreeService {
/** /**
* 获取子级节点数量 * 获取子级节点数量
* @param fileId 目录ID * @param fileId 目录ID
* @param isSourceAuth true:需要权限
* @return 节点数量 * @return 节点数量
*/ */
public int getChildCount(String fileId, boolean isManager, boolean isSourceAuth,String pageCode) { public int getChildCount(String fileId, boolean isManager, boolean isSourceAuth, String pageCode) {
List<HGWD001> hgwd001List = HgWdUtils.HgWd001.queryChildren(fileId, isManager, isSourceAuth); //查询子级目录 List<HGWD001> hgwd001List = HgWdUtils.HgWd001.queryChildren(fileId, isManager, isSourceAuth); //查询子级目录
List<String> childIds = Optional.ofNullable(hgwd001List).orElse(new ArrayList<>()).stream() List<String> childIds = Optional.ofNullable(hgwd001List).orElse(new ArrayList<>()).stream()
.map(HGWD001::getFileId).collect(Collectors.toList()); .map(HGWD001::getFileId).collect(Collectors.toList());
......
...@@ -93,13 +93,13 @@ public class HgWdUtils { ...@@ -93,13 +93,13 @@ public class HgWdUtils {
* 查询子节点 * 查询子节点
* *
* @param parentId * @param parentId
* @param isManager * @param isManager true:管理员
* @param isSpare * @param isSourceAuth true:需要权限
* @return * @return
*/ */
public static List<HGWD001> queryChildren(String parentId, boolean isManager, boolean isSpare) { public static List<HGWD001> queryChildren(String parentId, boolean isManager, boolean isSourceAuth) {
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点 // 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
if (isManager || isSpare) { if (isManager || !isSourceAuth) {
return HGWDTools.HgWd001.queryChildren(parentId); return HGWDTools.HgWd001.queryChildren(parentId);
} else { } else {
return HGWDTools.HgWd001.queryChildrenByUser(parentId); return HGWDTools.HgWd001.queryChildrenByUser(parentId);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
required="true"> required="true">
<EF:EFOptions blockId="account_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="account_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="tableCode" cname="页面名称" blockId="result" row="0" colWidth="3" filter="contains" <EF:EFSelect ename="tableCode" cname="页面名称" blockId="inqu_status" row="0" colWidth="3" filter="contains"
required="true" optionLabel="全部" template="#=valueField#-#=textField#" required="true" optionLabel="全部" template="#=valueField#-#=textField#"
valueTemplate="#=valueField#-#=textField#"> valueTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="app.pz.dynamicTable"/> <EF:EFCodeOption codeName="app.pz.dynamicTable"/>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<EF:EFPage title="页面字段定义"> <EF:EFPage title="页面字段定义">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect ename="tableCode" cname="页面名称" blockId="result" row="0" colWidth="3" filter="contains" <EF:EFSelect ename="tableCode" cname="页面名称" blockId="inqu_status" row="0" colWidth="3" filter="contains"
required="true" optionLabel="全部" template="#=valueField#-#=textField#" required="true" optionLabel="全部" template="#=valueField#-#=textField#"
valueTemplate="#=valueField#-#=textField#"> valueTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="app.pz.dynamicTable"/> <EF:EFCodeOption codeName="app.pz.dynamicTable"/>
......
...@@ -739,9 +739,9 @@ function loadChange(grid,e,field) { ...@@ -739,9 +739,9 @@ function loadChange(grid,e,field) {
* @param value * @param value
* @returns {boolean} * @returns {boolean}
*/ */
function isBlank(data) { function isBlank(value) {
return data == null || data === undefined || data === 'null' || $.trim(data) === '' || return value == null || value === 'null' || $.trim(value) === ''
data === 'undefined' || data === 'unknown'; || value === 'undefined' || value === 'unknown';
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment