CzRger пре 4 дана
родитељ
комит
3117c4dbff
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      src/views/web/warning/index.vue

+ 4 - 4
src/views/web/warning/index.vue

@@ -53,7 +53,7 @@
                 <div class="info-detail">
                   <div class="info-item">预警名称:<div>{{item.ruleName}}</div></div>
                   <div class="info-item">预警时间:<div>{{$util.YMDHms(item.warnTime)}}</div></div>
-                  <div class="info-item">预警区域:<div>{{item.areaName}}</div><span class="__hover" style="color: #1CFEFF; margin-left: 10px;margin-right: 10px;"><SvgIcon name="eye" color="#ffffff" @click="toArea(item)"/></span></div>
+                  <div class="info-item" v-if="item.areaId">预警区域:<div>{{item.areaName}}</div><span class="__hover" style="color: #1CFEFF; margin-left: 10px;margin-right: 10px;"><SvgIcon name="eye" color="#ffffff" @click="toArea(item)"/></span></div>
                 </div>
               </div>
             </div>
@@ -172,7 +172,7 @@ const props = defineProps({
 })
 const state: any = reactive({
   layout: {
-    width: 440,
+    width: 480,
     left: 85,
     top: 110
   },
@@ -290,7 +290,7 @@ const onMore = () => {
 }
 const toArea = (row) => {
   const s = state.layers.area.getSource()
-  const id = row.areaId || 'f7a4952b076a4079aff40ec8cc143035'
+  const id = row.areaId
   if (s.getFeatureById(id)) {
     s.removeFeature(s.getFeatureById(id))
   } else {
@@ -318,7 +318,7 @@ const toTrack = (ship, warning) => {
 }
 const onClose = () => {
   emit('update:show', false)
-  state.layers.area.getSource().clear()
+  state.layers.area?.getSource().clear()
 }
 watch(() => ShipMapStore.warningParams, (n) => {
   if (n) {