Browse Source

样式修改

KawsFa 1 year ago
parent
commit
5cbadb9410

+ 1 - 0
vue_project/src/assets/images/exome.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="184" height="184" fill="none" viewBox="0 0 184 184"><g fill="#F5841B" fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path d="m23 173.5.1-.7v.7Zm37.7-42.6a278.3 278.3 0 0 1-27 19.3 379.5 379.5 0 0 1 52.7-64 378.5 378.5 0 0 1 64-52.6 272 272 0 0 1-19.5 27.1 50 50 0 0 1 10 22.4c31.8-37.5 48.9-70.3 39.6-79.6-11.8-11.7-60.8 18.4-109.6 67.2-48.9 48.8-79 97.9-67.2 109.6 9.3 9.3 42-7.7 79.4-39.3a50 50 0 0 1-22.4-10Zm113-108h-.7.6ZM161 10.3l-.1.7v-.7ZM11 160.8h-.6.7Z"/><path d="M11 23.1h.6a2 2 0 0 1-.7 0Zm75.8 74.7a378.6 378.6 0 0 1-52.6-64 274 274 0 0 1 26.2 18.8 50 50 0 0 1 22.2-10.4C45.6 11.1 13.3-5.5 4 3.7-7.6 15.4 22.5 64.5 71.3 113.3s97.9 79 109.6 67.2c9.3-9.3-7.8-42.3-39.8-80a50 50 0 0 1-10.2 22.2 304 304 0 0 1 20 27.7 378.6 378.6 0 0 1-64-52.6Zm74.7 75.9v-.7.7ZM174 161h-.7.7ZM23.6 11.2v-.7.7Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h184v184H0z"/></clipPath></defs></svg>

BIN
vue_project/src/assets/images/商务职业男.png


+ 61 - 38
vue_project/src/components/indexBody.vue

@@ -1,6 +1,15 @@
 <template>
-  <FullCalendar ref="fullCalendar" :options="calendarOptions" class="calendar" id="calendar" />
+  <div>
+
+  </div>
+
+
+  <FullCalendar class="calendar" ref="fullCalendar" :options="calendarOptions">
+  </FullCalendar>
+
 </template>
+
+
 <script>
 import FullCalendar from "@fullcalendar/vue3";
 import dayGridPlugin from "@fullcalendar/daygrid";
@@ -9,12 +18,19 @@ import interactionPlugin from "@fullcalendar/interaction";
 import listPlugin from "@fullcalendar/list";
 import multiMonthPlugin from "@fullcalendar/multimonth";
 import bootstrap5Plugin from '@fullcalendar/bootstrap5';
+import { onMounted } from "vue";
+
 
 
 
 export default {
+
   //import引入的组件需要注入到对象中才能使用
-  components: { FullCalendar },
+  components: {
+    FullCalendar,
+
+  },
+
   data() {
     return {
       calendarOptions: {
@@ -25,10 +41,11 @@ export default {
         unselectAuto: true, //当点击页⾯⽇历以外的位置时,是否⾃动取消当前的选中状态。false是不取消
         selectable: true, //是否可以选中日历格
         editable: true,
-        
+        eventDblClick: this.handleEventDblClick, // 双击日历日程事件 (这部分是在源码中添加的)
+        eventClickDelete: this.eventClickDelete, // 点击删除标签事件 (这部分是在源码中添加的)
         buttonText: {
-          prev:"上一页",
-          next:"下一页",
+          prev: "上一页",
+          next: "下一页",
           today: "今天",
           month: "月",
           week: "周",
@@ -58,13 +75,44 @@ export default {
 
         height: 1150,
         validRange: this.validRange, //设置可显示的总日期范围
-        events: [
+        events: [], //背景色 (添加相同时间的背景色时颜色会重叠)
+        datesSet: this.datesSet, //日期渲染;修改日期范围后触发
+        eventMouseEnter: this.handleEventMouseEnter, //点击日程触发
+        dateClick: this.handleDateClick, //点击日期触发
+        eventDrop: this.calendarEventDropOrResize, //拖动事件触发
+        eventResize: this.calendarEventDropOrResize, //缩放事件触发
+        displayEventTime: false, //不显示具体时间
+        themeSystem: 'bootstrap5',
+        aspectRatio: 1.2, //宽高比
+
+
+      },
+      validRange: {
+        start: "2022-08-26",
+        end: "2023-02-16",
+      },
+
+    };
+
+  },
+  onMounted() {
+    console.log(1);
+      setTimeout(() => { 
+        
+        console.log(this.calendarOptions); }, 2000)
 
+    },
+  methods: {
+    datesSet(info) {
+      //注意:该方法在页面初始化时就会触发一次
+      console.log(info);
+      // this.search()  //请求本页数据
+      this.calendarOptions.events = [
         {
           id: 111,
           title: "国庆节放假",
-          start: "2022-10-01",
-          end: "2022-10-08",
+          start: "2024-10-01",
+          end: "2024-10-08",
           color: "#ffcc99",
           editable: true, //允许拖动缩放,不写默认就是false
           overlap: true, //允许时间重叠,即可以与其他事件并存,不写默认就是false
@@ -72,8 +120,8 @@ export default {
         {
           id: 222,
           title: "五一劳动节放假",
-          start: "2022-05-01",
-          end: "2022-05-06",
+          start: "2024-05-01",
+          end: "2024-05-06",
           color: "#ffcc99",
           editable: true, //允许拖动缩放
         },
@@ -85,34 +133,11 @@ export default {
           color: "#ffcc99",
           editable: true,
         },
-        ], //背景色 (添加相同时间的背景色时颜色会重叠)
-        datesSet: this.datesSet, //日期渲染;修改日期范围后触发
-        eventMouseEnter: this.handleEventMouseEnter, //点击日程触发
-        dateClick: this.handleDateClick, //点击日期触发
-        eventDrop: this.calendarEventDropOrResize, //拖动事件触发
-        eventResize: this.calendarEventDropOrResize, //缩放事件触发
-        displayEventTime: false, //不显示具体时间
-        themeSystem: 'bootstrap5',
-        aspectRatio: 1.2, //宽高比
+      ];
 
-
-      },
-      validRange: {
-        start: "2022-08-26",
-        end: "2023-02-16",
-      },
-    };
-  },
-  methods: {
-    datesSet(info) {
-      //注意:该方法在页面初始化时就会触发一次
-      console.log(info);
-      // this.search()  //请求本页数据
-      
     },
-    handleEventClick(info) { },
-    handleDateClick(info) { },
-    calendarEventDropOrResize(info) { },
+
+
   },
 };
 
@@ -126,6 +151,4 @@ export default {
   margin-top: 70px;
   margin-bottom: 70px;
 }
-
-
 </style>

+ 2 - 2
vue_project/src/components/indexNav.vue

@@ -15,7 +15,7 @@
                 </div>
                 <div class="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
                     <div class="flex flex-shrink-0 items-center">
-                        <img class="h-8 w-auto" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500"
+                        <img class="h-8 w-auto" src="../assets/images/exome.svg"
                             alt="Your Company" />
                     </div>
                     <div class="hidden sm:ml-6 sm:block">
@@ -43,7 +43,7 @@
                                 <span class="absolute -inset-1.5" />
                                 <span class="sr-only">Open user menu</span>
                                 <img class="h-8 w-8 rounded-full"
-                                    src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
+                                    src="../assets/images/商务职业男.png"
                                     alt="" />
                             </MenuButton>
                         </div>