Quellcode durchsuchen

现有对接世茂数据5分钟更新一次

wangtao vor 3 Jahren
Ursprung
Commit
5b17be5df9

+ 1 - 3
src/api/index.js

@@ -67,6 +67,4 @@ export function yunUserRequest(data) {
         method: 'get',
         params: data
     })
-}
-
-
+}

+ 16 - 16
src/components2/SpringFrame/rqgj.vue

@@ -54,8 +54,8 @@
                     主机连接号:
                 </el-col>
                 <el-col class="content" :span="14">
-                    10.208.64.54
-                    <!-- {{data[0].connect || '--'}} -->
+                    <!-- 10.208.64.54 -->
+                    {{data[0].connect || '--'}}
                 </el-col>
             </el-col>
             <el-col class="data">
@@ -79,8 +79,8 @@
                     防区名:
                 </el-col>
                 <el-col class="content" :span="14">
-                    8楼新风机房
-                    <!-- {{data[0].guardCode || '--'}} -->
+                    <!-- 8楼新风机房 -->
+                    {{data[0].guardCode || '--'}}
                 </el-col>
             </el-col>
             <el-col class="data">
@@ -88,8 +88,8 @@
                     IP地址:
                 </el-col>
                 <el-col class="content" :span="14">
-                    10.208.64.54
-                    <!-- {{data[0].ip || '--'}} -->
+                    <!-- 10.208.64.54 -->
+                    {{data[0].ip || '--'}}
                 </el-col>
             </el-col>
             <el-col class="data">
@@ -97,7 +97,7 @@
                     消息类型:
                 </el-col>
                 <el-col class="content" :span="14">
-                    {{data[0].message || '--'}}
+                    {{data[0].message == "alarm" ? "事件报警" : data[0].message || '--'}}
                 </el-col>
             </el-col>
             <el-col class="data">
@@ -105,8 +105,8 @@
                     分区名:
                 </el-col>
                 <el-col class="content" :span="14">
-                    8楼新风机房
-                    <!-- {{data[0].partCode || '--'}} -->
+                    <!-- 8楼新风机房 -->
+                    {{data[0].partCode || '--'}}
                 </el-col>
             </el-col>
             <el-col class="data">
@@ -138,8 +138,8 @@
                     处理人:
                 </el-col>
                 <el-col class="content" :span="14">
-                    王浩
-                    <!-- {{data[0].handler || '--'}} -->
+                    <!-- 王浩 -->
+                    {{data[0].handler || '--'}}
                 </el-col>
             </el-col>
             <el-col class="data" style="margin-bottom:60px">
@@ -188,14 +188,14 @@ export default {
     width:950px;
     height:680px;
     background-color: rgba(40,40,40,0.5);
-    margin:0 auto; 
+    margin:0 auto;
     border-radius: 20px;
     padding:20px;
     color:$white;
     .top{
         .title{
             width:100%;
-            margin-top:-2px; 
+            margin-top:-2px;
             margin-left:16px;
             display: inline-block;
             font-size:30px;
@@ -209,7 +209,7 @@ export default {
                 width:100%;
             }
         }
-    } 
+    }
     .contain{
         margin-top:80px;
         .data{
@@ -224,7 +224,7 @@ export default {
                 text-align: left;
             }
         }
-        
+
     }
 }
 
