Browse Source

注释 getConsoleCount

dev
巴林闲侠 2 years ago
parent
commit
1eaf1d3115
  1. 20
      web/client/src/layout/actions/webSocket.js
  2. 6
      web/client/src/sections/control/containers/control.jsx

20
web/client/src/layout/actions/webSocket.js

@ -22,19 +22,19 @@ export function initWebSocket ({ ioUrl, token, pomsUserId }) {
} }
return dispatch => { return dispatch => {
const socket = io( // const socket = io(
ioUrl // ioUrl
// 'http://10.8.30.7:4000' // // 'http://10.8.30.7:4000'
, { // , {
query: { // query: {
token: token, // token: token,
pomsUserId: pomsUserId // pomsUserId: pomsUserId
}, // },
}); // });
dispatch({ dispatch({
type: INIT_WEB_SOCKET, type: INIT_WEB_SOCKET,
payload: { payload: {
socket: socket socket:null// socket
} }
}) })
} }

6
web/client/src/sections/control/containers/control.jsx

@ -105,9 +105,9 @@ const Control = (props) => {
if (pepProjectId) setProjectId(pepProjectId) if (pepProjectId) setProjectId(pepProjectId)
if (!projectId) { if (!projectId) {
// //
await dispatch(control.getConsoleCount({ pepProjectId: pepProjectId })).then(res => { // await dispatch(control.getConsoleCount({ pepProjectId: pepProjectId })).then(res => {
if (res.success) setWorkData(res.payload.data) // if (res.success) setWorkData(res.payload.data)
}) // })
// BI- // BI-
await dispatch(control.getDataAlarmsAggDay({ pepProjectId: pepProjectId })).then(res => { await dispatch(control.getDataAlarmsAggDay({ pepProjectId: pepProjectId })).then(res => {
if (res.success) setDataBI(res.payload.data) if (res.success) setDataBI(res.payload.data)

Loading…
Cancel
Save