Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 1 day ago
parent
commit
cd5142c22c

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/clound.svg


+ 5 - 0
src/assets/icons/detail.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="15.427" height="16" viewBox="0 0 15.427 16">
+  <g id="详情" transform="translate(-1636 -15.09)">
+    <path id="路径_57119" data-name="路径 57119" d="M109.074,76.281l2.189,2.19a.561.561,0,1,1-.794.794l-2.189-2.19a3.429,3.429,0,1,1,.794-.794Zm.641-5.018a4.592,4.592,0,0,0-1.143-.937V65.715a.569.569,0,0,0-.567-.572H97.71a.573.573,0,0,0-.567.571V78.286a.569.569,0,0,0,.567.571H108a.573.573,0,0,0,.567-.571v-.041l.042-.025,1.032,1.032a1.146,1.146,0,0,1-1.077.747H97.146A1.145,1.145,0,0,1,96,78.862V65.137A1.141,1.141,0,0,1,97.146,64h11.423a1.145,1.145,0,0,1,1.146,1.138Zm-3.449,5.289a2.286,2.286,0,1,0-2.286-2.286A2.286,2.286,0,0,0,106.266,76.551ZM98.286,68a.575.575,0,0,1,.573-.571h5.712a.571.571,0,1,1,0,1.143H98.858A.571.571,0,0,1,98.286,68Zm0,2.286a.573.573,0,0,1,.57-.571h3.432a.571.571,0,0,1,0,1.143H98.855a.569.569,0,0,1-.57-.571Z" transform="translate(1540 -48.91)" fill="#fff"/>
+  </g>
+</svg>

+ 3 - 0
src/assets/icons/rain.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="19.168" height="15.976" viewBox="0 0 19.168 15.976">
+  <path id="雨" d="M4.393,12.89a1.044,1.044,0,0,0-1.04,1.04v1.023a1.03,1.03,0,0,0,1.04,1.023A1.012,1.012,0,0,0,5.4,14.953V13.93a1.026,1.026,0,0,0-1.006-1.04Zm3.87,0a1.023,1.023,0,0,0-1.04,1.04v1.023a1.009,1.009,0,0,0,1.04,1.023,1,1,0,0,0,.989-1.023V13.93a1.012,1.012,0,0,0-.989-1.04Zm3.734,0a1.033,1.033,0,0,0-1.04,1.04v1.023A1.019,1.019,0,0,0,12,15.976a1.041,1.041,0,0,0,1.04-1.023V13.93A1.055,1.055,0,0,0,12,12.89ZM12.936,0A6.73,6.73,0,0,0,6.763,4.092c-.119.239-.2.563-.324.887A5,5,0,0,0,4.1,4.314,3.653,3.653,0,0,0,1.393,5.541,3.342,3.342,0,0,0,.455,7.348,3.574,3.574,0,0,0,1.87,11.185a4.12,4.12,0,0,0,1.859.6h11.68a.286.286,0,0,0,.2-.051,4.492,4.492,0,0,0,2.421-1.313,5.894,5.894,0,0,0,1.5-4.007A6.5,6.5,0,0,0,12.936,0Zm3.717,9.156a2.655,2.655,0,0,1-1.313.716H3.728a3.049,3.049,0,0,1-.818-.239A1.676,1.676,0,0,1,2.3,7.707a2.483,2.483,0,0,1,.375-.818c.034,0,.034-.017.034-.017a1.945,1.945,0,0,1,1.4-.7,3.4,3.4,0,0,1,1.876.784c.017,0,.017.051.051.051l.409.307a.931.931,0,0,0,.87.085.768.768,0,0,0,.563-.614c.136-.546.443-1.569.6-1.961a4.906,4.906,0,0,1,4.467-2.95,4.631,4.631,0,0,1,4.723,4.535,3.949,3.949,0,0,1-1.006,2.745ZM15.528,12.89a1.037,1.037,0,0,0-1.057,1.04v1.023a1.023,1.023,0,0,0,1.057,1.023,1.012,1.012,0,0,0,1.006-1.023V13.93A1.026,1.026,0,0,0,15.528,12.89Z" transform="translate(-0.366)"/>
+</svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/snow.svg


+ 18 - 41
src/assets/icons/sun.svg

