Commit 27f20218 authored by zhengjiangtao's avatar zhengjiangtao

日常值守数据提到mock文件rczsData

parent 1a93e07d
...@@ -271,4 +271,14 @@ const geoCoordMap = { ...@@ -271,4 +271,14 @@ const geoCoordMap = {
大庆: [125.03, 46.58] 大庆: [125.03, 46.58]
}; };
export { provienceData, geoCoordMap };
//地图标点用
const dmtData = [
{ latitude: 30.67, longitude: 104.07 },
{ latitude: 34.76, longitude: 113.65 },
{ latitude: 29.65, longitude: 91.13 },
{ latitude: 43.82, longitude: 87.62 }
];
export { provienceData, geoCoordMap, dmtData };
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { growthData } from './data'; import { growthData } from './../../../../_mock/rczsData/data';
import CommonCard from '../../../common/commonCard/CommonCard'; import CommonCard from '../../../common/commonCard/CommonCard';
class GrowthStatistics extends Component { class GrowthStatistics extends Component {
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ReactEcharts from 'amos-viz/lib/echarts'; import ReactEcharts from 'amos-viz/lib/echarts';
import { recentData1, recentData2 } from './data'; import { recentData1, recentData2 } from './../../../../_mock/rczsData/data';
import { Button } from 'amos-framework'; import { Button } from 'amos-framework';
import CommonCard from '../../../common/commonCard/CommonCard'; import CommonCard from '../../../common/commonCard/CommonCard';
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { riskFailureData } from './data'; import { riskFailureData } from './../../../../_mock/rczsData/data';
import { OverFlowText } from 'amos-framework'; import { OverFlowText } from 'amos-framework';
import CommonCard from '../../../common/commonCard/CommonCard'; import CommonCard from '../../../common/commonCard/CommonCard';
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactEcharts from 'amos-viz/lib/echarts'; import ReactEcharts from 'amos-viz/lib/echarts';
import { riskTrendData } from './data'; import { riskTrendData } from './../../../../_mock/rczsData/data';
import { Button } from 'amos-framework'; import { Button } from 'amos-framework';
import CommonCard from '../../../common/commonCard/CommonCard'; import CommonCard from '../../../common/commonCard/CommonCard';
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import { SafetyRateData } from './../../../../_mock/rczsData/data';
import { SafetyRateData } from './data'; import { OverFlowText } from 'amos-framework';
import { OverFlowText, Button } from 'amos-framework';
import CommonCard from '../../../common/commonCard/CommonCard'; import CommonCard from '../../../common/commonCard/CommonCard';
/**
* 安全指数top10
*/
class SafetyRate extends Component { class SafetyRate extends Component {
constructor(props) {
super(props);
this.state = {
data: []
};
}
componentDidMount() {
this.querySafetyData();
}
querySafetyData = () => {
this.setState({
data: SafetyRateData
});
};
render() { render() {
let { data } = this.state;
return ( return (
<div className='safety-rate-view common-margin daily-title'> <div className="safety-rate-view common-margin daily-title">
{/* <div className='daily-title-content'> {/* <div className='daily-title-content'>
安全指数 TOP10 安全指数 TOP10
</div> */} </div> */}
<CommonCard title="安全指数 TOP10"> <CommonCard title="安全指数 TOP10">
<div className='top-ten-content' style={{ position: 'relative' }}> <div className="top-ten-content" style={{ position: 'relative' }}>
<div className="content-detail" <div className="content-detail" onClick={this.props.onClick}>
onClick={this.props.onClick}>...</div> ...
{ </div>
SafetyRateData.map((item,index)=> {data.map((item, index) => (
<div className='top-ten-item' key={index}> <div className="top-ten-item">
<OverFlowText> <OverFlowText>
<p style={{ width: '80px' }}>{item.name}</p> <p style={{ width: '80px' }}>{item.name}</p>
</OverFlowText> </OverFlowText>
<div className='top-ten-item-middle'> <div className="top-ten-item-middle">
<div className='top-ten-item-middlelinear' style={{height:8,width:`${item.value}%`}}> </div> <div className="top-ten-item-middlelinear" style={{ height: 8, width: `${item.value}%` }}>
{' '}
</div>
</div> </div>
<div className ='top-ten-item-bottom'> <div className="top-ten-item-bottom">
<span>{item.value}</span> <span>{item.value}</span>
</div> </div>
</div> </div>
) ))}
}
</div> </div>
</CommonCard> </CommonCard>
</div> </div>
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { MapChart } from 'amos-viz/lib/echarts';
import { chainMapData, option123 } from './data';
import echarts from 'echarts/lib/echarts'; import echarts from 'echarts/lib/echarts';
import 'echarts/map/js/china'; import 'echarts/map/js/china';
import geoJson from 'echarts/map/json/china.json'; import geoJson from 'echarts/map/json/china.json';
import { geoCoordMap, provienceData } from './geo'; import { geoCoordMap, provienceData,dmtData } from './../../../../_mock/rczsData/geo';
import CommonCard from '../../../common/commonCard/CommonCard'; import CommonCard from '../../../common/commonCard/CommonCard';
export const dmtData = [
{ latitude: 30.67, longitude: 104.07 },
{ latitude: 34.76, longitude: 113.65 },
{ latitude: 29.65, longitude: 91.13 },
{ latitude: 43.82, longitude: 87.62 }
];
class Statistics extends Component { class Statistics extends Component {
constructor(props) { constructor(props) {
...@@ -26,43 +17,7 @@ class Statistics extends Component { ...@@ -26,43 +17,7 @@ class Statistics extends Component {
} }
initalECharts() { initalECharts() {
const data = [ const data = provienceData;
{ name: '黑龙江', area: '东北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '吉林', area: '东北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '辽宁', area: '东北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '内蒙古', area: '其他', type: 'areaCenterCity', InValue: '0' },
{ name: '北京', area: '华北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '天津', area: '华北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '河北', area: '华北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '山东', area: '华北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '山西', area: '华北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '江苏', area: '华东大区', type: 'areaCenterCity', InValue: '0' },
{ name: '上海', area: '华东大区', type: 'areaCenterCity', InValue: '0' },
{ name: '浙江', area: '华东大区', type: 'areaCenterCity', InValue: '0' },
{ name: '福建', area: '华南大区', type: 'areaCenterCity', InValue: '0' },
{ name: '广东', area: '华南大区', type: 'areaCenterCity', InValue: '0' },
{ name: '海南', area: '华南大区', type: 'areaCenterCity', InValue: '0' },
{ name: '台湾', area: '其他', type: 'areaCenterCity', InValue: '0' },
{ name: '香港', area: '其他', type: 'areaCenterCity', InValue: '0' },
{ name: '澳门', area: '其他', type: 'areaCenterCity', InValue: '0' },
{ name: '河南', area: '华北大区', type: 'areaCenterCity', InValue: '0' },
{ name: '安徽', area: '华中大区', type: 'areaCenterCity', InValue: '0' },
{ name: '江西', area: '华中大区', type: 'areaCenterCity', InValue: '0' },
{ name: '广东', area: '华南大区', type: 'areaCenterCity', InValue: '0' },
{ name: '陕西', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '湖北', area: '华中大区', type: 'areaCenterCity', InValue: '0' },
{ name: '湖南', area: '华中大区', type: 'areaCenterCity', InValue: '0' },
{ name: '广西', area: '华南大区', type: 'areaCenterCity', InValue: '0' },
{ name: '宁夏', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '重庆', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '贵州', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '四川', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '云南', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '甘肃', area: '华西大区', type: 'areaCenterCity', InValue: '0' },
{ name: '青海', area: '其他', type: 'areaCenterCity', InValue: '0' },
{ name: '西藏', area: '其他', type: 'areaCenterCity', InValue: '0' },
{ name: '新疆', area: '其他', type: 'areaCenterCity', InValue: '0' }
];
echarts.registerMap('china', geoJson); echarts.registerMap('china', geoJson);
for (const item of provienceData) { for (const item of provienceData) {
......
This diff is collapsed.
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types';
import GrowthStatistics from './GrowthStatistics'; import GrowthStatistics from './GrowthStatistics';
import RecentStatistics from './RecentStatistics'; import RecentStatistics from './RecentStatistics';
import RiskFailure from './RiskFailure'; import RiskFailure from './RiskFailure';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment