提交 0bef5cbd 编写于 作者: tony001's avatar tony001

日历导航参数 --- fix2

上级 04f4b7b1
...@@ -337,13 +337,14 @@ ...@@ -337,13 +337,14 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void { public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {}; let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) { if (args.length === 0) {
return ; return ;
} }
const arg:any = args[0]; const arg:any = args[0];
if(this.context){ if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.context))); Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
} }
switch(arg.itemType) { switch(arg.itemType) {
<#if xDataControl?? && xDataControl.getPSSysCalendarItems()??> <#if xDataControl?? && xDataControl.getPSSysCalendarItems()??>
...@@ -351,8 +352,8 @@ ...@@ -351,8 +352,8 @@
<#if calendarItem.getPSAppDataEntity()??> <#if calendarItem.getPSAppDataEntity()??>
<#assign _appde = calendarItem.getPSAppDataEntity() /> <#assign _appde = calendarItem.getPSAppDataEntity() />
case "${calendarItem.getItemType()}": case "${calendarItem.getItemType()}":
Object.assign(data,{ ${_appde.getCodeName()?lower_case} : arg.${_appde.getCodeName()?lower_case}}); Object.assign(tempContext,{ ${_appde.getCodeName()?lower_case} : arg.${_appde.getCodeName()?lower_case}});
Object.assign(data,{srfparentdename:'${_appde.getCodeName()}',srfparentkey:arg['${_appde.getCodeName()?lower_case}']}); Object.assign(tempContext,{srfparentdename:'${_appde.getCodeName()}',srfparentkey:arg['${_appde.getCodeName()?lower_case}']});
if(this.navFilter && this.navFilter['${calendarItem.getItemType()}'] && !Object.is(this.navFilter['${calendarItem.getItemType()}'],"")){ if(this.navFilter && this.navFilter['${calendarItem.getItemType()}'] && !Object.is(this.navFilter['${calendarItem.getItemType()}'],"")){
Object.assign(tempViewParam,{[this.navFilter['${calendarItem.getItemType()}']]:arg['${_appde.getCodeName()?lower_case}']}); Object.assign(tempViewParam,{[this.navFilter['${calendarItem.getItemType()}']]:arg['${_appde.getCodeName()?lower_case}']});
} }
...@@ -373,7 +374,7 @@ ...@@ -373,7 +374,7 @@
</#if> </#if>
} }
this.selection = {}; this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, data:data }); Object.assign(this.selection, { view: { viewname: this.navViewName[arg.itemType] }, context:tempContext,viewparam:tempViewParam });
this.$emit('selectionchange',args); this.$emit('selectionchange',args);
this.$forceUpdate(); this.$forceUpdate();
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册