提交 11ef5f75 编写于 作者: tony001's avatar tony001

表格、列表、卡片导航视图

上级 ae891562
......@@ -44,7 +44,8 @@
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)">
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
......@@ -56,6 +57,10 @@
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
......@@ -164,6 +169,34 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
/**
* 导航关系
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navPSDer: string = "<#if xDataControl.getNavPSDER()??>n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}</#if>_eq";
<#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??>
/**
* 导航上下文参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateContext:any = <@getNavigateContext xDataControl />;
</#if>
<#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??>
/**
* 导航视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateParams:any = <@getNavigateParams xDataControl />;
</#if>
</#if>
/**
......@@ -313,24 +346,39 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {};
let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) {
return ;
}
const arg:any = args[0];
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(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(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey: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>
</#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.navigateParams && Object.keys(this.navigateParams).length >0){
let _params:any = this.$util.computedNavData(arg,tempContext,tempViewParam,this.navigateParams);
Object.assign(tempViewParam,_params);
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.$emit('selectionchange',args);
this.$forceUpdate();
}
......
......@@ -44,7 +44,8 @@
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.data)">
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
......@@ -54,6 +55,10 @@
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/FUNC/MACRO.ftl
</#ibizinclude>
/**
......@@ -141,6 +146,34 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navFilter: string = "<#if xDataControl.getNavFilter()??>${xDataControl.getNavFilter()}</#if>";
/**
* 导航关系
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navPSDer: string = "<#if xDataControl.getNavPSDER()??>n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}</#if>_eq";
<#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??>
/**
* 导航上下文参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateContext:any = <@getNavigateContext xDataControl />;
</#if>
<#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??>
/**
* 导航视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateParams:any = <@getNavigateParams xDataControl />;
</#if>
</#if>
/**
......@@ -294,24 +327,39 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_selectionchange(args: any [], tag?: string, $event2?: any): void {
let data:any = {};
let tempContext:any = {};
let tempViewParam:any = {};
if (args.length === 0) {
return ;
}
const arg:any = args[0];
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(data,{'${curDataEntity.getCodeName()?lower_case}':arg['${curDataEntity.getCodeName()?lower_case}']});
Object.assign(data,{srfparentdename:'${curDataEntity.getCodeName()}',srfparentkey: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>
</#if>
if(this.context){
Object.assign(data,JSON.parse(JSON.stringify(this.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);
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName }, data:data });
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.$emit('selectionchange',args);
this.$forceUpdate();
}
......
......@@ -177,7 +177,6 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navPSDer: string = "<#if xDataControl.getNavPSDER()??>n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}</#if>_eq";
<#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??>
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册