"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = WorkLjsy;
var _react = _interopRequireDefault(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _api = require("../../api");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function WorkLjsy(_ref) {
  var id = _ref.id,
    paramConfigsList = _ref.paramConfigsList,
    date = _ref.date;
  var _a, _b;
  var _BaseService$useToday = _api.BaseService.useTodayWorkLjsy(id, date),
    todayRunLjsyRes = _BaseService$useToday.todayRunLjsyRes;
  var columns = [{
    title: '收集点名称',
    dataIndex: 'collectPointName',
    key: 'collectPointName',
    ellipsis: true,
    render: function render(text) {
      return text ? text : '-';
    }
  }, {
    title: '收集次数(次)',
    dataIndex: 'collectNum',
    key: 'collectNum',
    width: 90,
    align: 'right'
  }];
  if (((_a = paramConfigsList['SHOW_COLLECTING_BUCKETS']) === null || _a === void 0 ? void 0 : _a.value) === 'true') {
    columns = columns.concat([{
      title: '收集桶数(桶)',
      dataIndex: 'bucketNum',
      key: 'bucketNum',
      align: 'right',
      render: function render(text) {
        return text ? text : 0;
      }
    }]);
  }
  if (((_b = paramConfigsList['SHOW_WEIGHTING']) === null || _b === void 0 ? void 0 : _b.value) === 'true') {
    columns = columns.concat([{
      title: '收集重量(kg)',
      dataIndex: 'weight',
      key: 'weight',
      align: 'right',
      render: function render(text) {
        return text ? text : 0;
      }
    }]);
  }
  var tableProps = {
    height: 310,
    paganitation: false,
    dataSource: (todayRunLjsyRes === null || todayRunLjsyRes === void 0 ? void 0 : todayRunLjsyRes.details) || []
  };
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], Object.assign({
    columns: columns
  }, tableProps));
}
//# sourceMappingURL=WorkDetail.js.map
