diff --git a/web/client/src/sections/install/nav-item.jsx b/web/client/src/sections/install/nav-item.jsx
index 634ceaf..7c93f27 100644
--- a/web/client/src/sections/install/nav-item.jsx
+++ b/web/client/src/sections/install/nav-item.jsx
@@ -29,7 +29,7 @@ export function getNavItem (user, dispatch) {
itemKey: 'order ',
text: '工单管理',
icon: ,
- to: '/install/order /setup',
+ to: '/install/order/setup',
items: [{
itemKey: 'setup', to: '/install/order/setup', text: '工单设置'
}]
diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx
index 7c7978f..51de180 100644
--- a/web/client/src/sections/problem/components/tableData.jsx
+++ b/web/client/src/sections/problem/components/tableData.jsx
@@ -6,7 +6,8 @@ import moment from "moment";
-const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition, selected, setSelected, setIfBulk, setConfirm }) => {
+const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition,
+ selected, setSelected, setIfBulk, setConfirm, setGenre }) => {
const { problem } = actions
const [tableData, setTableData] = useState([]) //表格数据
@@ -37,34 +38,58 @@ const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition
}
})
break;
-
+ case 'videoAbnormal':
+ break;
default:
dispatch(problem.getAlarmDataGroup()).then((res) => {
if (res.success) {
- console.log(res.payload.data);
+ // console.log(res.payload.data);
+ let routeData = { dataLnterrupt: '数据中断', dataAbnormal: '数据异常', strategyHit: '策略命中', deviceAbnormal: '' }
+ let data
+ if (route == 'dataLnterrupt') data = res.payload.data?.filter(v => v.desc == '数据中断')
+ if (route == 'dataAbnormal') data = res.payload.data?.filter(v => v.desc == '数据异常')
+ if (route == 'strategyHit') data = res.payload.data?.filter(v => v.desc == '策略命中')
+ if (route == 'deviceAbnormal') data = res.payload.data?.filter(v => v.desc == '掉线' || v.desc == '不活跃')
+ console.log(data);
+ let genreData = []
+ data?.map(v => {
+ v?.unit?.map(vv => {
+ genreData.push({ name: vv.name, value: vv.id })
+ })
+ })
+ console.log(genreData);
+ setGenre(genreData)
+ if (data || data[0]?.id) {
+ dispatch(problem.getAlarmDataList({})).then((res) => {
+ console.log(res);
+ })
+ }
+
+ }
- }
- // let tableDatas = res.payload.data?.rows.map(v => ({
- // key: v.id,
- // serialNumber: v.serialNumber,
- // projectName: v.app?.projectCorrelations?.map(r => r.name)?.filter(c => c),
- // appName: v.app?.name,
- // url: v.app?.url,
- // createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:MM:SS") : "",
- // updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:MM:SS") : "",
- // confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:MM:SS") : "",
- // alarmContent: v.alarmContent,
- // screenshot: v.screenshot,
- // type: v.type,
- // confirm: v.confirm,
- // }))
- // console.log(tableDatas);
- // setTableData(tableDatas)
})
+
+ // let tableDatas = res.payload.data?.rows.map(v => ({
+ // key: v.id,
+ // serialNumber: v.serialNumber,
+ // projectName: v.app?.projectCorrelations?.map(r => r.name)?.filter(c => c),
+ // appName: v.app?.name,
+ // url: v.app?.url,
+ // createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:MM:SS") : "",
+ // updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:MM:SS") : "",
+ // confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:MM:SS") : "",
+ // alarmContent: v.alarmContent,
+ // screenshot: v.screenshot,
+ // type: v.type,
+ // confirm: v.confirm,
+ // }))
+ // console.log(tableDatas);
+ // setTableData(tableDatas)
+
break;
}
@@ -105,6 +130,7 @@ const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition
key={v.field}
style={{ width: 116, marginRight: 10, color: "#F9F9F9", }}
placeholder="全部"
+ filter
showClear
>
{v.data?.map((item) => {
diff --git a/web/client/src/sections/problem/containers/dataAlarm.jsx b/web/client/src/sections/problem/containers/dataAlarm.jsx
index faaea14..226e834 100644
--- a/web/client/src/sections/problem/containers/dataAlarm.jsx
+++ b/web/client/src/sections/problem/containers/dataAlarm.jsx
@@ -24,6 +24,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
const [ifBulk, setIfBulk] = useState(false); //是否批量确认
const [content, setContent] = useState(false); //确认内容
const [selected, setSelected] = useState([]) //表格被勾选项
+ const [genre, setGenre] = useState([]) //搜索类型
const tableType = { dataLnterrupt: 'dataLnterrupt', dataAbnormal: 'dataAbnormal', strategyHit: 'strategyHit', videoAbnormal: 'videoAbnormal', useAbnormal: 'useAbnormal', deviceAbnormal: 'deviceAbnormal' }
const statistic = { dataLnterrupt: '数据中断统计', dataAbnormal: '数据异常统计', strategyHit: '策略命中统计', videoAbnormal: '视频异常统计', useAbnormal: '应用异常统计', deviceAbnormal: '设备异常统计' }
@@ -62,10 +63,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
{ name: '搜索', field: '1' },
{
name: '中断类型', field: '2',
- data: [
- { name: '服务异常', value: '11' },
- { name: '链接中断', value: '22' },
- { name: '设备异常', value: '33' }]
+ data: genre
},
{
name: '中断状态', field: '3',
@@ -77,9 +75,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
{ name: '搜索', field: '1' },
{
name: '异常类型', field: '2',
- data: [
- { name: '超远程', value: '11' },
- { name: '超限幅', value: '22' }]
+ data: genre
},
{
name: '异常状态', field: '3',
@@ -91,11 +87,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
{ name: '搜索', field: '1' },
{
name: '策略类型', field: '2',
- data: [
- { name: '超阀值', value: '11' },
- { name: '防驶入告警', value: '22' },
- { name: '设备关闭', value: '33' },
- { name: '超围栏', value: '44' }]
+ data:genre
},
{
name: '命中状态', field: '3',
@@ -137,10 +129,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
{ name: '搜索', field: '1' },
{
name: '设备类型', field: '2',
- data: [
- { name: '传感器', value: '11' },
- { name: 'DTU', value: '22' },
- { name: '服务器', value: '33' }]
+ data: genre
},
{
name: '异常状态', field: '3',
@@ -279,7 +268,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
}
})
-
+
TableDisplay.push({
title: '操作',
dataIndex: 'text',
@@ -292,7 +281,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
>
}
})
- console.log(TableDisplay);
+ // console.log(TableDisplay);
// console.log(setup);
setExhibition(TableDisplay)
setTableSetup([{ list: setup }])
@@ -341,6 +330,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
setIfBulk={setIfBulk}
selected={selected}
setSelected={setSelected}
+ setGenre={setGenre}
/>
{setup ? (