Selaa lähdekoodia

修改日 周 月视图

chenxiaochao 3 viikkoa sitten
vanhempi
commit
44672e38e7

+ 20 - 20
apps/web-ele/src/views/schedule/view/components/day/index.vue

@@ -249,14 +249,7 @@ function hexToRgb(hex) {
249 249
           class="flex items-center justify-between rounded-b-lg border border-t-0 border-gray-200 p-4"
250 250
           :style="{ backgroundColor: `rgba(${hexToRgb(task.color)}, 0.35)` }"
251 251
         >
252
-          <div class="flex min-w-0 flex-1 items-center">
253
-            <div class="min-w-0">
254
-              <div class="truncate font-medium">
255
-                {{ task.title }}
256
-              </div>
257
-            </div>
258
-          </div>
259
-          <div class="flex items-center">
252
+          <div class="flex items-center" style="margin-right: 8px">
260 253
             <span
261 254
               class="flex-none rounded px-2 py-0.5 text-xs font-medium"
262 255
               :class="{
@@ -268,6 +261,13 @@ function hexToRgb(hex) {
268 261
               {{ task.status }}
269 262
             </span>
270 263
           </div>
264
+          <div class="flex min-w-0 flex-1 items-center">
265
+            <div class="min-w-0">
266
+              <div class="truncate font-medium">
267
+                {{ task.title }}
268
+              </div>
269
+            </div>
270
+          </div>
271 271
         </div>
272 272
       </div>
273 273
     </div>
@@ -295,12 +295,7 @@ function hexToRgb(hex) {
295 295
           class="flex items-center justify-between rounded-b-lg border border-t-0 border-gray-200 p-4"
296 296
           :style="{ backgroundColor: `rgba(${hexToRgb(task.color)}, 0.35)` }"
297 297
         >
298
-          <div class="flex min-w-0 flex-1 items-center">
299
-            <div class="min-w-0">
300
-              <div class="truncate font-medium">{{ task.title }}</div>
301
-            </div>
302
-          </div>
303
-          <div class="flex items-center">
298
+          <div class="flex items-center" style="margin-right: 8px">
304 299
             <span
305 300
               v-if="task.status"
306 301
               class="flex-none rounded px-2 py-0.5 text-xs font-medium"
@@ -313,6 +308,11 @@ function hexToRgb(hex) {
313 308
               {{ task.status }}
314 309
             </span>
315 310
           </div>
311
+          <div class="flex min-w-0 flex-1 items-center">
312
+            <div class="min-w-0">
313
+              <div class="truncate font-medium">{{ task.title }}</div>
314
+            </div>
315
+          </div>
316 316
         </div>
317 317
       </div>
318 318
     </div>
@@ -340,12 +340,7 @@ function hexToRgb(hex) {
340 340
           class="flex items-center justify-between rounded-b-lg border border-t-0 border-gray-200 p-4"
341 341
           :style="{ backgroundColor: `rgba(${hexToRgb(task.color)}, 0.35)` }"
342 342
         >
343
-          <div class="flex min-w-0 flex-1 items-center">
344
-            <div class="min-w-0">
345
-              <div class="truncate font-medium">{{ task.title }}</div>
346
-            </div>
347
-          </div>
348
-          <div class="flex items-center">
343
+          <div class="flex items-center" style="margin-right: 8px">
349 344
             <span
350 345
               v-if="task.status"
351 346
               class="flex-none rounded px-2 py-0.5 text-xs font-medium"
@@ -358,6 +353,11 @@ function hexToRgb(hex) {
358 353
               {{ task.status }}
359 354
             </span>
360 355
           </div>
356
+          <div class="flex min-w-0 flex-1 items-center">
357
+            <div class="min-w-0">
358
+              <div class="truncate font-medium">{{ task.title }}</div>
359
+            </div>
360
+          </div>
361 361
         </div>
362 362
       </div>
363 363
     </div>

+ 224 - 31
apps/web-ele/src/views/schedule/view/components/month/index.vue

@@ -1,15 +1,14 @@
1 1
 <script setup>
2
-import { ref, computed, watch } from 'vue';
2
+import { ref, computed, watch, defineEmits } from 'vue';
3 3
 import { ElCalendar, ElTooltip } from 'element-plus';
4
-
4
+import dayjs from 'dayjs';
5 5
 // Props from parent component
6
-const props = defineProps({
7
-  month: {
8
-    type: Number,
9
-    required: true,
10
-    default: '',
11
-  },
12
-});
6
+const props = defineProps(['month']);
7
+// const emit = defineEmits(['update:month']);
8
+// 控制展开状态
9
+const expandedDates = ref({});
10
+// 最大显示任务数
11
+const MAX_DISPLAY_TASKS = 4;
13 12
 // 模拟任务数据
14 13
 const tasks = ref([
15 14
   {
@@ -252,8 +251,47 @@ const tasks = ref([
252 251
     status: 'cancelled',
253 252
     department: '人力资源部',
254 253
   },
254
+  {
255
+    id: 31,
256
+    name: '龙飞街量缸试水检查',
257
+    date: '2025-12-17',
258
+    start: '07:59',
259
+    status: 'processable',
260
+    department: '管理部',
261
+  },
262
+  {
263
+    id: 32,
264
+    name: '龙飞街量缸试水检查',
265
+    date: '2025-12-17',
266
+    start: '07:59',
267
+    status: 'processable',
268
+    department: '管理部',
269
+  },
270
+  {
271
+    id: 33,
272
+    name: '龙飞街量缸试水检查',
273
+    date: '2025-12-17',
274
+    start: '07:59',
275
+    status: 'processable',
276
+    department: '管理部',
277
+  },
278
+  {
279
+    id: 34,
280
+    name: '龙飞街量缸试水检查',
281
+    date: '2025-12-17',
282
+    start: '07:59',
283
+    status: 'processable',
284
+    department: '管理部',
285
+  },
286
+  {
287
+    id: 35,
288
+    name: '龙飞街量缸试水检查',
289
+    date: '2025-12-17',
290
+    start: '07:59',
291
+    status: 'processable',
292
+    department: '管理部',
293
+  },
255 294
 ]);
256
-
257 295
 // Get task status class based on task properties
258 296
 const getTaskStatusClass = (task) => {
259 297
   switch (task.status) {
@@ -275,7 +313,6 @@ const getTaskStatusClass = (task) => {
275 313
     }
276 314
   }
277 315
 };
278
-
279 316
 // Get tasks for a specific date
280 317
 const getTasksForDate = (date) => {
281 318
   const dateStr = date.toISOString().split('T')[0];
@@ -286,7 +323,28 @@ const getTasksForDate = (date) => {
286 323
     return false;
287 324
   });
288 325
 };
326
+// Toggle expand/collapse for a date
327
+const toggleExpand = (date) => {
328
+  const dateStr = date.toISOString().split('T')[0];
329
+  expandedDates.value[dateStr] = !expandedDates.value[dateStr];
330
+};
289 331
 
332
+// Get filtered tasks based on expand state
333
+const getFilteredTasks = (date) => {
334
+  const allTasks = getTasksForDate(date);
335
+  const dateStr = date.toISOString().split('T')[0];
336
+  const isExpanded = expandedDates.value[dateStr] || false;
337
+
338
+  if (isExpanded || allTasks.length <= MAX_DISPLAY_TASKS) {
339
+    return allTasks;
340
+  }
341
+  return allTasks.slice(0, MAX_DISPLAY_TASKS);
342
+};
343
+// Check if a date is expanded
344
+const isDateExpanded = (date) => {
345
+  const dateStr = date.toISOString().split('T')[0];
346
+  return expandedDates.value[dateStr] || false;
347
+};
290 348
 // 状态对应颜色(与其他视图保持一致)
291 349
 const statusColor = (status) => {
292 350
   switch (status) {
@@ -302,27 +360,31 @@ const statusColor = (status) => {
302 360
       return '#CCCCCC';
303 361
   }
304 362
 };
305
-
306
-// Set initial calendar value based on props
307
-const initialCalendarValue = computed(() => {
308
-  if (props.month) {
309
-    // If month prop is provided, use it to set the calendar month
310
-    return new Date(`2025-${props.month.toString().padStart(2, '0')}-01`);
311
-  }
312
-  // Default to December 2025 where there are tasks
313
-  return new Date('2025-12-01');
314
-});
363
+const todayWeek = computed(() => dayjs().day() - 1);
364
+// const handleDateClick = (data)=>{
365
+//   console.log(new Date(data.day));
366
+  
367
+//   emit('update:month', new Date(data.day));
368
+// }
369
+// const isSelectedDate = (dayStr) => {
370
+//   return dayjs(dayStr).isSame(dayjs(props.month), 'day')
371
+// }
315 372
 </script>
316 373
 
317 374
 <template>
318 375
   <div class="month-schedule">
319
-    <ElCalendar :model-value="initialCalendarValue">
376
+    <ElCalendar v-model="props.month">
320 377
       <template #date-cell="{ data }">
321
-        <div class="calendar-cell">
322
-          <div class="cell-date-number">{{ data.date.getDate() }}</div>
378
+        <div
379
+          class="calendar-cell"
380
+          :class="{ expanded: isDateExpanded(data.date) }"
381
+        >
382
+          <div class="cell-date-number">
383
+            {{ data.date.getDate() }}
384
+          </div>
323 385
           <div class="tasks-container">
324 386
             <div
325
-              v-for="task in getTasksForDate(data.date)"
387
+              v-for="task in getFilteredTasks(data.date)"
326 388
               :key="task.id"
327 389
               class="task-item"
328 390
               :class="getTaskStatusClass(task)"
@@ -336,13 +398,25 @@ const initialCalendarValue = computed(() => {
336 398
                     class="task-dot"
337 399
                     :style="{ backgroundColor: statusColor(task.status) }"
338 400
                   ></span>
339
-                  <span v-if="task.start || task.time" class="task-time">{{
340
-                    task.start || task.time
341
-                  }}</span>
401
+                  <span v-if="task.start || task.time" class="task-time">
402
+                    {{ task.start || task.time }}
403
+                  </span>
342 404
                   <span class="task-name">{{ task.name }}</span>
343 405
                 </div>
344 406
               </ElTooltip>
345 407
             </div>
408
+            <!-- Expand/Collapse button -->
409
+            <div
410
+              v-if="getTasksForDate(data.date).length > MAX_DISPLAY_TASKS"
411
+              class="expand-button"
412
+              @click="toggleExpand(data.date)"
413
+            >
414
+              {{
415
+                expandedDates[data.date.toISOString().split('T')[0]]
416
+                  ? '收起'
417
+                  : `还有 ${getTasksForDate(data.date).length - MAX_DISPLAY_TASKS} 个日程...`
418
+              }}
419
+            </div>
346 420
           </div>
347 421
         </div>
348 422
       </template>
@@ -354,6 +428,71 @@ const initialCalendarValue = computed(() => {
354 428
 :deep(.el-calendar__button-group) {
355 429
   display: none;
356 430
 }
431
+:deep(.el-calendar-table thead th) {
432
+  text-align: left;
433
+  padding-left: 10px;
434
+  color: #d61111;
435
+  font-size: 12px;
436
+  font-weight: 400;
437
+}
438
+
439
+/* 今天对应的星期标题高亮 */
440
+:deep(.el-calendar-table thead th:nth-child(1)) {
441
+  /* background-color: v-bind("todayWeek === 0 ? '#409eff' : 'transparent'"); */
442
+  color: v-bind("todayWeek === 0 ? '#409eff' : '#959DA8'");
443
+}
444
+:deep(.el-calendar-table thead th:nth-child(2)) {
445
+  /* background-color: v-bind("todayWeek === 1 ? '#409eff' : 'transparent'"); */
446
+  color: v-bind("todayWeek === 1 ? '#409eff' : '#959DA8'");
447
+}
448
+:deep(.el-calendar-table thead th:nth-child(3)) {
449
+  /* background-color: v-bind("todayWeek === 2 ? '#409eff' : 'transparent'"); */
450
+  color: v-bind("todayWeek === 2 ? '#409eff' : '#959DA8'");
451
+}
452
+:deep(.el-calendar-table thead th:nth-child(4)) {
453
+  /* background-color: v-bind("todayWeek === 3 ? '#409eff' : 'transparent'"); */
454
+  color: v-bind("todayWeek === 3 ? '#409eff' : '#959DA8'");
455
+}
456
+:deep(.el-calendar-table thead th:nth-child(5)) {
457
+  /* background-color: v-bind("todayWeek === 4 ? '#409eff' : 'transparent'"); */
458
+  color: v-bind("todayWeek === 4 ? '#409eff' : '#959DA8'");
459
+}
460
+:deep(.el-calendar-table thead th:nth-child(6)) {
461
+  /* background-color: v-bind("todayWeek === 5 ? '#409eff' : 'transparent'"); */
462
+  color: v-bind("todayWeek === 5 ? '#409eff' : '#959DA8'");
463
+}
464
+:deep(.el-calendar-table thead th:nth-child(7)) {
465
+  /* background-color: v-bind("todayWeek === 6 ? '#409eff' : 'transparent'"); */
466
+  color: v-bind("todayWeek === 6 ? '#409eff' : '#959DA8'");
467
+}
468
+
469
+:deep(.el-calendar-table thead th:nth-child(1)):before {
470
+  content: '周';
471
+}
472
+
473
+:deep(.el-calendar-table thead th:nth-child(2)):before {
474
+  content: '周';
475
+}
476
+
477
+:deep(.el-calendar-table thead th:nth-child(3)):before {
478
+  content: '周';
479
+}
480
+
481
+:deep(.el-calendar-table thead th:nth-child(4)):before {
482
+  content: '周';
483
+}
484
+
485
+:deep(.el-calendar-table thead th:nth-child(5)):before {
486
+  content: '周';
487
+}
488
+
489
+:deep(.el-calendar-table thead th:nth-child(6)):before {
490
+  content: '周';
491
+}
492
+
493
+:deep(.el-calendar-table thead th:nth-child(7)):before {
494
+  content: '周';
495
+}
357 496
 .month-schedule {
358 497
   width: 100%;
359 498
   overflow-x: auto;
@@ -368,16 +507,39 @@ const initialCalendarValue = computed(() => {
368 507
   flex-direction: column;
369 508
 }
370 509
 
510
+.calendar-cell.expanded {
511
+  position: absolute;
512
+  top: 0;
513
+  left: 0;
514
+  right: 0;
515
+  z-index: 10;
516
+  background-color: #f9f9f9;
517
+  border: 1px solid #e5e5e5;
518
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
519
+  padding: 6px 6px 4px 6px;
520
+  box-sizing: border-box;
521
+  display: flex;
522
+  flex-direction: column;
523
+  height: auto !important;
524
+  min-height: 150px;
525
+}
526
+
527
+::v-deep .el-calendar-day {
528
+  position: relative;
529
+}
530
+
371 531
 .cell-date-number {
372 532
   position: absolute;
373 533
   top: 6px;
374 534
   left: 8px;
375 535
   font-size: 12px;
376
-  color: #666;
536
+  /* color: #666; */
377 537
   font-weight: 600;
378 538
   z-index: 3;
379 539
 }
380
-
540
+.selected {
541
+  color: #409eff;
542
+}
381 543
 .tasks-container {
382 544
   margin-top: 22px;
383 545
 }
@@ -409,7 +571,7 @@ const initialCalendarValue = computed(() => {
409 571
 }
410 572
 
411 573
 .status-indicator.processable {
412
-  background-color: #000;
574
+  background-color: #67c23a !important;
413 575
 }
414 576
 
415 577
 .status-indicator.overdue {
@@ -439,14 +601,27 @@ const initialCalendarValue = computed(() => {
439 601
   flex-direction: column;
440 602
 } */
441 603
 
604
+::v-deep .el-calendar-table__row {
605
+  height: 150px !important;
606
+}
607
+
442 608
 ::v-deep .el-calendar-table__row .current {
443 609
   height: 150px;
444 610
 }
445 611
 
446 612
 ::v-deep .el-calendar-table__row .el-calendar-day {
613
+  height: 150px !important;
614
+  min-height: 150px;
615
+}
616
+
617
+::v-deep .el-calendar-table__row .el-calendar-day.expanded {
447 618
   height: 150px;
448 619
 }
449 620
 
621
+::v-deep .el-calendar-day {
622
+  position: relative;
623
+}
624
+
450 625
 .date-text {
451 626
   font-weight: bold;
452 627
   margin-bottom: 4px;
@@ -454,6 +629,10 @@ const initialCalendarValue = computed(() => {
454 629
 
455 630
 .tasks-container {
456 631
   flex: 1;
632
+  overflow-y: visible;
633
+}
634
+
635
+.calendar-cell:not(.expanded) .tasks-container {
457 636
   overflow-y: auto;
458 637
 }
459 638
 
@@ -494,6 +673,20 @@ const initialCalendarValue = computed(() => {
494 673
   flex: 0 0 40px;
495 674
 }
496 675
 
676
+/* Expand button styles */
677
+.expand-button {
678
+  font-size: 11px;
679
+  color: #409eff;
680
+  cursor: pointer;
681
+  margin-top: 4px;
682
+  padding: 2px 0;
683
+}
684
+
685
+.expand-button:hover {
686
+  /* color: #409eff; */
687
+  text-decoration: underline;
688
+}
689
+
497 690
 /* Task status styles */
498 691
 .task-item.not-started {
499 692
   color: #999;

File diff suppressed because it is too large
+ 957 - 345
apps/web-ele/src/views/schedule/view/components/week/index.vue


+ 103 - 28
apps/web-ele/src/views/schedule/view/index.vue

@@ -5,7 +5,13 @@ import { Page, useVbenDrawer } from '@vben/common-ui';
5 5
 
6 6
 import dayjs from 'dayjs';
7 7
 import { ElCheckbox, ElRadioButton, ElRadioGroup } from 'element-plus';
8
-
8
+import {
9
+  Tickets,
10
+  Plus,
11
+  User,
12
+  CaretLeft,
13
+  CaretRight,
14
+} from '@element-plus/icons-vue';
9 15
 import CreateTasK from './components/create/index.vue';
10 16
 import Day from './components/day/index.vue';
11 17
 import Month from './components/month/index.vue';
@@ -15,7 +21,7 @@ import Week from './components/week/index.vue';
15 21
 const getDefaultDate = (type: string) => {
16 22
   switch (type) {
17 23
     case 'month': {
18
-      return dayjs().format('YYYY-MM');
24
+      return dayjs().format('YYYY-MM-DD');
19 25
     }
20 26
     case 'week': {
21 27
       return dayjs().format('YYYY-MM-DD');
@@ -34,6 +40,7 @@ const searchParams = ref({
34 40
 
35 41
 // 当前显示的日期
36 42
 const currentDate = ref(dayjs());
43
+const currentDate2 = ref(dayjs()); //单独给月份的时间
37 44
 
38 45
 // 任务授权状态
39 46
 const taskStatuses = ref({
@@ -48,6 +55,22 @@ watch(
48 55
   (newType) => {
49 56
     searchParams.value.date = getDefaultDate(newType);
50 57
     currentDate.value = dayjs(searchParams.value.date);
58
+    currentDate2.value = dayjs(searchParams.value.date); //单独给月份的时间
59
+  },
60
+);
61
+
62
+// 确保currentDate和currentDate2始终保持同步
63
+watch(
64
+  () => currentDate.value,
65
+  (newDate) => {
66
+    currentDate2.value = newDate;
67
+  },
68
+);
69
+//单独给月份的监听器
70
+watch(
71
+  () => currentDate2.value,
72
+  (newDate) => {
73
+    currentDate.value = newDate;
51 74
   },
52 75
 );
53 76
 
@@ -151,17 +174,17 @@ const calendarDays = computed(() => {
151 174
 // 切换到上个月
152 175
 const prevMonth = () => {
153 176
   currentDate.value = currentDate.value.subtract(1, 'month');
177
+  currentDate2.value = currentDate2.value.subtract(1, 'month');
154 178
 };
155 179
 
156 180
 // 切换到下个月
157 181
 const nextMonth = () => {
158 182
   currentDate.value = currentDate.value.add(1, 'month');
183
+  currentDate2.value = currentDate2.value.add(1, 'month');
159 184
 };
160 185
 
161 186
 // 选择日期
162 187
 const selectDate = (date: string) => {
163
-  console.log(date);
164
-  
165 188
   searchParams.value.date = date;
166 189
 };
167 190
 
@@ -174,17 +197,7 @@ const [CreateTaskDrawer, createTaskDrawerApi] = useVbenDrawer({
174 197
 const createTaskDrawerEvent = () => {
175 198
   createTaskDrawerApi.setData({ isUpdate: false }).open();
176 199
 };
177
-
178
-// 禁止页面滚动
179
-// const _bodyOverflowBackup = ref('');
180
-// onMounted(() => {
181
-//   _bodyOverflowBackup.value = document.body.style.overflow || '';
182
-//   document.body.style.overflow = 'hidden';
183
-// });
184
-// onUnmounted(() => {
185
-//   document.body.style.overflow = _bodyOverflowBackup.value || '';
186
-//   _bodyOverflowBackup.value = '';
187
-// });
200
+console.log(currentDate.value);
188 201
 </script>
189 202
 
190 203
 <template>
@@ -215,18 +228,28 @@ const createTaskDrawerEvent = () => {
215 228
           <div class="flex items-center justify-between">
216 229
             <!--时间筛选靠左-->
217 230
             <div class="flex items-center space-x-2">
218
-              <ElButton type="text" @click="prevMonth">&lt;</ElButton>
231
+              <el-icon><CaretLeft @click="prevMonth" /></el-icon>
219 232
               <span class="font-medium">{{
220 233
                 currentDate.format('YYYY年 M月')
221 234
               }}</span>
222
-              <ElButton type="text" @click="nextMonth">&gt;</ElButton>
235
+              <el-icon><CaretRight @click="nextMonth" /></el-icon>
223 236
             </div>
224 237
 
225 238
             <!--视图切换靠右-->
226
-            <ElRadioGroup v-model="searchParams.timeType" size="small">
227
-              <ElRadioButton label="day">日</ElRadioButton>
228
-              <ElRadioButton label="week">周</ElRadioButton>
229
-              <ElRadioButton label="month">月</ElRadioButton>
239
+            <ElRadioGroup
240
+              v-model="searchParams.timeType"
241
+              size="small"
242
+              class="custom-radio-group"
243
+            >
244
+              <ElRadioButton label="day" class="custom-radio-btn"
245
+                >日</ElRadioButton
246
+              >
247
+              <ElRadioButton label="week" class="custom-radio-btn"
248
+                >周</ElRadioButton
249
+              >
250
+              <ElRadioButton label="month" class="custom-radio-btn"
251
+                >月</ElRadioButton
252
+              >
230 253
             </ElRadioGroup>
231 254
           </div>
232 255
 
@@ -248,11 +271,16 @@ const createTaskDrawerEvent = () => {
248 271
               <div
249 272
                 v-for="day in calendarDays"
250 273
                 :key="day.date"
274
+                :style="
275
+                  day.date === '2025-12-22' || day.date === '2025-12-23'
276
+                    ? 'background-color: #FFE6E0'
277
+                    : day.isInCurrentWeek && !day.isToday
278
+                      ? 'background-color: #E6E8EB'
279
+                      : ''
280
+                "
251 281
                 class="flex h-7 w-7 cursor-pointer items-center justify-center rounded text-xs"
252 282
                 :class="{
253
-                  'bg-blue-100 text-blue-600': day.isToday,
254
-                  'bg-blue-50 text-blue-700':
255
-                    day.isInCurrentWeek && !day.isToday,
283
+                  'bg-blue-600 text-white': day.isToday,
256 284
                   'bg-gray-100 text-gray-400': day.isOtherMonth,
257 285
                   'hover:bg-gray-100': !day.isOtherMonth,
258 286
                 }"
@@ -267,7 +295,7 @@ const createTaskDrawerEvent = () => {
267 295
         <!--任务授权状态-->
268 296
         <div class="mb-4">
269 297
           <div class="mb-2 font-medium">任务授权状态:</div>
270
-          <div class="space-y-1">
298
+          <div class="space-y-1" style="display: flex; flex-direction: column">
271 299
             <ElCheckbox v-model="taskStatuses.canAuthorize">
272 300
               任务可授权
273 301
             </ElCheckbox>
@@ -288,11 +316,25 @@ const createTaskDrawerEvent = () => {
288 316
               class="w-full"
289 317
               @click="createTaskDrawerEvent"
290 318
             >
291
-              + 油站新增任务
319
+              <template #icon>
320
+                <el-icon><Plus /></el-icon> </template
321
+              >油站新增任务
292 322
             </ElButton>
293 323
           </div>
294 324
           <div class="mt-1 space-y-2">
295
-            <ElButton type="default" class="w-full"> + 访客新增任务 </ElButton>
325
+            <ElButton type="default" class="w-full"
326
+              ><template #icon>
327
+                <el-icon><User /></el-icon> </template
328
+              >访客新增任务
329
+            </ElButton>
330
+          </div>
331
+          <div class="mt-1 space-y-2">
332
+            <ElButton type="default" class="w-full">
333
+              <template #icon>
334
+                <el-icon><Tickets /></el-icon>
335
+              </template>
336
+              工单提报
337
+            </ElButton>
296 338
           </div>
297 339
         </div>
298 340
       </div>
@@ -312,7 +354,7 @@ const createTaskDrawerEvent = () => {
312 354
             />
313 355
             <Month
314 356
               v-if="searchParams.timeType === 'month'"
315
-              :month="currentDate.month() + 1"
357
+              :month="currentDate"
316 358
             />
317 359
           </div>
318 360
         </ElCard>
@@ -321,3 +363,36 @@ const createTaskDrawerEvent = () => {
321 363
     <CreateTaskDrawer />
322 364
   </Page>
323 365
 </template>
366
+<style scoped lang="scss">
367
+// :deep(.el-card) {
368
+//   border: none !important;
369
+//   box-shadow: none !important;
370
+//   background: transparent !important;
371
+// }
372
+
373
+:deep(.custom-radio-group .el-radio-button) {
374
+  border: none !important;
375
+  // background: transparent !important;
376
+  background-color: #fafafa !important;
377
+  padding: 4px;
378
+}
379
+
380
+:deep(.custom-radio-group .el-radio-button__inner) {
381
+  border: none !important;
382
+  background: transparent !important;
383
+  box-shadow: none !important;
384
+  padding: 0 8px;
385
+}
386
+
387
+:deep(.custom-radio-group .el-radio-button__inner:hover) {
388
+  color: #1890ff !important;
389
+  background: transparent !important;
390
+}
391
+
392
+:deep(.custom-radio-group .el-radio-button.is-active .el-radio-button__inner) {
393
+  background: transparent !important;
394
+  color: #1890ff !important;
395
+  box-shadow: none !important;
396
+  border: none !important;
397
+}
398
+</style>