薪资项目公式测试功能修改

This commit is contained in:
黎永顺 2023-05-26 15:51:05 +08:00
parent ea830a6315
commit f914a9ee46
1 changed files with 4 additions and 8 deletions

View File

@ -341,9 +341,9 @@ export default class FormalFormModal extends React.Component {
const title = <div className="formulaTitleWrapper"> const title = <div className="formulaTitleWrapper">
<div>{`${(this.props.valueType == 2 || this.props.valueType === "FORMULA") ? "函数" : "SQL"}公式`}</div> <div>{`${(this.props.valueType == 2 || this.props.valueType === "FORMULA") ? "函数" : "SQL"}公式`}</div>
{ {
!_.isEmpty(this.parameters) && <Button type="primary" onClick={() => { !_.isEmpty(value) && <Button type="primary" onClick={() => {
const isSaveBool = _.every(this.parameters, it => !!it.id); const isSaveBool = _.every(this.parameters, it => !!it.id);
if (isSaveBool && value === formula) { if (value === formula) {
this.setState({ testVisible: true }); this.setState({ testVisible: true });
} else { } else {
message.info("请先保存公式后再进行测试"); message.info("请先保存公式后再进行测试");
@ -359,15 +359,11 @@ export default class FormalFormModal extends React.Component {
</div>; </div>;
return ( return (
<WeaDialog <WeaDialog
title={title} title={title} hasScroll scalable className="formula-wrapper" initLoadCss
hasScroll visible={this.props.visible} style={{ width: 1000 }}
visible={this.props.visible}
style={{ width: 1000 }}
buttons={[ buttons={[
<Button type="primary" onClick={this.handleSave}>保存</Button> <Button type="primary" onClick={this.handleSave}>保存</Button>
]} ]}
className="formula-wrapper"
initLoadCss
onCancel={() => { onCancel={() => {
this.props.onCancel(); this.props.onCancel();
}}> }}>