|
@@ -1,30 +1,34 @@
|
|
|
import React from "react";
|
|
|
+import { Spin } from "antd";
|
|
|
import { connect } from "dva";
|
|
|
import WorldMap from "./WorldMap";
|
|
|
import styles from "../styles/common.less";
|
|
|
|
|
|
const MapContainer = ({
|
|
|
data,
|
|
|
- options,
|
|
|
- current,
|
|
|
loading,
|
|
|
- currentSite,
|
|
|
- dispatch,
|
|
|
}) => {
|
|
|
const parseData = (mapData) => {
|
|
|
return mapData.map((item) => ({
|
|
|
name: item.city,
|
|
|
- value: [item.longitude ?? 116.4074, item.latitude ?? 39.9042, item.memberNum],
|
|
|
+ value: [
|
|
|
+ item.longitude ?? 116.4074,
|
|
|
+ item.latitude ?? 39.9042,
|
|
|
+ item.memberNum,
|
|
|
+ ],
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
- <div className={styles.common}>
|
|
|
- <WorldMap data={parseData(data)} />
|
|
|
- </div>
|
|
|
+ <Spin spinning={loading}>
|
|
|
+ <div className={styles.common}>
|
|
|
+ <WorldMap data={parseData(data)} />
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
);
|
|
|
};
|
|
|
|
|
|
export default connect(({ bigscreen }) => ({
|
|
|
data: bigscreen.mapContainerData.data,
|
|
|
+ loading: bigscreen.mapContainerData.loading
|
|
|
}))(MapContainer);
|