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

update:更新列表导航

上级 4e0f479e
...@@ -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-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">
...@@ -11,7 +10,7 @@ ...@@ -11,7 +10,7 @@
</div> </div>
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="exp-bar-action-container">
<#if view.isEnableQuickGroup()> <#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??> <#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() /> <#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
...@@ -38,7 +37,7 @@ ...@@ -38,7 +37,7 @@
</#list> </#list>
</#if> </#if>
</div> </div>
<div class='<#if ctrl.isShowTitleBar()>list-exp-bar-content<#else>list-exp-bar-content2</#if>'> <div class='list-exp-bar-content'>
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/> <#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl> <#list controls as singleControl>
...@@ -49,18 +48,7 @@ ...@@ -49,18 +48,7 @@
</#if> </#if>
</div> </div>
</div> </div>
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>'> </#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>
</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,25 +345,6 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -390,25 +345,6 @@ 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声明周期(组件初始化完毕)
* *
...@@ -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 {
> .ivu-split-trigger-con {
height: 100%; height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.list-exp-bar-header { .list-exp-bar-header {
...@@ -22,6 +14,10 @@ ...@@ -22,6 +14,10 @@
} }
} }
} }
.exp-bar-action-container {
display: flex;
align-items: center;
}
.container-header{ .container-header{
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
...@@ -36,9 +32,6 @@ ...@@ -36,9 +32,6 @@
} }
.toolbar-container{ .toolbar-container{
padding: 4px; padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
} }
.quick-group-container { .quick-group-container {
padding-top: 8px; padding-top: 8px;
...@@ -46,99 +39,8 @@ ...@@ -46,99 +39,8 @@
} }
} }
.list-exp-bar-content { .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;
padding: 16px 0;
margin-bottom: 10px;
}
.list-exp-bar-content2 {
height: 100%;
overflow: auto;
flex-grow: 1; 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; 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;
}
} }
} }
......
...@@ -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()/>
...@@ -48,7 +49,6 @@ ...@@ -48,7 +49,6 @@
</#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:视图顶部视图消息 --> <#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
...@@ -20,11 +18,26 @@ ...@@ -20,11 +18,26 @@
../@MACRO/View_Pos_Body_Msgs.vue.ftl ../@MACRO/View_Pos_Body_Msgs.vue.ftl
</#ibizinclude> </#ibizinclude>
</@ibizindent> </@ibizindent>
<#-- END:视图内容区视图消息 --> <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>">
<#if view.hasPSControl('listexpbar')> <#if view.hasPSControl('listexpbar')>
${P.getCtrlCode('listexpbar', 'CONTROL.html').code} ${P.getCtrlCode('listexpbar', 'CONTROL.html').code}
</#if> </#if>
</template>
<template slot="<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">right<#else>bottom</#if>">
<component
v-if="navItem && navItem.navView"
:is="navItem.navView"
:key="navItem.data && navItem.data.length ? navItem.data[0].srfkey : ''"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(navItem.srfnavdata.context)"
:viewparam="JSON.stringify(navItem.srfnavdata.viewparams)">
</component>
</template>
</split>
</div> </div>
<#-- END:视图内容区视图消息 -->
<#-- BEGIN:视图底部视图消息 --> <#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=8> <@ibizindent blank=8>
<#ibizinclude> <#ibizinclude>
......
<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>
......
...@@ -19,6 +19,60 @@ ...@@ -19,6 +19,60 @@
*/ */
public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}'; public viewUID: string = '${srffilepath2(view.getPSAppModule().getCodeName())}-${srffilepath2(view.getCodeName())}';
/**
* 分隔值
*
* @type {number}
* @memberof ${srfclassname('${view.name}')}Base
*/
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> <#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl ../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册