

function chartLineData(data) {
  let seriesData = data.data.seriesData;
  seriesData.map((item) => {
    item.type = 'line',
      item.stack = 'Total',
      item.areaStyle = {},
      item.emphasis = {
        focus: 'series'
      },
      item.data = item.list
  })
  // seriesData.splice(1,1);
  return seriesData
}


function getAuthorization() {
  let key = 'saber-';
  let BladeAuth = JSON.parse(localStorage.getItem(key + 'token')).content;
  let dataAuthKey = JSON.parse(localStorage.getItem(key + 'dataAuthKey')).content;
  let subStationStr = JSON.parse(localStorage.getItem(key + 'subStation'));

  let headers = {
    "Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
    "Blade-Auth": "bearer " + BladeAuth,
    "data-auth-key": dataAuthKey
  }

  if (subStationStr && JSON.stringify(subStationStr) != '{}' && JSON.stringify(subStationStr.content) != '{}' ) {
    let subStation = subStationStr.content;
    headers['tenant-id'] = subStation.tenantId;
    headers['dept-id'] = subStation.deptId;
  }

  return headers
}
