liqk hace 6 años
padre
commit
c8c9b5e4a5

+ 67 - 8
TEAMModelOS.SmartClass/ClientApp/view/smart-class/LiveBroadcast.vue

@@ -16,7 +16,7 @@
           <Button size="large">返回今天</Button>
         </div>
       </div>
-      <full-calendar :events="fcEvents" lang="zh" @dayClick ="getDay"></full-calendar>
+      <full-calendar :events="fcEvents" lang="zh" @dayClick ="getDay" :config="config" ></full-calendar>
     </div>
   </div>
 </template>
@@ -59,12 +59,24 @@
           '12月',
         ],
         fcEvents: [
-          {
-            title: 'Sunny Out of Office',
-            start: '2019-05-5',
-            end: '2019-05-5'
-          }
-        ]
+        ],
+        config: {
+          firstDay: '0',//以周日为每周的第一天
+          // weekends: true,//是否在日历中显示周末
+          locale: 'zh-cn',//语言
+          defaultView: 'month',//默认按月显示
+          height: 'auto',//高度
+          fixedWeekCount: false,//是否固定显示六周
+          // weekMode:"liquid",//周数不定,每周的高度可变,整个日历高度不变
+          allDaySlot: false,
+          // allDay:true,
+          header: {//表头信息
+            left: 'prev, next, today',
+            center: 'title',
+            right: 'hide, custom'
+          },
+        },
+        lessonList:[]
       }
     },
     methods: {
@@ -76,6 +88,48 @@
 
     },
     mounted() {
+      this.lessonList = require("@/static/lessonList.json");
+      for (let i = 0; i < this.lessonList.length; i++) {
+        var sdate = new Date(this.lessonList[i].startTime.time);
+        let sY = sdate.getFullYear() + '-';
+        let sM = (sdate.getMonth() + 1 < 10 ? '0' + (sdate.getMonth() + 1) : sdate.getMonth() + 1) + '-';
+        let sD = sdate.getDate() + ' ';
+        var edate = new Date(this.lessonList[i].endTime.time);
+        let eY = edate.getFullYear() + '-';
+        let eM = (edate.getMonth() + 1 < 10 ? '0' + (edate.getMonth() + 1) : edate.getMonth() + 1) + '-';
+        let eD = edate.getDate() + ' ';
+        this.fcEvents.push({
+          title:'名称:'+this.lessonList[i].viwActivityTypeTip,
+          start: sY + sM + sD,
+          end: eY + eM + eD
+        });
+        this.fcEvents.push({
+          title:'学校:'+this.lessonList[i].schoolName,
+          start: sY + sM + sD,
+          end: eY + eM + eD
+        });
+        this.fcEvents.push({
+          title:'主讲人:'+this.lessonList[i].employeeName,
+          start: sY + sM + sD,
+          end: eY + eM + eD
+        });
+        this.fcEvents.push({
+          title:'学科:'+this.lessonList[i].parentCategoryName,
+          start: sY + sM + sD,
+          end: eY + eM + eD
+        });
+        this.fcEvents.push({
+          title:'课题:'+this.lessonList[i].parentProjectName,
+          start: sY + sM + sD,
+          end: eY + eM + eD
+        });
+        this.fcEvents.push({
+          title:'时间:'+this.lessonList[i].timeRangeTipHHmm,
+          start: sY + sM + sD,
+          end: eY + eM + eD
+        });
+      }
+      console.log(this.lessonList);
     }
   }
 </script>
@@ -128,7 +182,12 @@
     .review-main /deep/ .events-week {
       height:140px;
     }
-    
+    .review-main /deep/ .full-calendar-body .dates .dates-events .events-week .events-day .event-box .event-item {
+      background:none;
+    }
+    /*.review-main /deep/ .full-calendar-body .dates .dates-events .events-week .events-day .event-box .more-link {
+      display:none;
+    }*/
    .condition-wrap {
     display:flex;
     flex-direction:row;