cnhis-design-vue 2.1.113 → 2.1.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +34 -25
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +68 -68
  12. package/es/breadcrumb/index.js +8 -8
  13. package/es/button/index.js +22 -22
  14. package/es/calendar/index.js +8 -8
  15. package/es/captcha/index.js +3 -3
  16. package/es/card/index.js +8 -8
  17. package/es/card-reader-sdk/index.js +1 -1
  18. package/es/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/direct/index.js +16 -16
  29. package/es/divider/index.js +8 -8
  30. package/es/drag-layout/index.js +3 -3
  31. package/es/drawer/index.js +8 -8
  32. package/es/dropdown/index.js +8 -8
  33. package/es/editor/index.js +1 -1
  34. package/es/ellipsis/index.js +1 -1
  35. package/es/empty/index.js +8 -8
  36. package/es/fabric-chart/index.js +9 -9
  37. package/es/form/index.js +8 -8
  38. package/es/form-model/index.js +8 -8
  39. package/es/form-table/index.js +66 -66
  40. package/es/full-calendar/index.js +5272 -0
  41. package/es/full-calendar/style.css +1 -0
  42. package/es/index/index.js +2342 -415
  43. package/es/index/style.css +1 -1
  44. package/es/input/index.js +9 -9
  45. package/es/input-number/index.js +8 -8
  46. package/es/layout/index.js +8 -8
  47. package/es/list/index.js +8 -8
  48. package/es/locale-provider/index.js +8 -8
  49. package/es/map/index.js +9 -9
  50. package/es/mentions/index.js +8 -8
  51. package/es/menu/index.js +8 -8
  52. package/es/message/index.js +8 -8
  53. package/es/multi-chat/index.js +76 -76
  54. package/es/multi-chat-client/index.js +70 -70
  55. package/es/multi-chat-history/index.js +4 -4
  56. package/es/multi-chat-record/index.js +14 -14
  57. package/es/multi-chat-setting/index.js +22 -22
  58. package/es/multi-chat-sip/index.js +1 -1
  59. package/es/notification/index.js +8 -8
  60. package/es/page-header/index.js +8 -8
  61. package/es/pagination/index.js +8 -8
  62. package/es/popconfirm/index.js +8 -8
  63. package/es/popover/index.js +8 -8
  64. package/es/progress/index.js +8 -8
  65. package/es/radio/index.js +9 -9
  66. package/es/rate/index.js +8 -8
  67. package/es/result/index.js +8 -8
  68. package/es/row/index.js +8 -8
  69. package/es/scale-container/index.js +1 -1
  70. package/es/scale-view/index.js +27 -27
  71. package/es/select/index.js +12 -12
  72. package/es/select-label/index.js +11 -11
  73. package/es/select-person/index.js +2 -2
  74. package/es/select-tag/index.js +4 -4
  75. package/es/shortcut-setter/index.js +10 -10
  76. package/es/skeleton/index.js +8 -8
  77. package/es/slider/index.js +8 -8
  78. package/es/slider-tree/index.js +9 -9
  79. package/es/space/index.js +8 -8
  80. package/es/spin/index.js +8 -8
  81. package/es/statistic/index.js +8 -8
  82. package/es/steps/index.js +8 -8
  83. package/es/switch/index.js +8 -8
  84. package/es/table-filter/index.js +65 -65
  85. package/es/tabs/index.js +8 -8
  86. package/es/tag/index.js +9 -9
  87. package/es/time-picker/index.js +8 -8
  88. package/es/timeline/index.js +8 -8
  89. package/es/tooltip/index.js +8 -8
  90. package/es/transfer/index.js +8 -8
  91. package/es/tree/index.js +8 -8
  92. package/es/tree-select/index.js +8 -8
  93. package/es/upload/index.js +8 -8
  94. package/es/verification-code/index.js +2 -2
  95. package/lib/cui.common.js +49942 -49979
  96. package/lib/cui.umd.js +49942 -49979
  97. package/lib/cui.umd.min.js +154 -154
  98. package/package.json +9 -2
  99. package/packages/full-calendar/index.js +10 -0
  100. package/packages/full-calendar/src/FullCalendar.vue +695 -0
  101. package/packages/full-calendar/src/api/index.js +71 -0
  102. package/packages/full-calendar/src/components/ListTag.vue +165 -0
  103. package/packages/full-calendar/src/components/Tag.vue +296 -0
  104. package/packages/full-calendar/src/components/TagDetail.vue +287 -0
  105. package/packages/full-calendar/src/utils/index.js +438 -0
  106. package/packages/index.js +5 -3
