"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 _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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
