This commit is contained in:
huangchenhao 2026-04-03 14:54:12 +08:00
commit 4c40c96383
2 changed files with 27 additions and 13 deletions

View File

@ -254,6 +254,8 @@ const tableData = ref([
urgeTime: { date: "2026-03-28", time: "12:30:00" },
},
]);
tableData.value.push(...tableData.value);
tableData.value.push(...tableData.value);
//
const currentPage = ref(1);
@ -666,7 +668,7 @@ watch(
);
border: 2px solid rgba(64, 169, 255, 0.4);
border-radius: 8px;
padding: 16px 20px;
padding: 8px 20px;
text-align: center;
transition: all 0.3s;
cursor: pointer;

View File

@ -178,7 +178,7 @@
<script setup>
import { ref, computed, onMounted } from "vue";
import request from "../../../../shared/api/request";
import { request } from "@/utils/request";
import SectionHeader from "./component/sectionHeader.vue";
@ -243,10 +243,10 @@ import imgCheck from "../../assets/RiskWarning_img/抽查人数icon@2x.png";
//
const weatherWarningData = ref([
{ label: "红色预警", value: "8/13", class: "red" },
{ label: "橙色预警", value: "12/14", class: "orange" },
{ label: "黄色预警", value: "27/15", class: "yellow" },
{ label: "蓝色预警", value: "15/15", class: "blue" },
{ label: "红色预警", value: "", class: "red" },
{ label: "橙色预警", value: "", class: "orange" },
{ label: "黄色预警", value: "", class: "yellow" },
{ label: "蓝色预警", value: "", class: "blue" },
]);
//
@ -264,13 +264,25 @@ const dateRange = ref([]);
//
const loadData = async () => {
try {
const response = await request.get(
"/snow-ops-platform/weatherWarning/statistics",
);
if (response.data) {
const data = response.data;
if (data.weatherWarning) {
weatherWarningData.value = data.weatherWarning;
const res = await request({
url: "/snow-ops-platform/weatherWarning/statistics",
method: "GET",
});
if (res.code == "00000") {
const data = res.data;
if (data) {
weatherWarningData.value.forEach((item) => {
if (item.label == "红色预警") {
item.value = data.redWarningCount || 0;
} else if (item.label == "橙色预警") {
item.value = data.orangeWarningCount || 0;
} else if (item.label == "黄色预警") {
item.value = data.yellowWarningCount || 0;
} else if (item.label == "蓝色预警") {
item.value = data.blueWarningCount || 0;
}
});
}
if (data.impactData) {
impactData.value = data.impactData;