king
2025-01-02 3b3e6c3d8e042ec384bf8bb5902c365f9de223d1
2025-01-02
1个文件已修改
42 ■■■■■ 已修改文件
src/views/rolemanage/filtermenu/index.jsx 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/filtermenu/index.jsx
@@ -24,7 +24,15 @@
      },
      {
        title: '修改时间', dataIndex: 'modifydate', key: 'modifydate', align: 'center'
      }
      },
      {
        title: '操作',
        key: 'action',
        align: 'center',
        render: (text, record) => (
          <Button type="link" onClick={() => this.jumpApp(record)} style={{color: '#1890ff', marginLeft: '5px'}}>查看</Button>
        ),
      },
    ]
  }
@@ -47,6 +55,38 @@
    this.getAppViewList()
  }
  jumpApp = (item) => {
    const { app } = this.props
    let route = 'mobdesign'
    if (app.typename === 'pc') {
      route = 'pcdesign'
    }
    if (item.menus_rolelist) {
      item.type = 'view'
      try {
        let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist)))
        if (pageParam.type === 'navbar') {
          item.type = 'navbar'
        }
      } catch(e) {
      }
    }
    if (item.type === 'navbar') {
      notification.warning({
        top: 92,
        message: '导航栏不可单独打开,请在含有导航栏的页面中查看。',
        duration: 5
      })
      return
    }
    window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`))
  }
  getAppViewList = () => {
    const { app } = this.props