AaronBruin hai 1 mes
pai
achega
657615559b
Modificáronse 93 ficheiros con 1012 adicións e 779 borrados
  1. BIN=BIN
      dist.zip
  2. 2 1
      src/api/home.js
  3. 1 1
      src/api/login.js
  4. 3 1
      src/api/system/access.js
  5. 3 1
      src/api/system/airconditioner.js
  6. 3 1
      src/api/system/broadcast.js
  7. 3 1
      src/api/system/building.js
  8. 3 1
      src/api/system/elevator.js
  9. 3 1
      src/api/system/endpoint.js
  10. 3 1
      src/api/system/energy.js
  11. 3 1
      src/api/system/illuminating.js
  12. 3 1
      src/api/system/information.js
  13. 3 1
      src/api/system/invade.js
  14. 3 1
      src/api/system/meeting.js
  15. 3 1
      src/api/system/monitor.js
  16. 3 1
      src/api/system/passageway.js
  17. 3 1
      src/api/system/passenger.js
  18. 3 1
      src/api/system/tenement.js
  19. 3 1
      src/api/system/visitor.js
  20. 46 25
      src/layout/components/AppMain.vue
  21. 68 68
      src/layout/components/Sidebar/mockData.js
  22. 2 2
      src/utils/request.js
  23. 0 1
      src/views/index/reightDesk.vue
  24. 0 1
      src/views/system/airConditioner/index.vue
  25. 2 2
      src/views/system/airConditioner/modules/blowingIn.vue
  26. 2 2
      src/views/system/airConditioner/modules/consume.vue
  27. 26 15
      src/views/system/airConditioner/modules/energy.vue
  28. 7 2
      src/views/system/airConditioner/modules/running.vue
  29. 8 3
      src/views/system/airConditioner/modules/temperatureTrend.vue
  30. 3 1
      src/views/system/broadcast/modules/deviceList.vue
  31. 3 1
      src/views/system/broadcast/modules/eventList.vue
  32. 5 2
      src/views/system/broadcast/modules/sameDay.vue
  33. 11 4
      src/views/system/broadcast/modules/tiring.vue
  34. 3 1
      src/views/system/building/equipment.vue
  35. 3 1
      src/views/system/building/groupControl.vue
  36. 3 1
      src/views/system/building/incident.vue
  37. 26 15
      src/views/system/dynamicEnvironment/modules/blowingIn.vue
  38. 19 12
      src/views/system/dynamicEnvironment/modules/deviceList.vue
  39. 25 13
      src/views/system/dynamicEnvironment/modules/energy.vue
  40. 27 15
      src/views/system/dynamicEnvironment/modules/temperatureTrend.vue
  41. 49 10
      src/views/system/elevator/modules/consume.vue
  42. 11 5
      src/views/system/elevator/modules/running.vue
  43. 3 1
      src/views/system/entranceguard/equipment.vue
  44. 14 2
      src/views/system/entranceguard/index.vue
  45. 3 1
      src/views/system/entranceguard/inform.vue
  46. 17 10
      src/views/system/fireAlarm/modules/deviceList.vue
  47. 10 4
      src/views/system/fireAlarm/modules/eventList.vue
  48. 27 16
      src/views/system/fireAlarm/modules/running.vue
  49. 9 4
      src/views/system/fireAlarm/modules/switchAll.vue
  50. 13 3
      src/views/system/floodlighting/index.vue
  51. 17 10
      src/views/system/floodlighting/modules/deviceList.vue
  52. 12 22
      src/views/system/floodlighting/modules/eventList.vue
  53. 9 9
      src/views/system/floodlighting/modules/running.vue
  54. 34 95
      src/views/system/floodlighting/modules/switchAll.vue
  55. 3 1
      src/views/system/inspection/point.vue
  56. 3 1
      src/views/system/inspection/polling.vue
  57. 3 1
      src/views/system/intruderalarm/alarm.vue
  58. 3 1
      src/views/system/intruderalarm/inspection.vue
  59. 1 0
      src/views/system/lighting/index.vue
  60. 4 2
      src/views/system/lighting/modules/deviceList.vue
  61. 3 1
      src/views/system/lighting/modules/eventList.vue
  62. 3 1
      src/views/system/message/modules/carbonEmission.vue
  63. 3 1
      src/views/system/message/modules/sameDay.vue
  64. 0 1
      src/views/system/message/modules/tiring.vue
  65. 3 1
      src/views/system/passageway/access.vue
  66. 2 2
      src/views/system/passageway/index.vue
  67. 3 1
      src/views/system/passengerFlow/incident.vue
  68. 1 2
      src/views/system/passengerFlow/index.vue
  69. 130 117
      src/views/system/passengerFlow/monitoring.vue
  70. 13 3
      src/views/system/sceneLighting/index.vue
  71. 17 10
      src/views/system/sceneLighting/modules/deviceList.vue
  72. 12 22
      src/views/system/sceneLighting/modules/eventList.vue
  73. 9 9
      src/views/system/sceneLighting/modules/running.vue
  74. 34 95
      src/views/system/sceneLighting/modules/switchAll.vue
  75. 33 23
      src/views/system/tenement/modules/carbonEmission.vue
  76. 3 1
      src/views/system/tenement/modules/eventList.vue
  77. 30 19
      src/views/system/tenement/modules/sameDay.vue
  78. 3 1
      src/views/system/tenement/modules/tiring.vue
  79. 3 1
      src/views/system/video/modules/eventList.vue
  80. 7 5
      src/views/system/video/modules/running.vue
  81. 3 4
      src/views/system/visitor/index.vue
  82. 3 1
      src/views/system/visitor/register.vue
  83. 3 1
      src/views/system/visitor/swiping.vue
  84. 16 6
      src/views/system/visitor/transit.vue
  85. 27 16
      src/views/system/wastewater/modules/blowingIn.vue
  86. 2 2
      src/views/system/wastewater/modules/consume.vue
  87. 7 2
      src/views/system/wastewater/modules/malfunction.vue
  88. 7 2
      src/views/system/wastewater/modules/running.vue
  89. 26 15
      src/views/system/wirelessIntercom/modules/blowingIn.vue
  90. 2 2
      src/views/system/wirelessIntercom/modules/consume.vue
  91. 8 3
      src/views/system/wirelessIntercom/modules/malfunction.vue
  92. 8 3
      src/views/system/wirelessIntercom/modules/running.vue
  93. 3 3
      vite.config.js

BIN=BIN
dist.zip


