From e79d2888cc8f21dd9e9a2addfd33a8b2871abef6 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 15 Nov 2024 19:35:22 +0800
Subject: [PATCH] 突发事件模拟调整

---
 src/views/pd/components/dynamicPanel.vue       |   72 ++++++++++++------
 src/styles/base/dc-base.scss                   |   83 ++++++++++++++++++++
 src/styles/element/index.scss                  |   15 +++
 src/views/space/components/box/dataContent.vue |   15 ++-
 4 files changed, 152 insertions(+), 33 deletions(-)

diff --git a/src/styles/base/dc-base.scss b/src/styles/base/dc-base.scss
index 9b0e8e2..8bb2edb 100644
--- a/src/styles/base/dc-base.scss
+++ b/src/styles/base/dc-base.scss
@@ -182,6 +182,89 @@
   }
 }
 
+.dynamic-event-profile-map-popup {
+  padding: 32px 30px;
+
+  position: absolute;
+  left: 100%;
+  bottom: 0;
+  width: 320px;
+  font-weight: bold;
+  font-style: italic;
+
+  .arrow {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 45px;
+    height: 2px;
+    transform: rotate(-45deg);
+    background: red;
+    transform-origin: left bottom;
+  }
+
+  .content-wrap {
+    position: relative;
+    color: #fff;
+    background: rgba(255, 0, 0, 0.2);
+
+    &::after {
+      content: '';
+      position: absolute;
+      top: -0.8px;
+      /* 调整以匹配所需的发光区域 */
+      left: 0px;
+      /* 同上 */
+      right: 0px;
+      bottom: calc(100% - 0.8px);
+      background: white;
+      box-shadow: 0 0 8px red, inset 0 0 8px red;
+      animation: pulse-glow 3s infinite;
+    }
+
+    &::before {
+      content: '';
+      position: absolute;
+      top: calc(100% - 0.8px);
+      /* 调整以匹配所需的发光区域 */
+      left: 0px;
+      /* 同上 */
+      right: 0px;
+      bottom: -0.8px;
+      background: white;
+      box-shadow: 0 0 8px red, inset 0 0 8px red;
+      animation: pulse-glow 3s infinite;
+    }
+
+    .title {
+      position: relative;
+      height: 30px;
+      line-height: 30px;
+      font-size: 18px;
+
+
+      &::before {
+        content: '';
+        position: absolute;
+        top: calc(100% - 0.8px);
+        /* 调整以匹配所需的发光区域 */
+        left: 0px;
+        /* 同上 */
+        right: 40%;
+        bottom: -0.8px;
+        background: white;
+        box-shadow: 0 0 8px red, inset 0 0 8px red;
+        animation: pulse-glow 3s infinite;
+      }
+    }
+
+    .content {
+      text-indent: 2em;
+      line-height: 28px;
+    }
+  }
+}
+
 .widget.location-bar {
   position: absolute;
   left: 620px !important;
diff --git a/src/styles/element/index.scss b/src/styles/element/index.scss
index 2980163..f61ae32 100644
--- a/src/styles/element/index.scss
+++ b/src/styles/element/index.scss
@@ -4,7 +4,8 @@
   }
 
   background: transparent !important;
-  border: none;
+
+  // border: none;
 
   .el-table__header-wrapper {
     font-size: 18px;
@@ -16,7 +17,7 @@
 
       th {
         background: transparent !important;
-        border-color: rgba(103, 135, 214, 1);
+        border-color: rgba(103, 135, 214, 1) !important;
 
         .cell {
           color: #AFBED8;
@@ -78,3 +79,13 @@
     }
   }
 }
+
+
+.el-table--border .el-table__inner-wrapper:after,
+.el-table--border:after,
+.el-table--border:before,
+.el-table__inner-wrapper:before,
+.el-table__border-bottom-patch,
+.el-table__border-left-patch {
+  background: rgba(103, 135, 214, 1) !important;
+}
\ No newline at end of file
diff --git a/src/views/pd/components/dynamicPanel.vue b/src/views/pd/components/dynamicPanel.vue
index 54d9bb0..30a3c67 100644
--- a/src/views/pd/components/dynamicPanel.vue
+++ b/src/views/pd/components/dynamicPanel.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-11-09 15:41:35
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-14 16:58:49
+ * @LastEditTime: 2024-11-15 19:32:16
  * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
  * @Description: 
  * 
@@ -18,15 +18,17 @@
       key: 1,
       title: '典型案例1',
       content: '南片区松节油储罐区泄漏事故: 南片区某企业松节油储罐泄漏,如不采取措施,将造成污染事故,影响到赣江下游水质。',