@@ -1,42 +1,19 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 60 60" style="enable-background: new 0 0 60 60;" xml:space="preserve">
-<g>
-	<path style="fill: #F0C419;" d="M30,0c-0.552,0-1,0.448-1,1v6c0,0.552,0.448,1,1,1s1-0.448,1-1V1C31,0.448,30.552,0,30,0z"/>
-	<path style="fill: #F0C419;" d="M30,52c-0.552,0-1,0.448-1,1v6c0,0.552,0.448,1,1,1s1-0.448,1-1v-6C31,52.448,30.552,52,30,52z"/>
-	<path style="fill: #F0C419;" d="M59,29h-6c-0.552,0-1,0.448-1,1s0.448,1,1,1h6c0.552,0,1-0.448,1-1S59.552,29,59,29z"/>
-	<path style="fill: #F0C419;" d="M8,30c0-0.552-0.448-1-1-1H1c-0.552,0-1,0.448-1,1s0.448,1,1,1h6C7.552,31,8,30.552,8,30z"/>
-	<path style="fill: #F0C419;" d="M46.264,14.736c0.256,0,0.512-0.098,0.707-0.293l5.736-5.736c0.391-0.391,0.391-1.023,0-1.414
-		s-1.023-0.391-1.414,0l-5.736,5.736c-0.391,0.391-0.391,1.023,0,1.414C45.752,14.639,46.008,14.736,46.264,14.736z"/>
-	<path style="fill: #F0C419;" d="M13.029,45.557l-5.736,5.736c-0.391,0.391-0.391,1.023,0,1.414C7.488,52.902,7.744,53,8,53
-		s0.512-0.098,0.707-0.293l5.736-5.736c0.391-0.391,0.391-1.023,0-1.414S13.42,45.166,13.029,45.557z"/>
-	<path style="fill: #F0C419;" d="M46.971,45.557c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414l5.736,5.736
-		C51.488,52.902,51.744,53,52,53s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L46.971,45.557z"/>
-	<path style="fill: #F0C419;" d="M8.707,7.293c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414l5.736,5.736
-		c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L8.707,7.293z"/>
-	<path style="fill: #F0C419;" d="M50.251,21.404c0.162,0.381,0.532,0.61,0.921,0.61c0.13,0,0.263-0.026,0.39-0.08l2.762-1.172
-		c0.508-0.216,0.746-0.803,0.53-1.311s-0.804-0.746-1.311-0.53l-2.762,1.172C50.272,20.309,50.035,20.896,50.251,21.404z"/>
-	<path style="fill: #F0C419;" d="M9.749,38.596c-0.216-0.508-0.803-0.746-1.311-0.53l-2.762,1.172
-		c-0.508,0.216-0.746,0.803-0.53,1.311c0.162,0.381,0.532,0.61,0.921,0.61c0.13,0,0.263-0.026,0.39-0.08l2.762-1.172
-		C9.728,39.691,9.965,39.104,9.749,38.596z"/>
-	<path style="fill: #F0C419;" d="M54.481,38.813L51.7,37.688c-0.511-0.207-1.095,0.041-1.302,0.553
-		c-0.207,0.512,0.041,1.095,0.553,1.302l2.782,1.124c0.123,0.049,0.25,0.073,0.374,0.073c0.396,0,0.771-0.236,0.928-0.626
-		C55.241,39.603,54.994,39.02,54.481,38.813z"/>
-	<path style="fill: #F0C419;" d="M5.519,21.188L8.3,22.312c0.123,0.049,0.25,0.073,0.374,0.073c0.396,0,0.771-0.236,0.928-0.626
-		c0.207-0.512-0.041-1.095-0.553-1.302l-2.782-1.124c-0.513-0.207-1.095,0.04-1.302,0.553C4.759,20.397,5.006,20.98,5.519,21.188z"
-		/>
-	<path style="fill: #F0C419;" d="M39.907,50.781c-0.216-0.508-0.803-0.745-1.311-0.53c-0.508,0.216-0.746,0.803-0.53,1.311
-		l1.172,2.762c0.162,0.381,0.532,0.61,0.921,0.61c0.13,0,0.263-0.026,0.39-0.08c0.508-0.216,0.746-0.803,0.53-1.311L39.907,50.781z"
-		/>
-	<path style="fill: #F0C419;" d="M21.014,9.829c0.13,0,0.263-0.026,0.39-0.08c0.508-0.216,0.746-0.803,0.53-1.311l-1.172-2.762
-		c-0.215-0.509-0.802-0.747-1.311-0.53c-0.508,0.216-0.746,0.803-0.53,1.311l1.172,2.762C20.254,9.6,20.625,9.829,21.014,9.829z"/>
-	<path style="fill: #F0C419;" d="M21.759,50.398c-0.511-0.205-1.095,0.04-1.302,0.553l-1.124,2.782
-		c-0.207,0.512,0.041,1.095,0.553,1.302c0.123,0.049,0.25,0.073,0.374,0.073c0.396,0,0.771-0.236,0.928-0.626l1.124-2.782
-		C22.519,51.188,22.271,50.605,21.759,50.398z"/>
-	<path style="fill: #F0C419;" d="M38.615,9.675c0.396,0,0.771-0.236,0.928-0.626l1.124-2.782c0.207-0.512-0.041-1.095-0.553-1.302
-		c-0.511-0.207-1.095,0.041-1.302,0.553L37.688,8.3c-0.207,0.512,0.041,1.095,0.553,1.302C38.364,9.651,38.491,9.675,38.615,9.675z"
-		/>
-</g>
-<circle style="fill: #F0C419;" cx="30" cy="30" r="20"/>
-<circle style="fill: #EDE21B;" cx="30" cy="30" r="15"/>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.168" height="19.187" viewBox="0 0 19.168 19.187">
+  <defs>
+    <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#ffc69c"/>
+      <stop offset="1" stop-color="#ff8025"/>
+    </linearGradient>
+  </defs>
+  <g id="晴" transform="translate(-80.025 -89.6)">
+    <path id="路径_57108" data-name="路径 57108" d="M254.376,265.256m-5.736,0a5.736,5.736,0,1,0,5.736-5.736A5.736,5.736,0,0,0,248.64,265.256Z" transform="translate(-164.785 -166.06)" fill="url(#linear-gradient)"/>
+    <path id="路径_57109" data-name="路径 57109" d="M478.08,89.6m.727,0h0a.643.643,0,0,1,.727.727V91.7a.643.643,0,0,1-.727.727h0a.643.643,0,0,1-.727-.727V90.327A.643.643,0,0,1,478.807,89.6Z" transform="translate(-389.012)" fill="url(#linear-gradient)"/>
+    <path id="路径_57110" data-name="路径 57110" d="M704.873,192.422m.522.506h0a.643.643,0,0,1,.016,1.028l-.956.987a.643.643,0,0,1-1.028.016h0a.643.643,0,0,1-.016-1.028l.956-.987A.643.643,0,0,1,705.4,192.928Z" transform="translate(-608.981 -100.486)" fill="url(#linear-gradient)"/>
+    <path id="路径_57111" data-name="路径 57111" d="M802.1,475.633m.023.727h0a.643.643,0,0,1-.7.749l-1.373.043a.643.643,0,0,1-.749-.7h0a.643.643,0,0,1,.7-.749l1.373-.043A.643.643,0,0,1,802.126,476.36Z" transform="translate(-702.934 -377.263)" fill="url(#linear-gradient)"/>
+    <path id="路径_57112" data-name="路径 57112" d="M708,707.9m-.489.538h0a.643.643,0,0,1-1.027.048l-1.016-.925a.643.643,0,0,1-.048-1.027h0a.643.643,0,0,1,1.027-.048l1.016.925A.643.643,0,0,1,707.515,708.433Z" transform="translate(-610.964 -602.639)" fill="url(#linear-gradient)"/>
+    <path id="路径_57113" data-name="路径 57113" d="M483.03,812.431m-.726.046h0a.643.643,0,0,1-.771-.68l-.086-1.371a.643.643,0,0,1,.68-.771h0a.643.643,0,0,1,.771.68l.086,1.371A.643.643,0,0,1,482.3,812.477Z" transform="translate(-392.301 -703.694)" fill="url(#linear-gradient)"/>
+    <path id="路径_57114" data-name="路径 57114" d="M207.988,725.9m-.553-.472h0a.642.642,0,0,1-.08-1.025l.893-1.045a.643.643,0,0,1,1.025-.08h0a.643.643,0,0,1,.08,1.025l-.892,1.045A.643.643,0,0,1,207.436,725.429Z" transform="translate(-124.225 -619.07)" fill="url(#linear-gradient)"/>
+    <path id="路径_57115" data-name="路径 57115" d="M80.1,503.843m-.068-.724h0a.643.643,0,0,1,.656-.792l1.368-.129a.643.643,0,0,1,.792.656h0a.643.643,0,0,1-.656.792l-1.368.129A.643.643,0,0,1,80.03,503.119Z" transform="translate(0 -403.219)" fill="url(#linear-gradient)"/>
+    <path id="路径_57116" data-name="路径 57116" d="M157.32,227.821m.455-.567h0a.643.643,0,0,1,1.022-.112l1.072.859a.643.643,0,0,1,.112,1.022h0a.643.643,0,0,1-1.022.112l-1.072-.859A.643.643,0,0,1,157.775,227.254Z" transform="translate(-75.539 -134.219)" fill="url(#linear-gradient)"/>
+  </g>
 </svg>

