| | |
| | | * @description 表单删除并刷新 |
| | | */ |
| | | closeForm = (card) => { |
| | | let _this = this |
| | | let that = this |
| | | |
| | | confirm({ |
| | | content: `确定删除${card.label ? `<<${card.label}>>` : ''}吗?`, |
| | | onOk() { |
| | | let _group = fromJS(_this.state.group).toJS() |
| | | let _group = fromJS(that.state.group).toJS() |
| | | _group.fields = _group.fields.filter(item => item.uuid !== card.uuid) |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | group: _group, |
| | | }) |
| | | _this.resetConfig(_group) |
| | | that.resetConfig(_group) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | const { config, originConfig } = this.state |
| | | |
| | | if (!is(fromJS(config), fromJS(originConfig))) { |
| | | let _this = this |
| | | let that = this |
| | | confirm({ |
| | | content: '配置信息未保存,确定返回吗?', |
| | | onOk() { |
| | | _this.props.handleBack() |
| | | that.props.handleBack() |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | } |
| | | |
| | | closeGroup = (g) => { |
| | | const _this = this |
| | | const that = this |
| | | let _group = fromJS(this.state.group).toJS() |
| | | _group.groups = _group.groups.filter(item => item.uuid !== g.uuid) |
| | | |
| | | confirm({ |
| | | content: `确定删除分组《${g.wrap.name}》吗?`, |
| | | onOk() { |
| | | _this.setState({ group: _group }) |
| | | _this.resetConfig(_group) |
| | | that.setState({ group: _group }) |
| | | that.resetConfig(_group) |
| | | }, |
| | | onCancel() {} |
| | | }) |