/** * 绘制矢量图 */ import React, { Component } from "react"; import { Row, Col } from "antd"; import "./index.less"; import { connect } from "dva"; @connect((state) => ({ selectedId: state.command.personList.selectedId })) export default class Vectorgraph extends Component { constructor(props) { super(props); this.state = { paintValue: props.paintValue, }; } componentDidMount() {} componentWillReceiveProps(nextPorps) { // console.log(nextPorps) this.setState({ paintValue: nextPorps.paintValue, }); } //把点击的状态值返回给上级 returnParent(selectValue) { this.props.changeSelect(selectValue); if (this.props.selectedId) { this.props.dispatch({ type: "command/setPersonSelectIndex", payload: null, }); this.props.dispatch({ type: "command/clearInfoWindow", payload: true, }); } } render() { // console.log(this.state.paintValue) return (