产品-公式编辑器修改
This commit is contained in:
parent
d4cfca1eda
commit
67ef55da46
|
|
@ -117,7 +117,7 @@ class CodeAction extends Component {
|
|||
const variableDatalist = _.filter(variableList, it => it.value.indexOf(variableText) !== -1);
|
||||
const funcDatalist = _.map(funcList, it => ({
|
||||
...it,
|
||||
children: _.filter(it.children, child => _.lowerCase(child.name).indexOf(funcText) !== -1)
|
||||
children: _.filter(it.children, child => _.lowerCase(child.name).indexOf(_.lowerCase(funcText)) !== -1)
|
||||
}));
|
||||
return (
|
||||
<div className="excel-codeAction">
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export default class FormalFormModal extends React.Component {
|
|||
validateType: "",
|
||||
returnType: "",
|
||||
value: "",
|
||||
formula: "",
|
||||
extendParam: {
|
||||
isCustomFunction: "0",
|
||||
sqlReturnKey: "",
|
||||
|
|
@ -66,6 +67,7 @@ export default class FormalFormModal extends React.Component {
|
|||
}
|
||||
this.setState({
|
||||
value: data.formula,
|
||||
formula: data.formula,
|
||||
returnType: data.returnType,
|
||||
validateType: data.validateType
|
||||
});
|
||||
|
|
@ -335,14 +337,13 @@ export default class FormalFormModal extends React.Component {
|
|||
render() {
|
||||
const { salaryItemStore } = this.props;
|
||||
const { searchGroup, searchFields } = salaryItemStore;
|
||||
const { value, formulaDatasourceList, extendParam, testVisible, showTestVal, groupParams } = this.state;
|
||||
const { value, formula, formulaDatasourceList, extendParam, testVisible, showTestVal, groupParams } = this.state;
|
||||
const title = <div className="formulaTitleWrapper">
|
||||
<div>{`${(this.props.valueType == 2 || this.props.valueType === "FORMULA") ? "函数" : "SQL"}公式`}</div>
|
||||
{
|
||||
!_.isEmpty(this.parameters) && <Button type="primary" onClick={() => {
|
||||
const isSaveBool = _.every(this.parameters, it => !!it.id);
|
||||
console.log("parameters", this.parameters);
|
||||
if (isSaveBool) {
|
||||
if (isSaveBool && value === formula) {
|
||||
this.setState({ testVisible: true });
|
||||
} else {
|
||||
message.info("请先保存公式后再进行测试");
|
||||
|
|
|
|||
Loading…
Reference in New Issue