king
2020-06-16 6c16e43cd6521460c804391c042348dbb14086fc
src/tabviews/subtable/index.jsx
@@ -142,23 +142,35 @@
      let _hideCol = []      // 隐藏及合并列中字段的uuid集
      let colMap = new Map()
      // 旧版本兼容
      if (!config.version || config.version < '1.0') {
      // 兼容图表
      let chartId = ''
      if (!config.charts) {
        config.expand = true
        config.charts = [{
          uuid: Utils.getuuid(),
          label: '',
          title: '',
          chartType: 'table',
          icon: 'table',
          Hide: 'false',
          blacklist: []
        }]
      } else if (config.charts.length === 1) {
        config.expand = true
          config.charts = [{ uuid: Utils.getuuid(), label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }]
        } else {
          config.charts.forEach(card => {
            if (card.chartType === 'card') {
              card.details = card.details.map(_cell => {
                _cell.fontSize = _cell.fontSize || 14
                if (!_cell.width) {
                  _cell.width = 100
                } else if (_cell.width === 'helf') {
                  _cell.width = 50
                } else if (_cell.width === 'third') {
                  _cell.width = 33
      }
      chartId = config.charts[0].uuid
                if (!_cell.fontWeight && _cell.bold === 'true') {
                  _cell.fontWeight = 'normal'
                }
                _cell.height = _cell.height || 1
                return _cell
              })
            }
          })
        }
      }
      // 权限过滤
      if (this.props.menuType !== 'HS') {
@@ -216,6 +228,8 @@
      if (config.charts.length <= 1) {
        config.expand = true
      }
      let chartId = config.charts[0] ? config.charts[0].uuid : ''
      if (userConfig) {
        config.setting.tableType = userConfig.setting.tableType
@@ -402,6 +416,10 @@
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        if (this.props.menuType === 'HS') { // 云端数据验证
          param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true)
        }
        let defer = new Promise(resolve => {
          Api.getSystemCacheConfig(param, isSSO).then(res => {
@@ -697,6 +715,10 @@
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.DateCount = Utils.formatOptions(DateCount)
    if (this.props.menuType === 'HS') { // 云端数据验证
      param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true)
    }
    return param
  }