Commit 06ecfa50 by liuyang

2024-09-05 文件库新增展开节点

parent 7532a7f3
...@@ -21,10 +21,7 @@ import com.baosight.iplat4j.core.ei.EiInfo; ...@@ -21,10 +21,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -69,6 +66,7 @@ public class ServiceHGWD001E extends ServiceEPBase { ...@@ -69,6 +66,7 @@ public class ServiceHGWD001E extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.list("hggp.hgwd.fileType"); List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.list("hggp.hgwd.fileType");
List<HGWD001> hgwd001s = new ArrayList<>();
// 写入数据 // 写入数据
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGWD001 hgwd001 = new HGWD001(); HGWD001 hgwd001 = new HGWD001();
...@@ -79,7 +77,9 @@ public class ServiceHGWD001E extends ServiceEPBase { ...@@ -79,7 +77,9 @@ public class ServiceHGWD001E extends ServiceEPBase {
} else { } else {
this.modify(hgwd001,edcm01List); this.modify(hgwd001,edcm01List);
} }
hgwd001s.add(hgwd001);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(hgwd001s);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -64,7 +64,7 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -64,7 +64,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow =EiInfoUtils.getFirstRow(inInfo); Map queryRow =EiInfoUtils.getFirstRow(inInfo);
if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_FILE_ID).toString())){ if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_PARENT_ID).toString())){
inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099()); inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099());
} }
} catch (Throwable e) { } catch (Throwable e) {
......
...@@ -356,7 +356,7 @@ $(function () { ...@@ -356,7 +356,7 @@ $(function () {
$("[name = 'inqu_status-0-projCode']").val(data.projCode); $("[name = 'inqu_status-0-projCode']").val(data.projCode);
$("[name = 'inqu_status-0-companyCode']").val(data.companyCode); $("[name = 'inqu_status-0-companyCode']").val(data.companyCode);
$("[name = 'inqu_status-0-type']").val(data.type); $("[name = 'inqu_status-0-type']").val(data.type);
$("[name = 'inqu_status-0-fileId']").val(data.ename); /*$("[name = 'inqu_status-0-fileId']").val(data.ename);*/
$("[name = 'inqu_status-0-fileName']").val(data.text); $("[name = 'inqu_status-0-fileName']").val(data.text);
$("[name = 'inqu_status-0-leafLevel']").val(data.leafLevel==null?0:data.leafLevel); $("[name = 'inqu_status-0-leafLevel']").val(data.leafLevel==null?0:data.leafLevel);
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
...@@ -520,9 +520,27 @@ let query = function () { ...@@ -520,9 +520,27 @@ let query = function () {
/** /**
* 新增组织机构回调 * 新增组织机构回调
*/ */
let addCallback = function (parentId) { let addCallback = function (rows) {
// 回填父级ID // 回填父级ID
$("#inqu_status-0-orgParentId").val(parentId); //$("#inqu_status-0-orgParentId").val(parentId);
// 刷新树节点
const tree = $("#categoryTree").data("kendoTreeView");
var selectedNode = tree.select();
tree.append({ // append()selecttedNode
id: rows[0].fileId,
label: rows[0].fileId,
text: rows[0].fileName,
parentId: rows[0].parentId,
projCode: rows[0].projCode,
projName: rows[0].projName,
ename: rows[0].projCode,
type: rows[0].fileType,
leafLevel: rows[0].leafLevel,
leaf:0
}, selectedNode);
tree.reload(rows[0].parentId)
expandTreeNode(tree, rows[0].parentId);
$("#inqu_status-0-orgParentId").val(rows[0].parentId);
refreshTree(); refreshTree();
} }
...@@ -550,6 +568,7 @@ let refreshTree = function () { ...@@ -550,6 +568,7 @@ let refreshTree = function () {
let barElement = tree.findByUid(barDataItem.uid); let barElement = tree.findByUid(barDataItem.uid);
// 刷新完成后选中对应的树节点 // 刷新完成后选中对应的树节点
tree.select(barElement); tree.select(barElement);
setTreeNodeValue(barDataItem)
} else { } else {
selectTreeNode(tree, treeOrgId) selectTreeNode(tree, treeOrgId)
} }
......
...@@ -182,7 +182,7 @@ let save = function (btnNode) { ...@@ -182,7 +182,7 @@ let save = function (btnNode) {
var status = e.status; var status = e.status;
if (status !== -1) { if (status !== -1) {
let parentId = $("#inqu_status-0-parentId").val(); let parentId = $("#inqu_status-0-parentId").val();
parent.JSColorbox.setValueCallback(parentId); parent.JSColorbox.setValueCallback(e.getBlock("result").getMappedRows());
} }
}); });
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
......
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