+
+      eventProfile: '2024年11月11日11时,南片区江西殷莱特化工有限公司松节油储罐泄漏,如不采取措施,将造成污染事故,影响到赣江下游水质。',
       specificPollutantPosition: {
-        lng: 115.10038440,
-        lat: 27.27207956
+        lng: 115.10164229,
+        lat: 27.27360951
       },
       specificPollutant: '松节油,无色至淡黄色油状液体,具有松香气味。 熔点:/ 沸点:154~170℃相对密度(水=1):0.85~0.87 饱和蒸气压(kPa):2.67(51.4℃)溶解性:不溶于水,溶于乙醇、氯仿、醚等多数有机溶剂。',
 
       transitPointPosition: {
-        lng: 115.10595711,
-        lat: 27.26963563
+        lng: 115.10231042,
+        lat: 27.27352320
       },
 
       wastewaterTreatmentPosition: {
@@ -39,15 +41,18 @@
       key: 2,
       title: '典型案例2',
       content: '北片区碱类腐蚀性物质泄漏事故: 北片区某企业(位于吉兴路以北)在生产过程中操作失误,大量含碱废水泄漏,如不采取措施,将造成污染事故,影响到赣江下游水质。',
+
+      eventProfile: '2024年10月15日14时,北片区江西宏润香料有限公司在生产过程中操作失误,大量含碱废水泄漏,如不采取措施,将造成污染事故,影响到赣江下游水质。',
+
       specificPollutantPosition: {
-        lng: 115.10038440,
-        lat: 27.27207956
+        lng: 115.10446199,
+        lat: 27.28453867
       },
       specificPollutant: '液碱,无色透明液体。是重要的化工基础原料,用途极广。化学工业用于制造甲酸、草酸、硼砂、苯酚、氰化钠及肥皂、合成脂肪酸、合成洗涤剂等,呈碱性。',
 
       transitPointPosition: {
-        lng: 115.10595711,
-        lat: 27.26963563
+        lng: 115.10508747,
+        lat: 27.28393479
       },
 
       wastewaterTreatmentPosition: {
@@ -60,15 +65,18 @@
       key: 3,
       title: '典型案例3',
       content: '危险化学品运输事故: 化工集中区北区(吉兴路以南)某企业的危化品运输车辆金工大道危化品运专用运输道上发生侧翻,大量盐酸流至路面,如不采取措施,将造成污染事故,影响到赣江下游水质。',
+
+      eventProfile: '2024年11月04日18时,化工集中区北区江西迷斯婕生物科技有限公司的危化品运输车辆金工大道危化品运专用运输道上发生侧翻,大量盐酸流至路面,如不采取措施,将造成污染事故,影响到赣江下游水质。',
+
       specificPollutantPosition: {
-        lng: 115.10038440,
-        lat: 27.27207956
+        lng: 115.10392960,
+        lat: 27.28660330
       },
       specificPollutant: '盐酸是无色液体(工业用盐酸会因有杂质三价铁盐而略显黄色),为氯化氢的水溶液,具有刺激性气味。',
 
       transitPointPosition: {
-        lng: 115.10595711,
-        lat: 27.26963563
+        lng: 115.10468990,
+        lat: 27.28756147
       },
 
       wastewaterTreatmentPosition: {
@@ -81,6 +89,7 @@
 })
 let timeO = null
 let timeT = null
+let timeThree = null
 const dynamicVectorLayer = new DC.VectorLayer('dynamicVectorLayer').addTo(window.$viewer)
 const dynamicHtmlLayer = new DC.HtmlLayer('dynamicHtmlLayer').addTo(window.$viewer)
 
@@ -98,22 +107,36 @@
   })
   dynamicVectorLayer.addOverlay(circle)
 
-
+  let divContent = new DC.DivIcon(
+    new DC.Position(item.specificPollutantPosition.lng, item.specificPollutantPosition.lat, 70),
+    `<div class="dynamic-event-profile-map-popup">
+          <div class="content-wrap">
+            <div class="title">事件概况</div>
+            <div class="content">
+              ${item.eventProfile}
+            </div>
+          </div>
+          <div class="arrow"></div>
+      </div>`
+  )
+  dynamicHtmlLayer.addOverlay(divContent)
 
   window.$viewer.flyToPosition(new DC.Position(item.specificPollutantPosition.lng, item.specificPollutantPosition.lat, 400, 0, -90, 0), () => { }, 3)
 
