"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _MyCollapse = _interopRequireDefault(require("../MyCollapse"));
var _useGetFacility2 = _interopRequireDefault(require("../../_mapUtil/useGetFacility"));
var _DetailItems = _interopRequireDefault(require("../DetailItems"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Panel = _MyCollapse["default"].Panel;
var GwDetail = function GwDetail(_ref) {
  var id = _ref.id;
  var _useGetFacility = (0, _useGetFacility2["default"])(id),
    data = _useGetFacility.data;
  var code = data.code,
    divisionName = data.divisionName,
    _data$dataJson = data.dataJson,
    dataJson = _data$dataJson === void 0 ? {} : _data$dataJson;
  var ds = dataJson.ds,
    lineLength = dataJson.lineLength,
    startDeep = dataJson.startDeep,
    endDeep = dataJson.endDeep,
    lineTextureName = dataJson.lineTextureName,
    layWayName = dataJson.layWayName,
    flowDirectionName = dataJson.flowDirectionName,
    roadName = dataJson.roadName,
    level = dataJson.level;
  return /*#__PURE__*/_react["default"].createElement(_MyCollapse["default"], {
    defaultActiveKey: ['1']
  }, /*#__PURE__*/_react["default"].createElement(Panel, {
    header: "\u57FA\u672C\u4FE1\u606F",
    key: '1'
  }, /*#__PURE__*/_react["default"].createElement(_DetailItems["default"], {
    items: [{
      label: '编码',
      value: code,
      span: 8
    }, {
      label: '等级',
      value: level,
      span: 8
    }, {
      label: '行政区划',
      value: divisionName,
      span: 8
    }, {
      label: '所在道路',
      value: roadName,
      span: 8
    }, {
      label: '管长',
      value: lineLength ? lineLength + 'm' : null,
      span: 8
    }, {
      label: '管径',
      value: ds ? ds + 'mm' : '',
      span: 8
    }, {
      label: '起点埋深',
      value: startDeep ? startDeep + 'm' : null,
      span: 8
    }, {
      label: '终点埋深',
      value: endDeep ? endDeep + 'm' : null,
      span: 8
    }, {
      label: '材质',
      value: lineTextureName || null,
      span: 8
    }, {
      label: '埋设方式',
      value: layWayName,
      span: 8
    }, {
      label: '流向',
      value: flowDirectionName,
      span: 8
    }]
  })));
};
GwDetail.propTypes = {
  id: _propTypes["default"].string
};
var _default = exports["default"] = GwDetail;
//# sourceMappingURL=index.js.map
