@titaui/pc 1.16.11 → 1.16.14

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.
@@ -215,7 +215,11 @@ var krWeightRenderer = function krWeightRenderer(update) {
215
215
  return isLast ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
216
216
  overlay: (0, _getLocale.getLocale)('OKR_ComAll_SKRChweight'),
217
217
  placement: "top"
218
- }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(KRWeight, {
218
+ }, /*#__PURE__*/_react["default"].createElement("div", {
219
+ style: {
220
+ height: '100%'
221
+ }
222
+ }, /*#__PURE__*/_react["default"].createElement(KRWeight, {
219
223
  value: (data && data.krWeight || 0).toFixed(1),
220
224
  onChange: handleEditKRWeight,
221
225
  disabled: isLast,
@@ -12,6 +12,7 @@
12
12
  .tita-okr-excel-create-okr-align__empty {
13
13
  font-size: 14px;
14
14
  color: #bfc7d5;
15
+ white-space: nowrap;
15
16
  }
16
17
 
17
18
  .tita-okr-excel-create-okr-align__okr {
@@ -12,6 +12,9 @@
12
12
  }
13
13
 
14
14
  .tita-okr-excel-create-okr-principal .titaui-pc-avator-container {
15
- height: 24px;
16
15
  margin-right: 7px;
17
16
  }
17
+
18
+ .tita-okr-excel-create-okr-principal .titaui-pc-avator-wrapper {
19
+ height: 20px;
20
+ }
@@ -1,5 +1,4 @@
1
1
  .tita-okr-excel-create-visibility {
2
- position: absolute;
3
2
  left: 0;
4
3
  top: 0;
5
4
  width: 100%;
@@ -9,7 +8,6 @@
9
8
 
10
9
  .tita-okr-excel-create-visibility__content {
11
10
  box-sizing: border-box;
12
- padding: 0 12px;
13
11
  width: 100%;
14
12
  height: 100%;
15
13
  display: flex;
@@ -24,6 +22,18 @@
24
22
  padding: 2px 6px;
25
23
  }
26
24
 
25
+ .tita-okr-excel-create-visibility__item {
26
+ border-radius: 12px;
27
+ font-size: 14px;
28
+ color: #141c28;
29
+ line-height: 18px;
30
+ padding: 2px 6px;
31
+ display: inline-block;
32
+ margin-bottom: 2px;
33
+ white-space: nowrap;
34
+ margin-right: 4px;
35
+ }
36
+
27
37
  .tita-okr-excel-create-visibility__selector {
28
38
  background: #ffffff;
29
39
  box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
@@ -131,7 +131,6 @@ var Visibility = function Visibility(_ref) {
131
131
  oldSelect.current = data.value;
132
132
 
133
133
  if (onChangeVisiableLimit) {
134
- console.log('data.value', data.value);
135
134
  onChangeVisiableLimit(data.value);
136
135
  } // @ts-ignore
137
136
 
@@ -145,37 +144,53 @@ var Visibility = function Visibility(_ref) {
145
144
  if (visiableLimitState) {
146
145
  if (visiableLimitState.users && visiableLimitState.users.length > 0) {
147
146
  visiableLimitState.users.forEach(function (item, index) {
148
- if (index !== 0) {
149
- result.push('、');
150
- }
151
-
152
- result.push( /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
147
+ result.push( /*#__PURE__*/_react["default"].createElement("span", {
148
+ className: "".concat(prefix, "__item"),
149
+ style: {
150
+ background: VisibilityColorMap[visibilityState]
151
+ }
152
+ }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
153
153
  name: item.name,
154
154
  id: item.userId,
155
155
  type: 'userName'
156
- }));
156
+ })));
157
157
  });
158
158
  }
159
159
 
160
160
  if (visiableLimitState.departments && visiableLimitState.departments.length > 0) {
161
161
  visiableLimitState.departments.forEach(function (item, index) {
162
- result.push(index === 0 && result.length === 0 ? '' : '、');
163
- result.push( /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
162
+ // result.push(index === 0 && result.length === 0 ? '' : '、')
163
+ result.push( /*#__PURE__*/_react["default"].createElement("span", {
164
+ className: "".concat(prefix, "__item"),
165
+ style: {
166
+ background: VisibilityColorMap[visibilityState]
167
+ }
168
+ }, /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
164
169
  name: item.name,
165
170
  id: item.id
166
- }));
171
+ })));
167
172
  });
168
173
  }
169
174
 
170
175
  if (visiableLimitState.groups && visiableLimitState.groups.length > 0) {
171
176
  visiableLimitState.groups.forEach(function (item, index) {
172
- result.push(index === 0 && result.length === 0 ? '' : '、');
173
- result.push(item.name);
177
+ // result.push(index === 0 && result.length === 0 ? '' : '、')
178
+ result.push( /*#__PURE__*/_react["default"].createElement("span", {
179
+ className: "".concat(prefix, "__item"),
180
+ style: {
181
+ background: VisibilityColorMap[visibilityState]
182
+ }
183
+ }, item.name));
174
184
  });
175
185
  }
176
186
  }
177
187
 
178
- return result.length > 0 ? result : getVisibilityMapText()[visibilityState];
188
+ return result.length > 0 ? /*#__PURE__*/_react["default"].createElement("p", null, result) : /*#__PURE__*/_react["default"].createElement("p", {
189
+ className: "".concat(prefix, "__content-text"),
190
+ style: {
191
+ background: VisibilityColorMap[visibilityState]
192
+ }
193
+ }, getVisibilityMapText()[visibilityState]);
179
194
  }, [visiableLimitState, visibilityState]);
