| | |
| | | * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单 |
| | | */ |
| | | UNSAFE_componentWillMount () { |
| | | const { menu } = this.props |
| | | const { menu, type } = this.props |
| | | |
| | | let _LongParam = menu.LongParam |
| | | let _config = '' |
| | | if (this.props.type === 'add' || !_LongParam) { |
| | | let _type = type |
| | | |
| | | if (_type === 'add' || !_LongParam) { |
| | | _type = 'add' |
| | | _config = JSON.parse(JSON.stringify((Source.baseConfig))) |
| | | } else { |
| | | let _setting = Source.baseConfig.setting |
| | |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | | operaType: this.props.type, |
| | | operaType: _type, |
| | | originMenu: JSON.parse(JSON.stringify({...menu})), |
| | | selectedTables: _config.tables || [], |
| | | menuformlist: [ |
| | |
| | | value: 'datemonth', |
| | | text: this.state.dict['header.form.datemonth'] |
| | | }, { |
| | | value: 'dateyear', |
| | | text: this.state.dict['header.form.dateyear'] |
| | | value: 'daterange', |
| | | text: this.state.dict['header.form.daterange'] |
| | | }] |
| | | }, |
| | | { |
| | |
| | | return item |
| | | } |
| | | }) |
| | | _config[res.type] = _config[res.type].filter(item => !item.origin) |
| | | // _config[res.type] = _config[res.type].filter(item => !item.origin) |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | item.match = textmatch[cell.datatype] |
| | | } else if (cell.type === 'select') { |
| | | item.match = selectmatch[cell.datatype] |
| | | } else if (cell.type === 'date') { |
| | | } else if (cell.type === 'daterange') { |
| | | item.match = datematch[cell.datatype] |
| | | } |
| | | |
| | | item.type = cell.type |
| | | item.initval = '' |
| | | items.push(item) |
| | | } |
| | |
| | | _match = textmatch[item.datatype] |
| | | } else if (item.type === 'select') { |
| | | _match = selectmatch[item.datatype] |
| | | } else if (item.type === 'date') { |
| | | } else if (item.type === 'daterange') { |
| | | _match = datematch[item.datatype] |
| | | } |
| | | |