|
@@ -23,7 +23,7 @@
|
|
|
<div class="module_title__sign" />
|
|
|
<div class="module_title__caption">我的日程</div>
|
|
|
</div>
|
|
|
- <MyFullCalendar :events="calendarEvents" @dateClick="dateClick" @expand="calendarDialogVisible = true" @change="queryWorkListByTime" @select="select" />
|
|
|
+ <MyFullCalendar :events="calendarEvents" @dateClick="dateClick" @expand="calendarDialogVisible = true" @change="queryWorkListByTime" @select="select" @eventDrop="eventDrop" />
|
|
|
</el-aside>
|
|
|
<el-aside width="32.8%" style="margin-right: 10px" class="layout_aside">
|
|
|
<div class="module_title">
|
|
@@ -50,7 +50,7 @@
|
|
|
>
|
|
|
<el-tabs v-model="tabsActiveName" @tab-click="handleTabsClick">
|
|
|
<el-tab-pane label="日历视图" name="1" style="padding: 31px 146px">
|
|
|
- <MyFullCalendar :events="calendarEvents" type="big" @dateClick="dateClick" @change="queryWorkListByTime" @select="select" />
|
|
|
+ <MyFullCalendar :events="calendarEvents" type="big" @dateClick="dateClick" @change="queryWorkListByTime" @select="select" @eventDrop="eventDrop" />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="列表视图" name="2" style="padding: 31px 146px">
|
|
|
<div>
|
|
@@ -278,6 +278,14 @@ export default {
|
|
|
|
|
|
this.queryWorkList()
|
|
|
},
|
|
|
+ eventDrop(info) {
|
|
|
+ const form = {
|
|
|
+ id: info.event.id,
|
|
|
+ startTime: info.event.start,
|
|
|
+ endTime: info.event.end
|
|
|
+ }
|
|
|
+ workbenchApi.updateSelfSchedule(form)
|
|
|
+ },
|
|
|
dateClick(arg) {
|
|
|
// this.createSelfScheduleDialog.data = arg
|
|
|
// this.createSelfScheduleDialog.visible = true
|
|
@@ -351,6 +359,7 @@ export default {
|
|
|
this.calendarEvents = []
|
|
|
for (const i in res.data) {
|
|
|
const item = {
|
|
|
+ id: res.data[i].id,
|
|
|
title: res.data[i].name,
|
|
|
start: dayjs(res.data[i].startTime).toDate(),
|
|
|
end: dayjs(res.data[i].endTime).toDate()
|