4 Commits 53723c75bc ... da315ec1f9

Author SHA1 Message Date
  fan da315ec1f9 电话通讯录只显示站内人员 2 weeks ago
  fan 528aa2572c 建筑名称图层增加;防爆扩音图层增加数据接口增加;风险提示报警颜色调整;业务功能没有token不进行数据请求 1 month ago
  fan f263fc1b33 风险提示滚动调整;管线高程图图例调整;报警声音时长调整 2 months ago
  fan 0f793181f9 视频融合测试;系统名称图标配置调整;图层名称调整;激光云台弹窗增加云台操作 2 months ago
81 changed files with 1667 additions and 671 deletions
  1. BIN
      public/VideoTest/VideoTest.bin
  2. BIN
      public/VideoTest/VideoTest.glb
  3. 1 0
      public/VideoTest/VideoTest.gltf
  4. BIN
      public/VideoTest/Vtest.png
  5. BIN
      public/imgs/footerNavigation/icon_AFMJ_nor@2x.png
  6. BIN
      public/imgs/footerNavigation/icon_AFMJ_sel@2x.png
  7. BIN
      public/imgs/footerNavigation/icon_DJXT_nor@2x.png
  8. BIN
      public/imgs/footerNavigation/icon_DJXT_sel@2x.png
  9. BIN
      public/imgs/footerNavigation/icon_FBKY_nor@2x.png
  10. BIN
      public/imgs/footerNavigation/icon_FBKY_sel@2x.png
  11. BIN
      public/imgs/footerNavigation/icon_GYSP_nor@2x.png
  12. BIN
      public/imgs/footerNavigation/icon_GYSP_sel@2x.png
  13. BIN
      public/imgs/footerNavigation/icon_HZJC_nor@2x.png
  14. BIN
      public/imgs/footerNavigation/icon_HZJC_sel@2x.png
  15. BIN
      public/imgs/footerNavigation/icon_JGYT_nor@2x.png
  16. BIN
      public/imgs/footerNavigation/icon_JGYT_sel@2x.png
  17. BIN
      public/imgs/footerNavigation/icon_JQSJ_nor@2x.png
  18. BIN
      public/imgs/footerNavigation/icon_JQSJ_sel@2x.png
  19. BIN
      public/imgs/footerNavigation/icon_MJGL_nor@2x.png
  20. BIN
      public/imgs/footerNavigation/icon_MJGL_sel@2x.png
  21. BIN
      public/imgs/footerNavigation/icon_RYDW_nor@2x.png
  22. BIN
      public/imgs/footerNavigation/icon_RYDW_sel@2x.png
  23. BIN
      public/imgs/footerNavigation/icon_ZJRQ_nor@2x.png
  24. BIN
      public/imgs/footerNavigation/icon_ZJRQ_sel@2x.png
  25. 1 1
      public/index.html
  26. BIN
      public/insidemodels/VideoTest.bin
  27. BIN
      public/insidemodels/VideoTest.glb
  28. 1 0
      public/insidemodels/VideoTest.gltf
  29. BIN
      public/insidemodels/Vtest.png
  30. 126 254
      public/js/buildings.js
  31. 5 4
      public/js/config.js
  32. 9 0
      public/js/layerconfig.js
  33. 51 50
      public/js/station.js
  34. 18 2
      src/API/custom.js
  35. 10 0
      src/API/speaker.js
  36. 1 1
      src/components/BaseMap/index.vue
  37. 22 10
      src/utils/request.js
  38. 2 1
      src/views/Home.vue
  39. 40 30
      src/views/basePage/components/dialog/SoundElementDialog.vue
  40. 82 68
      src/views/basePage/components/layerControl/index.vue
  41. 2 2
      src/views/basePage/components/monitorDialog/index.vue
  42. 3 0
      src/views/basePage/components/videoWindow/VideoImageWindow.vue
  43. 4 4
      src/views/basePage/mixins/LoadLayer/JGYT.js
  44. 5 5
      src/views/basePage/mixins/LoadLayer/accessControl.js
  45. 4 4
      src/views/basePage/mixins/LoadLayer/camera.js
  46. 7 6
      src/views/basePage/mixins/LoadLayer/fbky.js
  47. 5 5
      src/views/basePage/mixins/LoadLayer/fire.js
  48. 6 5
      src/views/basePage/mixins/LoadLayer/index.js
  49. 20 5
      src/views/basePage/mixins/LoadLayer/perimeter.js
  50. 2 2
      src/views/basePage/mixins/LoadLayer/person.js
  51. 118 0
      src/views/basePage/mixins/LoadLayer/videoFusion.js
  52. 4 0
      src/views/basePage/mixins/MapEvent.js
  53. 1 1
      src/views/basePage/panels/IntelligentVideo.vue
  54. 1 1
      src/views/basePage/panels/IntelligentVideo/index.vue
  55. 6 6
      src/views/basePage/panels/Overview.vue
  56. 86 39
      src/views/basePage/panels/PersonStatistics.vue
  57. 43 50
      src/views/basePage/panels/RiskHint.vue
  58. 3 1
      src/views/components/baseFooter/FooterNavigation.vue
  59. 14 2
      src/views/components/baseHeader/left.vue
  60. 4 4
      src/views/components/chart/BarLineChart.vue
  61. 4 4
      src/views/components/chart/MultiLineChart.vue
  62. 4 4
      src/views/components/chart/RadarChart.vue
  63. 4 4
      src/views/components/chart/RankBar.vue
  64. 4 4
      src/views/components/chart/ScatterChart.vue
  65. 6 6
      src/views/components/chart/StackBarChart.vue
  66. 3 3
      src/views/components/dialog/AccessControlDialog.vue
  67. 4 4
      src/views/components/dialog/AlarmAudioDialog.vue
  68. 4 3
      src/views/components/dialog/JGYTControlDialog/VideoControl.vue
  69. 283 0
      src/views/components/dialog/JGYTControlDialog/VideoImageWindow.vue
  70. 56 13
      src/views/components/dialog/JGYTControlDialog/index.vue
  71. 320 0
      src/views/components/dialog/PipeMileageDialog/DateTimeBar.vue
  72. 5 3
      src/views/components/dialog/PipeMileageDialog/index.vue
  73. 4 2
      src/views/components/dialog/SoundDialog/index.vue
  74. 104 0
      src/views/components/dialog/VoiceCallDialog/Dialer.vue
  75. 5 3
      src/views/components/dialog/VoiceCallDialog/index.vue
  76. 13 3
      src/views/components/emergency/CardListDialog.vue
  77. 6 2
      src/views/components/emergency/ContactInfoDialog.vue
  78. 3 3
      src/views/stationMap/components/AlarmStatisticsPanel/statisticsChart.vue
  79. 3 3
      src/views/stationMapTKT/components/TypeStatistics/PieChart.vue
  80. 1 0
      src/views/videoMonitorType/components/VideoConfig.vue
  81. 124 44
      src/views/videoMonitorType/components/VideoControl.vue

BIN
public/VideoTest/VideoTest.bin


BIN
public/VideoTest/VideoTest.glb


+ 1 - 0
public/VideoTest/VideoTest.gltf

