| | |
| | | </div> |
| | | </div> |
| | | <div class="main-middle"> |
| | | <!-- <div class="bigMap">--> |
| | | <!-- <div id="bigMap"></div>--> |
| | | <!-- </div>--> |
| | | <baidu-map class="bigMap" ak="Z4tYehNEVsdeMw3Mjspdn77pV50ffc8t" v="3.0" type="API" :scroll-wheel-zoom="true" :center="{lng: 85.057805, lat: 45.62550}" :zoom="16" @ready="initMap"> |
| | | <bm-map-type :map-types="['BMAP_SATELLITE_MAP','BMAP_NORMAL_MAP' ]" anchor="BMAP_ANCHOR_TOP_LEFT"></bm-map-type> |
| | | <bm-navigation anchor="BMAP_ANCHOR_BOTTOM_RIGHT"></bm-navigation> |
| | | <bm-polygon :path="polygonPath" stroke-color="blue" fillColor="blue" :fillOpacity="0.4" :stroke-weight="1"/> |
| | | </baidu-map> |
| | | <div class="map-filter"> |
| | | <el-radio-group v-model="windQuery.type" @change="changeWindQuery"> |
| | | <el-radio :label="1" size="small" border>按时间段</el-radio> |
| | | <el-radio :label="2" size="small" border>按具体时间</el-radio> |
| | | </el-radio-group> |
| | | <el-select v-if="windQuery.type == 1" v-model="windQuery.countTime" :teleported="false" class="m-2" placeholder="Select" size="small" @change="changeWind"> |
| | | <el-option :key="1" label="1小时内" :value="1"/> |
| | | <el-option :key="2" label="6小时内" :value="2"/> |
| | | <el-option :key="3" label="12小时内" :value="3"/> |
| | | <el-option :key="4" label="24小时内" :value="4"/> |
| | | </el-select> |
| | | <el-date-picker |
| | | v-else |
| | | v-model="windTimeRange" |
| | | size="small" |
| | | :teleported="false" |
| | | type="datetimerange" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | @change="windTimeChange" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | <div style="width: 100%;height: 250px;margin-top: 20px" :id="gasWind"></div> |
| | | </div> |
| | | <Map class="bigMap"></Map> |
| | | <!-- </div>--> |
| | | <div class="mid-bottom"> |
| | | <div class="chart-head"> |
| | |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="positionSearch" :teleported="false" class="m-2" placeholder="Select" size="small" @change="changeGas1"> |
| | | <el-option |
| | | v-for="item in positionOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <div class="checkMore" @click="toNdPage()"><el-icon><DArrowRight /></el-icon></div> |
| | | </div> |
| | | </div> |
| | | <div class="chart-cont"> |
| | | <div class="echart" :id="gasN"></div> |
| | | <div v-if="hasNd==true" class="echart" :id="gasN"></div> |
| | | <div v-else class="echart" style="display: flex;font-size: 20px;justify-content: center;align-items: center"><span style="color:#11feee;">暂无数据</span></div> |
| | | </div> |
| | | </div> |
| | | <div class="right-mid withFilterLong"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="chart-cont"> |
| | | <div class="echart" :id="gasT"></div> |
| | | <div v-if="hasTl==true" class="echart" :id="gasT"></div> |
| | | <div v-else class="echart" style="display: flex;font-size: 20px;justify-content: center;align-items: center"><span style="color:#11feee;">暂无数据</span></div> |
| | | </div> |
| | | </div> |
| | | <div class="right-bottom withoutFilter"> |
| | |
| | | :draggable="true" |
| | | custom-class="warningMsg" |
| | | top="2vh" |
| | | @opened="playAudio" |
| | | @close="confirmWarning" |
| | | > |
| | | <audio ref="audioRef" autoplay muted loop> |
| | | <source src="../../../assets/warning.mp3" type="audio/mpeg"> |
| | | 您的浏览器不支持 audio 元素。 |
| | | </audio> |
| | | <div class="warning-cont"> |
| | | <div><span>预警信息:</span><span>{{warningGas.content}}</span></div> |
| | | <div><span>预警时间:</span><span>{{warningGas.warnTime}}</span></div> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import {toRefs, reactive, onMounted, ref, defineComponent, onUnmounted} from 'vue'; |
| | | import {toRefs, reactive, onMounted, ref, defineComponent, onUnmounted, nextTick} from 'vue'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import { useRouter} from "vue-router"; |
| | | import * as echarts from "echarts"; |
| | |
| | | import AMapLoader from '@amap/amap-jsapi-loader' |
| | | import { shallowRef } from '@vue/reactivity' |
| | | import { storeToRefs } from 'pinia'; |
| | | |
| | | import {BaiduMap, BmMapType, BmNavigation, BmPolygon} from 'vue-baidu-map-3x' |
| | | import Map from './map.vue' |
| | | import {BaiduMap, BmMapType, BmNavigation, BmPolygon, BmGround} from 'vue-baidu-map-3x' |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import {bigScreenApi} from "/@/api/bigScreen"; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableDataState { |
| | | socket: any |
| | |
| | | lockReconnect: boolean |
| | | maxReconnect: number |
| | | reconnectTime: number |
| | | windQuery: { |
| | | type: null | number |
| | | countTime: number | null |
| | | startTime: '', |
| | | endTime:'' |
| | | } |
| | | countTime: null | number |
| | | time: string |
| | | date: string |
| | | weekDay: string |
| | | dayTime:string |
| | | isFull: boolean |
| | | chart2Search: Array<string> |
| | | windTimeRange: Array<string> |
| | | infoParams: {} |
| | | gasSearch: number | null |
| | | tlGasSearch: number | null |
| | | positionSearch: number | null |
| | | positionOptions: Array<gasType> |
| | | gasOptions: Array<gasType> |
| | | monthAgo: string, |
| | | today: string, |
| | | gasData: Array<any> |
| | | hasNd: boolean |
| | | gasTlData: Array<any> |
| | | hasTl: boolean |
| | | areaOptions: Array<gasType> |
| | | gasTotal: null | number |
| | | tlTotal: null | number |
| | | online: number |
| | | warningGas: {}, |
| | | dialogWarning: boolean |
| | | countTime: null | number |
| | | yellowNum: null | number |
| | | redNum: null | number |
| | | weatherData: Array<any> |
| | | polygonPath: Array<location> |
| | | polygonPath1: Array<location> |
| | | polygonPath2: Array<location> |
| | | polygonPath3: Array<location> |
| | | polygonPath4: Array<location> |
| | | polygonPath5: Array<location> |
| | | polygonPath6: Array<location> |
| | | polygonPath7: Array<location> |
| | | polygonPath8: Array<location> |
| | | polygonPath9: Array<location> |
| | | } |
| | | interface location{ |
| | | lng: number | null |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'bigScreen', |
| | | components: {BaiduMap, BmMapType, BmNavigation, BmPolygon }, |
| | | components: {Map,BaiduMap, BmMapType, BmNavigation, BmPolygon }, |
| | | props:{ |
| | | isFull: Boolean |
| | | }, |
| | |
| | | date: '', |
| | | weekDay: '', |
| | | dayTime: '', |
| | | windQuery: { |
| | | type: 1, |
| | | countTime: 4, |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | countTime: 1, |
| | | isFull: props.isFull, |
| | | chart2Search: [], |
| | | windTimeRange: [], |
| | | infoParams:{ |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | positionSearch: null, |
| | | gasSearch: null, |
| | | tlGasSearch: null, |
| | | gasOptions: [], |
| | | positionOptions: [ |
| | | { |
| | | id: null, |
| | | name: '全部' |
| | | }, |
| | | { |
| | | id: 1, |
| | | name: '方位1' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '方位2' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '方位3' |
| | | } |
| | | ], |
| | | monthAgo: '', |
| | | today: '', |
| | | gasData: [], |
| | | hasNd: true, |
| | | gasTlData: [], |
| | | hasTl: true, |
| | | areaOptions: [], |
| | | gasTotal: 0, |
| | | tlTotal: 0, |
| | | online: 3, |
| | | warningGas: {}, |
| | | dialogWarning: false, |
| | | countTime: 1, |
| | | weatherData: [], |
| | | polygonPath: [] |
| | | polygonPath1: [], |
| | | polygonPath2: [], |
| | | polygonPath3: [], |
| | | polygonPath4: [], |
| | | polygonPath5: [], |
| | | polygonPath6: [], |
| | | polygonPath7: [], |
| | | polygonPath8: [], |
| | | polygonPath9: [] |
| | | }); |
| | | const router = useRouter(); |
| | | const router = useRouter() |
| | | const audioRef = ref() |
| | | const gasWind = ref("eChartgasWind" + Date.now() + Math.random()) |
| | | const gasN = ref("eChartgasN" + Date.now() + Math.random()) |
| | | const gasT = ref("eChartgasT" + Date.now() + Math.random()) |
| | | const timeForm = { |
| | |
| | | }; |
| | | |
| | | const updatePolygonPath = (e) => { |
| | | state.polygonPath = e.target.getPath() |
| | | state.polygonPath1 = e.target.getPath() |
| | | }; |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | initTime() |
| | | getGasData() |
| | | getWindData() |
| | | getWarningNum() |
| | | getWarningInfo() |
| | | getWarning() |
| | |
| | | const scale = document.documentElement.clientWidth / 1920;/* 当前页面宽度缩放比例,可根据自己需要修改 */ |
| | | document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px";/* 设置页面根节点字体大小 */ |
| | | } |
| | | |
| | | setRem(); |
| | | |
| | | window.onresize = () => { |
| | | setRem();/* 改变窗口大小时重新设置 rem */ |
| | | } |
| | |
| | | setInterval(() => { |
| | | getDateTime(); |
| | | }, 1000); |
| | | // initMap() |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | | destroyedWs() |
| | | }) |
| | | |
| | | const initMap=()=>{ |
| | | state.polygonPath = [ |
| | | { lng: 85.047805, lat: 45.62550 }, |
| | | { lng: 85.047505, lat: 45.62350 }, |
| | | { lng: 85.057205, lat: 45.62350 }, |
| | | { lng: 85.057005, lat: 45.62750 } |
| | | ] |
| | | } |
| | | const toNdPage = () =>{ |
| | | router.push('/gasData') |
| | | } |
| | | const toTlPage = () =>{ |
| | | router.push('/fluxData') |
| | | } |
| | | |
| | | const playAudio=()=>{ |
| | | audioRef.value.muted = false |
| | | audioRef.value.play() |
| | | } |
| | | |
| | | const confirmWarning =()=>{ |
| | | state.dialogWarning = false |
| | | audioRef.value.pause() |
| | | } |
| | | const getGasData = async ()=>{ |
| | | const res = await bigScreenApi().getGas() |
| | |
| | | getGasNdData() |
| | | getGasTlData() |
| | | } |
| | | |
| | | const initTime =()=>{ |
| | | state.monthAgo = getPeriod(30) |
| | | state.today = formatDate(new Date(),'end') |
| | | state.chart2Search[0] = state.monthAgo |
| | | state.chart2Search[1] = state.today+' 23:59:59' |
| | | state.infoParams.startTime = state.monthAgo |
| | | state.infoParams.endTime = state.today + ' 23:59:59' |
| | | } |
| | | const getPeriod =(num)=> { |
| | | const currentDate = new Date(); |
| | | const startTime = new Date(); |
| | | startTime.setDate(currentDate.getDate() - num); |
| | | return formatDate(startTime,'start') |
| | | } |
| | | const formatDate =(date,type)=> { |
| | | const year = date.getFullYear().toString(); |
| | | const month = ('0' + (date.getMonth() + 1)).slice(-2); |
| | | const day = ('0' + date.getDate()).slice(-2); |
| | | if(type == 'start'){ |
| | | return `${year}-${month}-${day} 00:00:00`; |
| | | }else{ |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | } |
| | | const getAreaData = async ()=>{ |
| | | const res = await bigScreenApi().getAreas({pageSize: 99, pageIndex: 1, searchParams:{name: ''}}) |
| | | if(res.data.code == 100){ |
| | |
| | | } |
| | | } |
| | | |
| | | const getWindData = async ()=>{ |
| | | if(state.windQuery.type == 1){ |
| | | state.windQuery.startTime = '' |
| | | state.windQuery.endTime = '' |
| | | }else{ |
| | | state.windQuery.countTime = 5 |
| | | state.windQuery.startTime = state.windTimeRange[0]?state.windTimeRange[0]: state.today + ' 00:00:00' |
| | | state.windQuery.endTime = state.windTimeRange[1]?state.windTimeRange[1]: state.today + ' 23:59:59' |
| | | } |
| | | const {type,...data} = state.windQuery |
| | | const res = await bigScreenApi().getWindNum(data) |
| | | if(res.data.code == 100){ |
| | | const windData = JSON.parse(JSON.stringify(res.data.data)) |
| | | if(Array.isArray(windData)){ |
| | | let pointFive = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | let twoZone = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | let fourZone = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | let sixZone = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | let eightZone = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | let tenZone = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | let tenAbove = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
| | | for (let i of windData){ |
| | | if(i.windSpeed<0.5){ |
| | | pointFive[getDirection(i.windDirection)] += 1 |
| | | }else if(i.windSpeed>0.5 && i.windSpeed<=2){ |
| | | twoZone[getDirection(i.windDirection)] += 1 |
| | | }else if(i.windSpeed>2 && i.windSpeed<=4){ |
| | | fourZone[getDirection(i.windDirection)] += 1 |
| | | }else if(i.windSpeed>4 && i.windSpeed<=6){ |
| | | sixZone[getDirection(i.windDirection)] += 1 |
| | | }else if(i.windSpeed>6 && i.windSpeed<=8){ |
| | | eightZone[getDirection(i.windDirection)] += 1 |
| | | }else if(i.windSpeed>8 && i.windSpeed<=10){ |
| | | tenZone[getDirection(i.windDirection)] += 1 |
| | | } else if(i.windSpeed>10){ |
| | | console.log(777,i.windDirection,getDirection(i.windDirection)) |
| | | tenAbove[getDirection(i.windDirection)] += 1 |
| | | }else{ |
| | | console.log('windSpeed为null') |
| | | } |
| | | } |
| | | initgasWind(pointFive,twoZone,fourZone,sixZone,eightZone,tenZone,tenAbove) |
| | | } |
| | | }else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | |
| | | const getDirection=(num:number)=>{ |
| | | if(num<=348.75 ){ |
| | | return Math.floor((num + 11.25) / 22.5) |
| | | }else{ |
| | | return 0 |
| | | } |
| | | } |
| | | |
| | | const getGasNdData = async ()=>{ |
| | | const res = await bigScreenApi().getGasNdData({startTime: '',endTime: '',gasName: state.gasSearch}) |
| | | const res = await bigScreenApi().getGasNdData({startTime: state.today+' 00:00:00',endTime: state.today+' 23:59:59',gasName: state.gasSearch,position: state.positionSearch}) |
| | | if(res.data.code == 100){ |
| | | if(res.data.data && res.data.data.length>0){ |
| | | state.hasNd = true |
| | | state.gasTotal = res.data.data.length |
| | | const timeList = res.data.data.map(i=>i.time.slice(11)) |
| | | const dotList = res.data.data.map(i=>i.gasValue) |
| | |
| | | }) |
| | | state.weatherData = [...weather].reverse().slice(0, 4); |
| | | initgasN(dotList.slice(dotList.length - 50),timeList.slice(timeList.length - 50)) |
| | | }else{ |
| | | state.hasNd = false |
| | | } |
| | | }else { |
| | | ElMessage({ |
| | |
| | | } |
| | | |
| | | const getGasTlData = async ()=>{ |
| | | const res = await bigScreenApi().getGasTlData({startTime: '',endTime: '',gasName: state.tlGasSearch,areaId: null}) |
| | | const res = await bigScreenApi().getGasTlData({startTime: state.today+' 00:00:00',endTime: state.today+' 23:59:59',gasName: state.tlGasSearch,areaId: null}) |
| | | if(res.data.code == 100){ |
| | | if(res.data.data && res.data.data.length>0){ |
| | | state.hasTl = true |
| | | state.tlTotal = res.data.data.length |
| | | const gasTime = res.data.data.map(i=>i.time?.slice(11)) |
| | | const gasTlTime = [...new Set(gasTime)] |
| | |
| | | } |
| | | }) |
| | | initgasT(gasTlTime.slice(gasTlTime.length - 20),chartData) |
| | | }else{ |
| | | state.hasTl = false |
| | | } |
| | | }else { |
| | | ElMessage({ |
| | |
| | | return i |
| | | }) |
| | | config.data = newData |
| | | }else{ |
| | | config.data = [] |
| | | } |
| | | }else { |
| | | ElMessage({ |
| | |
| | | } |
| | | const timeChange = (value:Array<string>)=>{ |
| | | state.infoParams.startTime = value[0] |
| | | state.infoParams.endTime = value[1] |
| | | state.infoParams.endTime = value[1].replace('00:00:00', '23:59:59') |
| | | getWarningInfo() |
| | | } |
| | | |
| | |
| | | getWarningNum() |
| | | } |
| | | |
| | | const windTimeChange = (value:Array<string>)=>{ |
| | | console.log(value) |
| | | state.windQuery.startTime = value[0] |
| | | state.windQuery.endTime = value[1] |
| | | getWindData() |
| | | } |
| | | |
| | | const changeWindQuery = (value) =>{ |
| | | if(value == 2){ |
| | | state.windQuery.countTime = 5 |
| | | }else{ |
| | | state.windQuery.countTime = 4 |
| | | } |
| | | getWindData() |
| | | } |
| | | const changeWind = () =>{ |
| | | getWindData() |
| | | } |
| | | const getWarning = ()=>{ |
| | | initWebSocket('/ws/gas/exc/','预警',60) |
| | | } |
| | |
| | | return ''; // 返回一个默认值或者空字符串 |
| | | } |
| | | } |
| | | |
| | | const initWebSocket =async (requireUrl: string,type: string,beat: number)=>{ |
| | | if (typeof WebSocket === 'undefined') { |
| | | alert('您的浏览器不支持socket'); |
| | |
| | | return; |
| | | } |
| | | if(type == '预警'){ |
| | | console.log('预警') |
| | | const socketData = JSON.parse(text) |
| | | state.warningGas = JSON.parse(JSON.stringify(socketData)) |
| | | state.dialogWarning = true |
| | |
| | | state.gasData = JSON.parse(text) |
| | | let gasNum = '' |
| | | let newArr = JSON.parse(JSON.stringify(state.gasData)) |
| | | state.gasTotal = newArr.length |
| | | const weather = newArr.map((item)=>{ |
| | | if(Array.isArray(newArr)){ |
| | | state.gasTotal = newArr.length |
| | | const weather = newArr.map((item)=>{ |
| | | return { |
| | | time: item.dataReceivingTime?item.dataReceivingTime.slice(11,19):'--', |
| | | temp: item.temp?item.temp:'--', |
| | |
| | | windDirection: item.windDirection?item.windDirection:'--', |
| | | pressure: item.pressure?item.pressure:'--' |
| | | } |
| | | }) |
| | | state.weatherData = [...weather].reverse().slice(0, 4); |
| | | }) |
| | | state.weatherData = [...weather].reverse().slice(0, 4); |
| | | }else{ |
| | | // state.gasTotal = 0 |
| | | getGasNdData() |
| | | } |
| | | for(let key in newArr[0]){ |
| | | if(newArr[0][key] == state.gasSearch && key.indexOf("gasName") !== -1){ |
| | | gasNum = key.substring(7) |
| | |
| | | if(type == '气体通量'){ |
| | | state.gasTlData = JSON.parse(text) |
| | | let newArr = JSON.parse(JSON.stringify(state.gasTlData)) |
| | | state.tlTotal = newArr.length |
| | | if(Array.isArray(newArr)){ |
| | | state.tlTotal = newArr.length |
| | | }else{ |
| | | state.tlTotal = 0 |
| | | } |
| | | const gasTime = newArr.map(i=>i.dataReceivingTime?.slice(11,19)) |
| | | const gasTlTime = [...new Set(gasTime)] |
| | | let areaData = state.areaOptions.map((item)=>{ |
| | |
| | | |
| | | } |
| | | state.socket.onclose=()=>{ |
| | | console.log("socket已经关闭") |
| | | getGasNdData() |
| | | getGasTlData() |
| | | getWindData() |
| | | } |
| | | } |
| | | } |
| | |
| | | const config = reactive({ |
| | | header: ['预警级别','气体名称', '气体浓度', '时间'], |
| | | data: [], |
| | | index: true, |
| | | columnWidth: [38], |
| | | // index: true, |
| | | columnWidth: [200,200,200,200], |
| | | align: ['center','center','center','center','center'], |
| | | headerBGC: '', |
| | | oddRowBGC: '', |
| | |
| | | } |
| | | |
| | | type EChartsOption = echarts.EChartsOption |
| | | |
| | | const initgasWind =(pointFive,twoZone,fourZone,sixZone,eightZone,tenZone,tenAbove)=>{ |
| | | let dom = document.getElementById(gasWind.value); |
| | | let myChart = echarts.init(dom) |
| | | let option: EChartsOption; |
| | | option = { |
| | | angleAxis: { |
| | | type: 'category', |
| | | data: ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW'], |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#11feee' |
| | | } |
| | | } |
| | | }, |
| | | radiusAxis: { |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#11feee' |
| | | } |
| | | }, |
| | | nameTextStyle:{ |
| | | fontSize: 10, |
| | | color: '#fff' |
| | | }, |
| | | animation: true |
| | | }, |
| | | polar: { |
| | | center: ['50%','40%'], |
| | | radius: '60%' |
| | | }, |
| | | series: [{ |
| | | type: 'bar', |
| | | data: pointFive, |
| | | coordinateSystem: 'polar', |
| | | name: '<0.5m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | data: twoZone, |
| | | coordinateSystem: 'polar', |
| | | name: '0.5-2m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | data: fourZone, |
| | | coordinateSystem: 'polar', |
| | | name: '2-4m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | data: sixZone, |
| | | coordinateSystem: 'polar', |
| | | name: '4-6m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | data: eightZone, |
| | | coordinateSystem: 'polar', |
| | | name: '6-8m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | data: tenZone, |
| | | coordinateSystem: 'polar', |
| | | name: '8-10m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }, { |
| | | type: 'bar', |
| | | data: tenAbove, |
| | | coordinateSystem: 'polar', |
| | | name: '>10m/s', |
| | | stack: 'a', |
| | | emphasis: { |
| | | focus: 'series' |
| | | } |
| | | }], |
| | | legend: { |
| | | show: true, |
| | | top:'bottom', |
| | | left:'0', |
| | | data: ['<0.5m/s', '0.5-2m/s', '2-4m/s','4-6m/s','6-8m/s','8-10m/s','>10m/s'], |
| | | orient:'horizontal', |
| | | itemWidth: 10, |
| | | itemHeight: 6, |
| | | itemGap: 4, |
| | | textStyle: { |
| | | color: '#11feee', |
| | | fontSize: 12 |
| | | } |
| | | } |
| | | } |
| | | |
| | | option && myChart.setOption(option); |
| | | window.addEventListener("resize",function (){ |
| | | myChart.resize(); |
| | | }); |
| | | } |
| | | |
| | | const initgasN =(data:Array<string>,time: Array<string>)=>{ |
| | | nextTick(() => { |
| | | let dom = document.getElementById(gasN.value); |
| | | let myChart = echarts.init(dom); |
| | | let option: EChartsOption; |
| | |
| | | }, |
| | | grid: { |
| | | top: '5%', |
| | | bottom: '10%', |
| | | bottom: '15%', |
| | | right: '2%' |
| | | }, |
| | | series: [ |
| | |
| | | option && myChart.setOption(option); |
| | | window.addEventListener("resize",function (){ |
| | | myChart.resize(); |
| | | }); |
| | | }); |
| | | } |
| | | const initgasT =(time: Array<string>,data: Array<any>)=>{ |
| | |
| | | context.emit('clickFull') |
| | | } |
| | | |
| | | onUnmounted(()=>{ |
| | | map.value && map.value.destroy(); |
| | | }) |
| | | // onUnmounted(()=>{ |
| | | // map.value && map.value.destroy(); |
| | | // }) |
| | | |
| | | return { |
| | | timeForm, |
| | | config, |
| | | gasN, |
| | | gasT, |
| | | initMap, |
| | | gasWind, |
| | | audioRef, |
| | | confirmWarning, |
| | | playAudio, |
| | | updatePolygonPath, |
| | | toNdPage, |
| | | toTlPage, |
| | | timeChange, |
| | | mouseoverHandler, |
| | | changeTotal, |
| | | changeWindQuery, |
| | | changeWind, |
| | | windTimeChange, |
| | | clickHandler, |
| | | changeGas1, |
| | | changeGas2, |
| | |
| | | //} |
| | | .main-middle{ |
| | | width: calc(50% - 10px); |
| | | position: relative; |
| | | .map-filter{ |
| | | position: absolute; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-end; |
| | | width: 270px; |
| | | right: 20px; |
| | | top: 20px; |
| | | padding: 2px; |
| | | z-index: 99; |
| | | border: 1px solid #11FEEE; |
| | | border-radius: 4px; |
| | | //background: url("../../../assets/warningScreen/windbg.png") no-repeat center; |
| | | |
| | | .el-radio-group{ |
| | | height: 24px; |
| | | width: 100%; |
| | | flex-flow: row nowrap; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .el-radio{ |
| | | width: calc((100% - 6px)/2); |
| | | margin-right: 0; |
| | | margin-left: 2px; |
| | | margin-bottom: 0; |
| | | text-align: center; |
| | | border-color: #ccc; |
| | | &.el-radio--small{ |
| | | height: 20px; |
| | | } |
| | | :deep(.el-radio__inner){ |
| | | display: none; |
| | | } |
| | | :deep(.el-radio__label){ |
| | | width: 100%; |
| | | padding-left: 0; |
| | | font-size: 10px; |
| | | color: #ccc; |
| | | } |
| | | } |
| | | .el-radio.is-bordered.is-checked{ |
| | | border-color: #11FEEE; |
| | | background: rgba(6,24,88,.6); |
| | | box-shadow: 0 3px 8px rgba(0,0,0,.2); |
| | | |
| | | :deep(.el-radio__label){ |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | |
| | | :deep(.el-date-editor){ |
| | | width: 100%; |
| | | height: 24px; |
| | | .el-range-separator{ |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-input__wrapper){ |
| | | height: 24px; |
| | | box-shadow: none; |
| | | border: 1px solid #11FEEE; |
| | | background: rgba(6,24,88,.6); |
| | | color: #fff; |
| | | |
| | | input{ |
| | | font-size: 10px; |
| | | color: #fff; |
| | | } |
| | | .el-icon{ |
| | | display: none; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .el-select{ |
| | | width: 100%; |
| | | height: 24px; |
| | | } |
| | | ::v-deep(.el-popper){ |
| | | background-color: rgba(10,31,92,1); |
| | | border: 1px solid rgba(17,254,238,.4); |
| | | color: #11FEEE; |
| | | |
| | | .el-icon{ |
| | | color: #11FEEE; |
| | | } |
| | | .el-select-dropdown__item{ |
| | | color: #11FEEE; |
| | | } |
| | | .el-select-dropdown__item.hover{ |
| | | background: #0049af; |
| | | } |
| | | } |
| | | ::v-deep(.el-popper__arrow){ |
| | | &::before{ |
| | | background-color: rgba(10,31,92,.6) !important; |
| | | border: 1px solid rgba(17,254,238,.4); |
| | | } |
| | | } |
| | | } |
| | | .bigMap{ |
| | | width: 100%; |
| | | height: calc((200% - 40px)/3 + 10px); |