Compare commits

..

No commits in common. "09252381a0f8a13bc055e13516208ad53aa1da13" and "3c916bfbbd5a830eb2dd628a3d1ecf895ddb285b" have entirely different histories.

9 changed files with 53 additions and 128 deletions

View File

@ -145,7 +145,7 @@ const tableColumns = ref([
{ prop: "stakeNo", label: "起止桩号", width: "", slot: "stakeNo" }, { prop: "stakeNo", label: "起止桩号", width: "", slot: "stakeNo" },
{ prop: "location", label: "路况位置", width: "", slot: "location" }, { prop: "location", label: "路况位置", width: "", slot: "location" },
{ prop: "occurrenceTime", label: "发生时间", width: "" }, { prop: "occurrenceTime", label: "发生时间", width: "" },
// { prop: "routeNo2", label: "线", width: "" }, { prop: "routeNo2", label: "线路编号", width: "" },
{ prop: "type", label: "类型", width: "" }, { prop: "type", label: "类型", width: "" },
{ {
prop: "roadConditionType", prop: "roadConditionType",
@ -255,7 +255,7 @@ const fetchData = async () => {
stakeNo: `${item.startStakeNo}-${item.endStakeNo}` || "-", stakeNo: `${item.startStakeNo}-${item.endStakeNo}` || "-",
location: item.occurLocation || "-", location: item.occurLocation || "-",
occurrenceTime: item.occurTime || "-", occurrenceTime: item.occurTime || "-",
// routeNo2: item.routeNo || "-", routeNo2: item.routeNo || "-",
type: item.roadConditionType || "-", type: item.roadConditionType || "-",
roadConditionType: item.roadConditionType || "-", roadConditionType: item.roadConditionType || "-",
expectRecoverTime: item.expectRecoverTime || "-", expectRecoverTime: item.expectRecoverTime || "-",

View File

@ -1,4 +1,4 @@
<template> <template>
<base-dialog <base-dialog
v-model:visible="props.visible" v-model:visible="props.visible"
title="详情" title="详情"
@ -37,11 +37,7 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="info-label">事件等级</span> <span class="info-label">事件等级</span>
<span <span class="info-value level-tag" :class="eventInfo.levelClass">{{ eventInfo.eventLevel }}</span>
class="info-value level-tag"
:class="eventInfo.levelClass"
>{{ eventInfo.eventLevel }}</span
>
</div> </div>
</div> </div>
<div class="info-row"> <div class="info-row">
@ -80,11 +76,7 @@
处置反馈信息 处置反馈信息
</div> </div>
<div class="feedback-list"> <div class="feedback-list">
<div <div v-for="(item, index) in feedbackList" :key="item.id" class="feedback-item">
v-for="(item, index) in feedbackList"
:key="item.id"
class="feedback-item"
>
<div class="feedback-header"> <div class="feedback-header">
<div class="feedback-num">{{ index + 1 }}</div> <div class="feedback-num">{{ index + 1 }}</div>
<div class="feedback-info"> <div class="feedback-info">
@ -105,25 +97,19 @@
<div class="detail-row"> <div class="detail-row">
<span class="detail-label">预计开始时间</span> <span class="detail-label">预计开始时间</span>
<span class="detail-value">{{ item.estimatedStartTime }}</span> <span class="detail-value">{{ item.estimatedStartTime }}</span>
<span class="detail-label" style="margin-left: 40px" <span class="detail-label" style="margin-left: 40px">预计结束时间</span>
>预计结束时间</span
>
<span class="detail-value">{{ item.estimatedEndTime }}</span> <span class="detail-value">{{ item.estimatedEndTime }}</span>
</div> </div>
<div class="detail-row"> <div class="detail-row">
<span class="detail-label">实际开始时间</span> <span class="detail-label">实际开始时间</span>
<span class="detail-value">{{ item.actualStartTime }}</span> <span class="detail-value">{{ item.actualStartTime }}</span>
<span class="detail-label" style="margin-left: 40px" <span class="detail-label" style="margin-left: 40px">实际结束时间</span>
>实际结束时间</span
>
<span class="detail-value">{{ item.actualEndTime }}</span> <span class="detail-value">{{ item.actualEndTime }}</span>
</div> </div>
<div class="detail-row"> <div class="detail-row">
<span class="detail-label">处置人</span> <span class="detail-label">处置人</span>
<span class="detail-value">{{ item.handlerName }}</span> <span class="detail-value">{{ item.handlerName }}</span>
<span class="detail-label" style="margin-left: 40px" <span class="detail-label" style="margin-left: 40px">联系电话</span>
>联系电话</span
>
<span class="detail-value">{{ item.contactPhone }}</span> <span class="detail-value">{{ item.contactPhone }}</span>
</div> </div>
<div class="detail-row"> <div class="detail-row">
@ -138,11 +124,7 @@
</base-dialog> </base-dialog>
<!-- 图片预览弹窗 --> <!-- 图片预览弹窗 -->
<div <div v-if="previewVisible" class="image-preview-overlay" @click="closePreview">
v-if="previewVisible"
class="image-preview-overlay"
@click="closePreview"
>
<div class="image-preview-container" @click.stop> <div class="image-preview-container" @click.stop>
<img :src="previewImageUrl" alt="预览" /> <img :src="previewImageUrl" alt="预览" />
<div class="close-preview-btn" @click="closePreview"> <div class="close-preview-btn" @click="closePreview">
@ -181,8 +163,7 @@ const eventInfo = ref({
reporter: "张三", reporter: "张三",
address: "万州区太白路123号附近", address: "万州区太白路123号附近",
reportTime: "2023-10-12 14:35:00", reportTime: "2023-10-12 14:35:00",
description: description: "路面出现塌陷面积约2平方米深度约0.5米,已设置警示标志,请尽快处理。",
"路面出现塌陷面积约2平方米深度约0.5米,已设置警示标志,请尽快处理。",
}); });
// //
@ -245,7 +226,7 @@ watch(
// //
Object.assign(eventInfo.value, props.eventData); Object.assign(eventInfo.value, props.eventData);
} }
}, }
); );
</script> </script>
@ -346,7 +327,6 @@ watch(
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 16px;
margin-bottom: 10px;
} }
.feedback-item { .feedback-item {

View File

@ -379,7 +379,6 @@ watch(
.timeline-list { .timeline-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: 10px;
gap: 16px; gap: 16px;
} }

View File

@ -1069,27 +1069,29 @@ watch(
// dateRange // dateRange
watch( watch(
() => props.dateRange, () => props.dateRange,
async (newVal, oldVal) => { async (newVal) => {
console.log("dateRange 变化:", newVal, oldVal); console.log("dateRange 变化:", newVal);
// if (newVal && newVal.length === 2) {
await getAffectedCountyData(); //
await getAffectedCountyData();
// activeIndex // activeIndex
switch (props.activeIndex) { switch (props.activeIndex) {
case 0: case 0:
await getAffectedProjectData(); await getAffectedProjectData();
break; break;
case 1: case 1:
await getAffectedTunnelData(); await getAffectedTunnelData();
break; break;
case 3: case 3:
await getAffectedBridgeData(); await getAffectedBridgeData();
break; break;
case 4: case 4:
await getEmergencyForceData(); await getEmergencyForceData();
break; break;
default: default:
break; break;
}
} }
}, },
{ deep: true }, { deep: true },

View File

@ -34,9 +34,8 @@
<slot name="filter"></slot> <slot name="filter"></slot>
</div> </div>
<!-- 数据表格 --> <!-- 数据表格 -->
<div class="table-section"> <div class="table-section" v-if="props.tableData.length > 0">
<el-table <el-table
v-if="props.tableData.length > 0"
:data="props.tableData" :data="props.tableData"
:height="props.tableHeight" :height="props.tableHeight"
style="width: 100%; min-height: 300px" style="width: 100%; min-height: 300px"
@ -60,9 +59,11 @@
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<div class="pagination"> <div
class="pagination"
v-if="props.tableData.length > 0 && props.showPagination"
>
<el-pagination <el-pagination
v-if="props.tableData.length > 0 && props.showPagination"
:current-page="props.currentPage" :current-page="props.currentPage"
:page-size="props.pageSize" :page-size="props.pageSize"
:page-sizes="props.pageSizes" :page-sizes="props.pageSizes"

View File

@ -406,32 +406,21 @@ const handleCenterCardClickType = (item) => {
// //
const refreshLeftData = ref(null); const refreshLeftData = ref(null);
const refreshRightData = ref(null);
// //
const setRefreshLeftData = (callback) => { const setRefreshLeftData = (callback) => {
refreshLeftData.value = callback; refreshLeftData.value = callback;
}; };
// right.vue
const setRefreshRightData = (callback) => {
refreshRightData.value = callback;
};
// //
const triggerRefreshLeftData = () => { const triggerRefreshLeftData = () => {
if (refreshLeftData.value) { if (refreshLeftData.value) {
refreshLeftData.value(); refreshLeftData.value();
} }
// right.vue
if (refreshRightData.value) {
refreshRightData.value();
}
}; };
// //
provide("setRefreshLeftData", setRefreshLeftData); provide("setRefreshLeftData", setRefreshLeftData);
provide("setRefreshRightData", setRefreshRightData);
provide("triggerRefreshLeftData", triggerRefreshLeftData); provide("triggerRefreshLeftData", triggerRefreshLeftData);
// ==================== ==================== // ==================== ====================

View File

@ -116,9 +116,7 @@
<SectionHeader title="响应调度"> <SectionHeader title="响应调度">
<template #right> <template #right>
<div class="header-filters"> <div class="header-filters">
<span class="filter-item active" @click="handleDateRangeClick()" <span class="filter-item active">本轮</span>
>本轮</span
>
<div class="date-range-wrapper"> <div class="date-range-wrapper">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
@ -306,11 +304,6 @@ const handleDateChange = (val) => {
dateRange.value = val; dateRange.value = val;
dispatchLoadLoad(); dispatchLoadLoad();
}; };
//
const handleDateRangeClick = (val) => {
dateRange.value = [];
dispatchLoadLoad();
};
// //
const dateRange = ref([]); const dateRange = ref([]);
// //
@ -445,20 +438,16 @@ const scheduleStatisticsByCountyLoad = async () => {
// //
const mergeLiangjiangNewArea = (arr) => { const mergeLiangjiangNewArea = (arr) => {
const yubeiItems = arr.filter((item) => item.countyName === "渝北区"); const yubeiItems = arr.filter(item => item.countyName === "渝北区");
const jiangbeiItems = arr.filter( const jiangbeiItems = arr.filter(item => item.countyName === "江北区");
(item) => item.countyName === "江北区",
);
if (yubeiItems.length > 0 || jiangbeiItems.length > 0) { if (yubeiItems.length > 0 || jiangbeiItems.length > 0) {
// //
const mergedItem = { const mergedItem = {
countyName: "两江新区", countyName: "两江新区",
countyId: countyId: yubeiItems[0]?.countyId || jiangbeiItems[0]?.countyId || "",
yubeiItems[0]?.countyId || jiangbeiItems[0]?.countyId || "",
type: yubeiItems[0]?.type || jiangbeiItems[0]?.type || "", type: yubeiItems[0]?.type || jiangbeiItems[0]?.type || "",
roadType: roadType: yubeiItems[0]?.roadType || jiangbeiItems[0]?.roadType || "",
yubeiItems[0]?.roadType || jiangbeiItems[0]?.roadType || "",
// //
noticeCount: 0, noticeCount: 0,
replyCount: 0, replyCount: 0,
@ -467,7 +456,7 @@ const scheduleStatisticsByCountyLoad = async () => {
}; };
// //
yubeiItems.forEach((item) => { yubeiItems.forEach(item => {
mergedItem.noticeCount += item.noticeCount || 0; mergedItem.noticeCount += item.noticeCount || 0;
mergedItem.replyCount += item.replyCount || 0; mergedItem.replyCount += item.replyCount || 0;
mergedItem.population += item.population || 0; mergedItem.population += item.population || 0;
@ -475,7 +464,7 @@ const scheduleStatisticsByCountyLoad = async () => {
}); });
// //
jiangbeiItems.forEach((item) => { jiangbeiItems.forEach(item => {
mergedItem.noticeCount += item.noticeCount || 0; mergedItem.noticeCount += item.noticeCount || 0;
mergedItem.replyCount += item.replyCount || 0; mergedItem.replyCount += item.replyCount || 0;
mergedItem.population += item.population || 0; mergedItem.population += item.population || 0;
@ -483,9 +472,8 @@ const scheduleStatisticsByCountyLoad = async () => {
}); });
// //
const filteredArr = arr.filter( const filteredArr = arr.filter(item =>
(item) => item.countyName !== "渝北区" && item.countyName !== "江北区"
item.countyName !== "渝北区" && item.countyName !== "江北区",
); );
filteredArr.push(mergedItem); filteredArr.push(mergedItem);
return filteredArr; return filteredArr;

View File

@ -116,9 +116,7 @@
<SectionHeader title="受灾情况"> <SectionHeader title="受灾情况">
<template #right> <template #right>
<div class="header-filters"> <div class="header-filters">
<span class="filter-item active" @click="handleDateRangeClick()" <span class="filter-item active">本轮</span>
>1本轮</span
>
<div class="date-range-wrapper"> <div class="date-range-wrapper">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
@ -130,7 +128,6 @@
popper-class="custom-date-picker" popper-class="custom-date-picker"
:teleported="false" :teleported="false"
:prefix-icon="Calendar" :prefix-icon="Calendar"
@change="handleDateChange"
/> />
</div> </div>
</div> </div>
@ -197,7 +194,7 @@
</template> </template>
<script setup> <script setup>
import { ref, computed, onMounted, inject } from "vue"; import { ref, computed, onMounted } from "vue";
import { request } from "@/utils/request"; import { request } from "@/utils/request";
import SectionHeader from "./component/sectionHeader.vue"; import SectionHeader from "./component/sectionHeader.vue";
@ -226,37 +223,14 @@ const emit = defineEmits([
"openResourceDetail", "openResourceDetail",
]); ]);
// //
const setRefreshRightData = inject("setRefreshRightData"); onMounted(() => {
//
const refreshData = () => {
console.log("right.vue 刷新数据");
getYhYjllList(); getYhYjllList();
getYhYjllListMaterials(); getYhYjllListMaterials();
getControlStats(); getControlStats();
getRescueInputStats(); getRescueInputStats();
getDisasterStats(); getDisasterStats();
};
//
onMounted(() => {
refreshData();
//
if (setRefreshRightData) {
setRefreshRightData(refreshData);
}
}); });
//
const handleDateChange = (val) => {
dateRange.value = val;
getDisasterStats();
};
//
const handleDateRangeClick = (val) => {
dateRange.value = [];
getDisasterStats();
};
// //
const getYhYjllList = async () => { const getYhYjllList = async () => {

View File

@ -1,9 +1,7 @@
<template> <template>
<div class="filter-header"> <div class="filter-header">
<div class="filter-container"> <div class="filter-container">
<span class="filter-item active" @click="handleDateRangeClick()" <span class="filter-item active">本轮</span>
>本轮</span
>
<div class="date-range-wrapper"> <div class="date-range-wrapper">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
@ -40,18 +38,12 @@ const setEndOfDay = (date) => {
d.setHours(23, 59, 59, 999); d.setHours(23, 59, 59, 999);
return d; return d;
}; };
//
const handleDateRangeClick = () => {
dateRange.value = [];
triggerRefreshLeftData();
emit("dateRangeChange", []);
};
// dateRange // dateRange
watch( watch(
dateRange, dateRange,
(newVal, oldVal) => { (newVal, oldVal) => {
// //
console.log("dateRange 变化:", newVal, oldVal);
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) { if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
console.log("dateRange 发生变化:", newVal); console.log("dateRange 发生变化:", newVal);