@titaui/pc 1.15.100 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/lib/components/book-demo/components/pc/components/content/index.js +8 -6
  2. package/lib/components/book-demo/components/pc/index.js +22 -18
  3. package/lib/components/book-demo/constant.js +115 -0
  4. package/lib/components/book-demo/interface.js +1 -0
  5. package/lib/components/change-okr-modal/Filter.js +3 -1
  6. package/lib/components/change-okr-modal/Item.js +3 -1
  7. package/lib/components/common-share/publishMblog.js +3 -1
  8. package/lib/components/common-share/request-apis.js +4 -2
  9. package/lib/components/create-okr-modal/fields/okr-classify.js +3 -1
  10. package/lib/components/create-okr-modal/fields/okr-type.js +3 -1
  11. package/lib/components/create-okr-modal/index.js +3 -1
  12. package/lib/components/create-okr-modal/request-api.js +4 -2
  13. package/lib/components/create-okr-modal/utils/helper.js +3 -1
  14. package/lib/components/dynamic/components/comments-dialog/api.js +4 -2
  15. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +4 -2
  16. package/lib/components/dynamic/dynamic-item/dynamic-discovery/dynamic-footer.js +4 -2
  17. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +3 -1
  18. package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +3 -1
  19. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +3 -1
  20. package/lib/components/dynamic/dynamic-item/index.js +4 -2
  21. package/lib/components/dynamic/request-api.js +3 -1
  22. package/lib/components/eReport/eReportShare/index.js +3 -1
  23. package/lib/components/grid-layout/personal-info/index.js +4 -4
  24. package/lib/components/grid-layout/sub-employee-okr/index.js +3 -1
  25. package/lib/components/grid-layout/util/network.js +4 -2
  26. package/lib/components/grid-page/personal-info/index.js +4 -4
  27. package/lib/components/help-card/index.js +3 -1
  28. package/lib/components/help-card/request-api.js +4 -2
  29. package/lib/components/hr-header/index.js +4 -2
  30. package/lib/components/import-modal/helper.js +1 -1
  31. package/lib/components/import-modal/request-api.js +6 -2
  32. package/lib/components/import-modal/tree/okr-tree/search-form.js +2 -2
  33. package/lib/components/import-modal/tree/task-work-tree/index.js +3 -1
  34. package/lib/components/import-modal/tree-node/work-node/index.js +3 -1
  35. package/lib/components/mblog/index.js +3 -1
  36. package/lib/components/menus/components/menu-card/index.js +3 -1
  37. package/lib/components/menus/export-modules/appraisal-menus/menus.js +7 -5
  38. package/lib/components/menus/export-modules/okr-menus/menus.js +3 -1
  39. package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +3 -1
  40. package/lib/components/menus/export-modules/research-menu/index.css +9 -0
  41. package/lib/components/menus/export-modules/research-menu/index.js +120 -0
  42. package/lib/components/menus/export-modules/research-menu/menu-highlight.js +44 -0
  43. package/lib/components/menus/export-modules/research-menu/menus.js +78 -0
  44. package/lib/components/menus/export-modules/research-menu/research-front-menus.js +158 -0
  45. package/lib/components/menus/export-modules/summary-menus/menus.js +3 -1
  46. package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +3 -1
  47. package/lib/components/menus/index.js +6 -0
  48. package/lib/components/menus/request-apis.js +4 -2
  49. package/lib/components/nav-top/components/app-center/images/research.png +0 -0
  50. package/lib/components/nav-top/components/app-center/index.css +8 -0
  51. package/lib/components/nav-top/components/app-center/index.js +13 -5
  52. package/lib/components/nav-top/index.js +21 -11
  53. package/lib/components/nav-top/request.apis.js +4 -3
  54. package/lib/components/nav-top/utils.js +1 -1
  55. package/lib/components/okr-detail/base-info/base-info.js +10 -13
  56. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +3 -1
  57. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +3 -1
  58. package/lib/components/okr-detail/detail-footer/index.js +3 -1
  59. package/lib/components/okr-detail/detail-header/actions.js +1 -1
  60. package/lib/components/okr-detail/detail-header/index.js +3 -1
  61. package/lib/components/okr-detail/index.js +6 -2
  62. package/lib/components/okr-detail/request-apis.js +3 -1
  63. package/lib/components/okr-detail/schedule/components/o-progress/index.js +6 -2
  64. package/lib/components/okr-detail/schedule/util.js +3 -1
  65. package/lib/components/okr-excel/setting.js +6 -4
  66. package/lib/components/okr-filter-drawer/filter-form.js +3 -1
  67. package/lib/components/okr-flow/open-data/index.js +3 -1
  68. package/lib/components/okr-flow/request-apis.js +4 -2
  69. package/lib/components/okr-flow/utils/config.js +7 -3
  70. package/lib/components/okr-progress/components/o-progress/index.js +6 -2
  71. package/lib/components/okr-progress/util.js +3 -1
  72. package/lib/components/okr-progress-modal/request-apis.js +4 -2
  73. package/lib/components/okr-review/common.js +1 -1
  74. package/lib/components/okr-share/publishMblog.js +3 -1
  75. package/lib/components/okr-share/request-apis.js +4 -2
  76. package/lib/components/okrcase-library/index.js +3 -1
  77. package/lib/components/order-have-award/index.js +6 -2
  78. package/lib/components/part-notice/index.js +5 -1
  79. package/lib/components/period-selector/helper/index.js +3 -1
  80. package/lib/components/point-demo/index.js +9 -7
  81. package/lib/components/point-demo/point-demo.js +5 -3
  82. package/lib/components/stop-taking-modal/index.js +3 -1
  83. package/lib/components/superset-charts/utils/axios.js +4 -2
  84. package/lib/components/survey-model/index.js +7 -7
  85. package/lib/components/survey-model/instance.js +4 -2
  86. package/lib/components/task-relation-modal/helper.js +1 -1
  87. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +2 -2
  88. package/lib/components/task-relation-modal/okr-relation/request-api.js +3 -1
  89. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +3 -1
  90. package/lib/components/task-relation-modal/request-api.js +3 -1
  91. package/lib/components/task-relation-modal/tree/okr-tree/index.js +3 -1
  92. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +2 -2
  93. package/lib/components/task-relation-modal/tree/work-list/search-form.js +2 -2
  94. package/lib/components/task-relation-modal/tree/work-tree/search-form.js +2 -2
  95. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  96. package/lib/components/textarea/index.js +4 -2
  97. package/lib/components/upload/index.js +4 -2
  98. package/lib/components/upvote/request-apis.js +4 -2
  99. package/lib/components/user-selector/empty/group.js +4 -2
  100. package/lib/components/user-selector/request-apis.js +4 -2
  101. package/lib/components/version-change-modal/index.js +6 -2
  102. package/lib/components/video-modal/index.js +3 -1
  103. package/lib/components/weekly-report/card.js +9 -9
  104. package/lib/components/word-cloud/request-apis.js +4 -2
  105. package/lib/pages/aha2021/index.js +8 -4
  106. package/lib/pages/group-management/components/openData/index.js +9 -3
  107. package/lib/pages/group-management/groupInterface.js +10 -4
  108. package/lib/pages/group-management/page-view/importGroupStaff/index.js +5 -3
  109. package/lib/pages/like-ranking/index.js +3 -1
  110. package/lib/pages/new-okr-list/header/index.js +10 -4
  111. package/lib/pages/okr-map/hooks/useStorage.js +3 -1
  112. package/lib/pages/okr-map/open-data/index.js +3 -1
  113. package/lib/pages/okr-map/request-apis.js +4 -2
  114. package/lib/pages/okr-map/utils.js +10 -7
  115. package/lib/utils/auth.js +22 -14
  116. package/lib/utils/bs-global.js +21 -8
  117. package/lib/utils/helpers.js +15 -5
  118. package/lib/utils/open-data.js +14 -6
  119. package/lib/utils/platform.js +15 -5
  120. package/lib/utils/request-v1.js +9 -3
  121. package/lib/utils/request.js +3 -3
  122. package/package.json +2 -3
