@titaui/pc 1.15.98 → 1.15.101

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 (124) 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/depart-menus/index.js +1 -1
  46. package/lib/components/menus/export-modules/summary-menus/menus.js +3 -1
  47. package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +3 -1
  48. package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +4 -1
  49. package/lib/components/menus/index.js +6 -0
  50. package/lib/components/menus/request-apis.js +4 -2
  51. package/lib/components/nav-top/components/app-center/images/research.png +0 -0
  52. package/lib/components/nav-top/components/app-center/index.css +8 -0
  53. package/lib/components/nav-top/components/app-center/index.js +13 -5
  54. package/lib/components/nav-top/index.js +21 -11
  55. package/lib/components/nav-top/request.apis.js +6 -5
  56. package/lib/components/nav-top/utils.js +1 -1
  57. package/lib/components/okr-detail/base-info/base-info.js +10 -13
  58. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +3 -1
  59. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +3 -1
  60. package/lib/components/okr-detail/detail-footer/index.js +3 -1
  61. package/lib/components/okr-detail/detail-header/actions.js +1 -1
  62. package/lib/components/okr-detail/detail-header/index.js +3 -1
  63. package/lib/components/okr-detail/index.js +6 -2
  64. package/lib/components/okr-detail/request-apis.js +3 -1
  65. package/lib/components/okr-detail/schedule/components/o-progress/index.js +6 -2
  66. package/lib/components/okr-detail/schedule/util.js +3 -1
  67. package/lib/components/okr-excel/setting.js +6 -4
  68. package/lib/components/okr-filter-drawer/filter-form.js +3 -1
  69. package/lib/components/okr-flow/open-data/index.js +3 -1
  70. package/lib/components/okr-flow/request-apis.js +4 -2
  71. package/lib/components/okr-flow/utils/config.js +7 -3
  72. package/lib/components/okr-progress/components/o-progress/index.js +6 -2
  73. package/lib/components/okr-progress/util.js +3 -1
  74. package/lib/components/okr-progress-modal/request-apis.js +4 -2
  75. package/lib/components/okr-review/common.js +1 -1
  76. package/lib/components/okr-share/publishMblog.js +3 -1
  77. package/lib/components/okr-share/request-apis.js +4 -2
  78. package/lib/components/okrcase-library/index.js +3 -1
  79. package/lib/components/order-have-award/index.js +6 -2
  80. package/lib/components/part-notice/index.js +5 -1
  81. package/lib/components/period-selector/helper/index.js +3 -1
  82. package/lib/components/point-demo/index.js +9 -7
  83. package/lib/components/point-demo/point-demo.js +5 -3
  84. package/lib/components/stop-taking-modal/index.js +3 -1
  85. package/lib/components/superset-charts/utils/axios.js +4 -2
  86. package/lib/components/survey-model/index.js +7 -7
  87. package/lib/components/survey-model/instance.js +4 -2
  88. package/lib/components/task-relation-modal/helper.js +1 -1
  89. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +2 -2
  90. package/lib/components/task-relation-modal/okr-relation/request-api.js +3 -1
  91. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +3 -1
  92. package/lib/components/task-relation-modal/request-api.js +3 -1
  93. package/lib/components/task-relation-modal/tree/okr-tree/index.js +3 -1
  94. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +2 -2
  95. package/lib/components/task-relation-modal/tree/work-list/search-form.js +2 -2
  96. package/lib/components/task-relation-modal/tree/work-tree/search-form.js +2 -2
  97. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  98. package/lib/components/textarea/index.js +4 -2
  99. package/lib/components/upload/index.js +4 -2
  100. package/lib/components/upvote/request-apis.js +4 -2
  101. package/lib/components/user-selector/empty/group.js +4 -2
  102. package/lib/components/user-selector/request-apis.js +4 -2
  103. package/lib/components/version-change-modal/index.js +6 -2
  104. package/lib/components/video-modal/index.js +3 -1
  105. package/lib/components/weekly-report/card.js +9 -9
  106. package/lib/components/word-cloud/request-apis.js +4 -2
  107. package/lib/pages/aha2021/index.js +8 -4
  108. package/lib/pages/group-management/components/openData/index.js +9 -3
  109. package/lib/pages/group-management/groupInterface.js +10 -4
  110. package/lib/pages/group-management/page-view/importGroupStaff/index.js +5 -3
  111. package/lib/pages/like-ranking/index.js +3 -1
  112. package/lib/pages/new-okr-list/header/index.js +10 -4
  113. package/lib/pages/okr-map/hooks/useStorage.js +3 -1
  114. package/lib/pages/okr-map/open-data/index.js +3 -1
  115. package/lib/pages/okr-map/request-apis.js +4 -2
  116. package/lib/pages/okr-map/utils.js +10 -7
  117. package/lib/utils/auth.js +22 -14
  118. package/lib/utils/bs-global.js +21 -8
  119. package/lib/utils/helpers.js +15 -5
  120. package/lib/utils/open-data.js +14 -6
  121. package/lib/utils/platform.js +15 -5
  122. package/lib/utils/request-v1.js +9 -3
  123. package/lib/utils/request.js +3 -3
  124. package/package.json +3 -3
