@titaui/pc 1.15.84-beta.4 → 1.15.84-beta.7

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.
@@ -103,6 +103,8 @@ function OkrRowColumn(_ref) {
103
103
  }
104
104
 
105
105
  function _default(props) {
106
+ var _getBSGlobal;
107
+
106
108
  var data = props.data,
107
109
  index = props.index,
108
110
  title = props.title,
@@ -166,7 +168,7 @@ function _default(props) {
166
168
  krNameData = _useState18[0],
167
169
  setKrNameData = _useState18[1];
168
170
 
169
- var _useState19 = (0, _react.useState)((0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.ShowKrConfidence),
171
+ var _useState19 = (0, _react.useState)((_getBSGlobal = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting')) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting.ShowKrConfidence),
170
172
  _useState20 = _slicedToArray(_useState19, 1),
171
173
  showHeart = _useState20[0]; // 高级功能: 关键成果信心指数
172
174
 
@@ -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;
@@ -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 = {
@@ -105,6 +105,8 @@ var formatNum = function formatNum(num) {
105
105
  exports.formatNum = formatNum;
106
106
 
107
107
  var hasWebHead = function hasWebHead(webHeadName) {
108
+ var _window$BSGlobal4, _window$BSGlobal4$Web;
109
+
108
110
  var webHeadMap = {
109
111
  task: '1',
110
112
  okr: '113',
@@ -112,7 +114,7 @@ var hasWebHead = function hasWebHead(webHeadName) {
112
114
  apply: '907',
113
115
  kaohe: '403'
114
116
  };
115
- var webHead = window.BSGlobal.WebHead.AppHead;
117
+ var webHead = ((_window$BSGlobal4 = window.BSGlobal) === null || _window$BSGlobal4 === void 0 ? void 0 : (_window$BSGlobal4$Web = _window$BSGlobal4.WebHead) === null || _window$BSGlobal4$Web === void 0 ? void 0 : _window$BSGlobal4$Web.AppHead) || [];
116
118
  return webHead.findIndex(function (a) {
117
119
  return a.AppId === webHeadMap[webHeadName];
118
120
  }) !== -1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.15.84-beta.4",
3
+ "version": "1.15.84-beta.7",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",