"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _utils = require("@vtx/utils");
var _components = require("@vtx/components");
var _vmInfoCollection = _interopRequireDefault(require("../../../vm-info-collection"));
var _vmSubTitle = _interopRequireDefault(require("../../../vm-sub-title"));
var _vmMap = _interopRequireDefault(require("../../../vm-map"));
var _vmNodata = _interopRequireDefault(require("../../../vm-nodata"));
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var BaseInfo = function BaseInfo(props) {
  var _a, _b, _c;
  var mapCenter = props.mapCenter,
    baseInfo = props.baseInfo,
    summaryInfo = props.summaryInfo,
    pointList = props.pointList,
    _props$customMapInfo = props.customMapInfo,
    customMapInfo = _props$customMapInfo === void 0 ? {} : _props$customMapInfo;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-baseContent"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-base"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], null), /*#__PURE__*/_react["default"].createElement(_vmInfoCollection["default"], {
    data: baseInfo,
    gap: 12
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-base-map"
  }, /*#__PURE__*/_react["default"].createElement(_vmMap["default"], Object.assign({
    mapCenter: mapCenter
  }, customMapInfo)))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-right"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-right-summary"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u8003\u6838\u4FE1\u606F"
  }), /*#__PURE__*/_react["default"].createElement(_vmInfoCollection["default"], {
    data: summaryInfo,
    gap: 10,
    width: "48%",
    horizontal: true
  })), /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-right-content"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u8003\u6838\u5185\u5BB9"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "kh-right-content-item-wrap"
  }, (pointList === null || pointList === void 0 ? void 0 : pointList.length) > 0 && ((_b = (_a = pointList[0]) === null || _a === void 0 ? void 0 : _a.detailList) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (_c = pointList[0]) === null || _c === void 0 ? void 0 : _c.detailList.map(function (item, index) {
    var _a, _b, _c;
    var content = [{
      label: '考核分组',
      key: 'groupName',
      value: item.rule.groupName
    }, {
      label: '分值',
      key: 'deductPoints',
      value: item.deductPoints
    }, {
      label: '考核标准',
      key: 'khbz',
      value: item.rule.name
    }];
    var src = ((_a = pointList[0]) === null || _a === void 0 ? void 0 : _a.files) ? JSON.parse(pointList[0].files) : [];
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: "kh-right-content-item"
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        width: '70px',
        height: '70px',
        margin: '0 12px 0 19px'
      }
    }, /*#__PURE__*/_react["default"].createElement(_components.VtxImage, {
      src: "/cloudFile/common/downloadFile?id=".concat((_b = src === null || src === void 0 ? void 0 : src[0]) === null || _b === void 0 ? void 0 : _b.id, "&token=").concat((0, _utils.getVtxToken)('token')),
      aspectFit: true,
      errorText: "\u6682\u65E0\u56FE\u7247",
      emptyText: "\u6682\u65E0\u56FE\u7247",
      alt: (_c = src === null || src === void 0 ? void 0 : src[0]) === null || _c === void 0 ? void 0 : _c.name,
      isDark: true
    })), /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: "kh-right-content-item-main"
    }, /*#__PURE__*/_react["default"].createElement(_vmInfoCollection["default"], {
      data: content,
      width: "100%",
      gap: 6
    })));
  }) : (/*#__PURE__*/_react["default"].createElement(_vmNodata["default"], null))))));
};
var _default = exports["default"] = BaseInfo;
//# sourceMappingURL=index.js.map
