king
2021-01-07 2292d1826e69e21c8a411c217faef635fe57d458
src/tabviews/custom/index.jsx
@@ -25,6 +25,7 @@
const TableCard = asyncComponent(() => import('./components/card/table-card'))
const MainSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch'))
const NormalTable = asyncComponent(() => import('./components/table/normal-table'))
const NormalGroup = asyncComponent(() => import('./components/group/normal-group'))
class CustomPage extends Component {
  static propTpyes = {
@@ -205,6 +206,15 @@
          })
        })
        item.parentIds = supIds
      } else if (item.type === 'group') {
        if (
          item.setting.blacklist && item.setting.blacklist.length > 0 &&
          item.setting.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0
        ) {
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, permMenus)
      } else if (item.type === 'pie' || item.type === 'bar' || item.type === 'line') {
        if (
          item.plot.blacklist && item.plot.blacklist.length > 0 &&
@@ -243,6 +253,7 @@
          item.action = item.action.filter(cell => {
            cell.logLabel = item.name + '-' + cell.label
            cell.ContainerId = this.state.ContainerId
            cell.$menuId = item.uuid
            return permAction[cell.uuid]
          })
@@ -261,6 +272,7 @@
                cell.logLabel = item.name + '-' + cell.label
                cell.Ot = 'requiredSgl'
                cell.ContainerId = this.state.ContainerId
                cell.$menuId = item.uuid
              } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
                cell.innerHeight = 'auto'
              }
@@ -272,6 +284,7 @@
                cell.logLabel = item.name + '-' + cell.label
                cell.Ot = 'requiredSgl'
                cell.ContainerId = this.state.ContainerId
                cell.$menuId = item.uuid
              } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
                cell.innerHeight = 'auto'
              }
@@ -286,6 +299,7 @@
                cell.logLabel = item.name + '-' + cell.label
                cell.Ot = 'requiredSgl'
                cell.ContainerId = this.state.ContainerId
                cell.$menuId = item.uuid
              } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
                cell.innerHeight = 'auto'
              }
@@ -299,6 +313,8 @@
              cell.logLabel = item.name + '-' + cell.label
              cell.Ot = 'requiredSgl'
              cell.ContainerId = this.state.ContainerId
              cell.$menuId = item.uuid
              return permAction[cell.uuid]
            })
            return col.elements.length !== 0
@@ -308,6 +324,7 @@
        if (item.action && item.action.length > 0) {
          item.action = item.action.map(cell => {
            cell.logLabel = item.name + '-' + cell.label
            cell.$menuId = item.uuid
            return cell
          })
        }
@@ -366,6 +383,11 @@
          tab = {...tab, ...inherit}
          return tab
        })
        return component
      } else if (component.type === 'group') {
        component.components = this.formatSetting(component.components, [], [], inherit)
        component = {...component, ...inherit}
        return component
      }
      if (!component.setting) return component // 不使用系统函数时
@@ -712,6 +734,12 @@
            <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'group' && item.subtype === 'normalgroup') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalGroup config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else {
        return null
      }