|
|
@ -14,12 +14,11 @@ import Weather from '../components/weather' |
|
|
|
import Gis from './gis'; |
|
|
|
import moment from 'moment'; |
|
|
|
import './style.less' |
|
|
|
import { RouteRequest } from '@peace/utils'; |
|
|
|
|
|
|
|
function homePage(props) { |
|
|
|
const { dispatch, actions } = props; |
|
|
|
const { |
|
|
|
getPcode, waterLogin, getWaterLevelTrend, getWaterStructures, getWaterVideoList, getYsAccessToken, getWaterAlarms, |
|
|
|
waterLogin, getWaterLevelTrend, getWaterStructures, getWaterVideoList, getYsAccessToken, getWaterAlarms, |
|
|
|
worksafetyLogin, getEmerOrgList, getEmerTeamList, getEmerExpertList, getEmerMedicalList, getEmerRefugeList |
|
|
|
} = actions.waterprevention; |
|
|
|
const childStyle = { height: '49%', color: '#fff', marginBottom: 17 } |
|
|
@ -46,9 +45,7 @@ function homePage(props) { |
|
|
|
|
|
|
|
const getData = () => { |
|
|
|
// 水务
|
|
|
|
RouteRequest.get(`/_waterweb/get/pcode`).then((res) => { |
|
|
|
if (res.pcode) { |
|
|
|
dispatch(waterLogin({ username: "123456", password: "123456", pcode: res.pcode })).then(loginRes => { |
|
|
|
dispatch(waterLogin({ username: "123456", password: "123456", pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c' })).then(loginRes => { |
|
|
|
if (loginRes.success) { |
|
|
|
const { token } = loginRes.payload.data; |
|
|
|
sessionStorage.setItem('waterUser', JSON.stringify(loginRes.payload.data)); |
|
|
@ -128,8 +125,6 @@ function homePage(props) { |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 安监
|
|
|
|
dispatch(worksafetyLogin({ p: 'anjianshidian', username: 'SuperAdmin', password: '123456' })).then(res => { |
|
|
|
if (res.success) { |
|
|
|