"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _api = require("../../api");
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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 CollectRecord = function CollectRecord(_ref) {
  var id = _ref.id,
    startTime = _ref.startTime,
    endTime = _ref.endTime,
    garbageType = _ref.garbageType;
  var tableProps = _api.BasicService.collectList({
    startTime: startTime,
    endTime: endTime,
    id: id,
    garbageType: garbageType
  });
  var columns = [{
    title: '产生单位',
    dataIndex: 'restaurantName',
    width: 100,
    ellipsis: true,
    render: function render(text) {
      return text || '-';
    }
  }].concat(_toConsumableArray(garbageType === 'fqyz' ? [{
    title: '煎炸油收运桶数(桶)',
    dataIndex: 'jzyTrashNum',
    width: 180,
    sorter: true,
    align: 'right'
  }, {
    title: '煎炸油收运量(kg)(预估)',
    dataIndex: 'jzyYgWeight',
    width: 220,
    sorter: true,
    align: 'right'
  }, {
    title: '其他废弃油脂收运桶数(桶)',
    dataIndex: 'qtfqyzTrashNum',
    width: 220,
    sorter: true,
    align: 'right'
  }, {
    title: '其他废弃油脂收运量(kg)(预估)',
    dataIndex: 'qtfqyzYgWeight',
    width: 260,
    sorter: true,
    align: 'right'
  }] : [{
    title: '垃圾桶数(桶)',
    dataIndex: 'trashNum',
    width: 120,
    sorter: true,
    align: 'right'
  }, {
    title: '垃圾量(kg)(预估量)',
    dataIndex: 'ygNetWeight',
    width: 170,
    align: 'right',
    sorter: true
  }, {
    title: '垃圾量(kg)(实际量)',
    dataIndex: 'netWeight',
    width: 180,
    align: 'right',
    sorter: true
  }]), [{
    title: '车牌号',
    dataIndex: 'carCode',
    width: 100,
    ellipsis: true
  }]);
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], Object.assign({}, tableProps, {
    columns: columns
  }));
};
var _default = exports["default"] = CollectRecord;
//# sourceMappingURL=CollectRecord.js.map
