Pārlūkot izejas kodu

可视化仓房部分滚动

钞小赢 2 gadi atpakaļ
vecāks
revīzija
982f02f0bf

+ 7 - 7
src/layout/header-aside/layout.vue

@@ -24,9 +24,9 @@
24 24
           <d2-icon name="bars"/>
25 25
         </div> -->
26 26
         <d2-menu-header flex-box="1" />
27
-        <!-- <el-button type="primary" size="small" @click="ksh">可视化
27
+        <el-button type="primary" size="small" @click="ksh" style="font-size:15px">可视化
28 28
 
29
-        </el-button> -->
29
+        </el-button>
30 30
         <!-- 顶栏右侧 -->
31 31
         <div class="d2-header-right" flex-box="0">
32 32
           <!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
@@ -160,11 +160,11 @@ export default {
160 160
     },
161 161
   },
162 162
   methods: {
163
-    // ksh(){
164
-    //   this.$router.push({
165
-    //     path:"/visualized"
166
-    //   })
167
-    // },
163
+    ksh(){
164
+      this.$router.push({
165
+        path:"/visualized"
166
+      })
167
+    },
168 168
     ...mapActions('d2admin/menu', [
169 169
       'asideCollapseToggle'
170 170
     ]),

+ 16 - 16
src/router/routes.js

@@ -8,14 +8,14 @@ const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
8 8
  * 在主框架内显示
9 9
  */
10 10
 const frameIn = [
11
-  // {  // 大屏首页
12
-  //   path: '/visualized',
13
-  //   name: 'visualized',
14
-  //   meta: {
15
-  //     auth: true
16
-  //   },
17
-  //   component: _import('system/visualized')
18
-  // },
11
+  {  // 大屏首页
12
+    path: '/visualized',
13
+    name: 'visualized',
14
+    meta: {
15
+      auth: true
16
+    },
17
+    component: _import('system/visualized')
18
+  },
19 19
 
20 20
   {
21 21
     path: '/',
@@ -316,14 +316,14 @@ const frameIn = [
316 316
  * 在主框架之外显示
317 317
  */
318 318
 const frameOut = [
319
-  {  // 大屏首页
320
-    path: '/visualized',
321
-    name: 'visualized',
322
-    // meta: {
323
-    //   auth: true
324
-    // },
325
-    component: _import('system/visualized')
326
-  },
319
+  // {  // 大屏首页
320
+  //   path: '/visualized',
321
+  //   name: 'visualized',
322
+  //   // meta: {
323
+  //   //   auth: true
324
+  //   // },
325
+  //   component: _import('system/visualized')
326
+  // },
327 327
   // 登录
328 328
   {
329 329
     path: '/login',

+ 7 - 0
src/views/demo/alarmRecord/index.vue

@@ -1234,6 +1234,13 @@ export default {
1234 1234
   },
1235 1235
   mounted() {
1236 1236
     this.getSelect();
1237
+ 
1238
+    if(this.$route.query.proCode){
1239
+      this.formInline.proCode=this.$route.query.proCode
1240
+    }
1241
+    if(this.$route.query.eqCode){
1242
+      this.formInline.eqCode=this.$route.query.eqCode
1243
+    }
1237 1244
     this.getList();
1238 1245
   },
1239 1246
 };

+ 5 - 5
src/views/demo/equipmentManage/equipment/index.vue

@@ -127,8 +127,8 @@
127 127
                   align="center"
128 128
                 >
129 129
                 </el-table-column>
130
-                <el-table-column prop="phoneO" label="设备数量" align="center">
131
-                </el-table-column>
130
+                <!-- <el-table-column prop="phoneO" label="设备数量" align="center">
131
+                </el-table-column> -->
132 132
 
133 133
                 <el-table-column
134 134
                   prop="orgName"
@@ -168,12 +168,12 @@
168 168
                   align="center"
169 169
                 >
170 170
                 </el-table-column>
171
-                <el-table-column
171
+                <!-- <el-table-column
172 172
                   prop="lastOnlineTime"
173 173
                   label="最后上线时间"
174 174
                   align="center"
175 175
                 >
176
-                </el-table-column>
176
+                </el-table-column> -->
177 177
 
178 178
                 <el-table-column label="操作" width="160" align="center">
179 179
                   <template slot-scope="scope">
@@ -352,7 +352,7 @@ export default {
352 352
     },
353 353
     //查看
354 354
     goDetail(row) {
355
-      this.$router.push({ path: "equipmentInfo",query:{id:row.id} });
355
+      this.$router.push({ path: "equipmentInfo",query:{id:row.id,eqCode:row.eqCode} });
356 356
     },
357 357
     //跳转产品分类
358 358
     goTag() {

+ 76 - 9
src/views/demo/equipmentManage/equipmentInfo/index.vue

@@ -84,15 +84,15 @@
84 84
                 <div class="nowData">
85 85
                   <div>
86 86
                     <div>温度</div>
87
-                    <div>28.4℃</div>
87
+                    <div>{{rightTempValue}}℃</div>
88 88
                   </div>
89 89
                   <div>
90 90
                     <div>湿度</div>
91
-                    <div>38.4%</div>
91
+                    <div>{{rightWetValue}}%</div>
92 92
                   </div>
93 93
                   <div>
94 94
                     <div>露点温度</div>
95
-                    <div>28.4℃</div>
95
+                    <div>{{rightDewValue}}℃</div>
96 96
                   </div>
97 97
                 </div>
98 98
                 <h5 style="margin: 20px 0">历史定时任务数据</h5>
@@ -260,7 +260,7 @@
260 260
               size="mini"
261 261
               type="primary"
262 262
               icon="el-icon-search"
263
-              @click="search"
263
+              @click="search()"
264 264
               >查询</el-button
265 265
             >
266 266
           </el-form-item>
@@ -270,7 +270,7 @@
270 270
               type="primary"
271 271
               size="mini"
272 272
               icon="el-icon-refresh-left"
273
-              @click="reset"
273
+              @click="reset()"
274 274
               >重置</el-button
275 275
             >
276 276
           </el-form-item>
@@ -476,6 +476,10 @@ export default {
476 476
   components: { detailTable, addDialog },
477 477
   data() {
478 478
     return {
479
+   rightDewValue : 0,
480
+    rightTempValue : 0,
481
+    rightWetValue : 0,
482
+      alarmRecord:[],
479 483
       pintsPageList:[],
480 484
       rwList:[],
481 485
       client: {},
@@ -604,18 +608,34 @@ export default {
604 608
   methods: {
605 609
     connect() {
606 610
       let options = {
611
+        //本地
607 612
         username: "admin",
608 613
         password: "public",
614
+        //测试
615
+        //    username: "admin",
616
+        // password: "admin@123",
617
+        //生产
618
+        // username: "admin",
619
+        // password: "admin@2Ld&DDrsk",
609 620
         cleanSession : true,
610 621
         keepAlive:60,
611 622
         clientId: 'mqttjs_'+ Math.random().toString(16).substr(2, 8),
612 623
         connectTimeout: 4000
613 624
       }
614
-      this.client = mqtt.connect('ws://192.168.50.169:1883/mqtt',options);
625
+      //本地开发环境
626
+      this.client = mqtt.connect('ws://192.168.50.169:8083/mqtt',options);
627
+      //测试环境
628
+        //  this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
629
+        //正式环境
630
+         // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
615 631
       this.client.on("connect", (e)=>{
616 632
         console.log("成功连接服务器:",e);
617 633
         //订阅三个名叫'top/#', 'three/#'和'#'的主题
618
-        this.client.subscribe(['topic/X1XXXQ2206090069/DPUT/upload'], { qos: 1 }, (err)=> {
634
+        this.client.subscribe([
635
+            // "/PUSH/c89512024085/DPUT/upload",
636
+            // "/PUSH/X1XXXQ2206090069/DPUT/upload",
637
+            "/PUSH/8951DQ2207200018/DPUT/upload",
638
+          ], { qos: 1 }, (err)=> {
619 639
           if (!err) {
620 640
             console.log("订阅成功");
621 641
             //向主题叫“pubtop”发布一则内容为'hello,this is a nice day!'的消息
@@ -652,6 +672,7 @@ export default {
652 672
           const res = JSON.parse(message.toString())
653 673
           this.runData=res.data
654 674
           console.log(res, 'res',this.runData,'runData')
675
+          this.calcAve(this.runData)
655 676
           // switch(topic) {
656 677
           //    case 'top/lll' :
657 678
           //      this.msg = res.msg
@@ -695,6 +716,41 @@ export default {
695 716
           console.log('正在重连:', error)
696 717
       });
697 718
     },
719
+    //公共方法计算平均值
720
+    calcAve(arr) {
721
+      //计算平均值
722
+
723
+      let avgNum = 0;
724
+      this.rightDewValue = 0;
725
+      this.rightTempValue = 0;
726
+      this.rightWetValue = 0;
727
+
728
+        arr.forEach((item) => {
729
+          avgNum++;
730
+          console.log(item, "item");
731
+          item.dewValue = parseInt(item.dewValue);
732
+          item.tempValue = parseInt(item.tempValue);
733
+          item.wetValue = parseInt(item.wetValue);
734
+          //露点均温
735
+          this.rightDewValue += item.dewValue;
736
+          //温度均温
737
+          this.rightTempValue += item.tempValue;
738
+          //湿度均温
739
+          this.rightWetValue += item.wetValue;
740
+          console.log(
741
+            this.rightDewValue,
742
+            this.rightTempValue,
743
+            this.rightWetValue
744
+          );
745
+ 
746
+      });
747
+      //取整
748
+      console.log(this.rightDewValue, avgNum, "wwwwww");
749
+      this.rightDewValue = parseInt(this.rightDewValue / avgNum);
750
+      this.rightTempValue = parseInt(this.rightTempValue / avgNum);
751
+      this.rightWetValue = parseInt(this.rightWetValue / avgNum);
752
+      console.log(this.rightDewValue, "//////");
753
+    },
698 754
     //获取列表数据
699 755
     getList() {
700 756
       var condition = {};
@@ -730,7 +786,7 @@ export default {
730 786
           this.basicInfo = [
731 787
             {
732 788
               name: "设备ID",
733
-              val: [this.info.id],
789
+              val: [this.info.eqCode],
734 790
               name1: "设备名称",
735 791
               val1: [this.info.eqName],
736 792
             },
@@ -802,7 +858,7 @@ export default {
802 858
     },
803 859
     tabsClick(v) {
804 860
       if (v.name == "fourth") {
805
-        this.$router.push({ path: "alarmRecord" });
861
+        this.$router.push({ path: "alarmRecord",query:{eqCode:this.$route.query.eqCode}});
806 862
       }else if(v.name=="second"){
807 863
         this.getRwList()
808 864
       } else if (v.name == "third") {
@@ -824,6 +880,7 @@ export default {
824 880
               this.pintsPageList = res.data.records;
825 881
               this.pagination2.pageSize = res.data.size;
826 882
               this.pagination2.total = res.data.total;
883
+              this.calcAve( this.pintsPageList)
827 884
             }
828 885
           })
829 886
           .catch((err) => {
@@ -852,6 +909,16 @@ export default {
852 909
           console.log(err);
853 910
         });
854 911
     },
912
+    //查询
913
+    search(){
914
+      
915
+    },
916
+    //重置
917
+    reset(){
918
+      this.formInline={}
919
+    },
920
+    //确定
921
+    sure(){},
855 922
     //表格序号
856 923
     indexMethod(index) {
857 924
       return (

+ 6 - 0
src/views/demo/parameManagement/alarmParame/index.vue

@@ -602,9 +602,12 @@ export default {
602 602
       this.title1 = "报警配置信息查看";
603 603
       this.dialogAlarm = true;
604 604
       this.getBjlxArr();
605
+
605 606
       api.alarmParamsDetail(row.id).then((res) => {
606 607
         if (res.code == 200) {
608
+          console.log(res.data,"查看列表")
607 609
           this.addForm = res.data;
610
+           this.yxTableData=res.data.devInfoList
608 611
         } else {
609 612
           this.$message.error(res.msg);
610 613
         }
@@ -614,9 +617,11 @@ export default {
614 617
       this.title1 = "编辑报警配置信息";
615 618
       this.dialogAlarm = true;
616 619
       this.getBjlxArr();
620
+   
617 621
       api.alarmParamsDetail(row.id).then((res) => {
618 622
         if (res.code == 200) {
619 623
           this.addForm = res.data;
624
+          this.yxTableData=res.data.devInfoList
620 625
         } else {
621 626
           this.$message.error(res.msg);
622 627
         }
@@ -779,6 +784,7 @@ export default {
779 784
         .equipmentList(data)
780 785
         .then((res) => {
781 786
           if (res.code == 200) {
787
+            console.log(this.sbTableData,"this.sbTableData")
782 788
             this.sbTableData = res.data.records;
783 789
             this.pagination1.pageSize = res.data.size;
784 790
             this.pagination1.total = res.data.total;

+ 1 - 1
src/views/demo/productManage/product/index.vue

@@ -216,7 +216,7 @@ export default {
216 216
     },
217 217
     //查看
218 218
     goDetail(row) {
219
-      this.$router.push({ path: "productInfo",query:{id:row.id} });
219
+      this.$router.push({ path: "productInfo",query:{id:row.id,proCode:row.proCode} });
220 220
     },
221 221
     //跳转产品分类
222 222
     goClassify() {

+ 1 - 1
src/views/demo/productManage/productInfo/index.vue

@@ -897,7 +897,7 @@ export default {
897 897
     },
898 898
     tabsClick(v) {
899 899
       if(v.name=='fourth'){
900
-        this.$router.push({ path: "alarmRecord" })
900
+        this.$router.push({ path: "alarmRecord" ,query:{proCode:this.$route.query.proCode} })
901 901
       }else if(v.name=='second'){
902 902
         this.getRun()
903 903
       }else if(v.name=='third'){

+ 3 - 3
src/views/demo/system/operationLog/index.vue

@@ -23,7 +23,7 @@
23 23
 
24 24
                
25 25
                       <el-form-item label="账户名称">
26
-                  <el-input size="mini" placeholder="请输入" v-model="formInline.userId"></el-input>
26
+                  <el-input size="mini" placeholder="请输入" v-model="formInline.userName"></el-input>
27 27
                   </el-form-item>
28 28
                   <el-form-item>
29 29
                     <el-button
@@ -227,7 +227,7 @@ export default {
227 227
 
228 228
       //查询条件
229 229
       formInline: {
230
-      userId:"",
230
+        userName:"",
231 231
       },
232 232
    roleLists:[],
233 233
     
@@ -256,7 +256,7 @@ export default {
256 256
     getList() {
257 257
       console.log("....");
258 258
       var condition = {
259
-       userId:this.formInline.userId
259
+        userName:this.formInline.userName
260 260
       };
261 261
       condition = JSON.stringify(condition);
262 262
       var data = {

+ 3 - 1
src/views/demo/system/organization/index.vue

@@ -390,10 +390,12 @@ export default {
390 390
     },
391 391
     // 编辑
392 392
     handleCheck(type, index, row) {
393
-      // console.log(type, index, row, "row");
393
+      console.log(type, index, row, "row");
394 394
       this.indexData = row;
395
+
395 396
       this.dialogFormVisible1 = true;
396 397
       this.editOrgForm.orgName = row.orgName;
398
+      this.editOrgForm.orgCode=row.orgCode
397 399
       /*  if (this.editOrgForm.parentId == 0) {
398 400
          // 无上级机构
399 401
          this.editOrgForm.parentId = '无'

+ 1 - 0
src/views/demo/system/roleManagement/index.vue

@@ -290,6 +290,7 @@ export default {
290 290
     },
291 291
     // 编辑数据展示
292 292
     handleEdit (type, index, row) {
293
+      console.log(row,"编辑")
293 294
       this.editRoleForm = row
294 295
       this.dialogFormVisible1 = true
295 296
 

+ 1 - 1
src/views/system/index/page.vue

@@ -62,7 +62,7 @@
62 62
               :header-cell-style="{ background: '#E9F4F3', color: '#445D5A' }"
63 63
               style="width: 100%">
64 64
               <el-table-column
65
-                prop="alarmTypeName"
65
+                prop="alarmRemark"
66 66
                 align="center"
67 67
                 label="报警类型"
68 68
                 >

+ 228 - 139
src/views/system/visualized/index last copy.vue

@@ -17,12 +17,13 @@
17 17
                       v-model="form.cfValue"
18 18
                       placeholder="请选择"
19 19
                       size="mini"
20
+                      @change="cfChange"
20 21
                     >
21 22
                       <el-option
22
-                        v-for="item in cfLists"
23
-                        :key="item.value"
24
-                        :label="item.label"
25
-                        :value="item.value"
23
+                        v-for="item in deviceLists"
24
+                        :key="item.labelCode"
25
+                        :label="item.labelName"
26
+                        :value="item.labelCode"
26 27
                       >
27 28
                       </el-option>
28 29
                     </el-select>
@@ -50,9 +51,7 @@
50 51
                       normalTemp1: wetTempStatus == 0,
51 52
                     }"
52 53
                   >
53
-                    <div class="temp-title">
54
-                      {{ parseInt($scrollIndex) + 1 }}号点位温湿度
55
-                    </div>
54
+                    <div class="temp-title">{{parseInt(scrollIndex)+1}}号点位温湿度</div>
56 55
                     <div class="temp-list">
57 56
                       <div class="list-left" v-if="wetTempStatus == 1">
58 57
                         <div class="hxBig">
@@ -276,6 +275,9 @@
276 275
   </div>
277 276
 </template>
278 277
 <script>
278
+//扇形图片路径
279
+import greenImg from "../../../assets/images/bigScreen/shanxing.png"
280
+import redImg from"../../../assets/images/bigScreen/fault.png"
279 281
 import api from "@/api";
280 282
 import vueSeamlessScroll from "vue-seamless-scroll";
281 283
 import * as echarts from "echarts";
@@ -295,6 +297,18 @@ export default {
295 297
   },
296 298
   data() {
297 299
     return {
300
+      //温度数字颜色判断条件
301
+      tempNumStyle: null,
302
+
303
+      //湿度数字颜色判断条件
304
+      wetNumStyle: null,
305
+      //初始化列表的长度
306
+
307
+      tableDataLength: null,
308
+      //下拉选选中的code
309
+      cfCode: "",
310
+      //仓房列表
311
+      deviceLists: [],
298 312
       //设备在线
299 313
       devOnlineSum: null,
300 314
       //设备在线率
@@ -325,11 +339,11 @@ export default {
325 339
         },
326 340
       ],
327 341
       //右侧露点温度
328
-      rightDewValue: 0,
342
+      rightDewValue: null,
329 343
       //右侧仓内温度
330
-      rightTempValue: 0,
344
+      rightTempValue: null,
331 345
       //右侧仓内湿度
332
-      rightWetValue: 0,
346
+      rightWetValue: null,
333 347
       //温度最大最小值
334 348
       tempParams: {},
335 349
       //湿度最大最小值
@@ -394,6 +408,13 @@ export default {
394 408
     },
395 409
   },
396 410
   methods: {
411
+    //仓房下拉选改变时
412
+
413
+    cfChange(val) {
414
+      console.log(val, "val..");
415
+      this.cfCode = val;
416
+      this.getPointList();
417
+    },
397 418
     connect() {
398 419
       let options = {
399 420
         username: "admin",
@@ -409,8 +430,9 @@ export default {
409 430
         //订阅三个名叫'top/#', 'three/#'和'#'的主题
410 431
         this.client.subscribe(
411 432
           [
412
-            "/PUSH/c89512024085/DPUT/upload",
413
-            "/PUSH/X1XXXQ2206090069/DPUT/upload",
433
+            // "/PUSH/c89512024085/DPUT/upload",
434
+            // "/PUSH/X1XXXQ2206090069/DPUT/upload",
435
+            "/PUSH/8951DQ2207200018/DPUT/upload",
414 436
           ],
415 437
           { qos: 1 },
416 438
           (err) => {
@@ -447,16 +469,23 @@ export default {
447 469
     getMessage() {
448 470
       this.client.on("message", (topic, message) => {
449 471
         if (message) {
450
-          let str = "X1XXXQ2206090069";
472
+          let str = "8951DQ2207200018";
451 473
           if (topic.indexOf(str) != -1) {
452 474
             console.log("收到来着", topic, "的信息", message.toString());
453 475
             var res = JSON.parse(message.toString());
454 476
             console.log(res, "resssssss......");
455
-            res.data.forEach((ele) => {
456
-              ele.time = res.time;
457
-              this.tableData[index].unshift(ele);
458
-              this.tableData[index].pop();
459
-            });
477
+            if (res.data.length == this.tableDataLength) {
478
+              res.data.forEach((ele, index) => {
479
+                ele.time = res.time;
480
+                this.tableData[index].unshift(ele);
481
+                this.tableData[index].pop();
482
+              });
483
+            } else {
484
+              this.$message({
485
+                message: "设备配置信息与实际点位不符",
486
+                type: "warning",
487
+              });
488
+            }
460 489
           }
461 490
 
462 491
           this.wetTempPublic(this.tableData);
@@ -854,7 +883,7 @@ export default {
854 883
     //点位列表
855 884
     getPointList() {
856 885
       let params = {
857
-        labelCode: "307038864601222",
886
+        labelCode: this.cfCode,
858 887
         orgCode: localStorage.getItem("orgCode"),
859 888
         pageSize: 5,
860 889
       };
@@ -862,23 +891,31 @@ export default {
862 891
         console.log(res, "点位列表");
863 892
 
864 893
         this.tableData = Object.values(res.data);
894
+        this.tableDataLength = this.tableData.length;
895
+        console.log(this.tableData, "初始化");
865 896
         //如果温湿度大于或小于正常值则添加字段status,0位不正常,1为正常
866
-        this.wetTempPublic(this.tableData);
897
+        this.getWsdAlarmParams();
867 898
         this.calcAve(this.tableData);
868 899
       });
869 900
     },
870 901
     // 温湿度最高最低参数
871 902
     getWsdAlarmParams() {
872 903
       let params = {
873
-        labelCode: "307038864601222",
904
+        labelCode: this.cfCode,
874 905
         orgCode: localStorage.getItem("orgCode"),
875 906
       };
876 907
       api.wsdAlarmParams(params).then((res) => {
877 908
         console.log(res, "参数。。");
878 909
         //温度参数
879
-        this.tempParams = res.data[110001][0];
880
-        this.wetParams = res.data[110002][0];
910
+        if (res.data[110001]) {
911
+          this.tempParams = res.data[110001][0];
912
+        }
913
+        if (res.data[110002]) {
914
+          this.wetParams = res.data[110002][0];
915
+        }
916
+
881 917
         console.log(this.tempParams, "tempParams");
918
+        console.log(this.wetParams, "wetParams");
882 919
         if (this.tableData) {
883 920
           this.wetTempPublic(this.tableData);
884 921
         }
@@ -905,9 +942,9 @@ export default {
905 942
 
906 943
     //公共方法(判断温湿度参数是否正常并添加属性)
907 944
     wetTempPublic(arr) {
908
-      if (this.tempParams && this.wetParams) {
909
-        arr.forEach((ele) => {
910
-          ele.forEach((item) => {
945
+      arr.forEach((ele) => {
946
+        ele.forEach((item) => {
947
+          if (this.tempParams) {
911 948
             if (
912 949
               item.tempValue < this.tempParams.alarmValueMin ||
913 950
               item.tempValue > this.tempParams.alarmValueMax
@@ -920,6 +957,9 @@ export default {
920 957
               item.status = 1;
921 958
               this.wetTempStatus = 1;
922 959
             }
960
+          }
961
+
962
+          if (this.wetParams) {
923 963
             if (
924 964
               item.wetValue < this.wetParams.alarmValueMin ||
925 965
               item.wetValue > this.wetParams.alarmValueMax
@@ -932,13 +972,13 @@ export default {
932 972
               item.status = 1;
933 973
               this.wetTempStatus = 1;
934 974
             }
935
-          });
975
+          }
936 976
         });
977
+      });
937 978
 
938
-        // //取整
939
-        // this.rightDewValue=parseInt(this.rightDewValue/arr.length)
940
-        // console.log(this.rightDewValue,"//////")
941
-      }
979
+      // //取整
980
+      // this.rightDewValue=parseInt(this.rightDewValue/arr.length)
981
+      console.log(this.tableData, "添加状态");
942 982
     },
943 983
 
944 984
     //公共方法计算平均值
@@ -946,20 +986,32 @@ export default {
946 986
       //计算平均值
947 987
 
948 988
       let avgNum = 0;
989
+      this.rightDewValue = 0;
990
+      this.rightTempValue = 0;
991
+      this.rightWetValue = 0;
949 992
       arr.forEach((ele) => {
950 993
         ele.forEach((item) => {
951 994
           avgNum++;
952
-          console.log(item, "wwwwww");
995
+
996
+          item.dewValue = Number(item.dewValue);
997
+          item.tempValue = Number(item.tempValue);
998
+          item.wetValue = Number(item.wetValue);
999
+          console.log(item.dewValue, item.tempValue, item.wetValue, "item");
953 1000
           //露点均温
954
-          this.rightDewValue += parseInt(item.dewValue);
1001
+          this.rightDewValue += item.dewValue;
955 1002
           //温度均温
956
-          this.rightTempValue += parseInt(item.tempValue);
1003
+          this.rightTempValue += item.tempValue;
957 1004
           //湿度均温
958
-          this.rightWetValue += parseInt(item.wetValue);
1005
+          this.rightWetValue += item.wetValue;
1006
+          console.log(
1007
+            this.rightDewValue,
1008
+            this.rightTempValue,
1009
+            this.rightWetValue
1010
+          );
959 1011
         });
960 1012
       });
961 1013
       //取整
962
-
1014
+      console.log(this.rightDewValue, avgNum, "wwwwww");
963 1015
       this.rightDewValue = parseInt(this.rightDewValue / avgNum);
964 1016
       this.rightTempValue = parseInt(this.rightTempValue / avgNum);
965 1017
       this.rightWetValue = parseInt(this.rightWetValue / avgNum);
@@ -979,15 +1031,15 @@ export default {
979 1031
         var url = ele.url === undefined ? "-1" : ele.url;
980 1032
         var path = ele.path === undefined ? "-1" : ele.path;
981 1033
         var params = ele.params === undefined ? "-1" : ele.params;
982
-        var kqcfName = ele.kqcfName;
1034
+
983 1035
         var areaIndex = ele.index;
984 1036
 
985
-        htmlStr += `<div w=${w} h=${h} x=${x}  y=${y} url=${url} path=${path}  params=${params} kqcfName=${kqcfName} areaIndex=${areaIndex} class="area" style=left:${
1037
+        htmlStr += `<div w=${w} h=${h} x=${x}  y=${y} url=${url} path=${path}  params=${params}  areaIndex=${areaIndex} class="area" style=left:${
986 1038
           x - w / 2
987 1039
         }px;top:${y - h / 2}px;width:${ele.w}px;height:${ele.h}px></div>
988 1040
          `;
989 1041
       }
990
-      htmlStr += ` <div class="cfBig" id="pDiv"></div>`;
1042
+      htmlStr += `<div id="pDiv"></div>`;
991 1043
 
992 1044
       $("#map").append(htmlStr);
993 1045
 
@@ -997,17 +1049,75 @@ export default {
997 1049
         var url = e.target.getAttribute("url");
998 1050
         var path = e.target.getAttribute("path");
999 1051
         var params = e.target.getAttribute("params");
1052
+
1053
+        console.log(url, path);
1054
+        if (url !== "-1") {
1055
+          console.log(",,,,");
1056
+          this.type = 1;
1057
+          // this.iframSrc = url
1058
+          window.location.href = url;
1059
+          // window.open(url);
1060
+        }
1061
+
1062
+        if (path !== "-1") {
1063
+          // this.type = 3;
1064
+          console.log(params, "params....");
1065
+          this.$router.push({
1066
+            path: path,
1067
+            query: {
1068
+              houseId: routerCfbh,
1069
+            },
1070
+          });
1071
+        }
1000 1072
       });
1001 1073
 
1002 1074
       //鼠标移上去的样式
1075
+      //鼠标移上去的样式
1003 1076
       $(".area").mouseover((e) => {
1004 1077
         console.log(e, "e....");
1005
-        this.isHover = true;
1006
-        console.log("鼠标yishangqule.....s");
1078
+        //背景框的样式
1079
+        var bigKuang = this.wetTempStatus == 1 ? "normalTemp" : "normalTemp1";
1080
+        //列表前小圆点的样式
1081
+        var listStyle = this.wetTempStatus == 1 ? "listSucess" : "listError";
1082
+        //温度数字样式
1083
+        var tempNum = this.tempNumStyle == 1 ? "tempNumSucess" : "tempNumError";
1084
+             //湿度数字样式
1085
+        var wetNum = this.wetNumStyle == 1 ? "wetNumSucess" : "wetNumError";
1086
+        // var isHuanxing=this.wetTempStatus == 1 ? "hxBig" : "";
1087
+        // var isSx=this.wetTempStatus == 1 ? "sxxz" : "";
1088
+
1089
+        // var imgUrl=this.wetTempStatus == 1 ? "greenImg" : "redImg";
1007 1090
         this.scrollIndex = $(e.target).attr("areaIndex");
1008 1091
         console.log(this.scrollIndex, "  this.scrollIndex");
1092
+         //判断是否是绿色环状还是红色环状
1093
+         let huan=''
1094
+        //  this.wetTempStatus = 1
1095
+         if(this.wetTempStatus == 1){
1096
+          huan=`<div class="list-left">
1097
+                        <div class="hxBig">
1098
+                          <img
1099
+                            class="sxxz"
1100
+                            src=${greenImg}
1101
+                            alt=""
1102
+                          />
1103
+                        </div>
1104
+                      </div>`
1105
+         }else{
1106
+          huan=`<div class="list-left">
1107
+                        <img
1108
+                          src=${redImg}
1109
+                          alt=""
1110
+                          style="width: 100%; height: 100%"
1111
+                        />
1112
+                      </div>`
1113
+         }
1009 1114
         let listShow = "";
1115
+        console.log(this.tableData[this.scrollIndex],"this.tableData[this.scrollIndex]")
1116
+
1117
+       
1010 1118
         this.tableData[this.scrollIndex].forEach((ele) => {
1119
+          this.tempNumStyle = ele.tempStatus;
1120
+          this.wetNumStyle = ele.wetStatus;
1011 1121
           listShow += `
1012 1122
         <ul
1013 1123
                             class="DataList_top inUl"
@@ -1016,23 +1126,15 @@ export default {
1016 1126
                           <li class="DataList_left">
1017 1127
                               <span
1018 1128
                               
1019
-                                style="
1020
-                                  width: 5px;
1021
-                                  height: 5px;
1022
-                                  border-radius: 50%;
1023
-                                  background: rgb(38, 222, 197);
1024
-                                  display: inline-block;
1025
-
1026
-                                  margin-right: 5px;
1027
-                                "
1129
+                               class=${listStyle}
1028 1130
                               ></span>
1029 1131
                              
1030 1132
                               
1031
-                              <span> ${ele.tempValue}</span>
1133
+                              <span class=${tempNum}> ${ele.tempValue}</span>
1032 1134
                             </li>
1033 1135
                             <li class="DataList_left">
1034 1136
                              
1035
-                              <span> ${ele.wetValue}% </span>
1137
+                              <span class=${wetNum}> ${ele.wetValue}% </span>
1036 1138
                             </li>
1037 1139
                             <li class="DataList_left">
1038 1140
                               ${ele.time}
@@ -1046,21 +1148,13 @@ export default {
1046 1148
         $("#pDiv").html(`
1047 1149
 
1048 1150
                   <div
1049
-                    class="normalTemp"
1151
+                    class=${bigKuang}
1050 1152
                   >
1051 1153
                     <div class="temp-title">
1052 1154
                       ${parseInt(this.scrollIndex) + 1}号点位温湿度
1053 1155
                     </div>
1054 1156
                     <div class="temp-list">
1055
-                      <div class="list-left">
1056
-                        <div class="hxBig">
1057
-                          <img
1058
-                            class="sxxz"
1059
-                            src="../../../assets/images/bigScreen/shanxing.png"
1060
-                            alt=""
1061
-                          />
1062
-                        </div>
1063
-                      </div>
1157
+                     ${huan}
1064 1158
                     
1065 1159
                       <div class="list-right">
1066 1160
                         <ul class="outUl">
@@ -1079,40 +1173,7 @@ export default {
1079 1173
 
1080 1174
 
1081 1175
         `);
1082
-        // const kqcfName = $(e.target).attr("kqcfName");
1083
-        // console.log(kqcfName, "kqcfName");
1084
-        // var kqcfObj = this.kqData.find((item) => {
1085
-        //   return item.orgName === kqcfName;
1086
-        //   // return item.orgName.indexOf(kqcfName);
1087
-        // });
1088
-        // console.log(kqcfObj, "kqcfObj");
1089
-
1090
-        //  var isNormal = true;
1091
-        //  var className = isNormal?"normal":"error";
1092
-
1093
-        // if (!kqcfObj) {
1094
-        //   $("#pDiv").html(` <div class=${className}>暂无数据</div>`);
1095
-        // } else {
1096
-        //   $("#pDiv").html(`
1097
-        //  <div>
1098
-        //      <span>仓房名称:</span>
1099
-        //      <span>${kqcfObj.orgName}</span>
1100
-        //  </div>
1101
-        //   <div>
1102
-        //      <span>粮食品种:</span>
1103
-        //      <span>${kqcfObj.pzName}</span>
1104
-        //   </div>
1105
-        //   <div>
1106
-        //       <span>粮食数量:</span>
1107
-        //       <span>${kqcfObj.lsNumber}吨</span>
1108
-        //    </div>
1109
-        //    <div>
1110
-        //        <span>设备状态:</span>
1111
-        //         <span>在线</span>
1112
-
1113
-        //   </div>
1114
-        // `);
1115
-        //}
1176
+
1116 1177
         const offset = 30;
1117 1178
         const top = $(e.target).position().top + offset;
1118 1179
         const left = $(e.target).position().left + offset;
@@ -1186,6 +1247,17 @@ export default {
1186 1247
     //   //用setInterval做动画感觉有问题
1187 1248
     //   this.drawSdtj();
1188 1249
     // }, 6000);
1250
+    api
1251
+      .equipmentTagList({ curPage: 1, pageSize: 99999 })
1252
+      .then((res) => {
1253
+        if (res.code == 200) {
1254
+          console.log(res.data, "设备列表");
1255
+          this.deviceLists = res.data.records;
1256
+        }
1257
+      })
1258
+      .catch((err) => {
1259
+        console.log(err);
1260
+      });
1189 1261
   },
1190 1262
   destroyed() {
1191 1263
     this.unconnect();
@@ -1193,7 +1265,7 @@ export default {
1193 1265
   mounted() {
1194 1266
     //点位列表初始化
1195 1267
     this.getPointList();
1196
-    this.getWsdAlarmParams();
1268
+    // this.getWsdAlarmParams();
1197 1269
     this.getTempWetStatus();
1198 1270
     this.addArea();
1199 1271
     this.scale();
@@ -1479,7 +1551,6 @@ export default {
1479 1551
   font-size: 14px;
1480 1552
   padding: 8px;
1481 1553
   display: none;
1482
-;
1483 1554
 }
1484 1555
 .normalTemp,
1485 1556
 .normalTemp1 {
@@ -1511,48 +1582,41 @@ export default {
1511 1582
   padding: 10px;
1512 1583
 }
1513 1584
 .outUl {
1514
-    display: flex;
1515
-
1516
-    justify-content: space-around;
1517
-   
1518
-    color: #ccc;
1519
-    font-weight: bolder;
1585
+  display: flex;
1520 1586
 
1521
-    
1522
-  
1523
-   
1524
-  }
1525
-  .outUl li {
1526
-      display: flex;
1587
+  justify-content: space-around;
1527 1588
 
1528
-      justify-content: space-around;
1529
-      text-align: center;
1530
-      width: 27%;
1531
-      font-size: 14px;
1532
-    }
1533
-    .outUl li:nth-child(3) {
1534
-      width: 46%;
1535
-    }
1589
+  color: #ccc;
1590
+  font-weight: bolder;
1591
+}
1592
+.outUl li {
1593
+  display: flex;
1536 1594
 
1537
-  .inUl {
1538
-    display: flex;
1595
+  justify-content: space-around;
1596
+  text-align: center;
1597
+  width: 27%;
1598
+  font-size: 14px;
1599
+}
1600
+.outUl li:nth-child(3) {
1601
+  width: 46%;
1602
+}
1539 1603
 
1540
-    justify-content: space-around;
1604
+.inUl {
1605
+  display: flex;
1541 1606
 
1542
-   
1543
-  }
1544
-  .inUl li{
1545
-      line-height: 29px;
1546
-      text-align: center;
1547
-      width: 27%;
1548
-      font-size: 12px;
1549
-      color: rgb(204, 236, 232);
1550
-  
1551
-    }
1607
+  justify-content: space-around;
1608
+}
1609
+.inUl li {
1610
+  line-height: 29px;
1611
+  text-align: center;
1612
+  width: 27%;
1613
+  font-size: 12px;
1614
+  color: rgb(204, 236, 232);
1615
+}
1552 1616
 
1553
-    .inUl li:nth-child(3) {
1554
-      width: 46%;
1555
-    }
1617
+.inUl li:nth-child(3) {
1618
+  width: 46%;
1619
+}
1556 1620
 .list-left {
1557 1621
   width: 100px;
1558 1622
   height: 100px;
@@ -1567,12 +1631,14 @@ export default {
1567 1631
   background: url("../../../assets/images/bigScreen/huanxing.png") no-repeat;
1568 1632
   background-size: 100% 100%;
1569 1633
 
1570
-  @keyframes fadeenum {
1634
+  
1635
+  
1636
+}
1637
+@keyframes fadeenum {
1571 1638
     100% {
1572 1639
       transform: rotate(360deg);
1573 1640
     }
1574 1641
   }
1575
-}
1576 1642
 .sxxz {
1577 1643
   position: absolute;
1578 1644
   scale: 0.8;
@@ -1583,7 +1649,30 @@ export default {
1583 1649
   animation-timing-function: linear;
1584 1650
 }
1585 1651
 
1586
-/* #pDiv div {
1587
-  line-height: 20px;
1588
-} */
1652
+.listSucess {
1653
+  width: 5px;
1654
+  height: 5px;
1655
+  border-radius: 50%;
1656
+  background: rgb(38, 222, 197);
1657
+  display: inline-block;
1658
+
1659
+  margin-right: 5px;
1660
+}
1661
+.listError {
1662
+  width: 5px;
1663
+  height: 5px;
1664
+  border-radius: 50%;
1665
+  background: red;
1666
+  display: inline-block;
1667
+
1668
+  margin-right: 5px;
1669
+}
1670
+.tempNumSucess,
1671
+.wetNumSucess {
1672
+  color: rgb(38, 222, 197);
1673
+}
1674
+.tempNumError,
1675
+.wetNumError {
1676
+  color: red;
1677
+}
1589 1678
 </style>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1965 - 0
src/views/system/visualized/index-click.vue


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1583 - 0
src/views/system/visualized/index-hover.vue


+ 220 - 277
src/views/system/visualized/index.vue

@@ -33,25 +33,34 @@
33 33
             </div>
34 34
 
35 35
             <div class="bottom">
36
-              <div id="map">
37
-                <img
38
-                  src="../../../assets/images/bigScreen/cangfang.png"
39
-                  border="0"
40
-                  usemap="#planetmap"
41
-                  alt="Planets"
42
-                  class="imgStyle"
43
-                  style="width: 100%; height: 100%"
44
-                />
45
-              </div>
46
-              <!-- <div class="cfBig" v-if="isHover == true">
47
-                <div class="bot-top">
36
+            
37
+              <div class="cfBig">
38
+                <vue-seamless-scroll
39
+        :data="tableData"
40
+        :class-option="seamlessScrollOption"
41
+        style="
42
+         
43
+          height: 460px;
44
+          overflow: hidden;
45
+          width: 100%;
46
+
47
+  
48
+    
49
+        "
50
+      >
51
+                <div class="cf-left">
52
+                            
48 53
                   <div
54
+                  v-for="(e, index) in tableData"
55
+                            :key="index"
49 56
                     :class="{
50 57
                       normalTemp: wetTempStatus == 1,
51 58
                       normalTemp1: wetTempStatus == 0,
52 59
                     }"
53 60
                   >
54
-                    <div class="temp-title">{{parseInt(scrollIndex)+1}}号点位温湿度</div>
61
+                    <div class="temp-title">
62
+                      {{ index + 1 }}号点位温湿度
63
+                    </div>
55 64
                     <div class="temp-list">
56 65
                       <div class="list-left" v-if="wetTempStatus == 1">
57 66
                         <div class="hxBig">
@@ -76,14 +85,15 @@
76 85
                           <li>监测时间</li>
77 86
                         </ul>
78 87
                         <vue-seamless-scroll
79
-                          :data="tableData[scrollIndex]"
88
+                          :data="e"
80 89
                           :class-option="classOption"
81 90
                           class="scroll"
82 91
                         >
83 92
                           <ul
84 93
                             class="DataList_top inUl"
85
-                            v-for="(item, index) in tableData[scrollIndex]"
94
+                            v-for="(item, index) in e"
86 95
                             :key="index"
96
+                            
87 97
                           >
88 98
                             <li class="DataList_left">
89 99
                               <span
@@ -135,8 +145,11 @@
135 145
                       </div>
136 146
                     </div>
137 147
                   </div>
148
+                 
138 149
                 </div>
139
-              </div> -->
150
+              </vue-seamless-scroll>
151
+            
152
+              </div>
140 153
             </div>
141 154
           </div>
142 155
           <div class="screen-right">
@@ -248,14 +261,24 @@
248 261
                     <div style="flex: 1; text-align: center">正常</div>
249 262
                     <div class="top-right">
250 263
                       <div class="normal">{{ devOnlineSum }}</div>
251
-                      <div class="numberStyle">{{ devOnlineRate }}%</div>
264
+                      <div
265
+                        class="numberStyle"
266
+                        style="width: 50px; text-align: center"
267
+                      >
268
+                        {{ devOnlineRate }}%
269
+                      </div>
252 270
                     </div>
253 271
                   </div>
254 272
                   <div class="bottom">
255 273
                     <div style="flex: 1; text-align: center">故障</div>
256 274
                     <div class="bot-right">
257 275
                       <div class="hitch">{{ devOfflineSum }}</div>
258
-                      <div class="numberStyle">{{ devOfflineRate }}%</div>
276
+                      <div
277
+                        class="numberStyle"
278
+                        style="width: 50px; text-align: center"
279
+                      >
280
+                        {{ devOfflineRate }}%
281
+                      </div>
259 282
                     </div>
260 283
                   </div>
261 284
                 </div>
@@ -294,11 +317,8 @@ export default {
294 317
   },
295 318
   data() {
296 319
     return {
297
-      //温度数字颜色判断条件
298
-      tempNumStyle: null,
299
-
300
-      //湿度数字颜色判断条件
301
-      wetNumStyle: null,
320
+      top: 32,
321
+      left: 25,
302 322
       //初始化列表的长度
303 323
 
304 324
       tableDataLength: null,
@@ -317,30 +337,17 @@ export default {
317 337
       //滚动列表Index
318 338
       scrollIndex: 0,
319 339
       //鼠标是否移上去
320
-      isHover: false,
340
+      // isHover: false,
321 341
       form: {
322 342
         cfValue: "",
323 343
       },
324
-      cfLists: [
325
-        {
326
-          value: "选项1",
327
-          label: "黄金糕",
328
-        },
329
-        {
330
-          value: "选项2",
331
-          label: "双皮奶",
332
-        },
333
-        {
334
-          value: "选项3",
335
-          label: "蚵仔煎",
336
-        },
337
-      ],
344
+
338 345
       //右侧露点温度
339
-      rightDewValue: null,
346
+      rightDewValue: 0,
340 347
       //右侧仓内温度
341
-      rightTempValue: null,
348
+      rightTempValue: 0,
342 349
       //右侧仓内湿度
343
-      rightWetValue: null,
350
+      rightWetValue: 0,
344 351
       //温度最大最小值
345 352
       tempParams: {},
346 353
       //湿度最大最小值
@@ -403,6 +410,18 @@ export default {
403 410
         waitTime: 0, // 单步运动停止的时间(默认值1000ms)
404 411
       };
405 412
     },
413
+    seamlessScrollOption(){
414
+      return {
415
+        step: 0.8, // 数值越大速度滚动越快
416
+        limitMoveNum:6, // 开始无缝滚动的数据量 this.dataList.length
417
+        hoverStop: true, // 是否开启鼠标悬停stop
418
+        direction: 1, // 0向下 1向上 2向左 3向右
419
+        openWatch: true, // 开启数据实时监控刷新dom
420
+        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
421
+        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
422
+        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
423
+      };
424
+    }
406 425
   },
407 426
   methods: {
408 427
     //仓房下拉选改变时
@@ -414,14 +433,26 @@ export default {
414 433
     },
415 434
     connect() {
416 435
       let options = {
436
+        //本地
417 437
         username: "admin",
418 438
         password: "public",
439
+        //测试
440
+        // username: "admin",
441
+        // password: "admin@123",
442
+        //生产
443
+        // username: "admin",
444
+        // password: "admin@2Ld&DDrsk",
419 445
         cleanSession: true,
420 446
         keepAlive: 60,
421 447
         clientId: "mqttjs_" + Math.random().toString(16).substr(2, 8),
422 448
         connectTimeout: 4000,
423 449
       };
450
+      //本地开发环境
424 451
       this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
452
+      //测试环境
453
+      // this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
454
+      //正式环境
455
+      // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
425 456
       this.client.on("connect", (e) => {
426 457
         console.log("成功连接服务器2222222:", e);
427 458
         //订阅三个名叫'top/#', 'three/#'和'#'的主题
@@ -430,6 +461,7 @@ export default {
430 461
             // "/PUSH/c89512024085/DPUT/upload",
431 462
             // "/PUSH/X1XXXQ2206090069/DPUT/upload",
432 463
             "/PUSH/8951DQ2207200018/DPUT/upload",
464
+            "/PUSH/8951DQ2207200019/DPUT/upload",
433 465
           ],
434 466
           { qos: 1 },
435 467
           (err) => {
@@ -466,7 +498,7 @@ export default {
466 498
     getMessage() {
467 499
       this.client.on("message", (topic, message) => {
468 500
         if (message) {
469
-          let str = "8951DQ2207200018";
501
+          let str = "8951DQ2207200019";
470 502
           if (topic.indexOf(str) != -1) {
471 503
             console.log("收到来着", topic, "的信息", message.toString());
472 504
             var res = JSON.parse(message.toString());
@@ -477,6 +509,20 @@ export default {
477 509
                 this.tableData[index].unshift(ele);
478 510
                 this.tableData[index].pop();
479 511
               });
512
+
513
+              this.wetTempPublic(this.tableData);
514
+         
515
+              this.calcAve(this.tableData);
516
+            } else if (this.tableDataLength < 1) {
517
+              this.tableData=[]
518
+              res.data.forEach((ele, index) => {
519
+                ele.time = res.time;
520
+                this.tableData.push([ele]);
521
+              });
522
+              console.log(this.tableData, "mqtt ---表格");
523
+
524
+              this.wetTempPublic(this.tableData);
525
+              this.calcAve(this.tableData);
480 526
             } else {
481 527
               this.$message({
482 528
                 message: "设备配置信息与实际点位不符",
@@ -485,9 +531,6 @@ export default {
485 531
             }
486 532
           }
487 533
 
488
-          this.wetTempPublic(this.tableData);
489
-          this.calcAve(this.tableData);
490
-
491 534
           // 露点
492 535
 
493 536
           // 温度
@@ -888,11 +931,18 @@ export default {
888 931
         console.log(res, "点位列表");
889 932
 
890 933
         this.tableData = Object.values(res.data);
934
+
891 935
         this.tableDataLength = this.tableData.length;
892 936
         console.log(this.tableData, "初始化");
937
+        if (this.tableDataLength < 1) {
938
+          this.rightDewValue = 0;
939
+          this.rightTempValue = 0;
940
+          this.rightWetValue = 0;
941
+        }
942
+          this.getWsdAlarmParams();
943
+          this.calcAve(this.tableData);
944
+      
893 945
         //如果温湿度大于或小于正常值则添加字段status,0位不正常,1为正常
894
-        this.getWsdAlarmParams();
895
-        this.calcAve(this.tableData);
896 946
       });
897 947
     },
898 948
     // 温湿度最高最低参数
@@ -989,11 +1039,10 @@ export default {
989 1039
       arr.forEach((ele) => {
990 1040
         ele.forEach((item) => {
991 1041
           avgNum++;
992
-
993
-          item.dewValue = Number(item.dewValue);
994
-          item.tempValue = Number(item.tempValue);
995
-          item.wetValue = Number(item.wetValue);
996
-          console.log(item.dewValue, item.tempValue, item.wetValue, "item");
1042
+          console.log(item, "item");
1043
+          item.dewValue = parseInt(item.dewValue);
1044
+          item.tempValue = parseInt(item.tempValue);
1045
+          item.wetValue = parseInt(item.wetValue);
997 1046
           //露点均温
998 1047
           this.rightDewValue += item.dewValue;
999 1048
           //温度均温
@@ -1028,15 +1077,15 @@ export default {
1028 1077
         var url = ele.url === undefined ? "-1" : ele.url;
1029 1078
         var path = ele.path === undefined ? "-1" : ele.path;
1030 1079
         var params = ele.params === undefined ? "-1" : ele.params;
1031
-
1080
+        var kqcfName = ele.kqcfName;
1032 1081
         var areaIndex = ele.index;
1033 1082
 
1034
-        htmlStr += `<div w=${w} h=${h} x=${x}  y=${y} url=${url} path=${path}  params=${params}  areaIndex=${areaIndex} class="area" style=left:${
1083
+        htmlStr += `<div w=${w} h=${h} x=${x}  y=${y} url=${url} path=${path}  params=${params} kqcfName=${kqcfName} areaIndex=${areaIndex} class="area" style=left:${
1035 1084
           x - w / 2
1036 1085
         }px;top:${y - h / 2}px;width:${ele.w}px;height:${ele.h}px></div>
1037 1086
          `;
1038 1087
       }
1039
-      htmlStr += `<div id="pDiv"></div>`;
1088
+      // htmlStr += `<div id="pDiv"></div>`;
1040 1089
 
1041 1090
       $("#map").append(htmlStr);
1042 1091
 
@@ -1069,97 +1118,32 @@ export default {
1069 1118
       });
1070 1119
 
1071 1120
       //鼠标移上去的样式
1072
-      //鼠标移上去的样式
1073 1121
       $(".area").mouseover((e) => {
1122
+        this.isHover = true;
1123
+        const top = $(e.target).position().top + 180;
1124
+        const left = $(e.target).position().left + 100;
1125
+        $("#imgPoint").css({
1126
+          top: top,
1127
+          left: left,
1128
+        });
1074 1129
         console.log(e, "e....");
1075
-        //背景框的样式
1076
-        var bigKuang = this.wetTempStatus == 1 ? "normalTemp" : "normalTemp1";
1077
-        //列表前小圆点的样式
1078
-        var listStyle = this.wetTempStatus == 1 ? "listSucess" : "listError";
1079
-        //温度数字样式
1080
-        var tempNum = this.tempNumStyle == 1 ? "tempNumSucess" : "tempNumError";
1081
-        var wetNum = this.wetNumStyle == 1 ? "wetNumSucess" : "wetNumError";
1130
+
1131
+        console.log("鼠标yishangqule.....s");
1082 1132
         this.scrollIndex = $(e.target).attr("areaIndex");
1083 1133
         console.log(this.scrollIndex, "  this.scrollIndex");
1084
-        let listShow = "";
1085
-        this.tableData[this.scrollIndex].forEach((ele) => {
1086
-          this.tempNumStyle = ele.tempStatus;
1087
-          this.wetNumStyle = ele.wetStatus;
1088
-          listShow += `
1089
-        <ul
1090
-                            class="DataList_top inUl"
1091
-                          
1092
-                          >
1093
-                          <li class="DataList_left">
1094
-                              <span
1095
-                              
1096
-                               class=${listStyle}
1097
-                              ></span>
1098
-                             
1099
-                              
1100
-                              <span class=${tempNum}> ${ele.tempValue}</span>
1101
-                            </li>
1102
-                            <li class="DataList_left">
1103
-                             
1104
-                              <span class=${wetNum}> ${ele.wetValue}% </span>
1105
-                            </li>
1106
-                            <li class="DataList_left">
1107
-                              ${ele.time}
1108
-                            </li>
1109
-                          </ul>
1110
-       
1111
-        
1112
-        `;
1113
-        });
1114 1134
 
1115
-        $("#pDiv").html(`
1135
+   
1116 1136
 
1117
-                  <div
1118
-                    class=${bigKuang}
1119
-                  >
1120
-                    <div class="temp-title">
1121
-                      ${parseInt(this.scrollIndex) + 1}号点位温湿度
1122
-                    </div>
1123
-                    <div class="temp-list">
1124
-                      <div class="list-left">
1125
-                        <div class="hxBig">
1126
-                          <img
1127
-                            class="sxxz"
1128
-                            src="../../../assets/images/bigScreen/shanxing.png"
1129
-                            alt=""
1130
-                          />
1131
-                        </div>
1132
-                      </div>
1133
-                    
1134
-                      <div class="list-right">
1135
-                        <ul class="outUl">
1136
-                          <li>温度</li>
1137
-                          <li>湿度</li>
1138
-                          <li>监测时间</li>
1139
-                        </ul>
1140
-  
1141
-                        ${listShow}
1142
-                         
1143
-                      
1144
-                      </div>
1145
-                    </div>
1146
-                  </div>
1147
-        
1148
-
1149
-
1150
-        `);
1151
-
1152
-        const offset = 30;
1153
-        const top = $(e.target).position().top + offset;
1154
-        const left = $(e.target).position().left + offset;
1155
-        $("#pDiv").show();
1156
-        $("#pDiv").css({
1157
-          top: top,
1158
-          left: left,
1159
-        });
1137
+     
1138
+       
1160 1139
       });
1161 1140
       $(".area").mouseleave((e) => {
1162
-        $("#pDiv").hide();
1141
+        this.isHover = false;
1142
+        // $("#imgPoint").css({
1143
+        //   top: top,
1144
+        //   left: left,
1145
+        // })
1146
+        // $("#scrollDiv").hide();
1163 1147
       });
1164 1148
     },
1165 1149
     scale() {
@@ -1215,6 +1199,10 @@ export default {
1215 1199
         //$(".a").css({position: "absolute",'top': ,'left':offsetleft+50});
1216 1200
       });
1217 1201
     },
1202
+    //点击每组点位
1203
+    // point(num) {
1204
+    //   this.scrollIndex = num;
1205
+    // },
1218 1206
   },
1219 1207
   created() {
1220 1208
     this.connect();
@@ -1226,8 +1214,11 @@ export default {
1226 1214
       .equipmentTagList({ curPage: 1, pageSize: 99999 })
1227 1215
       .then((res) => {
1228 1216
         if (res.code == 200) {
1229
-          console.log(res.data, "设备列表");
1230
-          this.deviceLists = res.data.records;
1217
+          console.log(res.data, "仓房列表");
1218
+          if (res.data.records.length > 1) {
1219
+            this.deviceLists = res.data.records;
1220
+            this.form.cfValue = res.data.records[0].labelCode;
1221
+          }
1231 1222
         }
1232 1223
       })
1233 1224
       .catch((err) => {
@@ -1303,6 +1294,88 @@ export default {
1303 1294
           padding: 20px 40px;
1304 1295
           height: calc(100% - 130px);
1305 1296
           box-sizing: border-box;
1297
+
1298
+          .cfBig {
1299
+            // flex-direction: column;
1300
+            // /* width: 100%; */
1301
+    
1302
+            height: 100%;
1303
+            // background: url("../../../assets/images/bigScreen/cangfang.png")
1304
+            //   no-repeat;
1305
+            // background-size: contain;
1306
+            // background-position-x: center;
1307
+            .cf-left
1308
+             {
1309
+              width: 100%;
1310
+          
1311
+             
1312
+             
1313
+              .normalTemp,
1314
+              .normalTemp1 {
1315
+                display: inline-block;
1316
+           
1317
+                width: 31%;
1318
+                height: 200px;
1319
+                margin:20px 12px;
1320
+           
1321
+               
1322
+                background: url("../../../assets/images/bigScreen/normal-temp.png")
1323
+                  no-repeat;
1324
+                background-size: 100% 100%;
1325
+                .temp-title {
1326
+                  margin-left: 24px;
1327
+                  margin-top: 6px;
1328
+                  color: rgb(38, 222, 197);
1329
+                  font-weight: bolder;
1330
+                }
1331
+                .temp-list {
1332
+                  flex: 1;
1333
+                  display: flex;
1334
+                  justify-content: space-between;
1335
+                  align-items: center;
1336
+                  padding: 10px;
1337
+                  .list-left {
1338
+                    width: 100px;
1339
+                    height: 100px;
1340
+                    .hxBig {
1341
+                      width: 102px;
1342
+                      height: 102px;
1343
+                      position: relative;
1344
+                      background: url("../../../assets/images/bigScreen/huanxing.png")
1345
+                        no-repeat;
1346
+                      background-size: 100% 100%;
1347
+                      .sxxz {
1348
+                        position: absolute;
1349
+                        scale: 0.8;
1350
+                        top: 46px;
1351
+                        left: 19px;
1352
+                        animation: fadeenum 5s infinite;
1353
+                        transform-origin: 69% 8%;
1354
+                        animation-timing-function: linear;
1355
+                      }
1356
+                      @keyframes fadeenum {
1357
+                        100% {
1358
+                          transform: rotate(360deg);
1359
+                        }
1360
+                      }
1361
+                    }
1362
+                  }
1363
+                  .list-right {
1364
+                    width: calc(100% - 100px);
1365
+                  }
1366
+                }
1367
+              }
1368
+              .normalTemp1 {
1369
+                background: url("../../../assets/images/bigScreen/noNormal.png")
1370
+                  no-repeat;
1371
+                background-size: 100% 100%;
1372
+              }
1373
+            }
1374
+
1375
+           
1376
+          }
1377
+          
1378
+        
1306 1379
         }
1307 1380
       }
1308 1381
       .screen-right {
@@ -1390,7 +1463,7 @@ export default {
1390 1463
               }
1391 1464
               .top .top-right {
1392 1465
                 flex-direction: row;
1393
-                flex: 1;
1466
+                flex: 3;
1394 1467
                 .normal {
1395 1468
                   font-size: 12px;
1396 1469
                   margin-right: 5px;
@@ -1403,7 +1476,7 @@ export default {
1403 1476
                 }
1404 1477
               }
1405 1478
               .bottom .bot-right {
1406
-                flex: 1;
1479
+                flex: 3;
1407 1480
                 display: flex;
1408 1481
                 flex-direction: row;
1409 1482
                 justify-content: center;
@@ -1464,11 +1537,11 @@ export default {
1464 1537
 
1465 1538
       justify-content: space-around;
1466 1539
       text-align: center;
1467
-      width: 27%;
1540
+      width: 22%;
1468 1541
       font-size: 14px;
1469 1542
     }
1470 1543
     li:nth-child(3) {
1471
-      width: 46%;
1544
+      width: 56%;
1472 1545
     }
1473 1546
     //   // li:nth-child(1) {
1474 1547
     //   //   width: 24%;
@@ -1482,14 +1555,14 @@ export default {
1482 1555
     li {
1483 1556
       line-height: 29px;
1484 1557
       text-align: center;
1485
-      width: 27%;
1558
+      width: 22%;
1486 1559
       font-size: 12px;
1487 1560
       color: rgb(204, 236, 232);
1488 1561
       // color:rgb(29, 221, 196);
1489 1562
     }
1490 1563
 
1491 1564
     li:nth-child(3) {
1492
-      width: 46%;
1565
+      width: 56%;
1493 1566
     }
1494 1567
   }
1495 1568
   .numberStyle {
@@ -1506,7 +1579,7 @@ export default {
1506 1579
 .area {
1507 1580
   position: absolute;
1508 1581
 
1509
-  background: rgba(222, 222, 58, 0.514);
1582
+  /* background: rgba(222, 222, 58, 0.514); */
1510 1583
 
1511 1584
   border-radius: 60%;
1512 1585
   cursor: pointer;
@@ -1517,134 +1590,4 @@ export default {
1517 1590
   position: relative;
1518 1591
   /* soverflow: hidden; */
1519 1592
 }
1520
-
1521
-#pDiv {
1522
-  position: absolute;
1523
-  top: 10%;
1524
-  left: 50%;
1525
-  z-index: 99;
1526
-  font-size: 14px;
1527
-  padding: 8px;
1528
-  display: none;
1529
-}
1530
-.normalTemp,
1531
-.normalTemp1 {
1532
-  /* position: absolute;
1533
-  top: 32%;
1534
-  left: 25%; */
1535
-  width: 400px;
1536
-  height: 200px;
1537
-  display: flex;
1538
-  flex-direction: column;
1539
-  background: url("../../../assets/images/bigScreen/normal-temp.png") no-repeat;
1540
-  background-size: 100% 100%;
1541
-}
1542
-.normalTemp1 {
1543
-  background: url("../../../assets/images/bigScreen/noNormal.png") no-repeat;
1544
-  background-size: 100% 100%;
1545
-}
1546
-.temp-title {
1547
-  margin-left: 24px;
1548
-  margin-top: 8px;
1549
-  color: rgb(38, 222, 197);
1550
-  font-weight: bolder;
1551
-}
1552
-.temp-list {
1553
-  flex: 1;
1554
-  display: flex;
1555
-  justify-content: space-between;
1556
-  align-items: center;
1557
-  padding: 10px;
1558
-}
1559
-.outUl {
1560
-  display: flex;
1561
-
1562
-  justify-content: space-around;
1563
-
1564
-  color: #ccc;
1565
-  font-weight: bolder;
1566
-}
1567
-.outUl li {
1568
-  display: flex;
1569
-
1570
-  justify-content: space-around;
1571
-  text-align: center;
1572
-  width: 27%;
1573
-  font-size: 14px;
1574
-}
1575
-.outUl li:nth-child(3) {
1576
-  width: 46%;
1577
-}
1578
-
1579
-.inUl {
1580
-  display: flex;
1581
-
1582
-  justify-content: space-around;
1583
-}
1584
-.inUl li {
1585
-  line-height: 29px;
1586
-  text-align: center;
1587
-  width: 27%;
1588
-  font-size: 12px;
1589
-  color: rgb(204, 236, 232);
1590
-}
1591
-
1592
-.inUl li:nth-child(3) {
1593
-  width: 46%;
1594
-}
1595
-.list-left {
1596
-  width: 100px;
1597
-  height: 100px;
1598
-}
1599
-.list-right {
1600
-  width: calc(100% - 100px);
1601
-}
1602
-.hxBig {
1603
-  width: 102px;
1604
-  height: 102px;
1605
-  position: relative;
1606
-  background: url("../../../assets/images/bigScreen/huanxing.png") no-repeat;
1607
-  background-size: 100% 100%;
1608
-
1609
-  @keyframes fadeenum {
1610
-    100% {
1611
-      transform: rotate(360deg);
1612
-    }
1613
-  }
1614
-}
1615
-.sxxz {
1616
-  position: absolute;
1617
-  scale: 0.8;
1618
-  top: 46px;
1619
-  left: 19px;
1620
-  animation: fadeenum 5s infinite;
1621
-  transform-origin: 69% 8%;
1622
-  animation-timing-function: linear;
1623
-}
1624
-.listSucess {
1625
-  width: 5px;
1626
-  height: 5px;
1627
-  border-radius: 50%;
1628
-  background: rgb(38, 222, 197);
1629
-  display: inline-block;
1630
-
1631
-  margin-right: 5px;
1632
-}
1633
-.listError {
1634
-  width: 5px;
1635
-  height: 5px;
1636
-  border-radius: 50%;
1637
-  background: red;
1638
-  display: inline-block;
1639
-
1640
-  margin-right: 5px;
1641
-}
1642
-.tempNumSucess,
1643
-.wetNumSucess {
1644
-  color: rgb(38, 222, 197);
1645
-}
1646
-.tempNumError,
1647
-.wetNumError {
1648
-  color: red;
1649
-}
1650 1593
 </style>