提交 e6dba7c9 编写于 作者: JunZai's avatar JunZai

update

上级 8ca36373
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
../../@MACRO/LANG_FUN.ftl ../../@MACRO/LANG_FUN.ftl
</#ibizinclude> </#ibizinclude>
<template> <template>
<div :class='calendarClass'> <div :class='ganttClass'>
<FullCalendar <FullCalendar
ref="calendar" ref="calendar"
:locale="$i18n.locale" :locale="$i18n.locale"
...@@ -73,7 +73,7 @@ FullCalendar, ...@@ -73,7 +73,7 @@ FullCalendar,
* @type {any[]} * @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public calendarClass: string = "calendar"; public ganttClass: string = "gantt";
/** /**
* 选中事件element元素 * 选中事件element元素
...@@ -175,8 +175,8 @@ FullCalendar, ...@@ -175,8 +175,8 @@ FullCalendar,
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public gotoDate(){ public gotoDate(){
let appCalendar: any = this.$refs.calendar; let appGantt: any = this.$refs.gantt;
let api = appCalendar.getApi(); let api = appGantt.getApi();
api.gotoDate(this.selectedGotoDate); api.gotoDate(this.selectedGotoDate);
} }
...@@ -243,7 +243,7 @@ FullCalendar, ...@@ -243,7 +243,7 @@ FullCalendar,
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public calendarType: string = "${ctrl.getGanttStyle()}"; public ganttType: string = "${ctrl.getGanttStyle()}";
/** /**
* 搜索获取日程事件 * 搜索获取日程事件
...@@ -274,15 +274,15 @@ FullCalendar, ...@@ -274,15 +274,15 @@ FullCalendar,
let tempEvent = JSON.parse(JSON.stringify(this.events[0])); let tempEvent = JSON.parse(JSON.stringify(this.events[0]));
this.onEventClick(tempEvent,true); this.onEventClick(tempEvent,true);
this.events[0].className = "select-first-event"; this.events[0].className = "select-first-event";
this.calendarClass = "calendar select-first-calendar"; this.ganttClass = "gantt select-first-gantt";
} }
if(successCallback){ if(successCallback){
successCallback(this.events); successCallback(this.events);
} }
// 刷新日历的大小(仅fullcalendar组件使用) // 刷新日历的大小(仅fullcalendar组件使用)
if(!Object.is(this.calendarType,"TIMELINE")){ if(!Object.is(this.ganttType,"TIMELINE")){
let appCalendar: any = this.$refs.calendar; let appGantt: any = this.$refs.gantt;
let api = appCalendar.getApi(); let api = appGantt.getApi();
api.updateSize(); api.updateSize();
} }
}, (response: any) => { }, (response: any) => {
...@@ -377,7 +377,7 @@ FullCalendar, ...@@ -377,7 +377,7 @@ FullCalendar,
JSelement = $event2.currentTarget; JSelement = $event2.currentTarget;
} }
if(JSelement){ if(JSelement){
this.calendarClass = "calendar"; this.ganttClass = "gantt";
if(this.selectedEventElement){ if(this.selectedEventElement){
this.selectedEventElement.classList.remove("selected-event"); this.selectedEventElement.classList.remove("selected-event");
} }
...@@ -438,10 +438,10 @@ FullCalendar, ...@@ -438,10 +438,10 @@ FullCalendar,
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public refresh() { public refresh() {
if(Object.is(this.calendarType,"TIMELINE")){ if(Object.is(this.ganttType,"TIMELINE")){
this.searchEvents(); this.searchEvents();
} else { } else {
let calendarApi = (this.$refs.calendar as any).getApi(); let calendarApi = (this.$refs.gantt as any).getApi();
calendarApi.refetchEvents(); calendarApi.refetchEvents();
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册