提交 263fd6a8 编写于 作者: Neuromancer255's avatar Neuromancer255

卡片导航部件修改 --fix1

上级 a3e580fd
<template>
<div class="app-mob-listexpbar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="listexpbar-container">
<div class="listexpbar_list">
<#if ctrl.getPSDEDataView()??>
<#assign card = ctrl.getPSDEDataView()/>
${P.getCtrlCode(card, 'CONTROL.html').code}
</#if>
</div>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:_context="JSON.stringify(selection.context)"
:_viewparam="JSON.stringify(selection.viewparam)"
>
</component>
</div>
</#if>
</div>
</template>
\ No newline at end of file
<#ibizinclude>
./CONTROL-BASE.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getData(): any {
return null;
}
/**
* 搜素值
*
* @public
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public searchText:string = "";
<#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl() />
/**
* 导航视图名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navViewName: string = "<#if xDataControl.getNavPSAppView()??><#assign navPSAppView = xDataControl.getNavPSAppView() />${srffilepath2(navPSAppView.getCodeName())}</#if>";
/**
* 导航视图参数
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navViewParam: string = '<#if xDataControl.getNavViewParamJO()??>${xDataControl.getNavViewParamJO()}</#if>';
/**
* 导航过滤项
*
* @type {string}
* @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}_eq</#if>";
/**
* 导航上下文参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateContext:any = <#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??><@getNavigateContext xDataControl /><#else>null</#if>;
/**
* 导航视图参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public navigateParams:any = <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??><@getNavigateParams xDataControl /><#else>null</#if>;
</#if>
/**
* 选中数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public selection: any = {};
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({ default: true }) public showBusyIndicator!: boolean;
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
${P.getCtrlCode(singleControl, 'CONTROL.vue').code}
</#if>
</#list>
</#if>
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
<#if ctrl.getXDataPSControl?? && ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl() />
this.viewState.next({ tag: '${xDataControl.getName()}', action: action, data: data });
</#if>
});
}
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted(){
<#-- if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetWidth;
let containerHeight:number = (document.getElementById("${ctrl.getCodeName()?lower_case}") as any).offsetHeight;
if(Object.is(this.showMode,'horizontal')){
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
} -->
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* ${ctrl.name}的选中数据事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_selectionchange(arg: any, tag?: string, $event2?: any): void {
let tempContext:any = {};
let tempViewParam:any = {};
if (!arg) {
return ;
}
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}']});
}
if(this.navPSDer && !Object.is(this.navPSDer,"")){
Object.assign(tempViewParam,{[this.navPSDer]:arg['${curDataEntity.getCodeName()?lower_case}']});
}
</#if>
</#if>
const {context, param} = this.$viewTool.formatNavigateParam( this.navigateContext, this.navigateParams, tempContext, tempViewParam, arg );
Object.assign(tempContext,context);
Object.assign(tempViewParam,param);
this.selection = {};
Object.assign(this.selection, { view: { viewname: this.navViewName },context:tempContext,viewparam:tempViewParam});
this.$forceUpdate();
}
/**
* ${ctrl.name}的load完成事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_load(args:any, tag?: string, $event2?: any){
if(!this.selection.view){
this.listexpbar_list_selectionchange(args[0])
}
this.$emit('load',args);
}
/**
* 执行搜索
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onSearch($event:any) {
<#if ctrl.getPSDEDataView()??>
<#assign list = ctrl.getPSDEDataView()/>
this.viewState.next({ tag: '${list.name}', action: "load", data: {query : this.searchText}});
</#if>
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#-- content -->
<#assign content>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
.listexpbar-container{
display: flex;
height: calc(100vh);
flex-direction: row;
justify-content: space-between;
.listexpbar_list{
width: 20%;
height: 100%;
overflow:scroll;
overflow-x: hidden;
}
.viewcontainer2{
width: 80%;
height: 100%;
margin-left: auto;
overflow:scroll;
overflow-x: hidden;
}
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=DATAVIEWEXPBAR
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_LISTEXPBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_LISTEXPBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_DATAVIEWEXPBAR
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册