From 3b3e6c3d8e042ec384bf8bb5902c365f9de223d1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 一月 2025 16:02:36 +0800 Subject: [PATCH] 2025-01-02 --- src/views/rolemanage/filtermenu/index.jsx | 42 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 41 insertions(+), 1 deletions(-) diff --git a/src/views/rolemanage/filtermenu/index.jsx b/src/views/rolemanage/filtermenu/index.jsx index fe2390e..7a53875 100644 --- a/src/views/rolemanage/filtermenu/index.jsx +++ b/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 -- Gitblit v1.8.0