@@ -0,0 +1 @@
+{"asset":{"version":"2.0","generator":"babylon.js glTF exporter for 3dsmax 2022 v20220923.2"},"scene":0,"scenes":[{"nodes":[0]}],"nodes":[{"mesh":0,"translation":[-25.85311,0.0,3.15426731],"name":"Box001"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1,"NORMAL":2,"COLOR_0":3,"TEXCOORD_0":4},"indices":0,"material":0}],"name":"Box001"}],"accessors":[{"bufferView":0,"componentType":5123,"count":36,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"componentType":5126,"count":24,"max":[18.8048534,1.0,26.8609276],"min":[-18.8048534,0.0,-26.8609276],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":288,"componentType":5126,"count":24,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"componentType":5126,"count":24,"type":"VEC4","name":"accessorColors"},{"bufferView":3,"componentType":5126,"count":24,"type":"VEC2","name":"accessorUVs"}],"bufferViews":[{"buffer":0,"byteLength":72,"name":"bufferViewScalar"},{"buffer":0,"byteOffset":72,"byteLength":576,"byteStride":12,"name":"bufferViewFloatVec3"},{"buffer":0,"byteOffset":648,"byteLength":384,"byteStride":16,"name":"bufferViewFloatVec4"},{"buffer":0,"byteOffset":1032,"byteLength":192,"byteStride":8,"name":"bufferViewFloatVec2"}],"buffers":[{"uri":"VideoTest.bin","byteLength":1224}],"materials":[{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0,"roughnessFactor":0.0},"doubleSided":true,"name":"Material #25","extras":{"babylonSeparateCullingPass":false}}],"textures":[{"sampler":0,"source":0,"name":"Vtest.png"}],"images":[{"uri":"Vtest.png"}],"samplers":[{"magFilter":9729,"minFilter":9987}]}

BIN
public/VideoTest/Vtest.png


BIN
public/imgs/footerNavigation/icon_AFMJ_nor@2x.png


BIN
public/imgs/footerNavigation/icon_AFMJ_sel@2x.png


BIN
public/imgs/footerNavigation/icon_DJXT_nor@2x.png


BIN
public/imgs/footerNavigation/icon_DJXT_sel@2x.png


BIN
public/imgs/footerNavigation/icon_FBKY_nor@2x.png


BIN
public/imgs/footerNavigation/icon_FBKY_sel@2x.png


BIN
public/imgs/footerNavigation/icon_GYSP_nor@2x.png


BIN
public/imgs/footerNavigation/icon_GYSP_sel@2x.png


BIN
public/imgs/footerNavigation/icon_HZJC_nor@2x.png


BIN
public/imgs/footerNavigation/icon_HZJC_sel@2x.png


BIN
public/imgs/footerNavigation/icon_JGYT_nor@2x.png


BIN
public/imgs/footerNavigation/icon_JGYT_sel@2x.png


BIN
public/imgs/footerNavigation/icon_JQSJ_nor@2x.png


BIN
public/imgs/footerNavigation/icon_JQSJ_sel@2x.png


BIN
public/imgs/footerNavigation/icon_MJGL_nor@2x.png


BIN
public/imgs/footerNavigation/icon_MJGL_sel@2x.png


BIN
public/imgs/footerNavigation/icon_RYDW_nor@2x.png


BIN
public/imgs/footerNavigation/icon_RYDW_sel@2x.png


BIN
public/imgs/footerNavigation/icon_ZJRQ_nor@2x.png


BIN
public/imgs/footerNavigation/icon_ZJRQ_sel@2x.png


+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
   <meta charset="utf-8" />
   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
   <meta name="viewport" content="width=device-width,initial-scale=1.0" />
-  <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
+  <link rel="icon" href="static/setting/favicon.ico" />
   <script src="js/config.js?"></script>
   <script src="js/layers.js?"></script>
   <script src="js/layerconfig.js?"></script>

BIN
public/insidemodels/VideoTest.bin


BIN
public/insidemodels/VideoTest.glb


+ 1 - 0
public/insidemodels/VideoTest.gltf

@@ -0,0 +1 @@
+{"asset":{"version":"2.0","generator":"babylon.js glTF exporter for 3dsmax 2022 v20220923.2"},"scene":0,"scenes":[{"nodes":[0]}],"nodes":[{"mesh":0,"translation":[-25.85311,0.0,3.15426731],"name":"Box001"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1,"NORMAL":2,"COLOR_0":3,"TEXCOORD_0":4},"indices":0,"material":0}],"name":"Box001"}],"accessors":[{"bufferView":0,"componentType":5123,"count":36,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"componentType":5126,"count":24,"max":[18.8048534,1.0,26.8609276],"min":[-18.8048534,0.0,-26.8609276],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":288,"componentType":5126,"count":24,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"componentType":5126,"count":24,"type":"VEC4","name":"accessorColors"},{"bufferView":3,"componentType":5126,"count":24,"type":"VEC2","name":"accessorUVs"}],"bufferViews":[{"buffer":0,"byteLength":72,"name":"bufferViewScalar"},{"buffer":0,"byteOffset":72,"byteLength":576,"byteStride":12,"name":"bufferViewFloatVec3"},{"buffer":0,"byteOffset":648,"byteLength":384,"byteStride":16,"name":"bufferViewFloatVec4"},{"buffer":0,"byteOffset":1032,"byteLength":192,"byteStride":8,"name":"bufferViewFloatVec2"}],"buffers":[{"uri":"VideoTest.bin","byteLength":1224}],"materials":[{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0,"roughnessFactor":0.0},"doubleSided":true,"name":"Material #25","extras":{"babylonSeparateCullingPass":false}}],"textures":[{"sampler":0,"source":0,"name":"Vtest.png"}],"images":[{"uri":"Vtest.png"}],"samplers":[{"magFilter":9729,"minFilter":9987}]}

BIN
public/insidemodels/Vtest.png


+ 126 - 254
public/js/buildings.js

@@ -1,347 +1,219 @@
 const BUILDING_INFO = [
   {
     id: 1,
-    name: "辅助用房",
+    name: "综合楼",
     type: "",
-    x: 118.34296277408872,
-    y: 37.41997777530434,
-    z: 6,
+    x: 111.25920568513584,
+    y: 40.37979409202713,
+    z: 13,
   },
   {
     id: 2,
-    name: "VOC站房",
+    name: "压缩机厂房A区",
     type: "",
-    x: 118.34264483108919,
-    y: 37.419818083853255,
-    z: 5,
+    x: 111.2608332033509,
+    y: 40.3805539918433,
+    z: 16,
   },
   {
     id: 3,
-    name: "泡沫站",
+    name: "压缩机厂房B区",
     type: "",
-    x: 118.34336917476108,
-    y: 37.419593970149776,
-    z: 6,
+    x: 111.26145636508632,
+    y: 40.380350479383495,
+    z: 16,
   },
   {
     id: 4,
-    name: "操作室",
+    name: "工艺设备区",
     type: "",
-    x: 118.34290753835666,
-    y: 37.41891734416999,
-    z: 6,
+    x: 111.25996233126777,
+    y: 40.380913301061334,
+    z: 10,
   },
   {
     id: 5,
-    name: "干煤棚",
-    type: "",
-    x: 118.34287261339682,
-    y: 37.41858561895868,
-    z: 8,
-  },
-  {
-    id: 6,
-    name: "输煤站",
+    name: "110kV变电所",
     type: "",
-    x: 118.34327801949767,
-    y: 37.4186803086843,
+    x: 111.26098091845157,
+    y: 40.37917197386943,
     z: 13,
   },
   {
-    id: 7,
-    name: "锅炉房",
-    type: "",
-    x: 118.34314695140114,
-    y: 37.418031661317116,
-    z: 14,
-  },
-  {
-    id: 8,
-    name: "淋浴室",
-    type: "",
-    x: 118.34286522555068,
-    y: 37.41768813118987,
-    z: 8.7,
-  },
-  {
-    id: 9,
-    name: "引发剂室",
-    type: "",
-    x: 118.34286608606526,
-    y: 37.4175703822635,
-    z: 8.7,
-  },
-  {
-    id: 10,
-    name: "循环水站/冷冻水站房",
-    type: "",
-    x: 118.34320470595453,
-    y: 37.41756964037931,
-    z: 8.7,
-  },
-  {
-    id: 11,
-    name: "AM晶体车间",
-    type: "",
-    x: 118.3427905636404,
-    y: 37.41721616516686,
-    z: 10,
-  },
-  {
-    id: 12,
-    name: "AM主生产车间",
+    id: 61,
+    name: "1号变频间",
     type: "",
-    x: 118.34343971545164,
-    y: 37.41724843971391,
-    z: 22,
+    x: 111.26048297749993,
+    y: 40.38004279773242,
+    z: 8,
   },
   {
-    id: 13,
-    name: "AM罐区厂房",
+    id: 62,
+    name: "2号变频间",
     type: "",
-    x: 118.34397881916149,
-    y: 37.41717593898299,
-    z: 16.3,
+    x: 111.26063870050744,
+    y: 40.37999212409872,
+    z: 8,
   },
   {
-    id: 14,
-    name: "车间控制室",
+    id: 63,
+    name: "3号变频间",
     type: "",
-    x: 118.34391166151701,
-    y: 37.41693590534726,
-    z: 10,
+    x: 111.26090869120887,
+    y: 40.3798997965965,
+    z: 8,
   },
   {
-    id: 15,
-    name: "水合框架平台",
+    id: 64,
+    name: "4号变频间",
     type: "",
-    x: 118.34317569617643,
-    y: 37.41693923858676,
-    z: 10,
-  },
-  {
-    id: 16,
-    name: "制冷站",
-    type: "丁类",
-    x: 118.34369034835997,
-    y: 37.416483696271136,
-    z: 7,
-  },
-  {
-    id: 17,
-    name: "1#空压站操作室",
-    type: "丁类",
-    x: 118.34394355286385,
-    y: 37.41646502034562,
-    z: 7,
-  },
-  {
-    id: 18,
-    name: "供配电室",
-    type: "丁类",
-    x: 118.34414679641125,
-    y: 37.41652282579468,
-    z: 7,
+    x: 111.26105835966396,
+    y: 40.37984600016288,
+    z: 8,
   },
   {
-    id: 19,
-    name: "2#空压站",
+    id: 65,
+    name: "1号及2号站变室",
     type: "",
-    x: 118.34433840794972,
-    y: 37.41660496391427,
-    z: 18,
+    x: 111.26075993306743,
+    y: 40.3799154313158,
+    z: 8,
   },
   {
-    id: 20,
-    name: "1#水处理站",
+    id: 66,
+    name: "空压机房",
     type: "",
-    x: 118.34464368936342,
-    y: 37.416484948105825,
-    z: 9,
+    x: 111.26119124826415,
+    y: 40.3797771684561,
+    z: 8,
   },
   {
-    id: 21,
-    name: "2#水处理站",
+    id: 7,
+    name: "综合库房",
     type: "",
-    x: 118.34481770759022,
-    y: 37.41662552551646,
-    z: 9,
+    x: 111.26009782765958,
+    y: 40.379489832927234,
+    z: 8,
   },
   {
-    id: 22,
-    name: "监控室",
+    id: 8,
+    name: "综合设备间",
     type: "",
-    x: 118.34528801480992,
-    y: 37.41651073354732,
-    z: 7,
+    x: 111.25962868139,
+    y: 40.380381509897894,
+    z: 8,
   },
   {
-    id: 23,
-    name: "办公楼",
+    id: 9,
+    name: "消防水罐",
     type: "",
-    x: 118.34558266887083,
-    y: 37.41657515819817,
+    x: 111.25925047153426,
+    y: 40.38050059285603,
     z: 14,
   },
   {
-    id: 24,
-    name: "中间仓库",
+    id: 10,
+    name: "雨水收集池",
     type: "",
-    x: 118.34550292536711,
-    y: 37.41724455045821,
+    x: 111.26059897126923,
+    y: 40.379314598646616,
     z: 8,
   },
   {
-    id: 25,
-    name: "分散剂罐",
-    type: "",
-    x: 118.34440953646988,
-    y: 37.41730826857112,
-    z: 6,
-  },
-  {
-    id: 26,
-    name: "PAM聚合及研磨车间",
-    type: "",
-    x: 118.34486128949854,
-    y: 37.41709387572112,
-    z: 19,
-  },
-  {
-    id: 28,
-    name: "原材料库",
-    type: "",
-    x: 118.34446278290646,
-    y: 37.41767986211232,
-    z: 9,
-  },
-  {
-    id: 29,
-    name: "公用工程房",
-    type: "",
-    x: 118.34412940589988,
-    y: 37.4176328401409,
-    z: 9,
-  },
-  {
-    id: 30,
-    name: "配电室",
+    id: 11,
+    name: "2号深井泵房",
     type: "",
-    x: 118.34373324226088,
-    y: 37.4176287986415,
-    z: 9,
+    x: 111.26052589049284,
+    y: 40.381311249829146,
+    z: 8,
   },
   {
-    id: 31,
-    name: "专用控制室",
+    id: 12,
+    name: "1号深井泵房",
     type: "",
-    x: 118.34369821207017,
-    y: 37.41774747931179,
-    z: 9,
+    x: 111.25878456244239,
+    y: 40.37975671242128,
+    z: 8,
   },
   {
-    id: 32,
-    name: "车间专用配电室",
+    id: 13,
+    name: "备品备件库",
     type: "",
-    x: 118.3442291787104,
-    y: 37.4184842651506,
-    z: 9,
-  },
-  {
-    id: 33,
-    name: "阳离子车间",
-    type: "丙类",
-    x: 118.34413675749443,
-    y: 37.41819565216849,
-    z: 16,
-  },
-  {
-    id: 34,
-    name: "仓库",
-    type: "丙类",
-    x: 118.34509882548876,
-    y: 37.41785824993155,
-    z: 13,
-  },
-  {
-    id: 35,
-    name: "仓库",
-    type: "丙类",
-    x: 118.34512132681122,
-    y: 37.41831254828915,
-    z: 13,
+    x: 111.25948414310929,
+    y: 40.38019150191476,
+    z: 8,
   },
   {
-    id: 36,
-    name: "危废间",
+    id: 14,
+    name: "西侧危废间",
     type: "",
-    x: 118.34542582902712,
-    y: 37.41848586256898,
-    z: 8.7,
+    x: 111.26003887207996,
+    y: 40.38147554802636,
+    z: 8,
   },
   {
-    id: 37,
-    name: "PAM成品仓库",
+    id: 15,
+    name: "东侧危废间",
     type: "",
-    x: 118.3448194190153,
-    y: 37.419254847336234,
-    z: 14,
+    x: 111.2604246241477,
+    y: 40.38134491151081,
+    z: 8,
   },
   {
-    id: 38,
-    name: "排水泵",
+    id: 16,
+    name: "污水处理池",
     type: "",
-    x: 118.34555822590497,
-    y: 37.41974405834294,
-    z: 6,
+    x: 111.25992976260771,
+    y: 40.3815068396908,
+    z: 4,
   },
   {
-    id: 39,
-    name: "中间仓库",
+    id: 17,
+    name: "箱式SVG",
     type: "",
-    x: 118.34550582990236,
-    y: 37.41693405398033,
+    x: 111.26135892703992,
+    y: 40.37965615712618,
     z: 8,
   },
   {
-    id: 40,
-    name: "生化池",
+    id: 18,
+    name: "1号自洁式过滤器",
     type: "",
-    x: 118.342888132,
-    y: 37.41691323858676,
-    z: 4,
+    x: 111.26046250974662,
+    y: 40.3804571593199,
+    z: 8,
   },
   {
-    id: 41,
-    name: "停用罐区",
+    id: 19,
+    name: "2号自洁式过滤器",
     type: "",
-    x: 118.343074546,
-    y: 37.416485385,
-    z: 12,
+    x: 111.26157632990441,
+    y: 40.380067059693296,
+    z: 8,
   },
   {
-    id: 42,
-    name: "丙烯腈罐区",
+    id: 20,
+    name: "站场防空区",
     type: "",
-    x: 118.343853728,
-    y: 37.418928496,
-    z: 16,
+    x: 111.26253408244771,
+    y: 40.37983090552453,
+    z: 8,
   },
   {
-    id: 44,
-    name: "厌氧罐",
+    id: 21,
+    name: "5G基站",
     type: "",
-    x: 118.34296994,
-    y: 37.419525669,
-    z: 12,
+    x: 111.25875760638871,
+    y: 40.380370104655015,
+    z: 8,
   },
   {
-    id: 43,
-    name: "地磅",
+    id: 22,
+    name: "门卫室及交流室",
     type: "",
-    x: 118.345781128,
-    y: 37.418063253,
-    z: 6,
+    x: 111.25897966612922,
+    y: 40.38018433850747,
+    z: 8,
   },
 ];
 

+ 5 - 4
public/js/config.js

@@ -11,7 +11,7 @@ const HOME_DATA = {
   startDate: '2024-11-27',
   group: '国家管网集团北京管道有限公司',
   company: '内蒙古输油气分公司',
-  curStation: '托克托压气站',
+  curStation: '托克托作业区',
 }
 
 /**
@@ -30,7 +30,7 @@ const STATION_LIST = [
 /**
  * 页面内标题 已生效
  */
-const SYSTEM_TITLE = '托克托压气站综合安防平台'
+const SYSTEM_TITLE = '托克托作业区综合安防系统'
 /**
  * 设置浏览器标题 已生效
  */
@@ -605,7 +605,7 @@ const GY_STATIONS = [
     positioningBuildId: '100001',
     direction: 'right',
     position: [106.6263209022603, 26.650585399041464, 1.4657059185197159],
-    layers: ['周界', '泄漏', '摄像头'],
+    layers: ['周界入侵', '激光云台'],
   },
   {
     id: '784131093203787776',
@@ -615,7 +615,7 @@ const GY_STATIONS = [
     positioningBuildId: '100001',
     direction: 'right',
     position: [106.6263209022603, 26.650585399041464, 1.4657059185197159],
-    layers: ['周界', '泄漏', '摄像头'],
+    layers: ['周界入侵', '激光云台'],
     // webRTCUrl: "wss://dispatcher:1443/webrtc",
     // admin: "8889",
     // password: "123456",
@@ -660,6 +660,7 @@ const GY_JGYT_CONFIG = [
   }
 ]
 
+const YWURL = "http://10.0.0.203:8081"
 
 /**
  * mqtt地址

+ 9 - 0
public/js/layerconfig.js

@@ -49,6 +49,15 @@ const LAYER_CONFIG_LIST = [
   //   selected: false,
   //   elements: [],
   // },
+  {
+    name: "建筑名称",
+    code: "jzmc",
+    type: "jzmc",
+    layerId: "jzmc",
+    show: "0",
+    selected: false,
+    elements: [],
+  },
   {
     name: "风险区域",
     code: "fxqy",

+ 51 - 50
public/js/station.js

@@ -236,18 +236,18 @@ const STATION_CONFIG_2 = [
         type: 'station',
         left: 942,
         top: 470,
-        offsetX: -300,
-        offsetY: -280,
+        offsetX: -150,
+        offsetY: -300,
         height: 140,
-        anchors: ['Top', 'Right'],
+        anchors: ['Top', 'Bottom'],
         departmentId: '784131093203787776',
         buildId: '784102618438836224',
         picPath: '/imgs/yx_tkt.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '518240.2', unit: 'm', tag: '' },
-          { name: '经度', value: '111.260470840', unit: '', tag: '' },
-          { name: '纬度', value: '40.380258539', unit: '', tag: '' },
+          { name: '管道里程', value: '518240.2', unit: 'km', tag: '' },
+          { name: '经度', value: '111.2604708', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.3802585', unit: '°N', tag: '' },
           { name: '高程', value: '996.178', unit: 'm', tag: '' },
         ],
       },
@@ -257,19 +257,19 @@ const STATION_CONFIG_2 = [
         type: 'stationFS',
         left: 1060,
         top: 468,
-        offsetX: 120,
-        offsetY: -220,
+        offsetX: 20,
+        offsetY: -260,
         height: 140,
-        anchors: ['Top', 'Left'],
+        anchors: ['Top', 'Bottom'],
         departmentId: '784131392517709824',
         buildId: '581056806831267840',
         picPath: '/imgs/yx_hhht.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '531237.0', unit: '', tmag: '' },
-          { name: '经度', value: '111.641454172,', unit: '', tag: '' },
-          { name: '纬度', value: '40.620619066', unit: '', tag: '' },
-          { name: '高程', value: '1025.135', unit: '', tmag: '' },
+          { name: '管道里程', value: '531237.0', unit: 'km', tmag: '' },
+          { name: '经度', value: '111.6414541,', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.6206190', unit: '°N', tag: '' },
+          { name: '高程', value: '1025.135', unit: 'm', tmag: '' },
         ],
       },
       {
@@ -278,8 +278,8 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 828,
         top: 463,
-        offsetX: -380,
-        offsetY: -80,
+        offsetX: -350,
+        offsetY: -180,
         height: 140,
         anchors: ['Top', 'Right'],
         departmentId: '784131445336580093',
@@ -287,9 +287,9 @@ const STATION_CONFIG_2 = [
         picPath: '/imgs/yx_17.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '380840.4', unit: 'm', tag: '' },
-          { name: '经度', value: '110.789238923', unit: '', tag: '' },
-          { name: '纬度', value: '40.170114812', unit: '', tag: '' },
+          { name: '管道里程', value: '380840.4', unit: 'km', tag: '' },
+          { name: '经度', value: '110.7892389', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.1701148', unit: '°N', tag: '' },
           { name: '高程', value: '1075.633', unit: 'm', tag: '' },
         ],
       },
@@ -299,8 +299,8 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 870,
         top: 471,
-        offsetX: -320,
-        offsetY: 100,
+        offsetX: -360,
+        offsetY: 0,
         height: 140,
         anchors: ['Bottom', 'Right'],
         departmentId: '784131445336580094',
@@ -308,9 +308,9 @@ const STATION_CONFIG_2 = [
         picPath: '/imgs/yx_18.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '431736.2', unit: 'm', tag: '' },
-          { name: '经度', value: '111.050644990', unit: '', tag: '' },
-          { name: '纬度', value: '40.237420999', unit: '', tag: '' },
+          { name: '管道里程', value: '431736.2', unit: 'km', tag: '' },
+          { name: '经度', value: '111.0506450', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.2374210', unit: '°N', tag: '' },
           { name: '高程', value: '1020.847', unit: 'm', tag: '' },
         ],
       },
@@ -320,8 +320,8 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 914,
         top: 465,
-        offsetX: -220,
-        offsetY: 280,
+        offsetX: -300,
+        offsetY: 180,
         height: 140,
         anchors: ['Bottom', 'Top'],
         departmentId: '784131445336580095',
@@ -329,9 +329,9 @@ const STATION_CONFIG_2 = [
         picPath: '/imgs/yx_19.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '452140.6', unit: 'm', tag: '' },
-          { name: '经度', value: '111.112902993', unit: '', tag: '' },
-          { name: '纬度', value: '40.274858858', unit: '', tag: '' },
+          { name: '管道里程', value: '452140.6', unit: 'km', tag: '' },
+          { name: '经度', value: '111.1129030', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.2748589', unit: '°N', tag: '' },
           { name: '高程', value: '988.3670', unit: 'm', tag: '' },
         ],
       },
@@ -341,18 +341,19 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 983,
         top: 465,
-        offsetX: -80,
-        offsetY: -280,
+        offsetX: -140,
+        offsetY: 300,
+
         height: 140,
-        anchors: ['Top', 'Bottom'],
+        anchors: ['Top', 'Top'],
         departmentId: '784131445336580096',
         buildId: '524944733819117568',
         picPath: '/imgs/yx_20.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '531108.2', unit: 'm', tag: '' },
-          { name: '经度', value: '111.436153642', unit: '', tag: '' },
-          { name: '纬度', value: '40.489591328', unit: '', tag: '' },
+          { name: '管道里程', value: '531108.2', unit: 'km', tag: '' },
+          { name: '经度', value: '111.4361536', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.4895913', unit: '°N', tag: '' },
           { name: '高程', value: '1007.164', unit: 'm', tag: '' },
         ],
       },
@@ -362,8 +363,8 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 1030,
         top: 463,
-        offsetX: -60,
-        offsetY: 300,
+        offsetX: 80,
+        offsetY: 260,
         height: 140,
         anchors: ['Bottom', 'Top'],
         departmentId: '784131445336580097',
@@ -371,9 +372,9 @@ const STATION_CONFIG_2 = [
         picPath: '/imgs/yx_21.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '539723.4', unit: 'm', tag: '' },
-          { name: '经度', value: '111.639092670', unit: '', tag: '' },
-          { name: '纬度', value: '40.619999597', unit: '', tag: '' },
+          { name: '管道里程', value: '539723.4', unit: 'km', tag: '' },
+          { name: '经度', value: '111.6390926', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.6199996', unit: '°N', tag: '' },
           { name: '高程', value: '1025.127', unit: 'm', tag: '' },
         ],
       },
@@ -383,18 +384,18 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 1094,
         top: 473,
-        offsetX: 100,
-        offsetY: 220,
+        offsetX: 120,
+        offsetY: 80,
         height: 140,
-        anchors: ['Bottom', 'Top'],
+        anchors: ['Bottom', 'Left'],
         departmentId: '784131445336580098',
         buildId: '524944733819117568',
         picPath: '/imgs/yx_22.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '555860.5', unit: 'm', tag: '' },
-          { name: '经度', value: '111.861633940', unit: '', tag: '' },
-          { name: '纬度', value: '40.662374382', unit: '', tag: '' },
+          { name: '管道里程', value: '555860.5', unit: 'km', tag: '' },
+          { name: '经度', value: '111.8616339', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.6623743', unit: '°N', tag: '' },
           { name: '高程', value: '1065.356', unit: 'm', tag: '' },
         ],
       },
@@ -404,8 +405,8 @@ const STATION_CONFIG_2 = [
         type: 'valve',
         left: 1128,
         top: 484,
-        offsetX: 100,
-        offsetY: 0,
+        offsetX: 130,
+        offsetY: -110,
         height: 140,
         anchors: ['Right', 'Left'],
         departmentId: '784131445336580099',
@@ -413,9 +414,9 @@ const STATION_CONFIG_2 = [
         picPath: '/imgs/yx_23.JPG',
         preTag: '',
         data: [
-          { name: '管道里程', value: '567902.1', unit: 'm', tag: '' },
-          { name: '经度', value: '112.045375766', unit: '', tag: '' },
-          { name: '纬度', value: '40.701167418', unit: '', tag: '' },
+          { name: '管道里程', value: '567902.1', unit: 'km', tag: '' },
+          { name: '经度', value: '112.0453757', unit: '°E', tag: '' },
+          { name: '纬度', value: '40.7011674', unit: '°N', tag: '' },
           { name: '高程', value: '1129.733', unit: 'm', tag: '' },
         ],
       },

+ 18 - 2
src/API/custom.js

@@ -56,7 +56,7 @@ export const getCountAreaTree = data =>
     data,
     notShowLoading: true,
   })
-
+//获取摄像头列表
 export const getCameraList = data =>
   $http({
     method: 'post',
@@ -64,8 +64,24 @@ export const getCameraList = data =>
     data,
     notShowLoading: true,
   })
+//获取摄像头预置位列表
+export const getCameraPresetOptions = data =>
+  $http({
+    method: 'post',
+    url: '/camera/Options/GetCameraPresetOptions',
+    data,
+    notShowLoading: true,
+  })
+//获取摄像头巡航路线列表
+export const getCameraCruiseRouteOptions = data =>
+  $http({
+    method: 'post',
+    url: '/camera/Options/GetCameraCruiseRouteOptions',
+    data,
+    notShowLoading: true,
+  })
 
-  //获取人员信息
+//获取人员信息
 export const getPersonList = data =>
   $http({
     method: 'post',

+ 10 - 0
src/API/speaker.js

@@ -0,0 +1,10 @@
+import $http from '@/utils/request'
+
+// 获取防爆扩音列表信息
+export const getSpeakerList = data =>
+  $http({
+    method: 'POST',
+    url: '/ExplosionProofLoudspeaker/Config/GetList',
+    data,
+    notShowLoading: true,
+  })

+ 1 - 1
src/components/BaseMap/index.vue

@@ -81,7 +81,7 @@ export default {
           //   },
           // },
         });
-        //viewer.scene.globe.depthTestAgainstTerrain = true; //解决垂直视角时点击报错的问题
+        viewer.scene.globe.depthTestAgainstTerrain = true; //解决垂直视角时点击报错的问题
         viewer.cesiumWidget.creditContainer.style.display = "none"; // 隐藏Logo
         viewer.scene.postProcessStages.fxaa.enabled = true; //取消锯齿
         viewer.scene.globe.enableLighting = true;

+ 22 - 10
src/utils/request.js

@@ -66,12 +66,24 @@ $http.interceptors.response.use(
     // if (res.code === 200) return res;
     if ((res.code + "").startsWith("2")) {
       return res;
+    } else if (res.code === 40000) {
+      // console.log("ERROR:", res, localStorage.getItem("token"));
+      Message({
+        message: "登录超时,请重新登录",
+        type: "error",
+        duration: 800,
+      });
+      setTimeout(() => {
+        localStorage.clear();
+        window.location.reload();
+      }, 500);
+      // this.$router.push("/login");
     } else {
-      // Message({
-      //   message: res?.msg || "连接错误",
-      //   type: "error",
-      //   duration: 800,
-      // });
+      Message({
+        message: res?.msg || "连接错误",
+        type: "error",
+        duration: 800,
+      });
       // console.log("ERROR:", res);
       return Promise.reject(res);
     }
@@ -88,11 +100,11 @@ $http.interceptors.response.use(
       localStorage.clear();
       window.location.href = "/";
     } else if (response) {
-      // Message({
-      //   message: "系统异常",
-      //   type: "error",
-      //   duration: 800,
-      // });
+      Message({
+        message: "系统异常",
+        type: "error",
+        duration: 800,
+      });
       return Promise.reject(response);
     }
   }

+ 2 - 1
src/views/Home.vue

@@ -376,7 +376,8 @@ export default {
             const data = JSON.parse(content);
             // console.log("门禁事件数据", data);
             this.$notify({
-              title: "智能门禁",
+              title: "门禁管理",
+              // title: "安防门禁",
               duration: 1500, //自动关闭时间1.5s
               message: data.Content,
               offset: 70,

+ 40 - 30
src/views/basePage/components/dialog/SoundElementDialog.vue

@@ -8,23 +8,22 @@
       <!-- 内容 -->
       <div class="detail-table-box">
         <!-- v-show="false" -->
-        <el-row v-show="false">
+        <!-- <el-row v-show="false">
           <fbky
             @onlineDis:="onlineDisable"
             :curFbkyData="webSocketParams"
             :ringNumber="ringNumber"
             :callDisable="callDisable"
           />
-        </el-row>
+        </el-row> -->
         <el-row>
           <el-col>
             <div class="search-box">
-              <div class="search-item">
+              <!-- <div class="search-item">
                 <span class="search-label">所在场站:</span>
                 <el-select
                   value-key="id"
                   v-model="department"
-                  style="width: 110px"
                   size="mini"
                   disabled
                   clearable
@@ -38,13 +37,13 @@
                     :label="item.name"
                   ></el-option>
                 </el-select>
-              </div>
-              <div class="search-btn2" @click="openAll">
+              </div> -->
+              <!-- <div class="search-btn2" @click="openAll">
                 <el-button size="mini" type="success">打开</el-button>
               </div>
               <div class="search-btn2" @click="closeAll">
                 <el-button size="mini" type="warning">关闭</el-button>
-              </div>
+              </div> -->
               <!-- <div class="search-btn2" @click="openBroadcast">
                 <el-button size="mini" type="success">广播</el-button>
               </div>
@@ -82,6 +81,7 @@
               <!-- 通话视频标签 -->
               <div class="select_video_main">
                 <video-image-window
+                  :key="refreshKey"
                   :cameraData="cameraInfo"
                   :cameraId="cameraInfo.id"
                 />
@@ -101,6 +101,7 @@ import Fbky from "@/views/components/dialog/SoundDialog/Fbky.vue";
 import { dealAlarm } from "@/API/common";
 import { getDepartmentByPid } from "@/API/alarm";
 import { getElementList } from "@/API/visual";
+import { getSpeakerList } from "@/API/speaker";
 import { getCameraList } from "@/API/custom";
 import { mapGetters } from "vuex";
 export default {
@@ -113,11 +114,11 @@ export default {
         if (newVal) {
           this.webSocketParams.id++;
           this.info = this.soundElementDialog.dialogMsg.data;
-          setTimeout(() => {
-            this.exchangeVideo(
-              this.soundElementDialog.dialogMsg?.data?.cameraID
-            );
-          }, 300);
+        } else {
+          this.cameraInfo = {
+            id: "1",
+            url: "",
+          };
         }
       },
       // deep: true,
@@ -126,21 +127,23 @@ export default {
     info: {
       handler(newValue) {
         setTimeout(() => {
-          // console.log("扩音设备基础数据", this.info, this.buildInfo);
+          console.log("扩音设备基础数据", this.info, this.buildInfo);
           if (newValue.name) {
             this.openningTile = newValue.name;
           }
-          if (newValue.cameraID) {
-            this.exchangeVideo(newValue.cameraID);
+          if (newValue.cameras) {
+            this.exchangeVideo(newValue.cameras[0].cameraId); //系统接口
+            // this.exchangeVideo(newValue.cameraID);//配置文件
+            this.refreshKey++;
           }
-        }, 200);
+        }, 300);
       },
       deep: true,
     },
-    "department.id": {
-      handler(newValue, oldValue) {},
-      deep: true,
-    },
+    // "department.id": {
+    //   handler(newValue, oldValue) {},
+    //   deep: true,
+    // },
     buildInfo: {
       handler(newValue) {
         // console.log("当前值:", newValue);
@@ -153,15 +156,16 @@ export default {
       },
       deep: true,
     },
-    online: {
-      handler(newValue) {
-        // console.log("当前值:", newValue);
-      },
-      deep: true,
-    },
+    // online: {
+    //   handler(newValue) {
+    //     // console.log("当前值:", newValue);
+    //   },
+    //   deep: true,
+    // },
   },
   data() {
     return {
+      refreshKey: 1,
       online: false,
       BASE_URL,
       dataList: [
@@ -224,7 +228,7 @@ export default {
     };
   },
   created() {
-    this.initSoundList();
+    // this.initSoundList();
     this.getCameraList();
     // this.getDepartmentByPid();
     this.departmentOptions = GY_STATIONS.filter((e) => e.id !== "");
@@ -252,8 +256,14 @@ export default {
     },
     async initSoundList() {
       try {
-        const res = await getElementList({ id: "784748250065281024" });
-        this.dataList = FBKYLIST;
+        //图层标注位置-结合配置文件
+        // const res = await getElementList({ id: "784748250065281024" });
+        // this.dataList = FBKYLIST;
+        //数据接口
+        const res = await getSpeakerList({
+          buildId: this.buildInfo.positioningBuildId,
+        });
+        this.dataList = res.data.content;
         // console.log("防爆扩音列表", res, this.dataList);
         // content.forEach((d) => {
         //   d.GPSPoints = this.transPosition(d.pointList);
@@ -402,7 +412,7 @@ export default {
       .el-select {
         margin-right: 0.052083rem /* 10/192 */;
         ::v-deep .el-input__inner {
-          width: 0.572917rem /* 110/192 */;
+          //width: 0.572917rem /* 110/192 */;
           height: 28px;
           border-radius: 0;
           color: #fff;

+ 82 - 68
src/views/basePage/components/layerControl/index.vue

@@ -312,14 +312,16 @@ export default {
       const { type, name, layerId } = layer;
       if (
         [
-          "智能门禁",
+          "视频融合",
+          "门禁管理",
+          "安防门禁",
           "防爆扩音",
           "埋地泄漏",
           "监控探头",
-          "摄像头",
-          "泄漏",
-          "周界",
-          "火灾",
+          "工业视频",
+          "激光云台",
+          "周界入侵",
+          "火灾监测",
           "风险识别",
           "集气站",
           "井场",
@@ -653,72 +655,84 @@ export default {
     },
     showBuildingInfo(layerId, show) {
       this.buildingInfoLayerId = "layer_" + layerId;
-      let dataSource = addNewDatasource(this.buildingInfoLayerId);
-      if (show) {
-        if (dataSource.entities.values.length == 0) {
-          this.buildingInfo.forEach((d) => {
-            dataSource.entities.add(
-              new Entity({
-                id: "buildingName_" + d.id,
-                //name: d.name,
-                position: Cartesian3.fromDegrees(d.x, d.y, d.z),
-                label: {
-                  text: d.name,
-                  show: new CallbackProperty((time, result) => {
-                    return this.buildingNameShowProperty(d.id);
-                  }),
-                  font: "18px Helvetica",
-                  style: LabelStyle.FILL_AND_OUTLINE,
-                  pixelOffset: new Cartesian2(0, -18),
-                  fillColor: Color.WHITE,
-                  outlineColor: Color.BLACK,
-                  outlineWidth: 2,
-                  horizontalOrigin: HorizontalOrigin.CENTER,
-                  verticalOrigin: VerticalOrigin.TOP,
-                  //scaleByDistance: new NearFarScalar(1, 2.6, 800, 0),
-                },
-                properties: new PropertyBag({
-                  type: "buildingName",
-                  details: d,
-                }),
-              })
-            );
-            dataSource.entities.add(
-              new Entity({
-                id: "buildingPerson_" + d.id,
-                //name: d.name,
-                position: Cartesian3.fromDegrees(d.x, d.y, d.z),
-                label: {
-                  text: new CallbackProperty((time, result) => {
-                    return this.getPersonCount(d.id);
-                  }),
-                  show: new CallbackProperty((time, result) => {
-                    return this.buildingNameShowProperty(d.id);
-                  }),
-                  font: "18px Helvetica",
-                  style: LabelStyle.FILL,
-                  pixelOffset: new Cartesian2(0, -42),
-                  fillColor: Color.WHITE,
-                  backgroundColor: Color.DARKBLUE, //Color.WHITE,    //背景颜色
-                  showBackground: true, //是否显示背景颜色
-                  outlineColor: Color.BLACK,
-                  outlineWidth: 2,
-                  horizontalOrigin: HorizontalOrigin.CENTER,
-                  verticalOrigin: VerticalOrigin.TOP,
-                  //scaleByDistance: new NearFarScalar(1, 2.6, 800, 0),
-                },
-                properties: new PropertyBag({
-                  type: "buildingPerson",
-                  details: d,
-                }),
-              })
-            );
-          });
+      const viewer = getViewer();
+      const D = viewer.dataSources.getByName(this.buildingInfoLayerId);
+      if (D.length > 0) {
+        console.log("建筑名称:", D);
+        if (show) {
+          D[0].show = true;
         } else {
-          dataSource.show = true;
+          D[0].show = false;
         }
       } else {
-        dataSource.show = false;
+        const dataSource = addNewDatasource(this.buildingInfoLayerId);
+        console.log("Params", layerId, show, dataSource);
+        if (show) {
+          if (dataSource.entities.values.length == 0) {
+            this.buildingInfo.forEach((d) => {
+              dataSource.entities.add(
+                new Entity({
+                  id: "buildingName_" + d.id,
+                  //name: d.name,
+                  position: Cartesian3.fromDegrees(d.x, d.y, d.z),
+                  label: {
+                    text: d.name,
+                    show: new CallbackProperty((time, result) => {
+                      return this.buildingNameShowProperty(d.id);
+                    }),
+                    font: "16px Helvetica",
+                    style: LabelStyle.FILL_AND_OUTLINE,
+                    pixelOffset: new Cartesian2(0, -18),
+                    fillColor: Color.WHITE,
+                    outlineColor: Color.BLACK,
+                    outlineWidth: 2,
+                    backgroundColor: Color.DARKBLUE, //Color.WHITE,    //背景颜色
+                    showBackground: true, //是否显示背景颜色
+                    horizontalOrigin: HorizontalOrigin.CENTER,
+                    verticalOrigin: VerticalOrigin.TOP,
+                    //scaleByDistance: new NearFarScalar(1, 2.6, 800, 0),
+                  },
+                  properties: new PropertyBag({
+                    type: "buildingName",
+                    details: d,
+                  }),
+                })
+              );
+              // dataSource.entities.add(
+              //   new Entity({
+              //     id: "buildingPerson_" + d.id,
+              //     //name: d.name,
+              //     position: Cartesian3.fromDegrees(d.x, d.y, d.z),
+              //     label: {
+              //       text: new CallbackProperty((time, result) => {
+              //         return this.getPersonCount(d.id);
+              //       }),
+              //       show: new CallbackProperty((time, result) => {
+              //         return this.buildingNameShowProperty(d.id);
+              //       }),
+              //       font: "18px Helvetica",
+              //       style: LabelStyle.FILL,
+              //       pixelOffset: new Cartesian2(0, -42),
+              //       fillColor: Color.WHITE,
+              //       backgroundColor: Color.DARKBLUE, //Color.WHITE,    //背景颜色
+              //       showBackground: true, //是否显示背景颜色
+              //       outlineColor: Color.BLACK,
+              //       outlineWidth: 2,
+              //       horizontalOrigin: HorizontalOrigin.CENTER,
+              //       verticalOrigin: VerticalOrigin.TOP,
+              //       //scaleByDistance: new NearFarScalar(1, 2.6, 800, 0),
+              //     },
+              //     properties: new PropertyBag({
+              //       type: "buildingPerson",
+              //       details: d,
+              //     }),
+              //   })
+              // );
+            });
+          } else {
+            dataSource.show = true;
+          }
+        }
       }
     },
     showBuildingInfoByBuildId(layerId, show) {

+ 2 - 2
src/views/basePage/components/monitorDialog/index.vue

@@ -242,9 +242,9 @@ export default {
           icon: "police",
           data: [
             // { category: '人员报警', name: '人员', num: 0, icon: 'people' },
-            { category: "周界报警", name: "周界", num: 0, icon: "Perimeter" },
+            { category: "周界入侵", name: "周界入侵", num: 0, icon: "Perimeter" },
             // { category: "火灾报警", name: "火灾", num: 0, icon: "fire" },
-            { category: "泄漏报警", name: "泄漏", num: 0, icon: "xielou" },
+            { category: "激光云台", name: "激光云台", num: 0, icon: "xielou" },
           ],
           tableConfig: [
             // { title: "类型", prop: "category", width: "22%" },

+ 3 - 0
src/views/basePage/components/videoWindow/VideoImageWindow.vue

@@ -338,6 +338,8 @@ import BaseDragDialog from "@/views/components/base/BaseDragDialog";
 import Dayjs from "dayjs";
 import { mapGetters } from "vuex";
 import { getViewer } from "@/store/map/mapService";
+import { getCameraList } from "@/API/custom";
+
 export default {
   name: "VideoImageWindow",
   components: { BaseDragDialog },
@@ -442,6 +444,7 @@ export default {
       startTime: null,
       speed: 4,
       presetIndex: 1,
+      presetList: 1,
       // 视频控制 end
     };
   },

+ 4 - 4
src/views/basePage/mixins/LoadLayer/JGYT.js

@@ -95,8 +95,8 @@ export default {
     initJGYT() {
       this.$store.dispatch('globalConfig/pushSwitchConfig', {
         type: 'jgyt',
-        label: '泄漏',
-        name: '泄漏',
+        label: '激光云台',
+        name: '激光云台',
         show: this.jgytLayerShow,
         selected: false,
         elements: this.jgytTagsData,
@@ -184,8 +184,8 @@ export default {
         })
         this.$store.dispatch('globalConfig/updateSwitchConfig', {
           type: 'jgyt',
-          label: '泄漏',
-          name: '泄漏',
+          label: '激光云台',
+          name: '激光云台',
           show: this.jgytLayerShow,
           selected: false,
           elements: this.jgytTagsData,

+ 5 - 5
src/views/basePage/mixins/LoadLayer/accessControl.js

@@ -19,7 +19,7 @@ export default {
   watch: {
     buildId: {
       handler(val) {
-        console.log('智能门禁图层建筑变化', val)
+        // console.log('智能门禁图层建筑变化', val)
         if (!val) return
         setTimeout(() => {
           this.getZnmjTagsData()
@@ -40,8 +40,8 @@ export default {
     initZnmj() {
       this.$store.dispatch('globalConfig/pushSwitchConfig', {
         type: this.znmjDataSourceName,
-        label: '智能门禁',
-        name: '智能门禁',
+        label: '门禁管理',
+        name: '门禁管理',
         show: this.znmjDataSourceShow,
         selected: false,
         elements: this.znmjTagsData,
@@ -55,8 +55,8 @@ export default {
         this.znmjTagsData = res.data.content || []
         this.$store.dispatch('globalConfig/updateSwitchConfig', {
           type: this.znmjDataSourceName,
-          label: '智能门禁',
-          name: '智能门禁',
+          label: '门禁管理',
+          name: '门禁管理',
           show: this.znmjDataSourceShow,
           selected: false,
           elements: this.znmjTagsData,

+ 4 - 4
src/views/basePage/mixins/LoadLayer/camera.js

@@ -41,8 +41,8 @@ export default {
     initCamera() {
       this.$store.dispatch('globalConfig/pushSwitchConfig', {
         type: this.cameraDataSourceName,
-        label: '摄像头',
-        name: '摄像头',
+        label: '工业视频',
+        name: '工业视频',
         show: this.cameraDataSourceShow,
         selected: false,
         elements: this.cameraTagsData,
@@ -56,8 +56,8 @@ export default {
         this.cameraTagsData = res.data.content.filter(e => !e.canHide) || []
         this.$store.dispatch('globalConfig/updateSwitchConfig', {
           type: this.cameraDataSourceName,
-          label: '摄像头',
-          name: '摄像头',
+          label: '工业视频',
+          name: '工业视频',
           show: this.cameraDataSourceShow,
           selected: false,
           elements: this.cameraTagsData,

+ 7 - 6
src/views/basePage/mixins/LoadLayer/fbky.js

@@ -1,5 +1,5 @@
 import { Entity, NearFarScalar, PolylineDashMaterialProperty, DistanceDisplayCondition, Cartesian3, Color, PropertyBag } from "cesium";
-import { getTagList } from "@/API/fire";
+import { getSpeakerList } from "@/API/speaker";
 import { flyToByViewer, addNewDatasource } from "@/utils/mapUtil";
 import { _locate } from '@/utils'
 import { getViewer } from "@/store/map/mapService";
@@ -37,7 +37,7 @@ export default {
   },
   mounted() {
     setTimeout(() => {
-      // this.initFbky()
+      this.initFbky()
     }, 1000)
   },
   methods: {
@@ -46,7 +46,7 @@ export default {
         type: "fbky",
         label: "防爆扩音",
         name: "防爆扩音",
-        show: true,
+        show: false,
         selected: false,
         elements: this.fbkyTagsData,
       });
@@ -55,9 +55,10 @@ export default {
       try {
         let p = { buildId: this.buildInfo.positioningBuildId }
         // console.log('防爆扩音数据获取参数:', p)
-        let res = await getTagList(p);
-        // this.fbkyTagsData = res.data.content || [];
-        this.fbkyTagsData = FBKYLIST.filter((e) => e.buildId == this.buildInfo.positioningBuildId && e.show);
+        let res = await getSpeakerList(p);
+        console.log('防爆扩音数据:', res)
+        this.fbkyTagsData = res.data.content || [];//系统模块
+        // this.fbkyTagsData = FBKYLIST.filter((e) => e.buildId == this.buildInfo.positioningBuildId && e.show);//都匀配置文件
         console.log("防爆扩音信息", this.fbkyTagsData);
         this.$store.dispatch("globalConfig/updateSwitchConfig", {
           type: "fbky",

+ 5 - 5
src/views/basePage/mixins/LoadLayer/fire.js

@@ -44,9 +44,9 @@ export default {
     initFire() {
       this.$store.dispatch("globalConfig/pushSwitchConfig", {
         type: "fire",
-        label: "火灾",
-        name: "火灾",
-        show: true,
+        label: "火灾监测",
+        name: "火灾监测",
+        show: false,
         selected: false,
         elements: this.fireTagsData,
       });
@@ -60,8 +60,8 @@ export default {
         // console.log("火灾信息", this.fireTagsData);
         this.$store.dispatch("globalConfig/updateSwitchConfig", {
           type: "fire",
-          label: "火灾",
-          name: "火灾",
+          label: "火灾监测",
+          name: "火灾监测",
           show: this.fireTagsShow,
           selected: false,
           elements: this.fireTagsData,

+ 6 - 5
src/views/basePage/mixins/LoadLayer/index.js

@@ -2,13 +2,14 @@ import Person from './person' //人员定位模块
 import Rail from './rail' //电子围栏
 import AreaAlarm from './areaAlarm' //区域报警
 import JGYT from './JGYT' //激光云台/泄漏
-import perimeter from './perimeter' //周界
-import camera from './camera' //摄像头
-import fire from './fire' //火灾
-import risk from './risk' //风险
+import perimeter from './perimeter' //周界入侵
+import camera from './camera' //摄像头 工业视频
+import fire from './fire' //火灾监测
+import risk from './risk' //风险区域
 import fbky from './fbky' //防爆扩音
 import accessControl from './accessControl' //智能门禁
+import videoFusion from './videoFusion' //视频融合
 
 export default {
-  mixins: [Person, Rail, AreaAlarm, JGYT, perimeter, camera, fire, risk, fbky, accessControl],
+  mixins: [Person, Rail, AreaAlarm, JGYT, perimeter, camera, fire, risk, fbky, accessControl, videoFusion],
 }

+ 20 - 5
src/views/basePage/mixins/LoadLayer/perimeter.js

@@ -113,8 +113,8 @@ export default {
     initPerimeter() {
       this.$store.dispatch('globalConfig/pushSwitchConfig', {
         type: 'perimeter',
-        label: '周界',
-        name: '周界',
+        label: '周界入侵',
+        name: '周界入侵',
         show: this.perimeterTagsShow,
         selected: false,
         elements: this.perimeterTagsData,
@@ -129,8 +129,8 @@ export default {
         this.perimeterTagsData = res.data.content || []
         this.$store.dispatch('globalConfig/updateSwitchConfig', {
           type: 'perimeter',
-          label: '周界',
-          name: '周界',
+          label: '周界入侵',
+          name: '周界入侵',
           show: this.perimeterTagsShow,
           selected: false,
           elements: this.perimeterTagsData,
@@ -150,6 +150,7 @@ export default {
           const extrudedHeight = 3
           let positions = []
           let minimumHeights = []
+          let pColor = seg.withdrawn ? "#808080" : "#00ff00"
           seg.points.forEach(p => {
             const gpsPoint = _locate(p.x, p.y, { x: longitude, y: latitude })
             const point = [gpsPoint.x, gpsPoint.y, wallHeight]
@@ -166,7 +167,7 @@ export default {
               wall: {
                 positions: Cartesian3.fromDegreesArrayHeights(positions),
                 minimumHeights,
-                material: Color.fromCssColorString('#00ff00').withAlpha(0.8),
+                material: Color.fromCssColorString(pColor).withAlpha(0.8),
               },
               properties: new PropertyBag({
                 type: 'layer_perimeter',
@@ -223,6 +224,9 @@ export default {
           case 3:
             color = '#FF0000'
             break
+          case 4:
+            color = '#808080'
+            break
           case 5:
             color = '#FFF100'
             break
@@ -332,6 +336,17 @@ export default {
               item.billboard = null
               item.position = null
             }
+          } else if (data.alarmType === 4) {
+            //地图元素
+            let x = 1
+            let flog = true
+            let speed = 0.015 * data.alarmType
+            item.wall.material = new ColorMaterialProperty(
+              new CallbackProperty(function () {
+                return Color.fromCssColorString(color).withAlpha(x)
+              }, false)
+            )
+            item.show = true
           } else {
             let perimeterSegmentData = {}
             this.perimeterTagsData.forEach(tag => {

+ 2 - 2
src/views/basePage/mixins/LoadLayer/person.js

@@ -95,8 +95,8 @@ export default {
     // 没有定位模块,不加载人员
     // this.$store.dispatch('globalConfig/pushSwitchConfig', {
     //   type: this.personDataSourceName,
-    //   label: '人员',
-    //   name: '人员',
+    //   label: '人员定位',
+    //   name: '人员定位',
     //   show: this.personDataSourceShow,
     //   selected: false,
     // })

+ 118 - 0
src/views/basePage/mixins/LoadLayer/videoFusion.js

@@ -0,0 +1,118 @@
+import { Entity, NearFarScalar, PolylineDashMaterialProperty, DistanceDisplayCondition, Cartesian3, ImageMaterialProperty, Texture, Color, PropertyBag } from "cesium";
+import { getAccessInfoList } from "@/API/accessControl";
+import { flyToByViewer, addNewDatasource, flyToPerspective } from "@/utils/mapUtil";
+import { _locate } from '@/utils'
+import { getViewer } from "@/store/map/mapService";
+import { mapGetters } from 'vuex'
+export default {
+  name: 'vFusion',
+  data() {
+    return {
+      vFusionDataSourceName: 'vFusion',
+      vFusionDataSourceShow: false,
+      vFusionTagsData: [],
+    }
+  },
+  computed: {
+    ...mapGetters(['buildId', 'buildInfo']),
+  },
+  watch: {
+    buildId: {
+      handler(val) {
+        console.log('视频融合图层建筑变化', val)
+        if (!val) return
+        setTimeout(() => {
+          this.getVideoFusionTagsData()
+        }, 2000)
+      },
+      immediate: true,
+    },
+  },
+  mounted() {
+    // setTimeout(() => {
+    //   this.initVideoFusion()
+    // }, 1000)
+  },
+  methods: {
+    /**
+     * 初始化
+     */
+    initVideoFusion() {
+      this.$store.dispatch('globalConfig/pushSwitchConfig', {
+        type: this.vFusionDataSourceName,
+        label: '视频融合',
+        name: '视频融合',
+        show: this.vFusionDataSourceShow,
+        selected: false,
+        elements: this.vFusionTagsData,
+      })
+    },
+    async getVideoFusionTagsData() {
+      try {
+        let p = { enable: true, buildId: this.buildInfo.positioningBuildId }
+        let res = await getAccessInfoList(p)
+        // console.log('视频融合数据', res)
+        this.vFusionTagsData = res.data.content || []
+        this.$store.dispatch('globalConfig/updateSwitchConfig', {
+          type: this.vFusionDataSourceName,
+          label: '视频融合',
+          name: '视频融合',
+          show: this.vFusionDataSourceShow,
+          selected: false,
+          elements: this.vFusionTagsData,
+        })
+        this.addVideoFusionTags()
+      } catch (err) {
+        console.log(err)
+      }
+    },
+    addVideoFusionTags() {
+      let dataSource = addNewDatasource('layer_' + this.vFusionDataSourceName)
+      // 视频纹理
+      const videoTexture = new Texture({
+        context: dataSource.scene.context,
+        source: videoElement,
+      });
+      // console.log("视频融合基础信息", this.vFusionTagsData);
+      dataSource.entities.add({
+        position: Cartesian3.fromDegrees(111.26017906894992, 40.380134574100325, 0.021734722753457503),
+        model: {
+          uri: 'insidemodels/VideoTest.glb',
+          minimumPixelSize: 128,
+          maximumScale: 20000
+        },
+        material: new ImageMaterialProperty({
+          image: videoTexture,
+          transparent: true
+        })
+      });
+    },
+    async pushVideoFusionStatus(data) {
+      if (data.id) {
+        if (data?.buildId === this.buildInfo?.positioningBuildId) {
+          // console.log("聚焦报警");
+          this.animationVideoFusion(data)
+        } else {
+          const curStation = GY_STATIONS.find(e => e.positioningBuildId === data.buildId)
+          // console.log('报警站点信息:', curStation)
+          if (!curStation) return
+          this.$store.dispatch('globalConfig/setMapMode', {
+            value: '3d',
+          })
+          await this.$store.dispatch('model/setBuildInfoByBuildId', curStation.buildId)
+          setTimeout(() => {
+            this.animationVideoFusion(data)
+          }, 3000)
+        }
+      }
+    },
+    transPosition(pointList = []) {
+      const { longitude, latitude } = this.buildInfo.gpsCoordinate0
+      return pointList.reduce((pre, cur) => {
+        const { x, y } = _locate(cur.x, cur.y, { x: longitude, y: latitude })
+        pre.push([x, y, +cur.z])
+        return pre
+      }, [])
+    },
+  },
+}

+ 4 - 0
src/views/basePage/mixins/MapEvent.js

@@ -177,6 +177,10 @@ export default {
                 detail: { ...data },
               })
             } else if (type === 'layer_fbky') {
+              // let cameraIds = data.cameras.map(e => {//视频弹窗
+              //   return e.cameraId
+              // })
+              // this.$store.dispatch('dialog/openVideoDialog', cameraIds)
               // console.log("数据内容fbky:----------------", data);
               this.$store.dispatch("globalConfig/setSoundElementDialog", {
                 show: true,

+ 1 - 1
src/views/basePage/panels/IntelligentVideo.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="page_container">
-    <base-title title="天然气泄露检测" />
+    <base-title title="激光云台" />
     <div class="page_content">
       <div class="video_window window1"></div>
       <div class="video_window window2"></div>

+ 1 - 1
src/views/basePage/panels/IntelligentVideo/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="page_container">
-    <base-title title="天然气泄露检测" />
+    <base-title title="激光云台" />
     <div class="page_content">
       <!-- 上半部分 -->
       <div class="video_window window1">

+ 6 - 6
src/views/basePage/panels/Overview.vue

@@ -64,25 +64,25 @@ export default {
       categoryList: {
         100001: {
           code: "101",
-          name: "人员报警",
+          name: "人员定位",
           value: "",
           level: "024000",
         },
         100002: {
           code: "101",
-          name: "周界报警",
+          name: "周界入侵",
           value: "",
           level: "024000",
         },
         100003: {
           code: "101",
-          name: "火灾报警",
+          name: "火灾监测",
           value: "",
           level: "024000",
         },
         100004: {
           code: "101",
-          name: "泄漏检测",
+          name: "激光云台",
           value: "",
           level: "024000",
         },
@@ -94,13 +94,13 @@ export default {
         },
         100006: {
           code: "101",
-          name: "门禁报警",
+          name: "门禁管理",
           value: "",
           level: "024000",
         },
         100015: {
           code: "101",
-          name: "110报警",
+          name: "一键报警",
           value: "",
           level: "024000",
         },

+ 86 - 39
src/views/basePage/panels/PersonStatistics.vue

@@ -1,21 +1,31 @@
 <template>
   <div class="page_container">
-    <base-title title="出入统计" />
+    <base-title title="门禁管理" />
     <div class="page_content">
       <!-- 都匀人员不统计 -->
       <div class="person_title">人员信息</div>
       <div class="person_num_box">
         <vue-seamless
+          v-if="personList.length"
           :data="personList"
           class="seamless-warp"
           :class-option="scrollOption"
           ref="seamlessScroll"
           :key="seamLessTimeKey"
         >
-          <div v-if="personList.length">
+          <div>
             <div class="item" v-for="item of personList" :key="item.id">
               <div class="left">
-                <img :src="item.imgUrl" @click="delInfo(item)" />
+                <img
+                  :src="item.imgUrl"
+                  @click="delInfo(item)"
+                  v-if="item.imgUrl"
+                />
+                <img
+                  src="~@/assets/imgs/stationMap/img_无照片.png"
+                  @click="delInfo(item)"
+                  v-else
+                />
               </div>
               <div class="divider"></div>
               <div class="right">
@@ -55,8 +65,10 @@
               </div>
             </div>
           </div>
-          <div v-else>暂无数据</div>
         </vue-seamless>
+        <div v-else class="data-loading">
+          <div>数据加载中</div>
+        </div>
       </div>
       <!-- <div class="person_type_box">
         <div class="person_title">出入设备</div>
@@ -150,17 +162,17 @@
               :key="index"
             >
               <img
-                v-if="item.name === '员工'"
+                v-if="item.name === '站内员工'"
                 :src="require('@/assets/imgs/panels/icon_staff@2x.png')"
                 alt=""
               />
               <img
-                v-if="item.name === '访客'"
+                v-if="item.name === '访客人员'"
                 :src="require('@/assets/imgs/panels/icon_visitor@2x.png')"
                 alt=""
               />
               <img
-                v-if="item.name === '施工'"
+                v-if="item.name === '施工人员'"
                 :src="require('@/assets/imgs/panels/icon_construction@2x.png')"
                 alt=""
               />
@@ -186,29 +198,33 @@
 import BaseTitle from "./BaseTitle.vue";
 import VueSeamless from "vue-seamless-scroll";
 import { getPersonTypeList, getAccessInfo } from "@/API/positioning";
-import { setAreaPersonOut,getAreaPersonList, getAccessLogList } from "@/API/accessControl";
+import {
+  setAreaPersonOut,
+  getAreaPersonList,
+  getAccessLogList,
+} from "@/API/accessControl";
 import Dayjs from "dayjs";
-
+import { openDialog } from "@/utils/mapUtil.js";
 export default {
   name: "PersonStatistics",
   components: { BaseTitle, VueSeamless },
   data() {
     return {
-      total: 4,
+      total: 0,
       count: 6,
       seamLessTimeKey: new Date().getTime(),
       seamLessTimeKeyEvent: new Date().getTime(),
       personTypeCount: [
         {
-          name: "员工",
+          name: "站内员工",
           value: 0,
         },
         {
-          name: "访客",
+          name: "访客人员",
           value: 0,
         },
         {
-          name: "施工",
+          name: "施工人员",
           value: 0,
         },
       ],
@@ -262,17 +278,17 @@ export default {
       },
       defaultPhoto: "~@/assets/imgs/stationMap/img_无照片.png",
       personList: [
-        {
-          id: "1",
-          name: "张某某",
-          pic: "",
-          type: "值班干部",
-          posi: "主任",
-          personType: "员工",
-          comp: "XXXXX公司",
-          phone: 15500001111,
-          imgUrl: "~@/assets/imgs/stationMap/img_无照片.png",
-        },
+        // {
+        //   id: "1",
+        //   name: "",
+        //   pic: "",
+        //   type: "值班干部",
+        //   posi: "主任",
+        //   personType: "员工",
+        //   comp: "XXXXX公司",
+        //   phone: 15500001111,
+        //   imgUrl: "~@/assets/imgs/stationMap/img_无照片.png",
+        // },
       ],
       eventsList: [
         {
@@ -298,7 +314,6 @@ export default {
   },
   created() {
     this.getMessage();
-    this.startMqtt();
     // this.openPersonInfo();
     // this.initAccessLogList();
   },
@@ -308,9 +323,21 @@ export default {
     },
   },
   mounted() {
+    this.startMqtt();
+    let timer = null;
+    if (!timer) {
+      timer = setInterval(() => {
+        this.getMessage();
+      }, 3000);
+    }
+    this.$once("hook:beforeDestroy", () => {
+      clearInterval(timer);
+      timer = null;
+    });
     // this.getPersonTypeList();
   },
   methods: {
+    openDialog,
     async initAccessLogList() {
       try {
         const params = {
@@ -337,8 +364,8 @@ export default {
           const c = data.remark.split(":");
           if (c.length == 3) {
             this.personTypeCount[0].value = c[0]; //员工
-            this.personTypeCount[1].value = c[1]; //访客
-            this.personTypeCount[2].value = c[2]; //施工
+            this.personTypeCount[1].value = c[2]; //访客
+            this.personTypeCount[2].value = c[1]; //施工
             this.total = Number(c[0]) + Number(c[1]) + Number(c[2]);
           }
         }
@@ -347,6 +374,12 @@ export default {
       }
     },
     openPersonList() {
+      // this.openDialog(
+      //   "进站跟踪",
+      //   "https://10.0.0.201:8082/#/main?nolayout=1&token={token}",
+      //   1500,
+      //   760
+      // );
       // this.$store.dispatch("globalConfig/setPersonListDialog", {
       //   show: true,
       //   dialogMsg: this.personList,
@@ -384,14 +417,15 @@ export default {
           // } else if (topic === "CountArea/PersonTypeCountDic/All") {
           //   const data = JSON.parse(content);
           // } else
+          console.log("门禁内容调整", content);
           if (topic === "AccessControl/Log") {
             //站内人员变动,重新查询数据
-            if (
-              JSON.parse(content).AreaId == "791707314364096512" &&
-              JSON.parse(content).PersonId != null
-            ) {
-              this.getMessage();
-            }
+            // if (
+            //   JSON.parse(content).AreaId == "791707314364096512" &&
+            //   JSON.parse(content).PersonId != null
+            // ) {
+            this.getMessage();
+            // }
           }
         },
       });
@@ -409,6 +443,7 @@ export default {
             let workList = [];
             let visitList = [];
             let personInfoList = [];
+
             res.data.content.forEach((i) => {
               if (i.typeBelong == 1) {
                 personInfoList.push({
@@ -445,7 +480,7 @@ export default {
                 //访客
                 case "546093319541760000":
                   visitList.push({
-                    id:i.id,
+                    id: i.id,
                     workNo: i.workNo,
                     name: i.name,
                   });
@@ -453,7 +488,7 @@ export default {
                 //施工
                 case "403245878963347456":
                   workList.push({
-                    id:i.id,
+                    id: i.id,
                     workNo: i.workNo,
                     name: i.name,
                   });
@@ -461,7 +496,7 @@ export default {
                 //员工
                 case "255022541838691649":
                   localList.push({
-                    id:i.id,
+                    id: i.id,
                     workNo: i.workNo,
                     name: i.name,
                   });
@@ -483,6 +518,7 @@ export default {
             //   workList
             // );
           }
+        } else {
         }
       } catch (error) {
         console.log(error);
@@ -490,7 +526,10 @@ export default {
     },
     async delPersonMessage(item) {
       try {
-        let res = await setAreaPersonOut({ areaId: '791707314364096512', personId: item.id });
+        let res = await setAreaPersonOut({
+          areaId: "791707314364096512",
+          personId: item.id,
+        });
       } catch (error) {
         console.log(error);
       }
@@ -503,7 +542,7 @@ export default {
       })
         .then(() => {
           console.log("删除" + item.name + "人员已入场信息!");
-          this.delPersonMessage(item)//删除接口
+          this.delPersonMessage(item); //删除接口
           this.$message({
             type: "success",
             message: "删除成功!",
@@ -520,6 +559,7 @@ export default {
         });
     },
   },
+  beforeDestroy() {},
 };
 </script>
 
@@ -589,7 +629,14 @@ export default {
       width: 100%;
       height: 342px;
       overflow: hidden;
-
+      .data-loading {
+        width: 100%;
+        height: 342px;
+        display: flex;
+        padding-left: 40%;
+        align-items: center; /*设置侧轴上,子元素的排列方式为居中对齐*/
+        color: #ffffff;
+      }
       .num_content {
         width: 100%;
         height: 168px;

+ 43 - 50
src/views/basePage/panels/RiskHint.vue

@@ -27,10 +27,17 @@
               <span class="type">{{ riskColors[item.level].name }}</span>
               <span class="split"></span>
               <span class="time">{{
-                Dayjs(item.eventTime).format("YYYY-MM-DD HH:mm:ss")
+                Dayjs(item.riskTime).format("YYYY-MM-DD HH:mm:ss")
               }}</span>
             </div>
-            <div class="content">{{ item.content }}</div>
+            <div
+              class="content"
+              :style="{
+                color: `${riskColors[item.level].color}`,
+              }"
+            >
+              {{ item.content }}
+            </div>
           </div>
         </div>
       </vue-seamless>
@@ -59,7 +66,7 @@ export default {
     return {
       scrollOption: {
         limitMoveNum: 2.5,
-        singleHeight: 81,
+        singleHeight: 81.5,
         waitTime: 2000,
       },
       dId: "",
@@ -68,36 +75,11 @@ export default {
         ["306002"]: { name: "较大级别", color: "#FF9F00" },
         ["306003"]: { name: "一般级别", color: "#F8E71C" },
         ["306004"]: { name: "低级别", color: "#53A3FF" },
-        ["024001"]: { name: "一级", color: "#FF9F00" },
+        ["024001"]: { name: "一级", color: "#FF3636" },
         ["024002"]: { name: "二级", color: "#F8E71C" },
         ["024003"]: { name: "三级", color: "#53A3FF" },
       },
-      hintData1: [
-        {
-          id: "1",
-          level: "306004",
-          riskTime: "2022-11-16 15:51:46",
-          content: "周界入侵触发,事件等级低",
-        },
-        {
-          id: "2",
-          level: "306004",
-          riskTime: "2022-11-16 15:51:46",
-          content: "周界入侵触发,事件等级低",
-        },
-        {
-          id: "3",
-          level: "306004",
-          riskTime: "2022-11-16 15:51:46",
-          content: "周界入侵触发,事件等级较低",
-        },
-        {
-          id: "4",
-          level: "306003",
-          riskTime: "2022-11-16 15:51:46",
-          content: "激光云台触发气体泄漏,事件等级中",
-        },
-      ],
+      hintData1: [],
     };
   },
   computed: {
@@ -106,6 +88,16 @@ export default {
   mounted() {
     this.getAlarmDataList();
     // this.startMqtt();
+    let timer = null;
+    if (!timer) {
+      timer = setInterval(() => {
+        this.getAlarmDataList();
+      }, 5000);
+    }
+    this.$once("hook:beforeDestroy", () => {
+      !!timer && clearTimeout(timer);
+      timer = null;
+    });
   },
   watch: {
     departmentId(newVal) {
@@ -118,19 +110,20 @@ export default {
   },
   methods: {
     Dayjs,
+
     async getAlarmDataList() {
       try {
         const params = {
-          pageSize: 10,
-          pageIndex: 1,
+          // pageSize: 10000,
+          // pageIndex: 1,
           dealStatus: "", //0
-          confirmStatus: "",
+          confirmStatus: "0",
           recoveryStatus: "",
           category: "",
           level: "",
           type: "",
           startTime: Dayjs(
-            Dayjs(new Date()).subtract(1, "month").format("YYYY-MM-DD HH:mm:ss")
+            Dayjs(new Date()).subtract(7, "day").format("YYYY-MM-DD HH:mm:ss")
           ).format(),
           endTime: Dayjs(
             Dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
@@ -152,22 +145,22 @@ export default {
               e.content,
           };
         });
-        // console.log("风险报警数据", alarmData, this.hintData1);
+        console.log("风险报警数据", alarmData, this.hintData1);
       } catch (err) {}
     },
     openRiskDialog(data) {
-      console.log("风险报警数据", data);
-      let dialogConfig = {
-        dialogId: "risk_" + data.id,
-        show: true, //是否显示
-        title: "事件详情",
-        width: 500, //px宽度
-        height: 320, //px高度
-        center: true, //是否居中定位
-        zIndex: 10,
-        data,
-      };
-      this.$store.dispatch("dialog/addRiskDialog", dialogConfig);
+      // console.log("风险报警数据", data);
+      // let dialogConfig = {
+      //   dialogId: "risk_" + data.id,
+      //   show: true, //是否显示
+      //   title: "事件详情",
+      //   width: 500, //px宽度
+      //   height: 320, //px高度
+      //   center: true, //是否居中定位
+      //   zIndex: 10,
+      //   data,
+      // };
+      // this.$store.dispatch("dialog/addRiskDialog", dialogConfig);
     },
     startMqtt() {
       const topics = [
@@ -208,7 +201,7 @@ export default {
 
   .hint-box {
     width: 100%;
-    height: 198px;
+    height: 210px;
     overflow: hidden;
     padding: 0 15px;
     // display: flex;
@@ -254,10 +247,10 @@ export default {
     }
     .content {
       padding: 10px 0;
-      font-size: 13px;
+      font-size: 14px;
       color: #ffffff;
       letter-spacing: 1px;
-      font-weight: 400;
+      font-weight: 550;
     }
   }
   .no-data {

+ 3 - 1
src/views/components/baseFooter/FooterNavigation.vue

@@ -113,7 +113,9 @@ export default {
     $route(to, from) {},
   },
   mounted() {
-    this.getNavigationList();
+    if (localStorage.getItem("token") !== null) {
+      this.getNavigationList();
+    }
   },
   methods: {
     flyToPerspective,

+ 14 - 2
src/views/components/baseHeader/left.vue

@@ -92,6 +92,9 @@
             <el-dropdown-item @click.native="toAdmin">
               <span style="display: block">管理系统</span>
             </el-dropdown-item>
+            <el-dropdown-item @click.native="toURL(ywUrl)">
+              <span style="display: block">运维系统</span>
+            </el-dropdown-item>
             <el-dropdown-item @click.native="goToLogout">
               <span style="display: block">退出登录</span>
             </el-dropdown-item>
@@ -178,7 +181,7 @@ export default {
         person: "admin",
       },
       curNav: "1", // 当前选中的菜单id
-
+      ywUrl: "",
       navConfig: [
         {
           id: "1",
@@ -275,6 +278,7 @@ export default {
       this.alarmCount = +data;
     });
     this.startMqtt();
+    this.ywUrl = YWURL;
   },
   updated() {
     this.datePersonData.person = localStorage.getItem("username");
@@ -370,7 +374,7 @@ export default {
       this.$notify({
         //样式style块
         dangerouslyUseHTMLString: true,
-        title: "智能门禁",
+        title: "门禁管理",
         message:
           "【郝波】在门禁【托克托出站门禁】人脸认证通过,离开【托克托压气站】",
         // duration: 0,
@@ -641,6 +645,14 @@ export default {
       //window.location.href = ISMSAdminWeb.path + "main?token=" + token;
       window.open(ISMSAdminWeb.path + "main?token=" + token);
     },
+    toURL(url) {
+      const token = localStorage.getItem("token");
+      //window.location.href = ISMSAdminWeb.path + "main?token=" + token;
+      window.open(url);
+    },
+    goClose() {
+      window.close();
+    },
     /**
      * 弹窗形式打开后台页面
      */

+ 4 - 4
src/views/components/chart/BarLineChart.vue

@@ -40,10 +40,10 @@ export default {
         // { code: "100004", name: "泄漏监测", color: ["#00E0C3", "#4AC6E2"] }, // 泄漏
         { code: "1", name: "已处理", color: "#00FFCC" }, //周界
         { code: "0", name: "未处理", color: "##85FF00" }, // 火灾
-        { code: "100001", name: "人员报警", color: "#00E1FF" }, // 人员
-        { code: "100002", name: "周界防护", color: "#00B387" }, //周界
-        { code: "100003", name: "火灾报警", color: "#00FFCC" }, // 火灾
-        { code: "100004", name: "泄漏监测", color: "#00B0B0" }, // 泄漏
+        { code: "100001", name: "人员定位", color: "#00E1FF" }, // 人员
+        { code: "100002", name: "周界入侵", color: "#00B387" }, //周界
+        { code: "100003", name: "火灾监测", color: "#00FFCC" }, // 火灾
+        { code: "100004", name: "激光云台", color: "#00B0B0" }, // 泄漏
       ],
     };
   },

+ 4 - 4
src/views/components/chart/MultiLineChart.vue

@@ -39,10 +39,10 @@ export default {
         // { code: "100004", name: "泄漏监测", color: ["#00E0C3", "#4AC6E2"] }, // 泄漏
         { code: "1", name: "已处理", color: "#00FFCC" }, //周界
         { code: "0", name: "未处理", color: "#00B0B0" }, // 火灾
-        { code: "100001", name: "人员报警", color: "#00E1FF" }, // 人员
-        { code: "100002", name: "周界防护", color: "#00B387" }, //周界
-        { code: "100003", name: "火灾报警", color: "#00FFCC" }, // 火灾
-        { code: "100004", name: "泄漏监测", color: "#00B0B0" }, // 泄漏
+        { code: "100001", name: "人员定位", color: "#00E1FF" }, // 人员
+        { code: "100002", name: "周界入侵", color: "#00B387" }, //周界
+        { code: "100003", name: "火灾监测", color: "#00FFCC" }, // 火灾
+        { code: "100004", name: "激光云台", color: "#00B0B0" }, // 泄漏
       ],
     };
   },

+ 4 - 4
src/views/components/chart/RadarChart.vue

@@ -40,10 +40,10 @@ export default {
         // { code: "100004", name: "泄漏监测", color: ["#00E0C3", "#4AC6E2"] }, // 泄漏
         { code: "1", name: "已处理", color: "#00FFCC" }, //周界
         { code: "0", name: "未处理", color: "#00B0B0" }, // 火灾
-        { code: "100001", name: "人员报警", color: "#00E1FF" }, // 人员
-        { code: "100002", name: "周界防护", color: "#00B387" }, //周界
-        { code: "100003", name: "火灾报警", color: "#00FFCC" }, // 火灾
-        { code: "100004", name: "泄漏监测", color: "#00B0B0" }, // 泄漏
+        { code: "100001", name: "人员定位", color: "#00E1FF" }, // 人员
+        { code: "100002", name: "周界入侵", color: "#00B387" }, //周界
+        { code: "100003", name: "火灾监测", color: "#00FFCC" }, // 火灾
+        { code: "100004", name: "激光云台", color: "#00B0B0" }, // 泄漏
       ],
     };
   },

+ 4 - 4
src/views/components/chart/RankBar.vue

@@ -41,10 +41,10 @@ export default {
         // { code: "100004", name: "泄漏监测", color: ["#00E0C3", "#4AC6E2"] }, // 泄漏
         { code: "1", name: "已处理", color: "#00FFCC" }, //周界
         { code: "0", name: "未处理", color: "#00B0B0" }, // 火灾
-        { code: "100001", name: "人员报警", color: "#00E1FF" }, // 人员
-        { code: "100002", name: "周界防护", color: "#00B387" }, //周界
-        { code: "100003", name: "火灾报警", color: "#00FFCC" }, // 火灾
-        { code: "100004", name: "泄漏监测", color: "#00B0B0" }, // 泄漏
+        { code: "100001", name: "人员定位", color: "#00E1FF" }, // 人员
+        { code: "100002", name: "周界入侵", color: "#00B387" }, //周界
+        { code: "100003", name: "火灾监测", color: "#00FFCC" }, // 火灾
+        { code: "100004", name: "激光云台", color: "#00B0B0" }, // 泄漏
       ],
     };
   },

+ 4 - 4
src/views/components/chart/ScatterChart.vue

@@ -44,10 +44,10 @@ export default {
         // { code: "100002", name: "周界防护", color: ["#23E490", "#00AE63"] }, //周界
         // { code: "100003", name: "火灾报警", color: ["#FFB500", "#E9CC75"] }, // 火灾
         // { code: "100004", name: "泄漏监测", color: ["#00E0C3", "#4AC6E2"] }, // 泄漏
-        { code: "100001", name: "人员报警", color: "#00E1FF" }, // 人员
-        { code: "100002", name: "周界防护", color: "#00B387" }, //周界
-        { code: "100003", name: "火灾报警", color: "#00FFCC" }, // 火灾
-        { code: "100004", name: "泄漏监测", color: "#00B0B0" }, // 泄漏
+        { code: "100001", name: "人员定位", color: "#00E1FF" }, // 人员
+        { code: "100002", name: "周界入侵", color: "#00B387" }, //周界
+        { code: "100003", name: "火灾监测", color: "#00FFCC" }, // 火灾
+        { code: "100004", name: "激光云台", color: "#00B0B0" }, // 泄漏
       ],
     };
   },

+ 6 - 6
src/views/components/chart/StackBarChart.vue

@@ -31,13 +31,13 @@ export default {
     return {
       chart: null,
       colorConfig: [
-        { code: "100001", name: "人员报警", color: "#9072FF" },
-        { code: "100002", name: "周界防护", color: "#02F2F9" },
-        { code: "100003", name: "火灾报警", color: "#007DFF" },
-        { code: "100004", name: "泄漏监测", color: "#00C9A0" },
+        { code: "100001", name: "人员定位", color: "#00E1FF" }, // 人员
+        { code: "100002", name: "周界入侵", color: "#00B387" }, //周界
+        { code: "100003", name: "火灾监测", color: "#00FFCC" }, // 火灾
+        { code: "100004", name: "激光云台", color: "#00B0B0" }, // 泄漏
         { code: "100001", name: "人员报警", color: "#FFD552" },
-        { code: "100002", name: "周界防护", color: "#02F2F9" },
-        { code: "100003", name: "火灾报警", color: "#007DFF" },
+        { code: "100002", name: "周界入侵", color: "#02F2F9" },
+        { code: "100003", name: "火灾监测", color: "#007DFF" },
       ],
       colors: [
         "#FF83DF",

+ 3 - 3
src/views/components/dialog/AccessControlDialog.vue

@@ -139,7 +139,7 @@
           <el-col :span="8">
             <div class="search-box">
               <div class="search-item">
-                <span class="search-label">出入设备列表</span>
+                <span class="search-label">设备列表</span>
                 <!-- <el-select
                   value-key="id"
                   v-model="department"
@@ -189,7 +189,7 @@
           <el-col :span="16">
             <div class="record_list">
               <div class="record_title">
-                <span>出入门记录</span>
+                <span>门记录</span>
                 <span class="more" @click="more">更多</span>
               </div>
 
@@ -280,7 +280,7 @@ export default {
       baseDialogConfig: {
         dialogId: "accessControlDialog",
         show: false,
-        title: "智能门禁",
+        title: "门禁管理",
         width: 1240,
         height: 680,
         center: true,

+ 4 - 4
src/views/components/dialog/AlarmAudioDialog.vue

@@ -91,10 +91,10 @@ export default {
             document.getElementById("mapAlarmAudio").play();
             // console.log("报警声音", document.getElementById("mapAlarmAudio"));
           }, 200);
-          setTimeout(() => {
-            document.getElementById("mapAlarmAudio").pause();
-            document.getElementById("mapAlarmAudio").load();
-          }, 10000);
+          // setTimeout(() => {//10s停止
+          //   document.getElementById("mapAlarmAudio").pause();
+          //   document.getElementById("mapAlarmAudio").load();
+          // }, 10000);
           // this.alarmMsg = val.alarmMsg?.length > 0 ? val.alarmMsg : "";
           // if (this.alarmMsg) {
           //   this.speak(); //语音播报报警

+ 4 - 3
src/views/components/dialog/JGYTControlDialog/VideoControl.vue

@@ -159,7 +159,8 @@ export default {
         ptzSpeed: this.speed,
         canControl: this.curVideoData.ptzEnable,
       };
-      this.$EventBus.$emit("updateSendParam", param);
+      console.log("云台控制基础传参内容", param);
+      this.$EventBus.$emit("updateSendParamJGYT", param);
     },
     changePtzPresetParam(comm) {
       if (!this.commOpenning) {
@@ -177,7 +178,7 @@ export default {
         ptzPresetIndex: this.presetIndex,
         canControl: this.curVideoData.ptzEnable,
       };
-      this.$EventBus.$emit("updateSendParam", param);
+      this.$EventBus.$emit("updateSendParamJGYT", param);
     },
     /**
      * state  true代表回放模式
@@ -201,7 +202,7 @@ export default {
           "YYYY-MM-DD HH:mm:ss"
         );
       }
-      this.$EventBus.$emit("updateSendParam", param, true);
+      this.$EventBus.$emit("updateSendParamJGYT", param, true);
     },
   },
 };

+ 283 - 0
src/views/components/dialog/JGYTControlDialog/VideoImageWindow.vue

@@ -0,0 +1,283 @@
+<template>
+  <div class="video_container">
+    <!-- 弹窗内容 -->
+    <div class="dialog_box">
+      <!-- 内容 -->
+      <div class="dialog_content_box" v-show="!!cameraId">
+        <div class="content_box">
+          <div class="img_box">
+            <img :src="url" v-if="url" />
+            <div class="image_slot" v-else>
+              <img
+                :src="require(`@/assets/imgs/panels/img_video@2x.png`)"
+                alt=""
+              />
+              <!-- <i class="el-icon-video-camera"></i> -->
+              <span>无信号</span>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div
+        class="dialog_content_box"
+        v-show="cameraData && !cameraId"
+        style="color: #fff"
+      >
+        <!-- 暂无数据 -->
+        <!-- <img :src="require(`@/assets/imgs/maps/video_img_${cameraData.id}.png`)" alt="" /> -->
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import Dayjs from "dayjs";
+import { mapGetters } from "vuex";
+export default {
+  name: "VideoImageWindow",
+  props: {
+    cameraId: {
+      type: String,
+      require: true,
+    },
+    cameraData: {
+      type: Object,
+      default: () => ({}),
+    },
+  },
+  computed: {
+    ...mapGetters(["rtData"]),
+  },
+  watch: {
+    cameraId: {
+      handler(id) {
+        if (!!id) {
+          this.updateEvent({ id }, true);
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+    timer: {
+      handler(newVal) {
+        this.$EventBus.$off("updateSendParamJGYT");
+        this.$EventBus.$on("updateSendParamJGYT", (data, state) => {
+          if (data.id === this.cameraData.id) {
+            this.updateEvent(data, state);
+          }
+        });
+      },
+      deep: true,
+      immediate: true,
+    },
+    rtData: {
+      handler(newVal) {
+        // console.log(newVal)
+        if (!!this.cameraData.tags) {
+          if (!!this.cameraData.dataList) {
+            this.cameraData.dataList.forEach((item) => {
+              if (!!item.tag && !!newVal[item.tag]) {
+                item.value = newVal[item.tag].value + " " + item.unit;
+              }
+              if (item.isTag && !!newVal[item.value]) {
+              }
+            });
+          }
+        }
+      },
+      deep: true,
+    },
+  },
+  data() {
+    return {
+      largeScreen: false,
+      ws: null,
+      url: "",
+      lastUrl: "",
+      // 视频控制相关 start
+      commandConfig: {
+        //视频控制开关配置
+        direction: [
+          //方向
+          { type: "top-left", name: "左上", command: 25 },
+          { type: "top", name: "上", command: 21 },
+          { type: "top-right", name: "右上", command: 26 },
+          { type: "back", name: "左", command: 23 },
+          { type: "rank", name: "中", command: 0 },
+          { type: "right", name: "右", command: 24 },
+          { type: "bottom-left", name: "左下", command: 27 },
+          { type: "bottom", name: "下", command: 22 },
+          { type: "bottom-right", name: "右下", command: 28 },
+        ],
+        zoom: [
+          //放大缩小
+          { type: "zoom-in", name: "放大", command: 11 },
+          { type: "zoom-out", name: "缩小", command: 12 },
+        ],
+      },
+      startTime: null,
+      speed: 4,
+      presetIndex: 1,
+      // 视频控制 end
+      ndValue: "0",
+      timer: new Date(),
+    };
+  },
+  beforeDestroy() {
+    this.closeHandler();
+  },
+  created() {
+    this.init(JSON.stringify({ id: this.cameraId }));
+  },
+  mounted() {
+    const ndTopic = "DataCommunication/TagData/" + this.cameraData.tags?.ndTag;
+    const _this = this;
+    this.$store.dispatch("mqtt/subscribe", {
+      topic: [ndTopic],
+      onMessage: (topic, message, packet) => {
+        // console.log(topic);
+        const content = message.toString();
+        if (topic === ndTopic) {
+          //console.log(new Date(), content);
+          const data = JSON.parse(content);
+          _this.ndValue = data.Value;
+        }
+      },
+    });
+    this.$once("hook:beforeDestroy", () => {
+      this.$store.dispatch("mqtt/unsubscribe", [ndTopic]);
+    });
+  },
+  methods: {
+    // 放大缩小
+    init(str) {
+      // this.socketList[`ws_${this.cameraId}`];
+      this.ws = new WebSocket(VUE_APP_BASE_WS() + "/VideoOverWebSocket");
+      // this.ws = new WebSocket('wss://' + window.location.host + BASE_URL + '/VideoOverWebSocket')
+      this.ws.onmessage = (evt) => {
+        if (typeof evt.data === "string") {
+          // console.log(JSON.parse(evt.data).Msg)
+        } else {
+          let _this = this;
+          // const updateUrl = _.debounce(function () {
+          let currUrl = URL.createObjectURL(evt.data);
+          if (_this.lastUrl) URL.revokeObjectURL(_this.lastUrl);
+          _this.lastUrl = currUrl;
+          _this.url = currUrl;
+          // }, 500);
+          // updateUrl();
+        }
+      };
+      this.handleSend(str);
+      // console.log(window);
+    },
+    handleSend(str) {
+      if (this.ws.readyState === WebSocket.OPEN) {
+        this.ws.send(str);
+      } else if (this.ws.readyState == WebSocket.CONNECTING) {
+        // Wait for the open event, maybe do something with promises
+        // depending on your use case. I believe in you developer!
+        this.ws.addEventListener("open", () => this.handleSend(str));
+      } else {
+        // etc.
+      }
+    },
+    updateEvent(data, state) {
+      const param = JSON.stringify(data);
+      console.log("云台控制传参内容", param, state);
+      if (this.ws && this.ws.readyState == 1) {
+        this.handleSend(param);
+      } else {
+        this.init(param);
+      }
+      if (state) {
+        setTimeout(() => {
+          this.url = "";
+          if (this.lastUrl) URL.revokeObjectURL(this.lastUrl);
+          this.lastUrl = "";
+        }, 500);
+      }
+    },
+    closeHandler() {
+      console.log("close video websocket");
+      this.ws && this.ws.close();
+      setTimeout(() => {
+        if (this.url) URL.revokeObjectURL(this.url);
+        this.url = "";
+        this.lastUrl = "";
+        this.ws &&
+          (this.ws.onclose = (evt) => {
+            // this.ws = null;
+            console.log("websocket已关闭");
+          });
+      }, 500);
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.video_container {
+  pointer-events: auto;
+  width: 100%;
+  height: 100%;
+  .dialog_box {
+    // margin-top: 10px;
+    width: 100%;
+    // height: calc(100% - 10px);
+    height: 100%;
+    border: 1px solid #39b5ff;
+
+    .dialog_content_box {
+      box-sizing: border-box;
+      width: 100%;
+      height: 100%;
+      margin: 0 auto;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .content_box {
+        width: 100%;
+        height: 100%;
+        display: flex;
+        .img_box {
+          width: 100%;
+          height: 100%;
+          &.comm_ptz {
+            width: 75%;
+          }
+        }
+      }
+
+      img {
+        width: 100%;
+        height: 100%;
+        object-fit: fill;
+        // display: block;
+      }
+      .image_slot {
+        width: 100%;
+        height: 100%;
+        // background-color: #f5f7fa;
+        color: #f5f7fa;
+        font-size: 24px;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        font-weight: 500;
+        img {
+          width: 96px;
+          height: 65px;
+        }
+        span {
+          margin-top: 10px;
+          font-family: MicrosoftYaHei;
+          font-size: 13px;
+          color: #7ea0ca;
+          letter-spacing: 1px;
+          font-weight: 400;
+        }
+      }
+    }
+  }
+}
+</style>

+ 56 - 13
src/views/components/dialog/JGYTControlDialog/index.vue

@@ -34,17 +34,18 @@
               <base-table-list :tableConfig="tableConfig" />
             </div>
           </el-col> -->
-          <el-col class="jgyt_video" :span="12">
+          <el-col class="jgyt_video" :span="10">
             <div class="select">
               <div class="select_title">
-                泄漏检测
+                激光云台
                 <el-select
                   value-key="id"
                   v-model="cameraInfo1"
                   style="width: 220px"
                   size="mini"
                   clearable
-                  placeholder="请选择摄像头"
+                  placeholder="请选择"
+                  @change="setCamera($event)"
                 >
                   <el-option
                     v-for="item in cameraList"
@@ -80,17 +81,18 @@
               </div>
             </div>
           </el-col>
-          <el-col class="jgyt_video" :span="12">
+          <el-col class="jgyt_video" :span="10">
             <div class="select">
               <div class="select_title">
-                泄漏检测
+                可操作激光云台
                 <el-select
                   value-key="id"
                   v-model="cameraInfo2"
                   style="width: 220px"
                   size="mini"
                   clearable
-                  placeholder="请选择摄像头"
+                  placeholder="请选择"
+                  @change="setCamera($event)"
                 >
                   <el-option
                     v-for="item in cameraList"
@@ -126,9 +128,30 @@
               </div>
             </div>
           </el-col>
-          <!-- <el-col :span="4">
+          <el-col :span="4">
+            <!-- <div class="select">
+              <div class="select_title">
+                当前设备
+                <el-select
+                  value-key="id"
+                  v-model="cameraInfo"
+                  style="width: 120px"
+                  size="mini"
+                  clearable
+                  placeholder="请选择"
+                  @change="setCamera($event)"
+                >
+                  <el-option
+                    v-for="item in cameraList"
+                    :key="item.id"
+                    :value="item"
+                    :label="item.name"
+                  ></el-option>
+                </el-select>
+              </div>
+            </div> -->
             <video-control :curVideoData="cameraInfo" />
-          </el-col> -->
+          </el-col>
         </el-row>
         <el-row :key="refreshKey">
           <el-col :span="24">
@@ -151,7 +174,7 @@
 import Vue from "vue";
 import BaseTableList from "@/views/components/base/BaseTableList";
 import BaseDragBgDialog from "@/views/components/base/BaseDragBgDialog.vue";
-import VideoImageWindow from "@/views/components/dialog/VideoImageWindow.vue";
+import VideoImageWindow from "./VideoImageWindow.vue";
 import { dealAlarm } from "@/API/common";
 import { getDepartmentByPid } from "@/API/alarm";
 import { getJGYTList, getJGYTAlarmList } from "@/API/JGYT";
@@ -172,6 +195,7 @@ export default {
         this.baseDialogConfig.show = newVal;
         if (newVal) {
           this.filterInfo();
+          this.cameraInfo = { id: "1" };
         }
       },
       // deep: true,
@@ -221,8 +245,8 @@ export default {
       baseDialogConfig: {
         dialogId: "jgytControlDialog",
         show: false,
-        title: "泄漏检测",
-        width: 1250,
+        title: "激光云台",
+        width: 1400,
         height: 724,
         center: true,
         zIndex: 10,
@@ -264,6 +288,9 @@ export default {
       cameraList: [{ id: "1", name: "" }],
       jgyt1: {},
       jgyt2: {},
+      cameraInfo: {
+        id: "1",
+      },
       cameraInfo1: {
         id: "1",
       },
@@ -278,8 +305,10 @@ export default {
     };
   },
   created() {
-    this.initJGYTList("");
-    this.initJGYTAlarmList("");
+    if (localStorage.getItem("token") !== null) {
+      this.initJGYTList("");
+      this.initJGYTAlarmList("");
+    }
     // this.getDepartmentByPid();
     // this.tableConfig.tableData = this.dataList;
     // this.recordTableConfig.tableData = this.recordList;
@@ -290,6 +319,10 @@ export default {
   },
   mounted() {},
   methods: {
+    setCamera(e) {
+      console.log("当前设备", e);
+      this.cameraInfo = e;
+    },
     refresh() {
       this.refreshKey++;
     },
@@ -312,6 +345,7 @@ export default {
           setTimeout(() => {
             this.cameraInfo1 = this.cameraList[0];
             this.cameraInfo2 = this.cameraList[this.cameraList.length - 1];
+            this.cameraInfo = this.cameraList[this.cameraList.length - 1];
           }, 300);
         }
         // console.log("激光云台摄像头列表",this.cameraList,this.cameraInfo1,this.cameraInfo2);
@@ -499,6 +533,15 @@ export default {
     .select_title {
       padding: 6px 6px 6px 16px;
     }
+    .select {
+      text-align: left;
+      font-size: 0.083333rem /* 16/192 */;
+      line-height: 30px /* 50/192 */;
+      color: #fff;
+      .select_title {
+        padding: 6px;
+      }
+    }
   }
   .jgyt_video {
     padding-left: 10px;

+ 320 - 0
src/views/components/dialog/PipeMileageDialog/DateTimeBar.vue

@@ -0,0 +1,320 @@
+<template>
+  <div :id="baseConfig.ids" :style="{ width: width, height: height }"></div>
+</template>
+<script>
+import resize from "@/views/components/chart/resize";
+export default {
+  props: {
+    data: {
+      default: () => ({
+        date: [],
+        seriesData: [],
+        chartType: "",
+        limitNumber: 30,
+      }),
+    },
+    width: {
+      type: String,
+      default: "100%",
+    },
+    height: {
+      type: String,
+      default: "100%",
+    },
+    baseConfig: {
+      default: function () {
+        return {
+          ids: "EchartsBar",
+          title: "",
+          unit: "人",
+        };
+      },
+    },
+  },
+  mixins: [resize],
+  data() {
+    return {
+      chart: null,
+      colorConfig: [
+        {
+          name: "人员报警",
+          code: "100001",
+          color: "#FF83DF",
+        },
+        {
+          name: "周界报警",
+          code: "100002",
+          color: "#8023FF",
+        },
+        {
+          name: "火灾报警",
+          code: "100003",
+          color: "#00ACFF",
+        },
+        {
+          name: "门禁报警",
+          code: "100006",
+          color: "#39CD1A",
+        },
+        {
+          name: "生产报警",
+          code: "100010",
+          color: "#F8E71C",
+        },
+        {
+          name: "阴保报警",
+          code: "100011",
+          color: "#EC576A",
+        },
+      ],
+      colors: [
+        "#FF83DF",
+        "#8023FF",
+        "#0064FF",
+        "#00ACFF",
+        "#50E3C2",
+        "#39CD1A",
+        "#B8E986",
+        "#F8E71C",
+        "#FF9F00",
+        "#EC576A",
+      ],
+      dataZoomMix: 0,
+      chartType: "line",
+    };
+  },
+  mounted() {
+    this.drawChart();
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return;
+    }
+    this.chart.dispose();
+    this.chart = null;
+  },
+  watch: {
+    data: {
+      //深度监听,可监听到对象、数组的变化
+      handler(newVal) {
+        let length = newVal.date.length;
+        //显示数据数量
+        if (newVal.limitNumber === 0) {
+          this.dataZoomMix = 0;
+        } else {
+          if (length > newVal.limitNumber) {
+            this.dataZoomMix = (1 - newVal.limitNumber / length) * 100;
+          } else {
+            this.dataZoomMix = 0;
+          }
+        }
+        //默认图表类型
+        if (newVal.chartType || newVal.chartType === "") {
+          this.chartType = "bar";
+        } else {
+          this.chartType = "line";
+        }
+        // console.log(this.dataZoomMix);
+        this.$nextTick(() => {
+          this.chart.clear();
+          this.drawChart();
+        });
+      },
+      deep: true,
+    },
+  },
+  methods: {
+    drawChart() {
+      //$("#你的画布名称").removeAttr("_echarts_instance_").empty()
+      this.chart = this.$echarts.init(
+        document.getElementById(this.baseConfig.ids)
+      );
+      this.chart.off("click");
+      let option = {
+        title: {
+          show: false,
+        },
+        grid: {
+          left: "5%",
+          right: "5%",
+          top: "10%",
+          bottom: "15%",
+          containLabel: true,
+        },
+        toolbox: {
+          feature: {
+            // magicType: {
+            //   show: true,
+            //   type: ["line", "bar"],
+            // },
+            // restore: { show: true },
+            // saveAsImage: { show: true },
+            myTool1: {
+              show: true,
+              title: "切换折线图",
+              icon: "path://M193.422222 648.533333l-45.511111-45.511111L398.222222 358.4l199.111111 199.111111 347.022223-352.711111 45.511111 45.511111-392.533334 386.844445L398.222222 438.044444z",
+              onclick: () => {
+                this.chartType = "line";
+                this.chart.clear();
+                this.drawChart();
+              },
+            },
+            myTool2: {
+              show: true,
+              title: "切换柱状图",
+              icon: "path://M194.56 386.048q31.744 0 46.592 19.456t14.848 43.008l0 447.488-192.512 0 0-443.392q0-31.744 19.968-49.152t43.52-17.408l67.584 0zM514.048 134.144q27.648 0 44.032 16.896t16.384 40.448l0 704.512-191.488 0 0-702.464q0-15.36 6.144-26.624t15.36-18.432 20.48-10.752 20.48-3.584l68.608 0zM832.512 577.536q9.216 0 19.968 5.12t20.48 14.336 16.384 20.992 6.656 25.088l0 252.928-191.488 0 0-250.88q0-11.264 4.608-23.552t12.8-22.016 19.456-15.872 24.576-6.144l66.56 0z",
+              onclick: () => {
+                this.chartType = "bar";
+                this.chart.clear();
+                this.drawChart();
+              },
+            },
+          },
+          iconStyle: {
+            borderColor: "#fff",
+          },
+          emphasis: {
+            iconStyle: {
+              borderColor: "#409EFF",
+            },
+          },
+        },
+        dataZoom: [
+          {
+            show: true,
+            start: this.dataZoomMix,
+            end: 100,
+            height: 20,
+            bottom: 2,
+            textStyle: {
+              color: "#fff",
+            },
+          },
+        ],
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "line",
+            lineStyle: {
+              type: "dashed",
+            },
+          },
+          padding: 10,
+          textStyle: {
+            fontSize: 12,
+          },
+        },
+        color: [
+          "#00ACFF",
+          "#FF83DF",
+          "#8023FF",
+          "#0064FF",
+          "#50E3C2",
+          "#39CD1A",
+          "#B8E986",
+          "#F8E71C",
+          "#FF9F00",
+          "#EC576A",
+        ],
+        legend: {
+          top: 2,
+          itemWidth: 24,
+          textStyle: {
+            color: "#fff",
+          },
+        },
+        xAxis: [
+          {
+            name:"里程(km)",
+            type: "category",
+            data: this.data.date,
+            axisLabel: {
+              textStyle: {
+                color: "#fff",
+              },
+              margin: 10,
+              // interval: 0,
+            },
+            axisTick: {
+              show: true,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#99FFFA",
+              },
+            },
+          },
+        ],
+        yAxis: {
+          name:"高程(m)",
+          axisTick: {
+            show: true,
+          },
+          axisLabel: {
+            textStyle: {
+              color: "#fff",
+            },
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: "#99FFFA",
+            },
+          },
+          splitLine: {
+            show: false,
+            // interval: 4,
+          },
+          minInterval: 1,
+          boundaryGap: [0, "5%"],
+        },
+        series: this.data.seriesData.map((item, index) => {
+          if (this.chartType === "bar") {
+            return {
+              name: item.name,
+              stack: "total",
+              type: this.chartType,
+              barMaxWidth: 30,
+              itemStyle: {
+                normal: {
+                  opacity: 0.8,
+                },
+                emphasis: {
+                  opacity: 1,
+                },
+              },
+              data: item.data,
+              markPoint: {
+                data: item.markPointData,
+              },
+            };
+          } else {
+            return {
+              name: item.name,
+              type: this.chartType,
+              itemStyle: {
+                normal: {
+                  opacity: 0.8,
+                },
+                emphasis: {
+                  opacity: 1,
+                },
+              },
+              data: item.data,
+              markPoint: {
+                data: item.markPointData,
+              },
+            };
+          }
+        }),
+      };
+      // this.chart.clear();
+      this.chart.setOption(option);
+      this.chart.on("click", (params) => {
+        this.$emit("handleChartClick", params);
+      });
+    },
+  },
+};
+</script>

+ 5 - 3
src/views/components/dialog/PipeMileageDialog.vue → src/views/components/dialog/PipeMileageDialog/index.vue

@@ -32,7 +32,7 @@
 <script>
 import BaseDragBgDialog from "@/views/components/base/BaseDragBgDialog.vue";
 import { getMileageList } from "@/API/report";
-import { DateTimeBar } from "@/views/components/chart";
+import DateTimeBar from "./DateTimeBar";
 import { mapGetters } from "vuex";
 export default {
   name: "PipeMileageDialog",
@@ -41,7 +41,7 @@ export default {
     "pipeMileageDialog.show": {
       handler(newVal) {
         this.baseDialogConfig.show = newVal;
-        if (this.statisticData.date.length == 0) {
+        if (newVal && this.statisticData.date.length == 0) {
           this.getMileageList();
         }
         // if (newVal) {
@@ -84,7 +84,9 @@ export default {
   },
   created() {},
   mounted() {
-    this.getMileageList();
+    if (localStorage.getItem("token") !== null) {
+      this.getMileageList();
+    }
   },
   methods: {
     closeDialog() {

+ 4 - 2
src/views/components/dialog/SoundDialog/index.vue

@@ -232,8 +232,10 @@ export default {
     };
   },
   created() {
-    this.initSoundList();
-    this.getCameraList();
+    if (localStorage.getItem("token") !== null) {
+      this.initSoundList();
+      this.getCameraList();
+    }
     // this.getDepartmentByPid();
     this.departmentOptions = GY_STATIONS.filter((e) => e.id !== "");
   },

+ 104 - 0
src/views/components/dialog/VoiceCallDialog/Dialer.vue

@@ -13,6 +13,7 @@
       >
         {{ number }}
       </el-button>
+      <audio v-show="false" controls autoplay="autoplay" id="audioCtl"></audio>
     </div>
     <!-- 语音输入按钮 -->
     <el-button type="info" @click="startVoiceInput"> 语音输入 </el-button>
@@ -35,11 +36,23 @@ export default {
   },
   data() {
     return {
+      id: this.generateGuid(),
+      baseUrl: "api/webrtc/",
+      pc: null,
       // 拨号盘上的数字和符号
       numbers: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#"],
     };
   },
   computed: {
+    getOfferUrl() {
+      return `${this.baseUrl}getoffer?id=${this.id}`;
+    },
+    setAnswerUrl() {
+      return `${this.baseUrl}setanswer?id=${this.id}`;
+    },
+    setIceCandidateUrl() {
+      return `${this.baseUrl}addicecandidate?id=${this.id}`;
+    },
     currentPhoneNumber: {
       get() {
         return this.phoneNumber;
@@ -60,10 +73,14 @@ export default {
     callNumber() {
       if (this.currentPhoneNumber) {
         alert(`正在拨打号码: ${this.currentPhoneNumber}`);
+        this.start();
       } else {
         alert("请输入电话号码");
       }
     },
+    downNumber() {
+      this.closePeer();
+    },
     startVoiceInput() {
       const recognition = new (window.SpeechRecognition ||
         window.webkitSpeechRecognition)();
@@ -75,6 +92,93 @@ export default {
       };
       recognition.start();
     },
+
+    generateGuid() {
+      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
+        /[xy]/g,
+        function (c) {
+          var r = (Math.random() * 16) | 0,
+            v = c == "x" ? r : (r & 0x3) | 0x8;
+          return v.toString(16);
+        }
+      );
+    },
+    async start() {
+      this.closePeer();
+
+      let videoControl = document.querySelector("#audioCtl");
+
+      const localStream = await navigator.mediaDevices.getUserMedia({
+        video: false,
+        audio: true,
+      });
+      videoControl.srcObject = localStream;
+
+      this.pc = new RTCPeerConnection(null);
+
+      localStream.getTracks().forEach((track) => {
+        console.log("add local track " + track.kind + " to peer connection.");
+        console.log(track);
+        this.pc.addTrack(track, localStream);
+      });
+
+      this.pc.onicegatheringstatechange = function () {
+        console.log("onicegatheringstatechange: " + this.pc.iceGatheringState);
+      }.bind(this);
+
+      this.pc.oniceconnectionstatechange = function () {
+        console.log(
+          "oniceconnectionstatechange: " + this.pc.iceConnectionState
+        );
+      }.bind(this);
+
+      this.pc.onsignalingstatechange = function () {
+        console.log("onsignalingstatechange: " + this.pc.signalingState);
+      }.bind(this);
+
+      this.pc.onicecandidate = async function (event) {
+        if (event.candidate) {
+          console.log("new-ice-candidate:");
+          console.log(event.candidate.candidate);
+          console.log(event.candidate);
+          await fetch(this.setIceCandidateUrl, {
+            method: "POST",
+            body: JSON.stringify(event.candidate),
+            headers: { "Content-Type": "application/json" },
+          });
+        }
+      }.bind(this);
+
+      let offerResponse = await fetch(this.getOfferUrl);
+      let offer = await offerResponse.json();
+      console.log("got offer: " + offer.type + " " + offer.sdp + ".");
+      await this.pc.setRemoteDescription(offer);
+
+      this.pc
+        .createAnswer()
+        .then(
+          function (answer) {
+            return this.pc.setLocalDescription(answer);
+          }.bind(this)
+        )
+        .then(
+          async function () {
+            console.log("Sending answer SDP.");
+            console.log("SDP: " + this.pc.localDescription.sdp);
+            await fetch(this.setAnswerUrl, {
+              method: "POST",
+              body: JSON.stringify(this.pc.localDescription),
+              headers: { "Content-Type": "application/json" },
+            });
+          }.bind(this)
+        );
+    },
+    closePeer() {
+      if (this.pc != null) {
+        console.log("close peer");
+        this.pc.close();
+      }
+    },
   },
 };
 </script>

+ 5 - 3
src/views/components/dialog/VoiceCallDialog/index.vue

@@ -50,7 +50,9 @@ export default {
     "voiceCallDialog.show": {
       handler(newVal) {
         this.baseDialogConfig.show = newVal;
-        this.init();
+        if (newVal && localStorage.getItem("token") !== null) {
+          this.init();
+        }
       },
       // deep: true,
       immediate: true,
@@ -63,7 +65,7 @@ export default {
       baseDialogConfig: {
         dialogId: "VoiceCall",
         show: false,
-        title: "语音通话",
+        title: "语音交换对讲系统",
         width: 800,
         height: 510,
         center: true,
@@ -94,7 +96,7 @@ export default {
   methods: {
     async init() {
       try {
-        const res = await getPersonList({});
+        const res = await getPersonList({ type: "255022541838691649" });
         if (res.code === 20000) {
           this.tableConfig.tableData = res.data.content.filter((item) => {
             return item.telephone && item.telephone.length > 0;

+ 13 - 3
src/views/components/emergency/CardListDialog.vue

@@ -10,10 +10,18 @@
   >
     <div slot="title" class="dialog-title">
       <span class="title-text">应急处置卡列表</span>
-      <img :src="require('@/assets/imgs/icons/icon_close@2x.png')" @click="handleClose" />
+      <img
+        :src="require('@/assets/imgs/icons/icon_close@2x.png')"
+        @click="handleClose"
+      />
     </div>
     <div class="list-container">
-      <div class="list-item" v-for="item of cardList" :key="item.id" @click="clickRow(item)">
+      <div
+        class="list-item"
+        v-for="item of cardList"
+        :key="item.id"
+        @click="clickRow(item)"
+      >
         <span>{{ item.sort }}、</span>
         <span>{{ item.name }}</span>
       </div>
@@ -49,7 +57,9 @@ export default {
     },
   },
   created() {
-    this.getCartList();
+    if (localStorage.getItem("token") !== null) {
+      this.getCartList();
+    }
   },
   methods: {
     async getCartList() {

+ 6 - 2
src/views/components/emergency/ContactInfoDialog.vue

@@ -217,7 +217,9 @@ export default {
     topNavActive: {
       handler(newVal) {
         this.show = newVal.includes("应急通讯录");
-        this.getContactList();
+        if (this.show) {
+          this.getContactList();
+        }
       },
       deep: true,
     },
@@ -226,7 +228,9 @@ export default {
     this.info = HOME_DATA;
   },
   created() {
-    this.getContactList();
+    if (localStorage.getItem("token") !== null) {
+      this.getContactList();
+    }
   },
   methods: {
     async getContactList() {

+ 3 - 3
src/views/stationMap/components/AlarmStatisticsPanel/statisticsChart.vue

@@ -33,9 +33,9 @@ export default {
       chart: null,
       // color: ['rgba(143,223,254,0.4)', 'rgba(0,168,255,0.4)'],
       colorConfig: [
-        { code: "100001", name: "人员报警", color: "#F81C1C" },
-        { code: "100002", name: "周界防护", color: "#F8E71C" },
-        { code: "100003", name: "火灾报警", color: "#1fb9ff" },
+        { code: "100001", name: "人员定位", color: "#F81C1C" },
+        { code: "100002", name: "周界入侵", color: "#F8E71C" },
+        { code: "100003", name: "火灾监测", color: "#1fb9ff" },
       ],
     };
   },

+ 3 - 3
src/views/stationMapTKT/components/TypeStatistics/PieChart.vue

@@ -33,9 +33,9 @@ export default {
       chart: null,
       // color: ['rgba(143,223,254,0.4)', 'rgba(0,168,255,0.4)'],
       colorConfig: [
-        { code: '100001', name: '人员报警', color: '#FFD552' },
-        { code: '100002', name: '周界防护', color: '#02F2F9' },
-        { code: '100003', name: '火灾报警', color: '#007DFF' },
+        { code: '100001', name: '人员定位', color: '#FFD552' },
+        { code: '100002', name: '周界入侵', color: '#02F2F9' },
+        { code: '100003', name: '火灾监测', color: '#007DFF' },
       ],
       colors: [
         '#FF83DF',

+ 1 - 0
src/views/videoMonitorType/components/VideoConfig.vue

@@ -109,6 +109,7 @@ export default {
     'configOptions.splitScreenType': {
       handler(val) {
         console.log(val)
+        console.log("云台控制相关数据",this.configOptions)
         this.$nextTick(() => {
           setTimeout(() => {
             const data = this.screenConfig.find(item => item.type === val)

+ 124 - 44
src/views/videoMonitorType/components/VideoControl.vue

@@ -1,37 +1,107 @@
 <template>
   <div class="videoControl-container">
     <div class="comm-panel">
-      <div class="btn-box" v-for="item of commandConfig.direction" :key="item.type">
-        <el-button type="primary" :icon="`el-icon-${item.type}`" size="mini" @mousedown.native="changePtzCommParam(item.command, false)" @mouseup.native="changePtzCommParam(item.command, true)"></el-button>
+      <div
+        class="btn-box"
+        v-for="item of commandConfig.direction"
+        :key="item.type"
+      >
+        <el-button
+          type="primary"
+          :icon="`el-icon-${item.type}`"
+          size="mini"
+          @mousedown.native="changePtzCommParam(item.command, false)"
+          @mouseup.native="changePtzCommParam(item.command, true)"
+        ></el-button>
       </div>
     </div>
     <div class="zoom-panel">
       <div class="btn-box" v-for="item of commandConfig.zoom" :key="item.type">
-        <el-button type="primary" :icon="`el-icon-${item.type}`" size="mini" @mousedown.native="changePtzCommParam(item.command, false)" @mouseup.native="changePtzCommParam(item.command, true)"></el-button>
+        <el-button
+          type="primary"
+          :icon="`el-icon-${item.type}`"
+          size="mini"
+          @mousedown.native="changePtzCommParam(item.command, false)"
+          @mouseup.native="changePtzCommParam(item.command, true)"
+        ></el-button>
       </div>
     </div>
     <div class="form_box">
       <el-form label-width="70px" size="small">
         <el-form-item label="速度" prop="speed">
-          <el-select class="myInput" size="mini" v-model="speed" placeholder="请选择速度" style="width: 100%">
-            <el-option v-for="item in Array.from({ length: 10 }, (item, index) => index + 1)" :key="item" :label="item" :value="item"></el-option>
+          <el-select
+            class="myInput"
+            size="mini"
+            v-model="speed"
+            placeholder="请选择速度"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in Array.from(
+                { length: 10 },
+                (item, index) => index + 1
+              )"
+              :key="item"
+              :label="item"
+              :value="item"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="预置点" prop="presetIndex">
-          <el-select class="myInput" size="mini" v-model="presetIndex" placeholder="请选择预置点" style="width: 100%">
-            <el-option v-for="item in Array.from({ length: 255 }, (item, index) => index + 1)" :key="item" :label="item" :value="item"></el-option>
+          <el-select
+            class="myInput"
+            size="mini"
+            v-model="presetIndex"
+            placeholder="请选择预置点"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in Array.from(
+                { length: 255 },
+                (item, index) => index + 1
+              )"
+              :key="item"
+              :label="item"
+              :value="item"
+            ></el-option>
           </el-select>
         </el-form-item>
         <div class="btn_box">
-          <el-button type="primary" size="mini" @click="changePtzPresetParam(8)">设置</el-button>
-          <el-button type="primary" size="mini" @click="changePtzPresetParam(39)">转到</el-button>
+          <el-button type="primary" size="mini" @click="changePtzPresetParam(8)"
+            >设置</el-button
+          >
+          <el-button
+            type="primary"
+            size="mini"
+            @click="changePtzPresetParam(39)"
+            >转到</el-button
+          >
         </div>
         <el-form-item label="时间" prop="startTime">
-          <el-date-picker class="myInput" size="mini" v-model="startTime" type="datetime" placeholder="选择日期时间" style="width: 100%"></el-date-picker>
+          <el-date-picker
+            class="myInput"
+            size="mini"
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width: 100%"
+          ></el-date-picker>
         </el-form-item>
         <div class="btn_box">
-          <el-button type="primary" size="mini" @click="changePlayTypeParam(true)" :disabled="!startTime">回放</el-button>
-          <el-button type="primary" size="mini" @click="changePlayTypeParam(false)" :disabled="!startTime">实时</el-button>
+          <el-button
+            type="primary"
+            size="mini"
+            @click="changePlayTypeParam(true)"
+            :disabled="!startTime"
+            >回放</el-button
+          >
+          <el-button
+            type="primary"
+            size="mini"
+            @click="changePlayTypeParam(false)"
+            :disabled="!startTime"
+            >实时</el-button
+          >
         </div>
       </el-form>
     </div>
@@ -39,9 +109,9 @@
 </template>
 
 <script>
-import Dayjs from 'dayjs'
+import Dayjs from "dayjs";
 export default {
-  name: 'VideoControl',
+  name: "VideoControl",
   props: {
     curVideoData: {
       type: Object,
@@ -56,35 +126,39 @@ export default {
         //视频控制开关配置
         direction: [
           //方向
-          { type: 'top-left', name: '左上', command: 25 },
-          { type: 'top', name: '上', command: 21 },
-          { type: 'top-right', name: '右上', command: 26 },
-          { type: 'back', name: '左', command: 23 },
-          { type: 'rank', name: '中', command: 0 },
-          { type: 'right', name: '右', command: 24 },
-          { type: 'bottom-left', name: '左下', command: 27 },
-          { type: 'bottom', name: '下', command: 22 },
-          { type: 'bottom-right', name: '右下', command: 28 },
+          { type: "top-left", name: "左上", command: 25 },
+          { type: "top", name: "上", command: 21 },
+          { type: "top-right", name: "右上", command: 26 },
+          { type: "back", name: "左", command: 23 },
+          { type: "rank", name: "中", command: 0 },
+          { type: "right", name: "右", command: 24 },
+          { type: "bottom-left", name: "左下", command: 27 },
+          { type: "bottom", name: "下", command: 22 },
+          { type: "bottom-right", name: "右下", command: 28 },
         ],
         zoom: [
           //放大缩小
-          { type: 'zoom-in', name: '放大', command: 11 },
-          { type: 'zoom-out', name: '缩小', command: 12 },
+          { type: "zoom-in", name: "放大", command: 11 },
+          { type: "zoom-out", name: "缩小", command: 12 },
         ],
       },
       startTime: null,
       speed: 5,
       presetIndex: 1,
       // 视频控制 end
-    }
+    };
   },
   mounted() {},
   methods: {
     changePtzCommParam(comm, stop) {
-      if (!comm) return
+      if (!comm) return;
       if (!this.curVideoData.id) {
-        stop && this.$message.warning('请先选择视频窗口!')
-        return
+        stop && this.$message.warning("请先选择视频窗口!");
+        return;
+      }
+      if (!this.curVideoData.ptzEnable) {
+        stop && this.$message.warning("该视频不支持或未开启云台功能!");
+        return;
       }
       let param = {
         id: this.curVideoData.id,
@@ -92,43 +166,49 @@ export default {
         ptzStop: stop,
         ptzSpeed: this.speed,
         canControl: this.curVideoData.ptzEnable,
-      }
-      this.$EventBus.$emit('updateSendParam', param)
+      };
+      this.$EventBus.$emit("updateSendParam", param);
     },
     changePtzPresetParam(comm) {
-      if (!comm) return
+      if (!comm) return;
       if (!this.curVideoData.id) {
-        this.$message.warning('请先选择视频窗口!')
-        return
+        this.$message.warning("请先选择视频窗口!");
+        return;
+      }
+      if (!this.curVideoData.ptzEnable) {
+        stop && this.$message.warning("该视频不支持或未开启云台功能!");
+        return;
       }
       let param = {
         id: this.curVideoData.id,
         ptzPreset: comm,
         ptzPresetIndex: this.presetIndex,
         canControl: this.curVideoData.ptzEnable,
-      }
-      this.$EventBus.$emit('updateSendParam', param)
+      };
+      this.$EventBus.$emit("updateSendParam", param);
     },
     /**
      * state  true代表回放模式
      */
     changePlayTypeParam(state) {
-      let param = { id: this.curVideoData.id }
+      let param = { id: this.curVideoData.id };
       if (!this.curVideoData.id) {
-        this.$message.warning('请先选择视频窗口!')
-        return
+        this.$message.warning("请先选择视频窗口!");
+        return;
       }
       if (state) {
         if (!this.startTime) {
-          this.$message.warning('请选择回放开始时间!')
-          return
+          this.$message.warning("请选择回放开始时间!");
+          return;
         }
-        param['startTime'] = Dayjs(this.startTime).format('YYYY-MM-DD HH:mm:ss')
+        param["startTime"] = Dayjs(this.startTime).format(
+          "YYYY-MM-DD HH:mm:ss"
+        );
       }
-      this.$EventBus.$emit('updateSendParam', param, true)
+      this.$EventBus.$emit("updateSendParam", param, true);
     },
   },
-}
+};
 </script>
 <style lang="less" scoped>
 .videoControl-container {