@@ -0,0 +1,695 @@
1
+ <template>
2
+ <div class="c-full-calendar">
3
+ <a-spin v-show="loading" class="loading" tip="加载中" :spinning="loading"></a-spin>
4
+ <div class="search-wrapper" v-if="showSearchHeader">
5
+ <a-select style="width: 160px; margin-right: 8px" placeholder="全部数据" @change="handleCategoryChange" allowClear showSearch :filterOption="filterOption">
6
+ <a-select-option :value="item.sid" v-for="item in schedulerList" :key="item.sid">{{ item.name }}</a-select-option>
7
+ </a-select>
8
+ <a-input-search placeholder="请输入关键字搜索" @search="onSearch" allowClear style="width: 222px; margin-right: 8px" class="scheduler-search" enter-button> </a-input-search>
9
+ <a-button type="primary" style="margin-left: auto" icon="plus-square" @click="handleAdd">
10
+ 新增日程
11
+ </a-button>
12
+ </div>
13
+
14
+ <div class="main-wrapper">
15
+ <div class="full-calendar">
16
+ <div class="full-calendar__header">
17
+ <div class="header-left">
18
+ <span class="btn-today calendar-quick" :class="{ disabled: disabledToday }" @click="() => handleDate()">
19
+ 今天
20
+ </span>
21
+ <span class="btn-prev calendar-quick" @click="() => handleDate('subtract')"><a-icon type="left"/></span>
22
+ <span class="btn-next calendar-quick" @click="() => handleDate('add')"><a-icon type="right"/></span>
23
+ <span class="time-title">{{ timeTitle }}</span>
24
+ </div>
25
+ <div class="header-right">
26
+ <div class="viewshow-wrap">
27
+ <span v-for="{ label, value } in viewShows" :key="value" @click="handleChangeView(value)" :class="{ active: viewType === value }">
28
+ {{ label }}
29
+ </span>
30
+ </div>
31
+ <a-button type="primary" style="margin-left: 10px" icon="plus-square" @click="handleAdd">
32
+ 新增日程
33
+ </a-button>
34
+ </div>
35
+ </div>
36
+ <FullCalendar v-show="viewType !== 'list'" ref="fullCalendar" :options="calendarOptions" class="full-calendar__body" />
37
+ <ListTag v-show="viewType === 'list'" :list-data="calendarOptions.events" :date-value="dateValue" :view-type="viewType" v-on="$listeners"></ListTag>
38
+ </div>
39
+ <div class="sidebar" v-if="showSidebar"></div>
40
+ </div>
41
+
42
+ <TagDetail v-on="$listeners" ref="tagDetailRef"></TagDetail>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ import create from '@/core/create';
48
+ import FullCalendar from '@fullcalendar/vue';
49
+ import dayGridPlugin from '@fullcalendar/daygrid';
50
+ import timeGridPlugin from '@fullcalendar/timegrid';
51
+ import interactionPlugin from '@fullcalendar/interaction';
52
+ import listPlugin from '@fullcalendar/list';
53
+ import { Spin, Select, Input, Button, Icon } from 'ant-design-vue';
54
+ import Tag from './components/Tag.vue';
55
+ import ListTag from './components/ListTag.vue';
56
+ import TagDetail from './components/TagDetail.vue';
57
+ // import SvgIcon from '@/component/svg/index.vue';
58
+ import { axiosInstance, getScheduleListApi, getScheduleSettingApi, getScheduleDataApi, queryScheduleListApi, saveOrUpdateScheduleApi, delScheduleApi } from './api';
59
+ import vexutils, { moment } from '@/utils/vexutils';
60
+ import { isAllDay, isAllDayWeek, getWeekEnd, isAllDayMonth, formatDate, weekIsMonth, hanldeDateListArr, handleListRows, viewMap } from './utils';
61
+
62
+ window.moment = moment;
63
+
64
+ export default create({
65
+ name: 'full-calendar',
66
+ components: {
67
+ // SvgIcon,
68
+ // Tag,
69
+ TagDetail,
70
+ ListTag,
71
+ FullCalendar,
72
+ [Spin.name]: Spin,
73
+ [Select.name]: Select,
74
+ [Select.Option.name]: Select.Option,
75
+ [Input.Search.name]: Input.Search,
76
+ [Button.name]: Button,
77
+ [Icon.name]: Icon
78
+ },
79
+ props: {
80
+ serverPrefix: { type: String, default: 'inbox' },
81
+ // userInfo: { type: Object, default: () => {} },
82
+ orgId: { type: String },
83
+ userId: { type: String },
84
+ token: { type: String },
85
+ showSearchHeader: { type: Boolean },
86
+ showSidebar: { type: Boolean }
87
+ },
88
+ computed: {
89
+ disabledToday() {
90
+ return (
91
+ this.dateValue
92
+ .clone()
93
+ .startOf('day')
94
+ .valueOf() ===
95
+ moment()
96
+ .startOf('day')
97
+ .valueOf()
98
+ );
99
+ },
100
+ timeTitle() {
101
+ if (this.viewType === 'list') {
102
+ return moment(this.currentDate.startTime)
103
+ .startOf('month')
104
+ .format('YYYY年MM月');
105
+ } else {
106
+ const map = {
107
+ day: '今天',
108
+ week: '本月',
109
+ month: '本月'
110
+ };
111
+
112
+ const formatTime = this.dateValue.clone().format(this.viewType !== 'day' ? 'YYYY年MM月' : 'YYYY年MM月DD日 ddd');
113
+ let isToday = false;
114
+ if (this.viewType === 'week') {
115
+ isToday = weekIsMonth(this.dateValue);
116
+ } else {
117
+ isToday = this.isToday;
118
+ }
119
+ return `${formatTime} ${isToday ? map[this.viewType] : ''}`;
120
+ }
121
+ },
122
+ isToday() {
123
+ if (!this.calendar) return false;
124
+ const viewType = this.viewType;
125
+ const calendarDate = moment(this.calendar.getDate());
126
+ const calendarDateValue = calendarDate
127
+ .clone()
128
+ .startOf(viewType)
129
+ .valueOf();
130
+ const nowValue = moment()
131
+ .startOf(viewType)
132
+ .valueOf();
133
+ return calendarDateValue === nowValue;
134
+ }
135
+ },
136
+ watch: {},
137
+ data() {
138
+ this.tippyInstance = null;
139
+ const { startTime, endTime } = formatDate();
140
+ return {
141
+ calendar: null,
142
+ viewShows: ['list', 'day', 'week', 'month'].map((value, idx) => ({
143
+ id: idx,
144
+ label: viewMap[value],
145
+ value
146
+ })),
147
+ loading: false,
148
+ schedulerList: [],
149
+ currentDate: {
150
+ startTime,
151
+ endTime
152
+ },
153
+ viewType: 'month',
154
+ dateValue: moment(),
155
+ calendarOptions: {
156
+ // 引入的插件,比如fullcalendar/daygrid,fullcalendar/timegrid引入后才可显示月,周,日
157
+ plugins: [dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin],
158
+ initialView: 'dayGridMonth', // 默认为那个视图(月:dayGridMonth,周:timeGridWeek,日:timeGridDay)
159
+ firstDay: 1, // 设置一周中显示的第一天是哪天,周日是0,周一是1,类推
160
+ locale: 'zh-cn', // 切换语言,当前为中文
161
+ eventColor: '#3BB2E3', // 全部日历日程背景色
162
+ timeGridEventMinHeight: '20', // 设置事件的最小高度
163
+ // aspectRatio: 1.82, // 设置日历单元格宽度与高度的比例。
164
+ expandRows: true,
165
+ // displayEventTime: false, // 是否显示时间
166
+ // allDaySlot: false, // 周,日视图时,all-day 不显示
167
+ allDayText: '全天',
168
+ eventLimit: 3, // 设置月日程,与all-day slot的最大显示数量,超过的通过弹窗显示
169
+ // headerToolbar: {
170
+ // // 日历头部按钮位置
171
+ // left: 'today prev,next title',
172
+ // center: '',
173
+ // right: 'list,timeGridDay,timeGridWeek,dayGridMonth'
174
+ // },
175
+ headerToolbar: {
176
+ left: '',
177
+ center: '',
178
+ right: ''
179
+ },
180
+ buttonText: {
181
+ list: '列表',
182
+ day: '日',
183
+ week: '周',
184
+ month: '月',
185
+ today: '今天'
186
+ },
187
+ slotLabelFormat: {
188
+ hour: '2-digit',
189
+ minute: '2-digit',
190
+ meridiem: false,
191
+ hour12: false // 设置时间为24小时
192
+ },
193
+ // 事件
194
+ // eventClick: this.handleEventClick, // 点击日历日程事件
195
+ eventDrop: this.handleDrop, // 拖动日历日程事件
196
+ // eventResize: this.eventResize, // 修改日历日程大小事件
197
+ select: this.handleSelect, // 选中日历格事件
198
+ // eventDidMount: this.eventDidMount, // 安装提示事件
199
+ // loading: this.loadingEvent, // 视图数据加载中、加载完成触发(用于配合显示/隐藏加载指示器。)
200
+ // selectAllow: this.selectAllow, //编程控制用户可以选择的地方,返回true则表示可选择,false表示不可选择
201
+ // eventMouseEnter: this.eventMouseEnter, // 鼠标滑过
202
+ showNonCurrentDates: true,
203
+ droppable: true,
204
+ allowContextMenu: false,
205
+ editable: true, // 是否可以进行(拖动、缩放)修改
206
+ eventStartEditable: true, // Event日程开始时间可以改变,默认true,如果是false其实就是指日程块不能随意拖动,只能上下拉伸改变他的endTime
207
+ eventDurationEditable: true, // Event日程的开始结束时间距离是否可以改变,默认true,如果是false则表示开始结束时间范围不能拉伸,只能拖拽
208
+ selectable: true, // 是否可以选中日历格
209
+ selectMirror: true,
210
+ selectMinDistance: 0, // 选中日历格的最小距离
211
+ dayMaxEvents: true,
212
+ weekends: true,
213
+ // navLinks: true, // 天链接
214
+ selectHelper: false,
215
+ slotEventOverlap: false, // 相同时间段的多个日程视觉上是否允许重叠,默认true允许
216
+ eventResizableFromStart: true,
217
+ moreLinkContent: ({ num }) => `还有${num}个日程`,
218
+ now: new Date(),
219
+ events: [],
220
+ // 表头内容
221
+ dayHeaderContent: this.dayHeaderContentRender,
222
+ eventContent: this.eventContentRender
223
+ }
224
+ };
225
+ },
226
+ beforeCreate() {
227
+ axiosInstance.interceptors.request.use(config => {
228
+ config.headers['Authorization'] = 'bearer ' + this.token;
229
+ config.baseURL = '/' + this.serverPrefix;
230
+ return config;
231
+ });
232
+ },
233
+ async created() {
234
+ // await this.queryScheduleList();
235
+ // await this.getSchedulerList();
236
+ // await this.getSchedulerData();
237
+ },
238
+ async mounted() {
239
+ this.calendar = this.$refs.fullCalendar.calendar;
240
+ await this.queryScheduleList();
241
+ // try {
242
+ // this.loading = true;
243
+ // this.calendar = this.$refs.fullCalendar.calendar;
244
+ // // await this.getScheduleSettingt();
245
+ // // await this.getSchedulerList();
246
+ // // await this.getSchedulerData();
247
+ // } catch (err) {
248
+ // this.loading = false;
249
+ // } finally {
250
+ // this.loading = false;
251
+ // }
252
+ },
253
+ methods: {
254
+ async queryScheduleList() {
255
+ this.loading = true;
256
+ try {
257
+ const data = await queryScheduleListApi({
258
+ ...this.currentDate,
259
+ userId: this.userId,
260
+ orgId: this.orgId
261
+ });
262
+ if (!data.success) return;
263
+
264
+ if (vexutils.isArray(data.data)) {
265
+ this.calendarOptions.events = data.data.map(item => ({ ...item, start: item.startTime, end: item.endTime }));
266
+ } else {
267
+ this.calendarOptions.events = [];
268
+ }
269
+ // this.dateValue && this.calendar.gotoDate(this.dateValue._d);
270
+ } catch (error) {
271
+ console.log(error);
272
+ } finally {
273
+ this.loading = false;
274
+ }
275
+ },
276
+ async saveOrUpdateSchedule(params) {
277
+ try {
278
+ const data = await saveOrUpdateScheduleApi(params);
279
+ if (data.success) this.$message.success('保存成功');
280
+ await this.queryScheduleList();
281
+ } catch (error) {
282
+ console.log(error);
283
+ } finally {
284
+ this.loading = false;
285
+ }
286
+ },
287
+ async delSchedule(params) {
288
+ try {
289
+ const data = await delScheduleApi(params);
290
+ if (data.success) {
291
+ this.$message.success('删除成功');
292
+ this.calendarOptions.events = this.calendarOptions.events.filter(item => item.scheduleId === params.scheduleId);
293
+ }
294
+ // await this.queryScheduleList();
295
+ } catch (error) {
296
+ console.log(error);
297
+ } finally {
298
+ this.loading = false;
299
+ }
300
+ },
301
+ eventContentRender(info) {
302
+ const { avatar, scheduleId, table, isAllDay, statusFlag } = info.event.extendedProps;
303
+
304
+ const tagProps = {
305
+ viewType: this.viewType,
306
+ statusFlag,
307
+ avatar,
308
+ title: info.event.title,
309
+ isAllDay,
310
+ item: info.event.extendedProps
311
+ };
312
+ return [<Tag props={tagProps} on={this.$listeners}></Tag>];
313
+ },
314
+ dayHeaderContentRender({ date }) {
315
+ const weekday = ['日', '一', '二', '三', '四', '五', '六'];
316
+ const day = date.getDate();
317
+ const week = date.getDay();
318
+
319
+ let html = `<span>周${weekday[week]}</span>`;
320
+ if (this.calendar?.view?.type === 'timeGridWeek') {
321
+ html = `<div class="week-header">
322
+ <span>周${weekday[week]}</span>
323
+ <span class="week-day">${day}</span>
324
+ </div>`;
325
+ } else if (this.calendar?.view?.type === 'dayGridMonth') {
326
+ html = `<div class="month-header">周${weekday[week]}</div>`;
327
+ }
328
+ return { html };
329
+ },
330
+ handleDate(changeType) {
331
+ if (this.loading) return;
332
+ const dateValue = changeType ? this.dateValue.clone()[changeType](1, this.viewType) : moment();
333
+ this.dateValue = dateValue;
334
+ switch (changeType) {
335
+ case 'subtract':
336
+ this.calendar.prev();
337
+ break;
338
+ case 'add':
339
+ this.calendar.next();
340
+ break;
341
+ default:
342
+ this.calendar.today();
343
+ this.calendar.gotoDate(dateValue._d);
344
+ break;
345
+ }
346
+
347
+ // this.calendarOptions.now = dateValue._d;
348
+ this.handleCurrentDateChange();
349
+ },
350
+ handleCurrentDateChange() {
351
+ const date = moment(this.dateValue).format('YYYY-MM-DD');
352
+ let currentDate = {};
353
+ switch (this.viewType) {
354
+ case 'day':
355
+ currentDate = formatDate(date, 'day');
356
+ break;
357
+ case 'week':
358
+ currentDate = formatDate(date, 'week');
359
+ break;
360
+ default:
361
+ currentDate = formatDate(date, 'month');
362
+ break;
363
+ }
364
+ Object.assign(this.currentDate, currentDate);
365
+ this.queryScheduleList();
366
+ },
367
+ handleAdd() {
368
+ this.$emit('add', {});
369
+ },
370
+ handleSelect({ start, end }, type = 'add') {
371
+ const startTime = moment(start).format('YYYY-MM-DD HH:mm:ss');
372
+ const endTime = moment(end).format('YYYY-MM-DD HH:mm:ss');
373
+ if (moment(start).valueOf() < moment().valueOf()) {
374
+ this.$confirm({
375
+ title: '提示',
376
+ content: '日程开始时间小于当前时间,是否继续?',
377
+ okText: '确定',
378
+ cancelText: '取消',
379
+ onOk: () => {
380
+ this.$emit(type, { startTime, endTime });
381
+ },
382
+ onCancel: () => {
383
+ if (type === 'edit') {
384
+ this.queryScheduleList();
385
+ }
386
+ }
387
+ });
388
+ } else {
389
+ this.$emit(type, { startTime, endTime });
390
+ }
391
+ },
392
+ handleDrop({ event, oldEvent }) {
393
+ this.handleSelect(event, 'edit');
394
+ },
395
+ handleChangeView(value) {
396
+ if (this.viewType === value) return;
397
+ this.viewType = value;
398
+
399
+ switch (value) {
400
+ case 'day':
401
+ this.calendar.changeView('timeGridDay');
402
+ break;
403
+ case 'week':
404
+ this.calendar.changeView('timeGridWeek');
405
+ break;
406
+ case 'month':
407
+ this.calendar.changeView('dayGridMonth');
408
+ break;
409
+ }
410
+
411
+ this.handleCurrentDateChange();
412
+ }
413
+ },
414
+ beforeDestroy() {}
415
+ });
416
+ </script>
417
+ <style lang="less" scoped>
418
+ @primary-color: #2d7aff;
419
+
420
+ .c-full-calendar {
421
+ display: flex;
422
+ flex-flow: column nowrap;
423
+ width: 100%;
424
+ height: 100%;
425
+ /deep/ .tag-detail-wrpper {
426
+ display: none;
427
+ }
428
+ /deep/.loading {
429
+ position: absolute;
430
+ left: 0;
431
+ top: 0;
432
+ display: flex;
433
+ justify-content: center;
434
+ flex-direction: column;
435
+ align-items: center;
436
+ width: 100%;
437
+ height: 100%;
438
+ z-index: 9999;
439
+ background: rgba(255, 255, 255, 0.7);
440
+ .ant-spin-text {
441
+ margin-top: 8px;
442
+ }
443
+ }
444
+ .search-wrapper {
445
+ display: flex;
446
+ justify-content: space-between;
447
+ align-items: center;
448
+ flex: 0 0 48px;
449
+ padding: 0 15px;
450
+ }
451
+ .main-wrapper {
452
+ display: flex;
453
+ width: 100%;
454
+ flex: 1;
455
+ .full-calendar {
456
+ display: flex;
457
+ flex-flow: column nowrap;
458
+ flex: 1;
459
+ &__header {
460
+ display: inline-flex;
461
+ align-items: center;
462
+ flex: 0 0 66px;
463
+ padding: 0 15px;
464
+ background: #f7f7f7;
465
+ .header-left {
466
+ color: #212121;
467
+ span {
468
+ display: inline-block;
469
+ }
470
+ .ant-icon {
471
+ font-size: 12px;
472
+ }
473
+ .calendar-quick {
474
+ height: 34px;
475
+ line-height: 34px;
476
+ padding: 0 14px;
477
+ border: 1px solid #d9d9d9;
478
+ cursor: pointer;
479
+ &:hover {
480
+ color: #2d7aff;
481
+ background: rgba(36, 116, 255, 0.1);
482
+ border-color: rgba(36, 116, 255, 0.2);
483
+ i {
484
+ color: #2d7aff;
485
+ }
486
+ }
487
+ &:active {
488
+ color: #2d7aff;
489
+ background: rgba(36, 116, 255, 0.2);
490
+ border-color: #2d7aff;
491
+ i {
492
+ color: #2d7aff;
493
+ }
494
+ }
495
+ &.disabled {
496
+ color: rgba(0, 0, 0, 0.6);
497
+ background: #f7f7f7;
498
+ border: 1px solid #d9d9d9;
499
+ cursor: not-allowed;
500
+ background: #ffffff;
501
+ }
502
+ }
503
+ .btn-today {
504
+ border-radius: 4px;
505
+ border: 1px solid #d9d9d9;
506
+ background: #ffffff;
507
+ }
508
+
509
+ .btn-prev {
510
+ margin-left: 8px;
511
+ border-bottom-left-radius: 4px;
512
+ border-top-left-radius: 4px;
513
+ &:hover {
514
+ box-shadow: 1px 0 0 0 rgba(36, 116, 255, 0.2);
515
+ }
516
+ &:active {
517
+ box-shadow: 1px 0 0 0 #2d7aff;
518
+ }
519
+ }
520
+ .btn-next {
521
+ margin-left: -1px;
522
+ border-bottom-right-radius: 4px;
523
+ border-top-right-radius: 4px;
524
+ background: #ffffff; // 12
525
+ }
526
+ .time-title {
527
+ margin-left: 16px;
528
+ font-size: 18px;
529
+ }
530
+ }
531
+ .header-right {
532
+ display: inline-flex;
533
+ align-items: center;
534
+ margin-left: auto;
535
+ .viewshow-wrap {
536
+ display: inline-flex;
537
+ align-items: center;
538
+ height: 34px;
539
+ padding: 4px;
540
+ color: #212121;
541
+ border-radius: 6px;
542
+ background: #e5e5e5;
543
+ box-sizing: border-box;
544
+ span {
545
+ display: inline-flex;
546
+ align-items: center;
547
+ height: 100%;
548
+ padding: 4px 14px;
549
+ border-radius: 4px;
550
+ cursor: pointer;
551
+ &.active {
552
+ background: #ffffff;
553
+ box-shadow: 0px 1px 2px 0px rgba(154, 154, 154, 0.5);
554
+ }
555
+ }
556
+ }
557
+ }
558
+ }
559
+ /* 插件样式 */
560
+ /deep/ .full-calendar__body {
561
+ width: 100%;
562
+ flex: 1;
563
+ box-sizing: border-box;
564
+
565
+ .fc-header-toolbar {
566
+ margin-bottom: 0;
567
+ }
568
+
569
+ .fc-scroller {
570
+ &::-webkit-scrollbar {
571
+ width: 0px;
572
+ }
573
+ }
574
+
575
+ .fc-more-popover {
576
+ background: #fff;
577
+ box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
578
+ border-radius: 8px;
579
+ border: 1px solid #d5d5d5;
580
+ width: 208px;
581
+ box-sizing: border-box;
582
+ .fc-popover-header {
583
+ height: 50px;
584
+ line-height: 50px;
585
+ padding: 0 16px;
586
+ color: #000;
587
+ border-radius: 8px 8px 0 0;
588
+ box-sizing: border-box;
589
+ background: #fff;
590
+ border-bottom: 1px solid #e6e6e6;
591
+ .fc-titlefc-popover-title {
592
+ font-size: 16px;
593
+ }
594
+ .fc-popover-close {
595
+ font-size: 18px;
596
+ }
597
+ }
598
+ .fc-popover-body {
599
+ height: 156px;
600
+ padding: 8px 14px;
601
+ box-sizing: border-box;
602
+ margin-right: 0px;
603
+ }
604
+ .fc-daygrid-event {
605
+ margin: 0;
606
+ margin-bottom: 7px;
607
+ }
608
+ }
609
+
610
+ .fc-timegrid-slot-minor {
611
+ border-top-style: hidden;
612
+ }
613
+
614
+ .fc-event {
615
+ background: transparent !important;
616
+ border-color: transparent !important;
617
+ padding-right: 0px;
618
+ }
619
+ .fc-event + .fc-event {
620
+ margin-left: 4px;
621
+ }
622
+
623
+ .week-header {
624
+ display: flex;
625
+ flex-direction: column;
626
+ justify-content: center;
627
+ height: 71px;
628
+ padding-top: 4px;
629
+ color: #212121;
630
+ background: #fff;
631
+ box-sizing: border-box;
632
+ .week-day {
633
+ font-size: 30px;
634
+ }
635
+ }
636
+ .fc-day-past .week-header {
637
+ color: rgba(33, 33, 33, 0.4);
638
+ .week-day {
639
+ color: rgba(33, 33, 33, 0.4);
640
+ }
641
+ }
642
+ .fc-day-today .week-header {
643
+ color: @primary-color;
644
+ .week-day {
645
+ color: @primary-color;
646
+ }
647
+ }
648
+
649
+ .month-header {
650
+ height: 71px;
651
+ line-height: 71px;
652
+ font-size: 16px;
653
+ color: #212121;
654
+ background: #fff;
655
+ }
656
+
657
+ .fc-timegrid-body .fc-day-today {
658
+ background-color: #fff;
659
+ }
660
+
661
+ .fc-daygrid-day {
662
+ background-color: #fff;
663
+
664
+ .fc-daygrid-day-top {
665
+ flex-direction: row;
666
+ .fc-daygrid-day-number {
667
+ width: 26px;
668
+ height: 26px;
669
+ line-height: 26px;
670
+ color: #000;
671
+ font-size: 19px;
672
+ text-align: center;
673
+ padding: 4px;
674
+ overflow: hidden;
675
+ box-sizing: content-box;
676
+ margin: 2px 0 0 2px;
677
+ }
678
+ }
679
+ &.fc-day-today {
680
+ background-color: #f2f7ff;
681
+ .fc-daygrid-day-number {
682
+ color: #fff;
683
+ background-color: #2d7aff;
684
+ border-radius: 50%;
685
+ }
686
+ }
687
+ }
688
+ }
689
+ }
690
+ .sidebar {
691
+ flex: 0 0 240px;
692
+ }
693
+ }
694
+ }
695
+ </style>