| | |
| | | }) |
| | | |
| | | let _arrField = [config.setting.primaryKey] // 字段集 , 默认添加主键 |
| | | let roleId = sessionStorage.getItem('role_id') || '' // 角色ID |
| | | |
| | | config.groups.forEach(group => { |
| | | group.sublist = group.sublist.filter(item => { |
| | | item.field && _arrField.push(item.field) |
| | | if (!item.blacklist || item.blacklist.length === 0) { |
| | | _arrField.push(item.field) |
| | | return true |
| | | } |
| | | |
| | | let _black = item.blacklist.filter(v => { |
| | | return this.props.permRoles.indexOf(v) !== -1 |
| | | }) |
| | | |
| | | if (_black.length > 0) { |
| | | return false |
| | | } else { |
| | | _arrField.push(item.field) |
| | | return true |
| | | } |
| | | return item.blacklist.filter(v => roleId.indexOf(v) > -1).length === 0 |
| | | }) |
| | | }) |
| | | _arrField = _arrField.join(',') |
| | |
| | | arr_field: _option.field |
| | | } |
| | | |
| | | if (this.props.dataManager) { // 数据权限 |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | param.LText = param.LText.replace(/\$@/ig, '/*') |
| | | param.LText = param.LText.replace(/@\$/ig, '*/') |
| | | } else { |
| | |
| | | if (!param) return // 未获取参数时,不发请求 |
| | | |
| | | // 数据管理权限 |
| | | if (this.props.dataManager) { |
| | | if (sessionStorage.getItem('dataM') === 'true') { |
| | | param.dataM = 'Y' |
| | | } |
| | | |
| | |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | if (this.props.dataManager) { // 数据权限 |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | _dataresource = _dataresource.replace(/\$@/ig, '/*') |
| | | _dataresource = _dataresource.replace(/@\$/ig, '*/') |
| | | // param.custom_script = param.custom_script.replace(/\$@/ig, '/*') |
| | |
| | | return { |
| | | menuType: state.editLevel, |
| | | tabviews: state.tabviews, |
| | | permAction: state.permAction, |
| | | dataManager: state.dataManager, |
| | | permRoles: state.permRoles |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | | |