tremble 4 年之前
父节点
当前提交
ade0a94e80
共有 7 个文件被更改,包括 138 次插入7 次删除
  1. 5 0
      css/hardware.css
  2. 2 2
      edit.html
  3. 3 1
      index.html
  4. 16 0
      js/echarts.min.js
  5. 2 2
      js/myShow-edit.js
  6. 2 2
      js/myShow.js
  7. 108 0
      js/showHardware.js

+ 5 - 0
css/hardware.css

@@ -43,4 +43,9 @@
 
 .plugin-action img{
   width: 24px;
+}
+
+#temperature{
+  width: 360px;
+  height: 400px;
 }

+ 2 - 2
edit.html

@@ -95,10 +95,10 @@
                         <span class="panoVisible"></span>
                         <label>漫游可行</label>
                     </li>
-                    <li data-name="cadMap">
+                    <!-- <li data-name="cadMap">
                         <span class="panoVisible"></span>
                         <label>小地图</label>
-                    </li>
+                    </li> -->
                 </ul>
             </div>
             <div class="toolMid">

+ 3 - 1
index.html

@@ -65,7 +65,7 @@
                 </label> 
             </div>
         </div>
-        <div>
+        <div id="temperature">
         
         </div>
     </div>
@@ -837,6 +837,8 @@
     </script>
     <script src="./js/lib/jquery-2.1.1.min.js" class="build keep"></script>
     <script src="./js/lib/player-0.0.12.min.js" class="build keep"></script>
+    <script src="./js/echarts.min.js"></script>
+
     <script src="./js/Tween.js"></script>
     <!-- <script src="./js/app-preheater.js?v=2.25.6-0-gd87e5b1"></script> -->
     <script src="./js/myShow.js"></script>

文件差异内容过多而无法显示
+ 16 - 0
js/echarts.min.js


+ 2 - 2
js/myShow-edit.js

@@ -1,7 +1,7 @@
 var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
-  var g_Prefix="http://super.4dage.com/";
+  // var g_Prefix="http://super.4dage.com/";
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/edit.html")+1);
-//var g_Prefix=window.location.origin+'/';
+var g_Prefix=window.location.origin+'/';
 
 var s = window.location.href.split('/');
 s.pop();

+ 2 - 2
js/myShow.js

@@ -1,7 +1,7 @@
 var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
-  var g_Prefix="https://super.4dage.com/";
+  // var g_Prefix="https://super.4dage.com/";
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
-//var g_Prefix=window.location.origin+'/';
+var g_Prefix=window.location.origin+'/';
 
 var s = window.location.href.split('/');
 s.pop();

+ 108 - 0
js/showHardware.js

@@ -48,6 +48,8 @@ $(function () {
     ],
   });
 
+
+
   // 阻止冒泡
   $(".hardware-list").on("click keydown keyup keypress", function (event) {
     event.stopPropagation();
@@ -125,4 +127,110 @@ $(function () {
       },
     });
   }
+
+
+
+  //记载温度计
+  var chartDom = document.getElementById('temperature');
+  var myChart = echarts.init(chartDom);
+  
+  option = {
+    series: [
+    {
+      name: "Indicator",
+      type: "gauge",
+      data: [{
+        value: 50,
+        name:'温度',
+        itemStyle:{
+          color: "#23EACF",
+          fontSize:14
+        },
+        detail: {
+          formatter: "{value}℃",
+          color: "#23EACF",
+          fontSize:24,
+          offsetCenter: ['0%', '28%'],
+        },
+        title: {
+          offsetCenter: ['0%', '80%'],
+          color: "#fff",
+          fontSize:20
+        }
+      }],
+      radius: "100%",
+      startAngle: 240,
+      endAngle: -60,
+      axisLine: {
+        show: false
+      },
+      axisTick:{
+        show: true,
+        length:12,
+        lineStyle:{
+          color:'#339ED3'
+        }
+      },
+      splitLine: {
+        show: true,
+        length:15,
+        lineStyle:{
+          color: "rgba(255, 255, 255, 1)",
+        }
+      },
+      axisLabel: {
+        color: "#23EACF"
+      },
+      pointer: {
+        show: true,
+        itemStyle:{
+          color: "#23EACF"
+        },
+        width: 4.5,
+        length: "46%"
+      }
+    },
+    {
+      name: "Indicator1",
+      type: "gauge",
+      data: [{
+        value: 50,
+        detail:{
+          show:false
+        }
+      }],
+      radius: "50%",
+      startAngle: 240,
+      endAngle: -60,
+      axisLine: {
+        show: true,
+        lineStyle:{
+          width:5
+        }
+      },
+      progress: {
+        show: true,
+        width:5,
+        itemStyle:{
+          color: "#23EACF"
+        }
+      },
+      axisTick:{
+        show: false,
+      },
+      splitLine: {
+        show: false,
+      },
+      axisLabel: {
+        show: false,
+      },
+      pointer: {
+        show: false,
+      }
+    }
+  ]
+  }
+
+
+option && myChart.setOption(option, true);
 });