From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/views/rolemanage/index.jsx | 48 ++++++++++++++++++++++++++---------------------- 1 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index e4df34d..5c5a369 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -27,7 +27,17 @@ loading: false, menulist: [], columns: [ - { title: '鑿滃崟鍚嶇О', dataIndex: 'MenuName', key: 'MenuName', align: 'center' }, + { + title: '鑿滃崟鍚嶇О', dataIndex: 'MenuName', key: 'MenuName', align: 'center', render: (text, record) => { + if (record.extra) { + return <span style={{color: '#1890ff'}}>{text}</span> + } + return text + } + }, + { + title: '鑿滃崟鍙傛暟', dataIndex: 'MenuNo', key: 'MenuNo', align: 'center' + }, { title: '鎿嶄綔', key: 'action', @@ -151,10 +161,12 @@ delete item.menus_rolelist } - if (!ub && app.userbind === item.MenuID) { + if (app.userbind === item.MenuID) { + item.extra = true ub = true } - if (!im && app.instantMessage === item.MenuID) { + if (app.instantMessage === item.MenuID) { + item.extra = true im = true } @@ -162,10 +174,10 @@ }) if (!im) { - menus.push({nodes: '', type: 'none', MenuID: app.instantMessage, MenuName: '鍗虫椂閫氫俊'}) + menus.push({nodes: '', type: 'none', extra: true, MenuID: app.instantMessage, MenuName: '鍗虫椂閫氫俊'}) } if (!ub) { - menus.push({nodes: '', type: 'none', MenuID: app.userbind, MenuName: '鐢ㄦ埛缁戝畾'}) + menus.push({nodes: '', type: 'none', extra: true, MenuID: app.userbind, MenuName: '鐢ㄦ埛缁戝畾'}) } this.setState({ @@ -391,10 +403,6 @@ lang: app.lang } - if (app.typename === 'pc' && record.nodes && record.nodes.popviews && record.nodes.popviews.length > 0) { - param.MenuID = param.MenuID + ',' + record.nodes.popviews.join(',') - } - let _param = { func: 's_kei_link_keyids_addupt', BID: app.ID, @@ -530,10 +538,6 @@ } delete item.menus_rolelist - } - - if (targetKeys.includes(item.MenuID) && item.nodes && item.nodes.popviews && item.nodes.popviews.length > 0) { - list = [...list, ...item.nodes.popviews] } return item @@ -689,17 +693,17 @@ } saveTree = () => { - const { trees } = this.state + // const { trees } = this.state const _this = this - if (!trees || trees.length === 0) { - notification.warning({ - top: 92, - message: '鏈幏鍙栧埌鏉冮檺淇℃伅锛�', - duration: 5 - }) - return - } + // if (!trees || trees.length === 0) { + // notification.warning({ + // top: 92, + // message: '鏈幏鍙栧埌鏉冮檺淇℃伅锛�', + // duration: 5 + // }) + // return + // } confirm({ content: '纭畾鎵ц鍚楋紵', -- Gitblit v1.8.0