king
2021-11-16 cb8c83978177a8d3de769fca12d2aa3642eb0275
src/tabviews/custom/index.jsx
@@ -39,6 +39,7 @@
const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent'))
const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
const CustomChart = asyncComponent(() => import('./components/chart/custom-chart'))
const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline'))
class CustomPage extends Component {
  static propTpyes = {
@@ -70,7 +71,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, permMenus, param } = this.props
    const { permAction, param } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -135,7 +136,7 @@
      let roleId = sessionStorage.getItem('role_id') || '' // 角色ID
      let balMap = new Map()
      let skip = config.permission === 'false' || this.props.menuType === 'HS'
      config.components = this.filterComponent(config.components, roleId, permAction, permMenus, balMap, skip)
      config.components = this.filterComponent(config.components, roleId, permAction, balMap, skip)
      
      // 获取主搜索条件
      let mainSearch = []
@@ -448,7 +449,7 @@
    })
  }
  filterComponent = (components, roleId, permAction, permMenus, balMap, skip) => {
  filterComponent = (components, roleId, permAction, balMap, skip) => {
    return components.filter(item => {
      
      if (item.style && item.style.boxShadow) {
@@ -479,7 +480,7 @@
        })
        item.subtabs = item.subtabs.map(tab => {
          tab.components = this.filterComponent(tab.components, roleId, permAction, permMenus, balMap, skip)
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip)
          return tab
        })
@@ -502,7 +503,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, permMenus, balMap, skip)
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip)
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart'].includes(item.type)) {
        if (
          item.plot.blacklist && item.plot.blacklist.length > 0 &&
@@ -555,7 +556,7 @@
      
            if (col.linkmenu && col.linkmenu.length > 0) {
              let menu_id = col.linkmenu.pop()
              col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
              col.linkThdMenu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
            } else {
              col.linkThdMenu = ''
            }
@@ -676,7 +677,7 @@
          return cell.eleType !== 'button' || skip || permAction[cell.uuid]
        })
      } else if ((item.type === 'table' && item.subtype === 'tablecard') || item.type === 'carousel') {
      } else if ((item.type === 'table' && item.subtype === 'tablecard') || item.type === 'carousel' || item.type === 'timeline') {
        item.subcards && item.subcards.forEach(card => {
          let _hasheight = card.style.height && card.style.height !== 'auto'
          card.elements = card.elements.filter(cell => {
@@ -1091,6 +1092,12 @@
            <Balcony config={item} data={data} BID={_bid} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'timeline') {
        return (
          <Col span={item.width} key={item.uuid}>
            <TimeLine config={item} data={data} BID={_bid} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'carousel' && item.subtype === 'datacard') {
        return (
          <Col span={item.width} key={item.uuid}>