+ 3 - 0
src/assets/icons/wind.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="19.168" height="12.848" viewBox="0 0 19.168 12.848">
+  <path id="风" d="M7.395,127.109a2.113,2.113,0,0,1,.17-.852A2.221,2.221,0,0,1,8.724,125.1a2.113,2.113,0,0,1,.852-.17,2.071,2.071,0,0,1,.835.17,2.221,2.221,0,0,1,1.159,1.159,2.194,2.194,0,0,1,0,1.7,2.092,2.092,0,0,1-.469.69,2.293,2.293,0,0,1-.69.46,2.071,2.071,0,0,1-.835.17h-.2a.456.456,0,0,1-.17-.034H1.073v-2.13H7.395Zm4.379,6.441a2.125,2.125,0,0,1,1.951,2.939,2,2,0,0,1-.452.665,2.3,2.3,0,0,1-.673.452,2.089,2.089,0,0,1-1.653,0,2.143,2.143,0,0,1-1.116-1.116,2.011,2.011,0,0,1-.17-.826v-.017H0v-2.13H11.739v.034h.034Zm4.737-6.458a2.538,2.538,0,0,1,1.031.213,2.658,2.658,0,0,1,.843.579,2.839,2.839,0,0,1,.571.852,2.538,2.538,0,0,1,.213,1.031,2.58,2.58,0,0,1-.213,1.048,2.69,2.69,0,0,1-1.414,1.414,2.538,2.538,0,0,1-1.031.213H0v-2.13H13.886a2.778,2.778,0,0,1-.051-.545,2.538,2.538,0,0,1,.213-1.031,2.839,2.839,0,0,1,.571-.852,2.658,2.658,0,0,1,.843-.579A2.58,2.58,0,0,1,16.51,127.092Z" transform="translate(0 -124.928)"/>
+</svg>

