| | |
| | | |
| | | const { confirm } = Modal |
| | | const { TreeNode } = Tree |
| | | // const { Paragraph } = Typography |
| | | const { Search } = Input |
| | | |
| | | const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | |
| | | render: (text, record) => ( |
| | | <div> |
| | | <Button type="link" onClick={() => this.deleteMenu(record)} style={{color: '#ff4d4f'}}>删除</Button> |
| | | <Button type="link" onClick={() => this.jumpApp(record)} style={{color: '#1890ff', marginLeft: '5px'}}>编辑</Button> |
| | | </div> |
| | | ), |
| | | }, |
| | |
| | | try { |
| | | let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist))) |
| | | item.nodes = pageParam |
| | | if (pageParam.type === 'navbar') { |
| | | if (pageParam.login) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'navbar') { |
| | | item.type = 'navbar' |
| | | } |
| | | } catch { |
| | | } catch (e) { |
| | | item.nodes = '' |
| | | } |
| | | } |
| | |
| | | try { |
| | | let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist))) |
| | | item.nodes = pageParam |
| | | if (pageParam.type === 'navbar') { |
| | | if (pageParam.login) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'navbar') { |
| | | item.type = 'navbar' |
| | | } |
| | | } catch { |
| | | } catch (e) { |
| | | item.nodes = '' |
| | | } |
| | | } |
| | |
| | | this.setState({ visible: true, targetKeys: [] }) |
| | | } |
| | | |
| | | jumpApp = (item) => { |
| | | const { app } = this.state |
| | | |
| | | let route = 'mobdesign' |
| | | if (app.typename === 'pc') { |
| | | route = 'pcdesign' |
| | | } |
| | | |
| | | window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`)) |
| | | } |
| | | |
| | | render () { |
| | | const { app, loading, columns, menulist, trees, searchkey } = this.state |
| | | let _menulist = menulist |