@titaui/pc 1.12.9-beta.1 → 1.12.9-beta.4

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 (30) hide show
  1. package/lib/components/drawer/index.css +9 -0
  2. package/lib/components/drawer/index.js +11 -8
  3. package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
  4. package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
  5. package/lib/components/menus/export-modules/appraisal-menus/menus.js +104 -9
  6. package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
  7. package/lib/components/nav-top/components/app-center/images/chart.svg +1 -0
  8. package/lib/components/nav-top/components/app-center/images/file.svg +1 -0
  9. package/lib/components/nav-top/components/app-center/images/interview.svg +1 -0
  10. package/lib/components/nav-top/components/app-center/images/learning.svg +1 -0
  11. package/lib/components/nav-top/components/app-center/images/okr.svg +1 -0
  12. package/lib/components/nav-top/components/app-center/images/performance.svg +1 -0
  13. package/lib/components/nav-top/components/app-center/images/plan.svg +1 -0
  14. package/lib/components/nav-top/components/app-center/images/project.svg +1 -0
  15. package/lib/components/nav-top/components/app-center/images/summary.svg +1 -0
  16. package/lib/components/nav-top/components/app-center/index.css +104 -0
  17. package/lib/components/nav-top/components/app-center/index.js +133 -0
  18. package/lib/components/nav-top/components/menu/index.js +2 -6
  19. package/lib/components/nav-top/index.css +46 -7
  20. package/lib/components/nav-top/index.js +69 -35
  21. package/lib/components/nav-top/utils.js +457 -1
  22. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +4 -0
  23. package/lib/components/user-selector/request-apis.js +20 -5
  24. package/lib/components/user-selector/searched-panel/index.js +5 -1
  25. package/lib/pages/aha2021/index.js +5 -5
  26. package/lib/pages/aha2021/new-menu-switcher/index.css +40 -0
  27. package/lib/pages/aha2021/new-menu-switcher/index.js +81 -0
  28. package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
  29. package/lib/pages/aha2021/request-api.js +15 -0
  30. package/package.json +1 -1
