| | |
| | | |
| | | sessionStorage.setItem('isEditState', 'true') |
| | | |
| | | class Mobile extends Component { |
| | | class MenuDesign extends Component { |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | MenuId: this.props.match.params.MenuId, |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | |
| | | this.getMenuParam() |
| | | // this.testFunc() |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (openEdition) { // 版本管理 |
| | |
| | | } |
| | | |
| | | config.components.forEach(item => { |
| | | if (!error && (!item.setting || !item.setting.dataresource)) { |
| | | error = `组件《${item.setting.name}》未设置数据源` |
| | | if (!error && item.setting) { |
| | | if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) { |
| | | error = `组件《${item.setting.name}》未设置数据源` |
| | | } else if (item.setting.interType === 'system' && item.setting.execute === 'false' && item.scripts.length === 0) { |
| | | error = `组件《${item.setting.name}》未设置数据源` |
| | | } else if (item.setting.interType && !item.setting.primaryKey) { |
| | | error = `组件《${item.setting.name}》未设置主键` |
| | | } |
| | | } |
| | | }) |
| | | |
| | |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['mob.save']}</Button> |
| | | </div> |
| | | } style={{ width: '100%' }}> |
| | | {config && config.components ? <MenuShell config={config} handleList={this.updateConfig} deleteCard={this.deleteCard} /> : null} |
| | | {/* {config && config.components ? <MenuShell menu={config} handleList={this.updateConfig} deleteCard={this.deleteCard} /> : null} */} |
| | | {config && config.components ? <MenuShell name="Glass" menu={config} handleList={this.updateConfig} deleteCard={this.deleteCard} /> : null} |
| | | </Card> |
| | | </div> |
| | | </div> |
| | |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(Mobile) |
| | | export default connect(mapStateToProps, mapDispatchToProps)(MenuDesign) |