"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _index = require("../../index");
var _api = require("../../api");
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var columns = [{
  title: '垃圾净重(kg)',
  dataIndex: 'netWeight',
  align: 'right',
  width: 120,
  sorter: function sorter(a, b) {
    return a.netWeight - b.netWeight;
  }
}, {
  title: '垃圾桶数',
  dataIndex: 'trashNum',
  align: 'right',
  width: 120,
  sorter: function sorter(a, b) {
    return a.trashNum - b.trashNum;
  }
}, {
  title: '收运时间',
  dataIndex: 'weighTime',
  ellipsis: true,
  width: 160,
  sorter: function sorter(a, b) {
    return a.weighTime > b.weighTime ? 1 : -1;
  }
}, {
  title: '收运车辆',
  ellipsis: true,
  width: 160,
  dataIndex: 'carCode'
}];
var DetailList = function DetailList(_ref) {
  var startTime = _ref.startTime,
    endTime = _ref.endTime;
  var _useContext = (0, _react.useContext)(_index.RestaurantContext),
    id = _useContext.id,
    garbageType = _useContext.garbageType;
  var rows = _api.BasicService.detailList({
    id: id,
    startTime: startTime,
    endTime: endTime,
    garbageType: garbageType
  });
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], {
    columns: columns,
    dataSource: rows,
    size: "small",
    pagination: false,
    height: 200
  });
};
var _default = exports["default"] = DetailList;
//# sourceMappingURL=DetailList.js.map
