Browse Source

确认信息的判断

dev
wenlele 2 years ago
parent
commit
140410bca2
  1. 2
      web/client/src/components/setup.jsx
  2. 1
      web/client/src/sections/analysis/containers/operationData.jsx
  3. 1
      web/client/src/sections/install/components/memberModal.jsx
  4. 4
      web/client/src/sections/problem/components/inspection.jsx
  5. 7
      web/client/src/sections/problem/components/sideSheet.jsx
  6. 21
      web/client/src/sections/problem/components/statistics.jsx
  7. 36
      web/client/src/sections/problem/components/tableData.jsx
  8. 3
      web/client/src/sections/problem/containers/dataAlarm.jsx
  9. 2
      web/client/src/sections/service/containers/emPush.jsx

2
web/client/src/components/setup.jsx

@ -12,8 +12,6 @@ function Setup(props) {
tableList
} = props;
console.log(tableType,
tableList);
const [check, setCheck] = useState([]);
const checkboxcss = { width: "25%", height: 16, margin: "0 0 20px 0" };

1
web/client/src/sections/analysis/containers/operationData.jsx

@ -14,7 +14,6 @@ const Console = (props) => {
// websocket 使
// useEffect(() => {
// console.log(socket)
// if (socket) {
// socket.on('TEST', function (msg) {
// console.info(msg);

1
web/client/src/sections/install/components/memberModal.jsx

@ -44,7 +44,6 @@ function memberModal (props) {
]); //
//
useEffect(() => {
console.log('editObj',editObj);
if (editObj.id) {
let departmentList = []
for (let i = 0; i < pepList.length; i++) {

4
web/client/src/sections/problem/components/inspection.jsx

@ -26,12 +26,10 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
const api = useRef();
const unfoldApi = useRef(false);
// console.log(pictureData);
useEffect(() => {
dispatch(problem.getProjectPoms()).then((res) => {
// console.log(res.payload.data);
if (res.success) {
let project = []
let apply = []
@ -66,7 +64,6 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
useEffect(() => {
dispatch(problem.getAlarmLnspection(checkPatrol)).then((res) => {
// console.log(res.payload.data)
if (res.success) {
setPatrolAbnormal(res.payload.data)
setNotRead(res.payload.data.filter(v => !v.notedTime).length)
@ -306,7 +303,6 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
<img src={`/assets/images/problem/link.png`}
style={{ width: 16, height: 16, marginLeft: 6 }}
onClick={() => {
console.log(pictureData);
copy(pictureData?.router || "无相关地址");
Notification.success({
content: "复制成功",

7
web/client/src/sections/problem/components/sideSheet.jsx

@ -23,7 +23,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
if (alarmId) {
dispatch(problem.getAlarmDataDetail({ alarmId: alarmId, ...query })).then((res) => {
if (res?.success) {
console.log(res.payload.data);
setdataSource(res.payload.data);
projectScrollbar = new PerfectScrollbar("#Alarm", {
suppressScrollX: true,
@ -33,8 +32,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
dispatch(problem.getAlarmDataDetailAgg({ alarmId: alarmId })).then((res) => {
if (res?.success) {
let dataSort = res.payload.data || []
// console.log(dataSort);
// moment.duration(videoAfter?.diff(videoFront))._data.milliseconds;
dataSort.sort((a, b) => {
if (moment(a.hours).isBefore(b.hours)) {
return -1
@ -42,7 +39,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
return 1
}
})
// console.log(dataSort);
let data = {
grid: {
left: '5%',
@ -96,9 +92,7 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
}
]
}
// console.log(data);
setOption(data)
// setNvrDetails(res.payload.data);
}
});
}
@ -193,7 +187,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
console.log(currentPage, pageSize);
setQuery({ pageSize: pageSize, page: currentPage - 1 });
}}
/>

21
web/client/src/sections/problem/components/statistics.jsx

@ -5,7 +5,6 @@ import Inspection from "./inspection";
const Statistics = ({ dispatch, actions, route, statistic }) => {
let title = { dataLnterrupt: "DATA ABORTS", dataAbnormal: "DATA ANOMALY", strategyHit: "ALGORITHM&POLICY HIT" }
// console.log(route);
return (
<>{route == 'useAbnormal' ?
<Inspection statistic={statistic} route={route} /> :
@ -16,28 +15,8 @@ const Statistics = ({ dispatch, actions, route, statistic }) => {
<span style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#101531', }}>{statistic[route]}</span>
<span style={{ marginLeft: 6, fontSize: 12, color: "rgb(150, 151, 153)", fontFamily: 'DINExp' }}>{title[route]}</span>
</div>
{/* <DatePicker
type="dateTimeRange"
style={{ width: 405 }}
// defaultPickerValue={[new Date('2022-08-08 00:00'), new Date('2022-08-09 12:00')]}
value={[new Date('2022-08-08 00:00'), new Date('2022-08-09 00:00')]}
prefix='统计时段:'
onChange={console.log}
/> */}
<div style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#BDDBFC' }}><img src="/assets/images/problem/keyboard.png" style={{ width: 30, height: 17, marginRight: 10 }} />开发中敬请期待</div>
</div>
{/* <div style={{ width: '100%', display: 'flex', justifyContent: 'space-around', marginTop: 8 }}> */}
{/* <div style={{ width: 'calc(25% - 20px)', height: 126, backgroundColor: '#F2F3F5', display: 'flex', justifyContent: 'center', alignItems: 'center' }}></div>
<div style={{ width: 'calc(25% - 20px)', height: 126, backgroundColor: '#F2F3F5', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>暂未开放敬请期待</div>
<div style={{ width: 'calc(25% - 20px)', height: 126, backgroundColor: '#F2F3F5', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>暂未开放敬请期待</div>
<div style={{ width: 'calc(25% - 20px)', height: 126, backgroundColor: '#F2F3F5', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>暂未开放敬请期待</div> */}
{/* </div> */}
{/* <div style={{ fontSize: 32, fontFamily: 'YouSheBiaoTiHei', fontWeight: 500, color: '#005ABD', textIndent:60, lineHeight: '156px', background: 'url(/assets/images/problem/await.png)', backgroundSize: '100% 100%', backgroundRepeat: 'no-repeat', width: 'calc(100% - 40px)', height: 156, margin: '0 0 0 10px' }}>
暂未开放 敬请期待
</div> */}
<img src="/assets/images/problem/bitmap.png" style={{ width: 'calc(100%)', height: 196, }} />
</div >

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

@ -22,12 +22,10 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
switch (route) {
case 'useAbnormal':
dispatch(problem.getAlarmLnspectionApi({ ...search, pepProjectId: '' })).then((res) => {
// console.log(res.payload.data)
if (res.success) {
let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" }
let tableDatas = res.payload.data?.rows.map(v => ({
key: v.id,
// serialNumber: v.serialNumber,
projectName: v.app?.projectCorrelations?.map(r => (r.name ? { name: r.name, state: 'PMOS' } : {
name: r.pepProject?.project_name, state: r.pepProject?.construction_status
}))?.filter(c => c),
@ -41,7 +39,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
type: v.type ? typeData[v.type] : "",
confirm: v.confirm,
}))
// console.log(tableDatas);
setCount(tableDatas?.length || 0);
setTableData(tableDatas)
}
@ -58,7 +55,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
dispatch(problem.getAlarmVideoList({ ...search, pepProjectId: '' })).then((res) => {
if (res.success) {
// console.log(res);
let tableDatas = res.payload.data?.map(v => ({
key: v.alarmId,
StructureName: v.struc,
@ -71,7 +67,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
SourceName: v.cameraName,
yingshiToken: v.yingshiToken,
AlarmContent: v.statusDescribe,
// State: v.State,
station: v.station || [],
resolve: v.resolve || [],
cameraChannelNo: v.cameraChannelNo,
@ -82,7 +77,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
confirm: v.confirmedContent,
camerOnline: v.camerOnline,
}))
// console.log(tableDatas);
setCount(tableDatas?.length || 0);
setTableData(tableDatas)
}
@ -91,25 +85,21 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
default:
dispatch(problem.getAlarmDataGroup()).then((res) => {
if (res.success) {
// 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({ ...query, ...search, groupId: data.map(v => v.id).join(), pepProjectId: '' })).then((res) => {
console.log(res);
if (res.success) {
setCount(res.payload.data?.count || 0)
let tableDatas = res.payload.data?.rows?.map(v => ({
@ -124,7 +114,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
SourceName: v.SourceName,
AlarmGroupUnit: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
Strategy: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
type: route == 'deviceAbnormal' ? v.DeviceStatus == 0 ? "离线" : "在线" : v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
type: route == 'deviceAbnormal' ? v.DeviceStatus == 0 ? "离线" : '' : v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
cameraKindId: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
AlarmCodeName: v.AlarmCodeName,
CurrentLevel: v.CurrentLevel,
@ -135,7 +125,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
confirm: v.confirmedContent,
station: v.StructureLongitude && v.StructureLatitude ? v.StructureLongitude + '. ' + v.StructureLatitude : "",
}))
// console.log(tableDatas);
setTableData(tableDatas)
}
})
@ -148,7 +137,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
}, [query, search])
// console.log(tableData.slice(query.page * query.limit, (query.page + 1) * query.limit));
return (
<>
@ -164,7 +152,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
<div style={{ display: "flex", marginBottom: 16, }}>
<Form
onSubmit={(values) => console.log(values)}
// onValueChange={values=>console.log(values)}
getFormApi={(formApi) => (api.current = formApi)}
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
@ -220,9 +207,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
label={collectData.common.name + ':'}
field={collectData.common.field}
key={collectData.common.field}
// defaultPickerValue={['2022-08-08 00:00'), new Date('2022-08-09 12:00')]}
// initValue={[new Date('2022-08-08 00:00'), new Date()]}
onChange={(v) => console.log(v)}
// onChange={(v) => console.log(v)}
/>)
return frame
})()}
@ -245,16 +230,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
style={{ width: 80, height: 32, borderRadius: 3, }}
onClick={() => {
api.current.validate().then((v) => {
// console.log(v);
// console.log({
// state: v.state,
// keywordTarget: v.keywordTarget,
// keyword: v.keyword,
// groupUnitId: v.groupUnitId,
// sustainTimeStart: v.time ? moment(v.time[0]).format("YYYY-MM-DD HH:mm:ss") : "",
// sustainTimeEnd: v.time ? moment(v.time[1]).format("YYYY-MM-DD HH:mm:ss") : "",
// });
console.log(v);
setSearch({
state: v.state,
keywordTarget: v.keywordTarget,
@ -285,7 +260,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
<Table
columns={exhibition}
dataSource={route == 'useAbnormal' || route == 'videoAbnormal' ? tableData.slice(query.page * query.limit, (query.page + 1) * query.limit) || [] : tableData}
// dataSource={[{ key: '1' }]}
bordered={false}
empty="暂无数据"
style={{}}
@ -302,13 +276,13 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
// name: record.name,
}),
onSelect: (record, selected) => {
console.log(`select row: ${selected}`, record);
// console.log(`select row: ${selected}`, record);
},
// onSelectAll: (selected, selectedRows) => {
// console.log(`select all rows: ${selected}`, selectedRows);
// },
onChange: (selectedRowKeys, selectedRows) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setSelected(selectedRows?.map(v => v.key))
},
}}
@ -358,7 +332,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
// page.current = currentPage - 1
}}
/>
</div> : ""}

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

@ -250,7 +250,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
{ name: '产生次数', sort: 19, value: 'detailCount', render: (_, r, index) => r.detailCount + '次' },
{
name: '确认信息', sort: 20, value: 'confirm', render: (_, r, index) => {
return r.State == 3 ? '无' : r.State == 4 ? r.confirm || '无' : r.confirm || '未确认'
return r.State == 3 ? '无' : r.State == 4 ? r.confirm || '无' : r.confirmTime ? r.confirm : '未确认'
}
},
{ name: '确认/恢复时间', sort: 21, value: 'confirmTime', render: (_, r, index) => <div style={{ width: 130 }}>{r.confirmTime ? r.confirmTime : "无"}</div> },
@ -518,7 +518,6 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
{videoModal ? <Modal
visible={true}
// videoData
header={null}
footer={null}
size={'large'}

2
web/client/src/sections/service/containers/emPush.jsx

@ -65,7 +65,7 @@ const EmPush = (props) => {
useEffect(() => {
attribute();
dispatch(service.getPush(query)).then((res) => {//
console.log('res.payload.datares.payload.data',res.payload.data);
// console.log('res.payload.datares.payload.data',res.payload.data);
// setAnxincloudList(res.payload.data)
})
// dispatch(install.getProjectPmanage(query)).then((res) => {//PEP

Loading…
Cancel
Save