| | |
| | | modalformlist: null, // 基本信息表单字段 |
| | | formlist: null, // 表单编辑模态框,可编辑字段 |
| | | card: null, // 编辑元素 |
| | | loading: false, // 表单刷新时使用 |
| | | menuloading: false, // 菜单保存中 |
| | | closeloading: false, // 菜单保存中 |
| | | settingVisible: false, // 全局配置模态框 |
| | |
| | | _config.fields = list.filter(item => !item.origin) |
| | | |
| | | this.setState({ |
| | | loading: true, |
| | | config: _config |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | this.handleForm(newcard) |
| | | }) |
| | | } else { |
| | |
| | | }) |
| | | |
| | | this.setState({ |
| | | loading: true, |
| | | config: _config |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | this.handleForm(newcard) |
| | | }) |
| | | } else { |
| | |
| | | }) |
| | | |
| | | this.setState({ |
| | | loading: true, |
| | | config: _config |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | | loading: true, |
| | | visible: false |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | |
| | | |
| | | _this.setState({ |
| | | config: _config, |
| | | loading: true |
| | | }, () => { |
| | | _this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | tableVisible: false, |
| | | loading: true, |
| | | config: _config |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | notification.success({ |
| | | top: 92, |
| | | message: '添加成功', |
| | | duration: 2 |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | _this.setState({ |
| | | config: _config, |
| | | loading: true |
| | | }, () => { |
| | | _this.setState({ |
| | | loading: false |
| | | }) |
| | | config: _config |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | this.setState({ |
| | | groupVisible: false, |
| | | curgroup: '', |
| | | loading: true, |
| | | config: config |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | |
| | | </div> |
| | | <div className="ant-modal-body"> |
| | | <div className="modal-form"> |
| | | {!this.state.loading && config.groups.length > 0 && |
| | | {config.groups.length > 0 && |
| | | config.groups.map(group => { |
| | | return ( |
| | | <div key={group.uuid}> |
| | |
| | | ) |
| | | }) |
| | | } |
| | | {!this.state.loading && config.groups.length === 0 ? |
| | | {config.groups.length === 0 ? |
| | | <DragElement |
| | | list={config.fields} |
| | | setting={config.setting} |