From d441fa1e1cc80f4ea462a750a42a2b25c1f2b202 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 04 十二月 2020 15:17:51 +0800 Subject: [PATCH] 2020-12-04 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 35 ++++++++++++----------------------- 1 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 6a8abe7..8c3d428 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -226,7 +226,7 @@ param.ID = primaryId param.LText = Utils.getSysDefaultSql(btn, setting, '', param, data[0], columns, this.props.Tab) // 鏁版嵁婧� - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/\$@/ig, '/*') param.LText = param.LText.replace(/@\$/ig, '*/') } else { @@ -267,7 +267,7 @@ param.ID = primaryId || Utils.getguid() param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab) // 鏁版嵁婧� - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/\$@/ig, '/*') param.LText = param.LText.replace(/@\$/ig, '*/') } else { @@ -286,7 +286,7 @@ param.ID = primaryId param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab) // 鏁版嵁婧� - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/\$@/ig, '/*') param.LText = param.LText.replace(/@\$/ig, '*/') } else { @@ -358,7 +358,7 @@ param.ID = primaryId param.LText = Utils.getSysDefaultSql(btn, setting, '', param, cell, columns, this.props.Tab) // 鏁版嵁婧� - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/\$@/ig, '/*') param.LText = param.LText.replace(/@\$/ig, '*/') } else { @@ -397,7 +397,7 @@ param.ID = _formPrimaryId || Utils.getguid() param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab) // 鏁版嵁婧� - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/\$@/ig, '/*') param.LText = param.LText.replace(/@\$/ig, '*/') } else { @@ -416,7 +416,7 @@ param.ID = primaryId param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab) // 鏁版嵁婧� - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/\$@/ig, '/*') param.LText = param.LText.replace(/@\$/ig, '*/') } else { @@ -950,6 +950,7 @@ }) this.updateStatus('over') } else { + let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID if (_LongParam.groups.length > 0) { _LongParam.groups.forEach(group => { group.sublist = group.sublist.map(cell => { @@ -957,7 +958,7 @@ if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { let _option = Utils.getSelectQueryOptions(cell) - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 _option.sql = _option.sql.replace(/\$@/ig, '/*') _option.sql = _option.sql.replace(/@\$/ig, '*/') } else { @@ -975,12 +976,7 @@ // 瀛楁鏉冮檺榛戝悕鍗� if (!cell.blacklist || cell.blacklist.length === 0) return cell - - let _black = cell.blacklist.filter(v => { - return this.props.permRoles.indexOf(v) !== -1 - }) - - if (_black.length > 0) { + if (cell.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0) { cell.hidden = 'true' } @@ -993,7 +989,7 @@ if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { let _option = Utils.getSelectQueryOptions(cell) - if (this.props.dataManager) { // 鏁版嵁鏉冮檺 + if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺 _option.sql = _option.sql.replace(/\$@/ig, '/*') _option.sql = _option.sql.replace(/@\$/ig, '*/') } else { @@ -1007,12 +1003,7 @@ // 瀛楁鏉冮檺榛戝悕鍗� if (!cell.blacklist || cell.blacklist.length === 0) return cell - - let _black = cell.blacklist.filter(v => { - return this.props.permRoles.indexOf(v) !== -1 - }) - - if (_black.length > 0) { + if (cell.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0) { cell.hidden = 'true' } @@ -1222,9 +1213,7 @@ const mapStateToProps = (state) => { return { tabviews: state.tabviews, - menuType: state.editLevel, - permRoles: state.permRoles, - dataManager: state.dataManager + menuType: state.editLevel } } -- Gitblit v1.8.0