浏览代码

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/scene_wisdom

# Conflicts:
#	js/showHardware.js
xzw 4 年之前
父节点
当前提交
a3dcac583d
共有 4 个文件被更改,包括 66 次插入24 次删除
  1. 25 13
      css/hardware.css
  2. 17 5
      index.html
  3. 1 0
      js/lib/sys-calendar.js
  4. 23 6
      js/showHardware.js

+ 25 - 13
css/hardware.css

@@ -275,30 +275,42 @@
   max-width: 120px;
 }
 
+.m-con{
+  width: 800px;
+  padding: 0;
+}
+
+
+.m-con .monitorbody{
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  background: #262729;
+  align-items: center;
+}
 
 .m-con .iconquxiao{
   position: absolute;
-  top: 24px;
-  right: 15px;
+  top: 5px;
+  right: 5px;
   color: #F5F5F5;
   font-size: 10px;
   cursor: pointer;
-  z-index: 999;
+  z-index: 9999;
 }
 
-.m-con{
-  min-width: 800px;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
+.m-con .monitorbody .mvideo{
+  width: 50%;
+  height: 100%;
 }
-#monitor{
-  width: 60%;
+
+
+.m-con .monitorbody #monitor{
+  width: 100%;
   height: 100%;
-  background: #262729;
 }
 
-.calendar{
-  width: 40%;
+.m-con .monitorbody .calendar{
+  width: 50%!important;
   background: #fff;
 }

+ 17 - 5
index.html

@@ -136,11 +136,15 @@
                 <i class="iconfont iconquxiao"></i>
             </div>
         </div>
-        <div class="m-con">
+        <!-- <div class="m-con">
             <i class="iconfont iconquxiao"></i>
-            <video id="monitor" controls></video>
-		    <div id="calendar"></div>
-        </div>
+            <div class="monitorbody">
+                <div class="mvideo">
+                    <video id="monitor" controls></video>
+                </div>
+                <div id="calendar"></div>
+            </div>
+        </div> -->
     </div>
     <div id="popup">
         <div class="popup-content">
@@ -885,7 +889,15 @@
         <div class="hard-body">
             <table id="gridtb"></table>
         </div>
-        
+        <div class="m-con">
+            <i class="iconfont iconquxiao"></i>
+            <div class="monitorbody">
+                <div class="mvideo">
+                    <video id="monitor" controls></video>
+                </div>
+                <div id="calendar"></div>
+            </div>
+        </div>
     </div>
     <script>
         if(number == "TEST"){

+ 1 - 0
js/lib/sys-calendar.js

@@ -153,6 +153,7 @@ Calendar.prototype = {
             opts.newDate.setFullYear(yearNum);
             opts.mode == "month" ? me._refreshCalendar(opts.newDate,cycleData) : me._refreshYearCalendar(opts.newDate);
             $(parent).find(".calendar-year-text").text(yearText);
+            if (opts.yearSelect) opts.yearSelect.call(yearText,yearNum,me)
 
 
         })

+ 23 - 6
js/showHardware.js

@@ -389,9 +389,9 @@ $(function () {
 
 
   window.loadCalendar = function(params = {}){
-    let { data,cellCb=()=>{},monthCb=()=>{} } = params
+
+    let { data,cellCb=()=>{},yearSelect=()=>{},monthCb=()=>{} } = params
       //日历方法
-          
       $("#calendar").calendar({
       data: data, //记录数据
       work: [],//上班时间
@@ -402,13 +402,19 @@ $(function () {
         let item = data[0]
         cellCb(item)
       },
+      yearSelect: function (yearText) {
+        yearSelect(yearText)
+      },
       monthClick: function (e, nextMonth, opts, me) {
-        monthCb(e)
+        monthCb(nextMonth)
       }
-      });
+    });
   }
-
-  /* loadCalendar({
+ 
+  /* 
+ 
+  window.loadCalendar({
+ 
     data:[{
         'startDate': "2021-5-18",//有监控的日期
         id:'传对应的id'
@@ -416,8 +422,19 @@ $(function () {
     //点击日期时间
     cellCb: (item)=> {
       console.log(item);
+    },
+    yearSelect: (yearText)=> {
+      console.log(yearText);
+    },
+    monthCb: (nextMonth)=> {
+      console.log(nextMonth);
     }
+ 
   }) */
+ 
+    
+  
+ 
 
   /*loadMonitor({
       id:"monitor",