diff --git a/src/components/warn-detail/env.js b/src/components/warn-detail/env.js index 57d1c15305014d03b6f6c95e8d54de1ed4d481df..314f0b02999e62328a44ecfb73efc97a74a295ef 100644 --- a/src/components/warn-detail/env.js +++ b/src/components/warn-detail/env.js @@ -1,6 +1,6 @@ export const STATUS_OBJ = { - success: "已恢复", - error: '未恢复' + 1: "已恢复", + 2: '未恢复' } export const PUSH_STATUS = { 1: '成功', diff --git a/src/page/main/forewarning/list/detail/index.vue b/src/page/main/forewarning/list/detail/index.vue index c682cbd50a17da5d89331b4f51a7b28379c8165e..3587f83b088d8620957b7108af8c0667e12a5cd1 100644 --- a/src/page/main/forewarning/list/detail/index.vue +++ b/src/page/main/forewarning/list/detail/index.vue @@ -105,6 +105,10 @@ const tabs = ref([ ], }, ]); +const pushType = { + 1: "自动推送", + 2: "手动推送", +}; const getInfo = () => { const params = { id, @@ -124,6 +128,36 @@ const getInfo = () => { current_alarm_value: data.current_value + (ruleTypeOptions.value[data.alert_rule_type]?.unit || ""), warning_time: data.alert_time?.split("+")[0].replace("T", " ").replace("Z", " ") || "-", }; + // + tabs.value = [ + { + label: "推送记录", + prop: "push", + lists: + data.push_records?.map((e) => { + return { + method: e.notify_method, + person: e.system_account, + push_time: e.push_time?.split("+")[0].replace("T", " ").replace("Z", " ") || "-", + push_type: pushType[e.push_type], + status: e.status, + }; + }) || [], + }, + { + label: "处置记录", + prop: "dispose", + lists: + data.disposed_list?.map((e) => { + return { + status: e.is_disposed, + feedback: e.disposal_content, + feedback_time: e.disposal_time?.split("+")[0].replace("T", " ").replace("Z", " ") || "-", + feedback_person: e.disposal_user, + }; + }) || [], + }, + ]; } }); }; @@ -146,29 +180,8 @@ const GetRuleTypeOptions = () => { } }); }; -const pushType = { - 1: "自动推送", - 2: "手动推送", -}; -const getPushLog = () => { - axios.get("/v1/api/push_record/list", { params: { alert_list_id: id } }).then((res) => { - if (res.data.code == 200) { - tabs.value[0].lists = - res.data.data.list?.map((e) => { - return { - method: e.notify_method, - person: e.system_account, - push_time: e.push_time?.split("+")[0].replace("T", " ").replace("Z", " ") || "-", - push_type: pushType[e.push_type], - status: e.status, - }; - }) || []; - } - }); -}; onBeforeMount(() => { GetRuleTypeOptions(); - getPushLog(); }); diff --git a/src/page/main/forewarning/list/index.vue b/src/page/main/forewarning/list/index.vue index cfefad2d9841b0348cd9b248c681e7efc9230b14..33eded603806b172fe5adda927c27ba7567c7a41 100644 --- a/src/page/main/forewarning/list/index.vue +++ b/src/page/main/forewarning/list/index.vue @@ -2,7 +2,7 @@
- + @@ -12,12 +19,34 @@ diff --git a/src/page/main/ticket/my-warn-ticket/index.vue b/src/page/main/ticket/my-warn-ticket/index.vue index 0a9639fbacde1d4b59bb3661f7195bff025e25e0..438e76abe8688dca5fc48fbb9b47143e14a75413 100644 --- a/src/page/main/ticket/my-warn-ticket/index.vue +++ b/src/page/main/ticket/my-warn-ticket/index.vue @@ -4,39 +4,17 @@
- +