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

update:更新表格导航

上级 1917a0dd
...@@ -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-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"> <icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.gridBar.title') }}<#else>${ctrl.getTitle()}</#if>
<icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.gridBar.title') }}<#else>${ctrl.getTitle()}</#if>
</div>
</div> </div>
</div>
</#if>
<div class="container-header">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if> </#if>
<div class="container-header"> <div class="quick-group-container">
<#if view.isEnableQuickGroup()> <app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> </div>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> </#if>
</#if> <#if ctrl.isEnableSearch()>
<div class="quick-group-container"> <div class='search-container'>
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${appCounter.getCodeName()?lower_case}counterservice"</#if> @valuechange="quickGroupValueChange"></app-quick-group> <i-input :search="true"
</div> @on-change="($event) => { this.searchText = $event.target.value; }"
</#if> :placeholder="placeholder"
<#if ctrl.isEnableSearch()> @on-search="onSearch">
<div class='search-container'> </i-input>
<i-input :search="true" </div>
@on-change="($event) => { this.searchText = $event.target.value; }" </#if>
:placeholder="placeholder" <#if ctrl.getPSControls()??>
@on-search="onSearch"> <#assign controls = ctrl.getPSControls()/>
</i-input> <#list controls as singleControl>
</div> <#if singleControl.getControlType() == "TOOLBAR">
</#if>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
<#if singleControl.getControlType() == "TOOLBAR">
${P.getCtrlCode(singleControl, 'CONTROL.html').code} ${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#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()/>
<#list controls as singleControl> <#list controls as singleControl>
<#if singleControl.getControlType() == "GRID"> <#if singleControl.getControlType() == "GRID">
${P.getCtrlCode(singleControl, 'CONTROL.html').code} ${P.getCtrlCode(singleControl, 'CONTROL.html').code}
</#if> </#if>
</#list> </#list>
</#if> </#if>
</div> </div>
</div> </div>
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'> </div>
<component </#if>
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>
</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:视图顶部视图消息 -->
<@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> <#-- END:视图内容区视图消息 -->
</@ibizindent> <split v-model="split" mode="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">horizontal<#else>vertical</#if>" @on-move-end="onSplitChange">
<#-- END:视图内容区视图消息 --> <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>
<#-- BEGIN:视图底部视图消息 --> <div slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>">
<@ibizindent blank=8> <component
<#ibizinclude> v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl :is="selection.view.viewname"
</#ibizinclude> class="viewcontainer2"
</@ibizindent> :viewDefaultUsage="false"
<#-- END:视图底部视图消息 --> :viewdata="JSON.stringify(selection.context)"
</card> :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> </div>
\ No newline at end of file
<#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 {string}
<#ibizinclude> * @memberof ${srfclassname('${view.name}')}Base
../@MACRO/VIEW-BASE.style.ftl */
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> </#ibizinclude>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册