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

update

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