From 8aab5291dfbb3b14eadb40086fd31a03f812bc30 Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 30 Sep 2022 10:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../problem/components/inspection.jsx | 6 +++--- .../problem/components/statistics.jsx | 2 +- .../sections/problem/components/tableData.jsx | 21 +++++++++++++------ .../sections/problem/containers/dataAlarm.jsx | 18 ++++++++-------- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index f0c9d11..acb1929 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -91,13 +91,13 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => { return ( -
+
- + {statistic[route]} APPLY SEMI-AUTOMATIC INSPECTION -
仅保留48小时内的图片数据,每日8时、14时、17时系统巡检一次。未阅共{notRead}个
+
仅保留48小时内的图片数据,每日8时、14时、17时系统巡检一次。未阅共{notRead}个
{ - let title = { dataLnterrupt: "DATA ABORTS", dataAbnormal: "DATA ABORTS", strategyHit: "DATA ABORTS" } + let title = { dataLnterrupt: "DATA ABORTS", dataAbnormal: "DATA ANOMALY", strategyHit: "ALGORITHM&POLICY HIT" } // console.log(route); return ( <>{route == 'useAbnormal' ? diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 16832c6..e7509ed 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -9,14 +9,15 @@ import { emit } from "superagent"; const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition, - selected, setSelected, setIfBulk, setConfirm, setGenre, query, setQuery,tableData,setTableData }) => { + selected, setSelected, setIfBulk, setConfirm, setGenre, query, setQuery, tableData, setTableData }) => { const { problem } = actions const [count, setCount] = useState(0) // const [search, setSearch] = useState({}) //查询 const [checkAll, setCheckAll] = useState(true) //查询 const api = useRef(); - + let title = { dataLnterrupt:"数据中断详情", dataAbnormal: "数据异常详情", strategyHit: "策略命中详情", ideoAbnormal: "视频异常详情", useAbnormal: "应用异常详情", deviceAbnormal: "设备异常详情" } + useEffect(() => { switch (route) { case 'useAbnormal': @@ -50,7 +51,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition dispatch(problem.getAlarmVideoList({})).then((res) => { if (res.success) { console.log(res); - let tableDatas = res.payload.data?.rows?.map(v => ({ + let tableDatas = res.payload.data?.map(v => ({ key: v.AlarmId, // StructureName: v.StructureName, // projectName: v.pomsProject?.map(r => (r.name ? { name: r.name, state: 'PMOS' } : { @@ -70,6 +71,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition // State: v.State, // alarmType: v.alarmType, // confirm: v.confirmedContent, + camerOnline: v.camerOnline, })) console.log(tableDatas); setTableData(tableDatas) @@ -143,9 +145,16 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition return ( <> -
+
+ +
+ + {title[route]} + DETAILED INFORMATION +
+
-
+
console.log(values)} // onValueChange={values=>console.log(values)} @@ -257,7 +266,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition // dataSource={[{ key: '1' }]} bordered={false} empty="暂无数据" - style={{ }} + style={{}} pagination={false} onRow={(record, index) => { if (index % 1 === 0) { diff --git a/web/client/src/sections/problem/containers/dataAlarm.jsx b/web/client/src/sections/problem/containers/dataAlarm.jsx index 1c7ea52..49a8d53 100644 --- a/web/client/src/sections/problem/containers/dataAlarm.jsx +++ b/web/client/src/sections/problem/containers/dataAlarm.jsx @@ -38,7 +38,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { const TextAreaApi = useRef('') const tableType = { dataLnterrupt: 'dataLnterrupt', dataAbnormal: 'dataAbnormal', strategyHit: 'strategyHit', videoAbnormal: 'videoAbnormal', useAbnormal: 'useAbnormal', deviceAbnormal: 'deviceAbnormal' } - const statistic = { dataLnterrupt: '数据中断统计', dataAbnormal: '数据异常统计', strategyHit: '策略命中统计', videoAbnormal: '视频异常统计', useAbnormal: '应用异常统计', deviceAbnormal: '设备异常统计' } + const statistic = { dataLnterrupt: '数据中断统计', dataAbnormal: '数据异常统计', strategyHit: '策略命中统计', videoAbnormal: '视频异常统计', useAbnormal: '应用半自动化巡检', deviceAbnormal: '设备异常统计' } useEffect(() => { @@ -149,7 +149,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { dataLnterrupt: ['index', 'projectName', 'StructureName', 'SourceName', 'AlarmGroupUnit', 'AlarmCodeName', 'sustainTime', 'createTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime',], dataAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', 'type', 'alarmType', 'createTime', 'sustainTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime'], strategyHit: ['index', 'projectName', 'StructureName', 'SourceName', 'Strategy', 'State', 'createTime', 'sustainTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime'], - videoAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', '19', '20', '21', '22', 'AlarmContent', '111', 'createTime', 'updateTime', 'confirm', 'confirmTime', '56115'], + videoAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', '19', '20', '21', '22', 'AlarmContent', '111', 'createTime', 'updateTime', 'confirm', 'confirmTime', 'camerOnline'], useAbnormal: ['index', 'projectName', 'appName', 'url', 'type', 'alarmContent', 'createTime', 'updateTime', 'confirm', 'confirmTime'], deviceAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', '19', 'alarmContent', '21', 'AlarmContent', 'AlarmCodeName', 'createTime', 'updateTime', 'confirm', 'confirmTime'], } @@ -177,13 +177,13 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { name: '项目名称', sort: 3, value: 'projectName', render: (_, r, index) => { return <> {r.projectName?.map((v, index) => { - return v.name ?
+ return v.name ?
{OutHidden({ number: 7, name: v.name })}
@@ -204,10 +204,10 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { data = '传感器' } if (route == 'strategyHit') data = '测点' - return
+ return r.SourceName ?
{r.SourceName}
{data}
-
+
: "" } }, { name: '中断类型', sort: 6, value: 'AlarmGroupUnit' }, @@ -226,8 +226,8 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { } }, { name: '产生次数', sort: 19, value: 'detailCount', render: (_, r, index) => r.detailCount + '次' }, - { name: '确认信息', sort: 20, value: 'confirm', render: (_, r, index) => r.confirm }, - { name: '确认/恢复时间', sort: 21, value: 'confirmTime', }, + { name: '确认信息', sort: 20, value: 'confirm', render: (_, r, index) => r.confirm ? r.confirm : "未确认" }, + { name: '确认/恢复时间', sort: 21, value: 'confirmTime', render: (_, r, index) => r.confirmTime ? r.confirmTime : "无"}, { name: '持续时间', sort: 19.5, value: 'sustainTime', render: (_, r, index) => { console.log(r.updateTime); @@ -261,7 +261,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { { name: 'URL地址', sort: 16, value: 'url' }, { name: '异常类型', sort: 6, value: 'type' }, { name: '解决方案', sort: 17, value: '111' }, - { name: '在离线', sort: 18, value: '56115' }, + { name: '在离线', sort: 18, value: 'camerOnline' }, { name: '操作', sort: 25, value: 'text', render: (_, r, index) => { return