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

update:更新表格导航

上级 7fcf3900
......@@ -10,7 +10,7 @@
</div>
</div>
</#if>
<div class="container-header">
<div class="exp-bar-action-container">
<#if view.isEnableQuickGroup()>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
......@@ -37,7 +37,7 @@
</#if>
</#list>
</#if>
<div class='<#if ctrl.isShowTitleBar()>grid-exp-bar-content<#else>grid-exp-bar-content2</#if>'>
<div class='grid-exp-bar-content'>
<#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
......@@ -119,23 +119,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 });
</#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 {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public selection: any = {};
/**
* 可搜索字段名称
*
......@@ -143,7 +126,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {(string)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public placeholder="<@getQuickSearchPlaceholder ctrl />";
public placeholder = "<@getQuickSearchPlaceholder ctrl />";
/**
* 搜素值
......
.app-grid-exp-bar {
> .ivu-split-horizontal {
> .ivu-split-trigger-con {
height: 100%;
width: 1px;
}
> .ivu-split-pane {
> div {
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
.grid-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.grid-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.grid-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;
}
.grid-exp-bar-content2 {
<#-- 计算高度 -->
<#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;
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%;
.grid-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
>div {
font-size: 18px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.container-header{
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
}
.grid-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;
}
.grid-exp-bar-content2 {
<#-- 计算高度 -->
<#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;
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
.app-grid-exp-bar {
height: 100%;
display: flex;
flex-direction: column;
.grid-exp-bar-header {
line-height: 50px;
border-bottom: 1px solid #ddd;
.grid-exp-bar-title {
font-size: 18px;
padding-left: 8px;
i {
font-size: 20px;
margin-top: -2px;
}
}
}
.exp-bar-action-container {
display: flex;
align-items: center;
}
.container-header{
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.search-container {
width: 30%;
height: 48px;
padding: 10px 10px 10px 0;
min-width: 200px;
max-width: 400px;
}
.toolbar-container{
padding: 4px;
}
.quick-group-container {
padding-top: 8px;
padding-right: 20px;
}
}
.grid-exp-bar-content {
flex-grow: 1;
overflow: auto;
}
}
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#assign mounted_block>this.initSplit();</#assign>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
......@@ -40,7 +40,37 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public onSplitChange() {
console.log(111, '分隔值变化', this.split);
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() == 'GRIDEXPBAR' && singleCtrl.getWidth()??>
this.split = ${ctrl.getWidth()?c} / containerWidth;
</#if>
</#list>
<#else>
const containerHeight = (this.$el as any).offsetHeight;
<#list view.getPSControls() as singleCtrl>
<#if singleCtrl.getControlType() == 'GRIDEXPBAR' && singleCtrl.getHeight()??>
this.split = ${ctrl.getHeight()?c} / containerHeight;
</#if>
</#list>
</#if>
this.$store.commit("setViewSplit", { viewUID: this.viewUID, viewSplit: this.split });
}
}
<#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册