"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = CarWork;
var _react = _interopRequireDefault(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _track = _interopRequireDefault(require("../../imgs/track.png"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * 收集点-总览信息-车辆作业信息
 */

function CarWork(props) {
  var carId = props.carId,
    dataSource = props.dataSource;
  var columns = [{
    title: '车牌号',
    dataIndex: 'carCode',
    key: 'carCode',
    width: 80,
    ellipsis: true
  }, {
    title: '垃圾类型',
    dataIndex: 'productTypeName',
    key: 'productTypeName',
    width: 80,
    ellipsis: true
  }, {
    title: '收集频次',
    dataIndex: 'collectNum',
    key: 'collectNum',
    ellipsis: true
  }, {
    title: '桶数(桶)',
    dataIndex: 'bucketNum',
    key: 'bucketNum',
    width: 100,
    ellipsis: true
  }, {
    title: '收集重量(kg)',
    dataIndex: 'weight',
    key: 'weight',
    width: 120,
    ellipsis: true
  }, {
    title: '轨迹',
    dataIndex: 'track',
    key: 'track',
    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: 240,
    pagination: {
      current: 1,
      pageSize: 10
    },
    dataSource: dataSource
  };
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], Object.assign({
    columns: columns,
    rowKey: "productTypeId"
  }, tableProps));
}
//# sourceMappingURL=CarWork.js.map
