From d245dd2bc5a88af681309bca9c3a914faaac3c2d Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 27 Sep 2022 19:04:33 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/app.js | 17 ++++++---- web/client/assets/images/problem/export.png | Bin 983 -> 1302 bytes .../problem/components/inspection.jsx | 12 +++---- .../sections/problem/components/sideSheet.jsx | 2 +- .../sections/problem/components/tableData.jsx | 31 +++++++++--------- .../sections/problem/containers/dataAlarm.jsx | 8 ++--- 6 files changed, 37 insertions(+), 33 deletions(-) diff --git a/api/app/lib/controllers/alarm/app.js b/api/app/lib/controllers/alarm/app.js index a1550c9..2296ee2 100644 --- a/api/app/lib/controllers/alarm/app.js +++ b/api/app/lib/controllers/alarm/app.js @@ -239,14 +239,17 @@ async function apiErrorList (ctx) { } } - if (errType) { - if (errType == 'element') { - findOption.where.screenshot = { $ne: null } - } else if (errType == 'timeout') { + // if (errType) { + // if (errType == 'element') { + // findOption.where.screenshot = { $ne: null } + // } else if (errType == 'timeout') { - } else if (errType == 'apiError') { - findOption.where.screenshot = null - } + // } else if (errType == 'apiError') { + // findOption.where.screenshot = null + // } + // } + if(errType){ + findOption.where.type = errType } if (confirmState) { if (confirmState == 'confirmd') { diff --git a/web/client/assets/images/problem/export.png b/web/client/assets/images/problem/export.png index 21a75b544c51f07ef29170743f5b54e600255ca0..2227ba826ac1880e0b311b71c0afb97665b1c8f6 100644 GIT binary patch delta 1270 zcmV^`gt+wt3o8Kf_Nv0t!7Z$jQD4_=L zY3E)LE^y!XAXl;X&vTyhJiqsO-sj`If@}N{+I%z09@dt%5`UD&pOoYt(AA{}=nX!E zG`H$1wUiU$Jc3V1NSx2gtbgrvUVXq2kvM}PmUDaFA{GkM3i5IQcOt|gyEpH)FXjC} zTF1IL1uVhuE{-jr!}$!p37_^F&=dR?%zU5`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=3C=H8qjk7}0n@&&IO z|Fl46j@``E+TVHej8-TrnK&13zVo($0T zUqN*iVLxu+)n3T)11*0)=*!7m+8a53;J#oTXY~_Q?@NOmKQL6S067`p3XrP@hF`&h zZhy);RGtBiKgYtYZQ!gP*!*cUD75|gOlFp%@mlOnUhpgXUpzYCc_gzF*Z6QS;4o5* zY@(`9GzG8)HyCixw1%H=Xn^WXwWd07lLMy2O$N9E++=`OFay>3UTJNvp5ZUQrCAxX zy;+o(kjx|X(Yjno4}SqO4KUPL-gT4;XD<4Uwc#%Trv>(tHC`+!Z=BR^qg_cI!ms)t XbW`^@V?R6B00000NkvXXu0mjfgk#g> diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index da3c8ac..7ba27be 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -92,12 +92,12 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => { return (
-
+
- + {statistic[route]} - APPLY SEMI-AUTOMATIC INSPECTION -
仅保留48小时内的图片数据,每小时覆盖执行一次 03专项2期:已阅共{notRead}个
+ APPLY SEMI-AUTOMATIC INSPECTION +
仅保留48小时内的图片数据,每小时覆盖执行一次 未阅共{notRead}个
{ labelPosition="left" field='noted' key='noted' - style={{ width: 116, marginRight: 54, color: "#F9F9F9", marginBottom: 10 }} + style={{ width: 116, marginRight: 60, color: "#F9F9F9", marginBottom: 10 }} placeholder="全部" showClear > @@ -188,7 +188,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => { ); })} - +
diff --git a/web/client/src/sections/problem/components/sideSheet.jsx b/web/client/src/sections/problem/components/sideSheet.jsx index e89c3ab..cad182b 100644 --- a/web/client/src/sections/problem/components/sideSheet.jsx +++ b/web/client/src/sections/problem/components/sideSheet.jsx @@ -120,7 +120,7 @@ function SideSheets ({ dispatch, actions, close }) { title: "产生时间", dataIndex: "Time", rowKey: 'Time', - render: (_, r, index) => moment(r.time).format("YYYY-MM-DD HH:mm:ss") + render: (_, r, index) => r.Time?moment(r.Time).format("YYYY-MM-DD HH:mm:ss"):"" }, ] diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 3921397..7efd37c 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -8,7 +8,7 @@ import { emit } from "superagent"; -const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, +const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition, selected, setSelected, setIfBulk, setConfirm, setGenre, query, setQuery }) => { const { problem } = actions @@ -24,6 +24,7 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, dispatch(problem.getAlarmLnspectionApi({})).then((res) => { console.log(res.payload.data) if (res.success) { + let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" } setCount(res.payload.data?.count || 0) let tableDatas = res.payload.data?.rows.map(v => ({ key: v.id, @@ -36,7 +37,7 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:mm:ss") : "", alarmContent: v.alarmContent, screenshot: v.screenshot, - type: v.type, + type: v.type ? typeData[v.type] : "", confirm: v.confirm, })) // console.log(tableDatas); @@ -173,23 +174,23 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, marginRight: 10 }} > - - setSetup(true)} /> + + setSetup(true)} /> diff --git a/web/client/src/sections/problem/containers/dataAlarm.jsx b/web/client/src/sections/problem/containers/dataAlarm.jsx index f43d282..8cf26dc 100644 --- a/web/client/src/sections/problem/containers/dataAlarm.jsx +++ b/web/client/src/sections/problem/containers/dataAlarm.jsx @@ -145,7 +145,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { dataLnterrupt: ['index', 'projectName', 'StructureName', 'SourceName', 'AlarmGroupUnit', 'AlarmCodeName', 'createTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime',], dataAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', 'type', 'alarmType', 'createTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime'], strategyHit: ['index', 'projectName', 'StructureName', 'SourceName', 'Strategy', 'State', 'createTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime'], - videoAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', '19', '20', '21', '22', 'AlarmContent', 'AlarmCodeName', 'createTime', 'updateTime', 'confirm', 'confirmTime'], + videoAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', '19', '20', '21', '22', 'AlarmContent', '111', 'createTime', 'updateTime', 'confirm', 'confirmTime','56115'], 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'], } @@ -250,9 +250,9 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { { name: '接入方式', value: '22' }, { name: '应用名称', value: 'appName' }, { name: 'URL地址', value: 'url' }, - { - name: '异常类型', value: 'type' - }, + {name: '异常类型', value: 'type'}, + {name: '解决方案', value: '111'}, + {name: '在离线', value: '56115'}, ]