@@ -17,7 +17,463 @@ var getMenus = function getMenus() {
17
17
  navs.sort(function (pre, next) {
18
18
  return pre.orderId - next.orderId;
19
19
  });
20
- return navs;
20
+ return navs; // const newNavigation = [
21
+ // {
22
+ // id: 21817,
23
+ // tenantId: 0,
24
+ // title: "动态",
25
+ // href: "#dynamic",
26
+ // iconName: "",
27
+ // type: "hash",
28
+ // orderId: 1,
29
+ // code: "dynamic",
30
+ // appId: 119,
31
+ // appCode: null,
32
+ // status: 0,
33
+ // groupId: 0,
34
+ // signUrl: null,
35
+ // domain: "",
36
+ // labelName: null,
37
+ // DataSource: null,
38
+ // defaultExpand: false,
39
+ // menuPoint: null,
40
+ // },
41
+ // {
42
+ // id: 21818,
43
+ // tenantId: 0,
44
+ // title: "OKR",
45
+ // href: "#okr/manage?relation=1",
46
+ // iconName: "okr",
47
+ // type: "hash",
48
+ // orderId: 2,
49
+ // code: "okr",
50
+ // appId: 113,
51
+ // appCode: null,
52
+ // status: 0,
53
+ // groupId: 0,
54
+ // signUrl: null,
55
+ // domain: "",
56
+ // labelName: null,
57
+ // DataSource: null,
58
+ // defaultExpand: false,
59
+ // children: [
60
+ // {
61
+ // id: 21001,
62
+ // tenantId: 0,
63
+ // title: "OKR",
64
+ // href: "#okr/manage?relation=1",
65
+ // iconName: "",
66
+ // type: "hash",
67
+ // orderId: 3,
68
+ // code: "",
69
+ // appId: 666,
70
+ // appCode: null,
71
+ // status: 0,
72
+ // groupId: 0,
73
+ // signUrl: null,
74
+ // domain: "",
75
+ // labelName: null,
76
+ // DataSource: null,
77
+ // defaultExpand: false,
78
+ // children: [
79
+ // ],
80
+ // menuPoint: null,
81
+ // }, {
82
+ // id: 21002,
83
+ // tenantId: 0,
84
+ // title: "对齐",
85
+ // href: "#okr/map",
86
+ // iconName: "",
87
+ // type: "hash",
88
+ // orderId: 3,
89
+ // code: "",
90
+ // appId: 666,
91
+ // appCode: null,
92
+ // status: 0,
93
+ // groupId: 0,
94
+ // signUrl: null,
95
+ // domain: "",
96
+ // labelName: null,
97
+ // DataSource: null,
98
+ // defaultExpand: false,
99
+ // children: [
100
+ // ],
101
+ // menuPoint: null,
102
+ // }, {
103
+ // id: 21003,
104
+ // tenantId: 0,
105
+ // title: "工作法",
106
+ // href: "#okr/panel",
107
+ // iconName: "",
108
+ // type: "hash",
109
+ // orderId: 3,
110
+ // code: "",
111
+ // appId: 666,
112
+ // appCode: null,
113
+ // status: 0,
114
+ // groupId: 0,
115
+ // signUrl: null,
116
+ // domain: "",
117
+ // labelName: null,
118
+ // DataSource: null,
119
+ // defaultExpand: false,
120
+ // children: [
121
+ // ],
122
+ // menuPoint: null,
123
+ // }, {
124
+ // id: 21004,
125
+ // tenantId: 0,
126
+ // title: "仪表盘",
127
+ // href: "#okr/chart",
128
+ // iconName: "",
129
+ // type: "hash",
130
+ // orderId: 3,
131
+ // code: "",
132
+ // appId: 666,
133
+ // appCode: null,
134
+ // status: 0,
135
+ // groupId: 0,
136
+ // signUrl: null,
137
+ // domain: "",
138
+ // labelName: null,
139
+ // DataSource: null,
140
+ // defaultExpand: false,
141
+ // children: [
142
+ // ],
143
+ // menuPoint: null,
144
+ // },
145
+ // ],
146
+ // menuPoint: null,
147
+ // },
148
+ // {
149
+ // id: 21819,
150
+ // tenantId: 0,
151
+ // title: "绩效考核",
152
+ // href: "#performance",
153
+ // iconName: "performance",
154
+ // type: "hash",
155
+ // orderId: 3,
156
+ // code: "performance",
157
+ // appId: 666,
158
+ // appCode: null,
159
+ // status: 0,
160
+ // groupId: 0,
161
+ // signUrl: null,
162
+ // domain: "",
163
+ // labelName: null,
164
+ // DataSource: null,
165
+ // defaultExpand: false,
166
+ // children: [
167
+ // {
168
+ // id: 22001,
169
+ // tenantId: 0,
170
+ // title: "我的考核",
171
+ // href: "#performance/my",
172
+ // iconName: "",
173
+ // type: "hash",
174
+ // orderId: 3,
175
+ // code: "",
176
+ // appId: 666,
177
+ // appCode: null,
178
+ // status: 0,
179
+ // groupId: 0,
180
+ // signUrl: null,
181
+ // domain: "",
182
+ // labelName: null,
183
+ // DataSource: null,
184
+ // defaultExpand: false,
185
+ // children: [
186
+ // ],
187
+ // menuPoint: null,
188
+ // }, {
189
+ // id: 22002,
190
+ // tenantId: 0,
191
+ // title: "考核管理",
192
+ // href: "#performance/manage",
193
+ // iconName: "",
194
+ // type: "hash",
195
+ // orderId: 3,
196
+ // code: "",
197
+ // appId: 666,
198
+ // appCode: null,
199
+ // status: 0,
200
+ // groupId: 0,
201
+ // signUrl: null,
202
+ // domain: "",
203
+ // labelName: null,
204
+ // DataSource: null,
205
+ // defaultExpand: false,
206
+ // children: [
207
+ // ],
208
+ // menuPoint: null,
209
+ // }, {
210
+ // id: 22003,
211
+ // tenantId: 0,
212
+ // title: "仪表盘",
213
+ // href: "#performance/dashboard",
214
+ // iconName: "",
215
+ // type: "hash",
216
+ // orderId: 3,
217
+ // code: "",
218
+ // appId: 666,
219
+ // appCode: null,
220
+ // status: 0,
221
+ // groupId: 0,
222
+ // signUrl: null,
223
+ // domain: "",
224
+ // labelName: null,
225
+ // DataSource: null,
226
+ // defaultExpand: false,
227
+ // children: [
228
+ // ],
229
+ // menuPoint: null,
230
+ // },
231
+ // ],
232
+ // menuPoint: null,
233
+ // },
234
+ // {
235
+ // id: 21820,
236
+ // tenantId: 0,
237
+ // title: "项目",
238
+ // href: "#work",
239
+ // iconName: "project",
240
+ // type: "hash",
241
+ // orderId: 4,
242
+ // code: "work",
243
+ // appId: 112,
244
+ // appCode: null,
245
+ // status: 0,
246
+ // groupId: 0,
247
+ // signUrl: null,
248
+ // domain: "",
249
+ // labelName: null,
250
+ // DataSource: null,
251
+ // defaultExpand: false,
252
+ // children: [
253
+ // {
254
+ // id: 21820,
255
+ // tenantId: 0,
256
+ // title: "项目",
257
+ // href: "#work",
258
+ // iconName: "project",
259
+ // type: "hash",
260
+ // orderId: 4,
261
+ // code: "",
262
+ // appId: 112,
263
+ // appCode: null,
264
+ // status: 0,
265
+ // groupId: 0,
266
+ // signUrl: null,
267
+ // domain: "",
268
+ // labelName: null,
269
+ // DataSource: null,
270
+ // defaultExpand: false,
271
+ // children: [
272
+ // ],
273
+ // menuPoint: null,
274
+ // },
275
+ // ],
276
+ // menuPoint: null,
277
+ // },
278
+ // {
279
+ // id: 21823,
280
+ // tenantId: 0,
281
+ // title: "计划表",
282
+ // href: "#plan",
283
+ // iconName: "plan",
284
+ // type: "hash",
285
+ // orderId: 5,
286
+ // code: "plan",
287
+ // appId: 116,
288
+ // appCode: null,
289
+ // status: 0,
290
+ // groupId: 0,
291
+ // signUrl: null,
292
+ // domain: "",
293
+ // labelName: null,
294
+ // DataSource: null,
295
+ // defaultExpand: false,
296
+ // children: [
297
+ // {
298
+ // id: 21823,
299
+ // tenantId: 0,
300
+ // title: "计划表",
301
+ // href: "#plan",
302
+ // iconName: "plan",
303
+ // type: "hash",
304
+ // orderId: 5,
305
+ // code: "",
306
+ // appId: 116,
307
+ // appCode: null,
308
+ // status: 0,
309
+ // groupId: 0,
310
+ // signUrl: null,
311
+ // domain: "",
312
+ // labelName: null,
313
+ // DataSource: null,
314
+ // defaultExpand: false,
315
+ // children: [
316
+ // ],
317
+ // menuPoint: null,
318
+ // key: "plan",
319
+ // },
320
+ // ],
321
+ // menuPoint: null,
322
+ // },
323
+ // {
324
+ // id: 21821,
325
+ // tenantId: 0,
326
+ // title: "总结",
327
+ // href: "#daily",
328
+ // iconName: "summary",
329
+ // type: "hash",
330
+ // orderId: 6,
331
+ // code: "",
332
+ // appId: 115,
333
+ // appCode: null,
334
+ // status: 0,
335
+ // groupId: 0,
336
+ // signUrl: null,
337
+ // domain: "",
338
+ // labelName: null,
339
+ // DataSource: null,
340
+ // defaultExpand: false,
341
+ // children: [
342
+ // {
343
+ // id: 21821,
344
+ // tenantId: 0,
345
+ // title: "总结",
346
+ // href: "#daily",
347
+ // iconName: "summary",
348
+ // type: "hash",
349
+ // orderId: 6,
350
+ // code: "",
351
+ // appId: 115,
352
+ // appCode: null,
353
+ // status: 0,
354
+ // groupId: 0,
355
+ // signUrl: null,
356
+ // domain: "",
357
+ // labelName: null,
358
+ // DataSource: null,
359
+ // defaultExpand: false,
360
+ // children: [
361
+ // ],
362
+ // menuPoint: null,
363
+ // key: "summary",
364
+ // },
365
+ // ],
366
+ // menuPoint: null,
367
+ // key: "daily",
368
+ // },
369
+ // {
370
+ // id: 21822,
371
+ // tenantId: 0,
372
+ // title: "报表",
373
+ // href: "#report",
374
+ // iconName: "chart",
375
+ // type: "hash",
376
+ // orderId: 7,
377
+ // code: "",
378
+ // appId: 118,
379
+ // appCode: null,
380
+ // status: 0,
381
+ // groupId: 0,
382
+ // signUrl: null,
383
+ // domain: "",
384
+ // labelName: null,
385
+ // DataSource: null,
386
+ // defaultExpand: false,
387
+ // children: [
388
+ // {
389
+ // id: 21822,
390
+ // tenantId: 0,
391
+ // title: "报表",
392
+ // href: "#report",
393
+ // iconName: "chart",
394
+ // type: "hash",
395
+ // orderId: 7,
396
+ // code: "",
397
+ // appId: 118,
398
+ // appCode: null,
399
+ // status: 0,
400
+ // groupId: 0,
401
+ // signUrl: null,
402
+ // domain: "",
403
+ // labelName: null,
404
+ // DataSource: null,
405
+ // defaultExpand: false,
406
+ // children: [
407
+ // ],
408
+ // menuPoint: null,
409
+ // key: "report",
410
+ // },
411
+ // ],
412
+ // menuPoint: null,
413
+ // key: "report",
414
+ // },
415
+ // {
416
+ // id: 21831,
417
+ // tenantId: 0,
418
+ // title: "Learning",
419
+ // href: "500000126/eLearningHome#learning",
420
+ // iconName: "learning",
421
+ // type: "page",
422
+ // orderId: 8,
423
+ // code: "",
424
+ // appId: 120,
425
+ // appCode: null,
426
+ // status: 0,
427
+ // groupId: 0,
428
+ // signUrl: null,
429
+ // domain: "",
430
+ // labelName: null,
431
+ // DataSource: null,
432
+ // defaultExpand: false,
433
+ // children: [
434
+ // ],
435
+ // menuPoint: null,
436
+ // key: "learning",
437
+ // },
438
+ // {
439
+ // appId: 101,
440
+ // children: [{
441
+ // id: 21831,
442
+ // tenantId: 0,
443
+ // title: "我的面谈",
444
+ // href: "#/interview",
445
+ // iconName: "learning",
446
+ // type: "hash",
447
+ // orderId: 8,
448
+ // code: "",
449
+ // appId: 120,
450
+ // appCode: null,
451
+ // status: 0,
452
+ // groupId: 0,
453
+ // signUrl: null,
454
+ // domain: "",
455
+ // labelName: null,
456
+ // DataSource: null,
457
+ // defaultExpand: false,
458
+ // children: [
459
+ // ],
460
+ // menuPoint: null,
461
+ // key: "learning",
462
+ // }],
463
+ // code: "interview",
464
+ // domain: "",
465
+ // href: "#/interview",
466
+ // iconName: "interview",
467
+ // id: 22827,
468
+ // menuPoint: null,
469
+ // orderId: 9,
470
+ // signUrl: null,
471
+ // tenantId: 0,
472
+ // title: "1 on 1",
473
+ // key:'interview'
474
+ // },
475
+ // ];
476
+ // return newNavigation;
21
477
  };