180
195
  var renderPopContent = (0, _react.useMemo)(function () {
181
196
  var list = getVisibilityList();
@@ -198,12 +213,7 @@ var Visibility = function Visibility(_ref) {
198
213
  ref: popRef
199
214
  }, /*#__PURE__*/_react["default"].createElement("div", {
200
215
  className: "".concat(prefix, "__content")
201
- }, /*#__PURE__*/_react["default"].createElement("span", {
202
- className: "".concat(prefix, "__content-text"),
203
- style: {
204
- background: VisibilityColorMap[visibilityState]
205
- }
206
- }, renderText))), /*#__PURE__*/_react["default"].createElement(_index["default"], {
216
+ }, renderText)), /*#__PURE__*/_react["default"].createElement(_index["default"], {
207
217
  popupAlign: {
208
218
  offset: [-550, -100],
209
219
  overflow: {
@@ -11,9 +11,16 @@
11
11
  display: none;
12
12
  }
13
13
 
14
+ .tita-okr-excel-create__table-content {
15
+ display: flex;
16
+ width: max-content;
17
+ flex-direction: column;
18
+ }
19
+
14
20
  .tita-okr-excel-create__add-o {
15
21
  box-sizing: border-box;
16
22
  height: 40px;
23
+ width: 100%;
17
24
  padding: 0 12px;
18
25
  display: flex;
19
26
  align-items: center;
@@ -23,16 +30,24 @@
23
30
  color: #6F7886;
24
31
  line-height: 22px;
25
32
  cursor: pointer;
33
+ border-top: 1px solid #e2e2e2;
26
34
  border-bottom: 1px solid #e2e2e2;
27
- border-radius: 0 0 12px 12px;
35
+ border-right: 1px solid #e2e2e2;
36
+ }
37
+
38
+ .tita-okr-excel-create__add-o > div {
39
+ position: sticky;
40
+ display: flex;
41
+ align-items: center;
42
+ left: 12px;
28
43
  }
29
44
 
30
- .tita-okr-excel-create__add-o > * + * {
45
+ .tita-okr-excel-create__add-o > div > * + * {
31
46
  margin-left: 4px;
32
47
  }
33
48
 
34
49
  .tita-okr-excel-create__table-excel-v2 {
35
- border-radius: 12px 12px 0 0;
50
+ border-radius: 12px;
36
51
  }
37
52
 
38
53
  .tita-okr-excel-create .cell-span {
@@ -337,20 +337,22 @@ var OKRExcelCreate = function OKRExcelCreate(_ref3) {
337
337
  // </PopupSelect> */}
338
338
 
339
339
 
340
- console.log('hiddenRemoveIcon', hiddenRemoveIcon);
341
340
  return /*#__PURE__*/_react["default"].createElement("div", {
342
341
  className: "".concat(className)
343
342
  }, /*#__PURE__*/_react["default"].createElement(_tableExcelV["default"], {
344
343
  className: (0, _classnames["default"])("".concat(preCls, "__table-excel-v2 ").concat(tableClassName), _defineProperty({}, "".concat(preCls, "--disabled-remove"), hiddenRemoveIcon)),
345
344
  rowKey: "uuid",
345
+ fixedHeader: true,
346
+ pinned: [1, 0],
346
347
  columns: columnsOption,
347
- dataSource: excelTableData
348
- }), /*#__PURE__*/_react["default"].createElement("div", {
349
- onClick: onAddOHandler,
350
- className: "".concat(preCls, "__add-o")
351
- }, /*#__PURE__*/_react["default"].createElement("i", {
352
- className: "tu-icon-add1"
353
- }), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)(isMax ? 'OKR_ComAll_Supports50' : 'OKR_ComAll_AddObjective'))));
348
+ dataSource: excelTableData,
349
+ rowLastNode: /*#__PURE__*/_react["default"].createElement("div", {
350
+ onClick: onAddOHandler,
351
+ className: "".concat(preCls, "__add-o")
352
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("i", {
353
+ className: "tu-icon-add1"
354
+ }), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)(isMax ? 'OKR_ComAll_Supports50' : 'OKR_ComAll_AddObjective'))))
355
+ }));
354
356
  };
355
357
 
356
358
  var _default = OKRExcelCreate;
@@ -2,11 +2,34 @@
2
2
  position: relative;
3
3
  box-shadow: 0 0 0 1px #e2e2e2;
4
4
  background-color: #fff;
5
- overflow-x: auto;
5
+ overflow: auto;
6
+ }
7
+
8
+ .titaui-table-excel-v2__main {
9
+ width: max-content;
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+
14
+ .titaui-table-excel-v2--header-fixed .titaui-table-excel-v2__header {
15
+ position: sticky;
16
+ top: 0;
6
17
  }
7
18
 
8
19
  .titaui-table-excel-v2__header {
9
20
  display: flex;
21
+ z-index: 3;
22
+ width: max-content;
23
+ transition: box-shadow .3s;
24
+ }
25
+
26
+ .titaui-table-excel-v2__header--shadow {
27
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
28
+ }
29
+
30
+ .titaui-table-excel-v2__header--fixed {
31
+ position: absolute;
32
+ top: 0;
10
33
  }
11
34
 
12
35
  .titaui-table-excel-v2__header__drag-size-bar {
@@ -14,7 +37,7 @@
14
37
  right: -2px;
15
38
  height: 100%;
16
39
  width: 5px;
17
- z-index: 3;
40
+ z-index: 4;
18
41
  cursor: col-resize;
19
42
  }
20
43
 
@@ -26,10 +49,13 @@
26
49
  min-height: 40px;
27
50
  padding: 0 12px;
28
51
  color: #89919F;
52
+ background-color: #fff;
29
53
  font-size: 12px;
30
54
  font-weight: 600;
31
55
  box-sizing: border-box;
32
56
  transition: background-color .3s;
57
+ white-space: nowrap;
58
+ text-overflow: ellipsis;
33
59
  }