@@ -37,6 +37,8 @@ var _request = require("../../../../request");
37
37
 
38
38
  require("./index.css");
39
39
 
40
+ var _window$BSGlobal, _window$BSGlobal$logi, _window$BSGlobal2, _window$BSGlobal2$ten, _window$BSGlobal3, _window$BSGlobal3$ten, _window$BSGlobal4, _window$BSGlobal4$log, _window$BSGlobal5, _window$BSGlobal5$log, _window$BSGlobal6, _window$BSGlobal6$ten;
41
+
40
42
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
41
43
 
42
44
  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); }
@@ -72,12 +74,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
72
74
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
73
75
 
74
76
  var preCls = "titaui-book-demo-pc-content";
75
- var uname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
76
- var uid = window.BSGlobal && window.BSGlobal.tenantInfo.Id || "";
77
- var Source = window.BSGlobal && window.BSGlobal.tenantInfo.Source || (0, _utils.getSource)();
78
- var lname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
79
- var lmobile = window.BSGlobal && window.BSGlobal.loginUserInfo.Mobile || "";
80
- var lcompany = window.BSGlobal && window.BSGlobal.tenantInfo.Name || "";
77
+ var uname = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$logi = _window$BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Name) || "";
78
+ var uid = ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$ten = _window$BSGlobal2.tenantInfo) === null || _window$BSGlobal2$ten === void 0 ? void 0 : _window$BSGlobal2$ten.Id) || "";
79
+ var Source = ((_window$BSGlobal3 = window.BSGlobal) === null || _window$BSGlobal3 === void 0 ? void 0 : (_window$BSGlobal3$ten = _window$BSGlobal3.tenantInfo) === null || _window$BSGlobal3$ten === void 0 ? void 0 : _window$BSGlobal3$ten.Source) || (0, _utils.getSource)();
80
+ var lname = ((_window$BSGlobal4 = window.BSGlobal) === null || _window$BSGlobal4 === void 0 ? void 0 : (_window$BSGlobal4$log = _window$BSGlobal4.loginUserInfo) === null || _window$BSGlobal4$log === void 0 ? void 0 : _window$BSGlobal4$log.Name) || "";
81
+ var lmobile = ((_window$BSGlobal5 = window.BSGlobal) === null || _window$BSGlobal5 === void 0 ? void 0 : (_window$BSGlobal5$log = _window$BSGlobal5.loginUserInfo) === null || _window$BSGlobal5$log === void 0 ? void 0 : _window$BSGlobal5$log.Mobile) || "";
82
+ var lcompany = ((_window$BSGlobal6 = window.BSGlobal) === null || _window$BSGlobal6 === void 0 ? void 0 : (_window$BSGlobal6$ten = _window$BSGlobal6.tenantInfo) === null || _window$BSGlobal6$ten === void 0 ? void 0 : _window$BSGlobal6$ten.Name) || "";
81
83
 
82
84
  var BookDemoPCContent = function BookDemoPCContent(_ref) {
83
85
  var type = _ref.type,
@@ -19,8 +19,12 @@ var _demoClose = _interopRequireDefault(require("../../img/demo-close.svg"));
19
19
 
20
20
  var _utils = require("../../utils");
21
21
 
22
+ var _bsGlobal = require("../../../../utils/bs-global");
23
+
22
24
  require("./index.css");
23
25
 
26
+ var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$log, _window$BSGlobal3, _window$BSGlobal3$log, _getTenantInfo, _window$BSGlobal4, _window$BSGlobal4$ten;
27
+
24
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
29
 
26
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); }
@@ -39,15 +43,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
39
43
 
