|
@@ -15,12 +15,16 @@
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<div class="table-box" style="margin-top: 20px;height: 57vh" >
|
|
<div class="table-box" style="margin-top: 20px;height: 57vh" >
|
|
<!-- 表格主体 -->
|
|
<!-- 表格主体 -->
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData" size="small">
|
|
|
|
- <template v-for="item in columns" :key="item">
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="as_h_yun" size="small">
|
|
|
|
+ <template v-for="item in columns_yun" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <template v-if="item.prop === 'a'">
|
|
|
|
+ {{as_h_yun_c[scope.$index]}}
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<!-- 无数据 -->
|
|
<!-- 无数据 -->
|
|
<template #empty>
|
|
<template #empty>
|
|
<div class="table-empty">
|
|
<div class="table-empty">
|
|
@@ -36,9 +40,14 @@
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<div class="table-box" style="margin-top: 20px;height: 57vh" >
|
|
<div class="table-box" style="margin-top: 20px;height: 57vh" >
|
|
<!-- 表格主体 -->
|
|
<!-- 表格主体 -->
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData2" size="small">
|
|
|
|
- <template v-for="item in columns2" :key="item">
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="as_z_yun" size="small">
|
|
|
|
+ <template v-for="item in columns_yun" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <template v-if="item.prop === 'a'">
|
|
|
|
+ {{as_z_yun_c[scope.$index]}}
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -57,9 +66,14 @@
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<div class="table-box" style="margin-top: 20px;height: 57vh" >
|
|
<div class="table-box" style="margin-top: 20px;height: 57vh" >
|
|
<!-- 表格主体 -->
|
|
<!-- 表格主体 -->
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData3" size="small">
|
|
|
|
- <template v-for="item in columns3" :key="item">
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="as_d_yun" size="small">
|
|
|
|
+ <template v-for="item in columns_yun" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <template v-if="item.prop === 'a'">
|
|
|
|
+ {{as_d_yun_c[scope.$index]}}
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -85,9 +99,14 @@
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<div class="table-box" style="margin-top: 10px;height: 53vh" >
|
|
<div class="table-box" style="margin-top: 10px;height: 53vh" >
|
|
<!-- 表格主体 -->
|
|
<!-- 表格主体 -->
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData4" size="small">
|
|
|
|
- <template v-for="item in columns4" :key="item">
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="temperatureHumidity" size="small">
|
|
|
|
+ <template v-for="item in columnsTemperatureHumidity" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <template v-if="item.prop === 'a'">
|
|
|
|
+ {{scope.$index+1}} 月
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -108,9 +127,14 @@
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<div class="table-box" style="margin-top: 10px;height: 57vh" >
|
|
<div class="table-box" style="margin-top: 10px;height: 57vh" >
|
|
<!-- 表格主体 -->
|
|
<!-- 表格主体 -->
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData5" size="small">
|
|
|
|
- <template v-for="item in columns5" :key="item">
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="averageData" size="small">
|
|
|
|
+ <template v-for="item in columnsAverage" :key="item">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
<el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <template v-if="item.prop === 'a'">
|
|
|
|
+ {{scope.$index+1}} 月
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -138,11 +162,116 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx">
|
|
<script setup lang="tsx">
|
|
-import {defineProps, reactive, ref} from "vue";
|
|
|
|
|
|
+import {defineProps, onMounted, reactive, ref} from "vue";
|
|
|
|
+import {ColumnProps} from "@/components/ProTable/interface";
|
|
|
|
+import {getYasaverag, getYasaverage, getYasthreshold} from "@/api/modules/allData";
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
selectData?: {};
|
|
selectData?: {};
|
|
}>();
|
|
}>();
|
|
-import {ColumnProps} from "@/components/ProTable/interface";
|
|
|
|
|
|
+
|
|
|
|
+const voltageHigh = ref([])
|
|
|
|
+const pageable = ref<any>({
|
|
|
|
+ asCode: props.selectData.as_code,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 20,
|
|
|
|
+});
|
|
|
|
+const getList= async ()=>{
|
|
|
|
+ const { data } = await getYasaverag(pageable.value);
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+const getYasaverageList= async ()=>{
|
|
|
|
+ const { data } = await getYasaverage(pageable.value);
|
|
|
|
+ const averageList = data[props.selectData.as_code]
|
|
|
|
+ //温湿度设置
|
|
|
|
+ const as_wd = averageList.as_wd_list
|
|
|
|
+ const as_sd = averageList.as_sd_list
|
|
|
|
+ const as_qy = averageList.as_qy_list
|
|
|
|
+ //存放合并as_wd,as_sd,as_qy, 三种类型都是12条,把三种类型下标相同合成一条数据,给 temperatureHumidity.value数组
|
|
|
|
+ averageData.value = []
|
|
|
|
+ for(var i=0;i<12;i++){
|
|
|
|
+ averageData.value.push({
|
|
|
|
+ value_wd:as_wd[i],
|
|
|
|
+ value_sd:as_sd[i],
|
|
|
|
+ value_qy:as_qy[i],
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+const getYasthresholdList= async ()=>{
|
|
|
|
+ const { data } = await getYasthreshold(pageable.value);
|
|
|
|
+ voltageHigh.value = data[props.selectData.as_code]
|
|
|
|
+ //云底高度设置
|
|
|
|
+ as_h_yun.value = voltageHigh.value.as_h_yun
|
|
|
|
+ as_z_yun.value = voltageHigh.value.as_z_yun
|
|
|
|
+ as_d_yun.value = voltageHigh.value.as_d_yun
|
|
|
|
+
|
|
|
|
+ //温湿度设置
|
|
|
|
+ const as_wd = voltageHigh.value.as_wd // [{h_value: "50", l_value: "-55"}]
|
|
|
|
+ const as_sd = voltageHigh.value.as_sd // [{h_value: "60", l_value: "-55"}]
|
|
|
|
+ const as_qy = voltageHigh.value.as_qy // [{h_value: "70", l_value: "-55"}]
|
|
|
|
+
|
|
|
|
+ //存放合并as_wd,as_sd,as_qy, 三种类型都是12条,把三种类型下标相同合成一条数据,给 temperatureHumidity.value数组
|
|
|
|
+ temperatureHumidity.value = []
|
|
|
|
+ for(var i=0;i<12;i++){
|
|
|
|
+ temperatureHumidity.value.push({
|
|
|
|
+ h_value_wd:as_wd[i].h_value,l_value_wd:as_wd[i].l_value,
|
|
|
|
+ h_value_sd:as_sd[i].h_value,l_value_sd:as_sd[i].l_value,
|
|
|
|
+ h_value_qy:as_qy[i].h_value,l_value_qy:as_qy[i].l_value,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getYasthresholdList()
|
|
|
|
+ getYasaverageList()
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//云底高度设置
|
|
|
|
+const as_h_yun = ref([])
|
|
|
|
+const as_z_yun = ref([])
|
|
|
|
+const as_d_yun = ref([])
|
|
|
|
+const as_h_yun_c = ref(["Cifil","Cidens","Cinot","Ciunc","Csfil","Csnebu","Cc"])
|
|
|
|
+const as_z_yun_c= ref(["Astra","Asop","Actra","Acop","AClent","Accug","Acflo","Accast"])
|
|
|
|
+const as_d_yun_c= ref(["Cuhum","Fc","Cucong","Cbcalv","Cbcap","Sctra","Scop","Sccug","Sccast","Sclent","St","Fs","Ns","Fn"])
|
|
|
|
+
|
|
|
|
+// 表格配置项
|
|
|
|
+const columns_yun = reactive<ColumnProps[]>([
|
|
|
|
+ { prop: "a", label: "要素"},
|
|
|
|
+ { prop: "l_value", label: "低值"},
|
|
|
|
+ { prop: "h_value", label: "高值" },
|
|
|
|
+]);
|
|
|
|
+
|
|
|
|
+//温湿度设置
|
|
|
|
+const temperatureHumidity = ref([])
|
|
|
|
+const columnsTemperatureHumidity = reactive<ColumnProps[]>([
|
|
|
|
+ { prop: "a", label: "月份",width:100},
|
|
|
|
+ { prop: "l_value_wd", label: "最低气温(℃)"},
|
|
|
|
+ { prop: "h_value_wd", label: "最高气温(℃)" },
|
|
|
|
+ { prop: "l_value_sd", label: "最小相对湿度(%)" },
|
|
|
|
+ { prop: "h_value_sd", label: "最大相对湿度(%)" },
|
|
|
|
+ { prop: "l_value_qy", label: "本站最小气压(hpa)" },
|
|
|
|
+ { prop: "h_value_qy", label: "本站最大气压(hpa)" },
|
|
|
|
+]);
|
|
|
|
+
|
|
|
|
+//累年平均值
|
|
|
|
+const averageData = ref([])
|
|
|
|
+const columnsAverage= reactive<ColumnProps[]>([
|
|
|
|
+ { prop: "a", label: "月份"},
|
|
|
|
+ { prop: "value_wd", label: "温度平均值(℃)"},
|
|
|
|
+ { prop: "value_sd", label: "湿度平均值(RH%)" },
|
|
|
|
+ { prop: "value_qy", label: "气压平均值(hpa)" },
|
|
|
|
+]);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
const formRef = ref<any>();
|
|
const formRef = ref<any>();
|
|
const formInline = ref<any>({
|
|
const formInline = ref<any>({
|
|
|
|
|
|
@@ -198,8 +327,8 @@ const processTableData2 = ref([
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns2 = reactive<ColumnProps[]>([
|
|
const columns2 = reactive<ColumnProps[]>([
|
|
{ prop: "a", label: "要素"},
|
|
{ prop: "a", label: "要素"},
|
|
- { prop: "b", label: "低值"},
|
|
|
|
- { prop: "c", label: "高值" },
|
|
|
|
|
|
+ { prop: "l_value", label: "低值"},
|
|
|
|
+ { prop: "h_value", label: "高值" },
|
|
]);
|
|
]);
|
|
|
|
|
|
const processTableData3 = ref([
|
|
const processTableData3 = ref([
|