BIN
src/assets/images/border.png


BIN
src/assets/images/tab-1.png


BIN
src/assets/images/tab-2.png


+ 299 - 0
src/layouts/default/header/components/weatherBroadcast.vue

@@ -0,0 +1,299 @@
+<template>
+  <div>
+    <div class="btn" @click="showWarningBroad">
+      <!-- <div>语音播报</div>
+    <a-badge :count="10">
+      <a href="#" class="head-example"></a>
+    </a-badge> -->
+      <div style="display: flex; flex-direction: row; justify-content: space-between" class="btn-header">
+        <img :src="parseWeatherData(weatherObj.text)" class="weather-icon" />
+        <span class="unit">{{ weatherObj.pressure }} Pa</span>
+        <FileSearchOutlined style="font-size: 18px; color: #fff; line-height: 50px" />
+      </div>
+    </div>
+    <div v-if="isShowWeatherBroad" class="broadcast" ref="VoiceBroadcastRef" id="VoiceBroadcast">
+      <div class="title">
+        <div class="message-title">详情</div>
+      </div>
+      <div class="broadcast-context">
+        <div class="context-tab">
+          <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 0 }" @click="toSelectList(0)"> 温度</div>
+          <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 1 }" @click="toSelectList(1)"> 气压</div>
+          <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 2 }" @click="toSelectList(2)"> 风力</div>
+        </div>
+        <div class="context-box">
+          <div class="echarts-box">
+            <BarAndLine
+              v-if="activeKey == 0"
+              xAxisPropType="fxTime"
+              height="240px"
+              :dataSource="monitorData"
+              :chartsColumns="ChartsColumnsWD"
+              :option="Option"
+            />
+            <BarAndLine
+              v-if="activeKey == 1"
+              xAxisPropType="fxTime"
+              height="240px"
+              :dataSource="monitorData"
+              :chartsColumns="ChartsColumnsQY"
+              :option="Option"
+            />
+            <BarAndLine
+              v-if="activeKey == 2"
+              xAxisPropType="fxTime"
+              height="240px"
+              :dataSource="monitorData"
+              :chartsColumns="ChartsColumnsFL"
+              :option="Option"
+            />
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script lang="ts">
+import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import { Tooltip, Badge } from 'ant-design-vue';
+import { SoundOutlined, ClearOutlined, FileSearchOutlined, WarningOutlined } from '@ant-design/icons-vue';
+import Icon from '/@/components/Icon';
+import { defineComponent, ref, onMounted, nextTick } from 'vue';
+import { defHttp } from '/@/utils/http/axios';
+import { useDrag } from '@/hooks/event/useDrag';
+
+export default defineComponent({
+  name: 'VoiceBroadcast',
+  components: { Icon, Tooltip, Badge, SoundOutlined, ClearOutlined, FileSearchOutlined, WarningOutlined, BarAndLine },
+
+  setup() {
+    const getWeather = () => defHttp.post({ url: '/safety/ventanalyDevice/getWeatherData' });
+    const activeKey = ref(0);
+    const isShowWeatherBroad = ref(false);
+    const monitorData = ref<any[]>([]);
+
+    const ChartsColumnsWD = [
+      {
+        legend: '温度',
+        seriesName: '(℃)',
+        ymax: 0.8,
+        yname: '℃',
+        linetype: 'line',
+        yaxispos: 'left',
+        color: '#00FFA8',
+        sort: 1,
+        xRotate: 0,
+        dataIndex: 'temp',
+      },
+    ];
+    const ChartsColumnsQY = [
+      {
+        legend: '气压',
+        seriesName: '(Pa)',
+        ymax: 0.8,
+        yname: 'Pa',
+        linetype: 'line',
+        yaxispos: 'left',
+        color: '#00FFA8',
+        sort: 1,
+        xRotate: 0,
+        dataIndex: 'pressure',
+      },
+    ];
+    const ChartsColumnsFL = [
+      {
+        legend: '风力',
+        seriesName: '(等级)',
+        ymax: 0.8,
+        yname: '等级',
+        linetype: 'line',
+        yaxispos: 'left',
+        color: '#00FFA8',
+        sort: 1,
+        xRotate: 0,
+        dataIndex: 'widnScale',
+      },
+    ];
+
+    const Option = {
+      grid: {
+        top: '20%',
+        left: '5%',
+        right: '5%',
+        bottom: '3%',
+        containLabel: true,
+      },
+      toolbox: {
+        feature: null,
+      },
+    };
+    const weatherObj = ref({
+      cloud: '',
+      dew: '',
+      fxTime: '',
+      humidity: '',
+      icon: '',
+      pop: '',
+      precip: '',
+      pressure: '',
+      temp: '',
+      text: '',
+      wind360: '',
+      windDir: '',
+      windScale: '',
+      windSpeed: '',
+    });
+
+    const iconMap = {
+      晴: new URL('../../../../assets/icons/sun.svg', import.meta.url).href,
+      雨: new URL('../../../../assets/icons/rain.svg', import.meta.url).href,
+      雪: new URL('../../../../assets/icons/snow.svg', import.meta.url).href,
+      多云: new URL('../../../../assets/icons/cloud.svg', import.meta.url).href,
+      风: new URL('../../../../assets/icons/wind.svg', import.meta.url).href,
+    };
+
+    function parseWeatherData(res) {
+      return iconMap[res] || new URL('../../../../assets/icons/sun.svg', import.meta.url).href;
+    }
+    function showWarningBroad() {
+      isShowWeatherBroad.value = !isShowWeatherBroad.value;
+      if (isShowWeatherBroad.value) {
+        toSelectList(0);
+
+        nextTick(() => {
+          const dom = document.getElementById('VoiceBroadcast');
+          if (dom) useDrag(dom);
+        });
+      }
+    }
+    async function toSelectList(key) {
+      activeKey.value = key;
+    }
+    async function getWeatherInfo() {
+      const res = await getWeather();
+
+      weatherObj.value = JSON.parse(res.weatherDataNow);
+      monitorData.value = JSON.parse(res.weatherData);
+    }
+    onMounted(() => {
+      nextTick(async () => {
+        await getWeatherInfo();
+      });
+    });
+
+    return {
+      showWarningBroad,
+      isShowWeatherBroad,
+      activeKey,
+      weatherObj,
+      parseWeatherData,
+      toSelectList,
+      monitorData,
+      ChartsColumnsWD,
+      ChartsColumnsQY,
+      ChartsColumnsFL,
+      Option,
+    };
+  },
+});
+</script>
+<style lang="less" scoped>
+.unit {
+  font-size: 15px;
+  line-height: 47px;
+  color: #fff;
+}
+.btn {
+  line-height: 30px;
+  cursor: pointer;
+  display: flex;
+}
+.btn-header {
+  width: 130px;
+  height: 50px;
+}
+.weather-icon {
+  width: 20px;
+  height: 20px;
+  margin-top: 14px;
+  margin-right: 10px;
+}
+.broadcast {
+  width: 500px;
+  height: 350px;
+  border-radius: 4px;
+  position: fixed;
+  top: 50px;
+  right: 20px;
+  background-color: rgb(255, 255, 255);
+  background: url('../../../../assets/images/warn-dialog-bg.png') no-repeat center;
+  background-size: 100% 100%;
+  z-index: 9999999;
+  color: #fff;
+
+  .title {
+    text-align: center;
+    padding: 0 20px;
+
+    :deep(.ant-badge:not(.ant-badge-status)) {
+      margin-right: 40px !important;
+    }
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .message-title {
+      font-size: 16px;
+      color: #fff;
+      font-weight: 600;
+      line-height: 50px;
+      flex: 1;
+    }
+    .badge-box {
+      display: flex;
+      align-items: center;
+      padding-top: 10px;
+      .badge-title {
+        display: inline-block;
+        width: 62px;
+        line-height: 32px;
+        background-color: #2174f0;
+        border-radius: 26px;
+        text-align: center;
+        color: #fff;
+        padding-bottom: 2px;
+      }
+    }
+  }
+
+  .broadcast-context {
+    .context-tab {
+      display: flex;
+      .context-tab-item {
+        line-height: 24px;
+        background: url('../../../../assets/images/tab-1.png') no-repeat center;
+        border-radius: 24px;
+        text-align: center;
+        color: #fff;
+        cursor: pointer;
+        font-size: 14px;
+        width: 80px;
+      }
+      .context-tab-item-active {
+        background: url('../../../../assets/images/tab-2.png') no-repeat center;
+      }
+    }
+    .context-box {
+      width: 100%;
+      height: calc(100% - 32px);
+      .echarts-box {
+        width: 100%;
+        height: 500px;
+      }
+    }
+  }
+}
+:deep(.zxm-badge-count) {
+  width: 0px;
+  height: 0px;
+}
+</style>

