3
0

2 Commitit ed596cf153 ... f7031fb64c

Tekijä SHA1 Viesti Päivämäärä
  daiht f7031fb64c Merge branch 'master' of http://git.techwx.com/framework/SMO 3 viikkoa sitten
  daiht 045ee1f631 zzw 3 viikkoa sitten

+ 1 - 1
src/utils/dateTime.ts

@@ -81,7 +81,7 @@ export function getTimeStamp(type) {
 			break;
 		case 5:
 			// 获取30天之前的整点时间戳  
-			now.setDate(now.getDate() - 30);
+			now.setDate(now.getDate() -29);
 			timestamp = Math.floor(now.getTime());
 			break;
 		default:

+ 41 - 29
src/views/alarm/allDevice/index.vue

@@ -51,7 +51,7 @@
 									<img src="@/assets/images/centerStation.png" alt="">
 									<div>正常FTP({{ FTPList && FTPList.true ? FTPList?.true.length : 0 }})</div>
 								</div>
-								<div class="FTP_item" @click="gotoFTP" >
+								<div class="FTP_item" @click="gotoFTP">
 									<img src="@/assets/images/areaStation.png" alt="">
 									<div>异常FTP({{ FTPList && FTPList.false ? FTPList?.false.length : 0 }})</div>
 								</div>
@@ -106,15 +106,15 @@ import { ref, computed, onMounted, reactive, watch, onDeactivated, onActivated,
 import { getDataItemList, getPlatformList, getRgDataList, getTacRecordList, getFTPList, getCertificateList, getStaitemList, getArriveList } from "@/api/modules/allData";
 import { Platform } from "@/api/interface";
 import { parseTime } from '@/utils/index';
-import {  useRouter } from "vue-router";
+import { useRouter } from "vue-router";
 const router = useRouter();
 const gotoFTP = () => {
 	router.push({
-        path: '/system/disposition',
-        query: {
-			status:'distributionAutomatic',
+		path: '/system/disposition',
+		query: {
+			status: 'distributionAutomatic',
 		}
-    })
+	})
 }
 // 查询自动站列表
 const queryas = ref<Platform>({
@@ -128,8 +128,20 @@ const pageable = ref({
 	time_space: 1,
 	base: undefined,
 	as_code_list: [],
-	pageNum: 1,
-	pageSize: 999,
+	data_items: [
+		{
+			data_r_table: "SHI_SHI_LIU_YAO_SU_SHU_JU",
+			data_id: 101,
+			data_type: "温湿度",
+			data_item: "QI_WEN",
+			data_name: "气温",
+			data_unit: "℃",
+			data_h_table: "LI_SHI_LIU_YAO_SU_SHU_JU",
+			data_value: "",
+			data_order: 1,
+			data_condition: 0
+		}
+	],
 });
 
 const platformList = ref<any>([])
@@ -257,26 +269,23 @@ const wertherColumns = ref<any>({
 
 const weatherInfoArr = ref()
 const dangetWeatherNum = ref(0)
-const weatherNormal=ref()
-const weatherWarning=ref()
+const weatherNormal = ref()
+const weatherWarning = ref()
 const weatherInfo = async () => {
 	const { data } = await getTacRecordList({ ...wertherColumns.value, as_code_list: pageable.value.as_code_list });
 	dangetWeatherNum.value = [...new Set(data.list?.map(obj => obj.as_code))].length
 	weatherInfoArr.value = data.list
-	const arr1=<any>[]
-	const arr2=<any>[]
-	for(let i=0;i<8;i++){
-		arr1.push(pageable.value.as_code_list.length)	
-		arr2.push(0)
-	}
+
+	let arr2 = new Array(8).fill(0);
+	let arr1 = new Array(8).fill(pageable.value.as_code_list.length);
 
 	data.list?.forEach((item, index) => {
 		arr1[item.data_type]--
 		arr2[item.data_type]++
 	})
-	weatherNormal.value=arr1
-	weatherWarning.value=arr2
-	
+	weatherNormal.value = arr1
+	weatherWarning.value = arr2
+
 	nextTick(() => {
 		showWeather()
 		showElement()
@@ -284,18 +293,23 @@ const weatherInfo = async () => {
 };
 
 // 获取自动站定检证书
+// 返回两个数组中相同的个数
+function findCommonCount(arr1, arr2) {
+  const common = arr1.filter(item => arr2.includes(item));
+  return common.length;
+}
 const certificateList = ref<any>({})
 const getCertificate = async () => {
+
 	const { data } = await getCertificateList()
-	certificateList.value.a = data[0]?.length || 0
-	certificateList.value.b = data[1]?.length || 0
-	certificateList.value.c = data[2]?.length || 0
+	// certificateList.value.a = data[0]?.length || 0
+	certificateList.value.a = findCommonCount(pageable.value.as_code_list, data[0]?.length?data[0]:[])
+	certificateList.value.b =  findCommonCount(pageable.value.as_code_list, data[1]?.length?data[1]:[])
+	certificateList.value.c =  findCommonCount(pageable.value.as_code_list, data[2]?.length?data[2]:[])
 
 	nextTick(() => {
 		showPeriod()
-
 	})
-
 	// certificateList.value=data.list
 };
 
@@ -304,8 +318,6 @@ const FTPList = ref<any>({})
 const getFTP = async () => {
 	const { data } = await getFTPList()
 	FTPList.value = data
-
-
 };
 
 
@@ -465,9 +477,9 @@ const showPeriod = () => {
 				},
 
 				data: [
-					{ value: certificateList.value.a ? certificateList.value.a : 0, name: '剩余31-60天', itemStyle: { color: '#5470C6' } },
+					{ value: certificateList.value.c ? certificateList.value.c : 0, name: '剩余31-60天', itemStyle: { color: '#5470C6' } },
 					{ value: certificateList.value.b ? certificateList.value.b : 0, name: '剩余1-30天', itemStyle: { color: '#FAC858' } },
-					{ value: certificateList.value.c ? certificateList.value.c : 0, name: '已过检', itemStyle: { color: '#EF6666' } }
+					{ value: certificateList.value.a ? certificateList.value.a : 0, name: '已过检', itemStyle: { color: '#EF6666' } }
 				],
 				emphasis: {
 					itemStyle: {
@@ -727,7 +739,7 @@ onMounted(() => {
 
 
 	getFTP()
-	getCertificate()
+	// getCertificate()
 	getPlatforms()
 	// showDevice()
 	// showPeriod()

+ 1 - 1
src/views/alarm/singleStationData/index.vue

@@ -81,7 +81,7 @@
 									无</div>
 								<div v-else v-for="item in weatherInfoArr" :key="item"
 									style="text-align: center;margin-top: 15px;padding-bottom: 20px;color: red;font-weight: bold;">
-									{{ findLabelByValue(dataTypeList, item.tact_type) }}-{{ item.data_value }}</div>
+									{{ findLabelByValue(dataTypeList, item.data_type) }}-{{ item.data_value }}</div>
 
 							</div>
 						</div>

+ 4 - 1
src/views/analysis/dataSynthesis/index.vue

@@ -267,7 +267,10 @@ const humidityLineArr = ref()
 const pressureLineArr = ref()
 const getHistoryList = async () => {
 
-
+	if (isDateFuture(dateRange.value[0]) ||isDateFuture(dateRange.value[1])) {
+		ElMessage.error("不得选择未来的时间");
+		return false;
+	}
 	const { data } = await getDataItemList({ ...pageable.value, pageSize: 99, as_code_list: [pageable.value.as_code], data_items: historyColumns, data_type: false, time_space: value1.value ? 60 : 1, end_time: getStamp(dateRange.value[1]), begin_time: getStamp(dateRange.value[0]) });
 	timeArr.value = data.list?.map(item => {
 		return formatDate(item.data_time_i, 1)

+ 5 - 2
src/views/analysis/featureCurves/index.vue

@@ -566,7 +566,7 @@ const submitForm = () => {
 	// updateColumns()
 	// getList()
 	// weatherInfo()
-	// getHistoryList()
+	getHistoryList()
 	saveCustomizeColumns()
 }
 
@@ -713,7 +713,6 @@ function formatDate(timestamp, type) {
 
 const array = ref<any>([])
 const Access = () => {
-	console.log(array.value, 'access');
 
 	array.value?.forEach((item, i) => {
 		// 获取最大值方法
@@ -812,6 +811,10 @@ const tempLineArr = ref()
 const humidityLineArr = ref()
 const pressureLineArr = ref()
 const getHistoryList = async () => {
+	if (isDateFuture(dateRange.value[0]) ||isDateFuture(dateRange.value[1])) {
+		ElMessage.error("不得选择未来的时间");
+		return false;
+	}
 	const arr = [...customizeColumns.value, ...historyColumns].reduce((acc, item) => {
 		if (!acc.some(existingItem => existingItem.data_id === item.data_id)) {
 			acc.push(item);

+ 38 - 68
src/views/analysis/lightningArea/index.vue

@@ -21,7 +21,7 @@
 						<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD HH:mm"
 							:format="value1 ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm'"
 							:type="value1 ? 'daterange' : 'datetimerange'" range-separator="-" start-placeholder="开始时间"
-							end-placeholder="结束时间" :disabled-date="disabledDate" :disabled-minutes="disabledMinutes"
+							end-placeholder="结束时间" :disabled-date="disabledDate" 
 							@focus="handleFocus" @calendar-change="handleChange" @change="handleDateChange"
 							:default-time="[new Date(2000, 1, 1, 0, 0), new Date(2000, 1, 1, new Date().getHours(), 0)]"
 							style="width: 300px;"></el-date-picker>
@@ -95,7 +95,6 @@ const handleDateChange = async (e) => {
 			if (isWithinThirtyMinutes(e[0], e[1])) {
 				// 获取参数
 				getHistoryList()
-
 			} else {
 				ElMessage.error("分钟模式下时间间隔不能大于3小时");
 			}
@@ -118,19 +117,7 @@ const limitTime = 1000 * 60 * 60 * 24 * 6
 const disabledDate = (time: Date) => {
 	return time.getTime() > Date.now() - 8.64e6
 
-	if (!value1.value) {
-		return time.getTime() > Date.now() - 8.64e6
-	} else {
-		if (pickDay.value) {
-			return (
-				time.getTime() < pickDay.value.getTime() - limitTime ||
-				time.getTime() > pickDay.value.getTime() + limitTime ||
-				time.getTime() > Date.now() - 8.64e6
-			)
-		} else {
-			return time.getTime() > Date.now() - 8.64e6
-		}
-	}
+	
 }
 const handleChange = (val: Date[]) => {
 	const [pointDay] = val
@@ -138,23 +125,6 @@ const handleChange = (val: Date[]) => {
 }
 
 
-const disabledHours = () => {
-	const a: number[] = [];
-	for (let i = 0; i < 24; i++) {
-		if (new Date().getHours() >= i) continue;
-		a.push(i);
-	}
-	return a;
-};
-
-const disabledMinutes = () => {
-	const a: number[] = [];
-	// for (let i = 0; i < 60; i++) {
-	// 	if (new Date().getMinutes() >= i) continue;
-	// 	a.push(i);
-	// }
-	return a;
-};
 
 
 
@@ -162,12 +132,11 @@ const disabledMinutes = () => {
 
 const pageable = ref({
 	data_type: true,
-	time_order: 0,
+	time_order: 1,
 	as_code: undefined,
 	data_items: [],
 	pageNum: 1,
 	pageSize: 20,
-	total: 0
 });
 let historyColumns = [
 	{
@@ -253,6 +222,10 @@ const series = ref<any>([])
 const tempLineArr = ref()
 
 const getHistoryList = async () => {
+	if (isDateFuture(dateRange.value[0]) || isDateFuture(dateRange.value[1])) {
+		ElMessage.error("不得选择未来的时间");
+		return false;
+	}
 	const { data } = await getDataItemList({ ...pageable.value, pageSize: 9999, as_code_list: [pageable.value.as_code], data_items: historyColumns, data_type: false, time_space: value1.value ? 60 : 1, end_time: getStamp(dateRange.value[1]), begin_time: getStamp(dateRange.value[0]) });
 	timeArr.value = data.list?.map(item => {
 		return formatDate(item.data_time_i, 1)
@@ -260,7 +233,7 @@ const getHistoryList = async () => {
 
 	data.list?.forEach((item, index) => {
 		// 初始化一个空数组来存储生成的对象  
-		let resultArray =<any> [];
+		let resultArray = <any>[];
 
 		// 初始化起始角度和结束角度  
 		let startAngle = 359.50;
@@ -269,22 +242,37 @@ const getHistoryList = async () => {
 
 		// 循环生成对象  
 		for (let angle = startAngle; angle >= endAngle; angle += step) {
-			if (item[1011] != '--'&&Number(item[1011])==angle) {
-				resultArray.push(Number(item[1010]))
-				console.log(resultArray,'resultArray');
-				
-			} else {
-				resultArray.push(0)
+			if (item[1001] != '--') {
+				if (angle == 0 && (Number(item[1011]) >= 359.75 || Number(item[1011]) < 0.25)) {
+					resultArray.push(Number(item[1010]))
+				} else if (Number(item[1011]) >= angle - 0.25 && Number(item[1011]) < angle + 0.25) {
+					resultArray.push(Number(item[1010]))
+				} else {
+					resultArray.push(null)
+				}
+
 			}
+			// if (item[1011] != '--' && Number(item[1011]) == angle) {
+			// 	resultArray.push(Number(item[1010]))
+			// 	console.log(resultArray, 'resultArray');
+
+			// } else {
+			// 	resultArray.push(0)
+			// }
 			// resultArray.push(obj);
 		}
 		series.value.push({
 			name: 'No.' + index,
 			type: 'radar',
+			itemStyle: {
+				borderWidth: 10,
+				borderColor: 'transparent'
+			},
 			data: [
 				{
 					value: resultArray,
 					name: item.data_time,
+					info: item,
 					lineStyle: {
 						normal: {
 							color: 'transparent'
@@ -292,7 +280,7 @@ const getHistoryList = async () => {
 					},
 					itemStyle: { // 单个拐点标志的样式设置。
 						normal: {
-							// color:'#d1d6dd'
+							color: '#5470c6'
 						}
 					},
 				},
@@ -316,9 +304,10 @@ const resetForm = (formEl) => {
 	formEl.resetFields();
 };
 
+const clickNum=ref(0)
 const showData = () => {
 	// 初始化一个空数组来存储生成的对象  
-	let resultArray =<any> [];
+	let resultArray = <any>[];
 
 	// 初始化起始角度和结束角度  
 	let startAngle = 360;
@@ -329,7 +318,6 @@ const showData = () => {
 	for (let angle = startAngle; angle > endAngle; angle += step) {
 		let obj = {
 			name: (angle === 360 || angle % 45 === 0) ? angle.toFixed(1) + '°' : '',
-			min: 0,
 			max: 200,
 			color: isDark.value ? '#fff' : "#000",
 			axisLabel: angle === 360 ? {
@@ -346,10 +334,11 @@ const showData = () => {
 	let mychart = echarts.init(data.value);
 	let option = {
 		tooltip: {
-			show: false,
-			triggerOn: 'mousemove',
-			formatter: function () {
-				return '';
+			show: true,
+			triggerOn: 'click',
+			formatter: function (params) {
+				return `一分钟最强闪电的强度:${params.data.info[1003]}V/m <br />时间:${formatDate(params.data.info.data_time_i, 2)}`
+			
 			}
 		},
 		radar: {
@@ -386,26 +375,7 @@ const showData = () => {
 		},
 		series: series.value
 	};
-	// mychart.on('mousemove', (params) => {
-	// 	let num = params.event.topTarget.__dimIdx;
-	// 	if (num === undefined) {
-	// 		option.tooltip.show = false;
-	// 		option.tooltip.formatter = function () {
-	// 			return '';
-	// 		};
-	// 	} else {
-	// 		option.tooltip.show = true;
-	// 		option.tooltip.formatter = function (params) {
-	// 			console.log(params)
-	// 			return (
-	// 				option.radar.indicator[num].name +
-	// 				':' +
-	// 				params.data.value[num]
-	// 			);
-	// 		};
-	// 	}
-	// 	mychart.setOption(option);
-	// });
+
 	mychart.setOption(option);
 	window.addEventListener("resize", function () {
 		mychart.resize();

+ 5 - 24
src/views/analysis/rainfall/index.vue

@@ -91,7 +91,6 @@ const handleDateRangeChange = (newVal) => {
 	}
 };
 const handleDateChange = async (e) => {
-	console.log(isDateFuture(e[0]), isDateFuture(e[1]));
 	
 	if (isDateFuture(e[0]) ||isDateFuture(e[1])) {
 		ElMessage.error("不得选择未来的时间");
@@ -122,19 +121,7 @@ const limitTime = 1000 * 60 * 60 * 24 * 30
 
 const disabledDate = (time: Date) => {
 	return time.getTime() > Date.now() - 8.64e6
-	if (!value1.value) {
-		return time.getTime() > Date.now() - 8.64e6
-	} else {
-		if (pickDay.value) {
-			return (
-				time.getTime() < pickDay.value.getTime() - limitTime ||
-				time.getTime() > pickDay.value.getTime() + limitTime ||
-				time.getTime() > Date.now() - 8.64e6
-			)
-		} else {
-			return time.getTime() > Date.now() - 8.64e6
-		}
-	}
+
 }
 const handleChange = (val: Date[]) => {
 	const [pointDay] = val
@@ -142,14 +129,6 @@ const handleChange = (val: Date[]) => {
 }
 
 
-const disabledHours = () => {
-	const a: number[] = [];
-	for (let i = 0; i < 24; i++) {
-		if (new Date().getHours() >= i) continue;
-		a.push(i);
-	}
-	return a;
-};
 
 const disabledMinutes = () => {
 	const a: number[] = [];
@@ -259,7 +238,10 @@ const hourArr1 = ref()
 const hourArr2 = ref()
 const show = ref(false)
 const getHistoryList = async () => {
-	console.log(dateRange.value, 111);
+	if (isDateFuture(dateRange.value[0]) ||isDateFuture(dateRange.value[1])) {
+		ElMessage.error("不得选择未来的时间");
+		return false;
+	}
 
 	const { data } = await getDataItemList({ ...pageable.value, pageSize: 9999, as_code_list: [pageable.value.as_code], data_items: historyColumns, time_space: value1.value ? 1440 : 60, end_time: getStamp(dateRange.value[1]), begin_time: getStamp(dateRange.value[0]) });
 	timeArr.value = data.list?.map(item => {
@@ -276,7 +258,6 @@ const getHistoryList = async () => {
 		} else {
 			return '0.0'
 		}
-		return item[312]
 	})
 	hourArr2.value = data.list?.map(item => {
 		return item[302]

+ 272 - 43
src/views/analysis/windSpeed/index.vue

@@ -15,12 +15,16 @@
 					</el-select>
 				</el-form-item>
 				<el-form-item label="观测时间:" prop="base">
-					<el-date-picker v-model="dateRange" type="daterange" range-separator="至"
-						start-placeholder="开始时间" end-placeholder="结束时间" style="width: 300px" />
+					<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD"
+						type="daterange" range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间"
+						:disabled-date="disabledDate" @focus="handleFocus" @calendar-change="handleChange"
+						@change="handleDateChange"
+						:default-time="[new Date(2000, 1, 1, 0, 0), new Date(2000, 1, 1, new Date().getHours(), 0)]"
+						style="width: 300px;"></el-date-picker>
 				</el-form-item>
 				<el-form-item>
 					<div>
-						<el-button type="primary">查询</el-button>
+						<el-button type="primary" @click="getHistoryList" >查询</el-button>
 						<el-button plain @click="resetForm(formRef)">重置</el-button>
 					</div>
 				</el-form-item>
@@ -34,7 +38,10 @@
 							<span>风向风速玫瑰图</span>
 						</div>
 						<div class="mt5">
-							<div ref="data" class="data_box"></div>
+							<el-row :gutter="10">
+								<el-col :span="12"><div ref="data" class="data_box"></div></el-col>
+								<el-col :span="12"><div ref="wind" class="data_box"></div></el-col>
+							</el-row>
 						</div>
 					</div>
 				</el-col>
@@ -52,10 +59,47 @@ import { ref, computed, onMounted, reactive, watch, onDeactivated, onActivated }
 import { getDataItemList, getPlatformList, getRgDataList, getTacRecordList } from "@/api/modules/allData";
 import { Platform } from "@/api/interface";
 import { parseTime } from '@/utils/index';
-import { isToday, isWithinThirtyMinutes, getTimeStamp, getStamp } from "@/utils/dateTime";
+import { isToday, isWithinThirtyMinutes, getTimeStamp, getStamp, isWithin24Hours, isDateFuture, isDateRangeWithinDays } from "@/utils/dateTime";
+
+const dateRange = ref<[any, any]>([parseTime(new Date(getTimeStamp(5)), '{y}-{m}-{d}') + ' 00:00', parseTime(new Date(), '{y}-{m}-{d} {h}') + ':00']);
+const handleDateRangeChange = (newVal) => {
+	const [startDate, endDate] = newVal;
+	if (endDate && isToday(endDate)) {
+		// 获取当前时间的整点  
+		const currentHour = new Date().getHours();
+		const roundedEndDate = new Date(endDate);
+		roundedEndDate.setMinutes(0, 0, 0); // 设置分钟、秒、毫秒为0  
+		const startZeroed = new Date(startDate);
+		startZeroed.setHours(0, 0, 0, 0);
+		dateRange.value = [parseTime(new Date(startZeroed)), parseTime(new Date(roundedEndDate))];
+	} else {
+		const noTodayStart = new Date(startDate).setHours(0, 0, 0, 0);
+		const noTodayEnd = new Date(endDate).setHours(23, 0, 0, 0);
+		dateRange.value = [parseTime(new Date(noTodayStart)), parseTime(new Date(noTodayEnd))];
+	}
+};
+const handleDateChange = async (e) => {
+	if (isDateRangeWithinDays(e[0], e[1], 30)) {
+		await handleDateRangeChange(e)
+		getHistoryList()
+	} else {
+		ElMessage.error("时间间隔不能大于30天");
+	}
+}
+const pickDay = ref()
+const handleFocus = () => {
+	pickDay.value = null
+}
+const limitTime = 1000 * 60 * 60 * 24 * 30
 
-const dateRange = ref<[any, any]>([parseTime(new Date(), '{y}-{m}-{d}') + ' 00:00', parseTime(new Date(), '{y}-{m}-{d} {h}:{i}')]);
+const disabledDate = (time: Date) => {
+	return time.getTime() > Date.now() - 8.64e6
 
+}
+const handleChange = (val: Date[]) => {
+	const [pointDay] = val
+	pickDay.value = pointDay
+}
 
 
 const pageable = ref({
@@ -68,7 +112,7 @@ const pageable = ref({
 	total: 0
 });
 let historyColumns = [
-{
+	{
 		data_r_table: "SHI_SHI_LIU_YAO_SU_SHU_JU",
 		data_id: 2,
 		data_type: "风",
@@ -135,25 +179,116 @@ function formatDate(timestamp, type) {
 
 
 const timeArr = ref()
-const tempLineArr = ref()
-const humidityLineArr = ref()
-const pressureLineArr = ref()
+const windD = ref<any>([])
+const windS = ref<any>([])
+const windInfo = ref<any>({
+	max: 6,
+	speedMax:6
+})
 const getHistoryList = async () => {
-	const { data } = await getDataItemList({ ...pageable.value, pageSize: 99, as_code_list: [pageable.value.as_code], data_items: historyColumns, data_type: false, time_space:60, end_time:  getStamp(dateRange[1]), begin_time: getStamp(dateRange[0]) });
+	if (!isDateRangeWithinDays(dateRange.value[0], dateRange.value[1], 30)) {
+		ElMessage.error("时间间隔不能大于30天");
+		return false
+	}
+	const { data } = await getDataItemList({ ...pageable.value, pageSize: 999, as_code_list: [pageable.value.as_code], data_items: historyColumns, data_type: false, time_space: 60, end_time: getStamp(dateRange.value[1]), begin_time: getStamp(dateRange.value[0]) });
 	timeArr.value = data.list?.map(item => {
 		return formatDate(item.data_time_i, 1)
 	})
-	tempLineArr.value = data.list?.map(item => {
-		return item[101]
-	})
-	humidityLineArr.value = data.list?.map(item => {
-		return item[106]
+	let arr1 = new Array(16).fill(0);
+	let arr2 = new Array(16).fill([]);
+	let num = 0
+
+	data.list?.forEach((item, index) => {
+		if (new Date(item.data_time_i * 1000).getHours() % 3 == 2) {
+			num++
+			if (item[2] >= 348.75 || item[2] < 11.25) {
+				arr1[0]++;
+				arr2[0] = [...arr2[0], item[1]];
+			} else if (item[2] >= 326.25 && item[2] < 348.75) {
+				arr1[1]++;
+				arr2[1] = [...arr2[1], item[1]];
+			} else if (item[2] >= 303.75 && item[2] < 326.25) {
+				arr1[2]++;
+				arr2[2] = [...arr2[2], item[1]];
+			} else if (item[2] >= 281.25 && item[2] < 303.75) {
+				arr1[3]++;
+				arr2[3] = [...arr2[3], item[1]];
+			} else if (item[2] >= 258.75 && item[2] < 281.25) {
+				arr1[4]++;
+				arr2[4] = [...arr2[4], item[1]];
+			} else if (item[2] >= 236.25 && item[2] < 258.75) {
+				arr1[5]++;
+				arr2[5] = [...arr2[5], item[1]];
+			} else if (item[2] >= 213.75 && item[2] < 236.25) {
+				arr1[6]++;
+				arr2[6] = [...arr2[6], item[1]];
+			} else if (item[2] >= 191.25 && item[2] < 213.75) {
+				arr1[7]++;
+				arr2[7] = [...arr2[7], item[1]];
+			} else if (item[2] >= 168.75 && item[2] < 191.25) {
+				arr1[8]++;
+				arr2[8] = [...arr2[8], item[1]];
+			} else if (item[2] >= 146.25 && item[2] < 168.75) {
+				arr1[9]++;
+				arr2[9] = [...arr2[9], item[1]];
+			} else if (item[2] >= 123.75 && item[2] < 146.25) {
+				arr1[10]++;
+				arr2[10] = [...arr2[10], item[1]];
+			} else if (item[2] >= 101.25 && item[2] < 123.75) {
+				arr1[11]++;
+				arr2[11] = [...arr2[11], item[1]];
+			} else if (item[2] >= 78.75 && item[2] < 101.25) {
+				arr1[12]++;
+				arr2[12] = [...arr2[12], item[1]];
+			} else if (item[2] >= 56.25 && item[2] < 78.75) {
+				arr1[13]++;
+				arr2[13] = [...arr2[13], item[1]];
+			} else if (item[2] >= 33.75 && item[2] < 56.25) {
+				arr1[14]++;
+				arr2[14] = [...arr2[14], item[1]];
+			} else if (item[2] >= 11.25 && item[2] < 33.75) {
+				arr1[15]++;
+				arr2[15] = [...arr2[15], item[1]];
+			}
+
+		}
+	});
+
+	const arr3 = arr2.map(subArr => {
+		const sum = subArr.reduce((a, b) => Number(a) + Number(b), 0);
+		const avg = sum / subArr.length;
+		return isNaN(avg) ? 0 : avg.toFixed(2);
 	})
-	pressureLineArr.value = data.list?.map(item => {
-		return item[202]
+	
+	windD.value = arr1.map((item) => {
+		return  isNaN(item / (num/100)) ? 0 :item / (num/100)
 	})
+	windInfo.value.max = calMax(windD.value)
+	windInfo.value.speedMax = calMax(arr3)
+	windS.value = arr3
 	showData()
+	showWind()
 };
+// 获取时间戳的小时
+function getHourFromTimestamp(timestamp) {
+	const date = new Date(timestamp * 1000); // 将秒时间戳转换为毫秒时间戳
+	return date.getHours();
+}
+
+
+// 获取传入日期相差时间
+function getHoursDifference(date1, date2) {
+	const d1 = new Date(date1);
+	const d2 = new Date(date2);
+	const diffInMs = Math.abs(d2.getTime() - d1.getTime());
+	return Math.floor(diffInMs / (1000 * 60 * 60)) / 100;
+}
+// 获取最大值
+function calMax(arr) {
+	let max = Math.max.apply(null, arr); // 获取最大值方法
+	let maxint = Math.ceil(max / 6) * 6; // 向上以6的倍数取整
+	return maxint === 0 ? 6 : maxint; // 输出最大值+6
+}
 
 
 const formRef = ref()
@@ -167,9 +302,8 @@ const resetForm = (formEl) => {
 	if (!formEl) return;
 	formEl.resetFields();
 };
-
+// 风向
 const showData = () => {
-
 	let mychart = echarts.init(data.value);
 	let option = {
 
@@ -185,12 +319,12 @@ const showData = () => {
 				formatter: '{value}',
 				textStyle: {
 					fontSize: 15,
-					color:  isDark.value ? '#fff' : "#000",
+					color: isDark.value ? '#fff' : "#000",
 				}
 			},
 			nameGap: 5,
 			// 指示器名称和指示器轴的距离。[ default: 15 ]
-			splitNumber: 7,
+			splitNumber: 6,
 			splitLine: { // (这里是指所有圆环)坐标轴在 grid 区域中的分隔线。
 				lineStyle: {
 					color: '#bbbbbb',
@@ -202,27 +336,33 @@ const showData = () => {
 			splitArea: { // 坐标轴在 grid 区域中的分隔区域,默认不显示。
 				show: true,
 				areaStyle: { // 分隔区域的样式设置。
-					color: [isDark.value ? '#000' : "#fff",isDark.value ? '#000' : "#fff"],
+					color: [isDark.value ? '#000' : "#fff", isDark.value ? '#000' : "#fff"],
 					// 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
 				}
 			},
 			indicator: [
-				{ name: 'N', max: 21, axisLabel: { show: true, color:  isDark.value ? '#fff' : "#000" }, },
-				{ name: 'NNW', max: 21 },
-				{ name: 'NW°', max: 21 },
-				{ name: 'WNW', max: 21 },
-				{ name: 'W°', max: 21 },
-				{ name: 'WSW', max: 21 },
-				{ name: 'WS°', max: 21 },
-				{ name: 'SSW', max: 21 },
-				{ name: 'S', max: 21 },
-				{ name: 'SSE', max: 21 },
-				{ name: 'SE', max: 21 },
-				{ name: 'ESE', max: 21 },
-				{ name: 'E', max: 21 },
-				{ name: 'ENE', max: 21 },
-				{ name: 'NE', max: 21 },
-				{ name: 'NNE', max: 21 },
+				{
+					name: 'N', max: windInfo.value.max, axisLabel: {
+						show: true, color: isDark.value ? '#fff' : "#000", formatter: function (params) {
+							return params.toFixed();
+						},
+					},
+				},
+				{ name: 'NNW', max: windInfo.value.max },
+				{ name: 'NW°', max: windInfo.value.max },
+				{ name: 'WNW', max: windInfo.value.max },
+				{ name: 'W°', max: windInfo.value.max },
+				{ name: 'WSW', max: windInfo.value.max },
+				{ name: 'WS°', max: windInfo.value.max },
+				{ name: 'SSW', max: windInfo.value.max },
+				{ name: 'S', max: windInfo.value.max },
+				{ name: 'SSE', max: windInfo.value.max },
+				{ name: 'SE', max: windInfo.value.max },
+				{ name: 'ESE', max: windInfo.value.max },
+				{ name: 'E', max: windInfo.value.max },
+				{ name: 'ENE', max: windInfo.value.max },
+				{ name: 'NE', max: windInfo.value.max },
+				{ name: 'NNE', max: windInfo.value.max },
 			]
 		},
 		series: [
@@ -232,7 +372,7 @@ const showData = () => {
 				symbolSize: 0,//拐点大小
 				data: [
 					{
-						value: [0, 12, 12, 12, 0, 0, 0, 12, 15, 15, 9, 0, 0, 0, 15, 8],
+						value: windD.value,
 						name: '风向',
 						itemStyle: { // 单个拐点标志的样式设置。
 							normal: {
@@ -240,10 +380,95 @@ const showData = () => {
 								// color:'#d1d6dd'
 							}
 						},
+					}
+				]
+			}
+		]
+	};
+	mychart.setOption(option)
+	window.addEventListener("resize", function () {
+		mychart.resize();
+	});
+}
+// 风速
+const wind=ref()
+const showWind = () => {
+	let mychart = echarts.init(wind.value);
+	let option = {
+
+		legend: {
+			// data: ['Allocated Budget', 'Actual Spending']
+			textStyle: {//图例文字的样式
+				color: isDark.value ? '#fff' : "#000",
+			}
+		},
+		radar: {
+			shape: 'circle',
+			name: { // (圆外的标签)雷达图每个指示器名称的配置项。
+				formatter: '{value}',
+				textStyle: {
+					fontSize: 15,
+					color: isDark.value ? '#fff' : "#000",
+				}
+			},
+			nameGap: 5,
+			// 指示器名称和指示器轴的距离。[ default: 15 ]
+			splitNumber: 6,
+			splitLine: { // (这里是指所有圆环)坐标轴在 grid 区域中的分隔线。
+				lineStyle: {
+					color: '#bbbbbb',
+					// 分隔线颜色
+					width: 1,
+					// 分隔线线宽
+				}
+			},
+			splitArea: { // 坐标轴在 grid 区域中的分隔区域,默认不显示。
+				show: true,
+				areaStyle: { // 分隔区域的样式设置。
+					color: [isDark.value ? '#000' : "#fff", isDark.value ? '#000' : "#fff"],
+					// 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
+				}
+			},
+			indicator: [
+				{
+					name: 'N', max: windInfo.value.speedMax, axisLabel: {
+						show: true, color: isDark.value ? '#fff' : "#000", formatter: function (params) {
+							return params.toFixed();
+						},
 					},
+				},
+				{ name: 'NNW', max: windInfo.value.speedMax },
+				{ name: 'NW°', max: windInfo.value.speedMax },
+				{ name: 'WNW', max: windInfo.value.speedMax },
+				{ name: 'W°', max: windInfo.value.speedMax },
+				{ name: 'WSW', max: windInfo.value.speedMax },
+				{ name: 'WS°', max: windInfo.value.speedMax },
+				{ name: 'SSW', max: windInfo.value.speedMax },
+				{ name: 'S', max: windInfo.value.speedMax },
+				{ name: 'SSE', max: windInfo.value.speedMax },
+				{ name: 'SE', max: windInfo.value.speedMax },
+				{ name: 'ESE', max: windInfo.value.speedMax },
+				{ name: 'E', max: windInfo.value.speedMax },
+				{ name: 'ENE', max: windInfo.value.speedMax },
+				{ name: 'NE', max: windInfo.value.speedMax },
+				{ name: 'NNE', max: windInfo.value.speedMax },
+			]
+		},
+		series: [
+			{
+				name: 'windspeed',
+				type: 'radar',
+				symbolSize: 0,//拐点大小
+				data: [
 					{
-						value: [0, 4, 16, 9, 0, 0, 0, 15, 13, 10, 12, 0, 0, 0, 5, 11],
-						name: '风速 (0.1m/s)'
+						value: windS.value,
+						name: '风速 (m/s)',
+						itemStyle: { // 单个拐点标志的样式设置。
+							normal: {
+
+								color:'#91cc75'
+							}
+						},
 					}
 				]
 			}
@@ -256,10 +481,14 @@ const showData = () => {
 }
 watch(isDark, () => {
 	showData()
+	showWind()
+
 });
 onMounted(() => {
+
+
 	getPlatforms()
-	showData()
+	// showData()
 })
 
 </script>