@@ -234,4 +234,4 @@ export default {
 <style >
 /* 表格内背景颜色 */
 
-</style>
+</style>

+ 11 - 6
src/components2/conferenceRoomStatistics/index.vue

@@ -5,14 +5,14 @@
       <el-col class="rowN" style="margin-top: 45px;">
         <el-image :src="conferenceRoom" fit="scale-down" />
         <el-col class="name">会议室总数</el-col>
-        <el-col class="num">21<span> 间</span></el-col>
-        <!-- <el-col class="num">{{data.roomTotal}}</el-col> -->
+        <!-- <el-col class="num">21<span> 间</span></el-col> -->
+        <el-col class="num">{{data.roomTotal}}<span> 间</span></el-col>
       </el-col>
       <el-col class="rowN" >
         <el-image :src="conferenceRoom" fit="scale-down" />
         <el-col class="name">在用会议室</el-col>
-        <!-- <el-col class="num">{{data.roomInUse}}</el-col> -->
-        <el-col class="num">0<span> 间</span></el-col>
+        <!-- <el-col class="num">0<span> 间</span></el-col> -->
+        <el-col class="num">{{data.roomInUse}}<span> 间</span></el-col>
       </el-col>
     </el-col>
     <div :span="12" style="position: relative;;z-index:10;top:0px;">
@@ -43,13 +43,13 @@ export default {
   },
   mounted() {
     this.init()
+    this.timing()
   },
   methods: {
     init(){
       axios({
         method: 'get',
         url: 'https://smartpark.caih.com/hyxt/api/thirdparty/meetingRoom/summary',
-        timeout: 3000,
       }).then(res =>{
         if(res.data){
           this.data = res.data
@@ -57,10 +57,15 @@ export default {
       }).catch(err =>{
       })
     },
+    timing(){
+      setInterval(() =>{
+        this.init()
+      },1000 * 60 * 5)
+    },
     hyClick(){
       this.$emit("postMsg","会议室")
     }
-    
+
   },
 };
 </script>

+ 24 - 20
src/components2/fireHazard/seTable.vue

@@ -27,28 +27,32 @@ export default {
   },
   mounted() {},
   methods: {
+
     //初始化数据
     initData() {
-      axios({
-            method: 'post',
-            url: 'https://smartpark.caih.com/dmapi/tbAlarm/page',
-            data:{
-              current: 1,
-              size: 100,
-              type:1,
-            },
-            timeout: 3000,
-        }).then(res =>{
-            if(res.data.data.records){
-                let data = res.data.data.records
-                this.initList = data
-            }
-            this.loading = false
-            this.text = "目前运转正常,无隐患"
-        }).catch(err =>{
-          this.loading = false
-          this.text = "数据加载失败..."
-        })
+      // 测试
+      this.loading = false
+      this.text = "目前运转正常,无隐患"
+      // axios({
+      //   method: 'post',
+      //   url: 'https://smartpark.caih.com/dmapi/tbAlarm/page',
+      //   data:{
+      //     current: 1,
+      //     size: 100,
+      //     type:1,
+      //   },
+      //   timeout: 3000,
+      // }).then(res =>{
+      //     if(res.data.data.records){
+      //         let data = res.data.data.records
+      //         this.initList = data
+      //     }
+      //     this.loading = false
+      //     this.text = "目前运转正常,无隐患"
+      // }).catch(err =>{
+      //   this.loading = false
+      //   this.text = "数据加载失败..."
+      // })
     },
     //数据滚动
     dataScrolling:function(){

+ 1 - 0
src/components2/keepWatch/seTable.vue

@@ -306,6 +306,7 @@ export default {
             if(res.data.data.pageList){
                 let data = res.data.data.pageList
                 this.initList = data.slice(0,9)
+
                 let arr = [ '1楼暖通机房','负1楼配电间','1楼配电间','1楼UPS机房','2楼网络机房','2楼新风机房','3楼新风机房','4楼新风机房','4楼阅览室等']
                 for(let i =0; i<this.initList.length;i++){
                   this.initList[i].ePlaceName = arr[i]

+ 9 - 8
src/components2/parkingSpace/index.vue

@@ -39,14 +39,15 @@ export default {
   },
   methods: {
     init(){
-      // axios({
-      //   method: 'get',
-      //   url: 'https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/parkingSpot',
-      //   timeout: 3000,
-      // }).then(res =>{
-        
-      // }).catch(err =>{
-      // })
+      axios({
+        method: 'get',
+        url: 'https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/parkingSpot',
+        timeout: 3000,
+      }).then(res =>{
+        console.log(res)
+
+      }).catch(err =>{
+      })
     }
   },
 };

+ 4 - 2
src/components2/seHeader/index.vue

@@ -67,9 +67,11 @@ export default {
       text-align: center;
     }
     .logo {
+      position: absolute;
+      right:40px;
+      width:100%;
       text-align: right;
-      float: right;
-      margin-right:-230px;
+
       .el-image {
         height: 65px;
         vertical-align: middle;

+ 12 - 9
src/components2/wenyin/index.vue

@@ -5,20 +5,22 @@
       <el-col class="rowN">
         <el-image :src="wenyin" fit="scale-down" />
         <el-col class="name">打印机总数</el-col>
-        <!-- <el-col class="num">{{data.countSum}}<el-col class="unit">份</el-col></el-col> -->
-        <el-col class="num">11<el-col class="unit">份</el-col></el-col>
+        <el-col class="num">{{data.countSum}}<el-col class="unit">台</el-col></el-col>
+        <!-- <el-col class="num">11<el-col class="unit">台</el-col></el-col> -->
       </el-col>
       <el-col class="rowN">
         <el-image :src="wenyin" fit="scale-down" />
         <el-col class="name">工作状态数</el-col>
-         <el-col class="num">13<el-col class="unit">份</el-col></el-col>
-        <!-- <el-col class="num">{{data.countRequest}}<el-col class="unit">份</el-col></el-col> -->
+        <el-col class="num">{{data.countRequest}}<el-col class="unit">台</el-col></el-col>
+        <!-- <el-col class="num">13<el-col class="unit">台</el-col></el-col> -->
+
       </el-col>
       <el-col class="rowN">
         <el-image :src="wenyin" fit="scale-down" />
         <el-col class="name">任务列表数</el-col>
-         <el-col class="num">67<el-col class="unit">份</el-col></el-col>
-        <!-- <el-col class="num">{{data.countYun}}<el-col class="unit">份</el-col></el-col> -->
+        <el-col class="num">{{data.countYun}}<el-col class="unit">份</el-col></el-col>
+        <!-- <el-col class="num">67<el-col class="unit">份</el-col></el-col> -->
+
       </el-col>
     </el-col>
     <el-col class="wenyinRight">
@@ -53,7 +55,7 @@ export default {
   },
   mounted() {
     this.init()
-    // this.timing()
+    this.timing()
   },
   methods: {
     init(){
@@ -62,6 +64,7 @@ export default {
         url: 'https://smartpark.caih.com/wyxt/api/thirdparty/v1/open/firstDevice',
         timeout: 3000,
       }).then(res =>{
+        console.log(res)
         if(res.data){
           this.data = res.data
         }
@@ -148,8 +151,8 @@ export default {
       color:$white2;
       text-align: left;
     }
-  
-  
+
+
 }
 .wenyinRight::after {
   position: absolute;

+ 0 - 4
src/views/index.vue

@@ -88,10 +88,6 @@ export default {
   },
 
   created(){
-    // setTimeout(() =>{
-    //   console.log(12121212)
-    //   this.postMsg3()
-    // },30000)
     setTimeout(() =>{
       document.getElementById("middleWrap").style.zIndex= "9"
     },5000)

+ 1 - 1
相关文档/接口.txt

@@ -10,4 +10,4 @@
 
 停车位统计:https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/parkingSpot   0
 
-人流量统计:https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/yunUserRequest  1
+人流量统计:https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/yunUserRequest  1