|
@@ -26,7 +26,9 @@
|
|
}}</div>
|
|
}}</div>
|
|
<div class="top_item">经度:{{ selectPlatform?.as_lon }}</div>
|
|
<div class="top_item">经度:{{ selectPlatform?.as_lon }}</div>
|
|
<div class="top_item">纬度:{{ selectPlatform?.as_lat }}</div>
|
|
<div class="top_item">纬度:{{ selectPlatform?.as_lat }}</div>
|
|
- <div class="top_item">观测时间:{{dataItemInfo&&dataItemInfo.data_time_i? formatDate(dataItemInfo?.data_time_i, 2):'--' }}</div>
|
|
|
|
|
|
+ <div class="top_item">观测时间:{{ dataItemInfo && dataItemInfo.data_time_i ?
|
|
|
|
+ formatDate(dataItemInfo?.data_time_i, 2) : '--' }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="header-button-ri">
|
|
<div class="header-button-ri">
|
|
<slot name="toolButton">
|
|
<slot name="toolButton">
|
|
@@ -90,10 +92,10 @@
|
|
<div style="font-weight: bold;">瞬时风 ( m/s )</div>
|
|
<div style="font-weight: bold;">瞬时风 ( m/s )</div>
|
|
<div class="mt15 box1">
|
|
<div class="mt15 box1">
|
|
<div ref="windSpeed" class="ve-ring" style="height: 200px"></div>
|
|
<div ref="windSpeed" class="ve-ring" style="height: 200px"></div>
|
|
- <div class="icon icon1">{{ dataItemInfo&&dataItemInfo[9]?dataItemInfo[9]:'--' }}
|
|
|
|
|
|
+ <div class="icon icon1">{{ dataItemInfo && dataItemInfo[9] ? dataItemInfo[9] : '--' }}
|
|
<span>°</span>
|
|
<span>°</span>
|
|
</div>
|
|
</div>
|
|
- <div class="icon icon2" >{{ dataItemInfo&&dataItemInfo[8]?dataItemInfo[8]:'--' }}
|
|
|
|
|
|
+ <div class="icon icon2">{{ dataItemInfo && dataItemInfo[8] ? dataItemInfo[8] : '--' }}
|
|
<span>m/s</span>
|
|
<span>m/s</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -176,12 +178,13 @@
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<el-row :gutter="15">
|
|
<el-row :gutter="15">
|
|
- <el-col :xs="12" :sm="8" :md="8" :lg="4" :xl="4" v-for="item in selectElement.length>0?selectElement:customizeColumns" :key="item.data_id">
|
|
|
|
|
|
+ <el-col :xs="12" :sm="8" :md="8" :lg="4" :xl="4"
|
|
|
|
+ v-for="item in selectElement.length > 0 ? selectElement : customizeColumns" :key="item.data_id">
|
|
<div class="chart_item info_box zhuti">
|
|
<div class="chart_item info_box zhuti">
|
|
<div class="info_title">{{ item.data_name }} ( {{ item.data_unit }} )</div>
|
|
<div class="info_title">{{ item.data_name }} ( {{ item.data_unit }} )</div>
|
|
<div class="mt15 ">
|
|
<div class="mt15 ">
|
|
<div class="info_content">
|
|
<div class="info_content">
|
|
- {{ item.data_value?item.data_value: '--' }}
|
|
|
|
|
|
+ {{ item.data_value ? item.data_value : '--' }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -320,8 +323,8 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
- <div class="mt15" >
|
|
|
|
- <div ref="wind" class="ve-ring" style="height: 200px" ></div>
|
|
|
|
|
|
+ <div class="mt15">
|
|
|
|
+ <div ref="wind" class="ve-ring" style="height: 200px"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -337,8 +340,8 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
- <div class="mt15" >
|
|
|
|
- <div ref="tempLine" class="ve-ring" style="height: 200px" ></div>
|
|
|
|
|
|
+ <div class="mt15">
|
|
|
|
+ <div ref="tempLine" class="ve-ring" style="height: 200px"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -361,14 +364,13 @@
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
<!-- 添加或修改岗位对话框 -->
|
|
<!-- 添加或修改岗位对话框 -->
|
|
- <el-dialog :title="dialog.title" v-model="dialog.visible" width="940px" append-to-body>
|
|
|
|
- <div style="height: 500px">
|
|
|
|
|
|
+ <el-dialog :title="dialog.title" v-model="dialog.visible" width="1200px" append-to-body>
|
|
|
|
+ <div style="height: 500px;display: flex">
|
|
<el-tabs tab-position="left" class="demo-tabs" style="height: 100%">
|
|
<el-tabs tab-position="left" class="demo-tabs" style="height: 100%">
|
|
<el-tab-pane label="风">
|
|
<el-tab-pane label="风">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '风'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '风'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -376,8 +378,7 @@
|
|
<el-tab-pane label="温湿度">
|
|
<el-tab-pane label="温湿度">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '温湿度'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '温湿度'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -385,8 +386,7 @@
|
|
<el-tab-pane label="气压">
|
|
<el-tab-pane label="气压">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '气压'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '气压'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -394,8 +394,7 @@
|
|
<el-tab-pane label="降水">
|
|
<el-tab-pane label="降水">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '降水'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '降水'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -403,8 +402,7 @@
|
|
<el-tab-pane label="云">
|
|
<el-tab-pane label="云">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '云'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '云'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -412,8 +410,7 @@
|
|
<el-tab-pane label="能见度">
|
|
<el-tab-pane label="能见度">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '能见度'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '能见度'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -430,8 +427,7 @@
|
|
<el-tab-pane label="积雪">
|
|
<el-tab-pane label="积雪">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '积雪'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '积雪'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -457,8 +453,7 @@
|
|
<el-tab-pane label="闪电">
|
|
<el-tab-pane label="闪电">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '闪电'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '闪电'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -466,8 +461,7 @@
|
|
<el-tab-pane label="日照">
|
|
<el-tab-pane label="日照">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '日照'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '日照'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -475,8 +469,7 @@
|
|
<el-tab-pane label="总辐射">
|
|
<el-tab-pane label="总辐射">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '总辐射'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '总辐射'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -484,8 +477,7 @@
|
|
<el-tab-pane label="日照文">
|
|
<el-tab-pane label="日照文">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '日照文'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '日照文'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
@@ -493,13 +485,27 @@
|
|
<el-tab-pane label="水文">
|
|
<el-tab-pane label="水文">
|
|
<div class="container-tag">
|
|
<div class="container-tag">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
<template v-for="item in elementList" :key="item.id">
|
|
- <div v-if="item.data_type === '水文'"
|
|
|
|
- :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
|
|
|
|
+ <div v-if="item.data_type === '水文'" :class="item.isSelected ? 'item-tag-active' : 'item-tag'"
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
@click="toggleSelection(item)">{{ item.data_name }}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
|
+ <div class="selected-list-box">
|
|
|
|
+ <div class="disposition-title" style="margin-top: 0px">已选要素</div>
|
|
|
|
+ <div class="selected-list-c">
|
|
|
|
+ <template v-for="(item, index) in copiedCustomizeColumns" :key="item.id">
|
|
|
|
+ <div :class="selectedItemIndex === index ? 'selected-item-tag-active' : 'selected-item-tag'"
|
|
|
|
+ @click="changeSelected(index)">{{ item.data_name }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="button-container">
|
|
|
|
+ <el-button type="primary" plain class="top-left" @click="changeMoveUp">上移</el-button>
|
|
|
|
+ <el-button type="primary" plain class="top-right" @click="changeMoveDown">下移</el-button>
|
|
|
|
+ <el-button type="primary" plain class="bottom-left" @click="changeRemove">移除</el-button>
|
|
|
|
+ <el-button type="primary" plain class="bottom-right" @click="changeCleared">清空</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<template #footer>
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
@@ -522,25 +528,25 @@ import { Platform } from "@/api/interface";
|
|
import { ElLoading } from "element-plus";
|
|
import { ElLoading } from "element-plus";
|
|
|
|
|
|
/* 全局请求 loading */
|
|
/* 全局请求 loading */
|
|
-const loading=ref()
|
|
|
|
|
|
+const loading = ref()
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description 开启 Loading
|
|
* @description 开启 Loading
|
|
* */
|
|
* */
|
|
const startFullLoading = () => {
|
|
const startFullLoading = () => {
|
|
- loading.value = ElLoading.service({
|
|
|
|
- fullscreen: true,
|
|
|
|
- lock: true,
|
|
|
|
- text: "Loading",
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)"
|
|
|
|
- });
|
|
|
|
|
|
+ loading.value = ElLoading.service({
|
|
|
|
+ fullscreen: true,
|
|
|
|
+ lock: true,
|
|
|
|
+ text: "Loading",
|
|
|
|
+ background: "rgba(0, 0, 0, 0.7)"
|
|
|
|
+ });
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description 结束 Loading
|
|
* @description 结束 Loading
|
|
* */
|
|
* */
|
|
const endFullLoading = () => {
|
|
const endFullLoading = () => {
|
|
- loading.value.close();
|
|
|
|
|
|
+ loading.value.close();
|
|
};
|
|
};
|
|
const timeValue = ref(1);
|
|
const timeValue = ref(1);
|
|
|
|
|
|
@@ -944,7 +950,61 @@ let historyColumns = [
|
|
isSelected: true
|
|
isSelected: true
|
|
},
|
|
},
|
|
]
|
|
]
|
|
|
|
+const sensorList = ref<any>([])
|
|
|
|
+// 被选中当条数据下标
|
|
|
|
+const selectedItemIndex = ref(0)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+const changeMoveUp = () => {
|
|
|
|
+ //上移
|
|
|
|
+ if (selectedItemIndex.value > 0) {
|
|
|
|
+ const temp = copiedCustomizeColumns.value[selectedItemIndex.value - 1]
|
|
|
|
+ copiedCustomizeColumns.value[selectedItemIndex.value - 1] = copiedCustomizeColumns.value[selectedItemIndex.value]
|
|
|
|
+ copiedCustomizeColumns.value[selectedItemIndex.value] = temp
|
|
|
|
+ selectedItemIndex.value--
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
|
|
+const changeMoveDown = () => {
|
|
|
|
+ //下移
|
|
|
|
+ if (selectedItemIndex.value < copiedCustomizeColumns.value.length - 1) {
|
|
|
|
+ const temp = copiedCustomizeColumns.value[selectedItemIndex.value + 1]
|
|
|
|
+ copiedCustomizeColumns.value[selectedItemIndex.value + 1] = copiedCustomizeColumns.value[selectedItemIndex.value]
|
|
|
|
+ copiedCustomizeColumns.value[selectedItemIndex.value] = temp
|
|
|
|
+ selectedItemIndex.value++
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const changeRemove = () => {
|
|
|
|
+ //删除数据
|
|
|
|
+ if (copiedCustomizeColumns.value.length > 0) {
|
|
|
|
+ const custom = copiedCustomizeColumns.value[selectedItemIndex.value];
|
|
|
|
+ const se_type = custom.se_type
|
|
|
|
+ for (let i = 0; i < sensorList.value.length; i++) {
|
|
|
|
+ if (sensorList.value[i].se_type === se_type) {
|
|
|
|
+ sensorList.value[i].isSelected = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ copiedCustomizeColumns.value.splice(selectedItemIndex.value, 1)
|
|
|
|
+ if (selectedItemIndex.value === copiedCustomizeColumns.value.length) {
|
|
|
|
+ selectedItemIndex.value--
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const changeCleared = () => {
|
|
|
|
+ //清空所有数据
|
|
|
|
+ selectedItemIndex.value = 0
|
|
|
|
+ copiedCustomizeColumns.value = []
|
|
|
|
+ for (let i = 0; i < sensorList.value.length; i++) {
|
|
|
|
+ sensorList.value[i].isSelected = false;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const changeSelected = (index) => {
|
|
|
|
+ selectedItemIndex.value = index
|
|
|
|
+}
|
|
|
|
|
|
const dataTypeList = [
|
|
const dataTypeList = [
|
|
{
|
|
{
|
|
@@ -1146,7 +1206,7 @@ const getList = async () => {
|
|
return acc;
|
|
return acc;
|
|
}, []);
|
|
}, []);
|
|
const res = await getDataItemList({ ...pageable.value, as_code_list: [pageable.value.as_code], data_items: arr });
|
|
const res = await getDataItemList({ ...pageable.value, as_code_list: [pageable.value.as_code], data_items: arr });
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
dataItemInfo.value = res.data.list ? (res.data.list.length === 0 ? {} : res.data.list[0]) : {};
|
|
dataItemInfo.value = res.data.list ? (res.data.list.length === 0 ? {} : res.data.list[0]) : {};
|
|
@@ -1158,14 +1218,14 @@ const getList = async () => {
|
|
showWindSpeed()
|
|
showWindSpeed()
|
|
currentValue.value = dataItemInfo.value[312] && dataItemInfo.value[312] != 0 && dataItemInfo.value[312] != '--' ? dataItemInfo.value[302] : dataItemInfo.value[302] && dataItemInfo.value[302] != 0 ? dataItemInfo.value[302] : 0
|
|
currentValue.value = dataItemInfo.value[312] && dataItemInfo.value[312] != 0 && dataItemInfo.value[312] != '--' ? dataItemInfo.value[302] : dataItemInfo.value[302] && dataItemInfo.value[302] != 0 ? dataItemInfo.value[302] : 0
|
|
mincurrentValue.value = dataItemInfo.value[311] && dataItemInfo.value[311] != 0 && dataItemInfo.value[311] != '--' ? dataItemInfo.value[301] : dataItemInfo.value[301] && dataItemInfo.value[301] != 0 ? dataItemInfo.value[302] : 0
|
|
mincurrentValue.value = dataItemInfo.value[311] && dataItemInfo.value[311] != 0 && dataItemInfo.value[311] != '--' ? dataItemInfo.value[301] : dataItemInfo.value[301] && dataItemInfo.value[301] != 0 ? dataItemInfo.value[302] : 0
|
|
- selectElement.value = res.data.list?dataItemInfo.value?.data_list.filter(itemB => customizeColumns.value.some(itemA => itemA.data_id === itemB.data_id)):[];
|
|
|
|
|
|
+ selectElement.value = res.data.list ? dataItemInfo.value?.data_list.filter(itemB => customizeColumns.value.some(itemA => itemA.data_id === itemB.data_id)) : [];
|
|
const ids = [601, 602, 603, 604, 605]
|
|
const ids = [601, 602, 603, 604, 605]
|
|
- dangerWeather.value = res.data.list?dataItemInfo.value.data_list
|
|
|
|
- .filter(item => ids.includes(item.data_id) && item.data_value !== '--'&&item.data_value !== '')
|
|
|
|
- .map(item => item):[]
|
|
|
|
-console.log(dangerWeather.value, 666);
|
|
|
|
|
|
+ dangerWeather.value = res.data.list ? dataItemInfo.value.data_list
|
|
|
|
+ .filter(item => ids.includes(item.data_id) && item.data_value !== '--' && item.data_value !== '')
|
|
|
|
+ .map(item => item) : []
|
|
|
|
+ console.log(dangerWeather.value, 666);
|
|
|
|
|
|
- // .filter(item => ids.includes(item.data_id) && getYenSymbolLaterCharacters(item.remark) !== '无明显天气现象')
|
|
|
|
|
|
+ // .filter(item => ids.includes(item.data_id) && getYenSymbolLaterCharacters(item.remark) !== '无明显天气现象')
|
|
getHistoryList()
|
|
getHistoryList()
|
|
};
|
|
};
|
|
|
|
|
|
@@ -1179,21 +1239,21 @@ function adjustValue(value) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-const showChart=ref(false)
|
|
|
|
|
|
+const showChart = ref(false)
|
|
const timeArr = ref()
|
|
const timeArr = ref()
|
|
const tempLineArr = ref()
|
|
const tempLineArr = ref()
|
|
const humidityLineArr = ref()
|
|
const humidityLineArr = ref()
|
|
const pressureLineArr = ref()
|
|
const pressureLineArr = ref()
|
|
const windLineArr = ref()
|
|
const windLineArr = ref()
|
|
const getHistoryList = async () => {
|
|
const getHistoryList = async () => {
|
|
- showChart.value=false
|
|
|
|
|
|
+ showChart.value = false
|
|
const arr = [...customizeColumns.value, ...defaultColumns].reduce((acc, item) => {
|
|
const arr = [...customizeColumns.value, ...defaultColumns].reduce((acc, item) => {
|
|
if (!acc.some(existingItem => existingItem.data_id === item.data_id)) {
|
|
if (!acc.some(existingItem => existingItem.data_id === item.data_id)) {
|
|
acc.push(item);
|
|
acc.push(item);
|
|
}
|
|
}
|
|
return acc;
|
|
return acc;
|
|
}, []);
|
|
}, []);
|
|
- const { data } = await getDataItemList({ ...pageable.value, pageSize: 99, as_code_list: [pageable.value.as_code], data_items: historyColumns, data_type: false, begin_time: getTimeStamp(timeValue.value,dataItemInfo.value.data_time_i), end_time: getTimeStamp(timeValue.value == 1 ? 0 : 4,dataItemInfo.value.data_time_i), time_space: timeValue.value == 1 ? 1 : 60 });
|
|
|
|
|
|
+ const { data } = await getDataItemList({ ...pageable.value, pageSize: 99, as_code_list: [pageable.value.as_code], data_items: historyColumns, data_type: false, begin_time: getTimeStamp(timeValue.value, dataItemInfo.value.data_time_i), end_time: getTimeStamp(timeValue.value == 1 ? 0 : 4, dataItemInfo.value.data_time_i), time_space: timeValue.value == 1 ? 1 : 60 });
|
|
timeArr.value = data.list?.map(item => {
|
|
timeArr.value = data.list?.map(item => {
|
|
return formatDate(item.data_time_i, 1)
|
|
return formatDate(item.data_time_i, 1)
|
|
})
|
|
})
|
|
@@ -1217,7 +1277,7 @@ const getHistoryList = async () => {
|
|
showTempLine()
|
|
showTempLine()
|
|
showPressureLine()
|
|
showPressureLine()
|
|
showWind()
|
|
showWind()
|
|
- showChart.value=true
|
|
|
|
|
|
+ showChart.value = true
|
|
|
|
|
|
|
|
|
|
};
|
|
};
|
|
@@ -1452,7 +1512,7 @@ const showPressure = () => {
|
|
},
|
|
},
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
- value: dataItemInfo.value&&dataItemInfo.value[202]?dataItemInfo.value[202]:'--'
|
|
|
|
|
|
+ value: dataItemInfo.value && dataItemInfo.value[202] ? dataItemInfo.value[202] : '--'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -1591,7 +1651,7 @@ const showHumidity = () => {
|
|
},
|
|
},
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
- value: dataItemInfo.value&&dataItemInfo.value[106]?dataItemInfo.value[106]:'--'
|
|
|
|
|
|
+ value: dataItemInfo.value && dataItemInfo.value[106] ? dataItemInfo.value[106] : '--'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -1736,7 +1796,7 @@ const showWindSpeed = () => {
|
|
detail: {
|
|
detail: {
|
|
offsetCenter: [-12, 5],
|
|
offsetCenter: [-12, 5],
|
|
valueAnimation: true,
|
|
valueAnimation: true,
|
|
- formatter: getWindLevel(dataItemInfo.value&&dataItemInfo.value[8]?dataItemInfo.value[8]:-1).toString(),
|
|
|
|
|
|
+ formatter: getWindLevel(dataItemInfo.value && dataItemInfo.value[8] ? dataItemInfo.value[8] : -1).toString(),
|
|
// formatter:'2' ,
|
|
// formatter:'2' ,
|
|
color: isDark.value ? '#fff' : "#000",
|
|
color: isDark.value ? '#fff' : "#000",
|
|
// fontSize: 10,
|
|
// fontSize: 10,
|
|
@@ -1744,7 +1804,7 @@ const showWindSpeed = () => {
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
// value:270,
|
|
// value:270,
|
|
- value: dataItemInfo.value&&dataItemInfo.value[9] == 'C' ? 0 : Number(dataItemInfo.value[9]),
|
|
|
|
|
|
+ value: dataItemInfo.value && dataItemInfo.value[9] == 'C' ? 0 : Number(dataItemInfo.value[9]),
|
|
name: '级',
|
|
name: '级',
|
|
detail: {
|
|
detail: {
|
|
fontSize: 40,
|
|
fontSize: 40,
|
|
@@ -1884,15 +1944,15 @@ const showWind = () => {
|
|
let mychart = echarts.init(wind.value);
|
|
let mychart = echarts.init(wind.value);
|
|
let option = {
|
|
let option = {
|
|
title: {
|
|
title: {
|
|
- text: '暂无数据',
|
|
|
|
- show:!timeArr.value?true:false,
|
|
|
|
- x: 'center',
|
|
|
|
- y: 'center',
|
|
|
|
- textStyle: {
|
|
|
|
- fontSize: 14,
|
|
|
|
- fontWeight: 'normal',
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ text: '暂无数据',
|
|
|
|
+ show: !timeArr.value ? true : false,
|
|
|
|
+ x: 'center',
|
|
|
|
+ y: 'center',
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 14,
|
|
|
|
+ fontWeight: 'normal',
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
grid: {
|
|
grid: {
|
|
left: '10',
|
|
left: '10',
|
|
@@ -2099,7 +2159,7 @@ const showTemp = () => {
|
|
|
|
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
- value: dataItemInfo.value&&dataItemInfo.value[101]?dataItemInfo.value[101]:0,
|
|
|
|
|
|
+ value: dataItemInfo.value && dataItemInfo.value[101] ? dataItemInfo.value[101] : 0,
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -2135,15 +2195,15 @@ const showTempLine = () => {
|
|
let mychart = echarts.init(tempLine.value);
|
|
let mychart = echarts.init(tempLine.value);
|
|
let option = {
|
|
let option = {
|
|
title: {
|
|
title: {
|
|
- text: '暂无数据',
|
|
|
|
- show:!timeArr.value?true:false,
|
|
|
|
- x: 'center',
|
|
|
|
- y: 'center',
|
|
|
|
- textStyle: {
|
|
|
|
- fontSize: 14,
|
|
|
|
- fontWeight: 'normal',
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ text: '暂无数据',
|
|
|
|
+ show: !timeArr.value ? true : false,
|
|
|
|
+ x: 'center',
|
|
|
|
+ y: 'center',
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 14,
|
|
|
|
+ fontWeight: 'normal',
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 直角坐标系内绘图网格
|
|
// 直角坐标系内绘图网格
|
|
// grid: {
|
|
// grid: {
|
|
// show: true,
|
|
// show: true,
|
|
@@ -2286,15 +2346,15 @@ const showPressureLine = () => {
|
|
let mychart = echarts.init(pressureLine.value);
|
|
let mychart = echarts.init(pressureLine.value);
|
|
let option = {
|
|
let option = {
|
|
title: {
|
|
title: {
|
|
- text: '暂无数据',
|
|
|
|
- show:!timeArr.value?true:false,
|
|
|
|
- x: 'center',
|
|
|
|
- y: 'center',
|
|
|
|
- textStyle: {
|
|
|
|
- fontSize: 14,
|
|
|
|
- fontWeight: 'normal',
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ text: '暂无数据',
|
|
|
|
+ show: !timeArr.value ? true : false,
|
|
|
|
+ x: 'center',
|
|
|
|
+ y: 'center',
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 14,
|
|
|
|
+ fontWeight: 'normal',
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
grid: {
|
|
grid: {
|
|
left: '10',
|
|
left: '10',
|