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

增加日历部件快速工具栏

上级 d1c7dbba
......@@ -80,6 +80,10 @@ ${ctrl.render.code}
:validRange="validRange"
:defaultDate="defaultDate"
:eventRender="eventRender"
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
:navLinks="true"
:navLinkDayClick ="onDayClick"
</#if>
@dateClick="onDateClick"
@eventClick="onEventClick"
@eventDrop="onEventDrop"
......@@ -356,7 +360,7 @@ FullCalendar,
<#if childCtrl.getControlType() == "CONTEXTMENU">
<#if childCtrl.getPSDEToolbarItems()??>
<#list childCtrl.getPSDEToolbarItems() as item>
${childCtrl.getOwner().getItemType()}_${item.name}: {name:'${item.name}',nodeOwner:'${childCtrl.getOwner().getItemType()}',<#if item.getPSUIAction?? && item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>, noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>, dataaccaction:'${uiaction.getDataAccessAction()}'</#if>, visabled: true, disabled: false</#if>},
${childCtrl.getOwner().getItemType()}_${item.name}: {name:'${item.name}',nodeOwner:'${childCtrl.getOwner().getItemType()}',<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>, noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>, dataaccaction:'${uiaction.getDataAccessAction()}'</#if>, visabled: true, disabled: false</#if>},
</#list>
</#if>
</#if>
......@@ -957,6 +961,63 @@ FullCalendar,
</#list>
</#if>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#if ctrl.getQuickPSDEToolbar().getCodeName?? && ctrl.getQuickPSDEToolbar().getCodeName()??>
<#assign ModelsName>${ctrl.getQuickPSDEToolbar().getCodeName()?lower_case}Models</#assign>
<#else>
<#assign ModelsName = 'toolBarModels' />
</#if>
<#assign heightIndex = 0>
<#if ctrl.getQuickPSDEToolbar().getPSDEToolbarItems?? && ctrl.getQuickPSDEToolbar().getPSDEToolbarItems()??>
<#list ctrl.getQuickPSDEToolbar().getPSDEToolbarItems() as item>
<#if item.getItemType()?? && item.getItemType() == 'DEUIACTION' && item.getPSUIAction?? && item.getPSUIAction()??>
<#assign heightIndex += 1>
</#if>
</#list>
</#if>
/**
* 时间点击
*
* @param {*} $event 当前时间
* @param {*} jsEvent 原生事件对象
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onDayClick($event: any, jsEvent: any) {
let content: any = this.renderBarMenu;
const height = ${heightIndex} * 34;
const container = this.$apppopover.openPopover(jsEvent, content, "left-end", true, 103, height);
}
/**
* 绘制快速工具栏项
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public renderBarMenu() {
return (
<div id="calendar-popover">
<dropdown class="tree-right-menu" trigger="custom" visible={true} on-on-click={($event: any) => this.${ctrl.getQuickPSDEToolbar().getName()}_click({tag: $event})}>
<dropdown-menu slot="list">
<#if ctrl.getQuickPSDEToolbar().getPSDEToolbarItems?? && ctrl.getQuickPSDEToolbar().getPSDEToolbarItems()??>
<#list ctrl.getQuickPSDEToolbar().getPSDEToolbarItems() as item>
<#if item.getItemType()?? && item.getItemType() == 'DEUIACTION' && item.getPSUIAction?? && item.getPSUIAction()??>
<dropdown-item name="${item.name}" v-show={this.${ModelsName}.${item.getName()?lower_case}.visabled} disabled={this.${ModelsName}.${item.getName()?lower_case}.disabled}>
<#if item.isShowIcon()><#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><i class="<#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>"></i></#if></#if>
<#if item.isShowCaption()>${item.getCaption()}</#if>
</dropdown-item>
</#if>
</#list>
</#if>
</dropdown-menu>
</dropdown>
</div>
)
}
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -100,4 +100,20 @@
text-align: center;
}
}
}
\ No newline at end of file
}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
.app-popover {
padding: 0px !important;
background-color: #fff !important;
}
#calendar-popover {
.ivu-dropdown {
.ivu-select-dropdown {
top: 0px;
margin: 0;
padding: 0;
}
}
}
</#if>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册