40
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
45
 
42
- var preCls = "titaui-book-demo-pc";
43
- var version = window.BSGlobal && window.BSGlobal.tenantAuthentication.Version;
44
- var role = window.BSGlobal && window.BSGlobal.loginUserInfo.Role;
45
- var isSubmitted = localStorage.getItem("isSubmitted");
46
- var time = Number(localStorage.getItem("pointDemoTime"));
46
+ var preCls = 'titaui-book-demo-pc';
47
+ var version = (_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Version;
48
+ var role = (_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$log = _window$BSGlobal2.loginUserInfo) === null || _window$BSGlobal2$log === void 0 ? void 0 : _window$BSGlobal2$log.Role;
49
+ var isSubmitted = localStorage.getItem('isSubmitted');
50
+ var time = Number(localStorage.getItem('pointDemoTime'));
47
51
  var newDate = new Date().getTime();
48
- var uname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
49
- var uid = window.BSGlobal && window.BSGlobal.tenantInfo.Id || "";
50
- var Source = window.BSGlobal && window.BSGlobal.tenantInfo.Source || (0, _utils.getSource)();
52
+ var uname = ((_window$BSGlobal3 = window.BSGlobal) === null || _window$BSGlobal3 === void 0 ? void 0 : (_window$BSGlobal3$log = _window$BSGlobal3.loginUserInfo) === null || _window$BSGlobal3$log === void 0 ? void 0 : _window$BSGlobal3$log.Name) || '';
53
+ var uid = ((_getTenantInfo = (0, _bsGlobal.getTenantInfo)()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.Id) || '';
54
+ var Source = ((_window$BSGlobal4 = window.BSGlobal) === null || _window$BSGlobal4 === void 0 ? void 0 : (_window$BSGlobal4$ten = _window$BSGlobal4.tenantInfo) === null || _window$BSGlobal4$ten === void 0 ? void 0 : _window$BSGlobal4$ten.Source) || (0, _utils.getSource)();
51
55
  var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
52
56
  var type = _ref.type,
53
57
  visible = _ref.visible,
@@ -67,16 +71,16 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
67
71
  setData = _useState4[1];
68
72
 
69
73
  var handleCloseBookDemo = function handleCloseBookDemo() {
70
- var content = uid ? "\u79DF\u6237ID\uFF1A".concat(uid, "\uFF0C\u79DF\u6237\u8D26\u53F7\u540D\u79F0\uFF1A").concat(uname, ",") : "";
74
+ var content = uid ? "\u79DF\u6237ID\uFF1A".concat(uid, "\uFF0C\u79DF\u6237\u8D26\u53F7\u540D\u79F0\uFF1A").concat(uname, ",") : '';
71
75
  data.forEach(function (item) {
72
- content += "".concat(item.name, ": ").concat(Array.isArray(item.value) ? item.value.join(",") : item.value, ",");
76
+ content += "".concat(item.name, ": ").concat(Array.isArray(item.value) ? item.value.join(',') : item.value, ",");
73
77
  });
74
78
  content += "source: ".concat(source || Source);
75
79
 
76
- if (window.titaTracker && !localStorage.getItem("titaccc")) {
77
- window.titaTracker("action").record({
78
- productName: "预约演示",
79
- actionGroup: "取消预约演示",
80
+ if (window.titaTracker && !localStorage.getItem('titaccc')) {
81
+ window.titaTracker('action').record({
82
+ productName: '预约演示',
83
+ actionGroup: '取消预约演示',
80
84
  actionName: "\u53D6\u6D88\u9884\u7EA6\u6F14\u793A:\u586B\u5199\u60C5\u51B5\uFF1A".concat(content)
81
85
  });
82
86
  }
@@ -123,7 +127,7 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
123
127
  if (version === 1 && role === 2) {
124
128
  setTimeout(function () {
125
129
  var date = new Date().getTime() + 86400000;
126
- localStorage.setItem("pointDemoTime", date.toString());
130
+ localStorage.setItem('pointDemoTime', date.toString());
127
131
  setDialogVisible(true);
128
132
  }, 30000);
129
133
  }
@@ -131,7 +135,7 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
131
135
  if (version === 1 && role === 2) {
132
136
  setTimeout(function () {
133
137
  var date = new Date().getTime() + 86400000;
134
- localStorage.setItem("pointDemoTime", date.toString());
138
+ localStorage.setItem('pointDemoTime', date.toString());
135
139
  setDialogVisible(true);
136
140
  }, 30000);
137
141
  }
@@ -147,8 +151,8 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
147
151
  noCloseIcon: true,
148
152
  destroyOnClose: true,
149
153
  style: {
150
- width: "742px",
151
- borderRadius: "24px"
154
+ width: '742px',
155
+ borderRadius: '24px'
152
156
  },
153
157
  maskClosable: false
154
158
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -887,6 +887,119 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
887
887
  multiSelect: false,
888
888
  halfWidth: false
889
889
  }]
890
+ }), _defineProperty(_bookTypeInfo, _interface.EDemoType.TryResearch, {
891
+ title: "预约「调查」演示",
892
+ desc: "与我们的顾问联系,了解 Tita 如何为您服务",
893
+ img: _demoPerformance["default"],
894
+ formField: [{
895
+ name: "姓名",
896
+ type: "text",
897
+ id: "username",
898
+ value: "",
899
+ required: false,
900
+ option: [],
901
+ multiSelect: false,
902
+ halfWidth: false
903
+ }, {
904
+ name: "手机号码",
905
+ type: "phone",
906
+ id: "phone",
907
+ value: "",
908
+ required: true,
909
+ option: [],
910
+ multiSelect: false,
911
+ halfWidth: false
912
+ }, {
913
+ name: "公司全称",
914
+ type: "text",
915
+ id: "tenantName",
916
+ value: "",
917
+ required: false,
918
+ option: [],
919
+ multiSelect: false,
920
+ halfWidth: false
921
+ }, {
922
+ name: "公司人数",
923
+ type: "dropSelect",
924
+ id: "employeeRange",
925
+ value: "1-30",
926
+ required: false,
927
+ option: [{
928
+ text: "1-30",
929
+ value: "1-30"
930
+ }, {
931
+ text: "30-50",
932
+ value: "30-50"
933
+ }, {
934
+ text: "50-100",
935
+ value: "50-100"
936
+ }, {
937
+ text: "100-200",
938
+ value: "100-200"
939
+ }, {
940
+ text: "200-300",
941
+ value: "200-300"
942
+ }, {
943
+ text: "300-500",
944
+ value: "300-500"
945
+ }, {
946
+ text: "500-1000",
947
+ value: "500-1000"
948
+ }, {
949
+ text: "1000-5000",
950
+ value: "1000-5000"
951
+ }, {
952
+ text: "5000-10000",
953
+ value: "5000-10000"
954
+ }, {
955
+ text: "10000+",
956
+ value: "10000+"
957
+ }, {
958
+ text: "我代表一组公司",
959
+ value: "我代表一组公司"
960
+ }],
961
+ multiSelect: false,
962
+ halfWidth: false
963
+ }, {
964
+ name: "验证码",
965
+ type: "verificationCode",
966
+ id: "verificationCode",
967
+ value: "",
968
+ required: true,
969
+ option: [],
970
+ multiSelect: false,
971
+ halfWidth: false
972
+ }, {
973
+ name: "您的公司是否做过调查",
974
+ type: "checkbox",
975
+ id: "hasCompanyDoneSurvey",
976
+ value: "",
977
+ option: [{
978
+ text: "做过",
979
+ value: "做过"
980
+ }, {
981
+ text: "没有做过",
982
+ value: "没有做过"
983
+ }],
984
+ required: false,
985
+ multiSelect: false,
986
+ halfWidth: false
987
+ }, {
988
+ name: "您的公司是否用调查作为绩效考核的一部分",
989
+ type: "checkbox",
990
+ id: "isCompanyHasSurveySystem",
991
+ value: "",
992
+ option: [{
993
+ text: "是",
994
+ value: "是"
995
+ }, {
996
+ text: "否",
997
+ value: "否"
998
+ }],
999
+ required: false,
1000
+ multiSelect: false,
1001
+ halfWidth: false
1002
+ }]
890
1003
  }), _bookTypeInfo);
891
1004
  exports.bookTypeInfo = bookTypeInfo;
892
1005
  var trackerInfo = (_trackerInfo = {}, _defineProperty(_trackerInfo, _interface.EDemoType.Learning, {
@@ -903,6 +1016,8 @@ var trackerInfo = (_trackerInfo = {}, _defineProperty(_trackerInfo, _interface.E
903
1016
  actionGroup: "预约演示"
904
1017
  }), _defineProperty(_trackerInfo, _interface.EDemoType.OfficalSiteSurvey, {
905
1018
  actionGroup: "官网Survey-预约演示"
1019
+ }), _defineProperty(_trackerInfo, _interface.EDemoType.TryResearch, {
1020
+ actionGroup: "系统内-调查预约演示"
906
1021
  }), _trackerInfo);
907
1022
  exports.trackerInfo = trackerInfo;
908
1023
  var DemoTypeTextMap = (_DemoTypeTextMap = {}, _defineProperty(_DemoTypeTextMap, _interface.EDemoType.Learning, "learning"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.OfficalSiteOKR, "OKR官网"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.OfficalSitePerformance, "考核官网"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.TryOKR, "OKR试用版"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.TryPerformance, "绩效版"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.UniversalBookDemo, "旗舰版"), _DemoTypeTextMap);
@@ -15,4 +15,5 @@ exports.EDemoType = EDemoType;
15
15
  EDemoType[EDemoType["OfficalSitePerformance"] = 5] = "OfficalSitePerformance";
16
16
  EDemoType[EDemoType["Learning"] = 6] = "Learning";
17
17
  EDemoType[EDemoType["OfficalSiteSurvey"] = 7] = "OfficalSiteSurvey";
18
+ EDemoType[EDemoType["TryResearch"] = 8] = "TryResearch";
18
19
  })(EDemoType || (exports.EDemoType = EDemoType = {}));
@@ -85,12 +85,14 @@ var FilterComp = /*#__PURE__*/function (_PureComponent) {
85
85
  // customizequery/condition/save
86
86
  // 500007/500000036/customizequery/condition/get?dataKey=62_500000036&pageId=40001
87
87
  function FilterComp(p) {
88
+ var _getBSGlobal;
89
+
88
90
  var _this;
89
91
 
90
92
  _classCallCheck(this, FilterComp);
91
93
 
92
94
  _this = _super.call(this, p);
93
- _this.KRSetting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
95
+ _this.KRSetting = (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting;
94
96
 
95
97
  _this.handleDeleteUser = function (id) {
96
98
  var _this$props = _this.props,
@@ -103,12 +103,14 @@ var Item = /*#__PURE__*/function (_PureComponent) {
103
103
  // @ts-ignore
104
104
  // const {data,keywords} = props
105
105
  function Item(props) {
106
+ var _window$BSGlobal, _window$BSGlobal$OkrA, _window$BSGlobal$OkrA2;
107
+
106
108
  var _this;
107
109
 
108
110
  _classCallCheck(this, Item);
109
111
 
110
112
  _this = _super.call(this, props);
111
- _this.isObjectiveRelevanceKr = window.BSGlobal.OkrAdvancedSetting.KRSetting.ObjectiveRelevanceKr;
113
+ _this.isObjectiveRelevanceKr = (_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$OkrA = _window$BSGlobal.OkrAdvancedSetting) === null || _window$BSGlobal$OkrA === void 0 ? void 0 : (_window$BSGlobal$OkrA2 = _window$BSGlobal$OkrA.KRSetting) === null || _window$BSGlobal$OkrA2 === void 0 ? void 0 : _window$BSGlobal$OkrA2.ObjectiveRelevanceKr;
112
114
 
113
115
  _this.onSelect = function (e, pdata) {
114
116
  e.stopPropagation();
@@ -23,6 +23,8 @@ var _getLocale = require("../../utils/getLocale");
23
23
 
24
24
  var _bsGlobal = require("../../utils/bs-global");
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 "";
@@ -30,11 +30,13 @@ var okrClassifyList = function okrClassifyList() {
30
30
  };
31
31
 
32
32
  function _default(_ref) {
33
+ var _getBSGlobal;
34
+
33
35
  var okrClassify = _ref.okrClassify,
34
36
  setOkrClassify = _ref.setOkrClassify,
35
37
  _ref$isCreateModal = _ref.isCreateModal,
36
38
  isCreateModal = _ref$isCreateModal === void 0 ? false : _ref$isCreateModal;
37
- var setting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
39
+ var setting = (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting;
38
40
  var openOkrType = setting.OkrTypeSetting;
39
41
  return /*#__PURE__*/_react["default"].createElement("div", {
40
42
  className: "create-modal__sub-block",
@@ -30,6 +30,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
30
30
  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; }
31
31
 
32
32
  function _default(_ref) {
33
+ var _getBSGlobal;
34
+
33
35
  var dept = _ref.dept,
34
36
  setDept = _ref.setDept,
35
37
  type = _ref.type,
@@ -37,7 +39,7 @@ function _default(_ref) {
37
39
  setTeam = _ref.setTeam,
38
40
  team = _ref.team,
39
41
  isCreateModal = _ref.isCreateModal;
40
- var setting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
42
+ var setting = (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting;
41
43
  var openClassify = setting.OkrClassify;
42
44
  var typeRef = (0, _react.useRef)();
43
45
  var objTypeRef = (0, _react.useRef)();
@@ -120,6 +120,8 @@ var DefaultOkrNameData = {
120
120
  };
121
121
 
122
122
  function CreateOkrModal(_ref, ref) {
123
+ var _BSGlobal$loginUserIn;
124
+
123
125
  var initCycle = _ref.initCycle,
124
126
  userInfo = _ref.userInfo,
125
127
  onSuccess = _ref.onSuccess,
@@ -147,7 +149,7 @@ function CreateOkrModal(_ref, ref) {
147
149
  setVisible = _useState4[1]; // @ts-ignore
148
150
 
149
151
 
150
- var userId = BSGlobal.loginUserInfo.Id;
152
+ var userId = (_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id;
151
153
  var setting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
152
154
  var openOkrType = setting.OkrTypeSetting;
153
155
  var openClassify = setting.OkrClassify;
@@ -11,6 +11,8 @@ var _axios = _interopRequireDefault(require("axios"));
11
11
 
12
12
  var _qs = _interopRequireDefault(require("qs"));
13
13
 
14
+ var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$log;
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
18
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
@@ -25,8 +27,8 @@ 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;
29
- var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
30
+ var tenantId = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantInfo) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Id) || 0;
31
+ var userId = ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$log = _window$BSGlobal2.loginUserInfo) === null || _window$BSGlobal2$log === void 0 ? void 0 : _window$BSGlobal2$log.Id) || 0;
30
32
 
31
33
  var requestDomain = function requestDomain() {
32
34
  if (!window.location.hostname.match(/dev/)) return "";
@@ -96,8 +96,10 @@ function _taker() {
96
96
  }
97
97
 
98
98
  function getApiUrl(url) {
99
+ var _getTenantInfo;
100
+
99
101
  var uid = (0, _bsGlobal.getUserInfo)().Id;
100
- var tid = (0, _bsGlobal.getTenantInfo)().Id;
102
+ var tid = (_getTenantInfo = (0, _bsGlobal.getTenantInfo)()) === null || _getTenantInfo === void 0 ? void 0 : _getTenantInfo.Id;
101
103
  var apiServer = (0, _bsGlobal.getBSGlobal)("apiPath");
102
104
  return "".concat(apiServer, "/api/v1/").concat(tid, "/").concat(uid, "/").concat(url);
103
105
  }
@@ -7,9 +7,11 @@ exports.userId = exports.tenantId = exports.setSummaryEvaluate = exports.getSumm
7
7
 
8
8
  var _request = require("@titaui/request");
9
9
 
10
- var tenantId = window.BSGlobal && window.BSGlobal.tenantInfo.Id || 0;
10
+ var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$log;
11
+
12
+ var tenantId = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantInfo) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Id) || 0;
11
13
  exports.tenantId = tenantId;
12
- var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0; // 获取评价数据
14
+ var userId = ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$log = _window$BSGlobal2.loginUserInfo) === null || _window$BSGlobal2$log === void 0 ? void 0 : _window$BSGlobal2$log.Id) || 0; // 获取评价数据
13
15
 
14
16
  exports.userId = userId;
15
17
 
@@ -122,8 +122,10 @@ var DynamicFooter = function DynamicFooter(_ref) {
122
122
  var actionName = "";
123
123
 
124
124
  if (type) {
125
- var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
126
- var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
125
+ var _getBSGlobal3, _getBSGlobal4;
126
+
127
+ var avatar = (_getBSGlobal3 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.UserAvatar;
128
+ var name = (_getBSGlobal4 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal4 === void 0 ? void 0 : _getBSGlobal4.Name;
127
129
  avatar.color = avatar.Color;
128
130
  avatar.medium = avatar.Medium;
129
131
  var parseUser = {
@@ -122,8 +122,10 @@ var DynamicFooter = function DynamicFooter(_ref) {
122
122
  var actionName = "";
123
123
 
124
124
  if (type) {
125
- var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
126
- var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
125
+ var _getBSGlobal3, _getBSGlobal4;
126
+
127
+ var avatar = (_getBSGlobal3 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.UserAvatar;
128
+ var name = (_getBSGlobal4 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal4 === void 0 ? void 0 : _getBSGlobal4.Name;
127
129
  avatar.color = avatar.Color;
128
130
  avatar.medium = avatar.Medium;
129
131
  var parseUser = {
@@ -28,6 +28,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
28
28
  var preCls = "titaui-dynamic-interview-share";
29
29
 
30
30
  function DynamicInterviewShare(_ref) {
31
+ var _window$BSGlobal$logi;
32
+
31
33
  var data = _ref.data,
32
34
  onDeleteFeed = _ref.onDeleteFeed,
33
35
  _ref$hasDynamicOperea = _ref.hasDynamicOpereateAuth,
@@ -35,7 +37,7 @@ function DynamicInterviewShare(_ref) {
35
37
  var publishUser = data.publishUser,
36
38
  content = data.content,
37
39
  shareFeedSource = data.shareFeedSource;
38
- var isPublisher = data.publishUser.userId === window.BSGlobal.loginUserInfo.Id;
40
+ var isPublisher = data.publishUser.userId === ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id);
39
41
  var renderDesc = (0, _react.useMemo)(function () {
40
42
  return /*#__PURE__*/_react["default"].createElement("span", {
41
43
  className: "".concat(preCls, "__operate-desc")
@@ -57,6 +57,8 @@ var prefix = "titaui-dynamic-share-to-dynamic";
57
57
  var userId = (0, _bsGlobal.getUserInfo)().Id;
58
58
 
59
59
  var DynamicLearning = function DynamicLearning(_ref) {
60
+ var _window$BSGlobal$logi;
61
+
60
62
  var data = _ref.data,
61
63
  _ref$hasDynamicOperea = _ref.hasDynamicOpereateAuth,
62
64
  hasDynamicOpereateAuth = _ref$hasDynamicOperea === void 0 ? false : _ref$hasDynamicOperea,
@@ -66,7 +68,7 @@ var DynamicLearning = function DynamicLearning(_ref) {
66
68
  searchKeyWord = _useContext.searchKeyWord;
67
69
 
68
70
  var contentRef = (0, _react.useRef)();
69
- var isPublisher = data.publishUser.userId === window.BSGlobal.loginUserInfo.Id;
71
+ var isPublisher = data.publishUser.userId === ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id);
70
72
 
71
73
  var _useState = (0, _react.useState)(),
72
74
  _useState2 = _slicedToArray(_useState, 2),
@@ -48,6 +48,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
48
48
  var prefix = "titaui-dynamic-share-item";
49
49
 
50
50
  var DynamicShare = function DynamicShare(_ref) {
51
+ var _window$BSGlobal$logi;
52
+
51
53
  var data = _ref.data,
52
54
  _ref$dynamicShareIsSh = _ref.dynamicShareIsShowToping,
53
55
  dynamicShareIsShowToping = _ref$dynamicShareIsSh === void 0 ? true : _ref$dynamicShareIsSh,
@@ -61,7 +63,7 @@ var DynamicShare = function DynamicShare(_ref) {
61
63
  searchKeyWord = _useContext.searchKeyWord;
62
64
 
63
65
  var contentRef = (0, _react.useRef)();
64
- var isPublisher = data.publishUser.userId === window.BSGlobal.loginUserInfo.Id;
66
+ var isPublisher = data.publishUser.userId === ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id);
65
67
  var renderDesc = (0, _react.useMemo)(function () {
66
68
  var text = (0, _getLocale.getLocale)("Mod_postedshare"); // const { obj } = data;
67
69
  // if (obj && obj.objType === EObjType.Kr) {
@@ -238,8 +238,10 @@ var DynamicItem = function DynamicItem(_ref) {
238
238
  var actionName = "";
239
239
 
240
240
  if (type) {
241
- var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
242
- var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
241
+ var _getBSGlobal3, _getBSGlobal4;
242
+
243
+ var avatar = (_getBSGlobal3 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.UserAvatar;
244
+ var name = (_getBSGlobal4 = (0, _bsGlobal.getBSGlobal)("loginUserInfo")) === null || _getBSGlobal4 === void 0 ? void 0 : _getBSGlobal4.Name;
243
245
  avatar.color = avatar.Color;
244
246
  avatar.medium = avatar.Medium;
245
247
  var parseUser = {
@@ -7,8 +7,10 @@ exports.topDynamic = exports.setSummaryAlreadyRead = exports.deleteDynamic = exp
7
7
 
8
8
  var _request = require("../../utils/request");
9
9
 
10
+ var _BSGlobal$loginUserIn;
11
+
10
12
  // @ts-ignore
11
- var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
13
+ var userId = BSGlobal && ((_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id) || 0;
12
14
 
13
15
  var topDynamic = function topDynamic(_ref) {
14
16
  var feedId = _ref.feedId;
@@ -53,12 +53,14 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
53
53
  var _super = _createSuper(EReportShare);
54
54
 
55
55
  function EReportShare(props) {
56
+ var _BSGlobal$loginUserIn, _BSGlobal$loginUserIn2, _BSGlobal$loginUserIn3;
57
+
56
58
  var _this;
57
59
 
58
60
  _classCallCheck(this, EReportShare);
59
61
 
60
62
  _this = _super.call(this, props);
61
- _this.isManager = BSGlobal.loginUserInfo.IsRoot || BSGlobal.loginUserInfo.IsBoss || BSGlobal.loginUserInfo.IsOkrManager;
63
+ _this.isManager = ((_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.IsRoot) || ((_BSGlobal$loginUserIn2 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn2 === void 0 ? void 0 : _BSGlobal$loginUserIn2.IsBoss) || ((_BSGlobal$loginUserIn3 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn3 === void 0 ? void 0 : _BSGlobal$loginUserIn3.IsOkrManager);
62
64
 
63
65
  _this.handlerContentSubmit = function (submitType, sentData) {
64
66
  var _this$props = _this.props,
@@ -108,16 +108,16 @@ function PersonalInfoComponent() {
108
108
  for (var item in loginUserInfo) {
109
109
  switch (item) {
110
110
  case "IsBoss":
111
- loginUserInfo.IsBoss && userRoleList.push("boss");
111
+ (loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.IsBoss) && userRoleList.push("boss");
112
112
  break;
113
113
 
114
114
  case "Role":
115
- loginUserInfo.Role === 2 && userRoleList.push("super");
116
- loginUserInfo.Role === 4 && userRoleList.push("userManager");
115
+ (loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.Role) === 2 && userRoleList.push("super");
116
+ (loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.Role) === 4 && userRoleList.push("userManager");
117
117
  break;
118
118
 
119
119
  case "IsTitaFeedSystemManager":
120
- loginUserInfo.IsTitaFeedSystemManager && userRoleList.push("assistant");
120
+ (loginUserInfo === null || loginUserInfo === void 0 ? void 0 : loginUserInfo.IsTitaFeedSystemManager) && userRoleList.push("assistant");
121
121
  break;
122
122
  }
123
123
  }
@@ -63,8 +63,10 @@ function SubOKRComponents() {
63
63
  setIsLeader = _useState8[1];
64
64
 
65
65
  (0, _react.useEffect)(function () {
66
+ var _BSGlobal$loginUserIn;
67
+
66
68
  // @ts-ignore
67
- if (BSGlobal && BSGlobal.loginUserInfo.IsLeader) {
69
+ if (BSGlobal && (_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) !== null && _BSGlobal$loginUserIn !== void 0 && _BSGlobal$loginUserIn.IsLeader) {
68
70
  setIsLeader(true);
69
71
  setIsSubTab(true);
70
72
  }