34
60
 
35
61
  .titaui-table-excel-v2__header__item--aligin-left {
@@ -48,6 +74,44 @@
48
74
  background-color: #f2f2f2;
49
75
  }
50
76
 
77
+ .titaui-table-excel-v2__isPinned::after {
78
+ content: '';
79
+ position: absolute;
80
+ width: 10px;
81
+ height: 100%;
82
+ transition: box-shadow .3s;
83
+ }
84
+
85
+ .titaui-table-excel-v2__isPinned--left::after {
86
+ content: '';
87
+ position: absolute;
88
+ transform: translate(100%);
89
+ width: 10px;
90
+ height: 100%;
91
+ transition: box-shadow .3s;
92
+ top: 0;
93
+ right: 0;
94
+ }
95
+
96
+ .titaui-table-excel-v2__isPinned--right::after {
97
+ content: '';
98
+ position: absolute;
99
+ transform: translate(-100%);
100
+ width: 10px;
101
+ height: 100%;
102
+ transition: box-shadow .3s;
103
+ top: 0;
104
+ left: 0;
105
+ }
106
+
107
+ .titaui-table-excel-v2__isPinned--left-shadow {
108
+ border-right: 0 !important;
109
+ }
110
+
111
+ .titaui-table-excel-v2__isPinned--left-shadow::after, .titaui-table-excel-v2__isPinned--right-shadow::after {
112
+ box-shadow: inset 10px 0 8px -8px #00000026;
113
+ }
114
+
51
115
  .titaui-table-excel-v2__childs {
52
116
  display: flex;
53
117
  flex-direction: column;
@@ -59,6 +123,7 @@
59
123
 
60
124
  .titaui-table-excel-v2__row {
61
125
  display: flex;
126
+ z-index: 1;
62
127
  }
63
128
 
64
129
  .titaui-table-excel-v2__box {
@@ -68,6 +133,7 @@
68
133
  box-sizing: border-box;
69
134
  flex-shrink: 0;
70
135
  background-color: #fff;
136
+ min-width: 24px;
71
137
  }
72
138
 
73
139
  .titaui-table-excel-v2__box-content {
@@ -13,6 +13,8 @@ var _web = require("@react-spring/web");
13
13
 
14
14
  var _react2 = require("@use-gesture/react");
15
15
 
16
+ var _classnames = _interopRequireDefault(require("classnames"));
17
+
16
18
  var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
17
19
 
18
20
  var _get = _interopRequireDefault(require("lodash/get"));
@@ -21,8 +23,6 @@ var _array = require("../../utils/array");
21
23
 
22
24
  require("./index.css");
23
25
 
24
- var _classnames = _interopRequireDefault(require("classnames"));
25
-
26
26
  var _excluded = ["render"];
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -137,6 +137,56 @@ var findColumnIndex = function findColumnIndex(columns, columnKey) {
137
137
  });
138
138
  };
139
139
 
