Commit 06ecfa50 by liuyang

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

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