22
478
 
23
479
  exports.getMenus = getMenus;
@@ -66,6 +66,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
66
66
  selectNodes = _props$selectNodes === void 0 ? defauleSelectNodes : _props$selectNodes,
67
67
  sourceFrom = props.sourceFrom,
68
68
  departOnly = props.departOnly,
69
+ searchUserOnly = props.searchUserOnly,
70
+ isVerify = props.isVerify,
69
71
  _props$departId = props.departId,
70
72
  departId = _props$departId === void 0 ? "-1" : _props$departId,
71
73
  _props$auth = props.auth,
@@ -307,6 +309,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
307
309
  value: {
308
310
  sourceFrom: sourceFrom,
309
311
  departOnly: departOnly,
312
+ searchUserOnly: searchUserOnly,
313
+ isVerify: isVerify,
310
314
  auth: auth,
311
315
  departId: departId,
312
316
  authType: authType,
@@ -159,13 +159,28 @@ exports.getSubordinateData = getSubordinateData;
159
159
  var search = function search(_ref4) {
160
160
  var searchKey = _ref4.searchKey,
161
161
  departOnly = _ref4.departOnly,
162
- sourceFrom = _ref4.sourceFrom;
162
+ searchUserOnly = _ref4.searchUserOnly,
163
+ sourceFrom = _ref4.sourceFrom,
164
+ _ref4$isVerify = _ref4.isVerify,
165
+ isVerify = _ref4$isVerify === void 0 ? false : _ref4$isVerify;
163
166
  var args = [];
164
- if (departOnly) args.push("isGetUser=false");
165
- if (sourceFrom) args.push("sourceFrom=".concat(sourceFrom)); // 追加来源,用于企业微信搜索
166
167
 
167
- args.push("source=".concat((0, _openData.getSource)()));
168
- return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/search/searchAll?keyWork=").concat(searchKey).concat(args.length ? "&".concat(args.join("&")) : "")).then(function (searchRes) {
168
+ if (departOnly) {
169
+ args.push("isGetUser=false&isGetDep=true&isGetGroup=false");
170
+ } else if (searchUserOnly) {
171
+ args.push("isGetUser=true&isGetDep=false&isGetGroup=false");
172
+ } else {
173
+ args.push("isGetUser=true&isGetDep=true&isGetGroup=true");
174
+ }
175
+
176
+ ;
177
+
178
+ if (!!sourceFrom) {
179
+ // 这个是遗留的管控群组的,后面逐步替换掉
180
+ isVerify = true;
181
+ }
182
+
183
+ return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/search/searchAll?keyWord=").concat(searchKey, "&isVerify=").concat(isVerify, "&").concat(args[0])).then(function (searchRes) {
169
184
  return searchRes.data;
170
185
  });
