提交 5ed7e46c 编写于 作者: WodahsOrez's avatar WodahsOrez

日历部件上下文菜单

上级 71aefad2
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
</@ibizindent> </@ibizindent>
</span> </span>
</#if> </#if>
<context-menu-container>
<#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'> <#if ctrl.getCalendarStyle?? && ctrl.getCalendarStyle() == 'TIMELINE'>
<el-timeline> <el-timeline>
<el-timeline-item <el-timeline-item
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
<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>
</#if> </#if>
</context-menu-container>
</div> </div>
</template> </template>
<#assign import_block> <#assign import_block>
...@@ -606,7 +608,7 @@ FullCalendar, ...@@ -606,7 +608,7 @@ FullCalendar,
} }
/** /**
* 获取单项 * 获取单项数据
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
...@@ -678,6 +680,54 @@ FullCalendar, ...@@ -678,6 +680,54 @@ FullCalendar,
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code} ${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if> </#if>
/**
* 绘制右键菜单
*
* @param {*} event
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public renderContextMenu(event: any) {
let content;
if (event && event.itemType) {
const data: any = JSON.parse(JSON.stringify(event));
this.selections = [event];
switch(event.itemType){
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
case "${childCtrl.getOwner().getItemType()}":
content = this.renderContextMenu${srfclassname(childCtrl.getOwner().getItemType()?lower_case)}();
break;
</#if>
</#list>
</#if>
}
}
return content;
}
<#if ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
<#if childCtrl.getControlType() == "CONTEXTMENU">
/**
* 绘制${childCtrl.getOwner().getItemType()}类型右键菜单
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public renderContextMenu${srfclassname(childCtrl.getOwner().getItemType()?lower_case)}() {
return (
<@ibizindent blank=12>
${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
</@ibizindent>
);
}
</#if>
</#list>
</#if>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册