king
2020-12-04 d441fa1e1cc80f4ea462a750a42a2b25c1f2b202
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
  }
}