+ 250 - 247
src/layouts/default/header/index.vue

@@ -56,7 +56,8 @@
   </Header>
   <div :class="`${prefixCls}-action`" style="position: fixed; top: 30px; right: 20px; z-index: 999999">
     <div class="right-position">
-      <!-- 公司端不显示语音播报功能 -->
+      <!-- 公司端不显示语音播报功能 weatherBroadcast.vue-->
+      <WeatherBroadcast v-if="sysOrgCode != 'sdmtjtgsd'" />
       <VoiceBroadcast v-if="sysOrgCode != 'sdmtjtgsd'" />
       <VoiceBroadcastGsd v-if="sysOrgCode == 'sdmtjtgsd'" />
       <UserDropDown v-if="showUserDropdown" :theme="getHeaderTheme" />
@@ -65,267 +66,269 @@
   </div>
 </template>
 <script lang="ts">
-  import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { propTypes } from '/@/utils/propTypes';
-
-  import { Layout } from 'ant-design-vue';
-  import { AppLogo } from '/@/components/Application';
-  import LayoutMenu from '../menu/index.vue';
-  import LayoutTrigger from '../trigger/index.vue';
-
-  import { AppSearch } from '/@/components/Application';
-
-  import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
-  import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-
-  import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
-  import { SettingButtonPositionEnum } from '/@/enums/appEnum';
-  import { AppLocalePicker } from '/@/components/Application';
-
-  import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';
-  import { useAppInject } from '/@/hooks/web/useAppInject';
-  import { useDesign } from '/@/hooks/web/useDesign';
-
-  import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
-  import { useLocale } from '/@/locales/useLocale';
-
-  import VoiceBroadcast from './components/VoiceBroadcast.vue';
-  import VoiceBroadcastGsd from './components/VoiceBroadcastGsd.vue';
-
-  import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
-  import { useUserStore } from '/@/store/modules/user';
-  import { useRouter } from 'vue-router';
-
-  import { noHeadeLink } from '../layout.data';
-
-  export default defineComponent({
-    name: 'LayoutHeader',
-    components: {
-      Header: Layout.Header,
-      AppLogo,
-      LayoutTrigger,
-      LayoutBreadcrumb,
-      LayoutMenu,
-      UserDropDown,
-      AppLocalePicker,
-      FullScreen,
-      Notify,
-      AppSearch,
-      ErrorAction,
-      LockScreen,
-      LoginSelect,
-      VoiceBroadcast,
-      VoiceBroadcastGsd,
-      SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
-        loading: true,
-      }),
-    },
-    props: {
-      fixed: propTypes.bool,
-    },
-    setup(props) {
-      const { prefixCls } = useDesign('layout-header');
-      const userStore = useUserStore();
-      const { currentRoute } = useRouter();
-      console.log(currentRoute);
-
-      const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
-      const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
-      const { title, sysOrgCode, homePath } = useGlobSetting();
-      const {
-        getHeaderTheme,
-        getShowFullScreen,
-        getShowNotice,
-        getShowContent,
-        getShowBread,
-        getShowHeaderLogo,
-        getShowHeader,
-        getShowSearch,
-        getUseLockPage,
-        getShowBreadTitle,
-        getShowFullHeaderRef,
-      } = useHeaderSetting();
-
-      const { getShowLocalePicker } = useLocale();
-
-      const { getIsMobile } = useAppInject();
-
-      const getHeaderClass = computed(() => {
-        const theme = unref(getHeaderTheme);
-        return [
-          prefixCls,
-          {
-            [`${prefixCls}--fixed`]: props.fixed,
-            [`${prefixCls}--mobile`]: unref(getIsMobile),
-            [`${prefixCls}--${theme}`]: theme,
-          },
-        ];
-      });
-
-      const getShowFullHeader = computed(() => {
-        const route = unref(currentRoute);
-        return getShowFullHeaderRef && route.path.startsWith('/micro-');
-      });
-
-      const getShowSetting = computed(() => {
-        if (!unref(getShowSettingButton)) {
-          return false;
-        }
-        const settingButtonPosition = unref(getSettingButtonPosition);
-
-        if (settingButtonPosition === SettingButtonPositionEnum.AUTO) {
-          return unref(getShowHeader);
-        }
-        return settingButtonPosition === SettingButtonPositionEnum.HEADER;
-      });
-
-      const getLogoWidth = computed(() => {
-        if (!unref(getIsMixMode) || unref(getIsMobile)) {
-          return {};
-        }
-        const width = unref(getMenuWidth) < 180 ? 180 : unref(getMenuWidth);
-        return { width: `${width}px` };
-      });
-
-      const getSplitType = computed(() => {
-        return unref(getSplit) ? MenuSplitTyeEnum.TOP : MenuSplitTyeEnum.NONE;
-      });
-
-      const getMenuMode = computed(() => {
-        return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null;
-      });
-
-      // /**
-      //  * 首页多租户部门弹窗逻辑
-      //  */
-      const loginSelectRef = ref();
-
-      function showLoginSelect() {
-        //update-begin---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
-        //判断是否是登陆进来
-        const loginInfo = toRaw(userStore.getLoginInfo) || {};
-        if (!!loginInfo.isLogin) {
-          loginSelectRef.value.show(loginInfo);
-        }
-        //update-end---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
+import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';
+import { useGlobSetting } from '/@/hooks/setting';
+import { propTypes } from '/@/utils/propTypes';
+
+import { Layout } from 'ant-design-vue';
+import { AppLogo } from '/@/components/Application';
+import LayoutMenu from '../menu/index.vue';
+import LayoutTrigger from '../trigger/index.vue';
+
+import { AppSearch } from '/@/components/Application';
+
+import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
+import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
+import { useRootSetting } from '/@/hooks/setting/useRootSetting';
+
+import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
+import { SettingButtonPositionEnum } from '/@/enums/appEnum';
+import { AppLocalePicker } from '/@/components/Application';
+
+import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';
+import { useAppInject } from '/@/hooks/web/useAppInject';
+import { useDesign } from '/@/hooks/web/useDesign';
+
+import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
+import { useLocale } from '/@/locales/useLocale';
+
+import WeatherBroadcast from './components/weatherBroadcast.vue';
+import VoiceBroadcast from './components/VoiceBroadcast.vue';
+import VoiceBroadcastGsd from './components/VoiceBroadcastGsd.vue';
+
+import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
+import { useUserStore } from '/@/store/modules/user';
+import { useRouter } from 'vue-router';
+
+import { noHeadeLink } from '../layout.data';
+
+export default defineComponent({
+  name: 'LayoutHeader',
+  components: {
+    Header: Layout.Header,
+    AppLogo,
+    LayoutTrigger,
+    LayoutBreadcrumb,
+    LayoutMenu,
+    UserDropDown,
+    AppLocalePicker,
+    FullScreen,
+    Notify,
+    AppSearch,
+    ErrorAction,
+    LockScreen,
+    LoginSelect,
+    VoiceBroadcast,
+    VoiceBroadcastGsd,
+    WeatherBroadcast,
+    SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
+      loading: true,
+    }),
+  },
+  props: {
+    fixed: propTypes.bool,
+  },
+  setup(props) {
+    const { prefixCls } = useDesign('layout-header');
+    const userStore = useUserStore();
+    const { currentRoute } = useRouter();
+    console.log(currentRoute);
+
+    const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
+    const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
+    const { title, sysOrgCode, homePath } = useGlobSetting();
+    const {
+      getHeaderTheme,
+      getShowFullScreen,
+      getShowNotice,
+      getShowContent,
+      getShowBread,
+      getShowHeaderLogo,
+      getShowHeader,
+      getShowSearch,
+      getUseLockPage,
+      getShowBreadTitle,
+      getShowFullHeaderRef,
+    } = useHeaderSetting();
+
+    const { getShowLocalePicker } = useLocale();
+
+    const { getIsMobile } = useAppInject();
+
+    const getHeaderClass = computed(() => {
+      const theme = unref(getHeaderTheme);
+      return [
+        prefixCls,
+        {
+          [`${prefixCls}--fixed`]: props.fixed,
+          [`${prefixCls}--mobile`]: unref(getIsMobile),
+          [`${prefixCls}--${theme}`]: theme,
+        },
+      ];
+    });
+
+    const getShowFullHeader = computed(() => {
+      const route = unref(currentRoute);
+      return getShowFullHeaderRef && route.path.startsWith('/micro-');
+    });
+
+    const getShowSetting = computed(() => {
+      if (!unref(getShowSettingButton)) {
+        return false;
       }
+      const settingButtonPosition = unref(getSettingButtonPosition);
 
-      function loginSelectOk() {
-        console.log('成功。。。。。');
+      if (settingButtonPosition === SettingButtonPositionEnum.AUTO) {
+        return unref(getShowHeader);
       }
+      return settingButtonPosition === SettingButtonPositionEnum.HEADER;
+    });
 
-      // 用户下拉框应该在以下情况中隐藏:
-      // 1. 本页面是由其他页面的 iframe 嵌入的页面
-      const showUserDropdown = computed(() => {
-        return window.self === window.top;
-      });
+    const getLogoWidth = computed(() => {
+      if (!unref(getIsMixMode) || unref(getIsMobile)) {
+        return {};
+      }
+      const width = unref(getMenuWidth) < 180 ? 180 : unref(getMenuWidth);
+      return { width: `${width}px` };
+    });
+
+    const getSplitType = computed(() => {
+      return unref(getSplit) ? MenuSplitTyeEnum.TOP : MenuSplitTyeEnum.NONE;
+    });
+
+    const getMenuMode = computed(() => {
+      return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null;
+    });
+
+    // /**
+    //  * 首页多租户部门弹窗逻辑
+    //  */
+    const loginSelectRef = ref();
+
+    function showLoginSelect() {
+      //update-begin---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
+      //判断是否是登陆进来
+      const loginInfo = toRaw(userStore.getLoginInfo) || {};
+      if (!!loginInfo.isLogin) {
+        loginSelectRef.value.show(loginInfo);
+      }
+      //update-end---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
+    }
 
-      onMounted(() => {
-        showLoginSelect();
-      });
+    function loginSelectOk() {
+      console.log('成功。。。。。');
+    }
 
-      return {
-        prefixCls,
-        getHeaderClass,
-        getShowHeaderLogo,
-        getHeaderTheme,
-        getShowHeaderTrigger,
-        getIsMobile,
-        getShowBreadTitle,
-        getShowBread,
-        getShowContent,
-        getSplitType,
-        getSplit,
-        getMenuMode,
-        getShowTopMenu,
-        getShowLocalePicker,
-        getShowFullScreen,
-        getShowNotice,
-        getUseErrorHandle,
-        getLogoWidth,
-        getIsMixSidebar,
-        getShowSettingButton,
-        getShowSetting,
-        getShowSearch,
-        getUseLockPage,
-        loginSelectOk,
-        loginSelectRef,
-        currentRoute,
-        title,
-        getShowFullHeader,
-        noHeadeLink,
-        showUserDropdown,
-        sysOrgCode,
-        homePath,
-      };
-    },
-  });
+    // 用户下拉框应该在以下情况中隐藏:
+    // 1. 本页面是由其他页面的 iframe 嵌入的页面
+    const showUserDropdown = computed(() => {
+      return window.self === window.top;
+    });
+
+    onMounted(() => {
+      showLoginSelect();
+    });
+
+    return {
+      prefixCls,
+      getHeaderClass,
+      getShowHeaderLogo,
+      getHeaderTheme,
+      getShowHeaderTrigger,
+      getIsMobile,
+      getShowBreadTitle,
+      getShowBread,
+      getShowContent,
+      getSplitType,
+      getSplit,
+      getMenuMode,
+      getShowTopMenu,
+      getShowLocalePicker,
+      getShowFullScreen,
+      getShowNotice,
+      getUseErrorHandle,
+      getLogoWidth,
+      getIsMixSidebar,
+      getShowSettingButton,
+      getShowSetting,
+      getShowSearch,
+      getUseLockPage,
+      loginSelectOk,
+      loginSelectRef,
+      currentRoute,
+      title,
+      getShowFullHeader,
+      noHeadeLink,
+      showUserDropdown,
+      sysOrgCode,
+      homePath,
+    };
+  },
+});
 </script>
 <style lang="less">
