Pārlūkot izejas kodu

Merge branch 'master' of https://gitee.com/qinnamin/large_screen

namin 3 gadi atpakaļ
vecāks
revīzija
147911b65a

+ 1 - 1
src/store/index.js

@@ -5,7 +5,7 @@ Vue.use(Vuex)
 
 export default new Vuex.Store({
   state: {
-    websocketIP: "182.92.79.148:8081",
+    websocketIP: "172.27.127.100:8081",
 
   },
   mutations: {

+ 6 - 4
src/views/Home.vue

@@ -31,7 +31,7 @@
           @select="handleSelect"
         >
           <template v-for="item in menu_left">
-            <el-menu-item :index="item.path" :key="item.id+''">
+            <el-menu-item :index="item.path" :key="item.id + ''">
               <div
                 style="
                   background-color: #c0c0c0;
@@ -180,9 +180,11 @@ export default {
     };
   },
   mounted() {
-    this.$router.push({
-      path: "/main",
-    });
+    if (this.$route.path == "/") {
+      this.$router.push({
+        path: "/main",
+      });
+    }
   },
   methods: {
     handleSelect(key, keyPath) {

+ 1 - 1
src/views/beam_tube/configImg/index.vue

@@ -207,7 +207,7 @@ export default {
   /* background-color: black; */
 }
 .bottom_chart {
-  top: 600px;
+  top: 650px;
   width: 100%;
   height: 300px;
   position: absolute;

+ 18 - 27
src/views/compressed/dataBoard/twoline2.vue

@@ -3,7 +3,7 @@
   <div>
     <div
       ref="testLine"
-      style="width: 450px; height: 200px; margin: 0px auto"
+      style="width: 450px; height: 200px;margin: 0px auto"
     ></div>
   </div>
 </template>
@@ -41,8 +41,7 @@ export default {
       y1Data: new Array(30).fill("-"),
       y2Data: new Array(30).fill("-"),
       count: 0,
-      //   websocket1: null,
-      //   websocket2: null,
+      countY2: 0,
       myChart: null,
       option: {
         tooltip: {
@@ -145,17 +144,16 @@ export default {
           // icon:'rect',
           itemGap: 25,
           itemWidth: 18,
-          icon:
-            "path://M0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
+          icon: "path://M0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
 
           data: this.legend,
         },
         grid: {
-        	top: '15%',
-        	left: '10%',
-        	right: '10%',
-        	bottom: '1%',
-        	containLabel: true
+          top: "30%",
+          left: "10%",
+          right: "10%",
+          bottom: "1%",
+          containLabel: true,
         },
         yAxis: [
           {
@@ -203,7 +201,7 @@ export default {
           textStyle: {
             fontWeight: "normal", //标题颜色
             color: "#4ADEFE",
-			fontSize:15
+            fontSize: 15,
           },
         },
 
@@ -335,7 +333,7 @@ export default {
       this.initWebSocket(websocket2, this.legend[1], id);
     },
 
-    addy1Data(data, select) {
+    addY1Data(data, select) {
       // 先扩展数组,然后删除多余元素
       console.log("data", data);
       if (select == 1) {
@@ -365,22 +363,20 @@ export default {
               name: this.legend[0],
               data: this.y1Data,
             },
-            {
-            
-            },
+            {},
           ],
         });
       }
     },
-    addy2Data(data, select) {
+    addY2Data(data, select) {
       // 先扩展数组,然后删除多余元素
       console.log("data", data);
       if (select == 1) {
-        if (this.count < 30) {
+        if (this.countY2 < 30) {
           for (let i = 0; i < data.length; i++) {
-            this.y2Data[this.count] = data[i][this.type[1]];
+            this.y2Data[this.countY2] = data[i][this.type[1]];
           }
-          this.count++;
+          this.countY2++;
         } else {
           for (let i = 0; i < data.length; i++) {
             // 删除数组中的第一个项目
@@ -389,11 +385,6 @@ export default {
           }
         }
         this.myChart.setOption({
-          xAxis: [
-            {
-              data: this.xData,
-            },
-          ],
           series: [
             {
               // name: this.legend[0],
@@ -423,10 +414,10 @@ export default {
         }
         switch (type) {
           case this.legend[0]:
-            this.addy1Data(JSON.parse(event.data), select);
+            this.addY1Data(JSON.parse(event.data), select);
             break;
           case this.legend[1]:
-            this.addy2Data(JSON.parse(event.data), select);
+            this.addY2Data(JSON.parse(event.data), select);
             break;
         }
       };
@@ -442,7 +433,7 @@ export default {
   },
   mounted() {
     // 先画图
-    // console.log(this.legend[0]);
+    console.log("@@@@@");
     this.myChart = this.$echarts.init(this.$refs.testLine);
     this.myChart.setOption(this.option);
     let websocket1 = new WebSocket(

+ 1 - 0
src/views/main.vue

@@ -5,6 +5,7 @@
     :src="url"
     frameborder="0"
     scrolling="yes"
+    v-if="getDashBoardId"
   ></iframe>
 </template>
 

+ 4 - 2
src/views/transportation/configImg/belt/Analysis.vue

@@ -1,14 +1,16 @@
 <template>
   <div class="main">
+    <a-row>
+      <div style="font-size: 30px;font-weight:bold;text-align:center;color: #4adefe">{{ this.$route.params.title }}</div>
+    </a-row>
     <a-row>
       <a-col :sm="24" :md="12" :xl="11">
-        <div style="font-size: 20px;font-weight:bold;text-align:center;color: #4adefe">{{ this.$route.params.title }}</div>
         <img src="@/assets/img/20211209164229.png" />
       </a-col>
       <a-col :sm="24" :md="12" :xl="6"><chart :id="23" title="皮带速度" unit="m/s" type="pidaisudu_after"/></a-col>
       <a-col :sm="24" :md="12" :xl="5"><chart :id="24" title="驱动电机电流" unit="A" type="dianliu_after"/></a-col>
     </a-row>
-    <a-row>
+    <a-row style="margin-top:40px">
       <a-col :sm="24" :md="12" :xl="11">
         <div class="contour">
           <div style="height: 80px">

+ 1 - 1
src/views/transportation/configImg/belt/Chart.vue

@@ -1,7 +1,7 @@
 <template>
   <div
     ref="testLine"
-    style="width: 450px; height: 400px; margin-top: 40px"
+    style="width: 400px; height: 350px;"
   ></div>
 </template>