提交 1e2b246c 编写于 作者: JunZai's avatar JunZai

update

上级 010371bf
...@@ -170,20 +170,20 @@ GanttElastic, ...@@ -170,20 +170,20 @@ GanttElastic,
*/ */
public load(task: any = {}) { public load(task: any = {}) {
const params: any = { const params: any = {
srfnodeid: "#", srfnodeid: task && task.id ? task.id : "#",
srfnodefilter: '' srfnodefilter: ''
}; };
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams)); let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {}; let curNode:any = {};
Util.deepObjectMerge(curNode, {}); Util.deepObjectMerge(curNode, task);
let tempContext:any = this.computecurNodeContext(curNode); let tempContext:any = this.computecurNodeContext(curNode);
if(curNode.data && curNode.data.srfparentdename) { if(curNode && curNode.srfparentdename) {
Object.assign(tempContext,{ srfparentdename: curNode.data.srfparentdename }); Object.assign(tempContext,{ srfparentdename: curNode.srfparentdename });
Object.assign(tempViewParams,{ srfparentdename: curNode.data.srfparentdename }); Object.assign(tempViewParams,{ srfparentdename: curNode.srfparentdename });
} }
if(curNode.data && curNode.data.srfparentkey) { if(curNode && curNode.srfparentkey) {
Object.assign(tempContext,{ srfparentkey: curNode.data.srfparentkey }); Object.assign(tempContext,{ srfparentkey: curNode.srfparentkey });
Object.assign(tempViewParams,{ srfparentkey: curNode.data.srfparentkey }); Object.assign(tempViewParams,{ srfparentkey: curNode.srfparentkey });
} }
Object.assign(params,{viewparams:tempViewParams}); Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => { this.service.getNodes(tempContext,params).then((response: any) => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册