@titaui/pc 1.10.6-3.beta-10 → 1.10.7-2.beta-1

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.
package/.husky/pre-commit CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/bin/sh
2
2
  . "$(dirname "$0")/_/husky.sh"
3
3
 
4
- # npm run lint-staged
4
+ npm run lint-staged
@@ -221,7 +221,10 @@ var Dynamic = function Dynamic() {
221
221
  setNoMoreData(resp.Data.isEnd);
222
222
 
223
223
  if (needResetValue) {
224
- setDynamicData(resp.Data.feeds);
224
+ setDynamicData([]);
225
+ setTimeout(function () {
226
+ setDynamicData(resp.Data.feeds);
227
+ }, 0);
225
228
  } else {
226
229
  setDynamicData(JSON.parse(JSON.stringify([].concat(_toConsumableArray(dynamicData), _toConsumableArray(resp.Data.feeds)))));
227
230
  }
@@ -18,10 +18,22 @@ exports.onlineBroadcastData = exports["default"] = void 0;
18
18
  // href = "https://wiki.tita.com/pages/viewpage.action?pageId=15697741";
19
19
  // }
20
20
  var onlineBroadcastData = [{
21
+ hasOnline: true,
22
+ preContent: "「OKR 工作法」体验优化 ",
23
+ preHref: "https://wiki.tita.com/x/jIOeAQ",
24
+ isNew: true,
25
+ date: "3/29"
26
+ }, {
27
+ hasOnline: true,
28
+ preContent: "新增「同步钉钉待办」,工作实时掌握",
29
+ preHref: "https://wiki.tita.com/x/DIOeAQ",
30
+ isNew: true,
31
+ date: "3/18"
32
+ }, {
21
33
  hasOnline: true,
22
34
  preContent: "「考核」支持建立企业指标库",
23
35
  preHref: "https://wiki.tita.com/x/vYGeAQ",
24
- isNew: true,
36
+ isNew: false,
25
37
  date: "2/17"
26
38
  }, {
27
39
  hasOnline: true,
@@ -5,35 +5,49 @@
5
5
  display: flex;
6
6
  }
7
7
 
8
+ .tita-okrdt-tree__e-kr-node:hover .tita-okrdt-tree__e-kr-node-actions {
9
+ opacity: 1;
10
+ transition: all 0.2s linear;
11
+ }
12
+
13
+ .tita-okrdt-tree__e-kr-node-preicon {
14
+ display: inline-block;
15
+ line-height: 18px;
16
+ color: #2879ff;
17
+ font-size: 16px;
18
+ }
19
+
8
20
  .tita-okrdt-tree__e-kr-node-prefix {
9
21
  display: inline-block;
10
- height: 22px;
11
- font-size: 14px;
22
+ height: 18px;
23
+ font-size: 12px;
12
24
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
13
25
  color: #2879ff;
14
- line-height: 22px;
26
+ line-height: 18px;
15
27
  }
16
28
 
17
29
  .tita-okrdt-tree__e-kr-node-title {
18
30
  display: inline-block;
19
31
  margin-left: 4px;
20
- height: 22px;
21
- font-size: 14px;
32
+ height: 18px;
33
+ font-size: 12px;
22
34
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
23
35
  color: #89919f;
24
- line-height: 22px;
36
+ line-height: 18px;
25
37
  width: 100%;
26
38
  }
27
39
 
28
40
  .tita-okrdt-tree__e-kr-node-actions {
29
41
  display: inline-block;
42
+ opacity: 0;
30
43
  position: absolute;
31
44
  right: 0;
45
+ transition: all 0.2s linear;
32
46
  }
33
47
 
34
48
  .tita-okrdt-tree__e-kr-node-actions-create {
35
49
  height: 18px;
36
- font-size: 13px;
50
+ font-size: 12px;
37
51
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
38
52
  color: #2879ff;
39
53
  line-height: 18px;
@@ -43,7 +57,7 @@
43
57
  }
44
58
 
45
59
  .tita-okrdt-tree__e-kr-node-actions-create:hover {
46
- color: #5C8EFF;
60
+ color: #5c8eff;
47
61
  }
48
62
 
49
63
  .tita-okrdt-tree__e-kr-node-actions-create .tu-icon-add1 {
@@ -52,7 +66,7 @@
52
66
 
53
67
  .tita-okrdt-tree__e-kr-node-actions-connect {
54
68
  height: 18px;
55
- font-size: 13px;
69
+ font-size: 12px;
56
70
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
57
71
  color: #2879ff;
58
72
  line-height: 18px;
@@ -63,11 +77,11 @@
63
77
  }
64
78
 
65
79
  .tita-okrdt-tree__e-kr-node-actions-connect:hover {
66
- color: #5C8EFF;
80
+ color: #5c8eff;
67
81
  }
68
82
 
69
83
  .e-kr-node-layer-icon {
70
- color: #89919F;
84
+ color: #89919f;
71
85
  }
72
86
 
73
87
  .e-kr-node__guanlian-icon {
@@ -172,7 +172,9 @@ var EKrNode = function EKrNode(props) {
172
172
  return /*#__PURE__*/_react["default"].createElement("div", {
173
173
  key: index,
174
174
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node"))
175
- }, isOTask ? null : /*#__PURE__*/_react["default"].createElement("span", {
175
+ }, isOTask ? /*#__PURE__*/_react["default"].createElement("span", {
176
+ className: (0, _classnames["default"])("tu-icon-O ".concat(_precls["default"], "__e-kr-node-preicon"))
177
+ }) : /*#__PURE__*/_react["default"].createElement("span", {
176
178
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-prefix"))
177
179
  }, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
178
180
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-title")),
@@ -71,7 +71,9 @@ function _default(props) {
71
71
  _props$hasProgress = props.hasProgress,
72
72
  hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
73
73
  _props$hasRelation = props.hasRelation,
74
- hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
74
+ hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
75
+ _props$hasPrinciple = props.hasPrinciple,
76
+ hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
75
77
 
76
78
  var _useState = (0, _react.useState)(false),
77
79
  _useState2 = _slicedToArray(_useState, 2),
@@ -146,7 +148,7 @@ function _default(props) {
146
148
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-approvaling"))
147
149
  }, (0, _getLocale.getLocale)('Pro_MyS_Establishment'))), /*#__PURE__*/_react["default"].createElement("div", {
148
150
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions"))
149
- }, /*#__PURE__*/_react["default"].createElement("span", {
151
+ }, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
150
152
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-user"))
151
153
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
152
154
  name: data === null || data === void 0 ? void 0 : (_data$principalUser = data.principalUser) === null || _data$principalUser === void 0 ? void 0 : _data$principalUser.name,
@@ -95,7 +95,9 @@ function ETaskNode(props) {
95
95
  _props$hasRelation = props.hasRelation,
96
96
  hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
97
97
  _props$isPushScreen = props.isPushScreen,
98
- isPushScreen = _props$isPushScreen === void 0 ? false : _props$isPushScreen;
98
+ isPushScreen = _props$isPushScreen === void 0 ? false : _props$isPushScreen,
99
+ _props$hasPrinciple = props.hasPrinciple,
100
+ hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
99
101
 
100
102
  var _useState = (0, _react.useState)(false),
101
103
  _useState2 = _slicedToArray(_useState, 2),
@@ -370,7 +372,7 @@ function ETaskNode(props) {
370
372
  isPercent: true
371
373
  })), /*#__PURE__*/_react["default"].createElement("span", {
372
374
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions"))
373
- }, /*#__PURE__*/_react["default"].createElement("span", {
375
+ }, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
374
376
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-user"))
375
377
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
376
378
  name: user === null || user === void 0 ? void 0 : user.name,
@@ -84,13 +84,13 @@
84
84
  line-height: 18px;
85
85
  display: inline-flex;
86
86
  align-items: center;
87
+ justify-content: flex-end;
87
88
  box-sizing: border-box;
88
89
  width: 78px;
89
90
  height: 26px;
90
91
  padding: 4px;
91
92
  text-align: left;
92
93
  line-height: 26px;
93
- margin-left: 16px;
94
94
  }
95
95
 
96
96
  .tita-okrdt-tree__e-task-node-actions-date > span {
@@ -103,7 +103,7 @@
103
103
  color: #89919f;
104
104
  cursor: auto;
105
105
  width: 64px;
106
- margin-left: 4px;
106
+ margin-left: 16px;
107
107
  margin-right: 4px;
108
108
  }
109
109
 
@@ -171,14 +171,14 @@
171
171
  height: 20px;
172
172
  font-size: 12px;
173
173
  font-weight: 400;
174
- color: #F05E5E;
174
+ color: #f05e5e;
175
175
  background: rgba(240, 94, 94, 0.1);
176
176
  border-radius: 10px;
177
177
  margin-left: 8px;
178
178
  }
179
179
 
180
180
  .tita-okrdt-tree__e-project-node-gray {
181
- color: #BFC7D5 !important;
181
+ color: #bfc7d5 !important;
182
182
  }
183
183
 
184
184
  .tita-okrdt-tree__e-project-node-priority {
@@ -235,13 +235,13 @@
235
235
  line-height: 18px;
236
236
  display: inline-flex;
237
237
  align-items: center;
238
+ justify-content: flex-end;
238
239
  box-sizing: border-box;
239
240
  width: 78px;
240
241
  height: 26px;
241
242
  padding: 4px;
242
243
  text-align: left;
243
244
  line-height: 26px;
244
- margin-left: 16px;
245
245
  }
246
246
 
247
247
  .tita-okrdt-tree__e-project-node-actions-date > span {
@@ -254,7 +254,7 @@
254
254
  color: #89919f;
255
255
  cursor: auto;
256
256
  width: 64px;
257
- margin-left: 4px;
257
+ margin-left: 16px;
258
258
  margin-right: 4px;
259
259
  }
260
260
 
@@ -357,13 +357,13 @@
357
357
  line-height: 18px;
358
358
  display: inline-flex;
359
359
  align-items: center;
360
+ justify-content: flex-end;
360
361
  box-sizing: border-box;
361
362
  width: 78px;
362
363
  height: 26px;
363
364
  padding: 4px;
364
365
  text-align: left;
365
366
  line-height: 26px;
366
- margin-left: 16px;
367
367
  }
368
368
 
369
369
  .tita-okrdt-tree__e-task-level2-node-actions-date > span {
@@ -376,7 +376,7 @@
376
376
  color: #89919f;
377
377
  cursor: auto;
378
378
  width: 64px;
379
- margin-left: 4px;
379
+ margin-left: 16px;
380
380
  margin-right: 4px;
381
381
  }
382
382
 
@@ -398,7 +398,7 @@
398
398
  .tita-okrdt-tree__e-empty-node {
399
399
  font-size: 12px;
400
400
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
401
- color: #A4ACB9;
401
+ color: #a4acb9;
402
402
  line-height: 18px;
403
403
  padding-left: 12px;
404
404
  }
@@ -408,5 +408,5 @@
408
408
  }
409
409
 
410
410
  .e-node-status-icon {
411
- color: #89919F;
411
+ color: #89919f;
412
412
  }
@@ -332,7 +332,7 @@ function _default(props) {
332
332
  editable: krCanEdit,
333
333
  onEditUser: onEditUserHandler,
334
334
  nameTips: function nameTips(name) {
335
- return /*#__PURE__*/_react["default"].createElement("span", null, "\u8D1F\u8D23\u4EBA\uFF1A");
335
+ return /*#__PURE__*/_react["default"].createElement("span", null, "\u8D1F\u8D23\u4EBA\uFF1A", name);
336
336
  }
337
337
  })), showKrWeight && /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
338
338
  width: 60,
@@ -183,13 +183,6 @@ function Elist(props, ref) {
183
183
  setTotalDataNum(totalLength);
184
184
  setIsEmpty && setIsEmpty(!totalLength);
185
185
  }, [krList, oEList]);
186
- var krsTree = (0, _react.useCallback)(function (kr) {
187
- return /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
188
- key: Math.random(),
189
- data: [kr],
190
- defaultExpandedKeys: expandedKrEs
191
- });
192
- }, [expandedKrEs, krList]);
193
186
  return /*#__PURE__*/_react["default"].createElement(_context.EListContext.Provider, {
194
187
  value: {
195
188
  refreshEList: function refreshEList() {
@@ -214,11 +207,15 @@ function Elist(props, ref) {
214
207
  }, krList.map(function (kr, index) {
215
208
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], {
216
209
  padding: layoutPadding
217
- }, krsTree(kr)), // kr左后一个节点 && 没有 OE 时,不显示横线
210
+ }, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
211
+ key: Math.random(),
212
+ data: [kr],
213
+ defaultExpandedKeys: expandedKrEs
214
+ })), // kr左后一个节点 && 没有 OE 时,不显示横线
218
215
  !(index + 1 == krList.length && oEList.length == 0) && hasdivider && /*#__PURE__*/_react["default"].createElement("div", {
219
216
  className: "e__divider"
220
217
  }));
