import React from 'react'; import { inject, observer} from 'mobx-react'; import {routerShape} from 'react-router'; import {Condition} from '../list/listCondition'; import {WeaErrorPage,WeaTools,WeaTop,WeaRightMenu,WeaLocaleProvider} from 'ecCom'; import {Button} from 'antd'; const getLabel = WeaLocaleProvider.getLabel; @inject("queryTaskStore") @observer class QueryTaskCondition extends React.Component { static contextTypes = { router: routerShape } constructor(props) { super(props); } resetHeight(height){ jQuery(".prj-query-condition").height(height - 60); } componentDidMount() { const {queryTaskStore} = this.props; queryTaskStore.getQueryCondition({},true); } componentWillReceiveProps(nextProps){ if(this.props.location.key !== nextProps.location.key){ const {queryTaskStore} = this.props; queryTaskStore.getQueryCondition({},true); } } render() { const { queryTaskStore } = this.props; const { loading,title, form} = queryTaskStore; // const formParams = form.getFormParams(); //Mobx-form的Bug,form传给子组件时需外层调用下取值,否则查询条件变了组件不会render // const cusFormParams = customForm && customForm.getFormParams(); return (