171
186
  };
@@ -59,7 +59,9 @@ function _default(props) {
59
59
 
60
60
  var _useContext = (0, _react.useContext)(_context.CommonContext),
61
61
  departOnly = _useContext.departOnly,
62
+ searchUserOnly = _useContext.searchUserOnly,
62
63
  sourceFrom = _useContext.sourceFrom,
64
+ isVerify = _useContext.isVerify,
63
65
  _useContext$panes = _useContext.panes,
64
66
  panes = _useContext$panes === void 0 ? {
65
67
  depart: true,
@@ -97,7 +99,9 @@ function _default(props) {
97
99
  (0, _requestApis.search)({
98
100
  searchKey: searchKey,
99
101
  departOnly: departOnly,
100
- sourceFrom: sourceFrom
102
+ searchUserOnly: searchUserOnly,
103
+ sourceFrom: sourceFrom,
104
+ isVerify: isVerify
101
105
  }).then(function (res) {
102
106
  var Code = res.Code,
103
107
  Data = res.Data;
@@ -11,8 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
- var _contactKefu = _interopRequireDefault(require("../../components/contact-kefu"));
15
-
16
14
  var _navTop = _interopRequireDefault(require("../../components/nav-top"));
17
15
 
18
16
  var _followerVisitor = _interopRequireDefault(require("../../components/follower-visitor"));
@@ -37,10 +35,12 @@ var _errorBoundary = _interopRequireDefault(require("../../components/error-boun
37
35
 
38
36
  var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
39
37
 
40
- require("./index.css");
41
-
42
38
  var _hooks = _interopRequireDefault(require("../../utils/hooks"));
43
39
 
40
+ var _newMenuSwitcher = _interopRequireDefault(require("./new-menu-switcher"));
41
+
42
+ require("./index.css");
43
+
44
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
45
 
46
46
  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); }
@@ -103,7 +103,7 @@ function PageLayout(props) {
103
103
  }
104
104
  }, children), !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
105
105
  className: (0, _classnames["default"])("".concat(preCls, "__help"))
106
- }, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), !isTencentHr && !(0, _helpers.isDingDing)() && !(0, _helpers.isFeishu)() && /*#__PURE__*/_react["default"].createElement(_contactKefu["default"], null), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
106
+ }, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), /*#__PURE__*/_react["default"].createElement(_newMenuSwitcher["default"], null), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
107
107
  className: "".concat(preCls, "__invite")
