Built files from Bizgaze WebServer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

appgroupmanager.js 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  3. return new (P || (P = Promise))(function (resolve, reject) {
  4. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  6. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  7. step((generator = generator.apply(thisArg, _arguments || [])).next());
  8. });
  9. };
  10. var Unibase;
  11. (function (Unibase) {
  12. let Platform;
  13. (function (Platform) {
  14. let AppGroups;
  15. (function (AppGroups) {
  16. let Managers;
  17. (function (Managers) {
  18. class AppGroupManager extends Platform.Core.BaseManager {
  19. getAppGroups() {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/unibase/platform/apps/appgroups/userid/' + Platform.Membership.Infos.Identity.getCurrentUser().userId;
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. if (response.result != null) {
  24. response.result = JSON.parse(response.result);
  25. }
  26. return response;
  27. });
  28. });
  29. }
  30. getAppGroup(appGroupId) {
  31. return __awaiter(this, void 0, void 0, function* () {
  32. const url = 'apis/v4/unibase/platform/apps/appgroups/appgroupid/' + appGroupId;
  33. return yield this.dataHelper().getAsync(url).then(function (response) {
  34. if (response.result != null) {
  35. response.result = JSON.parse(response.result);
  36. }
  37. return response;
  38. });
  39. });
  40. }
  41. updateAppGroup(obj) {
  42. return __awaiter(this, void 0, void 0, function* () {
  43. const url = 'apis/v4/unibase/platform/apps/changeappgroup';
  44. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  45. if (response.result !== null) {
  46. response.result = JSON.parse(response.result);
  47. }
  48. return response;
  49. });
  50. });
  51. }
  52. saveAppGroup(obj) {
  53. return __awaiter(this, void 0, void 0, function* () {
  54. const url = 'apis/v4/unibase/platform/apps/saveappgroup';
  55. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  56. if (response.result !== null) {
  57. response.result = JSON.parse(response.result);
  58. }
  59. return response;
  60. });
  61. });
  62. }
  63. deleteAppGroup(ToDeleteGroupId) {
  64. return __awaiter(this, void 0, void 0, function* () {
  65. const url = 'apis/v4/unibase/platform/apps/deleteappgroup/appgroupid/' + ToDeleteGroupId;
  66. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  67. if (response.result !== null) {
  68. response.result = JSON.parse(response.result);
  69. }
  70. return response;
  71. });
  72. });
  73. }
  74. getInstalledApps() {
  75. return __awaiter(this, void 0, void 0, function* () {
  76. const url = 'apis/v4/unibase/platform/apps/getinstalledapps';
  77. return yield this.dataHelper().getAsync(url).then(function (response) {
  78. if (response.result != null) {
  79. response.result = JSON.parse(response.result);
  80. }
  81. return response;
  82. });
  83. });
  84. }
  85. getUngroupedApps() {
  86. return __awaiter(this, void 0, void 0, function* () {
  87. const url = 'apis/v4/unibase/platform/apps/ungroupedapps';
  88. return yield this.dataHelper().getAsync(url).then(function (response) {
  89. if (response.result != null) {
  90. response.result = JSON.parse(response.result);
  91. }
  92. return response;
  93. });
  94. });
  95. }
  96. getAppsByGroup(groupId) {
  97. return __awaiter(this, void 0, void 0, function* () {
  98. const url = 'apis/v4/unibase/platform/apps/getappsbygroup/appgroupid/' + groupId;
  99. return yield this.dataHelper().getAsync(url).then(function (response) {
  100. if (response.result !== null) {
  101. response.result = JSON.parse(response.result);
  102. }
  103. return response;
  104. });
  105. });
  106. }
  107. saveAppGroupSettings(obj) {
  108. return __awaiter(this, void 0, void 0, function* () {
  109. const url = 'apis/v4/unibase/platform/apps/saveappgroupsettings/List';
  110. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  111. if (response.result !== null) {
  112. response.result = JSON.parse(response.result);
  113. }
  114. return response;
  115. });
  116. });
  117. }
  118. static Instance() {
  119. if (this._instance === undefined)
  120. this._instance = new AppGroupManager();
  121. return this._instance;
  122. }
  123. }
  124. Managers.AppGroupManager = AppGroupManager;
  125. })(Managers = AppGroups.Managers || (AppGroups.Managers = {}));
  126. })(AppGroups = Platform.AppGroups || (Platform.AppGroups = {}));
  127. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  128. })(Unibase || (Unibase = {}));