提交 1de5dae4 编写于 作者: RedPig97's avatar RedPig97

视图参数逻辑修复

上级 2f459816
...@@ -76,6 +76,22 @@ ...@@ -76,6 +76,22 @@
this.$Notice.warning({ title: '错误', desc: '请添加新建数据向导视图' }); this.$Notice.warning({ title: '错误', desc: '请添加新建数据向导视图' });
</#if> </#if>
<#elseif viewlogic.isEnableBatchAdd()> <#elseif viewlogic.isEnableBatchAdd()>
let tempContext:any = this.$util.deepCopy(this.context);
let data:any = this.$util.deepCopy(args[0]);
<#-- BEGIN:导航参数 -->
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateContexts?? && curNewLogicRefView.getPSNavigateContexts()??>
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localContext);
Object.assign(tempContext,_context);
}
</#if>
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateParams?? && curNewLogicRefView.getPSNavigateParams()??>
if(localViewParam && Object.keys(localViewParam).length >0){
let _param:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localViewParam);
Object.assign(data,_param);
}
</#if>
<#-- END:导航参数 -->
<#-- 批量添加 --> <#-- 批量添加 -->
let batchAddPSAppViews:Array<any>=[]; let batchAddPSAppViews:Array<any>=[];
<#if viewlogic.getBatchAddPSAppViews?? && viewlogic.getBatchAddPSAppViews()??> <#if viewlogic.getBatchAddPSAppViews?? && viewlogic.getBatchAddPSAppViews()??>
...@@ -98,33 +114,7 @@ ...@@ -98,33 +114,7 @@
let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{ let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename)); return (item.res && (item.res[0] == this.context.srfparentdename));
}) })
<#assign dataview = viewlogic.getNewDataPSAppView()/> let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, tempContext, data);
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
<#if dataview.isPSDEView()>
<#assign appDataEntity = dataview.getPSAppDataEntity()/>
delete tempContext.${appDataEntity.getCodeName()?lower_case};
</#if>
if(args.length >0){
Object.assign(tempContext,args[0]);
}
<#-- BEGIN:导航参数 -->
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateContexts?? && curNewLogicRefView.getPSNavigateContexts()??>
if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(fullargs[0],this.context,this.viewparams,localContext);
Object.assign(tempContext,_context);
}
</#if>
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateParams?? && curNewLogicRefView.getPSNavigateParams()??>
if(localViewParam && Object.keys(localViewParam).length >0){
let _param:any = this.$util.computedNavData(fullargs[0],this.context,this.viewparams,localViewParam);
Object.assign(data,_param);
}
</#if>
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册