Compare commits

..

2 Commits

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

View File

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