king
2021-09-06 84a746468a3f7e5b39a3ed53090a19a8dec8cb10
src/views/rolemanage/index.jsx
@@ -13,7 +13,6 @@
const { confirm } = Modal
const { TreeNode } = Tree
// const { Paragraph } = Typography
const { Search } = Input
const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
@@ -36,6 +35,7 @@
        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>
        ),
      },
@@ -98,10 +98,12 @@
              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 = ''
              }
            }
@@ -415,10 +417,12 @@
                  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 = ''
                  }
                }
@@ -742,6 +746,17 @@
    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