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

update:更新表格导航

上级 1917a0dd
......@@ -2,65 +2,53 @@
<#if ctrl.render??>
${ctrl.render.code}
<#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 slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<div class='grid-exp-bar-header'>
<div class="grid-exp-bar-title">
<icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.gridBar.title') }}<#else>${ctrl.getTitle()}</#if>
</div>
<div id="${ctrl.getCodeName()?lower_case}" class="app-grid-exp-bar<#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.isShowTitleBar()>
<div class='grid-exp-bar-header'>
<div class="grid-exp-bar-title">
<icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.gridBar.title') }}<#else>${ctrl.getTitle()}</#if>
</div>
</div>
</#if>
<div class="container-header">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<div class="container-header">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div>
</#if>
<#if ctrl.isEnableSearch()>
<div class='search-container'>
<i-input :search="true"
@on-change="($event) => { this.searchText = $event.target.value; }"
:placeholder="placeholder"
@on-search="onSearch">
</i-input>
</div>
</#if>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
</div>
</#if>
<#if ctrl.isEnableSearch()>
<div class='search-container'>
<i-input :search="true"
@on-change="($event) => { this.searchText = $event.target.value; }"
:placeholder="placeholder"
@on-search="onSearch">
</i-input>
</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>
</#if>
</#list>
</#if>
<div class='<#if ctrl.isShowTitleBar()>grid-exp-bar-content<#else>grid-exp-bar-content2</#if>'>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "GRID">
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "GRID">
${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#if>
</#list>
</#if>
</#if>
</#list>
</#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>
</#if>
</div>
</#if>
</template>
<#assign import_block>
......@@ -139,22 +127,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
*/
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
</#list>
</#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
*
* @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 && 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});
}
}
public afterMounted() { }
/**
* vue 生命周期
......
<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>
<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>
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<div class="content-container">
<#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容区视图消息 -->
<#if view.hasPSControl('gridexpbar')>
${P.getCtrlCode('gridexpbar', 'CONTROL.html').code}
</#if>
</div>
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
<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>
<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>
../@MACRO/VIEW_CAPTION_DATAINFO.vue.ftl
</#ibizinclude>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<div class="content-container">
<#-- BEGIN:视图内容区视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- 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')>
${P.getCtrlCode('gridexpbar', 'CONTROL.html').code}
</#if>
</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:视图底部视图消息 -->
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</card>
</div>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 视图唯一标识
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}';
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
/**
* 视图唯一标识
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
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>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册