|
@@ -16,6 +16,8 @@ import * as echarts from "echarts";
|
|
|
import { getVariable } from "../../../../../utils/theme";
|
|
import { getVariable } from "../../../../../utils/theme";
|
|
|
import { Descriptions, DatePicker } from "antd";
|
|
import { Descriptions, DatePicker } from "antd";
|
|
|
const { RangePicker } = DatePicker;
|
|
const { RangePicker } = DatePicker;
|
|
|
|
|
+import alert from "../../../../../assets/alert.png";
|
|
|
|
|
+import check from "../../../../../assets/check.png";
|
|
|
|
|
|
|
|
const alarmTypeMap = {
|
|
const alarmTypeMap = {
|
|
|
1: "过程告警",
|
|
1: "过程告警",
|
|
@@ -330,20 +332,25 @@ const Index = (props) => {
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
<div className={styles.desc}>
|
|
<div className={styles.desc}>
|
|
|
- <Descriptions column={4} style={{ margin: "0px 20px" }}>
|
|
|
|
|
- <Descriptions.Item span={2} label="告警名称">
|
|
|
|
|
|
|
+ <Descriptions column={3} style={{ margin: "0px 20px", width: "62.5%" }}>
|
|
|
|
|
+ <Descriptions.Item span={3} label="告警名称">
|
|
|
{props.data?.data?.name}
|
|
{props.data?.data?.name}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
- {props.data?.data?.point_id && (
|
|
|
|
|
- <Descriptions.Item label="点位编号">
|
|
|
|
|
- {props.data?.data?.point_id}
|
|
|
|
|
- </Descriptions.Item>
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+ {props.data?.data?.point_id !== null &&
|
|
|
|
|
+ props.data?.data?.point_id !== "" &&
|
|
|
|
|
+ props.data?.data?.point_id !== undefined && (
|
|
|
|
|
+ <Descriptions.Item label="点位编号">
|
|
|
|
|
+ {props.data?.data?.point_id}
|
|
|
|
|
+ </Descriptions.Item>
|
|
|
|
|
+ )}
|
|
|
|
|
+ <Descriptions.Item label="告警类型">
|
|
|
|
|
+ {alarmTypeMap[props.data?.data?.type]}
|
|
|
|
|
+ </Descriptions.Item>
|
|
|
<Descriptions.Item label="告警级别">
|
|
<Descriptions.Item label="告警级别">
|
|
|
{levelMap[props.data?.data?.alarm_level]}
|
|
{levelMap[props.data?.data?.alarm_level]}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
- <Descriptions.Item label="告警类型">
|
|
|
|
|
- {alarmTypeMap[props.data?.data?.type]}
|
|
|
|
|
|
|
+ <Descriptions.Item label="告警时间">
|
|
|
|
|
+ {props.data?.data?.created_time}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
<Descriptions.Item label="恢复时间">
|
|
<Descriptions.Item label="恢复时间">
|
|
|
{props.data?.data?.recovery_time || "-"}
|
|
{props.data?.data?.recovery_time || "-"}
|
|
@@ -351,22 +358,37 @@ const Index = (props) => {
|
|
|
<Descriptions.Item label="持续时间">
|
|
<Descriptions.Item label="持续时间">
|
|
|
{getDur(props?.data?.data?.duration)}
|
|
{getDur(props?.data?.data?.duration)}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
- <Descriptions.Item label="告警时间">
|
|
|
|
|
- {props.data?.data?.created_time}
|
|
|
|
|
- </Descriptions.Item>
|
|
|
|
|
- <Descriptions.Item label="告警状态">
|
|
|
|
|
- {alarmStatusMap[props.data?.data?.status]}
|
|
|
|
|
|
|
+ <Descriptions.Item label="确认人">
|
|
|
|
|
+ {props.data?.data?.confirmed_oper_name}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
<Descriptions.Item label="确认时间">
|
|
<Descriptions.Item label="确认时间">
|
|
|
{props.data?.data?.confirmed_time}
|
|
{props.data?.data?.confirmed_time}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
- <Descriptions.Item label="确认人">
|
|
|
|
|
- {props.data?.data?.confirmed_oper_name}
|
|
|
|
|
- </Descriptions.Item>
|
|
|
|
|
- <Descriptions.Item label="备注">
|
|
|
|
|
|
|
+ <Descriptions.Item label="备注信息">
|
|
|
{props.data?.data?.remark}
|
|
{props.data?.data?.remark}
|
|
|
</Descriptions.Item>
|
|
</Descriptions.Item>
|
|
|
</Descriptions>
|
|
</Descriptions>
|
|
|
|
|
+ <div className={styles.divide}></div>
|
|
|
|
|
+ <div className={styles.oper}>
|
|
|
|
|
+ <img src={props.data?.data?.status === 2 ? check : alert} />
|
|
|
|
|
+ <div className={styles.status}>
|
|
|
|
|
+ {alarmStatusMap[props.data?.data?.status]}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className={styles.buttons}>
|
|
|
|
|
+ <div className={styles.button} onClick={props?.onSetting}>
|
|
|
|
|
+ 告警配置
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className={styles.divide}></div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ onClick={props.onConfirm}
|
|
|
|
|
+ className={`${styles.button} ${
|
|
|
|
|
+ props.data?.data?.op_status === 1 ? styles.disabled : ""
|
|
|
|
|
+ }`}
|
|
|
|
|
+ >
|
|
|
|
|
+ {props.data?.data?.op_status === 1 ? "已确认" : "告警确认"}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
{(props.data?.data?.sub_type === 13 ||
|
|
{(props.data?.data?.sub_type === 13 ||
|
|
|
props.data?.data?.sub_type === 14) && (
|
|
props.data?.data?.sub_type === 14) && (
|