From 140410bca24bd9270fcc35a51daced92b305e6bf Mon Sep 17 00:00:00 2001 From: wenlele Date: Mon, 10 Oct 2022 17:14:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E4=BF=A1=E6=81=AF=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/components/setup.jsx | 2 -- .../analysis/containers/operationData.jsx | 1 - .../install/components/memberModal.jsx | 1 - .../problem/components/inspection.jsx | 4 --- .../sections/problem/components/sideSheet.jsx | 7 ---- .../problem/components/statistics.jsx | 21 ----------- .../sections/problem/components/tableData.jsx | 36 +++---------------- .../sections/problem/containers/dataAlarm.jsx | 3 +- .../sections/service/containers/emPush.jsx | 2 +- 9 files changed, 7 insertions(+), 70 deletions(-) diff --git a/web/client/src/components/setup.jsx b/web/client/src/components/setup.jsx index c4cd070..8465bcf 100644 --- a/web/client/src/components/setup.jsx +++ b/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" }; diff --git a/web/client/src/sections/analysis/containers/operationData.jsx b/web/client/src/sections/analysis/containers/operationData.jsx index 003eb46..57c7a18 100644 --- a/web/client/src/sections/analysis/containers/operationData.jsx +++ b/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); diff --git a/web/client/src/sections/install/components/memberModal.jsx b/web/client/src/sections/install/components/memberModal.jsx index 0ddef9d..ed20739 100644 --- a/web/client/src/sections/install/components/memberModal.jsx +++ b/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++) { diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index 18d2d8a..7c28cb4 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/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 }) => { { - console.log(pictureData); copy(pictureData?.router || "无相关地址"); Notification.success({ content: "复制成功", diff --git a/web/client/src/sections/problem/components/sideSheet.jsx b/web/client/src/sections/problem/components/sideSheet.jsx index a8b119b..391e59f 100644 --- a/web/client/src/sections/problem/components/sideSheet.jsx +++ b/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 }); }} /> diff --git a/web/client/src/sections/problem/components/statistics.jsx b/web/client/src/sections/problem/components/statistics.jsx index 0e8d6cb..518c799 100644 --- a/web/client/src/sections/problem/components/statistics.jsx +++ b/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' ? : @@ -16,28 +15,8 @@ const Statistics = ({ dispatch, actions, route, statistic }) => { {statistic[route]} {title[route]} - {/* */}
开发中,敬请期待!
- {/*
*/} - {/*
暂未开放敬请期待
-
暂未开放敬请期待
-
暂未开放敬请期待
-
暂未开放敬请期待
*/} - - {/*
*/} - - {/*
- 暂未开放 敬请期待 -
*/} - diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index d6fb8ed..6d46872 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/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
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 { - 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 + }} /> : ""} diff --git a/web/client/src/sections/problem/containers/dataAlarm.jsx b/web/client/src/sections/problem/containers/dataAlarm.jsx index d55738f..1ebce4f 100644 --- a/web/client/src/sections/problem/containers/dataAlarm.jsx +++ b/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) =>
{r.confirmTime ? r.confirmTime : "无"}
}, @@ -518,7 +518,6 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb {videoModal ? { 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项目管理项目