221
- }), oEList.map(function (kr) {
218
+ }), !!oEList && !!oEList.length && oEList.map(function (kr) {
222
219
  return /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], {
223
220
  padding: layoutPadding
224
221
  }, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
@@ -102,7 +102,20 @@ function RootNode(props) {
102
102
  style: {
103
103
  backgroundColor: color
104
104
  }
105
- }, rootName[0]);
105
+ }, /*#__PURE__*/_react["default"].createElement("div", {
106
+ style: {
107
+ height: '24px',
108
+ width: '12px',
109
+ overflow: 'hidden',
110
+ margin: '0px auto'
111
+ }
112
+ }, /*#__PURE__*/_react["default"].createElement("img", {
113
+ src: whiteRootImg,
114
+ style: {
115
+ maxWidth: 268
116
+ },
117
+ width: imgWidth
118
+ })));
106
119
  }
107
120
 
108
121
  if (searchType == "depart") {
@@ -6,6 +6,7 @@
6
6
  display: flex;
7
7
  align-items: center;
8
8
  position: relative;
9
+ height: 24px;
9
10
  }
10
11
 
11
12
  .okr-progress-item-wrapper .okr-progress-item-content__icon-state {
@@ -15,7 +16,7 @@
15
16
  .okr-progress-item-wrapper .okr-progress-item__percent {
16
17
  font-size: 16px;
17
18
  font-weight: 600;
18
- color: #3F4755;
19
+ color: #3f4755;
19
20
  line-height: 24px;
20
21
  margin-left: 12px;
21
22
  }
@@ -28,11 +29,11 @@
28
29
  }
