提交 97b8f940 编写于 作者: Shine-zwj's avatar Shine-zwj

适配日历部件无值显示内容

上级 e85bb351
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<template>
<#if ctrl.render??>
${ctrl.render.code}
......@@ -24,36 +27,42 @@ ${ctrl.render.code}
</#if>
<context-menu-container>
<#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'>
<el-timeline>
<el-timeline-item
v-for="(item, index) in events"
:key="item.title+index"
:color="item.color"
:timestamp="item.start"
placement="top">
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<#if ctrl.getPSSysCalendarItems()?? >
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<div v<#if calendarItem_index != 0>-else</#if>-if="<#if calendarItem.getPSLayoutPanel()??>true<#else>false</#if> && item.itemType == '${calendarItem.getItemType()}'">
<#if calendarItem.getPSLayoutPanel()??>
<#assign panel = calendarItem.getPSLayoutPanel()>
<@ibizindent blank=18>
${P.getCtrlCode(panel, 'CONTROL.html').code}
</@ibizindent>
<template v-if="events.length >0">
<el-timeline>
<el-timeline-item
v-for="(item, index) in events"
:key="item.title+index"
:color="item.color"
:timestamp="item.start"
placement="top">
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<#if ctrl.getPSSysCalendarItems()?? >
<#list ctrl.getPSSysCalendarItems() as calendarItem>
<div v<#if calendarItem_index != 0>-else</#if>-if="<#if calendarItem.getPSLayoutPanel()??>true<#else>false</#if> && item.itemType == '${calendarItem.getItemType()}'">
<#if calendarItem.getPSLayoutPanel()??>
<#assign panel = calendarItem.getPSLayoutPanel()>
<@ibizindent blank=18>
${P.getCtrlCode(panel, 'CONTROL.html').code}
</@ibizindent>
</#if>
</div>
</#list>
<div v-else>
<h4>{{item.title}}</h4>
<p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p>
</div>
</#if>
</div>
</#list>
<div v-else>
<h4>{{item.title}}</h4>
<p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p>
</div>
</#if>
</el-card>
</context-menu>
</el-timeline-item>
</el-timeline>
</el-card>
</context-menu>
</el-timeline-item>
</el-timeline>
</template>
<template v-else>
<span class="app-data-empty">{{ $t('<#if langbase??>${langbase}.nodata</#if>') }}</span>
</template>
<#else>
<template v-if="events.length >0">
<div class="event-legends">
<#if ctrl.getPSSysCalendarItems()??>
<#list ctrl.getPSSysCalendarItems() as calendarItem>
......@@ -86,6 +95,10 @@ ${ctrl.render.code}
<modal v-model="modalVisible" width="250px" :title="$t('app.calendar.dateSelectModalTitle')" class-name='date-select-modal' @on-ok="gotoDate">
<el-date-picker style="width: 200px;" v-model="selectedGotoDate" type="date"></el-date-picker>
</modal>
</template>
<template v-else>
<span class="app-data-empty">{{ $t('<#if langbase??>${langbase}.nodata</#if>') }}</span>
</template>
</#if>
</context-menu-container>
</div>
......
......@@ -90,4 +90,12 @@
text-align: center;
}
}
}
.calendarClass{
.app-data-empty{
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
}
\ No newline at end of file
......@@ -27,7 +27,7 @@ export default {
</#if>
<#-- 实体部件输出 -->
<#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID','LIST', 'DATAVIEW', 'CHART', 'KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW']>
<#assign ctrltypes = ['FORM', 'GRID','LIST', 'DATAVIEW', 'CHART', 'KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'CALENDAR']>
<#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype>
......@@ -40,7 +40,7 @@ export default {
</#list>
},
</#if>
<#if ctrl.getControlType() == 'LIST' || ctrl.getControlType() == 'DATAVIEW' || ctrl.getControlType() == 'CHART'|| ctrl.getControlType() == 'KANBAN'|| ctrl.getControlType() == 'GANTT' || ctrl.getControlType() == 'TREEGRIDEX'>
<#if ctrl.getControlType() == 'LIST' || ctrl.getControlType() == 'DATAVIEW' || ctrl.getControlType() == 'CHART'|| ctrl.getControlType() == 'KANBAN'|| ctrl.getControlType() == 'GANTT' || ctrl.getControlType() == 'TREEGRIDEX' || ctrl.getControlType() == 'CALENDAR'>
nodata:"<@getEmptyTextLanguage ctrl langrestype emptyText/>",
</#if>
<#if ctrl.getControlType() == 'GRID'>
......
......@@ -26,7 +26,7 @@ export default {
</#if>
<#-- 实体部件输出 -->
<#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID', 'LIST', 'DATAVIEW', 'CHART','KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'TREEGRIDEX']>
<#assign ctrltypes = ['FORM', 'GRID', 'LIST', 'DATAVIEW', 'CHART','KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'TREEGRIDEX', 'CALENDAR']>
<#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype>
......@@ -39,7 +39,7 @@ export default {
</#list>
},
</#if>
<#if ctrl.getControlType() == 'LIST' || ctrl.getControlType() == 'DATAVIEW' || ctrl.getControlType() == 'CHART' || ctrl.getControlType() == 'KANBAN'|| ctrl.getControlType() == 'GANTT' || ctrl.getControlType() == 'TREEGRIDEX'>
<#if ctrl.getControlType() == 'LIST' || ctrl.getControlType() == 'DATAVIEW' || ctrl.getControlType() == 'CHART' || ctrl.getControlType() == 'KANBAN'|| ctrl.getControlType() == 'GANTT' || ctrl.getControlType() == 'TREEGRIDEX' || ctrl.getControlType() == 'CALENDAR'>
nodata:"<@getEmptyTextLanguage ctrl langrestype emptyText/>",
</#if>
<#if ctrl.getControlType() == 'GRID'>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册