"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = Result;
var _react = _interopRequireDefault(require("react"));
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
var _QuestionCircleOutlined = _interopRequireDefault(require("@ant-design/icons/QuestionCircleOutlined"));
var _Table = _interopRequireDefault(require("../_component/Table"));
var _CustomModal = _interopRequireDefault(require("../_component/CustomModal"));
var _useProps2 = _interopRequireDefault(require("@vtx/ol-map/lib/use-props"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/*
 * @description: 净距分析
 */

var TipText = function TipText(_ref) {
  var text = _ref.text,
    tip = _ref.tip;
  return /*#__PURE__*/_react["default"].createElement("span", null, text, ' ', /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
    title: tip
  }, /*#__PURE__*/_react["default"].createElement(_QuestionCircleOutlined["default"], {
    style: {
      marginLeft: 4,
      color: '#ccc'
    }
  })));
};
TipText.propTypes = {
  text: _propTypes["default"].any,
  tip: _propTypes["default"].any
};
function Result() {
  var _useProps = (0, _useProps2["default"])(),
    map = _useProps.map,
    setVisible = _useProps.setVisible,
    visible = _useProps.visible,
    loading = _useProps.loading,
    tableData = _useProps.tableData;
  /**
   * @description: feature居中，气泡框打开
   * @param {*} code
   * @return {*}
   */
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_CustomModal["default"], {
    title: "\u51C0\u8DDD\u5206\u6790",
    map: map,
    onCancel: function onCancel() {
      setVisible(false);
    },
    visible: visible
  }, /*#__PURE__*/_react["default"].createElement(_Table["default"], {
    indexColumn: false,
    loading: loading,
    rowKey: "code",
    columns: [{
      title: '分析内容',
      dataIndex: 'content',
      width: 100
    }, {
      title: '计算结果',
      dataIndex: 'calcResult',
      width: 80,
      render: function render(text) {
        return /*#__PURE__*/_react["default"].createElement("div", null, text, "m");
      }
    }, {
      title: '国家标准',
      dataIndex: 'standard',
      width: 100
    }, {
      title: '分析结果',
      dataIndex: 'analyzeResult',
      width: 80,
      render: function render(text, record) {
        return /*#__PURE__*/_react["default"].createElement("span", {
          style: {
            color: record.analyzeResult === '合格' ? 'green' : 'red'
          }
        }, text);
      }
    }],
    dataSource: tableData
  })));
}
//# sourceMappingURL=Result.js.map
