|
|
@@ -4,7 +4,7 @@
|
|
|
<div class="page-header">
|
|
|
<div>
|
|
|
<div class="page-title">预警信息管理</div>
|
|
|
- <div class="page-subtitle">支持预警查询、处置过程跟踪和可视化流程查询,掌握预警历史处置情况、GIS定位和电子存档信息</div>
|
|
|
+ <div class="page-subtitle">支持预警查询、处置过程跟踪和可视化流程查询,掌握预警历史处置情况和电子存档信息</div>
|
|
|
</div>
|
|
|
<el-button type="primary" icon="Refresh" @click="reloadAll">刷新</el-button>
|
|
|
</div>
|
|
|
@@ -30,11 +30,8 @@
|
|
|
|
|
|
<el-card shadow="never" class="page-card">
|
|
|
<el-form :model="queryParams" :inline="true">
|
|
|
- <el-form-item label="预警名称">
|
|
|
- <el-input v-model="queryParams.warningName" placeholder="请输入预警名称" clearable style="width: 220px" @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="预警编号">
|
|
|
- <el-input v-model="queryParams.warningNo" placeholder="请输入预警编号" clearable style="width: 180px" />
|
|
|
+ <el-input v-model="queryParams.warningNo" placeholder="请输入预警编号" clearable style="width: 220px" @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="预警类型">
|
|
|
<el-select v-model="queryParams.warningType" clearable placeholder="请选择预警类型" style="width: 180px">
|
|
|
@@ -58,17 +55,9 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态">
|
|
|
<el-select v-model="queryParams.status" clearable placeholder="请选择状态" style="width: 180px">
|
|
|
- <el-option label="已接收" value="RECEIVED" />
|
|
|
- <el-option label="待处理" value="PENDING" />
|
|
|
- <el-option label="处理中" value="PROCESSING" />
|
|
|
- <el-option label="已处理" value="HANDLED" />
|
|
|
- <el-option label="已解除" value="CLOSED" />
|
|
|
- <el-option label="已退回" value="RETURNED" />
|
|
|
+ <el-option v-for="item in warningStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="预警位置">
|
|
|
- <el-input v-model="queryParams.location" placeholder="请输入预警位置" clearable style="width: 220px" />
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="发布人">
|
|
|
<el-input v-model="queryParams.publisher" placeholder="请输入发布人" clearable style="width: 180px" />
|
|
|
</el-form-item>
|
|
|
@@ -103,7 +92,7 @@
|
|
|
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="预警名称" prop="warningName" min-width="180" show-overflow-tooltip />
|
|
|
+
|
|
|
<el-table-column label="预警编号" prop="warningNo" width="170" />
|
|
|
<el-table-column label="预警类型" prop="warningTypeText" width="120" />
|
|
|
<el-table-column label="预警级别" width="110" align="center">
|
|
|
@@ -120,7 +109,6 @@
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="预警位置" prop="location" min-width="180" show-overflow-tooltip />
|
|
|
<el-table-column label="发布人" prop="publisher" width="120" />
|
|
|
<el-table-column label="权属单位" prop="ownershipUnit" width="160" show-overflow-tooltip />
|
|
|
<el-table-column label="发布时间" prop="publishTime" width="180" />
|
|
|
@@ -152,7 +140,7 @@
|
|
|
<el-tab-pane :label="`已完成 (${completedTotal})`" name="completed" />
|
|
|
</el-tabs>
|
|
|
<el-table :data="trackList" height="360" @row-click="handleSelectWarningFromTrack">
|
|
|
- <el-table-column label="预警名称" prop="warningName" min-width="170" show-overflow-tooltip />
|
|
|
+ <el-table-column label="预警编号" prop="warningNo" min-width="180" show-overflow-tooltip />
|
|
|
<el-table-column label="预警类型" prop="warningTypeText" width="120" />
|
|
|
<el-table-column label="预警级别" width="100" align="center">
|
|
|
<template #default="scope">
|
|
|
@@ -184,7 +172,7 @@
|
|
|
|
|
|
<template v-else>
|
|
|
<div class="selected-info">
|
|
|
- <div class="selected-name">{{ processMeta.warningName || selectedWarningRow?.warningName || "-" }}</div>
|
|
|
+ <div class="selected-name">{{ processMeta.warningNo || selectedWarningRow?.warningNo || "-" }}</div>
|
|
|
<div class="selected-meta">
|
|
|
<span>编号:{{ processMeta.warningNo || selectedWarningRow?.warningNo || "-" }}</span>
|
|
|
<span>状态:{{ getStatusText(processMeta.status || selectedWarningRow?.status) }}</span>
|
|
|
@@ -222,14 +210,14 @@
|
|
|
<el-timeline-item
|
|
|
v-for="item in processList"
|
|
|
:key="item.disposalId"
|
|
|
- :timestamp="item.createTime || '-'"
|
|
|
+ :timestamp="formatDateTime(item.createTime)"
|
|
|
:type="getTimelineType(item.disposalType)"
|
|
|
>
|
|
|
<div class="timeline-title">{{ getProcessTypeText(item.disposalType) }}</div>
|
|
|
<div>{{ item.disposalContent || "-" }}</div>
|
|
|
<div class="timeline-sub">处置人:{{ item.disposalUser || "-" }}</div>
|
|
|
<WarningDisposalReasons :record="item" />
|
|
|
- <WarningAttachments :attachments="attachmentsForDisposal(item, processAttachments)" />
|
|
|
+ <WarningAttachments :attachments="attachmentsForDisposal(item, processAttachments)" />
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</template>
|
|
|
@@ -241,7 +229,6 @@
|
|
|
<template v-if="detailData.basicInfo">
|
|
|
<WarningItemSummary :warning="detailData.basicInfo" />
|
|
|
<el-descriptions :column="2" border>
|
|
|
- <el-descriptions-item label="预警名称">{{ detailBasic.warningName || "-" }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="预警编号">{{ detailBasic.warningNo || "-" }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="预警类型">{{ detailBasic.warningTypeText || "-" }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="预警级别">{{ detailBasic.warningLevelText || "-" }}</el-descriptions-item>
|
|
|
@@ -249,10 +236,8 @@
|
|
|
<el-descriptions-item label="发布人">{{ detailBasic.publisher || "-" }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="处置人">{{ detailBasic.handler || "-" }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="权属单位">{{ detailBasic.ownershipUnit || "-" }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="预警位置" :span="2">{{ detailBasic.location || "-" }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="发布时间">{{ detailBasic.publishTime || "-" }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="GIS定位">{{ detailGis.longitude || "-" }} / {{ detailGis.latitude || "-" }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="预警内容" :span="2">{{ detailBasic.warningContent || "-" }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="预警内容" :span="2"><span class="warning-content">{{ detailBasic.warningContent || "-" }}</span></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
|
|
|
<el-divider content-position="left">流程处置信息</el-divider>
|
|
|
@@ -260,9 +245,11 @@
|
|
|
<el-timeline-item
|
|
|
v-for="(item, index) in detailData.disposalHistory"
|
|
|
:key="index"
|
|
|
- :timestamp="item.createTime || item.create_time || item.disposalTime || item.disposal_time || '-'"
|
|
|
+ :timestamp="formatDateTime(item.createTime || item.create_time || item.disposalTime || item.disposal_time)"
|
|
|
>
|
|
|
- {{ item.disposalContent || item.disposal_content || item.content || "-" }}
|
|
|
+ <div class="timeline-title">{{ getProcessTypeText(item.disposalType || item.disposal_type) }}</div>
|
|
|
+ <div>{{ item.disposalContent || item.disposal_content || item.content || "-" }}</div>
|
|
|
+ <div class="timeline-sub">处置人:{{ item.disposalUser || item.disposal_user || "-" }}</div>
|
|
|
<WarningDisposalReasons :record="item" />
|
|
|
<WarningAttachments :attachments="attachmentsForDisposal(item, detailData.attachmentList)" />
|
|
|
</el-timeline-item>
|
|
|
@@ -285,7 +272,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { useWarningStatuses } from '@/views/subSystem/lifeCompany/warningWorkflow'
|
|
|
+const { warningStatusOptions, databaseStatusLabels } = useWarningStatuses()
|
|
|
import { computed, onMounted, reactive, ref } from "vue";
|
|
|
+import { parseTime } from "@/utils/ruoyi";
|
|
|
import WarningItemSummary from '../components/WarningItemSummary.vue';
|
|
|
import WarningDisposalReasons from '../components/WarningDisposalReasons.vue';
|
|
|
import WarningAttachments from "../components/WarningAttachments.vue";
|
|
|
@@ -327,12 +317,11 @@ const detailData = ref({});
|
|
|
const queryParams = reactive({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- warningName: "",
|
|
|
+
|
|
|
warningNo: "",
|
|
|
warningType: "",
|
|
|
warningLevel: "",
|
|
|
status: "",
|
|
|
- location: "",
|
|
|
publisher: "",
|
|
|
ownershipUnit: "",
|
|
|
dateRange: []
|
|
|
@@ -355,7 +344,7 @@ const warningLevelLabelMap = computed(() => {
|
|
|
const trackList = computed(() => (trackTab.value === "processing" ? processingList.value : completedList.value));
|
|
|
const processNodes = computed(() => processDiagram.value.nodes || []);
|
|
|
const processMeta = computed(() => ({
|
|
|
- warningName: processDiagram.value.warningName || "",
|
|
|
+
|
|
|
warningNo: processDiagram.value.warningNo || "",
|
|
|
status: processDiagram.value.status || ""
|
|
|
}));
|
|
|
@@ -365,23 +354,27 @@ const detailBasic = computed(() => {
|
|
|
const warningType = basic.warningType || basic.warning_type || "";
|
|
|
const warningLevel = basic.warningLevel || basic.warning_level || "";
|
|
|
return {
|
|
|
- warningName: basic.warningName || basic.warning_name || "",
|
|
|
+
|
|
|
warningNo: basic.warningNo || basic.warning_no || "",
|
|
|
- warningTypeText: warningTypeLabelMap.value[warningType] || warningType || "-",
|
|
|
- warningLevelText: warningLevelLabelMap.value[warningLevel] || warningLevel || "-",
|
|
|
+ warningTypeText: basic.warning_type_name || basic.warningTypeName || warningTypeLabelMap.value[warningType] || "-",
|
|
|
+ warningLevelText: warningLevelLabelMap.value[warningLevel] || "-",
|
|
|
status: basic.status || "",
|
|
|
publisher: basic.publisher || "",
|
|
|
handler: basic.handler || "",
|
|
|
ownershipUnit: basic.ownershipUnit || basic.ownership_unit || "",
|
|
|
- location: basic.location || "",
|
|
|
- publishTime: basic.publishTime || basic.publish_time || "",
|
|
|
+ publishTime: formatDateTime(basic.publishTime || basic.publish_time),
|
|
|
warningContent: basic.warningContent || basic.warning_content || ""
|
|
|
};
|
|
|
});
|
|
|
|
|
|
-const detailGis = computed(() => detailData.value.gisLocation || {});
|
|
|
const detailArchive = computed(() => detailData.value.electronicArchive || {});
|
|
|
|
|
|
+function formatDateTime(value) {
|
|
|
+ if (!value) return "-";
|
|
|
+ const date = new Date(value);
|
|
|
+ return Number.isNaN(date.getTime()) ? value : parseTime(date);
|
|
|
+}
|
|
|
+
|
|
|
function getLevelTagType(level) {
|
|
|
return {
|
|
|
"1": "danger",
|
|
|
@@ -392,15 +385,7 @@ function getLevelTagType(level) {
|
|
|
}
|
|
|
|
|
|
function getStatusText(status) {
|
|
|
- return {
|
|
|
- DRAFT: "草稿",
|
|
|
- RECEIVED: "已接收",
|
|
|
- PENDING: "待处理",
|
|
|
- PROCESSING: "处理中",
|
|
|
- HANDLED: "已处理",
|
|
|
- CLOSED: "已解除",
|
|
|
- RETURNED: "已退回"
|
|
|
- }[status] || status || "-";
|
|
|
+ return databaseStatusLabels.value[status] || status || "-"
|
|
|
}
|
|
|
|
|
|
function getStatusTagType(status) {
|
|
|
@@ -410,8 +395,7 @@ function getStatusTagType(status) {
|
|
|
PENDING: "warning",
|
|
|
PROCESSING: "warning",
|
|
|
HANDLED: "success",
|
|
|
- CLOSED: "",
|
|
|
- RETURNED: "danger"
|
|
|
+ CLOSED: "info"
|
|
|
}[status] || "";
|
|
|
}
|
|
|
|
|
|
@@ -420,6 +404,11 @@ function getProcessTypeText(type) {
|
|
|
RELEASE: "发布预警",
|
|
|
UPGRADE: "升级预警",
|
|
|
RESOLVE: "解除预警",
|
|
|
+ AUTO_CLEAR: "系统自动解除",
|
|
|
+ CLEAR: "核查解除",
|
|
|
+ RECEIVE: "接收预警",
|
|
|
+ START: "开始处置",
|
|
|
+ HANDLE: "提交处置结果",
|
|
|
RETURN: "退回重办",
|
|
|
SUPERVISION: "预警督办",
|
|
|
INSTRUCTION: "领导批示"
|
|
|
@@ -431,6 +420,8 @@ function getTimelineType(type) {
|
|
|
RELEASE: "primary",
|
|
|
UPGRADE: "warning",
|
|
|
RESOLVE: "success",
|
|
|
+ AUTO_CLEAR: "success",
|
|
|
+ CLEAR: "success",
|
|
|
RETURN: "danger",
|
|
|
SUPERVISION: "primary",
|
|
|
INSTRUCTION: "info"
|
|
|
@@ -442,17 +433,16 @@ function normalizeWarningRow(item) {
|
|
|
const warningLevel = item.warningLevel || item.warning_level || "";
|
|
|
return {
|
|
|
warningId: item.warningId || item.warning_id,
|
|
|
- warningName: item.warningName || item.warning_name || "",
|
|
|
+
|
|
|
warningNo: item.warningNo || item.warning_no || "",
|
|
|
warningType,
|
|
|
- warningTypeText: warningTypeLabelMap.value[warningType] || warningType || "-",
|
|
|
+ warningTypeText: item.warning_type_name || item.warningTypeName || warningTypeLabelMap.value[warningType] || "-",
|
|
|
warningLevel,
|
|
|
- warningLevelText: warningLevelLabelMap.value[warningLevel] || warningLevel || "-",
|
|
|
+ warningLevelText: warningLevelLabelMap.value[warningLevel] || "-",
|
|
|
status: item.status || "",
|
|
|
- location: item.location || "",
|
|
|
publisher: item.publisher || "",
|
|
|
ownershipUnit: item.ownershipUnit || item.ownership_unit || "",
|
|
|
- publishTime: item.publishTime || item.publish_time || "",
|
|
|
+ publishTime: formatDateTime(item.publishTime || item.publish_time),
|
|
|
handler: item.handler || ""
|
|
|
};
|
|
|
}
|
|
|
@@ -472,12 +462,11 @@ async function loadWarnings() {
|
|
|
const res = await getdbyjlistData({
|
|
|
pageNum: queryParams.pageNum,
|
|
|
pageSize: queryParams.pageSize,
|
|
|
- warningName: queryParams.warningName || undefined,
|
|
|
+
|
|
|
warningNo: queryParams.warningNo || undefined,
|
|
|
warningType: queryParams.warningType || undefined,
|
|
|
warningLevel: queryParams.warningLevel || undefined,
|
|
|
status: queryParams.status || undefined,
|
|
|
- location: queryParams.location || undefined,
|
|
|
publisher: queryParams.publisher || undefined,
|
|
|
ownershipUnit: queryParams.ownershipUnit || undefined,
|
|
|
startTime: queryParams.dateRange?.[0] || undefined,
|
|
|
@@ -553,12 +542,11 @@ function handleQuery() {
|
|
|
function resetQuery() {
|
|
|
queryParams.pageNum = 1;
|
|
|
queryParams.pageSize = 10;
|
|
|
- queryParams.warningName = "";
|
|
|
+
|
|
|
queryParams.warningNo = "";
|
|
|
queryParams.warningType = "";
|
|
|
queryParams.warningLevel = "";
|
|
|
queryParams.status = "";
|
|
|
- queryParams.location = "";
|
|
|
queryParams.publisher = "";
|
|
|
queryParams.ownershipUnit = "";
|
|
|
queryParams.dateRange = [];
|