+ 2 - 1
src/api/home.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询会议统计数据
 export function getHome(query) {

+ 1 - 1
src/api/login.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-const Url = "http://182.43.195.17:8010"
+const Url = "./devApi"
 // 登录方法
 export function login(username, password, code, uuid) {
   const data = {

+ 3 - 1
src/api/system/access.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询门禁系统统计数据
 export function getAccess(query) {

+ 3 - 1
src/api/system/airconditioner.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询出入口统计数据
 export function getTemperature(query) {

+ 3 - 1
src/api/system/broadcast.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询会议统计数据
 export function getBroadcast(query) {

+ 3 - 1
src/api/system/building.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询楼宇自控统计数据
 export function getIntell(query) {

+ 3 - 1
src/api/system/elevator.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询会议统计数据
 export function getElevator(query) {

+ 3 - 1
src/api/system/endpoint.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询电子巡查统计数据
 export function getEndpoint(query) {

+ 3 - 1
src/api/system/energy.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询能源系统统计数据
 export function getEnergy(query) {

+ 3 - 1
src/api/system/illuminating.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询照明系统统计数据
 export function getIlluminating(query) {

+ 3 - 1
src/api/system/information.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询信息发布统计数据
 export function getInformation(query) {

+ 3 - 1
src/api/system/invade.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询入侵报警统计数据
 export function getInvade(query) {

+ 3 - 1
src/api/system/meeting.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询会议统计数据
 export function getDataAnalysis(query) {

+ 3 - 1
src/api/system/monitor.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询视频系统统计数据
 export function getHikvision(query) {

+ 3 - 1
src/api/system/passageway.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询出入口统计数据
 export function getAccess(query) {

+ 3 - 1
src/api/system/passenger.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询客流统计数据
 export function getPassenger(query) {

+ 3 - 1
src/api/system/tenement.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询物业统计数据
 export function getProperty(query) {

+ 3 - 1
src/api/system/visitor.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-const Url = "http://182.43.247.65:8000"
+
+// const Url = "http://182.43.247.65:8000"
+const Url = "./APP"
 
 // 查询访客统计数据
 export function getVisitor(query) {

+ 46 - 25
src/layout/components/AppMain.vue

@@ -8,10 +8,10 @@
       <!-- </transition> -->
     </router-view>
     <iframe-toggle />
-    <!-- <iframe id="myIframe" :src="srcUrl" style="width: 100%;height: 100%;" frameborder="0"
+    <iframe id="myIframe" :src="srcUrl" style="width: 100%;height: 100%;" frameborder="0"
       v-show="pathUrl == '/index' || pathUrl == '/system/building'"></iframe>
     <iframe id="myIframeil" :src="srcUrl1" style="width: 100%;height: 100%;" frameborder="0"
-      v-if="pathUrl != '/index' && pathShow || pathShow && pathUrl != '/system/lighting'"></iframe> -->
+      v-if="pathUrl != '/index' && pathShow || pathShow && pathUrl != '/system/lighting'"></iframe>
   </section>
 </template>
 
@@ -22,7 +22,8 @@ const route = useRoute()
 const tagsViewStore = useTagsViewStore()
 const pathUrl = ref('')
 const pathShow = ref(false)
-const srcUrl = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd1'
+const srcUrl = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd1'
+// const srcUrl = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd1'
 const srcUrl1 = ref('')
 onMounted(() => {
   addIframe()
@@ -31,73 +32,93 @@ watch(() => route, (newVal) => {
   pathUrl.value = newVal.path
   if (pathUrl.value == '/system/lighting') {
     // 照明系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd3'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd3'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd3'
   } else if (pathUrl.value == '/system/elevator') {
     // 电梯系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd2'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd2'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd2'
   } else if (pathUrl.value == '/system/broadcast') {
     // 公共广播
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU12'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU12'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU12'
   } else if (pathUrl.value == '/system/tenement') {
     // 物业管理
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU13'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU13'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU13'
   } else if (pathUrl.value == '/system/message') {
     // 信息发布
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd8'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd8'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd8'
   } else if (pathUrl.value == '/system/energy') {
     // 能源管理
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd4'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd4'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd4'
   } else if (pathUrl.value == '/system/video') {
     // 视频监控
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd5'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd5'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd5'
   } else if (pathUrl.value == '/system/intruderalarm') {
     // 入侵报警
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd6'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd6'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd6'
   } else if (pathUrl.value == '/system/passageway') {
     // 出入口控制
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU15'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU15'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU15'
   } else if (pathUrl.value == '/system/inspection') {
     // 电子巡查
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd7'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd7'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd7'
   } else if (pathUrl.value == '/system/visitor') {
     // 访客系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU11'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU11'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU11'
   } else if (pathUrl.value == '/system/passengerFlow') {
     // 客流统计
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU10'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU10'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU10'
   } else if (pathUrl.value == '/system/entranceguard') {
     // 门禁系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd9'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd9'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd9'
   } else if (pathUrl.value == '/system/receptiondesk') {
     // 会议系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU14'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU14'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU14'
   } else if (pathUrl.value == '/system/airConditioner') {
     // 空调系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU17'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU17'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU17'
   } else if (pathUrl.value == '/system/wastewater') {
     // 给排水系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU18'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU18'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU18'
   } else if (pathUrl.value == '/system/wirelessIntercom') {
     // 无线对讲系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU19'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU19'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU19'
   } else if (pathUrl.value == '/system/sceneLighting') {
     // 景观照明系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU20'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU20'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU20'
   } else if (pathUrl.value == '/system/floodlighting') {
     // 泛光照明系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU21'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU21'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU21'
   } else if (pathUrl.value == '/system/fireAlarm') {
     // 火灾报警系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU22'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU22'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU22'
   } else if (pathUrl.value == '/system/dynamicEnvironment') {
     // 动力环境监控系统
-    srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU23'
+    srcUrl1.value = 'http://10.1.80.103:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTU23'
   }
   pathShow.value = true
   if (pathUrl.value == '/system/building') {
     // 楼宇自控
     pathShow.value = false
-    // srcUrl1.value = 'http://117.187.233.165:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd1'
+    // srcUrl1.value = 'http://192.168.11.88:9191/ViewRun?T_ViewID=41rwFKnP9R7DAQXGYkz2S8Vcba3qTUd1'
   } else if (pathUrl.value == '/index' || pathUrl.value == '/') {
     pathShow.value = false
   }

+ 68 - 68
src/layout/components/Sidebar/mockData.js

@@ -1,70 +1,70 @@
 export const weatherList = [
-    { id: 1, name: '晴', url: '../../../assets/weather/weather01.png' },
-    { id: 2, name: '少云', url: '../../../assets/weather/weather02.png' },
-    { id: 3, name: '晴间多云', url: '../../../assets/weather/weather03.png' },
-    { id: 4, name: '多云', url: '../../../assets/weather/weather04.png' },
-    { id: 5, name: '阴', url: '../../../assets/weather/weather05.png' },
-    { id: 6, name: '有风', url: '../../../assets/weather/weather06.png' },
-    { id: 7, name: '平静', url: '../../../assets/weather/weather07.png' },
-    { id: 8, name: '微风', url: '../../../assets/weather/weather08.png' },
-    { id: 9, name: '和风', url: '../../../assets/weather/weather09.png' },
-    { id: 10, name: '清风', url: '../../../assets/weather/weather10.png' },
-    { id: 11, name: '强风/劲风', url: '../../../assets/weather/weather11.png' },
-    { id: 12, name: '疾风', url: '../../../assets/weather/weather12.png' },
-    { id: 13, name: '大风', url: '../../../assets/weather/weather13.png' },
-    { id: 14, name: '烈风', url: '../../../assets/weather/weather14.png' },
-    { id: 15, name: '风暴', url: '../../../assets/weather/weather15.png' },
-    { id: 16, name: '狂爆风', url: '../../../assets/weather/weather16.png' },
-    { id: 17, name: '飓风', url: '../../../assets/weather/weather17.png' },
-    { id: 18, name: '热带风暴', url: '../../../assets/weather/weather18.png' },
-    { id: 19, name: '霾', url: '../../../assets/weather/weather19.png' },
-    { id: 20, name: '中度霾', url: '../../../assets/weather/weather20.png' },
-    { id: 21, name: '重度霾', url: '../../../assets/weather/weather21.png' },
-    { id: 22, name: '严重霾', url: '../../../assets/weather/weather22.png' },
-    { id: 23, name: '阵雨', url: '../../../assets/weather/weather23.png' },
-    { id: 24, name: '雷阵雨', url: '../../../assets/weather/weather24.png' },
-    { id: 25, name: '雷阵雨并伴有冰雹', url: '../../../assets/weather/weather25.png' },
-    { id: 26, name: '小雨', url: '../../../assets/weather/weather26.png' },
-    { id: 27, name: '中雨', url: '../../../assets/weather/weather27.png' },
-    { id: 28, name: '大雨', url: '../../../assets/weather/weather28.png' },
-    { id: 29, name: '暴雨', url: '../../../assets/weather/weather29.png' },
-    { id: 30, name: '大暴雨', url: '../../../assets/weather/weather30.png' },
-    { id: 31, name: '特大暴雨', url: '../../../assets/weather/weather31.png' },
-    { id: 32, name: '强阵雨', url: '../../../assets/weather/weather32.png' },
-    { id: 33, name: '强雷阵雨', url: '../../../assets/weather/weather33.png' },
-    { id: 34, name: '极端降雨', url: '../../../assets/weather/weather34.png' },
-    { id: 35, name: '毛毛雨/细雨', url: '../../../assets/weather/weather35.png' },
-    { id: 36, name: '雨', url: '../../../assets/weather/weather36.png' },
-    { id: 37, name: '小雨-中雨', url: '../../../assets/weather/weather37.png' },
-    { id: 38, name: '中雨-大雨', url: '../../../assets/weather/weather38.png' },
-    { id: 39, name: '大雨-暴雨', url: '../../../assets/weather/weather39.png' },
-    { id: 40, name: '暴雨-大暴雨', url: '../../../assets/weather/weather40.png' },
-    { id: 41, name: '大暴雨-特大暴雨', url: '../../../assets/weather/weather41.png' },
-    { id: 42, name: '雨雪天气', url: '../../../assets/weather/weather42.png' },
-    { id: 43, name: '雨夹雪', url: '../../../assets/weather/weather43.png' },
-    { id: 44, name: '阵雨夹雪', url: '../../../assets/weather/weather44.png' },
-    { id: 45, name: '冻雨', url: '../../../assets/weather/weather45.png' },
-    { id: 46, name: '雪', url: '../../../assets/weather/weather46.png' },
-    { id: 47, name: '阵雪', url: '../../../assets/weather/weather47.png' },
-    { id: 48, name: '小雪', url: '../../../assets/weather/weather48.png' },
-    { id: 49, name: '中雪', url: '../../../assets/weather/weather49.png' },
-    { id: 50, name: '大雪', url: '../../../assets/weather/weather50.png' },
-    { id: 51, name: '暴雪', url: '../../../assets/weather/weather51.png' },
-    { id: 52, name: '小雪-中雪', url: '../../../assets/weather/weather52.png' },
-    { id: 53, name: '中雪-大雪', url: '../../../assets/weather/weather53.png' },
-    { id: 54, name: '大雪-暴雪', url: '../../../assets/weather/weather54.png' },
-    { id: 55, name: '浮尘', url: '../../../assets/weather/weather55.png' },
-    { id: 56, name: '扬沙', url: '../../../assets/weather/weather56.png' },
-    { id: 57, name: '沙尘暴', url: '../../../assets/weather/weather57.png' },
-    { id: 58, name: '强沙尘暴', url: '../../../assets/weather/weather58.png' },
-    { id: 59, name: '龙卷风', url: '../../../assets/weather/weather59.png' },
-    { id: 60, name: '雾', url: '../../../assets/weather/weather60.png' },
-    { id: 61, name: '浓雾', url: '../../../assets/weather/weather61.png' },
-    { id: 62, name: '强浓雾', url: '../../../assets/weather/weather62.png' },
-    { id: 63, name: '轻雾', url: '../../../assets/weather/weather63.png' },
-    { id: 64, name: '大雾', url: '../../../assets/weather/weather64.png' },
-    { id: 65, name: '特强浓雾', url: '../../../assets/weather/weather65.png' },
-    { id: 66, name: '热', url: '../../../assets/weather/weather66.png' },
-    { id: 67, name: '冷', url: '../../../assets/weather/weather67.png' },
-    { id: 68, name: '未知', url: '../../../assets/weather/weather68.png' }
+    { id: 1, name: '晴', url: '/src/assets/weather/weather01.png' },
+    { id: 2, name: '少云', url: '/src/assets/weather/weather02.png' },
+    { id: 3, name: '晴间多云', url: '/src/assets/weather/weather03.png' },
+    { id: 4, name: '多云', url: '/src/assets/weather/weather04.png' },
+    { id: 5, name: '阴', url: '/src/assets/weather/weather05.png' },
+    { id: 6, name: '有风', url: '/src/assets/weather/weather06.png' },
+    { id: 7, name: '平静', url: '/src/assets/weather/weather07.png' },
+    { id: 8, name: '微风', url: '/src/assets/weather/weather08.png' },
+    { id: 9, name: '和风', url: '/src/assets/weather/weather09.png' },
+    { id: 10, name: '清风', url: '/src/assets/weather/weather10.png' },
+    { id: 11, name: '强风/劲风', url: '/src/assets/weather/weather11.png' },
+    { id: 12, name: '疾风', url: '/src/assets/weather/weather12.png' },
+    { id: 13, name: '大风', url: '/src/assets/weather/weather13.png' },
+    { id: 14, name: '烈风', url: '/src/assets/weather/weather14.png' },
+    { id: 15, name: '风暴', url: '/src/assets/weather/weather15.png' },
+    { id: 16, name: '狂爆风', url: '/src/assets/weather/weather16.png' },
+    { id: 17, name: '飓风', url: '/src/assets/weather/weather17.png' },
+    { id: 18, name: '热带风暴', url: '/src/assets/weather/weather18.png' },
+    { id: 19, name: '霾', url: '/src/assets/weather/weather19.png' },
+    { id: 20, name: '中度霾', url: '/src/assets/weather/weather20.png' },
+    { id: 21, name: '重度霾', url: '/src/assets/weather/weather21.png' },
+    { id: 22, name: '严重霾', url: '/src/assets/weather/weather22.png' },
+    { id: 23, name: '阵雨', url: '/src/assets/weather/weather23.png' },
+    { id: 24, name: '雷阵雨', url: '/src/assets/weather/weather24.png' },
+    { id: 25, name: '雷阵雨并伴有冰雹', url: '/src/assets/weather/weather25.png' },
+    { id: 26, name: '小雨', url: '/src/assets/weather/weather26.png' },
+    { id: 27, name: '中雨', url: '/src/assets/weather/weather27.png' },
+    { id: 28, name: '大雨', url: '/src/assets/weather/weather28.png' },
+    { id: 29, name: '暴雨', url: '/src/assets/weather/weather29.png' },
+    { id: 30, name: '大暴雨', url: '/src/assets/weather/weather30.png' },
+    { id: 31, name: '特大暴雨', url: '/src/assets/weather/weather31.png' },
+    { id: 32, name: '强阵雨', url: '/src/assets/weather/weather32.png' },
+    { id: 33, name: '强雷阵雨', url: '/src/assets/weather/weather33.png' },
+    { id: 34, name: '极端降雨', url: '/src/assets/weather/weather34.png' },
+    { id: 35, name: '毛毛雨/细雨', url: '/src/assets/weather/weather35.png' },
+    { id: 36, name: '雨', url: '/src/assets/weather/weather36.png' },
+    { id: 37, name: '小雨-中雨', url: '/src/assets/weather/weather37.png' },
+    { id: 38, name: '中雨-大雨', url: '/src/assets/weather/weather38.png' },
+    { id: 39, name: '大雨-暴雨', url: '/src/assets/weather/weather39.png' },
+    { id: 40, name: '暴雨-大暴雨', url: '/src/assets/weather/weather40.png' },
+    { id: 41, name: '大暴雨-特大暴雨', url: '/src/assets/weather/weather41.png' },
+    { id: 42, name: '雨雪天气', url: '/src/assets/weather/weather42.png' },
+    { id: 43, name: '雨夹雪', url: '/src/assets/weather/weather43.png' },
+    { id: 44, name: '阵雨夹雪', url: '/src/assets/weather/weather44.png' },
+    { id: 45, name: '冻雨', url: '/src/assets/weather/weather45.png' },
+    { id: 46, name: '雪', url: '/src/assets/weather/weather46.png' },
+    { id: 47, name: '阵雪', url: '/src/assets/weather/weather47.png' },
+    { id: 48, name: '小雪', url: '/src/assets/weather/weather48.png' },
+    { id: 49, name: '中雪', url: '/src/assets/weather/weather49.png' },
+    { id: 50, name: '大雪', url: '/src/assets/weather/weather50.png' },
+    { id: 51, name: '暴雪', url: '/src/assets/weather/weather51.png' },
+    { id: 52, name: '小雪-中雪', url: '/src/assets/weather/weather52.png' },
+    { id: 53, name: '中雪-大雪', url: '/src/assets/weather/weather53.png' },
+    { id: 54, name: '大雪-暴雪', url: '/src/assets/weather/weather54.png' },
+    { id: 55, name: '浮尘', url: '/src/assets/weather/weather55.png' },
+    { id: 56, name: '扬沙', url: '/src/assets/weather/weather56.png' },
+    { id: 57, name: '沙尘暴', url: '/src/assets/weather/weather57.png' },
+    { id: 58, name: '强沙尘暴', url: '/src/assets/weather/weather58.png' },
+    { id: 59, name: '龙卷风', url: '/src/assets/weather/weather59.png' },
+    { id: 60, name: '雾', url: '/src/assets/weather/weather60.png' },
+    { id: 61, name: '浓雾', url: '/src/assets/weather/weather61.png' },
+    { id: 62, name: '强浓雾', url: '/src/assets/weather/weather62.png' },
+    { id: 63, name: '轻雾', url: '/src/assets/weather/weather63.png' },
+    { id: 64, name: '大雾', url: '/src/assets/weather/weather64.png' },
+    { id: 65, name: '特强浓雾', url: '/src/assets/weather/weather65.png' },
+    { id: 66, name: '热', url: '/src/assets/weather/weather66.png' },
+    { id: 67, name: '冷', url: '/src/assets/weather/weather67.png' },
+    { id: 68, name: '未知', url: '/src/assets/weather/weather68.png' }
 ]

+ 2 - 2
src/utils/request.js

@@ -10,12 +10,12 @@ import useUserStore from '@/store/modules/user'
 let downloadLoadingInstance;
 // 是否显示重新登录
 export let isRelogin = { show: false };
-
+const Url = "./devApi" 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
-  baseURL: import.meta.env.VITE_APP_BASE_API,
+  baseURL: process.env.NODE_ENV === 'production' ? Url : import.meta.env.VITE_APP_BASE_API,
   // 超时
   timeout: 60000
 })

+ 0 - 1
src/views/index/reightDesk.vue

@@ -291,7 +291,6 @@ const props = defineProps({
 
 .tect_arch_tc {
     width: 40%;
-    max-height: 100px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 0 - 1
src/views/system/airConditioner/index.vue

@@ -44,7 +44,6 @@ onUnmounted(() => {
 function getEnergyData() {
     getTemperature().then((res) => {
         if (res.code == 200) {
-            console.log(res.data,887)
             leftData.value = res.data
         }
     })

+ 2 - 2
src/views/system/airConditioner/modules/blowingIn.vue

@@ -5,7 +5,7 @@
             <div class="_running_mains_left" id="videoWidth" :style="{ '--heightRun': heightVideo + 'px' }">
                 <div class="_running_mains_left_tuan"></div>
                 <div class="_running_mains_left_conter">
-                    <div class="_running_mains_left_conter_num">{{ resultData.GatewayCount }}</div>
+                    <div class="_running_mains_left_conter_num">{{ resultData.GatewayCount || 0 }}</div>
                     <div class="_running_mains_left_conter_text">网关总量</div>
                 </div>
             </div>
@@ -19,7 +19,7 @@
                         </el-text>
                     </div>
                     <div class="_running_mains_right_item__txt">
-                        <span>{{ item.state }}</span>
+                        <span>{{ item.state || 0 }}</span>
                         <span :style="{ color: item.color, 'font-size': '12px', 'margin-left': '5px' }">
                             {{ item.unit }}
                         </span>

+ 2 - 2
src/views/system/airConditioner/modules/consume.vue

@@ -5,7 +5,7 @@
             <div class="_running_mains_left" id="videoWidth" :style="{ '--heightRun': heightVideo + 'px' }">
                 <div class="_running_mains_left_tuan"></div>
                 <div class="_running_mains_left_conter">
-                    <div class="_running_mains_left_conter_num">{{ resultData.DeviceCount }}</div>
+                    <div class="_running_mains_left_conter_num">{{ resultData.DeviceCount || 0 }}</div>
                     <div class="_running_mains_left_conter_text">空调总量</div>
                 </div>
             </div>
@@ -19,7 +19,7 @@
                         </el-text>
                     </div>
                     <div class="_running_mains_right_item__txt">
-                        <span>{{ item.state }}</span>
+                        <span>{{ item.state || 0 }}</span>
                         <span :style="{ color: item.color, 'font-size': '12px', 'margin-left': '5px' }">
                             {{ item.unit }}
                         </span>

+ 26 - 15
src/views/system/airConditioner/modules/energy.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="_consume">
         <HeadlineTag type="right" value="报警信息统计分析"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
@@ -11,6 +12,7 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,11 +35,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, countData) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -88,7 +93,7 @@ onMounted(() => {
                 {
                     name: '报警次数',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: countData,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -124,8 +129,7 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 const getChartData = (electricityCount) => {
     const dates = [];
     const countData = [];
@@ -137,17 +141,24 @@ const getChartData = (electricityCount) => {
     return { dates, countData };
 };
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
+    if (newVal) {
         const { dates, countData } = getChartData(newVal);
-        chart.setOption({
-            xAxis: {
-                data: dates,
-            },
-            series: [{
-                type: 'line',
-                data: countData,
-            }],
-        })
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(dates, countData);
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: dates,
+                },
+                series: [{
+                    type: 'line',
+                    data: countData,
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 7 - 2
src/views/system/airConditioner/modules/running.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag value="空调设备列表" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="dataRunning.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in dataRunning" :key="index">
                     <div class="_eventList_mains_item_text view_item" style="width: 45%;">
@@ -18,12 +19,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -76,7 +79,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 8 - 3
src/views/system/airConditioner/modules/temperatureTrend.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag type="right" value="报警列表" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="dataRunning.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in dataRunning" :key="index">
                     <div class="_eventList_mains_item_text view_item" style="width: 45%;">
@@ -16,12 +17,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from "vue";
+import { ref, onMounted, onUnmounted, watch } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -68,7 +71,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/broadcast/modules/deviceList.vue

@@ -87,7 +87,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/broadcast/modules/eventList.vue

@@ -73,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 5 - 2
src/views/system/broadcast/modules/sameDay.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag type="right" value="播放控制" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" v-if="data && data.length > 0" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data && data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text">
@@ -79,7 +80,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 11 - 4
src/views/system/broadcast/modules/tiring.vue

@@ -37,10 +37,13 @@ const handleResize = () => {
 };
 
 onMounted(() => {
+    initChart()
+});
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 生成一周的日期数据
-        const weekDays = [];
+        const weekDays = dates;
         const option = {
             xAxis: {
                 type: 'category',
@@ -91,7 +94,7 @@ onMounted(() => {
                     name: '设备离线',
                     type: 'line',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     lineStyle: {
                         color: '#de4337',
                     },
@@ -124,9 +127,13 @@ onMounted(() => {
         chart.setOption(option);
     }
     window.addEventListener('resize', handleResize);
-});
-
+}
 watch(() => props.resultData, (newVal) => {
+    if (newVal && chart == null) {
+        nextTick(() => {
+            initChart(Object.keys(newVal), Object.entries(newVal));
+        });
+    }
     if (chart) {
         chart.setOption({
             xAxis: {

+ 3 - 1
src/views/system/building/equipment.vue

@@ -69,7 +69,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/building/groupControl.vue

@@ -69,7 +69,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/building/incident.vue

@@ -68,7 +68,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 26 - 15
src/views/system/dynamicEnvironment/modules/blowingIn.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="_consume">
         <HeadlineTag value="空气质量"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
@@ -11,6 +12,7 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,11 +35,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -87,7 +92,7 @@ onMounted(() => {
                 {
                     name: '24小时气能耗',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -123,19 +128,25 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                type: 'line',
-                data: Object.entries(newVal),
-            }],
-        })
+    if (newVal) {
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), Object.entries(newVal));
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    type: 'line',
+                    data: Object.entries(newVal),
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 19 - 12
src/views/system/dynamicEnvironment/modules/deviceList.vue

@@ -2,9 +2,10 @@
     <div class="_deviceList">
         <HeadlineTag type="right" value="设备列表" style="flex-shrink: 0;"></HeadlineTag>
         <div class="point_box" style="margin-top: 10px;">
-            <el-input v-model="value" placeholder="按巡查点名称搜索" />
+            <el-input v-model="value" placeholder="按设备名称搜索" />
         </div>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <el-text class="w-150px mb-2 _table_row1" truncated style="color: white;flex: .4;">
@@ -13,26 +14,29 @@
                                 <Opportunity />
                             </el-icon>
                         </el-icon>
-                        {{ item.DeviceName }}
+                        {{ item.devices_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated :class="item.SwitchStatus == 0 ? 'blue_title' : 'red_title'"
-                        style="flex: .2;">
-                        {{ item.SwitchStatus == 0 ? '开启' : '关闭' }}
+                    <el-text class="w-150px mb-2" truncated style="flex: .2;color:#fff;">
+                        {{ item.room_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated
-                        :class="item.OnlinePresence == 0 ? 'blue_title' : 'red_title'" style="flex: .2">
-                        {{ item.OnlinePresence == 0 ? '在线' : '离线' }}
+                    <el-text class="w-150px mb-2" truncated :class="item.on_line == 0 ? 'blue_title' : 'red_title'"
+                        style="flex: .2">
+                        {{ item.on_line == 0 ? '在线' : '离线' }}
                     </el-text>
                 </div>
             </div>
         </div>
+        <div class="scroll-view" v-else>
+            <Empty :bottom="true"></Empty>
+        </div>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from "vue";
+import { ref, onMounted, onUnmounted, nextTick } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
 import { Opportunity, Aim } from '@element-plus/icons-vue'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -83,7 +87,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -116,7 +122,8 @@ const onMouseleave = () => {
     overflow: hidden;
     display: flex;
     flex-direction: column;
-
+    flex: 1;
+    
     &_mains {
         margin: 10px 30px;
         overflow: hidden; // 隐藏溢出内容

+ 25 - 13
src/views/system/dynamicEnvironment/modules/energy.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="_consume">
         <HeadlineTag value="湿度环测数据"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
@@ -11,6 +12,7 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,6 +35,10 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+
+const initChart = () => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
@@ -123,19 +129,25 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                type: 'line',
-                data: Object.entries(newVal),
-            }],
-        })
+    if (newVal) {
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), Object.entries(newVal));
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    type: 'line',
+                    data: Object.entries(newVal),
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 27 - 15
src/views/system/dynamicEnvironment/modules/temperatureTrend.vue

@@ -1,16 +1,18 @@
 <template>
     <div class="_consume">
         <HeadlineTag value="温度环测数据"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from 'vue';
+import { ref, onMounted, onUnmounted, nextTick } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,11 +35,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -87,7 +92,7 @@ onMounted(() => {
                 {
                     name: '温度',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -123,19 +128,26 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
+}
 
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                type: 'line',
-                data: Object.entries(newVal),
-            }],
-        })
+    if (newVal) {
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), Object.entries(newVal));
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    type: 'line',
+                    data: Object.entries(newVal),
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 49 - 10
src/views/system/elevator/modules/consume.vue

@@ -2,7 +2,7 @@
     <div class="_runnings">
         <HeadlineTag value="行为检测(周)"></HeadlineTag>
         <div class="_runnings_mains" :style="{ '--heightSume': heightcon + 'px' }">
-            <div class="_runnings_mains_left" id="sumeWidth">
+            <div class="_runnings_mains_left" id="sumeWidthil">
                 <div class="_runnings_mains_left_tuan tuan1"></div>
                 <div class="_runnings_mains_left_conter">
                     <div class="_runnings_mains_left_conter_num">{{ resultData.OverloadWarning || 0 }}</div>
@@ -28,25 +28,35 @@
 </template>
 
 <script setup>
-import { ref } from "vue";
+import { ref, nextTick } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
-const runningList = ref([
-    { name: '入侵检测', state: '154', color: '#409eff', tip: '划定区域人员闯入' },
-    { name: '异常行为', state: '15', color: '#15acaa', tip: '徘徊、倒地、聚集' },
-    { name: '丢失告警', state: '134', color: '#FFC107', tip: '物品遗留/丢失告警' },
-])
 const props = defineProps({
     resultData: {
         type: Object,
         default: {}
     }
 })
+const runningList = ref([
+    { name: '入侵检测', state: '154', color: '#409eff', tip: '划定区域人员闯入' },
+    { name: '异常行为', state: '15', color: '#15acaa', tip: '徘徊、倒地、聚集' },
+    { name: '丢失告警', state: '134', color: '#FFC107', tip: '物品遗留/丢失告警' },
+])
 const heightcon = ref(0)
+watch(() => props.resultData, (newVal) => {
+    if (newVal) {
+        runningList.value[0].state = newVal.HousesCount
+        runningList.value[1].state = newVal.HouseholdCount
+        runningList.value[2].state = newVal.DrivewayCount
+    }
+}, { deep: true, immediate: true } // 开启深度监听
+)
 // 生命周期
 onMounted(() => {
-    var element = document.getElementById("sumeWidth");
-    var width = element.offsetWidth;
-    heightcon.value = width
+    nextTick(() => {
+        var element = document.getElementById("sumeWidthil");
+        var width = element.offsetWidth;
+        heightcon.value = width
+    });
 });
 </script>
 <style lang="scss" scoped>
@@ -114,6 +124,35 @@ onMounted(() => {
             }
         }
 
+        &_right {
+            margin-left: 10px;
+            flex: 1;
+            color: #fff;
+
+            &_item {
+                display: flex;
+                align-items: center;
+                gap: 40px;
+                padding: 5px 0;
+
+                &_tuan {
+                    display: flex;
+                    align-items: center;
+
+                    &_flag {
+                        display: block;
+                        width: 7px;
+                        height: 7px;
+                        border-radius: 50%;
+                        margin-right: 10px;
+                    }
+                }
+
+                &__txt {
+                    font-size: 24px;
+                }
+            }
+        }
     }
 }
 

+ 11 - 5
src/views/system/elevator/modules/running.vue

@@ -2,8 +2,8 @@
     <div class="_running">
         <HeadlineTag value="电梯设备统计"></HeadlineTag>
         <div class="_running_mains">
-            <div class="_running_mains_left">
-                <dv-decoration-9 style="width:150px;height:150px;">
+            <div class="_running_mains_left" :style="{ '--heightSumeil': heightconil + 'px' }" id="sumeWidth">
+                <dv-decoration-9>
                     <div class="_running_mains_left_conter">
                         <div class="_running_mains_left_conter_num">{{ resultData.ElevatorCount || 0 }}</div>
                         <div class="_running_mains_left_conter_text">电梯总量</div>
@@ -38,7 +38,7 @@ const runningList = ref([
     { name: '运行正常', state: 0, color: '#409eff', unit: '台' },
     { name: '运行异常', state: 0, color: '#15acaa', unit: '台' },
 ])
-
+const heightconil = ref(0)
 const props = defineProps({
     resultData: {
         type: Object,
@@ -52,6 +52,12 @@ watch(() => props.resultData, (newVal) => {
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )
+onMounted(() => {
+    // 组件挂载后可以执行一些初始化操作
+    var element = document.getElementById("sumeWidth");
+    var width = element.offsetHeight;
+    heightconil.value = width
+});
 </script>
 <style lang="scss" scoped>
 ._running {
@@ -65,10 +71,10 @@ watch(() => props.resultData, (newVal) => {
         align-items: center;
 
         &_left {
-            width: 180px;
-            height: 180px;
             position: relative;
             flex-shrink: 0;
+            height: 90%;
+            width: var(--heightSumeil);
 
             &_conter {
                 position: absolute;

+ 3 - 1
src/views/system/entranceguard/equipment.vue

@@ -103,7 +103,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 14 - 2
src/views/system/entranceguard/index.vue

@@ -55,10 +55,11 @@ import inbreak from './inbreak'
 import passable from './passable'
 import inform from './inform'
 import Empty from '@/components/Empty'
+const route = useRoute()
 
 // 生命周期
 onMounted(() => {
-    intervalId.value = setInterval(getAccessData, 10000);
+    console.log(88887)
     getAccessData()
 });
 onUnmounted(() => {
@@ -67,11 +68,22 @@ onUnmounted(() => {
 const intervalId = ref(null)
 const leftData = ref({})
 function getAccessData() {
+    clearInterval(intervalId.value);
     getAccess().then((res) => {
         if (res.code == 200) {
             leftData.value = res.data
+            if (route.path == '/system/entranceguard') {
+                intervalId.value = setInterval(getAccessData, 10000);
+            } else {
+                clearInterval(intervalId.value);
+            }
+        }
+    }).catch((err) => {
+        if (route.path == '/system/entranceguard') {
+            intervalId.value = null
+            getAccessData()
         }
-    })
+    });
 }
 </script>
 

+ 3 - 1
src/views/system/entranceguard/inform.vue

@@ -68,7 +68,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 17 - 10
src/views/system/fireAlarm/modules/deviceList.vue

@@ -2,9 +2,10 @@
     <div class="_deviceList">
         <HeadlineTag value="设备列表" style="flex-shrink: 0;"></HeadlineTag>
         <div class="point_box" style="margin-top: 10px;">
-            <el-input v-model="value" placeholder="按巡查点名称搜索" />
+            <el-input v-model="value" placeholder="按设备名称搜索" />
         </div>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <el-text class="w-150px mb-2 _table_row1" truncated style="color: white;flex: .4;">
@@ -13,19 +14,21 @@
                                 <Opportunity />
                             </el-icon>
                         </el-icon>
-                        {{ item.DeviceName }}
+                        {{ item.devices_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated :class="item.SwitchStatus == 0 ? 'blue_title' : 'red_title'"
-                        style="flex: .2;">
-                        {{ item.SwitchStatus == 0 ? '开启' : '关闭' }}
+                    <el-text class="w-150px mb-2" truncated style="flex: .2;color:#fff;">
+                        {{ item.room_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated
-                        :class="item.OnlinePresence == 0 ? 'blue_title' : 'red_title'" style="flex: .2">
-                        {{ item.OnlinePresence == 0 ? '在线' : '离线' }}
+                    <el-text class="w-150px mb-2" truncated :class="item.on_line == 0 ? 'blue_title' : 'red_title'"
+                        style="flex: .2">
+                        {{ item.on_line == 0 ? '在线' : '离线' }}
                     </el-text>
                 </div>
             </div>
         </div>
+        <div class="scroll-view" v-else>
+            <Empty :bottom="true"></Empty>
+        </div>
     </div>
 </template>
 
@@ -33,6 +36,7 @@
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
 import { Opportunity, Aim } from '@element-plus/icons-vue'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -83,7 +87,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -116,6 +122,7 @@ const onMouseleave = () => {
     overflow: hidden;
     display: flex;
     flex-direction: column;
+    flex: 1;
 
     &_mains {
         margin: 10px 30px;

+ 10 - 4
src/views/system/fireAlarm/modules/eventList.vue

@@ -1,14 +1,15 @@
 <template>
     <div class="_eventList">
         <HeadlineTag type="right" value="维护计划列表" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text">
                         <div :class="item.DeviceStatus === 0 ? '_success' : '_warning'"
                             class="_eventList_mains_item_text_flag"></div>
                         <el-text class="w-150px mb-2" truncated style="color: white;margin-left: 10px;">
-                            {{ item.DeviceName }}
+                            {{ item.devices_name }}
                         </el-text>
                     </div>
                     <el-text class="w-150px mb-2" truncated style="color: white;">
@@ -17,12 +18,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from "vue";
+import { ref, onMounted, onUnmounted, watch } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -69,7 +72,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -146,6 +151,7 @@ const onMouseleave = () => {
         }
     }
 }
+
 .header-view {
     margin-top: 10px;
     width: 100%;

+ 27 - 16
src/views/system/fireAlarm/modules/running.vue

@@ -1,16 +1,18 @@
 <template>
     <div class="_consume">
         <HeadlineTag type="right" value="历史火灾报警趋势"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from 'vue';
+import { ref, onMounted, onUnmounted, nextTick } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,11 +35,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -87,7 +92,7 @@ onMounted(() => {
                 {
                     name: '24小时气能耗',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -123,19 +128,25 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                type: 'line',
-                data: Object.entries(newVal),
-            }],
-        })
+    if (newVal) {
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), Object.entries(newVal));
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    type: 'line',
+                    data: Object.entries(newVal),
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 9 - 4
src/views/system/fireAlarm/modules/switchAll.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag type="right" value="火灾报警列表" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <el-text class="w-150px mb-2 _table_row1" truncated style="color: white;flex: .4;">
@@ -10,7 +11,7 @@
                                 <Opportunity />
                             </el-icon>
                         </el-icon>
-                        {{ item.DeviceName }}
+                        {{ item.devices_name }}
                     </el-text>
                     <el-text class="w-150px mb-2" truncated style="flex: .2;color: #fff;">
                         {{ item.SwitchStatus == 0 ? '烟雾探测器' : '温感探测器' }}
@@ -22,12 +23,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from "vue";
+import { ref, onMounted, onUnmounted, watch } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -74,7 +77,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 13 - 3
src/views/system/floodlighting/index.vue

@@ -13,7 +13,7 @@
                 <div style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
                     <running :resultData="leftData" style="flex: 1;" />
                     <switchAll :resultData="leftData.RunAnalyse" style="flex: 1;" />
-                    <eventList :resultData="leftData.EventList" style="flex: 1;" />
+                    <eventList :resultData="leftData.EventList?.alarm" style="flex: 1;" />
                 </div>
             </template>
         </layout>
@@ -27,21 +27,31 @@ import deviceList from './modules/deviceList.vue'
 import running from './modules/running.vue'
 import eventList from './modules/eventList.vue'
 import switchAll from './modules/switchAll.vue'
-
+const route = useRoute()
 const intervalId = ref(null)
 const leftData = ref({})
 // 生命周期
 onMounted(() => {
-    intervalId.value = setInterval(getIlluminatingData, 10000);
     getIlluminatingData()
 });
 onUnmounted(() => {
     clearInterval(intervalId.value);
 })
 function getIlluminatingData() {
+    clearInterval(intervalId.value);
     getIlluminating().then((res) => {
         if (res.code == 200) {
             leftData.value = res.data
+            if (route.path == '/system/lighting') {
+                intervalId.value = setInterval(getIlluminatingData, 10000);
+            } else {
+                clearInterval(intervalId.value);
+            }
+        }
+    }).catch(() => {
+        if (route.path == '/system/lighting') {
+            intervalId.value = null
+            getIlluminatingData()
         }
     })
 }

+ 17 - 10
src/views/system/floodlighting/modules/deviceList.vue

@@ -2,9 +2,10 @@
     <div class="_deviceList">
         <HeadlineTag value="设备列表" style="flex-shrink: 0;"></HeadlineTag>
         <div class="point_box" style="margin-top: 10px;">
-            <el-input v-model="value" placeholder="按巡查点名称搜索" />
+            <el-input v-model="value" placeholder="按设备名称搜索" />
         </div>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="resultData.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <el-text class="w-150px mb-2 _table_row1" truncated style="color: white;flex: .4;">
@@ -13,19 +14,21 @@
                                 <Opportunity />
                             </el-icon>
                         </el-icon>
-                        {{ item.DeviceName }}
+                        {{ item.devices_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated :class="item.SwitchStatus == 0 ? 'blue_title' : 'red_title'"
-                        style="flex: .2;">
-                        {{ item.SwitchStatus == 0 ? '开启' : '关闭' }}
+                    <el-text class="w-150px mb-2" truncated style="flex: .2;color:#fff;">
+                        {{ item.room_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated
-                        :class="item.OnlinePresence == 0 ? 'blue_title' : 'red_title'" style="flex: .2">
-                        {{ item.OnlinePresence == 0 ? '在线' : '离线' }}
+                    <el-text class="w-150px mb-2" truncated :class="item.on_line == 0 ? 'blue_title' : 'red_title'"
+                        style="flex: .2">
+                        {{ item.on_line == 0 ? '在线' : '离线' }}
                     </el-text>
                 </div>
             </div>
         </div>
+        <div class="scroll-view" v-else>
+            <Empty :bottom="true"></Empty>
+        </div>
     </div>
 </template>
 
@@ -33,6 +36,7 @@
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
 import { Opportunity, Aim } from '@element-plus/icons-vue'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -83,7 +87,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -116,6 +122,7 @@ const onMouseleave = () => {
     overflow: hidden;
     display: flex;
     flex-direction: column;
+    flex: 1;
 
     &_mains {
         margin: 10px 30px;

+ 12 - 22
src/views/system/floodlighting/modules/eventList.vue

@@ -1,45 +1,32 @@
 <template>
     <div class="_eventList">
-        <HeadlineTag type="right" value="事件列表" style="flex-shrink: 0;"></HeadlineTag>
-        <!-- 绑定鼠标移入移出事件 -->
-        <!-- <div class="_eventList_mains" ref="mainsRef" @mouseenter="pauseCarousel" @mouseleave="resumeCarousel">
-            <div :style="{ transform: `translateY(${scrollY}px)` }">
-                <div class="_eventList_mains_item" v-for="(item, index) in eventList.concat(eventList)" :key="index">
-                    <div class="_eventList_mains_item_text">
-                        <div :class="item.DeviceStatus === 0 ? '_success' : '_warning'"
-                            class="_eventList_mains_item_text_flag"></div>
-                        <el-text class="w-150px mb-2" truncated style="color: white;margin-left: 10px;">
-                            {{ item.DeviceName }}
-                        </el-text>
-                    </div>
-                    <el-text class="w-150px mb-2" truncated style="color: white;">
-                        {{ item.EventDate }}
-                    </el-text>
-                </div>
-            </div>
-        </div> -->
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <HeadlineTag type="right" value="报警记录" style="flex-shrink: 0;"></HeadlineTag>
+        <div class="scroll-view" ref="scrollViewRef" v-if="resultData.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text">
                         <div :class="item.DeviceStatus === 0 ? '_success' : '_warning'"
                             class="_eventList_mains_item_text_flag"></div>
                         <el-text class="w-150px mb-2" truncated style="color: white;margin-left: 10px;">
-                            {{ item.DeviceName }}
+                            {{ item.alarm_title }}
                         </el-text>
                     </div>
                     <el-text class="w-150px mb-2" truncated style="color: white;">
-                        {{ item.EventDate }}
+                        {{ item.alarm_create_time }}
                     </el-text>
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
+
 const props = defineProps({
     resultData: {
         type: Array,
@@ -86,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -163,6 +152,7 @@ const onMouseleave = () => {
         }
     }
 }
+
 .header-view {
     margin-top: 10px;
     width: 100%;

+ 9 - 9
src/views/system/floodlighting/modules/running.vue

@@ -30,15 +30,15 @@ const initAccess = () => {
             value: 0,
         },
         {
-            name: '开启数量',
+            name: '网关数量',
             value: 0,
         },
         {
-            name: '关闭数量',
+            name: '策略总量',
             value: 0,
         },
         {
-            name: '故障数量',
+            name: '报警数量',
             value: 0,
         },
     ];
@@ -259,23 +259,23 @@ const initAccess = () => {
 };
 
 watch(() => props.resultData, (newVal) => {
-    if (chartLeft) {
+    if (chartLeft && newVal && Object.keys(newVal).length != 0) {
         let data = [
             {
                 name: '设备总数',
                 value: newVal.DeviceCount,
             },
             {
-                name: '开启数量',
-                value: newVal.OpenCount,
+                name: '网关数量',
+                value: newVal.GatewayCount,
             },
             {
-                name: '关闭数量',
+                name: '策略总量',
                 value: newVal.OffCount,
             },
             {
-                name: '故障数量',
-                value: newVal.FaultCount,
+                name: '报警数量',
+                value: newVal.AlarmCount,
             },
         ];
         let arrName = getArrayValue(data, 'name');

+ 34 - 95
src/views/system/floodlighting/modules/switchAll.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="_switchAll">
-        <HeadlineTag type="right" value="运行分析(周)"></HeadlineTag>
-        <div class="_switchAll_mains">
+        <HeadlineTag type="right" value="报警统计(月)"></HeadlineTag>
+        <div class="_switchAll_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
@@ -11,10 +12,11 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
-        type: Object,
-        default: {}
+        type: Array,
+        default: []
     }
 })
 
@@ -27,12 +29,15 @@ const generateRandomData = (length, max) => {
     }
     return randomData;
 };
- const handleResize = () => {
+const handleResize = () => {
     if (chart) {
         chart.resize();
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (xAxisData, EPEValue) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         const option = {
@@ -55,7 +60,7 @@ onMounted(() => {
             },
             xAxis: {
                 type: 'category',
-                data: [],
+                data: xAxisData,
                 axisLabel: {
                     color: '#fff'
                 },
@@ -79,11 +84,11 @@ onMounted(() => {
             },
             series: [
                 {
-                    name: '开启数量',
+                    name: '报警次数',
                     type: 'line',
                     smooth: true,
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPEValue,
                     showSymbol: false,
                     lineStyle: {
                         color: 'rgb(49, 143, 247)',
@@ -109,103 +114,37 @@ onMounted(() => {
                         shadowBlur: 10,
                     }
                 },
-                {
-                    name: '关闭数量',
-                    type: 'line',
-                    smooth: true,
-                    // data: generateRandomData(9, 60),
-                    data: [],
-                    showSymbol: false,
-                    lineStyle: {
-                        color: 'rgb(255,193,7)',
-                    },
-                    areaStyle: {
-                        color: new echarts.graphic.LinearGradient(
-                            0,
-                            0,
-                            0,
-                            1,
-                            [{
-                                offset: 0,
-                                color: 'rgba(255,193,7, 0.6)',
-                            },
-                            {
-                                offset: 0.8,
-                                color: 'rgba(255,193,7,0.2)',
-                            },
-                            ],
-                            false
-                        ),
-                        shadowColor: 'rgba(0, 0, 0, 0.1)',
-                        shadowBlur: 10,
-                    }
-                },
-                {
-                    name: '故障数量',
-                    type: 'line',
-                    smooth: true,
-                    // data: generateRandomData(9, 60),
-                    data: [],
-                    showSymbol: false,
-                    lineStyle: {
-                        color: 'rgb(244,67,54)'
-                    },
-                    areaStyle: {
-                        color: new echarts.graphic.LinearGradient(
-                            0,
-                            0,
-                            0,
-                            1,
-                            [{
-                                offset: 0,
-                                color: 'rgba(244,67,54,0.6)',
-                            },
-                            {
-                                offset: 0.8,
-                                color: 'rgba(244,67,54,0.2)',
-                            },
-                            ],
-                            false
-                        ),
-                        shadowColor: 'rgba(0, 0, 0, 0.1)',
-                        shadowBlur: 10,
-                    }
-                }
             ]
         };
-
         chart.setOption(option);
     }
     window.addEventListener('resize', handleResize);
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        let arrData = Object.keys(newVal)
+    if (newVal) {
+        let arrData = newVal
         let arr1 = []
         let arr2 = []
-        let arr3 = []
         arrData.forEach((item) => {
-            let data = Object.entries(newVal[item])
-            arr1.push(data[0][1])
-            arr2.push(data[1][1])
-            arr3.push(data[2][1])
-        })
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                name: '开启数量',
-                data: arr1,
-            }, {
-                name: '关闭数量',
-                data: arr2,
-            }, {
-                name: '故障数量',
-                data: arr3,
-            }],
+            arr1.push(item.count)
+            arr2.push(item.time)
         })
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(arr2, arr1);
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: arr2,
+                },
+                series: [{
+                    name: '报警次数',
+                    data: arr1,
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 3 - 1
src/views/system/inspection/point.vue

@@ -72,7 +72,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/inspection/polling.vue

@@ -68,7 +68,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/intruderalarm/alarm.vue

@@ -68,7 +68,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/intruderalarm/inspection.vue

@@ -68,7 +68,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 1 - 0
src/views/system/lighting/index.vue

@@ -38,6 +38,7 @@ onUnmounted(() => {
     clearInterval(intervalId.value);
 })
 function getIlluminatingData() {
+    clearInterval(intervalId.value);
     getIlluminating().then((res) => {
         if (res.code == 200) {
             leftData.value = res.data

+ 4 - 2
src/views/system/lighting/modules/deviceList.vue

@@ -2,7 +2,7 @@
     <div class="_deviceList">
         <HeadlineTag value="设备列表" style="flex-shrink: 0;"></HeadlineTag>
         <div class="point_box" style="margin-top: 10px;">
-            <el-input v-model="value" placeholder="按巡查点名称搜索" />
+            <el-input v-model="value" placeholder="按设备名称搜索" />
         </div>
         <div class="scroll-view" ref="scrollViewRef" v-if="resultData.length > 0" @mouseenter="onMouseenter"
             @mouseleave="onMouseleave">
@@ -87,7 +87,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/lighting/modules/eventList.vue

@@ -73,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/message/modules/carbonEmission.vue

@@ -72,7 +72,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/message/modules/sameDay.vue

@@ -75,7 +75,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 0 - 1
src/views/system/message/modules/tiring.vue

@@ -67,7 +67,6 @@ const props = defineProps({
 
 .tect_arch_tc {
     width: 40%;
-    max-height: 100px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 3 - 1
src/views/system/passageway/access.vue

@@ -77,7 +77,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 2 - 2
src/views/system/passageway/index.vue

@@ -31,7 +31,7 @@
                       <div class="blue_dot"></div>
                     </div>
                     <div class="monit_title">空闲车位</div>
-                    <span class="monit_num">{{ leftData.Online }}</span>
+                    <span class="monit_num">{{ leftData.Online || 0 }}</span>
                   </div>
                   <div class="camera">
                     <div class="entry-box">
@@ -57,7 +57,7 @@
                       <div class="green_dot"></div>
                     </div>
                     <div class="monit_title">已占车位</div>
-                    <span class="monit_num1">{{ leftData.Offline }}</span>
+                    <span class="monit_num1">{{ leftData.Offline || 0 }}</span>
                   </div>
                 </div>
               </dv-border-box-1>

+ 3 - 1
src/views/system/passengerFlow/incident.vue

@@ -68,7 +68,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 1 - 2
src/views/system/passengerFlow/index.vue

@@ -5,10 +5,9 @@
         <div class="left_passenger_flow">
           <div class="flex_spection">
             <HeadlineTag value="客流监控"></HeadlineTag>
-            <div class="box_arch" v-if="leftData && Object.keys(leftData).length != 0">
+            <div class="box_arch">
               <monitoring :resultData="leftData"></monitoring>
             </div>
-            <Empty :bottom="true" v-else></Empty>
           </div>
           <div class="flex_spection">
             <HeadlineTag value="安全监控等级"></HeadlineTag>

+ 130 - 117
src/views/system/passengerFlow/monitoring.vue

@@ -1,12 +1,15 @@
 <template>
     <div class="person_box">
-        <div ref="chartAccess" style="width: 100%;height: 100%;"></div>
+        <div ref="chartAccess" style="width: 100%;height: 100%;"
+            v-if="resultData && Object.keys(resultData).length != 0"></div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, watch } from 'vue';
+import { ref, onMounted, watch, nextTick } from 'vue';
 import * as echarts from 'echarts'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -16,129 +19,132 @@ const props = defineProps({
 const chartAccess = ref(null);
 let chartDom = null;
 const initAccess = (arrData, timeData) => {
-    const color = ['#EAEA26', '#906BF9', '#FE5656', '#01E17E', '#3DD1F9', '#FFAD05']; //2个以上的series就需要用到color数组
-    const legend = {
-        //data,就是取得每个series里面的name属性。
-        orient: 'horizontal',
-        icon: 'circle', //图例形状
-        padding: 0,
-        top: 13,
-        left: '4%',
-        itemWidth: 10, //小圆点宽度
-        itemHeight: 10, // 小圆点高度
-        itemGap: 10, // 图例每项之间的间隔。[ default: 10 ]横向布局时为水平间隔,纵向布局时为纵向间隔。
-        textStyle: {
-            fontSize: 13,
-            color: '#ffffff',
-        },
-    };
-    const tooltip = {
-        show: true,
-        trigger: 'axis',
-        axisPointer: {
-            type: 'shadow',
-        },
-        textStyle: {
-            color: '#fafafa',
-        },
-        borderColor: 'transparent',
-        backgroundColor: 'rgba(0, 0, 0, 0.5)',
-        extraCssText: 'backdrop-filter: blur(6px);',
-    };
-    let seriesData = arrData
-    const commonConfigFn = (index) => {
-        return {
-            type: 'line',
-            smooth: true,
-            symbol: 'emptyCircle', //空心小圆点。线条小圆点形状
-            symbolSize: 4, //小圆点大小
-            itemStyle: {
-                //还是小圆点设置
-            },
-            label: {
-                show: false, //不显示小圆点上的label文字
+    if (chartAccess.value) {
+
+        const color = ['#EAEA26', '#906BF9', '#FE5656', '#01E17E', '#3DD1F9', '#FFAD05']; //2个以上的series就需要用到color数组
+        const legend = {
+            //data,就是取得每个series里面的name属性。
+            orient: 'horizontal',
+            icon: 'circle', //图例形状
+            padding: 0,
+            top: 13,
+            left: '4%',
+            itemWidth: 10, //小圆点宽度
+            itemHeight: 10, // 小圆点高度
+            itemGap: 10, // 图例每项之间的间隔。[ default: 10 ]横向布局时为水平间隔,纵向布局时为纵向间隔。
+            textStyle: {
+                fontSize: 13,
+                color: '#ffffff',
             },
-            lineStyle: {
-                width: 1, //线条设置
+        };
+        const tooltip = {
+            show: true,
+            trigger: 'axis',
+            axisPointer: {
+                type: 'shadow',
             },
-            areaStyle: {
-                //填充线条下面的面积区域颜色。(areaStyle只是锦上添花)
-                opacity: 0.2,
-                color: {
-                    type: 'linear',
-                    x: 0,
-                    y: 0,
-                    x2: 0,
-                    y2: 1,
-                    colorStops: [
-                        {
-                            offset: 0,
-                            color: color[index], // 上处的颜色
-                        },
-                        {
-                            offset: 1,
-                            color: 'transparent', // 下处的颜色
-                        },
-                    ],
-                    global: false, // 缺省为 false
-                },
+            textStyle: {
+                color: '#fafafa',
             },
+            borderColor: 'transparent',
+            backgroundColor: 'rgba(0, 0, 0, 0.5)',
+            extraCssText: 'backdrop-filter: blur(6px);',
         };
-    };
-    seriesData = seriesData.map((item, index) => ({ ...item, ...commonConfigFn(index) }));
-    if (!chartDom) {
-        chartDom = echarts.init(chartAccess.value);
-    }
-    let option = {
-        color,
-        tooltip,
-        legend,
-        grid: {
-            top: '15%',
-            left: '4%',
-            right: '4%',
-            bottom: '5%',
-            containLabel: true,
-        },
-        xAxis: {
-            show: true, //显示x轴+x轴label文字
-            type: 'category',
-            boundaryGap: false, //从Y轴出发,这个false很好的
-            axisLine: {
-                show: true, //显示x坐标轴轴线
+        let seriesData = arrData
+        const commonConfigFn = (index) => {
+            return {
+                type: 'line',
+                smooth: true,
+                symbol: 'emptyCircle', //空心小圆点。线条小圆点形状
+                symbolSize: 4, //小圆点大小
+                itemStyle: {
+                    //还是小圆点设置
+                },
+                label: {
+                    show: false, //不显示小圆点上的label文字
+                },
                 lineStyle: {
-                    color: 'rgba(255,255,255,.4)',
+                    width: 1, //线条设置
                 },
+                areaStyle: {
+                    //填充线条下面的面积区域颜色。(areaStyle只是锦上添花)
+                    opacity: 0.2,
+                    color: {
+                        type: 'linear',
+                        x: 0,
+                        y: 0,
+                        x2: 0,
+                        y2: 1,
+                        colorStops: [
+                            {
+                                offset: 0,
+                                color: color[index], // 上处的颜色
+                            },
+                            {
+                                offset: 1,
+                                color: 'transparent', // 下处的颜色
+                            },
+                        ],
+                        global: false, // 缺省为 false
+                    },
+                },
+            };
+        };
+        seriesData = seriesData.map((item, index) => ({ ...item, ...commonConfigFn(index) }));
+        if (!chartDom) {
+            chartDom = echarts.init(chartAccess.value);
+        }
+        let option = {
+            color,
+            tooltip,
+            legend,
+            grid: {
+                top: '15%',
+                left: '4%',
+                right: '4%',
+                bottom: '5%',
+                containLabel: true,
             },
-            axisTick: {
-                show: false, //不显示x坐标1cm刻度
-            },
-            axisLabel: {
-                color: '#ffffff', //x轴label文字颜色
-            },
-            splitLine: {
-                show: false, //不显示grid竖向分割线
-            },
-            data: timeData,
-        },
-        yAxis: {
-            type: 'value',
-            axisLabel: {
-                color: '#ffffff',
-            },
-            axisLine: {
-                show: true,
-                lineStyle: {
-                    color: 'rgba(255,255,255,.4)',
+            xAxis: {
+                show: true, //显示x轴+x轴label文字
+                type: 'category',
+                boundaryGap: false, //从Y轴出发,这个false很好的
+                axisLine: {
+                    show: true, //显示x坐标轴轴线
+                    lineStyle: {
+                        color: 'rgba(255,255,255,.4)',
+                    },
+                },
+                axisTick: {
+                    show: false, //不显示x坐标1cm刻度
+                },
+                axisLabel: {
+                    color: '#ffffff', //x轴label文字颜色
                 },
+                splitLine: {
+                    show: false, //不显示grid竖向分割线
+                },
+                data: timeData,
             },
-            splitLine: {
-                show: false, //不显示grid水平分割线
+            yAxis: {
+                type: 'value',
+                axisLabel: {
+                    color: '#ffffff',
+                },
+                axisLine: {
+                    show: true,
+                    lineStyle: {
+                        color: 'rgba(255,255,255,.4)',
+                    },
+                },
+                splitLine: {
+                    show: false, //不显示grid水平分割线
+                },
             },
-        },
-        series: seriesData,
-    };
-    chartDom.setOption(option)
+            series: seriesData,
+        };
+        chartDom.setOption(option)
+    }
 };
 // 生命周期
 onMounted(() => {
@@ -147,7 +153,7 @@ onMounted(() => {
     initAccess(seriesData, time)
 });
 watch(() => props.resultData, (newVal) => {
-    if (chartDom) {
+    if (newVal && Object.keys(newVal).length > 0) {
         let time = Object.keys(newVal.Type1)
         let seriesData = [
             { name: '客流1', data: Object.entries(newVal.Type1) },
@@ -155,7 +161,14 @@ watch(() => props.resultData, (newVal) => {
             { name: '客流3', data: Object.entries(newVal.Type3) },
             { name: '客流4', data: Object.entries(newVal.Type4) },
         ];
-        initAccess(seriesData, time)
+        if (newVal && chartDom == null) {
+            nextTick(() => {
+                initAccess(seriesData, time);
+            });
+        }
+        if (chartDom) {
+            initAccess(seriesData, time)
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 13 - 3
src/views/system/sceneLighting/index.vue

@@ -13,7 +13,7 @@
                 <div style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
                     <running :resultData="leftData" style="flex: 1;" />
                     <switchAll :resultData="leftData.RunAnalyse" style="flex: 1;" />
-                    <eventList :resultData="leftData.EventList" style="flex: 1;" />
+                    <eventList :resultData="leftData.EventList?.alarm" style="flex: 1;" />
                 </div>
             </template>
         </layout>
@@ -27,21 +27,31 @@ import deviceList from './modules/deviceList.vue'
 import running from './modules/running.vue'
 import eventList from './modules/eventList.vue'
 import switchAll from './modules/switchAll.vue'
-
+const route = useRoute()
 const intervalId = ref(null)
 const leftData = ref({})
 // 生命周期
 onMounted(() => {
-    intervalId.value = setInterval(getIlluminatingData, 10000);
     getIlluminatingData()
 });
 onUnmounted(() => {
     clearInterval(intervalId.value);
 })
 function getIlluminatingData() {
+    clearInterval(intervalId.value);
     getIlluminating().then((res) => {
         if (res.code == 200) {
             leftData.value = res.data
+            if (route.path == '/system/sceneLighting') {
+                intervalId.value = setInterval(getIlluminatingData, 10000);
+            } else {
+                clearInterval(intervalId.value);
+            }
+        }
+    }).catch(() => {
+        if (route.path == '/system/sceneLighting') {
+            intervalId.value = null
+            getIlluminatingData()
         }
     })
 }

+ 17 - 10
src/views/system/sceneLighting/modules/deviceList.vue

@@ -2,9 +2,10 @@
     <div class="_deviceList">
         <HeadlineTag value="设备列表" style="flex-shrink: 0;"></HeadlineTag>
         <div class="point_box" style="margin-top: 10px;">
-            <el-input v-model="value" placeholder="按巡查点名称搜索" />
+            <el-input v-model="value" placeholder="按设备名称搜索" />
         </div>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="resultData.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <el-text class="w-150px mb-2 _table_row1" truncated style="color: white;flex: .4;">
@@ -13,19 +14,21 @@
                                 <Opportunity />
                             </el-icon>
                         </el-icon>
-                        {{ item.DeviceName }}
+                        {{ item.devices_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated :class="item.SwitchStatus == 0 ? 'blue_title' : 'red_title'"
-                        style="flex: .2;">
-                        {{ item.SwitchStatus == 0 ? '开启' : '关闭' }}
+                    <el-text class="w-150px mb-2" truncated style="flex: .2;color:#fff;">
+                        {{ item.room_name }}
                     </el-text>
-                    <el-text class="w-150px mb-2" truncated
-                        :class="item.OnlinePresence == 0 ? 'blue_title' : 'red_title'" style="flex: .2">
-                        {{ item.OnlinePresence == 0 ? '在线' : '离线' }}
+                    <el-text class="w-150px mb-2" truncated :class="item.on_line == 0 ? 'blue_title' : 'red_title'"
+                        style="flex: .2">
+                        {{ item.on_line == 0 ? '在线' : '离线' }}
                     </el-text>
                 </div>
             </div>
         </div>
+        <div class="scroll-view" v-else>
+            <Empty :bottom="true"></Empty>
+        </div>
     </div>
 </template>
 
@@ -33,6 +36,7 @@
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
 import { Opportunity, Aim } from '@element-plus/icons-vue'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -83,7 +87,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -116,6 +122,7 @@ const onMouseleave = () => {
     overflow: hidden;
     display: flex;
     flex-direction: column;
+    flex: 1;
 
     &_mains {
         margin: 10px 30px;

+ 12 - 22
src/views/system/sceneLighting/modules/eventList.vue

@@ -1,45 +1,32 @@
 <template>
     <div class="_eventList">
-        <HeadlineTag type="right" value="事件列表" style="flex-shrink: 0;"></HeadlineTag>
-        <!-- 绑定鼠标移入移出事件 -->
-        <!-- <div class="_eventList_mains" ref="mainsRef" @mouseenter="pauseCarousel" @mouseleave="resumeCarousel">
-            <div :style="{ transform: `translateY(${scrollY}px)` }">
-                <div class="_eventList_mains_item" v-for="(item, index) in eventList.concat(eventList)" :key="index">
-                    <div class="_eventList_mains_item_text">
-                        <div :class="item.DeviceStatus === 0 ? '_success' : '_warning'"
-                            class="_eventList_mains_item_text_flag"></div>
-                        <el-text class="w-150px mb-2" truncated style="color: white;margin-left: 10px;">
-                            {{ item.DeviceName }}
-                        </el-text>
-                    </div>
-                    <el-text class="w-150px mb-2" truncated style="color: white;">
-                        {{ item.EventDate }}
-                    </el-text>
-                </div>
-            </div>
-        </div> -->
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <HeadlineTag type="right" value="报警记录" style="flex-shrink: 0;"></HeadlineTag>
+        <div class="scroll-view" ref="scrollViewRef" v-if="resultData.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text">
                         <div :class="item.DeviceStatus === 0 ? '_success' : '_warning'"
                             class="_eventList_mains_item_text_flag"></div>
                         <el-text class="w-150px mb-2" truncated style="color: white;margin-left: 10px;">
-                            {{ item.DeviceName }}
+                            {{ item.alarm_title }}
                         </el-text>
                     </div>
                     <el-text class="w-150px mb-2" truncated style="color: white;">
-                        {{ item.EventDate }}
+                        {{ item.alarm_create_time }}
                     </el-text>
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
+
 const props = defineProps({
     resultData: {
         type: Array,
@@ -86,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {
@@ -163,6 +152,7 @@ const onMouseleave = () => {
         }
     }
 }
+
 .header-view {
     margin-top: 10px;
     width: 100%;

+ 9 - 9
src/views/system/sceneLighting/modules/running.vue

@@ -30,15 +30,15 @@ const initAccess = () => {
             value: 0,
         },
         {
-            name: '开启数量',
+            name: '网关数量',
             value: 0,
         },
         {
-            name: '关闭数量',
+            name: '策略总量',
             value: 0,
         },
         {
-            name: '故障数量',
+            name: '报警数量',
             value: 0,
         },
     ];
@@ -259,23 +259,23 @@ const initAccess = () => {
 };
 
 watch(() => props.resultData, (newVal) => {
-    if (chartLeft) {
+    if (chartLeft && newVal && Object.keys(newVal).length != 0) {
         let data = [
             {
                 name: '设备总数',
                 value: newVal.DeviceCount,
             },
             {
-                name: '开启数量',
-                value: newVal.OpenCount,
+                name: '网关数量',
+                value: newVal.GatewayCount,
             },
             {
-                name: '关闭数量',
+                name: '策略总量',
                 value: newVal.OffCount,
             },
             {
-                name: '故障数量',
-                value: newVal.FaultCount,
+                name: '报警数量',
+                value: newVal.AlarmCount,
             },
         ];
         let arrName = getArrayValue(data, 'name');

+ 34 - 95
src/views/system/sceneLighting/modules/switchAll.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="_switchAll">
-        <HeadlineTag type="right" value="运行分析(周)"></HeadlineTag>
-        <div class="_switchAll_mains">
+        <HeadlineTag type="right" value="报警统计(月)"></HeadlineTag>
+        <div class="_switchAll_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
@@ -11,10 +12,11 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
-        type: Object,
-        default: {}
+        type: Array,
+        default: []
     }
 })
 
@@ -27,12 +29,15 @@ const generateRandomData = (length, max) => {
     }
     return randomData;
 };
- const handleResize = () => {
+const handleResize = () => {
     if (chart) {
         chart.resize();
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (xAxisData, EPEValue) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         const option = {
@@ -55,7 +60,7 @@ onMounted(() => {
             },
             xAxis: {
                 type: 'category',
-                data: [],
+                data: xAxisData,
                 axisLabel: {
                     color: '#fff'
                 },
@@ -79,11 +84,11 @@ onMounted(() => {
             },
             series: [
                 {
-                    name: '开启数量',
+                    name: '报警次数',
                     type: 'line',
                     smooth: true,
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPEValue,
                     showSymbol: false,
                     lineStyle: {
                         color: 'rgb(49, 143, 247)',
@@ -109,103 +114,37 @@ onMounted(() => {
                         shadowBlur: 10,
                     }
                 },
-                {
-                    name: '关闭数量',
-                    type: 'line',
-                    smooth: true,
-                    // data: generateRandomData(9, 60),
-                    data: [],
-                    showSymbol: false,
-                    lineStyle: {
-                        color: 'rgb(255,193,7)',
-                    },
-                    areaStyle: {
-                        color: new echarts.graphic.LinearGradient(
-                            0,
-                            0,
-                            0,
-                            1,
-                            [{
-                                offset: 0,
-                                color: 'rgba(255,193,7, 0.6)',
-                            },
-                            {
-                                offset: 0.8,
-                                color: 'rgba(255,193,7,0.2)',
-                            },
-                            ],
-                            false
-                        ),
-                        shadowColor: 'rgba(0, 0, 0, 0.1)',
-                        shadowBlur: 10,
-                    }
-                },
-                {
-                    name: '故障数量',
-                    type: 'line',
-                    smooth: true,
-                    // data: generateRandomData(9, 60),
-                    data: [],
-                    showSymbol: false,
-                    lineStyle: {
-                        color: 'rgb(244,67,54)'
-                    },
-                    areaStyle: {
-                        color: new echarts.graphic.LinearGradient(
-                            0,
-                            0,
-                            0,
-                            1,
-                            [{
-                                offset: 0,
-                                color: 'rgba(244,67,54,0.6)',
-                            },
-                            {
-                                offset: 0.8,
-                                color: 'rgba(244,67,54,0.2)',
-                            },
-                            ],
-                            false
-                        ),
-                        shadowColor: 'rgba(0, 0, 0, 0.1)',
-                        shadowBlur: 10,
-                    }
-                }
             ]
         };
-
         chart.setOption(option);
     }
     window.addEventListener('resize', handleResize);
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        let arrData = Object.keys(newVal)
+    if (newVal) {
+        let arrData = newVal
         let arr1 = []
         let arr2 = []
-        let arr3 = []
         arrData.forEach((item) => {
-            let data = Object.entries(newVal[item])
-            arr1.push(data[0][1])
-            arr2.push(data[1][1])
-            arr3.push(data[2][1])
-        })
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                name: '开启数量',
-                data: arr1,
-            }, {
-                name: '关闭数量',
-                data: arr2,
-            }, {
-                name: '故障数量',
-                data: arr3,
-            }],
+            arr1.push(item.count)
+            arr2.push(item.time)
         })
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(arr2, arr1);
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: arr2,
+                },
+                series: [{
+                    name: '报警次数',
+                    data: arr1,
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 33 - 23
src/views/system/tenement/modules/carbonEmission.vue

@@ -35,10 +35,13 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, arr1, arr2, arr3) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 生成一周的日期数据
-        const weekDays = [];
+        const weekDays = dates;
         const option = {
             xAxis: {
                 type: 'category',
@@ -89,7 +92,7 @@ onMounted(() => {
                     name: '卫生问题',
                     type: 'bar',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: arr1,
                     barWidth: '30%',
                     itemStyle: {
                         color: {
@@ -105,7 +108,7 @@ onMounted(() => {
                             }],
                             global: false // 缺省为 false
                         },
-                        borderRadius: [10, 10, 10,10]
+                        borderRadius: [10, 10, 10, 10]
                     },
                 },
                 // 曲线表示运行异常
@@ -113,7 +116,7 @@ onMounted(() => {
                     name: '安全问题',
                     type: 'line',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: arr2,
                     lineStyle: {
                         color: '#3b90d7',
                     },
@@ -144,7 +147,7 @@ onMounted(() => {
                     name: '设施设备问题',
                     type: 'line',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: arr3,
                     lineStyle: {
                         color: '#ffc107',
                     },
@@ -177,35 +180,42 @@ onMounted(() => {
         chart.setOption(option);
     }
     window.addEventListener('resize', handleResize);
-});
 
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
+    if (newVal) {
         let arrData = Object.keys(newVal)
         let arr1 = []
         let arr2 = []
         let arr3 = []
-        arrData.forEach((item)=>{
+        arrData.forEach((item) => {
             let data = Object.entries(newVal[item])
             arr1.push(data[0][1])
             arr2.push(data[1][1])
             arr3.push(data[2][1])
         })
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                name: '卫生问题',
-                data: arr1,
-            },{
-                name: '安全问题',
-                data: arr2,
-            },{
-                name: '设施设备问题',
-                data: arr3,
-            }],
-        })
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), arr1, arr2, arr3);
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    name: '卫生问题',
+                    data: arr1,
+                }, {
+                    name: '安全问题',
+                    data: arr2,
+                }, {
+                    name: '设施设备问题',
+                    data: arr3,
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 3 - 1
src/views/system/tenement/modules/eventList.vue

@@ -78,7 +78,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 30 - 19
src/views/system/tenement/modules/sameDay.vue

@@ -36,10 +36,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+
+const initChart = (dates, arr1, arr2) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 生成一周的日期数据
-        const weekDays = [];
+        const weekDays = dates;
         const option = {
             xAxis: {
                 type: 'category',
@@ -85,11 +89,11 @@ onMounted(() => {
                 },
             },
             series: [
-            {
+                {
                     name: '环境卫生满意度',
                     type: 'line',
                     // data: generateRandomData(7, 50),
-                    data:[],
+                    data: arr1,
                     lineStyle: {
                         color: '#3b90d7',
                     },
@@ -120,7 +124,7 @@ onMounted(() => {
                     name: '安全管理满意度',
                     type: 'line',
                     // data: generateRandomData(7, 50),
-                    data:[],
+                    data: arr2,
                     lineStyle: {
                         color: '#de4337',
                     },
@@ -153,30 +157,37 @@ onMounted(() => {
         chart.setOption(option);
     }
     window.addEventListener('resize', handleResize);
-});
 
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
+    if (newVal) {
         let arrData = Object.keys(newVal)
         let arr1 = []
         let arr2 = []
-        arrData.forEach((item)=>{
+        arrData.forEach((item) => {
             let data = Object.entries(newVal[item])
             arr1.push(data[0][1])
             arr2.push(data[1][1])
         })
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                name: '环境卫生满意度',
-                data: arr1,
-            },{
-                name: '安全管理满意度',
-                data: arr2,
-            }],
-        })
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), arr1, arr2);
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    name: '环境卫生满意度',
+                    data: arr1,
+                }, {
+                    name: '安全管理满意度',
+                    data: arr2,
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 3 - 1
src/views/system/tenement/modules/tiring.vue

@@ -75,7 +75,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/video/modules/eventList.vue

@@ -90,7 +90,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 7 - 5
src/views/system/video/modules/running.vue

@@ -8,13 +8,13 @@
                         <div :class="item.Id === 'on' ? '_success' : '_warning'"
                             class="_eventList_mains_item_text_flag"></div>
                         <el-text class="w-150px mb-2" truncated style="color: white;margin-left: 10px;">
-                            {{ index + 1 }}F#{{ item.Name }}
+                            {{ item.cameraName }}
                         </el-text>
                     </div>
-                    <div style="justify-content: flex-start;width: 60px;"
+                    <!-- <div style="justify-content: flex-start;width: 60px;"
                         :class="item.State == 0 ? 'blue_title' : 'red_title'">
-                        {{ item.State == 0 ? '在线' : '离线' }}</div>
-                    <div class="view_item">{{ item.Location }}</div>
+                        {{ item.State == 0 ? '在线' : '离线' }}</div> -->
+                    <div class="view_item">{{ item.cameraTypeName }}</div>
                 </div>
             </div>
         </div>
@@ -72,7 +72,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 4
src/views/system/visitor/index.vue

@@ -9,7 +9,7 @@
               <div class="point_box" style="margin-top: 10px;margin-left: 15px;">
                 <el-input v-model="input" placeholder="按访客名称搜索" />
               </div>
-              <div v-if="leftData.VisitorRegistration && leftData.VisitorRegistration.length > 0">
+              <div style="height: 100%;" v-if="leftData.VisitorRegistration && leftData.VisitorRegistration.length > 0">
                 <register :resultData="leftData.VisitorRegistration"></register>
               </div>
               <Empty :bottom="true" v-else></Empty>
@@ -28,7 +28,7 @@
               <div class="point_box" style="margin-top: 10px;margin-left: 15px;">
                 <el-input v-model="input" placeholder="按访客名称搜索" />
               </div>
-              <div v-if="leftData.VisitorsSwipeCards && leftData.VisitorsSwipeCards.length > 0">
+              <div style="height: 100%;" v-if="leftData.VisitorsSwipeCards && leftData.VisitorsSwipeCards.length > 0">
                 <swiping :resultData="leftData.VisitorsSwipeCards"></swiping>
               </div>
               <Empty :bottom="true" v-else></Empty>
@@ -54,10 +54,9 @@
           </div>
           <div class="flex_spection">
             <HeadlineTag type="right" value="通行趋势"></HeadlineTag>
-            <div class="card_visitor_star" v-if="leftData && Object.keys(leftData).length != 0">
+            <div class="card_visitor_star">
               <transit :resultData="leftData"></transit>
             </div>
-            <Empty :bottom="true" v-else></Empty>
           </div>
           <div class="flex_spection">
             <HeadlineTag type="right" value="访客身份类型占比"></HeadlineTag>

+ 3 - 1
src/views/system/visitor/register.vue

@@ -74,7 +74,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 1
src/views/system/visitor/swiping.vue

@@ -73,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 16 - 6
src/views/system/visitor/transit.vue

@@ -1,13 +1,15 @@
 <template>
     <div class="_consume_mains">
-        <div ref="chartRef" style="width: 100%; height: 100%;"></div>
+        <div ref="chartRef" style="width: 100%; height: 100%;" v-if="resultData && Object.keys(resultData).length != 0">
+        </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
-import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty';
 const props = defineProps({
     resultData: {
         type: Object,
@@ -30,11 +32,15 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -84,7 +90,7 @@ onMounted(() => {
                 {
                     name: '24小时能耗',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -120,9 +126,13 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 watch(() => props.resultData, (newVal) => {
+    if (newVal && chart == null) {
+        nextTick(() => {
+            initChart(Object.keys(newVal.PrevailingTrends), Object.entries(newVal.PrevailingTrends));
+        });
+    }
     if (chart) {
         chart.setOption({
             xAxis: {

+ 27 - 16
src/views/system/wastewater/modules/blowingIn.vue

@@ -1,16 +1,18 @@
 <template>
     <div class="_consume">
         <HeadlineTag value="集水坑高低液位趋势"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from 'vue';
+import { ref, onMounted, onUnmounted,nextTick } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,11 +35,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -87,7 +92,7 @@ onMounted(() => {
                 {
                     name: '24小时气能耗',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -123,19 +128,25 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                type: 'line',
-                data: Object.entries(newVal),
-            }],
-        })
+    if (newVal) {
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), Object.entries(newVal));
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    type: 'line',
+                    data: Object.entries(newVal),
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 2 - 2
src/views/system/wastewater/modules/consume.vue

@@ -5,7 +5,7 @@
             <div class="_running_mains_left" id="videoWidth" :style="{ '--heightRun': heightVideo + 'px' }">
                 <div class="_running_mains_left_tuan"></div>
                 <div class="_running_mains_left_conter">
-                    <div class="_running_mains_left_conter_num">{{ resultData.EnergyCount }}</div>
+                    <div class="_running_mains_left_conter_num">{{ resultData.EnergyCount || 0 }}</div>
                     <div class="_running_mains_left_conter_text">水泵总量</div>
                 </div>
             </div>
@@ -19,7 +19,7 @@
                         </el-text>
                     </div>
                     <div class="_running_mains_right_item__txt">
-                        <span>{{ item.state }}</span>
+                        <span>{{ item.state || 0 }}</span>
                         <span :style="{ color: item.color, 'font-size': '12px', 'margin-left': '5px' }">
                             {{ item.unit }}
                         </span>

+ 7 - 2
src/views/system/wastewater/modules/malfunction.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag value="水泵故障状态列表" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text view_item" style="width: 45%;">
@@ -18,12 +19,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -70,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 7 - 2
src/views/system/wastewater/modules/running.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag type="right" value="水泵运行状态列表" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text view_item" style="width: 45%;">
@@ -18,12 +19,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
 import { ref, onMounted, onUnmounted } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -70,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 26 - 15
src/views/system/wirelessIntercom/modules/blowingIn.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="_consume">
         <HeadlineTag value="对讲使用情况趋势"></HeadlineTag>
-        <div class="_consume_mains">
+        <div class="_consume_mains" v-if="resultData && Object.keys(resultData).length != 0">
             <div ref="chartRef" style="width: 100%; height: 100%;"></div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
@@ -11,6 +12,7 @@
 import { ref, onMounted, onUnmounted } from 'vue';
 import * as echarts from 'echarts';
 import HeadlineTag from '@/components/HeadlineTag';
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Object,
@@ -33,11 +35,14 @@ const handleResize = () => {
     }
 };
 onMounted(() => {
+    initChart();
+});
+const initChart = (dates, EPE) => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 修改为 24 小时
         // const hours = Array.from({ length: 24 }, (_, i) => `${i}时`);
-        const hours = []
+        const hours = dates
         const option = {
             xAxis: {
                 type: 'category',
@@ -87,7 +92,7 @@ onMounted(() => {
                 {
                     name: '24小时气能耗',
                     // data: generateRandomData(7, 50),
-                    data: [],
+                    data: EPE,
                     type: 'line',
                     showSymbol: false,
                     smooth: true,
@@ -123,19 +128,25 @@ onMounted(() => {
 
         chart.setOption(option);
     }
-});
-
+}
 watch(() => props.resultData, (newVal) => {
-    if (chart) {
-        chart.setOption({
-            xAxis: {
-                data: Object.keys(newVal),
-            },
-            series: [{
-                type: 'line',
-                data: Object.entries(newVal),
-            }],
-        })
+    if (newVal) {
+        if (newVal && chart == null) {
+            nextTick(() => {
+                initChart(Object.keys(newVal), Object.entries(newVal));
+            });
+        }
+        if (chart) {
+            chart.setOption({
+                xAxis: {
+                    data: Object.keys(newVal),
+                },
+                series: [{
+                    type: 'line',
+                    data: Object.entries(newVal),
+                }],
+            })
+        }
     }
 }, { deep: true, immediate: true } // 开启深度监听
 )

+ 2 - 2
src/views/system/wirelessIntercom/modules/consume.vue

@@ -5,7 +5,7 @@
             <div class="_running_mains_left" id="videoWidth" :style="{ '--heightRun': heightVideo + 'px' }">
                 <div class="_running_mains_left_tuan"></div>
                 <div class="_running_mains_left_conter">
-                    <div class="_running_mains_left_conter_num">{{ resultData.EnergyCount }}</div>
+                    <div class="_running_mains_left_conter_num">{{ resultData.EnergyCount || 0 }}</div>
                     <div class="_running_mains_left_conter_text">设备总量</div>
                 </div>
             </div>
@@ -19,7 +19,7 @@
                         </el-text>
                     </div>
                     <div class="_running_mains_right_item__txt">
-                        <span>{{ item.state }}</span>
+                        <span>{{ item.state || 0 }}</span>
                         <span :style="{ color: item.color, 'font-size': '12px', 'margin-left': '5px' }">
                             {{ item.unit }}
                         </span>

+ 8 - 3
src/views/system/wirelessIntercom/modules/malfunction.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag value="对讲使用信息" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text view_item" style="width: 45%;">
@@ -16,12 +17,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from "vue";
+import { ref, onMounted, onUnmounted, watch, nextTick } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -68,7 +71,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 8 - 3
src/views/system/wirelessIntercom/modules/running.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="_eventList">
         <HeadlineTag type="right" value="无线对讲设备信息" style="flex-shrink: 0;"></HeadlineTag>
-        <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
+        <div class="scroll-view" ref="scrollViewRef" v-if="data.length > 0" @mouseenter="onMouseenter"
+            @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
                     <div class="_eventList_mains_item_text view_item" style="width: 45%;">
@@ -18,12 +19,14 @@
                 </div>
             </div>
         </div>
+        <Empty :bottom="true" v-else></Empty>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, onUnmounted } from "vue";
+import { ref, onMounted, onUnmounted, watch, nextTick } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
+import Empty from '@/components/Empty'
 const props = defineProps({
     resultData: {
         type: Array,
@@ -70,7 +73,9 @@ onMounted(() => {
 })
 //判断列表是否有滚动条
 const hasScrollBar = () => {
-    return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    if (scrollViewRef.value) {
+        return scrollViewRef.value.scrollHeight > scrollViewRef.value.clientHeight;
+    }
 };
 //设置自动滚动
 const autoScrolling = () => {

+ 3 - 3
vite.config.js

@@ -26,14 +26,14 @@ export default defineConfig(({ mode, command }) => {
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy 
         '/dev-api': {
-          // target: 'http://192.168.11.46:8080',
-          target: 'http://182.43.195.17:8010',
+          target: 'http://10.1.80.103:8010',
+          // target: 'http://182.43.195.17:8010',
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, '')
         },
         '/APP': {
           // target: 'http://182.43.247.65:8081',
-          target: 'http://192.168.0.196:8000',
+          target: 'http://10.1.80.103:8070',
           changeOrigin: true,
           rewrite: (path) => path.replace(/^\/APP/, '')
         }