"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _antd = require("antd");
require("../index.less");
var _utils = require("@vtx/utils");
var _address = _interopRequireDefault(require("../../../imgs/address.png"));
var _point = _interopRequireDefault(require("../../../imgs/point.png"));
var _time = _interopRequireDefault(require("../../../imgs/time.png"));
var _yingYe = _interopRequireDefault(require("../../../imgs/yingYe.png"));
var _daMen = _interopRequireDefault(require("../../../imgs/daMen.png"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // 营业状态
// 大门状态
var JBXX = function JBXX(props) {
  var _a, _b;
  var detail = props.detail,
    realtimeFactorValueList = props.realtimeFactorValueList;
  var baseList = [{
    key: 'address',
    img: _address["default"],
    value: 'divisionName'
  }, {
    key: 'point',
    img: _point["default"],
    value: 'address'
  }, {
    key: 'time',
    img: _time["default"],
    value: 'openTime'
  }].concat(_toConsumableArray((0, _utils.getUrlParam)('fromProject') && ['bscy'].includes((0, _utils.getUrlParam)('fromProject')) ? [{
    key: 'yingYe',
    img: _yingYe["default"],
    value: 'openTime',
    renderValue: ((_a = (realtimeFactorValueList || []).find(function (item) {
      return item.name === '营业状态';
    })) === null || _a === void 0 ? void 0 : _a.value) === '1' ? '是' : '否',
    name: '营业状态'
  }, {
    key: 'daMen',
    img: _daMen["default"],
    value: 'openTime',
    renderValue: ((_b = (realtimeFactorValueList || []).find(function (item) {
      return item.name === '大门状态';
    })) === null || _b === void 0 ? void 0 : _b.value) === '1' ? '开' : '关',
    name: '大门状态'
  }] : []));
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "jbxx"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "title"
  }, /*#__PURE__*/_react["default"].createElement("span", null, "\u57FA\u672C\u4FE1\u606F"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "rank"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Rate, {
    disabled: true,
    allowHalf: true,
    value: detail.score || 0,
    style: {
      color: '#ff7f08 '
    }
  }), "\u2002", detail.score || 0)), baseList.map(function (item) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: item.key,
      className: "infoItem",
      style: {
        width: item.key === 'time' ? '100%' : 'default'
      }
    }, /*#__PURE__*/_react["default"].createElement(_antd.Tooltip, {
      title: item.name || ''
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: item.img,
      alt: item.key
    })), /*#__PURE__*/_react["default"].createElement("span", {
      title: item.renderValue || detail[item.value]
    }, item.renderValue || detail[item.value] || '-'));
  }), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u6743\u5C5E\u5355\u4F4D"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.belongUnitName
  }, detail.belongUnitName || '-'))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u6743\u5C5E\u5355\u4F4D\u8054\u7CFB\u4EBA"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.belongUnitContract
  }, detail.belongUnitContract || '-')), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip tipShort"
  }, "\u8054\u7CFB\u7535\u8BDD"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText textShort",
    title: detail.belongUnitContractWay
  }, detail.belongUnitContractWay || '-'))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u8FD0\u8425\u5355\u4F4D"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.runUnitName
  }, detail.runUnitName || '-'))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u8FD0\u8425\u5355\u4F4D\u8054\u7CFB\u4EBA"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.runUnitContract
  }, detail.runUnitContract || '-')), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip tipShort"
  }, "\u8054\u7CFB\u7535\u8BDD"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText textShort",
    title: detail.runUnitContractWay
  }, detail.runUnitContractWay || '-'))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u7BA1\u7406\u7C7B\u578B"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.manageType
  }, detail.manageType || '-')), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip tipShort"
  }, "\u7BA1\u7406\u5F62\u5F0F"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText textShort",
    title: detail.manageMethod
  }, detail.manageMethod || '-'))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u4FDD\u6D01\u5458"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.cleaner
  }, detail.cleaner || '-'))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    className: "baseRow"
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24,
    className: "baseLine"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "titleTip"
  }, "\u4FDD\u6D01\u65F6\u95F4"), /*#__PURE__*/_react["default"].createElement("span", {
    className: "contentText",
    title: detail.cleanTime
  }, detail.cleanTime || '-'))));
};
var _default = exports["default"] = JBXX;
//# sourceMappingURL=Jbxx.js.map
