提交 fec09d11 编写于 作者: Mosher's avatar Mosher

update:更新

上级 a0b6c026
......@@ -436,42 +436,48 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let tempContext:any = {};
let tempViewParam:any = {};
const tempContext:any = {};
const tempViewParam:any = {};
if (args.length === 0) {
this.calcToolbarItemState(true);
return ;
}
const arg:any = args[0];
if(this.context){
Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
if (this.context) {
Object.assign(tempContext, JSON.parse(JSON.stringify(this.context)));
}
<#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl()/>
<#if xDataControl.getPSAppDataEntity()??>
<#assign curDataEntity = xDataControl.getPSAppDataEntity()/>
Object.assign(tempContext,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(tempContext,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey:arg['${curDataEntity.getCodeName()?lower_case}']});
if(this.navFilter && !Object.is(this.navFilter,"")){
Object.assign(tempViewParam,{[this.navFilter]:arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(tempContext, { '${curDataEntity.getCodeName()?lower_case}': arg['${curDataEntity.getCodeName()?lower_case}'] });
Object.assign(tempContext, { srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey: arg['${curDataEntity.getCodeName()?lower_case}'] });
if (this.navFilter && !Object.is(this.navFilter,"")) {
Object.assign(tempViewParam, { [this.navFilter]: arg['${curDataEntity.getCodeName()?lower_case}'] });
}
if(this.navPSDer && !Object.is(this.navPSDer,"")){
Object.assign(tempViewParam,{[this.navPSDer]:arg['${curDataEntity.getCodeName()?lower_case}']});
if (this.navPSDer && !Object.is(this.navPSDer,"")) {
Object.assign(tempViewParam, { [this.navPSDer]:arg['${curDataEntity.getCodeName()?lower_case}'] });
}
</#if>
</#if>
if(this.navigateContext && Object.keys(this.navigateContext).length >0){
let _context:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateContext);
Object.assign(tempContext,_context);
if (this.navigateContext && Object.keys(this.navigateContext).length > 0) {
let _context:any = this.$util.computedNavData(arg, tempContext, tempViewParam, this.navigateContext);
Object.assign(tempContext, _context);
}
if(this.navigateParams && Object.keys(this.navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params);
if (this.navigateParams && Object.keys(this.navigateParams).length > 0) {
let _params:any = this.$util.computedNavData(arg, tempContext, tempViewParam, this.navigateParams);
Object.assign(tempViewParam, _params);
}
const navItem: any = {
navView: this.navViewName,
data: args,
srfnavdata: {
context: tempContext,
viewparams: tempViewParam
}
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.calcToolbarItemState(false);
this.$forceUpdate();
this.$emit('selectionchange', navItem);
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册