"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = TodayWorkTable;
var _react = _interopRequireDefault(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _api = require("../../api");
var _track = _interopRequireDefault(require("../../imgs/track.png"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * 路段-总览信息-今日作业
 */

function TodayWorkTable(props) {
  var carId = props.carId;
  var _BaseService$useBaseI = _api.BaseService.useBaseInfo(carId),
    dataSource = _BaseService$useBaseI.dataSource;
  var columns = [{
    title: '车牌号',
    dataIndex: 'carCode',
    key: 'carCode',
    width: 60,
    ellipsis: true
  }, {
    title: '作业类型',
    dataIndex: 'productTypeName',
    key: 'productTypeName',
    width: 80,
    ellipsis: true
  }, {
    title: '作业趟数',
    dataIndex: 'collectNum',
    key: 'collectNum',
    ellipsis: true
  }, {
    title: '作业公里(km)',
    dataIndex: 'bucketNum',
    key: 'bucketNum',
    width: 120,
    ellipsis: true
  }, {
    title: '完成率',
    dataIndex: 'weight',
    key: 'weight',
    width: 75,
    ellipsis: true
  }, {
    title: '轨迹',
    dataIndex: 'track',
    key: 'track',
    width: 60,
    render: function render() {
      return /*#__PURE__*/_react["default"].createElement("a", {
        onClick: function onClick() {
          window.console.log(location.protocol);
          window.open("".concat(location.protocol, "//").concat(location.host, "/carHistory/#/index?carId=").concat(carId, "&").concat(location.href.split('?')[1]));
        }
      }, /*#__PURE__*/_react["default"].createElement("img", {
        src: _track["default"]
      }));
    }
  }];
  var tableProps = {
    height: 200,
    pagination: {
      current: 1,
      pageSize: 10
    },
    columns: columns,
    isIndex: false,
    rowKey: 'productTypeId',
    dataSource: dataSource
  };
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], Object.assign({}, tableProps));
}
//# sourceMappingURL=TodayWorkTable.js.map