29
30
 
30
31
  .okr-progress-item-wrapper .okr-progress-item__percent--advance {
31
- color: #5AD8A6;
32
+ color: #5ad8a6;
32
33
  }
33
34
 
34
35
  .okr-progress-item-wrapper .okr-progress-item__percent--delay {
35
- color: #F05E5E;
36
+ color: #f05e5e;
36
37
  }
37
38
 
38
39
  .okr-progress-item-wrapper .okr-progress-item-content--edit {
@@ -42,7 +43,7 @@
42
43
  }
43
44
 
44
45
  .okr-progress-item-wrapper .okr-progress-item-content--edit:hover {
45
- background: #F7F8FA;
46
+ background: #f7f8fa;
46
47
  }
47
48
 
48
49
  .okr-progress-item-wrapper .okr-progress-item-content__body-wrapper {
@@ -60,7 +61,7 @@
60
61
 
61
62
  .okr-progress-item-wrapper .okr-progress-item-content__body-wrapper .okr-progress-item-content__body .okr-progress-item__content {
62
63
  font-size: 14px;
63
- color: #3F4755;
64
+ color: #3f4755;
64
65
  line-height: 22px;
65
66
  white-space: pre-wrap;
66
67
  }
@@ -73,7 +74,7 @@
73
74
 
74
75
  .okr-progress-item-wrapper .okr-progress-item__content-bottom {
75
76
  font-size: 12px;
76
- color: #A4ACB9;
77
+ color: #a4acb9;
77
78
  line-height: 18px;
78
79
  margin-top: 6px;
79
80
  display: flex;
@@ -88,12 +89,12 @@
88
89
  }
89
90
 
90
91
  .okr-progress-item-wrapper .okr-progress-item__content-bottom .okr-progress-item__bottom-func-btns .okr-progress-item__bottom-btn--edit:hover {
91
- color: #2879FF;
92
+ color: #2879ff;
92
93
  cursor: pointer;
93
94
  }
94
95
 
95
96
  .okr-progress-item-wrapper .okr-progress-item__content-bottom .okr-progress-item__bottom-func-btns .okr-progress-item__bottom-btn--delete:hover {
96
- color: #F05E5E;
97
+ color: #f05e5e;
97
98
  cursor: pointer;
98
99
  }
99
100
 
@@ -106,7 +107,7 @@
106
107
  display: inline-block;
107
108
  width: 1px;
108
109
  height: 16px;
109
- background: linear-gradient(180deg, rgba(213, 219, 226, 0) 0%, #D5DBE2 49%, rgba(213, 219, 226, 0) 100%);
110
+ background: linear-gradient(180deg, rgba(213, 219, 226, 0) 0%, #d5dbe2 49%, rgba(213, 219, 226, 0) 100%);
110
111
  border-radius: 2px;
111
112
  }
112
113
 
@@ -129,7 +130,7 @@
129
130
  right: 0;
130
131
  font-size: 12px;
131
132
  font-weight: 400;
132
- color: #A4ACB9;
133
+ color: #a4acb9;
133
134
  line-height: 24px;
134
135
  padding-right: 16px;
135
136
  }
@@ -22,8 +22,8 @@ var getTimeString = function getTimeString(time, nowTime) {
22
22
  var timeYear = timeDateObj.getFullYear();
23
23
  var timeMonth = timeDateObj.getMonth() + 1;
24
24
  var timeDate = timeDateObj.getDate();
25
- var timeHours = timeDateObj.getHours();
26
- var timeMinutes = timeDateObj.getMinutes();
25
+ var timeHours = timeDateObj.getHours() < 10 ? "0".concat(timeDateObj.getHours()) : timeDateObj.getHours();
26
+ var timeMinutes = timeDateObj.getMinutes() < 10 ? "0".concat(timeDateObj.getMinutes()) : timeDateObj.getMinutes();
27
27
  var nowMilliSecond = nowTime.getTime();
28
28
  var nowYear = nowTime.getFullYear();
29
29
  var nowDate = nowTime.getDate();
@@ -56,11 +56,11 @@ var getTimeString = function getTimeString(time, nowTime) {
56
56
  if (timeYear === nowYear) {
57
57
  var _dateStr = months[timeMonth - 1] + (_getLocale.isEn ? " ".concat(timeDate, " ") : "".concat(timeDate, "\u65E5"));
58
58
 
59
- return "".concat(_dateStr, " ").concat(timeHours < 10 ? "0".concat(timeHours) : timeHours, ":").concat(timeMinutes < 10 ? "0".concat(timeMinutes) : timeMinutes);
59
+ return "".concat(_dateStr, " ", "".concat(timeHours, ":").concat(timeMinutes));
60
60
  }
61
61
 
62
62
  var dateStr = (_getLocale.isEn ? "" : "".concat(timeYear, "\u5E74")) + months[timeMonth - 1] + (_getLocale.isEn ? " ".concat(timeDate, " ") : "".concat(timeDate, "\u65E5")) + (_getLocale.isEn ? ",".concat(timeYear) : "");
63
- return "".concat(dateStr, " ").concat(timeHours < 10 ? "0".concat(timeHours) : timeHours, ":").concat(timeMinutes < 10 ? "0".concat(timeMinutes) : timeMinutes);
63
+ return "".concat(dateStr, " ", "".concat(timeHours, ":").concat(timeMinutes));
64
64
  };
65
65
 
66
66
  exports.getTimeString = getTimeString;
@@ -37,7 +37,7 @@
37
37
  position: absolute;
38
38
  width: 100%;
39
39
  bottom: 0;
40
- content: "";
40
+ content: '';
41
41
  border-bottom: 2px solid #2879ff;
42
42
  z-index: 1;
43
43
  }
@@ -51,7 +51,7 @@
51
51
  position: absolute;
52
52
  width: 100%;
53
53
  top: 0;
54
- content: "";
54
+ content: '';
55
55
  border-top: 2px solid #2879ff;
56
56
  z-index: 1;
57
57
  }