108
108
  }, /*#__PURE__*/_react["default"].createElement(_invitePeople["default"], null)), isTencentHr && /*#__PURE__*/_react["default"].createElement(_hrMessage["default"], null), /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
109
109
  errorLevel: _errorLevel["default"].P0,
@@ -0,0 +1,40 @@
1
+ .new-menu-switcher {
2
+ position: fixed;
3
+ bottom: 74px;
4
+ right: 24px;
5
+ z-index: 2;
6
+ font-size: 28px;
7
+ }
8
+
9
+ .new-menu-switcher__new-version, .new-menu-switcher__old-version {
10
+ display: inline-block;
11
+ width: 42px;
12
+ height: 42px;
13
+ font-size: 14px;
14
+ line-height: 42px;
15
+ text-align: center;
16
+ border-radius: 100px;
17
+ overflow: hidden;
18
+ white-space: nowrap;
19
+ cursor: pointer;
20
+ transition: width 0.3s;
21
+ }
22
+
23
+ .new-menu-switcher__new-version--full, .new-menu-switcher__old-version--full {
24
+ width: 108px;
25
+ }
26
+
27
+ .new-menu-switcher__new-version {
28
+ color: #fff;
29
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2), inset 0px 0px 6px 2px rgba(255, 255, 255, 0.5);
30
+ background: url(./new-menu-bg.png) no-repeat;
31
+ background-color: linear-gradient(135deg, #ffc726 0%, #f69300 100%);
32
+ background-position: right bottom;
33
+ background-size: cover;
34
+ }
35
+
36
+ .new-menu-switcher__old-version {
37
+ color: #141c28;
38
+ background: #fff;
39
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2), inset 0px 0px 6px 2px rgba(255, 255, 255, 0.5);
40
+ }