From 71d0f2e30e7055b62175935876c7fcea2cd89398 Mon Sep 17 00:00:00 2001 From: wenlele Date: Sun, 9 Oct 2022 14:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../problem/components/inspection.jsx | 13 +++++++-- .../sections/problem/components/tableData.jsx | 1 + .../sections/problem/containers/dataAlarm.jsx | 29 +++++++++++++++---- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index c99bf08..cd2ec2f 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -1,9 +1,10 @@ import React, { useState, useEffect, useRef } from "react"; import { connect } from "react-redux"; -import { Button, Form, Modal, Skeleton, Pagination, Table } from "@douyinfe/semi-ui"; +import { Button, Form, Modal, Skeleton, Pagination, Notification } from "@douyinfe/semi-ui"; import moment from "moment"; import PerfectScrollbar from "perfect-scrollbar"; +import copy from "copy-to-clipboard"; import './inspection.less' import { log } from "ezuikit-js"; @@ -213,7 +214,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
获取时间:{moment(v.createTime).format("YYYY-MM-DD HH:mm:ss")} - {v.app?.name} + {v.app?.name}
)} @@ -284,6 +285,14 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => { 截取时间:{moment(pictureData.createTime).format("YYYY-MM-DD HH:mm:ss")} { + console.log(pictureData); + copy(pictureData?.router || "无相关地址"); + Notification.success({ + content: "复制成功", + duration: 2, + }) + }} /> : "" } }, + { name: '测点', sort: 4.1, value: 'point', render: (_, r, index) => r.station?.map(v =>
{v.name}
) }, { name: '中断类型', sort: 6, value: 'AlarmGroupUnit' }, { name: '告警信息', sort: 5, value: 'AlarmContent' }, { name: '常见原因', sort: 7, value: 'AlarmCodeName' }, @@ -448,6 +450,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb dispatch(problem.postApiConfirm({ appAlarmId: selected, confirm: content })).then(res => { if (res.success) { setConfirm(false) + setSelected([]) setQuery({ limit: query.limit, page: query.page }) } }) @@ -457,6 +460,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb dispatch(problem.putAlarmVideoConfirm({ alarmId: selected, content: content })).then(res => { if (res.success) { setConfirm(false) + setSelected([]) setQuery({ limit: query.limit, page: query.page }) } }) @@ -475,7 +479,8 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb }) || tableData setTableData(data) setConfirm(false) - console.log(data) + setSelected([]) + // console.log(data) } }) }) @@ -494,6 +499,20 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb field='textData' onChange={(e) => setContent(e)} /> + {(() => { + let data + if (selected.length == 1) { + data = tableData.find(v => v.key == selected[0]) + } + return data ?
+ 当前告警源-{data?.SourceName},在项目{data?.projectName?.map((v, index) => { + if (index > 0) { + return '、' + v.name + } else { + return v.name + } + })}中被多次绑定(可能拥有不同的名称),确认后,该设备的同类型告警也会被一同确认。
: "" + })()} : ""}