소스 검색

无人机及适配

MSI\liwei 3 년 전
부모
커밋
c99e62285d

+ 16 - 1
src/App.vue

@@ -4,6 +4,8 @@
   </div>
 </template>
 
+
+
 <script>
 export default  {
   name:  'App',
@@ -14,7 +16,20 @@ export default  {
                 return "启东市铁路沿线综合治理信息化管理平台"
             }
         }
-    }
+    },
+      mounted: function () {
+        var w = document.body.clientWidth;
+
+        var style = document.createElement("style");
+        style.type = "text/css";
+
+        style.innerHTML =
+            "html,body {margin: 0;background: #F8F8F8;width: 100%;font-size: " +
+            (w * 1) / 192 +
+            "px;}";
+        this.$store.state.sizef = (w * 1) / 192;
+        document.body.appendChild(style);
+    },
 }
 </script>
 

+ 1 - 1
src/api/qdtl/data.js

@@ -10,7 +10,7 @@ export function getLineData() {
   export function getResource(query) {
     console.log(query);
     return request({
-      url: 'qdtl/common/resource?date=2022-03-12',
+      url: 'qdtl/common/resource?date='+query.date,
       method: 'get',
       params:query
     })

+ 16 - 5
src/views/bigscreen/index.vue

@@ -8,9 +8,9 @@
    <headerdiv ref="headerDiv" :currentindexP = currentindexNew></headerdiv>
 
     <div class="bottombg">
-      <div class="item item2" @click="changeMapTab(1)"><div class="num">1123</div><div>静态资源</div></div>
-      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">113</div><div>动态资源</div></div>
-      <div class="item item1 " @click="changeMapTab(3)"><div class="num">531</div><div>重点区域</div></div>
+      <div class="item item2" @click="changeMapTab(1)"><div class="num">{{staticCount}}</div><div>静态资源</div></div>
+      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">{{dynamicCount}}</div><div>动态资源</div></div>
+      <div class="item item1 " @click="changeMapTab(3)"><div class="num">{{areaCount}}</div><div>重点区域</div></div>
       <!-- <div class="item"><div class="num" @click="changeMapTab(4)">16</div><div>实时告警</div></div> -->
     </div>
 
@@ -44,6 +44,9 @@ export default {
               url:'http://2.90.220.252:9017/artemis-web/debug',
               params:'{"httpMethod":"POST","path":"/api/resource/v1/cameras","headers":{},"query":{},"parameter":{},"body":{"pageNo": 1,"pageSize": 5000,"treeCode": "0"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"27794545","appSecret":"5Xi27Gl7JrbHHF1MpdaB"}'
             },
+            staticCount:0,
+            dynamicCount:0,
+            areaCount:0
         };
     },
     components:{
@@ -72,6 +75,8 @@ export default {
          },
          getResource(){
                getResource({date:'2022-03-12'}).then(response =>{
+                     console.log(response.data);
+                
                      var trainArry = [];
                      var bridgeArry = [];
                      var railArry = [];
@@ -102,7 +107,6 @@ export default {
                              var json = JSON.parse(areaList[index].fence)
                              this.$refs.mapdiv.addPolygon(json);
                      }
-                     console.log(response);
                      for(var key in response.data.deviceTrail){
                               var jsonStr = '['
                              for(var index in response.data.deviceTrail[key]){
@@ -116,7 +120,7 @@ export default {
                               //  deviceArry.push(obj.fence.split(','));
                              }
                               jsonStr += ']'
-                              var json = JSON.parse(jsonStr);
+                             var json = JSON.parse(jsonStr);
                              this.$refs.mapdiv.addPoints(response.data.deviceTrail[key],'device.png',0.6,'device');
                              this.$refs.mapdiv.addline(json,'device');
                      }
@@ -125,11 +129,18 @@ export default {
                        this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
                        this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
                        this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
+                       this.areaCount += response.data.area.length
+                       this.staticCount += response.data.drone.length + stationLocation.length;
+                      //  this.dynamicCount +=  response.data.deviceTrail.length 
+                       this.dynamicCount +=  Object.getOwnPropertyNames(response.data.deviceTrail).length
                })
          },
          getvideoList(){
                   httpRequest(this.videoParams).then(data =>{
                         var json = JSON.parse(data.data);
+                        // console.log(json.data.list);
+                        // console.log(json.data.length)
+                         this.staticCount += json.data.list.length
                          this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
                   });
 

+ 15 - 7
src/views/governance/index.vue

@@ -56,7 +56,7 @@
 
   </div>
 
-  <div style="width:50%;height:100vh">
+  <div style="width:50%;height:95vh">
       <mapdiv ref="mapdiv" style=""></mapdiv>
   </div>
 
@@ -100,9 +100,9 @@
  </div>
 
     <div class="bottombg">
-      <div class="item item2" @click="changeMapTab(1)"><div class="num">1123</div><div>静态资源</div></div>
-      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">113</div><div>动态资源</div></div>
-      <div class="item item1" @click="changeMapTab(3)"><div class="num">531</div><div>重点区域</div></div>
+      <div class="item item2" @click="changeMapTab(1)"><div class="num">{{staticCount}}</div><div>静态资源</div></div>
+      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">{{dynamicCount}}</div><div>动态资源</div></div>
+      <div class="item item1 " @click="changeMapTab(3)"><div class="num">{{areaCount}}</div><div>重点区域</div></div>
       <!-- <div class="item"><div class="num" @click="changeMapTab(4)">16</div><div>实时告警</div></div> -->
     </div>
 
@@ -137,7 +137,10 @@ export default {
                 params:'{"httpMethod":"POST","path":"/api/resource/v1/cameras","headers":{},"query":{},"parameter":{},"body":{"pageNo": 1,"pageSize": 5000,"treeCode": "0"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"27794545","appSecret":"5Xi27Gl7JrbHHF1MpdaB"}'
               },
               lcChartData:{},
-              videoChartDate:{}
+              videoChartDate:{},
+              staticCount:0,
+              dynamicCount:0,
+              areaCount:0
         };
     },
     components:{
@@ -393,11 +396,16 @@ export default {
                        this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
                        this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
                        this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
+                       this.areaCount += response.data.area.length
+                       this.staticCount += response.data.drone.length + stationLocation.length;
+                //        this.dynamicCount +=  response.data.deviceTrail.length
+                       this.dynamicCount +=  Object.getOwnPropertyNames(response.data.deviceTrail).length
                })
          },
          getvideoList(){
                   httpRequest(this.videoParams).then(data =>{
-                        var json = JSON.parse(data.data);
+                         var json = JSON.parse(data.data);
+                         this.staticCount += json.data.list.length
                          this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
                   });
 
@@ -407,7 +415,7 @@ export default {
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
- .divtitle{
+ .publicTitle{
           background: url("~@/assets/images/title@2x.png") no-repeat;
           background-size: 100% 100%;
           width:95%;

+ 63 - 62
src/views/introduction/index.vue

@@ -73,68 +73,69 @@ export default {
          getTrain(){
                   this.$refs.mapdiv.addPoint('video.png');
          },
-         getResource(){
-               getResource({date:'2022-03-12'}).then(response =>{
-                     var trainArry = [];
-                     var bridgeArry = [];
-                     var railArry = [];
-                     var stationLocation = [];
-                     var areaList = [];
-                     for(var index in response.data.staticLocation){
-                          var obj = response.data.staticLocation[index]
-                          obj.fence = obj.lnglat
-                          obj.name = obj.locationName
-                          stationLocation.push(obj)
-                     }
-                     for(var index in response.data.area){
-                         var obj = response.data.area[index]
-                         if(obj.areaType == '1'){
-                              areaList.push(obj);
-                         }else if(obj.areaType == '2'){
-                             obj.name = obj.areaName
-                             trainArry.push(obj);
-                         }else if(obj.areaType == '3'){
-                             obj.name = obj.areaName
-                             bridgeArry.push(obj);
-                         }else if(obj.areaType == '4'){
-                             obj.name = obj.areaName
-                             railArry.push(obj);
-                         }
-                     }
-                     for(var index in areaList){
-                             var json = JSON.parse(areaList[index].fence)
-                             this.$refs.mapdiv.addPolygon(json);
-                     }
-                     for(var key in response.data.deviceTrail){
-                              var jsonStr = '['
-                             for(var index in response.data.deviceTrail[key]){
-                               var obj = response.data.deviceTrail[key][index]
-                               if(index == response.data.deviceTrail[key].length - 1){
-                                 var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+']'
-                               }else{
-                                 var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+'],'
-                               }
-                               jsonStr += location
-                              //  deviceArry.push(obj.fence.split(','));
-                             }
-                              jsonStr += ']'
-                              var json = JSON.parse(jsonStr);
-                             this.$refs.mapdiv.addPoints(response.data.deviceTrail[key],'device.png',0.6,'device');
-                             this.$refs.mapdiv.addline(json,'device');
-                     }
-                       this.$refs.mapdiv.addPoints(trainArry,'train.png',0.6,'train');
-                       this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
-                       this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
-                       this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
-               })
-         },
-         getvideoList(){
-                  httpRequest(this.videoParams).then(data =>{
-                        var json = JSON.parse(data.data);
-                         this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
-                  });
-
-         }
+        //  getResource(){
+        //        getResource({date:'2022-03-12'}).then(response =>{
+        //              var trainArry = [];
+        //              var bridgeArry = [];
+        //              var railArry = [];
+        //              var stationLocation = [];
+        //              var areaList = [];
+        //              for(var index in response.data.staticLocation){
+        //                   var obj = response.data.staticLocation[index]
+        //                   obj.fence = obj.lnglat
+        //                   obj.name = obj.locationName
+        //                   stationLocation.push(obj)
+        //              }
+        //              for(var index in response.data.area){
+        //                  var obj = response.data.area[index]
+        //                  if(obj.areaType == '1'){
+        //                       areaList.push(obj);
+        //                  }else if(obj.areaType == '2'){
+        //                      obj.name = obj.areaName
+        //                      trainArry.push(obj);
+        //                  }else if(obj.areaType == '3'){
+        //                      obj.name = obj.areaName
+        //                      bridgeArry.push(obj);
+        //                  }else if(obj.areaType == '4'){
+        //                      obj.name = obj.areaName
+        //                      railArry.push(obj);
+        //                  }
+        //              }
+        //              for(var index in areaList){
+        //                      var json = JSON.parse(areaList[index].fence)
+        //                      this.$refs.mapdiv.addPolygon(json);
+        //              }
+        //              for(var key in response.data.deviceTrail){
+        //                       var jsonStr = '['
+        //                      for(var index in response.data.deviceTrail[key]){
+        //                        var obj = response.data.deviceTrail[key][index]
+        //                        if(index == response.data.deviceTrail[key].length - 1){
+        //                          var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+']'
+        //                        }else{
+        //                          var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+'],'
+        //                        }
+        //                        jsonStr += location
+        //                       //  deviceArry.push(obj.fence.split(','));
+        //                      }
+        //                       jsonStr += ']'
+        //                       var json = JSON.parse(jsonStr);
+        //                      this.$refs.mapdiv.addPoints(response.data.deviceTrail[key],'device.png',0.6,'device');
+        //                      this.$refs.mapdiv.addline(json,'device');
+        //              }
+        //                this.$refs.mapdiv.addPoints(trainArry,'train.png',0.6,'train');
+        //                this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
+        //                this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
+        //                this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
+        //        })
+        //  },
+        //  getvideoList(){
+        //           httpRequest(this.videoParams).then(data =>{
+        //                  var json = JSON.parse(data.data);
+        //                  this.staticCount += json.data.list.length
+        //                  this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
+        //           });
+
+        //  }
 
     }
 };

+ 14 - 6
src/views/public/index.vue

@@ -54,7 +54,7 @@
                         </el-table>
                 </div>
   </div>
-  <div style="width:50%;height:100vh;">
+  <div style="width:50%;height:95vh;">
       <mapdiv ref="mapdiv" style=""></mapdiv>
   </div>
   <div style="width:25%;height:100%;">
@@ -86,9 +86,9 @@
  </div>
 
     <div class="bottombg">
-      <div class="item item2" @click="changeMapTab(1)"><div class="num">1123</div><div>静态资源</div></div>
-      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">113</div><div>动态资源</div></div>
-      <div class="item item1" @click="changeMapTab(3)"><div class="num">531</div><div>重点区域</div></div>
+      <div class="item item2" @click="changeMapTab(1)"><div class="num">{{staticCount}}</div><div>静态资源</div></div>
+      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">{{dynamicCount}}</div><div>动态资源</div></div>
+      <div class="item item1 " @click="changeMapTab(3)"><div class="num">{{areaCount}}</div><div>重点区域</div></div>
       <!-- <div class="item"><div class="num" @click="changeMapTab(4)">16</div><div>实时告警</div></div> -->
     </div>
 
@@ -127,7 +127,10 @@ export default {
                   {content:'关于某某站点施工通知',label:'待处理',tag:'家'},
                   {content:'关于某某站点施工通知',label:'待处理',tag:'公司'},
                   {content:'关于某某站点施工通知',label:'待处理',tag:'家'},
-              ]
+              ],
+              staticCount:0,
+              dynamicCount:0,
+              areaCount:0
         };
     },
     components:{
@@ -495,11 +498,16 @@ export default {
                        this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
                        this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
                        this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
+                       this.areaCount += response.data.area.length
+                       this.staticCount += response.data.drone.length + stationLocation.length;
+                    //    this.dynamicCount +=  response.data.deviceTrail.length
+                      this.dynamicCount +=  Object.getOwnPropertyNames(response.data.deviceTrail).length
                })
          },
          getvideoList(){
                   httpRequest(this.videoParams).then(data =>{
-                        var json = JSON.parse(data.data);
+                         var json = JSON.parse(data.data);
+                         this.staticCount += json.data.list.length
                          this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
                   });
 

+ 5 - 2
src/views/qdtl/area/index.vue

@@ -1,13 +1,14 @@
 <template>
   <div class="app-container">
      <div class="divtitle"><div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;">{{title}}</div></div>
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="6.8rem">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="10rem">
       <el-form-item label="编号" prop="areaCode">
         <el-input
           v-model="queryParams.areaCode"
           placeholder="请输入编号"
           clearable
           size="small"
+          style="width:20rem"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -17,11 +18,12 @@
           placeholder="请输入名称"
           clearable
           size="small"
+          style="width:20rem"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item label="区域类型" prop="areaType">
-        <el-select v-model="queryParams.areaType" placeholder="请选择区域类型" clearable size="small">
+        <el-select v-model="queryParams.areaType" placeholder="请选择区域类型" clearable size="small"  style="width:20rem">
           <el-option
             v-for="dict in dict.type.tl_area_type"
             :key="dict.value"
@@ -75,6 +77,7 @@
     <el-table  v-loading="loading" :data="areaList" @selection-change="handleSelectionChange" stripe
       class="my_table"
       :row-class-name="tableRowClassName"
+      max-height="100rem"
       :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="areaCode" />

+ 3 - 3
src/views/qdtl/document/index.vue

@@ -82,7 +82,7 @@
             <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">正文内容</div>
         </div>
 
-        <div style="padding-left:3rem;padding-top:5rem">
+        <div style="padding-left:3rem;padding-top:1rem">
               <div>
                         <div style="font-size: 1.6rem;
                                     font-family: Microsoft YaHei;
@@ -348,8 +348,8 @@
             <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">页尾</div>
         </div>
 
-         <div style='margin-top:8em'>
-             <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="10rem" >
+         <div>
+             <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="14rem" >
                   <el-row style="">
                         <el-col :span="12" style="padding-left:10rem">
                             <el-form-item label="报送机关:" prop="baoSong">

+ 360 - 0
src/views/qdtl/wrj/index.vue

@@ -0,0 +1,360 @@
+<template>
+  <div class="app-container">
+     <!-- <headerdiv ref="headerDiv" :currentindexP = currentindexNew></headerdiv> -->
+     <div class="divtitle">
+                    <img src="~@/assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
+                    <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:1rem">{{divtitle}}</div>
+                    <el-button type="info" icon="el-icon-plus" circle style="margin-left:135rem" @click="handleAdd"></el-button>
+     </div>
+
+    <el-table :data="droneList"  stripe
+      class="my_table"
+      :row-class-name="tableRowClassName"
+      max-height = 820
+      :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}"
+      style="margin-top:2rem">
+      <el-table-column label="序号" align="center" type="index" />
+      <el-table-column label="无人机编号" align="center" prop="no"  />
+      <el-table-column label="区域" align="center" prop="area"  />
+      <el-table-column label="负责人" align="center" prop="manager"  />
+      <el-table-column label="负责人手机号" align="center" prop="phone" />
+       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="droneDelete(scope)"
+          >删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-video-play"
+            @click="handleVideo(scope.row)"
+          >查看</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+      <el-dialog
+          title="视频播放ckplayer"
+          :visible.sync="dialogVisibleCk"
+          v-if="dialogVisibleCk"
+          width="50%"
+          :before-close="handleCloseCk"
+          >
+            <div style="width:100%;height:60rem;position:relative">
+               <div class="video" id="video" style="width:100%;height:100%;position:absolute;top:0;left:0"></div>
+              <!-- <videodiv :cameracode="ccode" style="width:100%;height:100%;position:absolute;top:0;left:0"></videodiv> -->
+            </div>
+
+              <span slot="footer" class="dialog-footer">
+        <el-button @click="handleCloseCk()">关闭</el-button>
+        <!-- <el-button type="primary" @click="dialogVisible = false">确 定</el-button> -->
+      </span>
+    </el-dialog>
+
+     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="10rem">
+        <el-form-item label="无人机编号" prop="no">
+          <el-input v-model="form.no" placeholder="请输入无人机名称" />
+        </el-form-item>
+        <el-form-item label="区域" prop="area">
+          <el-input v-model="form.area" placeholder="请输入区域名称" />
+        </el-form-item>
+        <el-form-item label="负责人" prop="manager">
+          <el-input v-model="form.manager" placeholder="请输入负责人名称" />
+        </el-form-item>
+        <el-form-item label="负责人手机号" prop="phone">
+          <el-input v-model="form.phone" placeholder="请输入负责人手机号" />
+        </el-form-item>
+        <el-form-item label="视频地址" prop="video">
+          <el-input v-model="form.video" placeholder="请输入视频地址" />
+        </el-form-item>
+         <el-form-item label="坐标" prop="fence">
+          <el-input v-model="form.fence" placeholder="请输入坐标" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm()">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    /> -->
+
+  </div>
+</template>
+
+<script>
+import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
+import { getLineData,getVideoHttp } from "@/api/qdtl/data";
+import headerdiv from '@/components/HeaderDiv/index.vue'
+import mapdiv from "@/components/map/index.vue"
+
+export default {
+  name: "Location",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+
+      divtitle:'无人机查看',
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 巡检点管理表格数据
+      locationList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      isEdit:'true',
+
+      configObj:{},
+
+      selectUser:[],
+
+      Base64:require('js-base64').Base64,
+
+      userList:[],
+
+      dateRange:'',
+
+      dateRangeArry:[],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      // 表单参数
+      form: {},
+
+      pointArry:{
+        locations:'',
+        type:''
+      },
+      droneList:[],
+
+      form:{},
+
+      dialogVisibleCk:false,
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+   components:{
+      mapdiv,
+      headerdiv
+    },
+  created() {
+    this.getList();
+    // this.getAreaList();
+  },
+  methods: {
+     handleVideo(data){
+        this.dialogVisibleCk = true;
+        console.log(data.video);
+        var url = 'rtmp://39.104.22.45:30498/rtp/34020001001320000001_34020001001320000001'
+        console.log(url);
+        url = this.Base64.encode(url);
+        console.log(url);
+        getVideoHttp(url).then(data=>{
+            console.log(process.env.NODE_ENV)
+
+            if(process.env.NODE_ENV === "production"){
+
+              data.data = (data.data+"").replaceAll("http://58.221.168.61:9000/",process.env.VUE_APP_BASE_API)
+            }
+             console.log(data.data)
+            var videoObject = {
+              container: '.video', //“#”代表容器的ID,“.”或“”代表容器的class
+              variable: 'player', //播放函数名称,该属性必需设置,值等于下面的new ckplayer()的对象
+              autoplay:true,
+              live:true,
+              overspread:true,//是否让视频铺满播放器
+              html5m3u8:true,//m3u8-hls形式播放视频
+              // video: 'rtmp://58.200.131.2:1935/livetv/cctv1'//视频地址
+              video:data.data//视频地址
+              // video:'http://39.104.22.45:8089/rtp/34020001001320000001_34020001001320000001/hls.m3u8'
+            };
+            console.log(videoObject);
+            window.player = new ckplayer(videoObject);
+        })
+    },
+    getList() {
+         getConfig(104).then(response => {
+                this.configObj = response.data
+                var jsonArry =  JSON.parse(response.data.configValue);
+                this.droneList = jsonArry
+                console.log(this.droneList);
+         });
+    },
+    addDrone(){
+        this.open = true;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+     getResource(){
+               getResource({date:'2022-03-12'}).then(response =>{
+                    
+               })
+         },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      console.log(this.queryParams);
+      this.dateRange = this.queryParams.startDate + '至' +this.queryParams.endDate
+      console.log(this.dateRange);
+      this.getList();
+    },
+    handleCloseCk(){
+       this.dialogVisibleCk = false
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+    //   this.reset();
+      this.open = true;
+      this.title = "添加无人机管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.form = row
+      this.title = "修改无人机管理";
+      this.open = true
+    },
+    /** 提交按钮 */
+    submitForm() {
+        console.log(this.form);
+        if(this.form.id != null){
+            for(var index in this.droneList){
+                   if(this.droneList[index] == this.form.id){
+                          this.droneList[index] = this.form
+                   }
+            }
+        }else{
+            this.form.id = this.uuid()
+            this.droneList.push(this.form);
+        }
+        console.log(this.droneList);
+        this.configObj.configValue = JSON.stringify(this.droneList);
+        updateConfig(this.configObj).then(response =>{
+            this.reset();
+            this.open = false
+            this.getList();
+        })    
+    },
+    droneDelete(data){
+                console.log(data.$index); 
+                //var selectUserArry = [];
+                // console.log(data);
+                for(var index in this.droneList){
+                    if(index == data.$index){
+                            console.log(index);
+                            this.droneList.splice(index,1);
+                    }
+                }   
+                this.configObj.configValue = JSON.stringify(this.droneList);
+                updateConfig(this.configObj).then(response =>{
+                        this.getList();
+                })    
+    },
+     reset() {
+      this.form = {
+
+      };
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除巡检点管理编号为"' + ids + '"的数据项?').then(function() {
+        return delLocation(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('qdtl/location/export', {
+        ...this.queryParams
+      }, `location_${new Date().getTime()}.xlsx`)
+    },
+        tableRowClassName({ row, rowIndex }) {
+        if ((rowIndex + 1) % 2 === 0) {
+             return "warning-row";
+        } else {
+             return "success-row";
+        }
+    },
+     deleteLocation(){
+      // this.$refs.mapv.draw.set
+       this.$refs.mapv.vector.getSource().clear()
+    },
+     uuid(){
+            var s = [];
+            var hexDigits = "0123456789abcdef";
+            for (var i = 0; i < 36; i++) {
+                s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+            }
+            s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
+            s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
+            s[8] = s[13] = s[18] = s[23] = "-";
+
+            var uuid = s.join("");
+            return uuid;
+        }
+  }
+};
+</script>
+
+
+<style scoped>
+ .divtitle{
+          background: url("~@/assets/images/title2@2x.png") no-repeat;
+          background-size: 100% 100%;
+          width:100%;
+          height:3.9rem;
+          padding-top:0.8rem;
+          padding-left:3rem;
+          display: inline-flex;
+       }
+
+
+</style>

+ 13 - 7
src/views/safe/index.vue

@@ -46,10 +46,8 @@
          <div class="zdyjcontrnt"></div>
          <div id='zdyjchart' style="width:45rem;height:27rem"></div>
        </div>
-
-
   </div>
-  <div style="width:50%;height:100vh">
+  <div style="width:50%;height:95vh">
       <mapdiv ref="mapdiv" style=""></mapdiv>
   </div>
   <div style="width:25%;height:100%;">
@@ -117,9 +115,9 @@
  </div>
 
     <div class="bottombg">
-      <div class="item item2" @click="changeMapTab(1)"><div class="num">1123</div><div>静态资源</div></div>
-      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">113</div><div>动态资源</div></div>
-      <div class="item item1" @click="changeMapTab(3)"><div class="num">531</div><div>重点区域</div></div>
+      <div class="item item2" @click="changeMapTab(1)"><div class="num">{{staticCount}}</div><div>静态资源</div></div>
+      <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">{{dynamicCount}}</div><div>动态资源</div></div>
+      <div class="item item1 " @click="changeMapTab(3)"><div class="num">{{areaCount}}</div><div>重点区域</div></div>
       <!-- <div class="item"><div class="num" @click="changeMapTab(4)">16</div><div>实时告警</div></div> -->
     </div>
 
@@ -153,6 +151,9 @@ export default {
                 url:'http://2.90.220.252:9017/artemis-web/debug',
                 params:'{"httpMethod":"POST","path":"/api/resource/v1/cameras","headers":{},"query":{},"parameter":{},"body":{"pageNo": 1,"pageSize": 5000,"treeCode": "0"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"27794545","appSecret":"5Xi27Gl7JrbHHF1MpdaB"}'
               },
+              staticCount:0,
+              dynamicCount:0,
+              areaCount:0
         };
     },
     components:{
@@ -373,11 +374,16 @@ export default {
                        this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
                        this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
                        this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
+                       this.areaCount += response.data.area.length
+                       this.staticCount += response.data.drone.length + stationLocation.length;
+                    //    this.dynamicCount +=  response.data.deviceTrail.length
+                      this.dynamicCount +=  Object.getOwnPropertyNames(response.data.deviceTrail).length
                })
          },
          getvideoList(){
                   httpRequest(this.videoParams).then(data =>{
-                        var json = JSON.parse(data.data);
+                         var json = JSON.parse(data.data);
+                         this.staticCount += json.data.list.length
                          this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
                   });