import React from "react"; import { Button } from "antd"; import { WeaDialog, WeaInput, WeaSearchGroup, WeaTable, WeaTextarea } from "ecCom"; import { inject, observer } from "mobx-react"; import "./index.less"; @inject("ledgerStore") @observer export default class TestModal extends React.Component { constructor(props) { super(props); this.state = { testValue: [], showResults: "显示结果" }; } componentWillReceiveProps(nextProps, nextContext) { if (nextProps.parameters) { this.setState({ testValue: nextProps.parameters }); } if (nextProps.showTestVal !== this.props.showTestVal && !_.isNil(nextProps.showTestVal)) { this.setState({ showResults: nextProps.showTestVal }); } } renderInputItem = () => { const { onChangeTestValue } = this.props; const { testValue } = this.state; const dataSource = !_.isEmpty(testValue) ? _.map(testValue, item => { return { ...item, paramsName: item.fieldName.replace(/[{}]/g, "") }; }) : []; const columns = [ { dataIndex: "paramsName", title: "参数名" }, { dataIndex: "content", title: "测试值", render: (text, record) => { return ( onChangeTestValue(record, val)} /> ); } } ]; return ; }; render() { const { visible, onCancel, testParams, onImplement } = this.props; const { showResults } = this.state; return ( 执行 ]}>
{this.renderInputItem()}
); } } const TestTip = () => { return
涉及到选择具体数据进行运算时,请先检查对应数据源中是否有数据项;
涉及到日期控件时,请先选择日期控件的格式,保持和控件本身设置的格式一致,否则可能会导致预期与实际执行结果不一致;
涉及到日期控件判断与预期不符合时,请先检查日期控件的格式是否与等号右边的格式保持一致;
; };