"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getFilterEcharts = exports.filterCode = exports.OverViewLeftFields = void 0;
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
var OverViewLeftFields = exports.OverViewLeftFields = [{
  key: 'divisionName',
  label: '行政区划'
}, {
  key: 'householdNum',
  label: '居民户数(户)'
}, {
  key: 'personNum',
  label: '居民人数(人)'
}, {
  key: 'jcssTypeName',
  label: '分类主体'
}, {
  key: 'address',
  label: '地址'
}, {
  key: 'manageOrgName',
  label: '管理单位'
}, {
  key: 'responsibleOrgName',
  label: '运营公司'
}, {
  key: 'throwPointNum',
  label: '投放点数量'
}, {
  key: 'supervisorNum',
  label: '督导员数量'
}
// {
//     key: '142',
//     label: '联系人',
// },
// {
//     key: '152',
//     label: '联系方式',
// },
];
// 过滤echarts数据
var getFilterEcharts = exports.getFilterEcharts = function getFilterEcharts(data, filterList) {
  var _data = [];
  if (!(data === null || data === void 0 ? void 0 : data.length)) return;
  filterList.forEach(function (item) {
    switch (item) {
      case 'CHUYU_QUALITY':
        _data = _data.concat(data === null || data === void 0 ? void 0 : data.filter(function (ele) {
          return ele.alarmTypeName === '厨余混投' || ele.alarmTypeName === '厨余未破袋';
        }));
        break;
      case 'LANDING':
        _data = _data.concat(data === null || data === void 0 ? void 0 : data.filter(function (ele) {
          return ele.alarmTypeName === '误时落地' || ele.alarmTypeName === '正时落地';
        }));
        break;
      case 'OVERFLOW':
        _data = _data.concat(data === null || data === void 0 ? void 0 : data.filter(function (ele) {
          return ele.alarmTypeName === '满溢';
        }));
        break;
      default:
        break;
    }
  });
  return _data;
};
// 取两个数组的交集
var filterCode = exports.filterCode = function filterCode(arr, codes) {
  var newArr = new Set(arr);
  var newCodes = new Set(codes);
  return new Set(_toConsumableArray(newArr).filter(function (x) {
    return newCodes.has(x);
  }));
};
//# sourceMappingURL=config.js.map
