巴林闲侠 2 years ago
parent
commit
90b2e67adb
  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 tableList
} = props; } = props;
console.log(tableType,
tableList);
const [check, setCheck] = useState([]); const [check, setCheck] = useState([]);
const checkboxcss = { width: "25%", height: 16, margin: "0 0 20px 0" }; 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 使 // websocket 使
// useEffect(() => { // useEffect(() => {
// console.log(socket)
// if (socket) { // if (socket) {
// socket.on('TEST', function (msg) { // socket.on('TEST', function (msg) {
// console.info(msg); // console.info(msg);

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

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

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

@ -23,7 +23,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
if (alarmId) { if (alarmId) {
dispatch(problem.getAlarmDataDetail({ alarmId: alarmId, ...query })).then((res) => { dispatch(problem.getAlarmDataDetail({ alarmId: alarmId, ...query })).then((res) => {
if (res?.success) { if (res?.success) {
console.log(res.payload.data);
setdataSource(res.payload.data); setdataSource(res.payload.data);
projectScrollbar = new PerfectScrollbar("#Alarm", { projectScrollbar = new PerfectScrollbar("#Alarm", {
suppressScrollX: true, suppressScrollX: true,
@ -33,8 +32,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
dispatch(problem.getAlarmDataDetailAgg({ alarmId: alarmId })).then((res) => { dispatch(problem.getAlarmDataDetailAgg({ alarmId: alarmId })).then((res) => {
if (res?.success) { if (res?.success) {
let dataSort = res.payload.data || [] let dataSort = res.payload.data || []
// console.log(dataSort);
// moment.duration(videoAfter?.diff(videoFront))._data.milliseconds;
dataSort.sort((a, b) => { dataSort.sort((a, b) => {
if (moment(a.hours).isBefore(b.hours)) { if (moment(a.hours).isBefore(b.hours)) {
return -1 return -1
@ -42,7 +39,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
return 1 return 1
} }
}) })
// console.log(dataSort);
let data = { let data = {
grid: { grid: {
left: '5%', left: '5%',
@ -96,9 +92,7 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
} }
] ]
} }
// console.log(data);
setOption(data) setOption(data)
// setNvrDetails(res.payload.data);
} }
}); });
} }
@ -193,7 +187,6 @@ function SideSheets ({ dispatch, actions, close, alarmId }) {
currentPage={query.page + 1} currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]} pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => { onChange={(currentPage, pageSize) => {
console.log(currentPage, pageSize);
setQuery({ pageSize: pageSize, page: currentPage - 1 }); 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 }) => { const Statistics = ({ dispatch, actions, route, statistic }) => {
let title = { dataLnterrupt: "DATA ABORTS", dataAbnormal: "DATA ANOMALY", strategyHit: "ALGORITHM&POLICY HIT" } let title = { dataLnterrupt: "DATA ABORTS", dataAbnormal: "DATA ANOMALY", strategyHit: "ALGORITHM&POLICY HIT" }
// console.log(route);
return ( return (
<>{route == 'useAbnormal' ? <>{route == 'useAbnormal' ?
<Inspection statistic={statistic} route={route} /> : <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={{ 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> <span style={{ marginLeft: 6, fontSize: 12, color: "rgb(150, 151, 153)", fontFamily: 'DINExp' }}>{title[route]}</span>
</div> </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 style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#BDDBFC' }}><img src="/assets/images/problem/keyboard.png" style={{ width: 30, height: 17, marginRight: 10 }} />开发中敬请期待</div>
</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, }} /> <img src="/assets/images/problem/bitmap.png" style={{ width: 'calc(100%)', height: 196, }} />
</div > </div >

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

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

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

@ -65,7 +65,7 @@ const EmPush = (props) => {
useEffect(() => { useEffect(() => {
attribute(); attribute();
dispatch(service.getPush(query)).then((res) => {// 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) // setAnxincloudList(res.payload.data)
}) })
// dispatch(install.getProjectPmanage(query)).then((res) => {//PEP // dispatch(install.getProjectPmanage(query)).then((res) => {//PEP

Loading…
Cancel
Save