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

update:更新列表导航

上级 4e0f479e
...@@ -2,65 +2,53 @@ ...@@ -2,65 +2,53 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split id="${ctrl.getCodeName()?lower_case}" class="app-list-exp-bar<#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>" v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange"> <div id="${ctrl.getCodeName()?lower_case}" class="app-list-exp-bar<#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'> <#if ctrl.isShowTitleBar()>
<#if ctrl.isShowTitleBar()> <div class='list-exp-bar-header'>
<div class='list-exp-bar-header'> <div class="list-exp-bar-title">
<div class="list-exp-bar-title"> <icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{$t('app.listExpBar.title')}}<#else>${ctrl.getTitle()}</#if>
<icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{$t('app.listExpBar.title')}}<#else>${ctrl.getTitle()}</#if>
</div>
</div> </div>
</#if> </div>
<div class="container-header"> </#if>
<#if view.isEnableQuickGroup()> <div class="exp-bar-action-container">
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.isEnableQuickGroup()>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
</#if> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
<div class="quick-group-container"> </#if>
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <div class="quick-group-container">
</div> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</#if> </div>
<#if ctrl.isEnableSearch()> </#if>
<div class='search-container'> <#if ctrl.isEnableSearch()>
<i-input :search="true" <div class='search-container'>
@on-change="($event) => { this.searchText = $event.target.value; }" <i-input :search="true"
:placeholder="placeholder" @on-change="($event) => { this.searchText = $event.target.value; }"
@on-search="onSearch"> :placeholder="placeholder"
</i-input> @on-search="onSearch">
</div> </i-input>
</#if>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
</div>
<div class='<#if ctrl.isShowTitleBar()>list-exp-bar-content<#else>list-exp-bar-content2</#if>'>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "LIST">
${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
</div> </div>
</#if>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
</div> </div>
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'> <div class='list-exp-bar-content'>
<component <#if ctrl.getPSControls()??>
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" <#assign controls = ctrl.getPSControls()/>
:is="selection.view.viewname" <#list controls as singleControl>
class="viewcontainer2" <#if singleControl.getControlType() == "LIST">
:viewDefaultUsage="false" ${P.getCtrlCode(singleControl, 'CONTROL.html').code}
:viewdata="JSON.stringify(selection.context)" </#if>
:viewparam="JSON.stringify(selection.viewparam)"> </#list>
</component> </#if>
</div> </div>
</split> </div>
</#if> </#if>
</template> </template>
<#assign import_block> <#assign import_block>
...@@ -117,7 +105,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -117,7 +105,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public isSingleSelect:boolean = true; public isSingleSelect: boolean = true;
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
...@@ -130,31 +118,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -130,31 +118,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams }); public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if> </#if>
/**
* 呈现模式,可选值:horizontal或者vertical
*
* @public
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public showMode:string ="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>";
/**
* 控件宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()?c}<#else>0</#if>;
/**
* 控件高度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()?c}<#else>0</#if>;
/** /**
* 可搜索字段名称 * 可搜索字段名称
* *
...@@ -171,7 +134,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -171,7 +134,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {(string)} * @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public searchText:string = ""; public searchText: string = "";
/** /**
* 部件类型 * 部件类型
...@@ -182,14 +145,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -182,14 +145,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
*/ */
public controlType: string = "listExpBar"; public controlType: string = "listExpBar";
/**
* 分割宽度
*
* @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public split: number = 0.5;
<#if ctrl.getXDataPSControl()??> <#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl() /> <#assign xDataControl = ctrl.getXDataPSControl() />
...@@ -390,32 +345,13 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -390,32 +345,13 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
return null; return null;
} }
/**
* 选中数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public selection: any = {};
/**
* split值变化事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* Vue声明周期(组件初始化完毕) * Vue声明周期(组件初始化完毕)
* *
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public created() { public created() {
this.afterCreated(); this.afterCreated();
} }
/** /**
...@@ -445,24 +381,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -445,24 +381,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* *
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterMounted(){ 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 && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth;
}
}else{
if(this.ctrlHeight && containerHeight != 0){
this.split = this.ctrlHeight/containerHeight;
}
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* Vue声明周期(组件渲染完毕) * Vue声明周期(组件渲染完毕)
......
.app-list-exp-bar { .app-list-exp-bar {
> .ivu-split-horizontal { height: 100%;
> .ivu-split-trigger-con { display: flex;
height: 100%; flex-direction: column;
width: 1px; .list-exp-bar-header {
} line-height: 50px;
> .ivu-split-pane { border-bottom: 1px solid #ddd;
> div { .list-exp-bar-title {
height: 100%; font-size: 18px;
overflow: auto; padding-left: 8px;
display: flex; i {
flex-direction: column; font-size: 20px;
.list-exp-bar-header { margin-top: -2px;
line-height: 50px; }
border-bottom: 1px solid #ddd; }
.list-exp-bar-title { }
font-size: 18px; .exp-bar-action-container {
padding-left: 8px; display: flex;
i { align-items: center;
font-size: 20px; }
margin-top: -2px; .container-header{
} display: flex;
} justify-content: flex-start;
} align-items: center;
.container-header{ flex-wrap: wrap;
display: flex; .search-container {
justify-content: flex-start; width: 30%;
align-items: center; height: 48px;
flex-wrap: wrap; padding: 10px 10px 10px 0;
.search-container { min-width: 200px;
width: 30%; max-width: 400px;
height: 48px; }
padding: 10px 10px 10px 0; .toolbar-container{
min-width: 200px; padding: 4px;
max-width: 400px; }
} .quick-group-container {
.toolbar-container{ padding-top: 8px;
padding: 4px; padding-right: 20px;
display: flex; }
flex-wrap: wrap; }
align-items: center; .list-exp-bar-content {
} flex-grow: 1;
.quick-group-container { overflow: auto;
padding-top: 8px; }
padding-right: 20px; }
}
} <#ibizinclude>
.list-exp-bar-content { ../@MACRO/CSS/DEFAULT.less.ftl
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
padding: 16px 0;
margin-bottom: 10px;
}
.list-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .right-pane.ivu-split-pane {
> div {
padding-left: 10px;
}
}
> .left-pane.ivu-split-pane {
padding-right: 10px;
}
}
> .ivu-split-vertical{
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.list-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.list-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: space-between;
align-items: center;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
}
.list-exp-bar-content {
<#-- 计算高度 -->
<#if ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 88px);
<#elseif ctrl.isShowTitleBar() && !ctrl.isEnableSearch()>
height: calc(100% - 40px);
<#elseif !ctrl.isShowTitleBar() && ctrl.isEnableSearch()>
height: calc(100% - 38px);
<#else>
height: 100%;
</#if>
overflow: auto;
margin-bottom: 10px;
}
.list-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1;
}
}
}
> .top-pane.ivu-split-pane {
> div {
padding-bottom: 10px;
}
}
> .bottom-pane.ivu-split-pane {
padding-top: 10px;
}
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
</#if> </#if>
</#list> </#list>
</#if> </#if>
</div>
<div class='grid-exp-bar-content'> <div class='grid-exp-bar-content'>
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/> <#assign controls = ctrl.getPSControls()/>
...@@ -47,7 +48,6 @@ ...@@ -47,7 +48,6 @@
</#list> </#list>
</#if> </#if>
</div> </div>
</div>
</div> </div>
</#if> </#if>
</template> </template>
......
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :bordered="false">
<#ibizinclude>
<#ibizinclude> ../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl </#ibizinclude>
</#ibizinclude> <#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#-- BEGIN:视图顶部视图消息 --> <#ibizinclude>
<@ibizindent blank=8> ../@MACRO/View_Pos_Top_Msgs.vue.ftl
<#ibizinclude> </#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl </@ibizindent>
</#ibizinclude> <#-- END:视图顶部视图消息 -->
</@ibizindent> <div class="content-container">
<#-- END:视图顶部视图消息 --> <#-- BEGIN:视图内容区视图消息 -->
<div class="content-container"> <@ibizindent blank=8>
<#-- BEGIN:视图内容区视图消息 --> <#ibizinclude>
<@ibizindent blank=8> ../@MACRO/View_Pos_Body_Msgs.vue.ftl
<#ibizinclude> </#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl </@ibizindent>
</#ibizinclude> <split v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
</@ibizindent> <template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>">
<#-- END:视图内容区视图消息 --> <#if view.hasPSControl('listexpbar')>
<#if view.hasPSControl('listexpbar')> ${P.getCtrlCode('listexpbar', 'CONTROL.html').code}
${P.getCtrlCode('listexpbar', 'CONTROL.html').code} </#if>
</#if> </template>
</div> <template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>">
<#-- BEGIN:视图底部视图消息 --> <component
<@ibizindent blank=8> v-if="navItem && navItem.navView"
<#ibizinclude> :is="navItem.navView"
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl :key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
</#ibizinclude> class="viewcontainer2"
</@ibizindent> :viewDefaultUsage="false"
<#-- END:视图底部视图消息 --> :viewdata="JSON.stringify(navItem.srfnavdata.context)"
</card> :viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div>
<#-- END:视图内容区视图消息 -->
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</div> </div>
\ No newline at end of file
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :bordered="false"> <card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :dis-hover="true" :bordered="false">
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl ../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图顶部视图消息 --> <#-- END:视图顶部视图消息 -->
<div class="content-container"> <div class="content-container">
<#-- BEGIN:视图内容区视图消息 --> <#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
...@@ -19,25 +19,25 @@ ...@@ -19,25 +19,25 @@
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图内容区视图消息 --> <#-- END:视图内容区视图消息 -->
<split v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange"> <split v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
<template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>"> <template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>">
<#if view.hasPSControl('gridexpbar')> <#if view.hasPSControl('gridexpbar')>
${P.getCtrlCode('gridexpbar', 'CONTROL.html').code} ${P.getCtrlCode('gridexpbar', 'CONTROL.html').code}
</#if> </#if>
</template> </template>
<template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>"> <template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>">
<component <component
v-if="navItem && navItem.navView" v-if="navItem && navItem.navView"
:is="navItem.navView" :is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''" :key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2" class="viewcontainer2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)" :viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)"> :viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component> </component>
</template> </template>
</split> </split>
</div> </div>
<#-- BEGIN:视图底部视图消息 --> <#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl ../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl ../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/** /**
* 视图唯一标识 * 视图唯一标识
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}'; public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}';
<#ibizinclude> /**
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl * 分隔值
</#ibizinclude> *
* @type {number}
<#ibizinclude> * @memberof ${srfclassname('${view.name}')}Base
../@MACRO/VIEW-BASE.style.ftl */
public split: number = 0.5;
/**
* 导航项
*
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
public navItem: any = {};
/**
* split值变化事件
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onSplitChange() {
if (this.split) {
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
/**
* 初始化分隔值
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public initSplit() {
if (this.$store.getters.getViewSplit(this.viewUID)) {
this.split = this.$store.getters.getViewSplit(this.viewUID);
} else {
<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">
const containerWidth = (this.$el as any).offsetWidth;
<#list view.getPSControls() as singleCtrl>
<#if singleCtrl.getControlType() == 'LISTEXPBAR' && singleCtrl.getWidth()??>
this.split = ${singleCtrl.getWidth()?c} / containerWidth;
</#if>
</#list>
<#else>
const containerHeight = (this.$el as any).offsetHeight;
<#list view.getPSControls() as singleCtrl>
<#if singleCtrl.getControlType() == 'LISTEXPBAR' && singleCtrl.getHeight()??>
this.split = ${singleCtrl.getHeight()?c} / containerHeight;
</#if>
</#list>
</#if>
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册