提交 7d83466b 编写于 作者: RedPing97's avatar RedPing97

优化看板视图分组头

上级 af4c25c1
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<div class="app-data-view-group<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>"> <div class="app-data-view-group<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<template v-if="items.length > 0">
<template v-for="(group, index) of groups"> <template v-for="(group, index) of groups">
<#if ctrl.groupRender??> <#if ctrl.groupRender??>
${ctrl.groupRender.code} ${ctrl.groupRender.code}
...@@ -53,6 +53,7 @@ ${ctrl.render.code} ...@@ -53,6 +53,7 @@ ${ctrl.render.code}
</Poptip> </Poptip>
</#if> </#if>
</div> </div>
<div v-if="items.length > 0">
<draggable :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.value)"> <draggable :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.value)">
<div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
...@@ -66,6 +67,10 @@ ${ctrl.render.code} ...@@ -66,6 +67,10 @@ ${ctrl.render.code}
</div> </div>
</draggable> </draggable>
</div> </div>
<div v-else class="app-data-empty">
<span>{{ $t('<#if langbase??>${langbase}.nodata</#if>') }}</span>
</div>
</div>
</#if> </#if>
</template> </template>
<#if ctrl.getGroupQuickPSDEToolbar()??> <#if ctrl.getGroupQuickPSDEToolbar()??>
...@@ -87,53 +92,6 @@ ${ctrl.render.code} ...@@ -87,53 +92,6 @@ ${ctrl.render.code}
</#if> </#if>
</div> </div>
</#if> </#if>
</template>
<template v-else>
<template v-for="(group, index) of groups">
<draggable :key="index" :list="group.items" class="dragbar" ghostClass="dragitems" handle=".dataview-group-item" :group="{name: 'bar', put: group.folding ? false:true}" @change="onDragChange($event,group.name)">
<div v-show="!group.folding" class="dataview-group-folading-kanban" @click="onClick(group,index)">
<div class="unfold-icon">
<i class="el-icon-s-unfold" :title="$t('app.kanban.unfold')"></i>
</div>
<div class="dataview-group-folding">
<span>{{getGroupText(group.value)}}({{group.items.length}})</span>
</div>
</div>
</draggable>
<div :key="group + index" v-show="group.folding" class="dataview-group-content dataview-group-kanban" style="<#if ctrl.getGroupWidth() gt 0>width: ${ctrl.getGroupWidth()?c}px;<#else>flex-grow: 1;</#if>">
<div class="dataview-group-header<#if ctrl.getGroupPSSysCss()??> ${ctrl.getGroupPSSysCss().getCssName()}</#if>">
<div class="fold-icon" @click="onClick(group,index)">
<i class="el-icon-s-fold" :title="$t('app.kanban.fold')"></i>
</div>
<span class="fold-text">{{ getGroupText(group.value) }}</span>
<#if ctrl.getGroupPSUIActionGroup()??>
<Poptip trigger="hover" content="content" placement="bottom-end" style="float: right;">
<Icon type="md-more" />
<div slot="content" class="group-action">
<#if ctrl.getGroupPSUIActionGroup().getPSUIActions()??>
<#list ctrl.getGroupPSUIActionGroup().getPSUIActions() as action>
<div class="group-action-item">
<i-button long @click="uiAction('${action.getCodeName()}', $event, {})">
<#if action.getPSSysImage()??>
<#if action.getPSSysImage().getImagePath()?length gt 0>
<img src="${action.getPSSysImage().getImagePath()}"/>
<#else>
<i class="${action.getPSSysImage().getCssClass()}"></i>
</#if>
</#if>
${action.getCaption()}
</i-button>
</div>
</#list>
</#if>
</div>
</Poptip>
</#if>
</div>
<span class="app-data-empty">{{ $t('<#if langbase??>${langbase}.nodata</#if>') }}</span>
</div>
</template>
</template>
</div> </div>
</#if> </#if>
</template> </template>
......
...@@ -60,6 +60,13 @@ ...@@ -60,6 +60,13 @@
border-color: #108cee; border-color: #108cee;
} }
} }
.app-data-empty{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
} }
.dataview-group-content:nth-child(1) { .dataview-group-content:nth-child(1) {
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
...@@ -79,13 +86,6 @@ ...@@ -79,13 +86,6 @@
border-top-width: 1px; border-top-width: 1px;
} }
} }
.app-data-empty{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.dragitems { .dragitems {
z-index: -1 !important; z-index: -1 !important;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册