From 99b6c6d5c0be9b3ebf3ebea927a0342541ff8de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Tue, 28 Nov 2023 11:32:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:fix=20=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/launch.json | 2 +- api/app/lib/schedule/alarms_push.js | 2 +- .../analysis/containers/tableShow.jsx | 42 +++++++++++++++---- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index 36dfe13..4e4cf6b 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -132,4 +132,4 @@ } } ] -} \ No newline at end of file +} diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index d28ab29..e0f22a9 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -1559,7 +1559,7 @@ module.exports = function (app, opts) { break; case 'Structure': if (showOne2 && showOne3 && showOne4) { - tableData +=problem==count?`${x['name']+'('+'测点数据全部中断'+')' || ''}`: `${x['name'] || ''}` + tableData +=problem==count?`${x['name']+'('+'测点数据全部中断'+')' || ''}测点数据全部中断`: `${x['name'] || ''}` } break; case 'factor': diff --git a/web/client/src/sections/analysis/containers/tableShow.jsx b/web/client/src/sections/analysis/containers/tableShow.jsx index 5f84bc8..437dd02 100644 --- a/web/client/src/sections/analysis/containers/tableShow.jsx +++ b/web/client/src/sections/analysis/containers/tableShow.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react'; import { connect } from 'react-redux'; import ReactECharts from 'echarts-for-react'; import echarts from 'echarts'; -import { Spin, Card, CardGroup, Form, Button } from '@douyinfe/semi-ui'; +import { Spin, Card, CardGroup, Form, Button,Table } from '@douyinfe/semi-ui'; @@ -15,15 +15,41 @@ const Network = (props) => { useEffect(() => { }, []) - - + const columns = [ + { + title: '设备名称', + dataIndex: 'deviceName', + width: 200, + key:'deviceName' + }, + { + title: '设备类型', + dataIndex: 'deviceType', + width:200, + key:'deviceType' + }, + { + title: '最后采集时间', + dataIndex: 'collectTime', + width:200, + key:'collectTime' + + }, + { + title: '更新日期', + dataIndex: 'updateTime', + sorter: (a, b) => (a.updateTime - b.updateTime > 0 ? 1 : -1), + render: value => { + return dateFns.format(new Date(value), 'yyyy-MM-dd'); + }, + }, + ]; return ( -
- - 表格展示 - -
+
) }