"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _moment = _interopRequireDefault(require("moment"));
var _antd = require("antd");
var _useSettings2 = _interopRequireDefault(require("../../../vm-hooks/useSettings"));
var _vmSubTitle = _interopRequireDefault(require("../../../vm-sub-title"));
var _vmInfoCollection = _interopRequireDefault(require("../../../vm-info-collection"));
var _Rules = _interopRequireDefault(require("./Rules"));
var _TodayWork = _interopRequireDefault(require("./TodayWork"));
var _CarWork = _interopRequireDefault(require("./CarWork"));
var _api = require("../../api");
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var BaseInfo = function BaseInfo(props) {
  var id = props.id,
    baseInfo = props.baseInfo;
  var _useSettings = (0, _useSettings2["default"])(),
    theme = _useSettings.theme,
    isDark = _useSettings.isDark;
  var nowDate = (0, _moment["default"])().format('YYYY-MM-DD');
  var _BaseService$useBaseI = _api.BaseService.useBaseInfo(id, nowDate, nowDate),
    todayWorkRes = _BaseService$useBaseI.todayWorkRes,
    dataSource = _BaseService$useBaseI.dataSource;
  var _BaseService$useConfi = _api.BaseService.useConfig(),
    paramConfigsList = _BaseService$useConfi.paramConfigsList,
    productTypes = _BaseService$useConfi.productTypes;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "cp-baseContent ".concat(theme)
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-top"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    gutter: [10, 10]
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    xxl: 9,
    xl: 9,
    lg: 9,
    md: 12
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-top-base"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u57FA\u672C\u4FE1\u606F"
  }), /*#__PURE__*/_react["default"].createElement(_vmInfoCollection["default"], {
    data: baseInfo,
    horizontal: true,
    gap: 16
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    xxl: 15,
    xl: 15,
    lg: 15,
    md: 12
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-top-twork"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u4ECA\u65E5\u4F5C\u4E1A"
  }), /*#__PURE__*/_react["default"].createElement(_TodayWork["default"], {
    data: todayWorkRes,
    paramConfigsList: paramConfigsList,
    productTypes: productTypes
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    xxl: 9,
    xl: 9,
    lg: 9,
    md: 12
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-bottom-syrules"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u6536\u8FD0\u89C4\u5219"
  }), /*#__PURE__*/_react["default"].createElement(_Rules["default"], {
    id: id,
    paramConfigsList: paramConfigsList
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    xxl: 15,
    xl: 15,
    lg: 15,
    md: 12
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-bottom-table"
  }, /*#__PURE__*/_react["default"].createElement(_CarWork["default"], {
    dataSource: dataSource,
    isDark: isDark,
    paramConfigsList: paramConfigsList
  }))))));
};
var _default = exports["default"] = BaseInfo;
//# sourceMappingURL=index.js.map
