import { WeaOrgTree, } from 'ecCom'; export default class OrgTree extends React.Component { constructor(props) { super(props); this.tree = null; this.setRef = element => { this.tree = element; } } componentWillReceiveProps(nextProps) { if (this.props.triggerRefresh !== nextProps.triggerRefresh) { this.init(); } } componentDidMount() { this.init() } init = () => { if (this.tree) this.tree.reset(() => this.tree.fetchData()); } render() { const { ORGTREE } = this.props; return (