From c4522e9cf70e32a0df710fd4a33781c2d28fb03a Mon Sep 17 00:00:00 2001 From: zhangyao Date: Fri, 7 Jul 2023 16:40:44 +0800 Subject: [PATCH] feat: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 预警列表接口对接 --- src/components/warn-detail/env.js | 4 +- .../main/forewarning/list/detail/index.vue | 55 ++-- src/page/main/forewarning/list/index.vue | 37 +-- .../forewarning/list/user-input-table.vue | 269 ------------------ .../ticket/business-ticket-list/index.vue | 1 + .../main/ticket/my-business-ticket/index.vue | 1 + .../ticket/my-warn-ticket/detail/index.vue | 165 +++++++++-- src/page/main/ticket/my-warn-ticket/index.vue | 188 ++++++------ 8 files changed, 277 insertions(+), 443 deletions(-) delete mode 100644 src/page/main/forewarning/list/user-input-table.vue diff --git a/src/components/warn-detail/env.js b/src/components/warn-detail/env.js index 57d1c15..314f0b0 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 c682cbd..3587f83 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 cfefad2..33eded6 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 0a9639f..438e76a 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 @@
- +