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

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

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