| | |
| | | } else { |
| | | if (_LongParam.groups.length > 0) { |
| | | _LongParam.groups.forEach(group => { |
| | | group.sublist = group.sublist.filter(cell => { |
| | | // 数据源sql语句,预处理 |
| | | group.sublist = group.sublist.map(cell => { |
| | | // 数据源sql语句,预处理, 权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect'].includes(cell.type) && cell.resourceType === '1') { |
| | | let _option = Utils.getSelectQueryOptions(cell) |
| | | |
| | |
| | | } |
| | | |
| | | // 字段权限黑名单 |
| | | if (!cell.blacklist || cell.blacklist.length === 0) return true |
| | | 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) { |
| | | return false |
| | | } else { |
| | | return true |
| | | cell.hidden = 'true' |
| | | } |
| | | |
| | | return cell |
| | | }) |
| | | }) |
| | | } else { |
| | | _LongParam.fields = _LongParam.fields.filter(cell => { |
| | | // 数据源sql语句,预处理 |
| | | _LongParam.fields = _LongParam.fields.map(cell => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect'].includes(cell.type) && cell.resourceType === '1') { |
| | | let _option = Utils.getSelectQueryOptions(cell) |
| | | |
| | |
| | | } |
| | | |
| | | // 字段权限黑名单 |
| | | if (!cell.blacklist || cell.blacklist.length === 0) return true |
| | | 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) { |
| | | return false |
| | | } else { |
| | | return true |
| | | cell.hidden = 'true' |
| | | } |
| | | |
| | | return cell |
| | | }) |
| | | } |
| | | |