"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _util = require("../../../util");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
 * 统计信息-列表
 */

var List = function List(_ref) {
  var data = _ref.data;
  var records = {
    total: (data === null || data === void 0 ? void 0 : data.length) || 0,
    rows: data
  };
  var columns = [{
    title: '作业日期',
    dataIndex: 'reportDate',
    key: 'reportDate'
  }, {
    title: '首次点火时间',
    dataIndex: 'firstFireTime',
    key: 'firstFireTime',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, text || '-');
    }
  }, {
    title: '最后点火时间',
    dataIndex: 'lastFireTime',
    key: 'lastFireTime',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, text || '-');
    }
  }, {
    title: '点火时长',
    dataIndex: 'fireDurationStr',
    key: 'fireDurationStr',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, text || '-');
    }
  }, {
    title: '出车时间',
    dataIndex: 'firstRunTime',
    key: 'firstRunTime',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, text || '-');
    }
  }, {
    title: '收车时间',
    dataIndex: 'lastRunTime',
    key: 'lastRunTime',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, text || '-');
    }
  }, {
    title: '行驶里程(km)',
    dataIndex: 'sumMileage',
    key: 'sumMileage',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, text || '-');
    }
  }, {
    title: '时长',
    dataIndex: 'driveDuration',
    key: 'driveDuration',
    render: function render(text) {
      return /*#__PURE__*/_react["default"].createElement("span", null, (0, _util.secondToFormatTime)((text || 0) / 1000) || '-');
    }
  }];
  var tableProps = {
    pagination: {
      total: records.total,
      defaultPageSize: 10
    },
    height: 440,
    dataSource: records.rows
  };
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-static-list"
  }, /*#__PURE__*/_react["default"].createElement(_vmTable["default"], Object.assign({
    columns: columns,
    rowKey: "id"
  }, tableProps)));
};
var _default = exports["default"] = List;
//# sourceMappingURL=List.js.map
