| | |
| | | if (subConfig) { |
| | | _config = subConfig |
| | | } else { |
| | | _config = JSON.parse(JSON.stringify(BaseConfig)) |
| | | _config = fromJS(BaseConfig).toJS() |
| | | } |
| | | |
| | | if (!_config.setting.title) { |
| | |
| | | // 主菜单已有选择的表名,模态框没有表名时,复制主菜单表名 |
| | | _config.tables = _config.tables.length === 0 ? _menu.tables : _config.tables |
| | | |
| | | let _source = JSON.parse(JSON.stringify(SearchItems)) |
| | | let _source = fromJS(SearchItems).toJS() |
| | | if (!!this.props.editTab) { |
| | | _source.push({ |
| | | type: 'form', |
| | |
| | | source: _source, |
| | | config: _config, |
| | | selectedTables: _config.tables || [], |
| | | originConfig: JSON.parse(JSON.stringify(_config)), |
| | | originConfig: fromJS(_config).toJS(), |
| | | modalformlist: [ |
| | | { |
| | | type: 'text', |
| | |
| | | * 3、新增表单时,直接打开编辑框 |
| | | */ |
| | | handleList = (list, group, elementId, newcard) => { |
| | | let _config = JSON.parse(JSON.stringify(this.state.config)) |
| | | let _config = fromJS(this.state.config).toJS() |
| | | |
| | | if (!group && !elementId) { |
| | | // 没有分组时(拖拽添加) |
| | |
| | | */ |
| | | handleForm = (_card) => { |
| | | const { menu, tabConfig, subTabConfig } = this.props |
| | | let card = JSON.parse(JSON.stringify(_card)) |
| | | let card = fromJS(_card).toJS() |
| | | const { config } = this.state |
| | | let _inputfields = [] |
| | | let _linkableFields = [] |
| | |
| | | */ |
| | | handleSubmit = () => { |
| | | this.formRef.handleConfirm().then(res => { |
| | | let _config = JSON.parse(JSON.stringify(this.state.config)) |
| | | let _config = fromJS(this.state.config).toJS() |
| | | let fieldrepet = false // 字段重复 |
| | | let labelrepet = false // 提示文字重复 |
| | | |
| | |
| | | confirm({ |
| | | content: `确定删除<<${card.label}>>吗?`, |
| | | onOk() { |
| | | let _config = JSON.parse(JSON.stringify(_this.state.config)) |
| | | let _config = fromJS(_this.state.config).toJS() |
| | | |
| | | if (_config.groups.length > 0) { |
| | | _config.groups.forEach(group => { |
| | |
| | | }) |
| | | } |
| | | |
| | | let _config = JSON.parse(JSON.stringify(this.state.config)) |
| | | let _config = fromJS(this.state.config).toJS() |
| | | |
| | | let cards = this.refs.searchcard.state.selectCards |
| | | let columns = new Map() |
| | |
| | | confirm({ |
| | | content: `确定删除分组<<${group.label}>>吗?`, |
| | | onOk() { |
| | | let _config = JSON.parse(JSON.stringify(_this.state.config)) |
| | | let _config = fromJS(_this.state.config).toJS() |
| | | _config.groups = _config.groups.filter(item => !(item.uuid === group.uuid)) |
| | | let _length = _config.groups.length |
| | | |
| | |
| | | } |
| | | |
| | | handleGroupSave = () => { |
| | | let _group = JSON.parse(JSON.stringify(this.state.curgroup)) |
| | | let config = JSON.parse(JSON.stringify(this.state.config)) |
| | | let _group = fromJS(this.state.curgroup).toJS() |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | this.groupRef.handleConfirm().then(res => { |
| | | _group = {..._group, ...res.target} |
| | |
| | | this.setState({ |
| | | config: res.content |
| | | }) |
| | | this.handleForm(res.newform) |
| | | } |
| | | } |
| | | |