140
+ var getPinnedLeft = function getPinnedLeft(currentIndex, columns) {
141
+ return columns.slice(0, currentIndex).reduce(function (pre, cur) {
142
+ return pre + cur.width;
143
+ }, 0);
144
+ };
145
+
146
+ var getPinnedRight = function getPinnedRight(currentIndex, columns) {
147
+ return columns.slice(currentIndex).reduce(function (pre, cur) {
148
+ return pre + cur.width;
149
+ }, 0);
150
+ };
151
+
152
+ var getPinnedOption = function getPinnedOption(columns, currentIndex, pinned) {
153
+ if (!pinned) return {
154
+ isPinned: false,
155
+ pinnedStyle: {}
156
+ };
157
+ var columnsLength = columns.length;
158
+ var leftIndex = pinned[0] - 1;
159
+ var rightIndex = columnsLength - ((pinned[1] || 0) - 1);
160
+ var result = {
161
+ isPinned: true,
162
+ pinnedStyle: {},
163
+ pinnedIndex: [leftIndex, rightIndex]
164
+ };
165
+
166
+ if (currentIndex <= leftIndex) {
167
+ result.pinnedStyle = {
168
+ position: 'sticky',
169
+ left: getPinnedLeft(currentIndex, columns),
170
+ zIndex: 2
171
+ };
172
+ return result;
173
+ }
174
+
175
+ if (currentIndex >= rightIndex) {
176
+ result.pinnedStyle = {
177
+ position: 'sticky',
178
+ right: getPinnedRight(currentIndex, columns),
179
+ zIndex: 2
180
+ };
181
+ return result;
182
+ }
183
+
184
+ return {
185
+ isPinned: false,
186
+ pinnedStyle: {}
187
+ };
188
+ };
189
+
140
190
  var log = function log(title, columns) {// console.log(title)
141
191
  // console.table(
142
192
  // cloneDeep(
@@ -179,7 +229,12 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
179
229
  style = _ref6.style,
180
230
  columns = _ref6.columns,
181
231
  dataSource = _ref6.dataSource,
182
- rowKey = _ref6.rowKey;
232
+ rowKey = _ref6.rowKey,
233
+ _ref6$fixedHeader = _ref6.fixedHeader,
234
+ fixedHeader = _ref6$fixedHeader === void 0 ? false : _ref6$fixedHeader,
235
+ footer = _ref6.footer,
236
+ rowLastNode = _ref6.rowLastNode,
237
+ pinned = _ref6.pinned;
183
238
 
184
239
  var _useState = (0, _react.useState)([]),
185
240
  _useState2 = _slicedToArray(_useState, 2),
@@ -191,6 +246,21 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
191
246
  _columns = _useState4[0],
192
247
  setColumns = _useState4[1];
193
248
 
249
+ var _useState5 = (0, _react.useState)(false),
250
+ _useState6 = _slicedToArray(_useState5, 2),
251
+ showHeaderShadow = _useState6[0],
252
+ setShowHeaderShadow = _useState6[1];
253
+
254
+ var _useState7 = (0, _react.useState)(false),
255
+ _useState8 = _slicedToArray(_useState7, 2),
256
+ showPinnedLeftShadow = _useState8[0],
257
+ setShowPinnedLeftShadow = _useState8[1];
258
+
259
+ var _useState9 = (0, _react.useState)(false),
260
+ _useState10 = _slicedToArray(_useState9, 2),
261
+ showPinnedRightShadow = _useState10[0],
262
+ setShowPinnedRightShadow = _useState10[1];
263
+
194
264
  (0, _react.useEffect)(function () {
195
265
  log('_columns update', _columns);
196
266
  }, [_columns]);
@@ -235,13 +305,13 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
235
305
  positions = _useSprings2[0],
236
306
  api = _useSprings2[1];
237
307
 
238
- var _useState5 = (0, _react.useState)({
308
+ var _useState11 = (0, _react.useState)({
239
309
  colIdx: -1,
240
310
  down: false
241
311
  }),
242
- _useState6 = _slicedToArray(_useState5, 2),
243
- moveInfo = _useState6[0],
244
- setMoveInfo = _useState6[1];
312
+ _useState12 = _slicedToArray(_useState11, 2),
313
+ moveInfo = _useState12[0],
314
+ setMoveInfo = _useState12[1];
245
315
 
246
316
  var offsetCenterWidth = (0, _react.useRef)({
247
317
  // 永远是正值
@@ -425,6 +495,8 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
425
495
  parentColNum = _ref13$parentColNum === void 0 ? 0 : _ref13$parentColNum;
426
496
  if (!renderColumns[currentLevel - 1]) return;
427
497
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderColumns[currentLevel - 1].map(function (columnOption, colIdx) {
498
+ var _classNames;
499
+
428
500
  var render = columnOption.render,
429
501
  dataIndex = columnOption.dataIndex,
430
502
  renderFill = columnOption.renderFill,
@@ -441,14 +513,20 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
441
513
  });
442
514
 
443
515
  var index = parentColNum + colIdx;
516
+
517
+ var _getPinnedOption = getPinnedOption(_columns, index, pinned),
518
+ pinnedStyle = _getPinnedOption.pinnedStyle,
519
+ pinnedIndex = _getPinnedOption.pinnedIndex,
520
+ isPinned = _getPinnedOption.isPinned;
521
+
444
522
  return /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
445
523
  key: dataIndex,
446
- className: "".concat(preCls, "__box"),
447
- style: _objectSpread({
524
+ className: (0, _classnames["default"])("".concat(preCls, "__box"), (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "__isPinned--left"), isPinned && index === pinnedIndex[0]), _defineProperty(_classNames, "".concat(preCls, "__isPinned--right"), isPinned && index === pinnedIndex[1]), _defineProperty(_classNames, "".concat(preCls, "__isPinned--left-shadow"), isPinned && showPinnedLeftShadow && index === pinnedIndex[0]), _defineProperty(_classNames, "".concat(preCls, "__isPinned--right-shadow"), isPinned && showPinnedRightShadow && index === pinnedIndex[1]), _classNames)),
525
+ style: _objectSpread(_objectSpread({
448
526
  width: colSizes[index].width,
449
527
  zIndex: moveInfo.colIdx === index ? 2 : undefined,
450
528
  borderLeft: moveInfo.colIdx === index && moveInfo.down && '1px solid #e2e2e2' || undefined
451
- }, positions[index])
529
+ }, pinnedStyle), positions[index])
452
530
  }, renderFill && content, !renderFill && /*#__PURE__*/_react["default"].createElement("div", {
453
531
  className: (0, _classnames["default"])("".concat(preCls, "__box-content"), "".concat(preCls, "__box-content--aligin-").concat(align))
454
532
  }, content));
@@ -456,33 +534,49 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
456
534
  className: "".concat(preCls, "__childs")
457
535
  }, data.childs && !!data.childs.length ? renderChilds(data.childs, currentLevel, rootData, rootIdx, parentColNum + renderColumns[currentLevel - 1].length) : /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
458
536
  className: "".concat(preCls, "__box"),
459
- style: _objectSpread({
537
+ style: _objectSpread(_objectSpread({
460
538
  width: colSizes[parentColNum + 1].width,
461
539
  zIndex: moveInfo.colIdx === parentColNum + 1 ? 2 : undefined,
462
540
  borderLeft: moveInfo.colIdx === parentColNum + 1 && moveInfo.down && '1px solid #e2e2e2' || undefined
463
- }, positions[parentColNum + 1])
541
+ }, getPinnedOption(_columns, parentColNum + 1, pinned).pinnedStyle), positions[parentColNum + 1])
464
542
  })));
