提交 70c06a67 编写于 作者: tony001's avatar tony001

zpc --- zpc --- 补充树节点关系导航上下文,导航参数上下文 -fix8

上级 bc287af4
......@@ -409,16 +409,19 @@
srfnodeid: node.data && node.data.id ? node.data.id : "#",
srfnodefilter: this.srfnodefilter
};
Object.assign(params,{viewparams:this.viewparams});
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {};
curNode = Util.deepObjectMerge(curNode,node);
let tempContext:any = this.computecurNodeContext(curNode);
if(curNode.data && curNode.data.srfparentdename){
Object.assign(tempContext,{srfparentdename:curNode.data.srfparentdename});
Object.assign(tempViewParams,{srfparentdename:curNode.data.srfparentdename});
}
if(curNode.data && curNode.data.srfparentkey){
Object.assign(tempContext,{srfparentkey:curNode.data.srfparentkey});
Object.assign(tempViewParams,{srfparentkey:curNode.data.srfparentkey});
}
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
......
......@@ -571,8 +571,8 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
@Errorlog
public search${srfclassname(node.getNodeType()?lower_case)}(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(!filter.tempviewparams){
Object.assign(searchFilter,filter.tempviewparams);
if(!filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
......@@ -769,6 +769,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
tempViewParamData = JSON.parse(JSON.stringify(filter.viewparams));
}
if( Object.keys(resNavParams).length > 0){
Object.keys(resNavParams).forEach((item:any) =>{
......@@ -782,7 +783,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
tempViewParamData[item.toLowerCase()] = curDataObj.value;
})
}
Object.assign(filter,{tempviewparams:tempViewParamData});
Object.assign(filter,{viewparams:tempViewParamData});
return filter;
}else{
return filter;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册