Parcourir la source

Merge branch 'dev-bxy' into 'dev'

style: 灾害防范总览天气信息等样式修改

See merge request product-group-fe/sfy-safety-group/sfy-safety!153
毕欣怡 il y a 9 mois
Parent
commit
08383c2348

BIN
src/assets/images/weather-icons/default.png


BIN
src/assets/images/weather-icons/defaultIcon.png


+ 0 - 1
src/components/monitor-camera-edit/UpdateMonitorArea.vue

@@ -5,7 +5,6 @@
     width="700px"
     @close="handleClose"
     class="update-monitor-dialog"
-    append-to-body
   >
     <div class="camera-items">
       <el-input class="search-bar" v-model="searchQuery" placeholder="请输入搜索内容" clearable :prefix-icon="Search" />

+ 11 - 6
src/views/disaster/overview/components/WeatherCard.vue

@@ -42,10 +42,15 @@
   const measureInfo = ref<string | undefined>('');
 
   const weatherInfo = ref({
-    type: 'storm',
-    temperature: 26,
-    humidity: 91,
-    windSpeed: '东北风3级',
+    // type: 'storm',
+    // temperature: 26,
+    // humidity: 91,
+    // windSpeed: '东北风3级',
+    // warning: '',
+    type: '',
+    temperature: undefined,
+    humidity: undefined,
+    windSpeed: '',
     warning: '',
   });
 
@@ -64,7 +69,7 @@
     const normalMeasure = disasterMeasureDic.value.find((item) => item.itemCode === 'normal_measure');
 
     if (weekDisasterInfoList.length === 0) {
-      weatherInfo.value.warning = '';
+      weatherInfo.value.warning = '未发布灾害预警';
       measureInfo.value = normalMeasure?.itemValue;
       measureTitle.value = '安全提示';
     } else {
@@ -80,7 +85,7 @@
           measureTitle.value = targetMeasure ? '应急提示' : '安全提示';
         }
       } else {
-        weatherInfo.value.warning = '';
+        weatherInfo.value.warning = '未发布灾害预警';
         measureInfo.value = normalMeasure?.itemValue;
         measureTitle.value = '安全提示';
       }

+ 7 - 7
src/views/disaster/overview/components/weather-info/WeatherInfo.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="weather-container">
-    <div class="background-effects">
+    <div class="background-effects" v-if="type">
       <Lightning v-if="isThunderstorm" />
       <Snow v-else-if="isSnow" />
       <Rain v-else-if="isRain" />
@@ -14,13 +14,13 @@
     </div>
     <div class="weather-details">
       <div v-if="warning" class="weather-warning">{{ warning }}</div>
-      <div class="weather-type">{{ weatherKeyToChinese[type as WeatherType] }}</div>
-      <div class="details">
+      <div v-if="type" class="weather-type">{{ weatherKeyToChinese[type as WeatherType] }}</div>
+      <div v-if="temperature" class="details">
         <div class="temperature">
           {{ temperature }}
           <span class="tem-unit">°C</span>
         </div>
-        <div class="other-info">
+        <div v-if="humidity || windSpeed" class="other-info">
           <div>湿度:{{ humidity }}%</div>
           <div>风速:{{ windSpeed }}</div>
         </div>
@@ -41,9 +41,9 @@
 
   interface WeatherProps {
     type?: string;
-    temperature: number;
-    humidity: number;
-    windSpeed: string;
+    temperature?: number | undefined;
+    humidity?: number | undefined;
+    windSpeed?: string;
     warning?: string;
   }
   const props = defineProps<WeatherProps>();

+ 19 - 14
src/views/emergency/command-center/components/MonitorCameras.vue

@@ -1,20 +1,20 @@
 <template>
   <div class="monitor-cameras-container">
     <div class="main-camera">
-      <LiveVideo
-        v-if="curPlayingCamera && getCameraUrl(curPlayingCamera)"
-        :url="getCameraUrl(curPlayingCamera)"
-        :poster="getCameraImg(curPlayingCamera)"
-        :id="`monitor-livevideo`"
-        class="main-video"
-      />
-      <img
-        v-if="curPlayingCamera && !getCameraUrl(curPlayingCamera)"
-        src="@/assets/images/disaster-overview/full-screen.png"
-        alt=""
-        class="full-screen"
-        @click="isFullScreen ? exitFullscreen() : fullScreen(`monitor-livevideo`, 'overview-monitor')"
-      />
+      <div class="has-main-camera" v-if="curPlayingCamera && getCameraUrl(curPlayingCamera)">
+        <LiveVideo
+          :url="getCameraUrl(curPlayingCamera)"
+          :poster="getCameraImg(curPlayingCamera)"
+          :id="`monitor-livevideo`"
+          class="main-video"
+        />
+        <img
+          src="@/assets/images/disaster-overview/full-screen.png"
+          alt=""
+          class="full-screen"
+          @click="isFullScreen ? exitFullscreen() : fullScreen(`monitor-livevideo`, 'overview-monitor')"
+        />
+      </div>
       <div class="no-main-camera" v-if="!curPlayingCamera || !getCameraUrl(curPlayingCamera)">
         <img class="cameraEmptyImg" src="@/assets/icons/nine-square-grid/cameraEmpty.png" />
         <span>暂无监控相机画面</span>
@@ -175,6 +175,11 @@
     .main-camera {
       width: 100%;
       height: calc(100% - 220px);
+    }
+
+    .has-main-camera {
+      width: 100%;
+      height: 100%;
       position: relative;
 
       .main-video {

+ 2 - 2
src/views/emergency/emergency-procedure/config/table.ts

@@ -3,8 +3,8 @@
  */
 import type { TableColumnProps } from '@/types/basic-table';
 
-export const PROCEDURE_LIST_TABLE_MAX_HEIGHT_DEFAULT = 'calc(70vh - 0px)';
-export const PROCEDURE_LIST_TABLE_MAX_HEIGHT_PERMISSION = 'calc(70vh - 60px)';
+export const PROCEDURE_LIST_TABLE_MAX_HEIGHT_DEFAULT = 'calc(70vh - 60px)';
+export const PROCEDURE_LIST_TABLE_MAX_HEIGHT_PERMISSION = 'calc(70vh - 160px)';
 
 // 基础表格样式配置
 const TABLE_OPTIONS = {