465
- }, [renderColumns, moveInfo]);
543
+ }, [renderColumns, moveInfo, showPinnedLeftShadow]);
544
+ var onScrollContentHandler = (0, _react.useCallback)(function (e) {
545
+ setShowHeaderShadow(e.target.scrollTop > 0);
546
+ setShowPinnedLeftShadow(e.target.scrollLeft > 0);
547
+ }, []);
466
548
  return /*#__PURE__*/_react["default"].createElement("div", {
467
- className: "".concat(preCls, " ").concat(className),
468
- style: style
549
+ className: (0, _classnames["default"])("".concat(preCls, " ").concat(className), _defineProperty({}, "".concat(preCls, "--header-fixed"), fixedHeader)),
550
+ style: style,
551
+ onScroll: onScrollContentHandler
552
+ }, /*#__PURE__*/_react["default"].createElement("div", {
553
+ className: "".concat(preCls, "__main")
469
554
  }, /*#__PURE__*/_react["default"].createElement("div", {
470
- className: "".concat(preCls, "__header")
555
+ className: (0, _classnames["default"])("".concat(preCls, "__header"), _defineProperty({}, "".concat(preCls, "__header--shadow"), showHeaderShadow))
471
556
  }, _columns.map(function (_ref14, i) {
557
+ var _classNames4;
558
+
472
559
  var title = _ref14.title,
473
560
  _ref14$align = _ref14.align,
474
561
  align = _ref14$align === void 0 ? 'left' : _ref14$align,
475
562
  key = _ref14.key;
563
+
564
+ var _getPinnedOption2 = getPinnedOption(_columns, i, pinned),
565
+ pinnedStyle = _getPinnedOption2.pinnedStyle,
566
+ isPinned = _getPinnedOption2.isPinned,
567
+ pinnedIndex = _getPinnedOption2.pinnedIndex;
568
+
476
569
  return /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
477
570
  key: key,
478
- className: (0, _classnames["default"])("".concat(preCls, "__header__item"), "".concat(preCls, "__header__item--aligin-").concat(align)) // {...moveColBind({ colIndex: i })}
571
+ className: (0, _classnames["default"])("".concat(preCls, "__header__item"), "".concat(preCls, "__header__item--aligin-").concat(align), (_classNames4 = {}, _defineProperty(_classNames4, "".concat(preCls, "__isPinned--left"), isPinned && i === pinnedIndex[0]), _defineProperty(_classNames4, "".concat(preCls, "__isPinned--right"), isPinned && i === pinnedIndex[1]), _defineProperty(_classNames4, "".concat(preCls, "__isPinned--left-shadow"), isPinned && showPinnedLeftShadow && i === pinnedIndex[0]), _defineProperty(_classNames4, "".concat(preCls, "__isPinned--right-shadow"), isPinned && showPinnedRightShadow && i === pinnedIndex[1]), _classNames4)) // {...moveColBind({ colIndex: i })}
479
572
  ,
480
- style: {
573
+ style: _objectSpread(_objectSpread({
481
574
  width: colSizes[i].width,
482
575
  x: positions[i].x,
483
- zIndex: moveInfo.colIdx === i ? 2 : 1,
576
+ zIndex: moveInfo.colIdx === i ? 2 : 1
577
+ }, pinnedStyle), {}, {
484
578
  borderRight: _columns[i].next === null && '1px solid #e2e2e2' || undefined
485
- }
579
+ })
486
580
  }, /*#__PURE__*/_react["default"].createElement("div", _extends({}, resizeColBind(i), {
487
581
  className: "".concat(preCls, "__header__drag-size-bar")
488
582
  })), title);
@@ -497,7 +591,7 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
497
591
  rootData: data,
498
592
  rootIdx: rowIdx
499
593
  }));
500
- }));
594
+ }), rowLastNode));
501
595
  };
502
596
 
503
597
  var _default = /*#__PURE__*/_react["default"].memo(TableExcelV2);
