"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 _DetailItems = _interopRequireDefault(require("../DetailItems"));
var _useGetDevice2 = _interopRequireDefault(require("../../_mapUtil/useGetDevice"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Panel = _MyCollapse["default"].Panel;
var DeviceDetail = function DeviceDetail(_ref) {
  var id = _ref.id;
  var _useGetDevice = (0, _useGetDevice2["default"])(id),
    data = _useGetDevice.data;
  var code = data.code,
    divisionName = data.divisionName,
    name = data.name,
    deviceTypeName = data.deviceTypeName,
    facilityName = data.facilityName,
    factoryName = data.factoryName,
    modelName = data.modelName;
  return /*#__PURE__*/_react["default"].createElement(_MyCollapse["default"], {
    defaultActiveKey: ['1']
  }, /*#__PURE__*/_react["default"].createElement(Panel, {
    header: "\u8BBE\u5907\u57FA\u7840\u4FE1\u606F",
    key: '1'
  }, /*#__PURE__*/_react["default"].createElement(_DetailItems["default"], {
    items: [{
      label: '设备编码',
      value: code,
      span: 8
    }, {
      label: '设备名称',
      value: name,
      span: 8
    }, {
      label: '设备类型',
      value: deviceTypeName,
      span: 8
    }, {
      label: '设备厂家',
      value: factoryName,
      span: 8
    }, {
      label: '设备型号',
      value: modelName,
      span: 8
    }, {
      label: '所属设施',
      value: facilityName,
      span: 8
    }, {
      label: '行政区划',
      value: divisionName,
      span: 8
    }]
  })));
};
DeviceDetail.propTypes = {
  id: _propTypes["default"].string
};
var _default = exports["default"] = DeviceDetail;
//# sourceMappingURL=index.js.map
