提交 9ee3e123 编写于 作者: KK's avatar KK

分页导航视图计数器

上级 06c4e745
...@@ -17,9 +17,8 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap ...@@ -17,9 +17,8 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#assign counterRefs = ''/> <#assign counterRefs = ''/>
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#list ctrl.getPSAppCounterRefs() as singleCounterRef> <#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??> <#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/> <#assign appCounter = singleCounterRef.getPSAppCounter()/>
...@@ -34,6 +33,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap ...@@ -34,6 +33,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
protected ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams}); protected ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
</#if> </#if>
</#list> </#list>
</#if>
/** /**
* 计数器服务对象集合 * 计数器服务对象集合
...@@ -42,8 +42,16 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap ...@@ -42,8 +42,16 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected counterServiceArray:Array<any> = [${counterRefs}]; protected counterServiceArray:Array<any> = [${counterRefs}];
</#if>
/**
* 加载计数器数据
*
* @param {any[]} args
* @memberof ProdMobTabExpViewtabexppanel
*/
public async loadCounterData() {
this.$emit("counterInit",this.counterServiceArray[0]);
}
/** /**
* 销毁计数器服务 * 销毁计数器服务
...@@ -129,6 +137,25 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap ...@@ -129,6 +137,25 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
} }
} }
/**
* vue 生命周期
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public afterMounted(){
this.loadCounterData();
}
/** /**
* vue 生命周期 * vue 生命周期
* *
......
<#assign content> <#assign content>
:activiedTabViewPanel="activiedTabViewPanel" :activiedTabViewPanel="activiedTabViewPanel"
@changepanel="changePanel" @changepanel="changePanel"
@counterInit="counterInit"
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<#if tabviewpanel.getPSSysImage?? && tabviewpanel.getPSSysImage()?? && tabviewpanel.getPSSysImage().getCssClass?? && tabviewpanel.getPSSysImage().getCssClass()?? > <#if tabviewpanel.getPSSysImage?? && tabviewpanel.getPSSysImage()?? && tabviewpanel.getPSSysImage().getCssClass?? && tabviewpanel.getPSSysImage().getCssClass()?? >
<ion-icon name="${tabviewpanel.getPSSysImage().getCssClass()}"></ion-icon> <ion-icon name="${tabviewpanel.getPSSysImage().getCssClass()}"></ion-icon>
</#if> </#if>
<ion-badge v-if="false" color="danger">2</ion-badge> <#if tabviewpanel.getCounterId?? && tabviewpanel.getCounterId()><ion-badge color="danger">{{counter.counterData.${tabviewpanel.getCounterId()}?counter.counterData.${tabviewpanel.getCounterId()}:''}}</ion-badge></#if>
${tabviewpanel.getCaption()}</ion-segment-button> ${tabviewpanel.getCaption()}</ion-segment-button>
</#list> </#list>
</#if> </#if>
......
...@@ -13,6 +13,26 @@ ...@@ -13,6 +13,26 @@
<#assign created_block> <#assign created_block>
this.getLocalStorage(); this.getLocalStorage();
</#assign> </#assign>
/**
* 计数器数据
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
public counter:any = {counterData:{}} ;
/**
* 计数器初始化
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
private counterInit(value:any) {
this.counter = value;
}
/** /**
* 被激活的分页面板 * 被激活的分页面板
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册