@@ -61,6 +61,7 @@
61
61
  align-items: center;
62
62
  line-height: unset;
63
63
  overflow: hidden;
64
+ border-radius: 8px;
64
65
  }
65
66
 
66
67
  .titaui-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper {
@@ -214,8 +214,7 @@ var NewOkrList = function NewOkrList(props) {
214
214
  if (!relation) {
215
215
  request = (0, _requestApi.okrSearch)(params);
216
216
  } else {
217
- // request = okrList(params);
218
- request = (0, _requestApi.okrSearch)(params);
217
+ request = (0, _requestApi.okrList)(params);
219
218
  }
220
219
 
221
220
  setLoading(true);
package/lib/utils/auth.js CHANGED
@@ -92,8 +92,10 @@ var OAuth = /*#__PURE__*/function (_BaseAuth) {
92
92
  }, {
93
93
  key: "isPrincipalUser",
94
94
  value: function isPrincipalUser() {
95
+ var _this$principalUser;
96
+
95
97
  // console.log('o isp', this.userId, this.principalUser.userId)
96
- return this.userId == this.principalUser.userId;
98
+ return this.userId == ((_this$principalUser = this.principalUser) === null || _this$principalUser === void 0 ? void 0 : _this$principalUser.userId);
97
99
  } // 有操作OKR的權限
98
100
 
99
101
  }, {
@@ -139,8 +141,10 @@ var KRAuth = /*#__PURE__*/function (_BaseAuth2) {
139
141
  }, {
140
142
  key: "isPrincipalUser",
141
143
  value: function isPrincipalUser() {
144
+ var _this$user;
145
+
142
146
  // console.log('kr isp', this.userId, this.user.userId)
143
- return this.userId == this.user.userId;
147
+ return this.userId == ((_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user.userId);
144
148
  } // 有操作KR的權限
145
149
 
146
150
  }, {
@@ -178,15 +182,19 @@ var EAuth = /*#__PURE__*/function (_BaseAuth3) {
178
182
  _createClass(EAuth, [{
179
183
  key: "isCreater",
180
184
  value: function isCreater() {
185
+ var _this$user2;
186
+
181
187
  // console.log('e iscreater', this.userId, this.user.userId)
182
- return this.userId == this.user.userId;
188
+ return this.userId == ((_this$user2 = this.user) === null || _this$user2 === void 0 ? void 0 : _this$user2.userId);
183
189
  } // 負責人
184
190
 
185
191
  }, {
186
192
  key: "isPrincipalUser",
187
193
  value: function isPrincipalUser() {
194
+ var _this$principalUser2;
195
+
188
196
  // console.log('e isp', this.userId, this.principalUser.userId)
189
- return this.userId == this.principalUser.userId;
197
+ return this.userId == ((_this$principalUser2 = this.principalUser) === null || _this$principalUser2 === void 0 ? void 0 : _this$principalUser2.userId);
190
198
  } // 有操作KR的權限
191
199
 
192
200
  }, {
@@ -268,7 +276,9 @@ var ChildAuth = /*#__PURE__*/function (_BaseAuth5) {
268
276
  _createClass(ChildAuth, [{
269
277
  key: "isPrincipalUser",
270
278
  value: function isPrincipalUser() {
271
- return this.userId == this.principalUser.userId;
279
+ var _this$principalUser3;
280
+
281
+ return this.userId == ((_this$principalUser3 = this.principalUser) === null || _this$principalUser3 === void 0 ? void 0 : _this$principalUser3.userId);
272
282
  } // 超管、助理、目标管理员以及目标负责人可以修改此目标下对齐子目标的权重;
273
283
 
274
284
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.63.beta-10",
3
+ "version": "1.10.72.beta-1",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",