-  let divIcon = new DC.DivIcon(
-    new DC.Position(item.specificPollutantPosition.lng, item.specificPollutantPosition.lat, 0),
-    `<div class="dynamic-map-popup">
+  timeO = setTimeout(() => {
+    let divIcon = new DC.DivIcon(
+      new DC.Position(item.specificPollutantPosition.lng, item.specificPollutantPosition.lat, 70),
+      `<div class="dynamic-map-popup">
           <div class="title">特征污染物</div>
           <div class="content">
             ${item.specificPollutant}
           </div>
       </div>`
-  )
-  dynamicHtmlLayer.addOverlay(divIcon)
+    )
+    dynamicHtmlLayer.addOverlay(divIcon)
+  }, 5000)
 
-  timeO = setTimeout(() => {
+  timeT = setTimeout(() => {
     window.$viewer.flyToPosition(new DC.Position(item.transitPointPosition.lng, item.transitPointPosition.lat, 400, 0, -90, 0), () => {
 
       let centerT = DC.Position.fromObject(item.transitPointPosition)
@@ -129,9 +152,9 @@
       dynamicVectorLayer.addOverlay(circleT)
 
     }, 3)
-  }, 5000)
+  }, 10000)
 
-  timeT = setTimeout(() => {
+  timeThree = setTimeout(() => {
     window.$viewer.flyToPosition(new DC.Position(item.wastewaterTreatmentPosition.lng, item.wastewaterTreatmentPosition.lat, 400, 0, -90, 0), () => {
       let centerThree = DC.Position.fromObject(item.wastewaterTreatmentPosition)
       let circleThree = new DC.Circle(centerThree, 30)
@@ -145,7 +168,7 @@
       dynamicVectorLayer.addOverlay(circleThree)
 
       let divIconT = new DC.DivIcon(
-        new DC.Position(item.wastewaterTreatmentPosition.lng, item.wastewaterTreatmentPosition.lat, 0),
+        new DC.Position(item.wastewaterTreatmentPosition.lng, item.wastewaterTreatmentPosition.lat, 70),
         `<div class="dynamic-map-popup">
               <div class="title">绿源进水口</div>
               <div class="content">
@@ -155,12 +178,13 @@
       )
       dynamicHtmlLayer.addOverlay(divIconT)
     }, 3)
-  }, 10000)
+  }, 15000)
 }
 
 const clearAll = () => {
   clearTimeout(timeO)
   clearTimeout(timeT)
+  clearTimeout(timeThree)
   dynamicVectorLayer.clear()
   dynamicHtmlLayer.clear()
 }
diff --git a/src/views/space/components/box/dataContent.vue b/src/views/space/components/box/dataContent.vue
index b40461b..5ecaab6 100644
--- a/src/views/space/components/box/dataContent.vue
+++ b/src/views/space/components/box/dataContent.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2023-03-13 14:54:26
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-12 18:31:08
+ * @LastEditTime: 2024-11-15 14:58:23
  * @FilePath: \bigScreen\src\views\space\components\box\dataContent.vue
  * @Description: 
  * 
@@ -45,7 +45,7 @@
   total: 0,
 }
 
-function positionColor() {
+function positionColor () {
   return (row) => {
     if (
       (row.X && row.X != 0) ||
@@ -60,7 +60,7 @@
   }
 }
 
-function positionDisabled() {
+function positionDisabled () {
   return (row) => {
     if (
       (row.X && row.X != 0) ||
@@ -112,7 +112,7 @@
 
 
 // 行点击
-function rowClick(row) {
+function rowClick (row) {
 
   // if (state.layer) {
   //   window.$viewer.removeLayer(state.layer)
@@ -139,7 +139,7 @@
 
 
 // 查看详情
-function goDetail(row) { }
+function goDetail (row) { }
 
 const searchBtn = (params) => {
   resetPage()
@@ -181,10 +181,11 @@
 
 <template>
   <div class="w100 h0 flex-1 flex f-d-c">
-    <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn" ref="SeachBarCondition"></global-search>
+    <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn"
+      ref="SeachBarCondition"></global-search>
 
     <div class="h0 flex-1 table-content" ref="TableContent">
-      <el-table :data="tableData" :height="curTableHeight" style="width: 100%" v-loading="loading">
+      <el-table border :data="tableData" :height="curTableHeight" style="width: 100%" v-loading="loading">
         <el-table-column prop="name" label="名称" />
         <el-table-column prop="emergencySpaceType" label="类型" width="70" />
         <el-table-column prop="mainFuncName" label="作用" width="60" />

--
Gitblit v1.9.3