"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _index = require("../../index");
var _api = require("../../api");
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
var columns = [{
  title: '异常类型',
  dataIndex: 'abnormalTypeName'
}, {
  title: '等级',
  dataIndex: 'levelStr'
}, {
  title: '报警开始时间',
  dataIndex: 'alarmStartTime'
}, {
  title: '报警结束时间',
  dataIndex: 'alarmEndTime'
}];
var AlarmRecord = function AlarmRecord(_ref) {
  var startDate = _ref.startDate,
    endDate = _ref.endDate;
  var _useContext = (0, _react.useContext)(_index.RestaurantContext),
    id = _useContext.id;
  var _AlarmService$alarmRe = _api.AlarmService.alarmRecord({
      id: id,
      startDate: startDate,
      endDate: endDate
    }),
    _AlarmService$alarmRe2 = _AlarmService$alarmRe.rows,
    rows = _AlarmService$alarmRe2 === void 0 ? [] : _AlarmService$alarmRe2;
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], {
    columns: columns,
    dataSource: rows,
    size: "small",
    pagination: false
  });
};
var _default = exports["default"] = AlarmRecord;
//# sourceMappingURL=AlarmRecord.js.map