@@ -183,9 +183,11 @@ var OProgress = function OProgress(_ref) {
183
183
  };
184
184
 
185
185
  var handleRemind = (0, _react.useCallback)(function () {
186
+ var _BSGlobal$loginUserIn;
187
+
186
188
  // @ts-ignore
187
189
  (0, _requestApis.remindAction)({
188
- toUserId: BSGlobal.loginUserInfo.Id,
190
+ toUserId: (_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id,
189
191
  work_id: okrInfo.workId,
190
192
  type: 2
191
193
  }).then(function (resp) {
@@ -208,9 +210,11 @@ var OProgress = function OProgress(_ref) {
208
210
  }, [generalPrincipalUser]);
209
211
  var handleRemindClick = (0, _react.useCallback)(function () {
210
212
  if (isPrincipalUser) {
213
+ var _BSGlobal$loginUserIn2;
214
+
211
215
  // @ts-ignore 提醒上级查看
212
216
  (0, _requestApis.remindAction)({
213
- toUserId: BSGlobal.loginUserInfo.Id,
217
+ toUserId: (_BSGlobal$loginUserIn2 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn2 === void 0 ? void 0 : _BSGlobal$loginUserIn2.Id,
214
218
  work_id: okrInfo.workId
215
219
  }).then(function (resp) {
216
220
  if (resp.Code === 1) {
@@ -9,7 +9,9 @@ var _getLocale = require("../../../utils/getLocale");
9
9
 
10
10
  // @ts-nocheck
11
11
  var isPrincipal = function isPrincipal(principalUser) {
12
- return window.BSGlobal.loginUserInfo.Id === principalUser.userId;
12
+ var _window$BSGlobal$logi;
13
+
14
+ return ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id) === principalUser.userId;
13
15
  };
14
16
 
15
17
  exports.isPrincipal = isPrincipal;
@@ -7,15 +7,17 @@ exports.showKrWeight = exports.showKrProgress = exports.showKrConfidence = expor
7
7
 
8
8
  var _config = require("../okr-flow/utils/config");
9
9
 
10
- var showKrConfidence = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrConfidence; // 信心指数开关
10
+ var _getBSGlobal, _getBSGlobal2, _getBSGlobal3, _getBSGlobal4;
11
+
12
+ var showKrConfidence = (_getBSGlobal = (0, _config.getBSGlobal)('OkrAdvancedSetting')) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting.ShowKrConfidence; // 信心指数开关
11
13
 
12
14
  exports.showKrConfidence = showKrConfidence;
13
- var showKrProgress = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrProgress; // KR进展开关
15
+ var showKrProgress = (_getBSGlobal2 = (0, _config.getBSGlobal)('OkrAdvancedSetting')) === null || _getBSGlobal2 === void 0 ? void 0 : _getBSGlobal2.KRSetting.ShowKrProgress; // KR进展开关
14
16
 
15
17
  exports.showKrProgress = showKrProgress;
16
- var showKrWeight = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.KrWeight; // KR权重开关
18
+ var showKrWeight = (_getBSGlobal3 = (0, _config.getBSGlobal)('OkrAdvancedSetting')) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.KRSetting.KrWeight; // KR权重开关
17
19
 
18
20
  exports.showKrWeight = showKrWeight;
19
- var showKrClassify = (0, _config.getBSGlobal)('OkrAdvancedSetting').KRSetting.OkrClassify; // 类型
21
+ var showKrClassify = (_getBSGlobal4 = (0, _config.getBSGlobal)('OkrAdvancedSetting')) === null || _getBSGlobal4 === void 0 ? void 0 : _getBSGlobal4.KRSetting.OkrClassify; // 类型
20
22
 
21
23
  exports.showKrClassify = showKrClassify;
@@ -111,6 +111,8 @@ var getOrderTypeList = function getOrderTypeList() {
111
111
  };
112
112
 
113
113
  var Filter = function Filter(_ref) {
114
+ var _getBSGlobal;
115
+
114
116
  var onSearch = _ref.onSearch,
115
117
  closeFilterDrawer = _ref.closeFilterDrawer,
116
118
  setFilterNum = _ref.setFilterNum;
@@ -134,7 +136,7 @@ var Filter = function Filter(_ref) {
134
136
  isRemeber = _useState4[0],
135
137
  setIsRemeber = _useState4[1];
136
138
 
137
- var setting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
139
+ var setting = (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting;
138
140
  var openOkrType = setting.OkrTypeSetting;
139
141
  var openClassify = setting.OkrClassify;
140
142
  var formContainerRef = (0, _react.useRef)();
@@ -27,7 +27,9 @@ var getGlobal = function getGlobal(key) {
27
27
  };
28
28
 
29
29
  var getSource = function getSource() {
30
- return getGlobal("tenantInfo").Source;
30
+ var _getGlobal;
31
+
32
+ return ((_getGlobal = getGlobal("tenantInfo")) === null || _getGlobal === void 0 ? void 0 : _getGlobal.Source) || 0;
31
33
  };
32
34
 
33
35
  exports.getSource = getSource;
@@ -11,6 +11,8 @@ var _axios = _interopRequireDefault(require("axios"));
11
11
 
12
12
  var _qs = _interopRequireDefault(require("qs"));
13
13
 
14
+ var _window$BSGlobal$tena, _window$BSGlobal$logi;
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -25,9 +27,9 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
25
27
 
26
28
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
27
29
 
28
- var tenantId = window.BSGlobal && window.BSGlobal.tenantInfo.Id || 0;
30
+ var tenantId = window.BSGlobal && ((_window$BSGlobal$tena = window.BSGlobal.tenantInfo) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Id) || 0;
29
31
  exports.tenantId = tenantId;
30
- var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
32
+ var userId = window.BSGlobal && ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id) || 0;
31
33
  exports.userId = userId;
32
34
 
33
35
  var requestDomain = function requestDomain() {
@@ -6,13 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.OkrTypeSetting = exports.OkrClassifySetting = exports.KrWeightSetting = void 0;
7
7
  exports.getBSGlobal = getBSGlobal;
8
8
 
9
+ var _getBSGlobal, _getBSGlobal2, _getBSGlobal3;
10
+
9
11
  function getBSGlobal(name) {
10
12
  return name ? BSGlobal && BSGlobal[name] : BSGlobal;
11
13
  }
12
14
 
13
- var OkrTypeSetting = getBSGlobal("OkrAdvancedSetting").KRSetting.OkrTypeSetting;
15
+ var _ref = ((_getBSGlobal = getBSGlobal("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting) || {},
16
+ OkrTypeSetting = _ref.OkrTypeSetting;
17
+
14
18
  exports.OkrTypeSetting = OkrTypeSetting;
15
- var OkrClassifySetting = getBSGlobal("OkrAdvancedSetting").KRSetting.OkrClassify;
19
+ var OkrClassifySetting = ((_getBSGlobal2 = getBSGlobal("OkrAdvancedSetting")) === null || _getBSGlobal2 === void 0 ? void 0 : _getBSGlobal2.KRSetting.OkrClassify) || {};
16
20
  exports.OkrClassifySetting = OkrClassifySetting;
17
- var KrWeightSetting = getBSGlobal("OkrAdvancedSetting").KRSetting.KrWeight;
21
+ var KrWeightSetting = (_getBSGlobal3 = getBSGlobal("OkrAdvancedSetting")) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.KRSetting.KrWeight;
18
22
  exports.KrWeightSetting = KrWeightSetting;
@@ -174,9 +174,11 @@ var OProgress = function OProgress(_ref) {
174
174
  };
175
175
 
176
176
  var handleRemind = (0, _react.useCallback)(function () {
177
+ var _BSGlobal$loginUserIn;
178
+
177
179
  // @ts-ignore
178
180
  (0, _requestApis.remindAction)({
179
- toUserId: BSGlobal.loginUserInfo.Id,
181
+ toUserId: (_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id,
180
182
  work_id: okrInfo.workId,
181
183
  type: 2
182
184
  }).then(function (resp) {
@@ -199,9 +201,11 @@ var OProgress = function OProgress(_ref) {
199
201
  }, [okrInfo]);
200
202
  var handleRemindClick = (0, _react.useCallback)(function () {
201
203
  if (isPrincipalUser) {
204
+ var _BSGlobal$loginUserIn2;
205
+
202
206
  // @ts-ignore 提醒上级查看
203
207
  (0, _requestApis.remindAction)({
204
- toUserId: BSGlobal.loginUserInfo.Id,
208
+ toUserId: (_BSGlobal$loginUserIn2 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn2 === void 0 ? void 0 : _BSGlobal$loginUserIn2.Id,
205
209
  work_id: okrInfo.workId
206
210
  }).then(function (resp) {
207
211
  if (resp.Code === 1) {
@@ -9,7 +9,9 @@ var _getLocale = require("../../utils/getLocale");
9
9
 
10
10
  // @ts-nocheck
11
11
  var isPrincipal = function isPrincipal(principalUser) {
12
- return window.BSGlobal.loginUserInfo.Id === principalUser.userId;
12
+ var _window$BSGlobal$logi;
13
+
14
+ return ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id) === principalUser.userId;
13
15
  };
14
16
 
15
17
  exports.isPrincipal = isPrincipal;
@@ -7,10 +7,12 @@ exports.getORecommandProgress = exports.getKrRecommandProgress = void 0;
7
7
 
8
8
  var _axios = _interopRequireDefault(require("axios"));
9
9
 
10
+ var _BSGlobal$tenantInfo, _BSGlobal$loginUserIn;
11
+
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
13
 
12
- var tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
13
- var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
14
+ var tenantId = BSGlobal && ((_BSGlobal$tenantInfo = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo === void 0 ? void 0 : _BSGlobal$tenantInfo.Id) || 0;
15
+ var userId = BSGlobal && ((_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id) || 0;
14
16
 
15
17
  var requestDomain = function requestDomain() {
16
18
  if (!window.location.hostname.match(/dev/)) return "";
@@ -7,7 +7,7 @@ exports.taskStatusIcon = exports.isHavePermission = void 0;
7
7
 
8
8
  var _bsGlobal = require("../../utils/bs-global");
9
9
 
10
- var userInfo = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
10
+ var userInfo = (0, _bsGlobal.getBSGlobal)("loginUserInfo") || {};
11
11
  var isHavePermission = userInfo.IsRoot && userInfo.Role != 4 || userInfo.IsBoss || userInfo.IsOkrManager;
12
12
  exports.isHavePermission = isHavePermission;
13
13
  var taskStatusIcon = {
@@ -23,6 +23,8 @@ var _bsGlobal = require("../../utils/bs-global");
23
23
 
24
24
  var _getLocale = require("../../utils/getLocale");
25
25
 
26
+ var _getBSGlobal;
27
+
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
29
 
28
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -53,7 +55,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
53
55
 
54
56
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
57
 
56
- var loginUserId = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Id;
58
+ var loginUserId = (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.Id;
57
59
 
58
60
  function PublishMblog(_ref) {
59
61
  var base64 = _ref.base64,
@@ -7,10 +7,12 @@ exports.uploadBase64 = exports.getImageBase64ByUrl = exports.getBase64DownloadUr
7
7
 
8
8
  var _axios = _interopRequireDefault(require("axios"));
9
9
 
10
+ var _BSGlobal$tenantInfo, _BSGlobal$loginUserIn;
11
+
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
13
 
12
- var tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
13
- var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
14
+ var tenantId = BSGlobal && ((_BSGlobal$tenantInfo = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo === void 0 ? void 0 : _BSGlobal$tenantInfo.Id) || 0;
15
+ var userId = BSGlobal && ((_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id) || 0;
14
16
 
15
17
  var requestDomain = function requestDomain() {
16
18
  if (!window.location.hostname.match(/dev/)) return "";
@@ -27,6 +27,8 @@ require("./index.css");
27
27
 
28
28
  require("./new-ui.css");
29
29
 
30
+ var _BSGlobal$tenantInfo;
31
+
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
33
 
32
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -54,7 +56,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
54
56
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
57
 
56
58
  // @ts-ignore
57
- var prefix = BSGlobal.tenantInfo.isNewIndex ? "titaui-okr-cases-library" : "okr-cases-library";
59
+ var prefix = (_BSGlobal$tenantInfo = BSGlobal.tenantInfo) !== null && _BSGlobal$tenantInfo !== void 0 && _BSGlobal$tenantInfo.isNewIndex ? "titaui-okr-cases-library" : "okr-cases-library";
58
60
 
59
61
  function OKRCases(props) {
60
62
  var onApplyTpl = props.onApplyTpl,
@@ -27,6 +27,8 @@ var _award = _interopRequireDefault(require("./img/award.png"));
27
27
 
28
28
  require("./index.css");
29
29
 
30
+ var _getTenantInfo;
31
+
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
33
 
32
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -46,14 +48,16 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
46
48
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
47
49
 
48
50
  var preCls = 'order-have-award';
49
- var isPerformance = (0, _helpers.getTenantInfo)().tenantType == 2;
51
+ var isPerformance = ((_getTenantInfo = (0, _helpers.getTenantInfo)()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.tenantType) == 2;
50
52
  var noshowChangeVersion = (0, _platform.isFeishu)(true) && isPerformance;
51
53
 
52
54
  var OrderAward = function OrderAward() {
53
55
  var bookDemoRef = (0, _react.useRef)();
54
56
 
55
57
  var getBookDemoVersion = function getBookDemoVersion() {
56
- var menuVersion = window.BSGlobal.tenantAuthentication.MenuVersion;
58
+ var _window$BSGlobal$tena;
59
+
60
+ var menuVersion = (_window$BSGlobal$tena = window.BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.MenuVersion;
57
61
 
58
62
  if (menuVersion === _interface.ETrialVersion.OKR) {
59
63
  return _bookDemo["default"].DemoType.TryOKR;
@@ -13,8 +13,12 @@ var _localStorage = require("../../utils/local-storage");
13
13
 
14
14
  var _notAllowData = require("./not-allow-data");
15
15
 
16
+ var _bsGlobal = require("../../utils/bs-global");
17
+
16
18
  require("./index.css");
17
19
 
20
+ var _getTenantInfo;
21
+
18
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
23
 
20
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -33,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
37
 
34
38
  var preCls = "part-notice";
35
39
  var storage = new _localStorage.LocalStorage();
36
- var tenantId = window.BSGlobal.tenantInfo.Id;
40
+ var tenantId = (_getTenantInfo = (0, _bsGlobal.getTenantInfo)()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.Id;
37
41
 
38
42
  var PartNotice = function PartNotice(_ref) {
39
43
  var storageName = _ref.storageName,
@@ -55,8 +55,10 @@ function getUserInfo() {
55
55
 
56
56
 
57
57
  function getApiUrl(url) {
58
+ var _getTenantInfo;
59
+
58
60
  var uid = getUserInfo().Id;
59
- var tid = getTenantInfo().Id;
61
+ var tid = (_getTenantInfo = getTenantInfo()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.Id;
60
62
  var apiServer = getBSGlobal("apiPath");
61
63
  return "".concat(apiServer, "/api/v1/").concat(tid, "/").concat(uid, "/").concat(url);
62
64
  }
@@ -53,20 +53,22 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
53
  var isMobile = document.body.clientWidth < 768;
54
54
 
55
55
  function _default(props) {
56
+ var _getTenantInfo, _BSGlobal$loginUserIn, _BSGlobal$tenantInfo, _BSGlobal$tenantInfo2, _BSGlobal$loginUserIn2, _BSGlobal$loginUserIn3, _BSGlobal$tenantInfo3;
57
+
56
58
  var _props$visible = props.visible,
57
59
  visible = _props$visible === void 0 ? true : _props$visible,
58
60
  setVisible = props.setVisible,
59
61
  _props$localKey = props.localKey,
60
62
  localKey = _props$localKey === void 0 ? "issubmitted" : _props$localKey;
61
- var isPerformance = (0, _helpers.getTenantInfo)().tenantType == 2; // console.log(isMobile)
63
+ var isPerformance = ((_getTenantInfo = (0, _helpers.getTenantInfo)()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.tenantType) == 2; // console.log(isMobile)
62
64
  // console.log(document.body.clientWidth<800)
63
65
 
64
- var uname = BSGlobal.loginUserInfo.Name;
65
- var uid = BSGlobal.tenantInfo.Id;
66
- var source = BSGlobal.tenantInfo.Source;
67
- var lname = BSGlobal.loginUserInfo.Name;
68
- var lmobile = BSGlobal.loginUserInfo.Mobile;
69
- var lcompany = BSGlobal.tenantInfo.Name;
66
+ var uname = (_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Name;
67
+ var uid = (_BSGlobal$tenantInfo = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo === void 0 ? void 0 : _BSGlobal$tenantInfo.Id;
68
+ var source = (_BSGlobal$tenantInfo2 = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo2 === void 0 ? void 0 : _BSGlobal$tenantInfo2.Source;
69
+ var lname = (_BSGlobal$loginUserIn2 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn2 === void 0 ? void 0 : _BSGlobal$loginUserIn2.Name;
70
+ var lmobile = (_BSGlobal$loginUserIn3 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn3 === void 0 ? void 0 : _BSGlobal$loginUserIn3.Mobile;
71
+ var lcompany = (_BSGlobal$tenantInfo3 = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo3 === void 0 ? void 0 : _BSGlobal$tenantInfo3.Name;
70
72
 
71
73
  var _useState = (0, _react.useState)(lname),
72
74
  _useState2 = _slicedToArray(_useState, 2),
@@ -34,6 +34,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
34
34
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
35
 
36
36
  function _default(props) {
37
+ var _BSGlobal$tenantAuthe, _BSGlobal$loginUserIn, _BSGlobal$tenantInfo;
38
+
37
39
  if ((0, _openData.isWxTrial)()) return /*#__PURE__*/_react["default"].createElement("div", null);
38
40
 
39
41
  var _useState = (0, _react.useState)(false),
@@ -42,9 +44,9 @@ function _default(props) {
42
44
  setVisible = _useState2[1]; // 判断了一天后86400000毫秒之后再次弹窗
43
45
 
44
46
 
45
- var version = BSGlobal.tenantAuthentication.Version;
46
- var role = BSGlobal.loginUserInfo.Role;
47
- var source = BSGlobal.tenantInfo.Source;
47
+ var version = (_BSGlobal$tenantAuthe = BSGlobal.tenantAuthentication) === null || _BSGlobal$tenantAuthe === void 0 ? void 0 : _BSGlobal$tenantAuthe.Version;
48
+ var role = (_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Role;
49
+ var source = (_BSGlobal$tenantInfo = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo === void 0 ? void 0 : _BSGlobal$tenantInfo.Source;
48
50
  var newdate = new Date().getTime();
49
51
  var isSubmitted = localStorage.getItem("isSubmitted");
50
52
  var time = Number(localStorage.getItem("pointDemoTime"));
@@ -38,7 +38,9 @@ var storage = new _localStorage.LocalStorage();
38
38
 
39
39
  function StopTakingModel() {
40
40
  var _useState = (0, _react.useState)(function () {
41
- if ((0, _bsGlobal.getTenantInfo)().Source === 964) return false;
41
+ var _getTenantInfo;
42
+
43
+ if (((_getTenantInfo = (0, _bsGlobal.getTenantInfo)()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.Source) === 964) return false;
42
44
  var stopTaking = storage.getItem("stopTaking");
43
45
 
44
46
  if (stopTaking !== null && stopTaking !== void 0 && stopTaking.date) {
@@ -8,6 +8,8 @@ exports.setToken = setToken;
8
8
 
9
9
  var _axios = _interopRequireDefault(require("axios"));
10
10
 
11
+ var _window$BSGlobal$tena, _window$BSGlobal$logi;
12
+
11
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
14
 
13
15
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -21,8 +23,8 @@ var requestDomain = function requestDomain() {
21
23
  return "".concat(window.location.protocol, "//www.tita.gift");
22
24
  };
23
25
 
24
- var tenantId = window.BSGlobal && window.BSGlobal.tenantInfo.Id || 0;
25
- var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
26
+ var tenantId = window.BSGlobal && ((_window$BSGlobal$tena = window.BSGlobal.tenantInfo) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Id) || 0;
27
+ var userId = window.BSGlobal && ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id) || 0;
26
28
 
27
29
  function getToken() {
28
30
  return sessionStorage.getItem('DEMOFREE_TOKEN') || '';
@@ -101,7 +101,7 @@ var SurveyModel = function SurveyModel(_ref) {
101
101
 
102
102
  var handleCloseSurvey = function handleCloseSurvey() {
103
103
  setDialogVisible(false);
104
- localStorage.setItem("survey_model_date__".concat(loginUserInfo.Id), (0, _dayjs["default"])().toString());
104
+ localStorage.setItem("survey_model_date__".concat(loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.Id), (0, _dayjs["default"])().toString());
105
105
  };
106
106
 
107
107
  (0, _react.useEffect)(function () {
@@ -109,7 +109,7 @@ var SurveyModel = function SurveyModel(_ref) {
109
109
  if ((0, _helpers.isDingDing)()) return;
110
110
  if (!!window.location.hostname.match(/.work/)) return;
111
111
  var newDate = (0, _dayjs["default"])();
112
- var oldDate = localStorage.getItem("survey_model_date__".concat(loginUserInfo.Id));
112
+ var oldDate = localStorage.getItem("survey_model_date__".concat(loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.Id));
113
113
 
114
114
  if (endTime) {
115
115
  if ((0, _dayjs["default"])(endTime).valueOf() < (0, _dayjs["default"])().valueOf()) {
@@ -175,13 +175,13 @@ var SurveyModel = function SurveyModel(_ref) {
175
175
  nps_score: score,
176
176
  nps_advice: (0, _tools.htmlEncodeByRegExp)(advice),
177
177
  nps_score_reason: reason,
178
- user_id: loginUserInfo.Id,
179
- user_name: loginUserInfo.Name,
178
+ user_id: loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.Id,
179
+ user_name: loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.Name,
180
180
  user_contact: (0, _tools.htmlEncodeByRegExp)(contact),
181
181
  user_role_name: Role.getRole(),
182
- tenant_id: tenantInfo.Id,
183
- tenant_name: tenantInfo.Name,
184
- tenant_source_name: tenantInfo.Source.toString(),
182
+ tenant_id: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.Id,
183
+ tenant_name: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.Name,
184
+ tenant_source_name: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.Source.toString(),
185
185
  tenant_version_name: _bsGlobal.VERSION_MAP[Version]
186
186
  }
187
187
  };
@@ -8,10 +8,12 @@ exports.setToken = setToken;
8
8
 
9
9
  var _axios = _interopRequireDefault(require("axios"));
10
10
 
11
+ var _window$BSGlobal$tena, _window$BSGlobal$logi;
12
+
11
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
14
 
13
- var tenantId = window.BSGlobal.tenantInfo.Id;
14
- var userId = window.BSGlobal.loginUserInfo.Id;
15
+ var tenantId = (_window$BSGlobal$tena = window.BSGlobal.tenantInfo) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Id;
16
+ var userId = (_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id;
15
17
 
16
18
  var requestDomain = function requestDomain() {
17
19
  if (!window.location.hostname.match(/.work/)) return '';
@@ -20,7 +20,7 @@ var isOpenWorkManage = (0, _bsGlobal.getAppHead)('112'); // 开通项目
20
20
 
21
21
  exports.isOpenWorkManage = isOpenWorkManage;
22
22
  var TaskAdvancedSetting = (0, _bsGlobal.getBSGlobal)('TaskAdvancedSetting');
23
- var isOpenLabel = TaskAdvancedSetting.TaskPlanSetting.TaskLabel; // 开启分类
23
+ var isOpenLabel = TaskAdvancedSetting === null || TaskAdvancedSetting === void 0 ? void 0 : TaskAdvancedSetting.TaskPlanSetting.TaskLabel; // 开启分类
24
24
 
25
25
  exports.isOpenLabel = isOpenLabel;
26
26
  var lableTypeMap = {
@@ -59,8 +59,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
59
59
 
60
60
  var loginUser = (0, _helpers.getLoginUserInfo)();
61
61
  var user = {
62
- userId: loginUser.Id,
63
- name: loginUser.Name,
62
+ userId: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Id,
63
+ name: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Name,
64
64
  avatar: {
65
65
  original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
66
66
  color: '#bc97eb'
@@ -9,6 +9,8 @@ var _request = require("@titaui/request");
9
9
 
10
10
  var _helpers = require("../../../utils/helpers");
11
11
 
12
+ var _getLoginUserInfo;
13
+
12
14
  var dealMessage = function dealMessage(res) {
13
15
  var Code = res.Code,
14
16
  Data = res.Data;
@@ -20,7 +22,7 @@ var dealMessage = function dealMessage(res) {
20
22
  }
21
23
  };
22
24
 
23
- var id = (0, _helpers.getLoginUserInfo)().Id;
25
+ var id = (_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id;
24
26
 
25
27
  var planTableTask = function planTableTask(params, pageNum, pageSize) {
26
28
  var url = "task/search";
@@ -59,7 +59,9 @@ var TaskTree = function TaskTree(_ref) {
59
59
 
60
60
  var handleName = function handleName(id) {
61
61
  if (isWork) {
62
- window.open("#work?work_id=".concat(id, "&to_user_id=").concat((0, _helpers.getLoginUserInfo)().Id, "&status=1"));
62
+ var _getLoginUserInfo;
63
+
64
+ window.open("#work?work_id=".concat(id, "&to_user_id=").concat((_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id, "&status=1"));
63
65
  } else {
64
66
  if (noScreen) {
65
67
  window.open("https://".concat(location.host).concat(location.pathname, "#more/taskinfo?id=").concat(id));
@@ -92,6 +92,8 @@ var getKrIds = function getKrIds(workId) {
92
92
  exports.getKrIds = getKrIds;
93
93
 
94
94
  var workData = function workData(params, pageNum, pageSize) {
95
+ var _getLoginUserInfo;
96
+
95
97
  var _params$keyWords2 = params.keyWords,
96
98
  keyWords = _params$keyWords2 === void 0 ? '' : _params$keyWords2,
97
99
  _params$status = params.status,
@@ -101,7 +103,7 @@ var workData = function workData(params, pageNum, pageSize) {
101
103
  userIds = params.userIds,
102
104
  _params$isGetMileston = params.isGetMilestone,
103
105
  isGetMilestone = _params$isGetMileston === void 0 ? false : _params$isGetMileston;
104
- var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
106
+ var url = "work/list?toUserId=".concat(userIds || ((_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id));
105
107
  return (0, _request.rpost)('v1')(url, {
106
108
  keyWords: keyWords,
107
109
  orderType: 1,
@@ -98,7 +98,9 @@ function OkrTree() {
98
98
  setQuery = _useState12[1];
99
99
 
100
100
  var _useState13 = (0, _react.useState)(function () {
101
- return (0, _bsGlobal.getBSGlobal)("loginUserInfo").Id;
101
+ var _getBSGlobal;
102
+
103
+ return (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.Id;
102
104
  }),
103
105
  _useState14 = _slicedToArray(_useState13, 1),
104
106
  toUserId = _useState14[0];
@@ -58,8 +58,8 @@ function SearchForm(props) {
58
58
 
59
59
  var loginUser = (0, _helpers.getLoginUserInfo)();
60
60
  var user = {
61
- userId: loginUser.Id,
62
- name: loginUser.Name,
61
+ userId: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Id,
62
+ name: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Name,
63
63
  avatar: {
64
64
  original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
65
65
  color: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar2 = loginUser.UserAvatar) === null || _loginUser$UserAvatar2 === void 0 ? void 0 : _loginUser$UserAvatar2.Color,
@@ -46,8 +46,8 @@ function SearchForm(props) {
46
46
 
47
47
  var loginUser = (0, _helpers.getLoginUserInfo)();
48
48
  var user = {
49
- userId: loginUser.Id,
50
- name: loginUser.Name,
49
+ userId: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Id,
50
+ name: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Name,
51
51
  avatar: {
52
52
  original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
53
53
  color: '#bc97eb'
@@ -45,8 +45,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
45
 
46
46
  var loginUser = (0, _helpers.getLoginUserInfo)();
47
47
  var user = {
48
- userId: loginUser.Id,
49
- name: loginUser.Name,
48
+ userId: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Id,
49
+ name: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Name,
50
50
  avatar: {
51
51
  original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
52
52
  color: '#bc97eb'
@@ -51,7 +51,9 @@ function WorkNode(props) {
51
51
  removeSelected = _useContext.removeSelected;
52
52
 
53
53
  var gotoWorkDetail = function gotoWorkDetail() {
54
- window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=").concat((0, _helpers.getLoginUserInfo)().Id, "&status=1"));
54
+ var _getLoginUserInfo;
55
+
56
+ window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=").concat((_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id, "&status=1"));
55
57
  };
56
58
 
57
59
  var onCheckHandler = function onCheckHandler(checked) {
@@ -13,7 +13,7 @@ var _classnames2 = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  require("./index.css");
15
15
 
16
- var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "line", "changeEditStatus", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
16
+ var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "line", "changeEditStatus", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown", "disabledEnter"];
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
19
 
@@ -61,6 +61,8 @@ var Textarea = function Textarea(p) {
61
61
  onErrorChange = p.onErrorChange,
62
62
  validator = p.validator,
63
63
  _onKeyDown = p.onKeyDown,
64
+ _p$disabledEnter = p.disabledEnter,
65
+ disabledEnter = _p$disabledEnter === void 0 ? true : _p$disabledEnter,
64
66
  others = _objectWithoutProperties(p, _excluded);
65
67
 
66
68
  var prefixCls = "titaui-pc-textArea";
@@ -247,7 +249,7 @@ var Textarea = function Textarea(p) {
247
249
  _onKeyDown(e);
248
250
  }
249
251
 
250
- if (e.keyCode === 13) {
252
+ if (e.keyCode === 13 && disabledEnter) {
251
253
  e.preventDefault();
252
254
  }
253
255
  },