CloudNSPanelController.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. var __extends = (this && this.__extends) || (function () {
  3. var extendStatics = function (d, b) {
  4. extendStatics = Object.setPrototypeOf ||
  5. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  6. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  7. return extendStatics(d, b);
  8. };
  9. return function (d, b) {
  10. if (typeof b !== "function" && b !== null)
  11. throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  12. extendStatics(d, b);
  13. function __() { this.constructor = d; }
  14. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  15. };
  16. })();
  17. var __importDefault = (this && this.__importDefault) || function (mod) {
  18. return (mod && mod.__esModule) ? mod : { "default": mod };
  19. };
  20. Object.defineProperty(exports, "__esModule", { value: true });
  21. var channelMap_1 = require("../config/channelMap");
  22. var CloudDeviceController_1 = __importDefault(require("./CloudDeviceController"));
  23. var CloudNSPanelController = (function (_super) {
  24. __extends(CloudNSPanelController, _super);
  25. function CloudNSPanelController(props) {
  26. var _this = this;
  27. var _a;
  28. _this = _super.call(this, props) || this;
  29. _this.entityId = "switch.".concat(props.deviceId);
  30. _this.uiid = props.extra.uiid;
  31. _this.channelName = (_a = props.tags) === null || _a === void 0 ? void 0 : _a.ck_channel_name;
  32. _this.maxChannel = (0, channelMap_1.getMaxChannelByUiid)(props.extra.uiid);
  33. _this.params = props.params;
  34. return _this;
  35. }
  36. return CloudNSPanelController;
  37. }(CloudDeviceController_1.default));
  38. exports.default = CloudNSPanelController;