Browse Source

数据中断与设备异常合并优化

dev
wenlele 1 year ago
parent
commit
3c1d42a347
  1. 2
      web/client/src/sections/control/containers/control.jsx
  2. 12
      web/client/src/sections/problem/components/tableData.jsx
  3. 14
      web/client/src/sections/problem/containers/dataAlarm.jsx

2
web/client/src/sections/control/containers/control.jsx

@ -598,7 +598,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject
{ name: '关注的项目', sort: 1, key: 'project', data: workData?.projects || 0, img: 'url(/assets/images/console/lan_1.png)' },
{ name: '数据告警', sort: 2, key: 'data', data: workData?.dataSurplus || 0, img: 'url(/assets/images/console/lv_1.png)', url: '/problem/dataAlarm/dataLnterrupt' },
{ name: '应用告警', sort: 2, key: 'app', data: workData?.appSurplus || 0, img: 'url(/assets/images/console/hong_1.png)', url: '/problem/useAlarm/useAbnormal' },
{ name: '视频告警', sort: 2, key: 'device', data: workData?.videoSurplus || 0, img: 'url(/assets/images/console/hong_1.png)', url: '/problem/deviceAlarm/deviceAbnormal' },
{ name: '视频告警', sort: 2, key: 'device', data: workData?.videoSurplus || 0, img: 'url(/assets/images/console/hong_1.png)', url: '/problem/useAlarm/videoAbnormal' },
{ name: '项目里程碑', sort: 1, key: 'milestone', },
{ name: '相关成员', sort: 2, key: 'personnel', },

12
web/client/src/sections/problem/components/tableData.jsx

@ -59,8 +59,8 @@ const TableData = ({ alarmDataGroup, route, dispatch, actions, collectData, setS
case 'videoAbnormal':
dispatch(problem.getAlarmVideoList({ ...search.current, pepProjectId: pepProjectId })).then((res) => {
if (res.success) {
let tableDatas = res.payload.data?.map(v => ({
key: v.alarmId,
let tableDatas = res.payload.data?.map((v, index) => ({
key: v.AlarmId + index,
id: v.alarmId,
StructureName: v.struc,
projectName: v.pomsProject?.map(r => (r.name ? { id: r.id, name: r.name, state: 'PMOS' } : {
@ -93,13 +93,13 @@ const TableData = ({ alarmDataGroup, route, dispatch, actions, collectData, setS
if (genre?.length > 0 && (route === 'dataAbnormal' ? typeId?.length > 0 : true)) {
dispatch(problem.getAlarmDataList({
...(route === 'dataLnterrupt' ? { timestamps: true } : {}),
...(route === 'dataAbnormal' ? { groupUnitId: typeId?.length > 0 ? typeId?.join(',') : "", } : {}),
...query, ...(api.current?.getValues() || {}), groupId: groupId.current.map(v => v.id).join(), pepProjectId: pepProjectId,
...query, ...(search.current || {}), groupId: groupId.current.map(v => v.id).join(), pepProjectId: pepProjectId,
...((route === 'dataAbnormal' && !search.current?.groupUnitId?.length) ? { groupUnitId: typeId?.length > 0 ? typeId?.join(',') : "", } : {}),
})).then((res) => {
if (res.success) {
setCount(res.payload.data?.count || 0)
let tableDatas = res.payload.data?.rows?.map(v => ({
key: v.AlarmId,
let tableDatas = res.payload.data?.rows?.map((v, index) => ({
key: v.AlarmId + index,
id: v.AlarmId,
StructureName: v.StructureName,
projectName: v.pomsProject?.map(r => (r.name ? { id: r.id, name: r.name, state: 'PMOS' } : {

14
web/client/src/sections/problem/containers/dataAlarm.jsx

@ -82,11 +82,12 @@ const DataAlarm = (props) => {
{ name: '当前', value: 'new' },
{ name: '历史', value: 'histroy' }]
},
{
name: '异常类型', field: 'onlineState',
data: [
{ name: '离线', value: 'offline' }]
}],
// {
// name: '', field: 'onlineState',
// data: [
// { name: '线', value: 'offline' }]
// }
],
dataAbnormal: [ //(dataAbnormal)
{ name: '搜索', field: '1' },
{
@ -189,6 +190,9 @@ const DataAlarm = (props) => {
//
const columnAll = [
{
},
{
name: "序号", sort: 1, value: "index", render: (_, r, index) => {
return index + 1;

Loading…
Cancel
Save