-  @import './index.less';
-  //update-begin---author:scott ---date:2022-09-30  for:默认隐藏顶部菜单面包屑-----------
-  //顶部欢迎语展示样式
-  @prefix-cls: ~'@{namespace}-layout-header';
-
-  .@{prefix-cls} {
-    display: flex;
-    padding: 0 8px;
-    // align-items: center;
+@import './index.less';
+//update-begin---author:scott ---date:2022-09-30  for:默认隐藏顶部菜单面包屑-----------
+//顶部欢迎语展示样式
+@prefix-cls: ~'@{namespace}-layout-header';
+
+.@{prefix-cls} {
+  display: flex;
+  padding: 0 8px;
+  // align-items: center;
+
+  .headerIntroductionClass {
+    margin-right: 4px;
+    margin-bottom: 2px;
+    border-bottom: 0px;
+    border-left: 0px;
+  }
 
+  &--light {
     .headerIntroductionClass {
-      margin-right: 4px;
-      margin-bottom: 2px;
-      border-bottom: 0px;
-      border-left: 0px;
+      color: @breadcrumb-item-normal-color;
     }
+  }
 
-    &--light {
-      .headerIntroductionClass {
-        color: @breadcrumb-item-normal-color;
-      }
+  &--dark {
+    .headerIntroductionClass {
+      color: rgba(255, 255, 255, 0.6);
     }
 
-    &--dark {
-      .headerIntroductionClass {
-        color: rgba(255, 255, 255, 0.6);
-      }
-
-      .anticon {
-        color: rgba(255, 255, 255, 0.8);
-      }
+    .anticon {
+      color: rgba(255, 255, 255, 0.8);
     }
-
-    //update-end---author:scott ---date::2022-09-30  for:默认隐藏顶部菜单面包屑--------------
   }
 
-  // background: linear-gradient(#003f77, #0a134c);
-  //   // background: linear-gradient(#02050c 0%, #03114c 100%);
-  //   // border: none;
-  //   border-bottom: 1px solid #81aabf01;
-  //   padding-bottom: 2px;
-  //   box-shadow: 0 0 20px #44caff55 inset;
-  .normal-header {
-    height: 52px !important;
-    line-height: 52px !important;
-    background: var(--vent-header-bg-color) !important;
-    // background: linear-gradient(#005177,#0a344c) !important;
-    border-bottom: 1px solid #81aabf01 !important;
-    padding-bottom: 2px !important;
-    box-shadow: 0 0 20px #44caff55 inset !important;
-    padding: 0 8px !important;
-  }
-
-  .no-header {
-    height: 0px !important;
-    display: none !important;
-  }
-
-  .header-nav-title {
-    background-image: linear-gradient(#ffffff 50%, #60f4ff);
-    -webkit-background-clip: text;
-    color: transparent;
-    font-weight: 600;
-  }
+  //update-end---author:scott ---date::2022-09-30  for:默认隐藏顶部菜单面包屑--------------
+}
+
+// background: linear-gradient(#003f77, #0a134c);
+//   // background: linear-gradient(#02050c 0%, #03114c 100%);
+//   // border: none;
+//   border-bottom: 1px solid #81aabf01;
+//   padding-bottom: 2px;
+//   box-shadow: 0 0 20px #44caff55 inset;
+.normal-header {
+  height: 52px !important;
+  line-height: 52px !important;
+  background: var(--vent-header-bg-color) !important;
+  // background: linear-gradient(#005177,#0a344c) !important;
+  border-bottom: 1px solid #81aabf01 !important;
+  padding-bottom: 2px !important;
+  box-shadow: 0 0 20px #44caff55 inset !important;
+  padding: 0 8px !important;
+}
+
+.no-header {
+  height: 0px !important;
+  display: none !important;
+}
+
+.header-nav-title {
+  background-image: linear-gradient(#ffffff 50%, #60f4ff);
+  -webkit-background-clip: text;
+  color: transparent;
+  font-weight: 600;
+}
 </style>

Some files were not shown because too many files changed in this diff