提交 71a15e41 编写于 作者: KK's avatar KK

分页导航视图 计数器逻辑结构调整

上级 626019e0
......@@ -2,10 +2,48 @@
./CONTROL-BASE.template.ftl
</#ibizinclude>
<#assign import_block>
<#-- 计数器服务 -->
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/>
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/app-core/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#assign counterRefs = ''/>
<#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/>
<#assign counterRefs>${counterRefs}this.${srfclassname('${appCounter.getCodeName()}')}counterservice<#if singleCounterRef_has_next>,</#if></#assign>
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService();
</#if>
</#list>
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected counterServiceArray:Array<any> = [${counterRefs}];
</#if>
/**
* 获取多项数据
*
......
......@@ -2,23 +2,7 @@
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#assign import_block>
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as ctrl>
<#if ctrl.getControlType?? && ctrl.getControlType()?? && ctrl.getControlType() == 'TABVIEWPANEL'>
<#-- 计数器服务 -->
<#if ctrl.getPSSysCounterRef?? && ctrl.getPSSysCounterRef()??>
<#if ctrl.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = ctrl.getPSSysCounterRef().getPSAppCounter()/>
<#if !P.exists("importService", ctrl.getPSSysCounterRef().getPSAppCounter().getPSAppDataEntity().getId(), "")>
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/app-core/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#if>
</#if>
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
......@@ -29,66 +13,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/ap
<#assign created_block>
this.getLocalStorage();
</#assign>
<#assign mounted_block>
this.counterserviceInit();
</#assign>
<#assign counterRefs = ''/>
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as ctrl>
<#if ctrl.getControlType?? && ctrl.getControlType()?? && ctrl.getControlType() == 'TABVIEWPANEL'>
<#if ctrl.getPSSysCounterRef?? && ctrl.getPSSysCounterRef()??>
<#if ctrl.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = ctrl.getPSSysCounterRef().getPSAppCounter()/>
<#if !P.exists("importService2", ctrl.getPSSysCounterRef().getPSAppCounter().getPSAppDataEntity().getId(), "")>
<#assign counterRefs>${counterRefs}this.${srfclassname('${appCounter.getCodeName()}')}counterservice,</#assign>
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}
*/
protected ${srfclassname('${appCounter.getCodeName()}')}counterservice: any;
</#if>
</#if>
</#if>
</#if>
</#list>
</#if>
/**
* 计数器服务初始化
*
* @type {Array<*>}
* @memberof ${srfclassname('${view.name}')}
*/
public counterserviceInit(){
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as ctrl>
<#if ctrl.getControlType?? && ctrl.getControlType()?? && ctrl.getControlType() == 'TABVIEWPANEL'>
<#if ctrl.getPSSysCounterRef?? && ctrl.getPSSysCounterRef()??>
<#if ctrl.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = ctrl.getPSSysCounterRef().getPSAppCounter()/>
<#if !P.exists("importService3", ctrl.getPSSysCounterRef().getPSAppCounter().getPSAppDataEntity().getId(), "")>
this.${srfclassname('${appCounter.getCodeName()}')}counterservice = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
</#if>
</#if>
</#if>
</#if>
</#list>
</#if>
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ${srfclassname('${view.name}')}
*/
protected counterServiceArray:Array<any> = [${counterRefs}];
/**
* 被激活的分页面板
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册