| | |
| | | if (record.extra || this.state.appKeys.includes(record.MenuID)) { |
| | | return <span className={className} style={{color: '#1890ff'}}>{text}</span> |
| | | } else if (record.interfaces === 'true' || record.msg === 'true' || record.pds === 'true') { |
| | | return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中使用了外部接口" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中发送了消息" /> : null}{text}{record.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px'}} title="菜单中使用了公共数据源" /> : null}</span> |
| | | return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中使用了外部接口" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中发送了消息" /> : null}{text}{record.pds === 'true' ? <DatabaseOutlined style={{color: 'orange', marginLeft: '5px'}} title="菜单中使用了公共数据源" /> : null}</span> |
| | | } |
| | | return <span className={className}>{text}</span> |
| | | } |
| | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | let ub = app.user_binding === 'true' && app.userbind ? false : true |
| | | let im = app.instantMessage ? false : true |
| | | |
| | | let menus = result.menus.map(item => { |
| | | item.nodes = '' |
| | |
| | | item.type = pageParam.type |
| | | } |
| | | |
| | | if (item.type === 'navbar' || item.type === 'im') { |
| | | if (item.type === 'navbar') { |
| | | item.backend = 'level1' |
| | | } |
| | | |
| | | if (pageParam.version !== '1.0') { |
| | | item.nodes = '' |
| | | } else if (pageParam.login || pageParam.pass) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'im') { |
| | | item.nodes = '' |
| | | } |
| | | } catch (e) { |
| | |
| | | item.extra = true |
| | | ub = true |
| | | } |
| | | if (app.instantMessage === item.MenuID) { |
| | | item.extra = true |
| | | im = true |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | if (!im) { |
| | | menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.instantMessage, MenuName: '即时通信'}) |
| | | } |
| | | if (!ub) { |
| | | menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.userbind, MenuName: '用户绑定'}) |
| | | } |
| | |
| | | item.nodes = '' |
| | | } else if (pageParam.login || pageParam.pass) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'im') { |
| | | item.nodes = '' |
| | | } |
| | | } catch (e) { |
| | | item.nodes = '' |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (app.instantMessage && item.MenuID === app.instantMessage) { |
| | | route = 'imdesign' |
| | | } |
| | | |
| | | window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`)) |