From 1c2dfb4f188136b04017f87764f31cc8da7c20b8 Mon Sep 17 00:00:00 2001 From: dengjia Date: Thu, 14 Aug 2025 10:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/alarm_management/index.vue | 21 ++++- src/views/alarm_management/info.vue | 85 ++++++++++++++++--- src/views/data_directory/basic/records.vue | 6 +- .../data_directory/basic/records_detail.vue | 4 + .../components/dataItemsDialog.vue | 17 +++- 5 files changed, 111 insertions(+), 22 deletions(-) diff --git a/src/views/alarm_management/index.vue b/src/views/alarm_management/index.vue index 96e1b1c..63bc2a7 100644 --- a/src/views/alarm_management/index.vue +++ b/src/views/alarm_management/index.vue @@ -15,11 +15,16 @@ - + + + + + + @@ -63,6 +68,7 @@ import { getAlarmList } from "@/request/alarm_management.js"; import AppTable from "@/components/table/index.vue"; import { useRouter } from "vue-router"; import editDialog from "./components/edit.vue"; +import { translationStatus } from "@/assets/js/utils.js"; const router = useRouter(); @@ -73,6 +79,13 @@ const handleStatusOptions = [ { name: "处理成功", id: 2 }, { name: "不需要处理", id: 3 }, ]; +const pushOptions = [ + { id: 1, name: "未推送" }, + { id: 2, name: "定时推送" }, + { id: 3, name: "推送成功" }, + { id: 4, name: "重试中" }, + { id: 5, name: "推送失败" }, +]; const options = [ { key: "companyName", label: "企业名称" }, { key: "servicePlatformName", label: "服务平台名称" }, diff --git a/src/views/alarm_management/info.vue b/src/views/alarm_management/info.vue index dfc3591..f16c68b 100644 --- a/src/views/alarm_management/info.vue +++ b/src/views/alarm_management/info.vue @@ -1,6 +1,24 @@ @@ -9,30 +27,57 @@ import { useRoute } from "vue-router"; import AppInfoBuilder from "@/components/info_builder/index.vue"; import { ref } from "vue"; import { getAlarmInfo } from "@/request/alarm_management.js"; +import { translationStatus } from "@/assets/js/utils.js"; const route = useRoute(); const { id } = route.query; const info = ref({}); const fnGetData = async () => { const { data } = await getAlarmInfo({ id }); info.value = data; - info.value.status = fnStatus(info.value.handleStatus); + info.value.handleStatus = translationStatus( + info.value.handleStatus, + handleStatusOptions + ); + info.value.pushStatus = translationStatus(info.value.pushStatus, pushOptions); }; fnGetData(); -const fnStatus = (status) => { - switch (status) { - case 1: - return "未处理"; - case 2: - return "处理成功"; - case 3: - return "不需要处理"; +const handleStatusOptions = [ + { id: 1, name: "未处理" }, + { id: 2, name: "处理成功" }, + { id: 3, name: "不需要处理" }, +]; +const pushOptions = [ + { id: 1, name: "未推送" }, + { id: 2, name: "定时推送" }, + { id: 3, name: "推送成功" }, + { id: 4, name: "重试中" }, + { id: 5, name: "推送失败" }, +]; +const fnToJsonParse = (params) => { + if (params === null) { + return false; + } + try { + const obj = JSON.parse(params); + return obj; + } catch (error) { + return false; } }; const options = [ { key: "companyName", label: "企业名称" }, { key: "servicePlatformName", label: "服务平台名称" }, { key: "thirdPlatformName", label: "上级平台名称" }, - { key: "alarmReason", label: "告警原因" }, + { + key: "pushStatus", + label: "推送状态", + }, + { + key: "businessName", + label: "业务名称", + }, + { key: "receiveTime", label: "数据接收时间" }, + { key: "handleBy", label: " 处理人" }, { key: "handleRemark", label: "处理备注" }, { @@ -40,10 +85,24 @@ const options = [ label: "处理结果", }, { - key: "status", + key: "handleStatus", label: "处理状态", }, + { key: "alarmReason", label: "告警原因", span: 2 }, + { + key: "receiveData", + label: "上报数据", + }, ]; - + diff --git a/src/views/data_directory/basic/records.vue b/src/views/data_directory/basic/records.vue index 08bdc0b..887981a 100644 --- a/src/views/data_directory/basic/records.vue +++ b/src/views/data_directory/basic/records.vue @@ -7,8 +7,8 @@ :data="list" @get-data="getData" > - - + + @@ -68,7 +68,7 @@ const reqMapObj = reqMapArr.find( (item) => item.dataType.indexOf(route.query.dataType) !== -1 ); const reqMapOptions = reqMapObj?.options || []; -const reqMap = reqMapObj?.reqMap; +const reqMap = reqMapObj?.reqMap || {}; const { list, pagination, searchForm, getData, resetPagination, tableRef } = useListData(getRecordList, { diff --git a/src/views/data_directory/basic/records_detail.vue b/src/views/data_directory/basic/records_detail.vue index 89c9b72..b5c2989 100644 --- a/src/views/data_directory/basic/records_detail.vue +++ b/src/views/data_directory/basic/records_detail.vue @@ -3,6 +3,8 @@
+

上报数据

+ @@ -22,6 +24,8 @@
+

请求数据

+
请求时间{{ item.requestTime }}
diff --git a/src/views/database/superior_platform_management/components/dataItemsDialog.vue b/src/views/database/superior_platform_management/components/dataItemsDialog.vue index 0f6fab2..280acf2 100644 --- a/src/views/database/superior_platform_management/components/dataItemsDialog.vue +++ b/src/views/database/superior_platform_management/components/dataItemsDialog.vue @@ -54,7 +54,10 @@