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

update:更新表格导航

上级 1917a0dd
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<split id="${ctrl.getCodeName()?lower_case}" class="app-grid-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-grid-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='grid-exp-bar-header'> <div class='grid-exp-bar-header'>
<div class="grid-exp-bar-title"> <div class="grid-exp-bar-title">
...@@ -37,7 +36,6 @@ ...@@ -37,7 +36,6 @@
</#if> </#if>
</#list> </#list>
</#if> </#if>
</div>
<div class='<#if ctrl.isShowTitleBar()>grid-exp-bar-content<#else>grid-exp-bar-content2</#if>'> <div class='<#if ctrl.isShowTitleBar()>grid-exp-bar-content<#else>grid-exp-bar-content2</#if>'>
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/> <#assign controls = ctrl.getPSControls()/>
...@@ -49,18 +47,8 @@ ...@@ -49,18 +47,8 @@
</#if> </#if>
</div> </div>
</div> </div>
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div> </div>
</split> </#if>
</#if>
</template> </template>
<#assign import_block> <#assign import_block>
...@@ -139,22 +127,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -139,22 +127,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
*/ */
public showMode:string ="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>"; 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>;
/** /**
* 选中数据 * 选中数据
* *
...@@ -361,17 +333,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -361,17 +333,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
</#list> </#list>
</#if> </#if>
/**
* split值变化事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -437,24 +398,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -437,24 +398,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 生命周期
......
<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:视图顶部视图消息 --> <#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
...@@ -21,10 +19,24 @@ ...@@ -21,10 +19,24 @@
</#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">
<div 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>
</div> </div>
<div slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>">
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)">
</component>
</div>
</split>
</div>
<#-- BEGIN:视图底部视图消息 --> <#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
...@@ -18,6 +18,23 @@ ...@@ -18,6 +18,23 @@
*/ */
public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}'; public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}';
/**
* 分隔值
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
public split: number = 0.3;
/**
* split值变化事件
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public onSplitChange() {
console.log(111, '分隔值变化', this.split);
}
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl ../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册