@@ -138,25 +138,13 @@ function ChangePhoto(props) {
138
138
 
139
139
  var handleSuccessSave = function handleSuccessSave(resp) {
140
140
  if (resp.Code === 1) {
141
- _toast["default"].Success((0, _getLocale.getLocale)("Pro_page_Plan_Saved"), {
142
- style: {
143
- position: "fixed",
144
- top: " 36px",
145
- left: "50%"
146
- }
147
- });
141
+ _toast["default"].Success((0, _getLocale.getLocale)("Pro_page_Plan_Saved"));
148
142
 
149
143
  onCancel();
150
144
  setImage("");
151
145
  handleSuccessUploadPhoto(cropData);
152
146
  } else {
153
- _toast["default"].Error(resp.Message, {
154
- style: {
155
- position: "fixed",
156
- top: " 36px",
157
- left: "50%"
158
- }
159
- });
147
+ _toast["default"].Error(resp.Message);
160
148
 
161
149
  setImage("");
162
150
  }
@@ -246,3 +246,47 @@
246
246
  .tita-okr-list-v2__period-selector {
247
247
  border-radius: 12px !important;
248
248
  }
249
+
250
+ .okr-import {
251
+ padding: 16px 32px;
252
+ }
253
+
254
+ .okr-import > div {
255
+ display: flex;
256
+ justify-content: space-between;
257
+ font-weight: 500;
258
+ }
259
+
260
+ .okr-import__selected-file {
261
+ height: 44px;
262
+ background: #f7f8fa;
263
+ border-radius: 4px;
264
+ display: flex;
265
+ padding: 0 16px;
266
+ align-items: center;
267
+ margin-top: 16px;
268
+ }
269
+
270
+ .okr-import__selected-file > img {
271
+ width: 22px;
272
+ height: 25px;
273
+ }
274
+
275
+ .okr-import__selected-file > span {
276
+ margin-left: 10px;
277
+ flex: 1;
278
+ overflow: hidden;
279
+ text-overflow: ellipsis;
280
+ white-space: nowrap;
281
+ }
282
+
283
+ .okr-import__selected-file > i {
284
+ color: #BFC7D5;
285
+ margin-left: 10px;
286
+ font-size: 16px;
287
+ cursor: pointer;
288
+ }
289
+
290
+ .okr-import__selected-file > i:hover {
291
+ color: #f05e5e;
292
+ }
@@ -45,6 +45,10 @@ var _popupSelect = _interopRequireDefault(require("../../../components/popup-sel
45
45
 
46
46
  var _guideTip = _interopRequireDefault(require("../../../components/guide-tip"));
47
47
 
48
+ var _auth = require("../../../utils/auth");
49
+
50
+ var _okrImport = _interopRequireDefault(require("./okr-import"));
51
+
48
52
  require("./index.css");
49
53
 
50
54
  var _reactRouter = require("react-router");
@@ -119,6 +123,9 @@ var setTableTip = function setTableTip() {
119
123
  localStorage.setItem("OkrTableTypeTip_".concat((_window$BSGlobal$logi2 = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi2 === void 0 ? void 0 : _window$BSGlobal$logi2.Id), 'true');
120
124
  };
121
125
 
126
+ var Auth = new _auth.BaseAuth();
127
+ var okrImportShow = Auth.isAssistant() || Auth.isBoss() || Auth.isDepartmentLeader() || Auth.isManager() || Auth.isSuperManager();
128
+
122
129
  var titaTracker = function titaTracker(type) {
123
130
  var name = {
124
131
  card: '卡片',
@@ -127,9 +134,9 @@ var titaTracker = function titaTracker(type) {
127
134
  }[type];
128
135
 
129
136
  if (window.titaTracker && !localStorage.getItem('titaccc')) {
130
- window.titaTracker("action").record({
131
- productName: "OKR展示模式",
132
- actionGroup: "选择OKR展示模式",
137
+ window.titaTracker('action').record({
138
+ productName: 'OKR展示模式',
139
+ actionGroup: '选择OKR展示模式',
133
140
  actionName: "\u9009\u62E9OKR\u5C55\u793A\u6A21\u5F0F\uFF1A".concat(name)
134
141
  });
135
142
  }
@@ -453,7 +460,7 @@ function Header(props, ref) {
453
460
  action: "click",
454
461
  onChange: onChangeMoreMenuHandler
455
462
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
456
- overlay: (0, _getLocale.getLocale)("Feed_Set_Pop_Butt_More"),
463
+ overlay: (0, _getLocale.getLocale)('Feed_Set_Pop_Butt_More'),
457
464
  placement: "top"
458
465
  }, /*#__PURE__*/_react["default"].createElement("span", {
459
466
  className: "".concat(_precls.precls, "__header-record")
@@ -475,7 +482,9 @@ function Header(props, ref) {
475
482
  yqmNum: Number(yqmNum),
476
483
  annualNum: Number(annualNum)
477
484
  }
478
- })));
485
+ }), Number(departmentId) === 0 && okrImportShow && /*#__PURE__*/_react["default"].createElement("div", {
486
+ className: "".concat(_precls.precls, "__header-item")
487
+ }, /*#__PURE__*/_react["default"].createElement(_okrImport["default"], null))));
479
488
  }
480
489
 
481
490
  var _default = /*#__PURE__*/(0, _react.forwardRef)(Header);
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _popup = _interopRequireDefault(require("../../../components/popup"));
13
+
14
+ var _getLocale = require("../../../utils/getLocale");
15
+
16
+ var _tooltip = _interopRequireDefault(require("../../../components/tooltip"));
17
+
18
+ var _dialog = _interopRequireDefault(require("../../../components/dialog"));
19
+
20
+ var _titaUi = require("tita-ui");
21
+
22
+ var _rcUpload = _interopRequireDefault(require("rc-upload"));
23
+
24
+ var _toast = _interopRequireDefault(require("../../../components/toast"));
25
+
26
+ var _helpers = require("../../../utils/helpers");
27
+
28
+ var _precls = require("../precls");
29
+
30
+ require("./index.css");
31
+
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
+
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); }
35
+
36
+ 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; }
37
+
38
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
39
+
40
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
41
+
42
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
43
+
44
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
45
+
46
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
47
+
48
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
49
+
50
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
51
+
52
+ var preCls = 'okr-import';
53
+
54
+ var OkrImport = function OkrImport(_ref) {
55
+ _objectDestructuringEmpty(_ref);
56
+
57
+ var _useState = (0, _react.useState)(false),
58
+ _useState2 = _slicedToArray(_useState, 2),
59
+ dialogVisible = _useState2[0],
60
+ setDialogVisible = _useState2[1];
61
+
62
+ var popupRef = (0, _react.useRef)();
63
+
64
+ var openOperateRecordPush = function openOperateRecordPush() {
65
+ if (popupRef.current) {
66
+ // @ts-ignore
67
+ popupRef.current.close();
68
+ }
69
+
70
+ setDialogVisible(true);
71
+ };
72
+
73
+ var onClose = function onClose() {
74
+ setDialogVisible(false);
75
+ };
76
+
77
+ var popup = /*#__PURE__*/_react["default"].createElement("div", {
78
+ className: "".concat(_precls.precls, "__header-record-popup")
79
+ }, /*#__PURE__*/_react["default"].createElement("div", {
80
+ className: "".concat(_precls.precls, "__header-record-item"),
81
+ onClick: openOperateRecordPush
82
+ }, /*#__PURE__*/_react["default"].createElement("i", {
83
+ className: "tu-icon-jinzhan-s"
84
+ }), /*#__PURE__*/_react["default"].createElement("span", {
85
+ className: "".concat(_precls.precls, "__header-record-item-content")
86
+ }, (0, _getLocale.getLocale)("OKR_ComAll_ImportingOKR"))));
87
+
88
+ var _useState3 = (0, _react.useState)(),
89
+ _useState4 = _slicedToArray(_useState3, 2),
90
+ file = _useState4[0],
91
+ setFile = _useState4[1];
92
+
93
+ var downloadTemplate = function downloadTemplate() {
94
+ window.open((0, _helpers.getApiUrl)("import/okrTemplate"));
95
+ };
96
+
97
+ var validateFileType = function validateFileType(file) {
98
+ if (!/\.xls(x)?$/.test(file.name)) {
99
+ _toast["default"].Error('暂不支持此文件类型,请上传 Excel 文件格式');
100
+
101
+ return false;
102
+ }
103
+
104
+ setFile(file);
105
+ return false;
106
+ };
107
+
108
+ var clearFile = function clearFile() {
109
+ return setFile(undefined);
110
+ };
111
+
112
+ var submitFileHandler = function submitFileHandler() {
113
+ if (file) {
114
+ var formData = new FormData(); // FormData 对象
115
+ // @ts-ignore
116
+
117
+ formData.append('file', file);
118
+ var url = (0, _helpers.getApiUrl)("okr/import");
119
+ var xhr = new XMLHttpRequest(); //创建xhr
120
+
121
+ xhr.onreadystatechange = function () {
122
+ if (xhr.readyState == 4 && xhr.status == 200) {
123
+ var result = JSON.parse(xhr.responseText); // 上传成功接口返回数据
124
+
125
+ if (result.Code === 1) {
126
+ setFile(undefined);
127
+ onClose();
128
+
129
+ _toast["default"].Success(result.Message || '上传成功');
130
+ } else {
131
+ _toast["default"].Error(result.Message || '上传失败,请联系客服或重试');
132
+ }
133
+ } else {// Toast.Error(`${xhr.status}:上传出错`)
134
+ }
135
+ };
136
+
137
+ xhr.open('POST', url, true);
138
+ xhr.send(formData); //开始上传,发送form数据
139
+ } else {
140
+ _toast["default"].Error('请至少上传一个文件');
141
+ }
142
+ };
143
+
144
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
145
+ ref: popupRef,
146
+ popup: popup,
147
+ popupAlign: {
148
+ offset: [0, 4]
149
+ }
150
+ }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
151
+ overlay: (0, _getLocale.getLocale)("Feed_Set_Pop_Butt_More"),
152
+ placement: "top"
153
+ }, /*#__PURE__*/_react["default"].createElement("span", {
154
+ className: "".concat(_precls.precls, "__header-record")
155
+ }, /*#__PURE__*/_react["default"].createElement("i", {
156
+ className: "tu-icon-more1"
157
+ })))), /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
158
+ destroyOnClose: true,
159
+ noHeadLine: true,
160
+ noFooterLine: true,
161
+ onCancel: onClose,
162
+ onClose: onClose,
163
+ onOk: submitFileHandler,
164
+ title: (0, _getLocale.getLocale)('Per_Ma_form_BatchImport'),
165
+ visible: dialogVisible,
166
+ width: 455
167
+ }, /*#__PURE__*/_react["default"].createElement("div", {
168
+ className: preCls
169
+ }, /*#__PURE__*/_react["default"].createElement("div", null, (0, _getLocale.getLocale)('OKR_ComAll_DimporttemplatOKR'), /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
170
+ type: "border",
171
+ shape: "round",
172
+ size: "s",
173
+ style: {
174
+ height: '32px',
175
+ padding: '0 13px',
176
+ fontWeight: 500,
177
+ borderRadius: 16
178
+ },
179
+ onClick: downloadTemplate
180
+ }, (0, _getLocale.getLocale)('Per_ID_DownTemp'))), /*#__PURE__*/_react["default"].createElement("div", {
181
+ style: {
182
+ marginTop: 14
183
+ }
184
+ }, (0, _getLocale.getLocale)('Per_ID_Uploadtemfile'), /*#__PURE__*/_react["default"].createElement(_rcUpload["default"], {
185
+ beforeUpload: validateFileType
186
+ }, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
187
+ shape: "round",
188
+ type: "border",
189
+ size: "s",
190
+ style: {
191
+ height: '32px',
192
+ padding: '0 13px',
193
+ fontWeight: 500,
194
+ borderRadius: 16
195
+ }
196
+ }, file ? (0, _getLocale.getLocale)('Set_PI_Reupload') : (0, _getLocale.getLocale)('Pro_page_File_Butt_UploadFolder')))), !!file && /*#__PURE__*/_react["default"].createElement("div", {
197
+ className: "".concat(preCls, "__selected-file")
198
+ }, /*#__PURE__*/_react["default"].createElement("img", {
199
+ src: require("../img/excel.svg")
200
+ }), /*#__PURE__*/_react["default"].createElement("span", null, file.name), /*#__PURE__*/_react["default"].createElement("i", {
201
+ className: "tu-icon-circle",
202
+ onClick: clearFile
203
+ })))));
204
+ };
205
+
206
+ var _default = OkrImport;
207
+ exports["default"] = _default;
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="22px" height="25px" viewBox="0 0 22 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 64 (93537) - https://sketch.com -->
4
+ <title>编组</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="0.00352 0.00663228491 14.4407063 0.00663228491 14.4407063 6.34715892 0.00352 6.34715892"></polygon>
8
+ </defs>
9
+ <g id="后台-群组" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="上传黑名单" transform="translate(-164.000000, -715.000000)">
11
+ <g id="编组-49" transform="translate(73.000000, 473.000000)">
12
+ <g id="编组" transform="translate(91.000000, 242.000000)">
13
+ <path d="M21.050104,5.84174393 L21.112266,23.2128266 C21.112266,23.6141942 20.80843,23.9365518 20.4288007,23.9365518 L4.57085352,23.9365518 C4.19194465,23.9365518 3.88753224,23.6141942 3.88753224,23.2128266 L3.88753224,1.78253529 C3.88753224,1.38092351 4.19194465,1.05881012 4.57085352,1.05881012 L16.6167434,1.03189358 L15.6668487,0 L4.60416799,0 C4.17854394,-0.00060879397 3.77023995,0.178102343 3.4693146,0.496736733 C3.16841808,0.81540164 2.99956905,1.2476531 3,1.69836772 L3,23.3010225 C2.99945377,23.7517676 3.1683028,24.1841412 3.46922815,24.5028976 C3.77012467,24.8216541 4.17854394,25.0004873 4.60416799,25 L20.3959473,25 C20.8215713,25.0004873 21.2299041,24.8215625 21.5308007,24.5027755 C21.8316972,24.1841412 22.0005462,23.7516761 22,23.3010225 L22,6.87397165 L21.050104,5.84137772 L21.050104,5.84174393 Z" id="Fill-1" fill="#31C480"></path>
14
+ <g>
15
+ <path d="M15.5264966,5.11544949 C15.5261451,5.61020467 15.7129104,6.08483757 16.0454331,6.43469377 C16.3779557,6.78454997 16.8290731,6.9809583 17.2993451,6.98071164 L21.9768384,6.98071164 L15.5264966,0.0243566085 L15.5264966,5.11544949 Z" id="Fill-3" fill="#21A466"></path>
16
+ <g transform="translate(0.000000, 5.555233)">
17
+ <mask id="mask-2" fill="white">
18
+ <use xlink:href="#path-1"></use>
19
+ </mask>
20
+ <g id="Clip-6"></g>
21
+ <path d="M12.1758501,6.34715892 L2.26449813,6.34715892 C1.6638688,6.34740563 1.0877328,6.09640171 0.663074133,5.64963756 C0.238327467,5.2027191 -6.03970963e-06,4.59658151 -6.03970963e-06,3.96473553 L-6.03970963e-06,2.38954934 C-0.000240533333,1.75748732 0.238210133,1.15131886 0.662986133,0.704400402 C1.08761547,0.257512805 1.6638688,0.00650888081 2.26449813,0.00663228491 L12.1762021,0.00663228491 C12.7768315,0.00650888081 13.3529675,0.257512805 13.7777141,0.704400402 C14.2024901,1.15131886 14.4409408,1.75748732 14.4407063,2.38954934 L14.4407063,3.96473553 C14.4407063,4.59658151 14.2023728,5.2027191 13.7775968,5.64963756 C13.3528501,6.09640171 12.7768315,6.34740563 12.1762021,6.34715892" id="Fill-5" fill="#21A466" mask="url(#mask-2)"></path>
22
+ </g>
23
+ </g>
24
+ <g transform="translate(2.000000, 7.000000)">
25
+ <path d="M0.0261872024,0.02052038 L2.34365,0.02052038 L2.34365,0.848147323 L0.892949107,0.848147323 L0.892949107,1.4637 L2.23782113,1.4637 L2.23782113,2.25333385 L0.892949107,2.25333385 L0.892949107,3.01765855 L2.38473185,3.01765855 L2.38473185,3.89616805 L0.0259610119,3.89616805 L0.0259610119,0.02052038 L0.0261872024,0.02052038 Z M2.65839405,0.02052038 L3.61141935,0.02052038 L4.1057869,1.21342712 L4.58788363,0.0203148532 L5.53239851,0.0203148532 L4.66165,1.89665682 L5.614025,3.89616805 L4.64120804,3.89616805 L4.08933155,2.65246684 L3.53765298,3.89616805 L2.57280923,3.89616805 L3.53765298,1.87542884 L2.65839405,0.02052038 Z M5.88836577,0.02052038 L8.20571548,0.02052038 L8.20571548,0.848147323 L6.75478839,0.848147323 L6.75478839,1.4637 L8.0999997,1.4637 L8.0999997,2.25333385 L6.75447738,2.25333385 L6.75447738,3.01765855 L8.24657113,3.01765855 L8.24657113,3.89616805 L5.8876872,3.89616805 L5.8876872,0.02052038 L5.88836577,0.02052038 Z M8.70856518,0.02052038 L9.57100119,0.02052038 L9.57100119,2.94102642 L10.9201991,2.94102642 L10.9201991,3.89616805 L8.70856518,3.89616805 L8.70856518,0.02052038 Z" id="Fill-7" fill="#FFFFFF"></path>
26
+ <path d="M7.96891667,8.32821192 L18.9936949,8.32821192 L18.9936949,7.30917987 L8.00092262,7.30917987 C7.58334673,7.30871105 7.18287649,7.4808544 6.88764137,7.78744162 C6.59243452,8.09411693 6.42689137,8.51010311 6.42742727,8.94376459 L6.42742727,16.9832672 L18.9936949,16.9832672 L18.9936949,16.8902516 L7.32679018,16.8902516 L7.31881696,14.8141083 L18.9936949,14.8141083 L18.9936949,13.7444883 L7.31463244,13.7444883 L7.3066875,11.6683449 L18.9936949,11.6683449 L18.9936949,10.5986368 L7.30600893,10.5986368 L7.30236161,9.01945717 C7.29817708,8.64187513 7.60079167,8.32785959 7.96857738,8.32785959" id="Fill-9" fill="#46C98D"></path>
27
+ </g>
28
+ </g>
29
+ </g>
30
+ </g>
31
+ </g>
32
+ </svg>
package/lib/utils/auth.js CHANGED
@@ -42,6 +42,12 @@ var BaseAuth = /*#__PURE__*/function () {
42
42
  value: function isBoss() {
43
43
  // console.log('isboss', this.loginUserInfor.IsBoss)
44
44
  return this.loginUserInfor.IsBoss;
45
+ } // 超管
46
+
47
+ }, {
48
+ key: "isSuperManager",
49
+ value: function isSuperManager() {
50
+ return this.loginUserInfor.Role === 2;
45
51
  } // 超管、助理、目标管理员
46
52
 
47
53
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.16.11",
3
+ "version": "1.16.14",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",