| | |
| | | }) |
| | | } |
| | | |
| | | if (_config.type === 'user') { |
| | | if (_config.tab) { |
| | | _config.tab.linkTab = '' |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | openEdition: menu.open_edition || '', |
| | | optionLibs: optionLibs, |
| | |
| | | {color: 'orange', remark: '系统异常,请及时处理!'}, |
| | | {color: 'yellow', remark: '您的订单异常,请联系客服!'}, |
| | | {color: 'green', remark: '您的订单已完成。'}, |
| | | {color: 'lightgreen', remark: '消息已发送,请及时查收。'}, |
| | | {color: 'cyan', remark: '您有一条新的消息。'}, |
| | | {color: 'blue', remark: '任务未完成,请注意后续工作。'}, |
| | | {color: 'purple', remark: '您有新的任务等待处理!'} |
| | | {color: 'purple', remark: '您有新的任务等待处理!'}, |
| | | {color: 'gray', remark: '您有一封未读邮件。'} |
| | | ] |
| | | let mockdata = [] |
| | | |
| | |
| | | this.menuformRef.handleConfirm().then(res => { |
| | | if (config.isAdd) { |
| | | config.search = config.search.filter(item => !item.origin) |
| | | } |
| | | |
| | | if (config.type === 'user') { // 使用已有菜单时,默认添加关联标签id |
| | | if (config.tab && !config.tab.linkTab) { |
| | | config.tab.linkTab = Utils.getuuid() |
| | | } |
| | | } |
| | | |
| | | let _LongParam = '' |
| | |
| | | */ |
| | | verifyconfig = (config) => { |
| | | let hasKey = false |
| | | let chartcols = [] |
| | | let cols = [] |
| | | config.columns.forEach(col => { |
| | | if (col.field) { |
| | | chartcols.push(col.field) |
| | | cols.push(col.field) |
| | | } |
| | | if (config.setting.primaryKey === col.field) { |
| | | hasKey = true |
| | | } |
| | | }) |
| | | |
| | | let calvaild = true |
| | | if (!cols.includes(config.calendar.startfield)) { |
| | | calvaild = false |
| | | } else if (!cols.includes(config.calendar.endfield)) { |
| | | calvaild = false |
| | | } else if (!cols.includes(config.calendar.colorfield)) { |
| | | calvaild = false |
| | | } else if (!cols.includes(config.calendar.remarkfield)) { |
| | | calvaild = false |
| | | } |
| | | |
| | | if (config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.default !== 'false' && !config.setting.dataresource) { |
| | | return '菜单尚未设置数据源,不可启用!' |
| | |
| | | return '菜单尚未设置主键,不可启用!' |
| | | } else if (!hasKey) { |
| | | return '显示列中不存在主键字段,不可启用!' |
| | | } else if (!calvaild) { |
| | | return '日历关联字段未设置,不可启用!' |
| | | } else { |
| | | return true |
| | | } |
| | |
| | | const { activeKey, config, tabviews, mockdata, mockloading } = this.state |
| | | |
| | | return ( |
| | | <div className="model-subtable-board"> |
| | | <div className="model-calendar-board"> |
| | | <DndProvider backend={HTML5Backend}> |
| | | {/* 工具栏 */} |
| | | <div className="tools"> |