@titaui/pc 1.9.87 → 1.9.88
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/lib/components/change-okr-modal/Filter.js +1 -1
- package/lib/components/change-okr-modal/Item.js +91 -121
- package/lib/components/change-okr-modal/filterTab.js +1 -1
- package/lib/components/change-okr-modal/index.js +1 -1
- package/lib/components/communication/CommunicationAttachments.js +1 -1
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.js +1 -1
- package/lib/components/create-okr-modal/objectType.js +1 -1
- package/lib/components/date-picker/BodyItem.js +1 -1
- package/lib/components/date-picker/CalendarBody.js +1 -1
- package/lib/components/date-picker/CalendarHeader.js +1 -1
- package/lib/components/date-picker/index.js +1 -1
- package/lib/components/date-range-picker/index.js +1 -1
- package/lib/components/delete-confirm-pop/ConfirmPop.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +1 -1
- package/lib/components/eReport/eReportLists/reportList.js +1 -1
- package/lib/components/eReport/eReportShare/index.js +1 -1
- package/lib/components/eReport/eReportShare/toast/index.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +1 -1
- package/lib/components/edit-kr-wight/FormItemV2.js +1 -1
- package/lib/components/emotions-selector/selector-content.js +1 -1
- package/lib/components/emotions-selector/selector-pop.js +1 -1
- package/lib/components/ereport-list/index.js +1 -1
- package/lib/components/error-boundary/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +1 -1
- package/lib/components/mblog/components/MblogAction.js +1 -1
- package/lib/components/mblog/components/MblogContent.js +1 -1
- package/lib/components/mblog/index.js +1 -1
- package/lib/components/menus/export-modules/demo-menus/index.js +117 -0
- package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +74 -0
- package/lib/components/menus/export-modules/demo-menus/menus.js +154 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/nav-top/constant.js +26 -2
- package/lib/components/nav-top/utils.js +10 -1
- package/lib/components/okr-detail/auth.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +1 -1
- package/lib/components/okr-flow/export-modal/index.js +1 -1
- package/lib/components/okr-period-selector/select-cycle.js +0 -7
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/index.js +1 -1
- package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +1 -1
- package/lib/components/okr-review/index.js +1 -1
- package/lib/components/operation-records/OperationRecordItem.js +1 -1
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/point-demo/input/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +1 -1
- package/lib/components/praise-record/index.js +1 -1
- package/lib/components/range-picker-pop/index.js +1 -1
- package/lib/components/range-selector-pop/RangeList.js +1 -1
- package/lib/components/range-selector-pop/RangeSelectorPop.js +1 -1
- package/lib/components/select/Option.js +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/viewer/ImageListRender.js +1 -1
- package/lib/components/viewer/index.js +1 -1
- package/lib/components-v1/animate/AnimateChild.js +1 -1
- package/lib/components-v1/animate/animate.js +1 -1
- package/lib/components-v1/avatar/index.js +1 -1
- package/lib/components-v1/buttonv2/ButtonOutlined.js +1 -1
- package/lib/components-v1/buttonv2/ButtonRounded.js +1 -1
- package/lib/components-v1/buttonv2/DefaultButton.js +1 -1
- package/lib/components-v1/confirm/index.js +1 -1
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +1 -1
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +1 -1
- package/lib/components-v1/input/Input.js +1 -1
- package/lib/components-v1/input/InputNumber.js +1 -1
- package/lib/components-v1/placement/placement.js +1 -1
- package/lib/components-v1/placement/placementInner.js +1 -1
- package/lib/components-v1/pop/Pop.js +1 -1
- package/lib/components-v1/pop/PopInner.js +1 -1
- package/lib/components-v1/portals/Portals.js +1 -1
- package/lib/components-v1/progress/CircleProgress.js +1 -1
- package/lib/components-v1/progress/LineProgress.js +1 -1
- package/lib/components-v1/progress/index.js +1 -1
- package/lib/components-v1/radio/radio.js +1 -1
- package/lib/components-v1/radio/radioGroup.js +1 -1
- package/lib/components-v1/search/index.js +1 -1
- package/lib/components-v1/select/Option.js +1 -1
- package/lib/components-v1/select/index.js +1 -1
- package/lib/components-v1/tabs/index.js +1 -1
- package/lib/components-v1/textarea/index.js +1 -1
- package/lib/components-v1/transition/index.js +1 -1
- package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/index.js +1 -1
- package/lib/components-v1/userSelector/components/SearchBar.js +1 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
- package/lib/components-v1/userSelector/components/UserItem.js +1 -1
- package/lib/components-v1/userSelector/index.js +1 -1
- package/lib/index.js +14 -6
- package/lib/pages/appointment-demo/input/index.js +1 -1
- package/lib/pages/demo-free/index.css +0 -0
- package/lib/pages/demo-free/index.js +31 -0
- package/lib/pages/group-management/components/input-form/index.js +1 -1
- package/lib/pages/new-okr-list/init-cycle-setting.js +2 -4
- package/lib/pages/new-okr-list/request-api.js +57 -32
- package/lib/utils/auth.js +1 -1
- package/package.json +2 -1
- package/src/components/menus/export-modules/demo-menus/index.tsx +80 -0
- package/src/components/menus/export-modules/demo-menus/menu-highlight.ts +53 -0
- package/src/components/menus/export-modules/demo-menus/menus.tsx +136 -0
- package/src/components/menus/index.tsx +9 -5
- package/src/components/nav-top/constant.ts +24 -0
- package/src/components/nav-top/index.tsx +10 -9
- package/src/components/nav-top/request.apis.ts +5 -5
- package/src/components/nav-top/utils.ts +15 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +2 -1
- package/src/pages/demo-free/index.tsx +15 -0
- package/yarn-error.log +0 -103
|
@@ -41,7 +41,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
41
41
|
|
|
42
42
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
43
43
|
|
|
44
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
44
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
45
45
|
|
|
46
46
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
47
47
|
|
|
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
25
25
|
|
|
26
26
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
27
|
|
|
28
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
28
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
29
|
|
|
30
30
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
33
33
|
|
|
34
34
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
35
35
|
|
|
36
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
36
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
37
37
|
|
|
38
38
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
39
|
|
|
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
27
27
|
|
|
28
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
29
|
|
|
30
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
31
|
|
|
32
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
@@ -43,7 +43,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
43
43
|
|
|
44
44
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
45
45
|
|
|
46
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
46
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
47
47
|
|
|
48
48
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
49
49
|
|
package/lib/index.js
CHANGED
|
@@ -63,6 +63,12 @@ Object.defineProperty(exports, "DatePicker", {
|
|
|
63
63
|
return _datePicker["default"];
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "DemoFree", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _demoFree["default"];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
66
72
|
Object.defineProperty(exports, "Dialog", {
|
|
67
73
|
enumerable: true,
|
|
68
74
|
get: function get() {
|
|
@@ -465,12 +471,6 @@ Object.defineProperty(exports, "UpdateModal", {
|
|
|
465
471
|
return _updateModal["default"];
|
|
466
472
|
}
|
|
467
473
|
});
|
|
468
|
-
Object.defineProperty(exports, "UploadPhotoModal", {
|
|
469
|
-
enumerable: true,
|
|
470
|
-
get: function get() {
|
|
471
|
-
return _uploadPhotoModal["default"];
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
474
|
Object.defineProperty(exports, "Upvote", {
|
|
475
475
|
enumerable: true,
|
|
476
476
|
get: function get() {
|
|
@@ -525,6 +525,12 @@ Object.defineProperty(exports, "requestApi", {
|
|
|
525
525
|
return _request["default"];
|
|
526
526
|
}
|
|
527
527
|
});
|
|
528
|
+
Object.defineProperty(exports, "tasUploadPhotoModal", {
|
|
529
|
+
enumerable: true,
|
|
530
|
+
get: function get() {
|
|
531
|
+
return _uploadPhotoModal["default"];
|
|
532
|
+
}
|
|
533
|
+
});
|
|
528
534
|
Object.defineProperty(exports, "upload", {
|
|
529
535
|
enumerable: true,
|
|
530
536
|
get: function get() {
|
|
@@ -574,6 +580,8 @@ var _rangePickerPop = _interopRequireDefault(require("./components/range-picker-
|
|
|
574
580
|
|
|
575
581
|
var _datePicker = _interopRequireDefault(require("./components/date-picker"));
|
|
576
582
|
|
|
583
|
+
var _demoFree = _interopRequireDefault(require("./pages/demo-free"));
|
|
584
|
+
|
|
577
585
|
var _okrMap = _interopRequireDefault(require("./pages/okr-map"));
|
|
578
586
|
|
|
579
587
|
var _okrFlow = _interopRequireDefault(require("./components/okr-flow"));
|
|
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
23
23
|
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
25
|
|
|
26
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
27
|
|
|
28
28
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _dynamic = _interopRequireDefault(require("../../components/dynamic/dynamic"));
|
|
11
|
+
|
|
12
|
+
var _errorBoundary = _interopRequireDefault(require("../../components/error-boundary"));
|
|
13
|
+
|
|
14
|
+
var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var prefix = "dynamic-page";
|
|
21
|
+
|
|
22
|
+
var DemoFree = function DemoFree() {
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
|
|
24
|
+
errorLevel: _errorLevel["default"].P0
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
+
className: prefix
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement(_dynamic["default"], null)));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _default = DemoFree;
|
|
31
|
+
exports["default"] = _default;
|
|
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
23
23
|
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
25
|
|
|
26
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
27
|
|
|
28
28
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
|
|
@@ -38,10 +38,8 @@ function InitCycleSetting(props) {
|
|
|
38
38
|
setVisible = _useState2[1];
|
|
39
39
|
|
|
40
40
|
(0, _react.useEffect)(function () {
|
|
41
|
-
if (localStorage.getItem("cycle_setting_stop_show".concat((0, _bsGlobal.getUserInfo)().Id)) ==
|
|
42
|
-
localStorage.removeItem("OKR_CYCLE_SETTING");
|
|
41
|
+
if (localStorage.getItem("cycle_setting_stop_show".concat((0, _bsGlobal.getUserInfo)().Id)) == "true") return;
|
|
43
42
|
(0, _requestApi.getCycleSetting)().then(function (res) {
|
|
44
|
-
localStorage.setItem("OKR_CYCLE_SETTING", JSON.stringify((res === null || res === void 0 ? void 0 : res.Data) || {}));
|
|
45
43
|
var hasSetting = res.Data.hasSetting;
|
|
46
44
|
if (!hasSetting) setVisible(true);
|
|
47
45
|
});
|
|
@@ -52,7 +50,7 @@ function InitCycleSetting(props) {
|
|
|
52
50
|
return setVisible(false);
|
|
53
51
|
},
|
|
54
52
|
onRefresh: function onRefresh() {
|
|
55
|
-
return
|
|
53
|
+
return location.reload();
|
|
56
54
|
}
|
|
57
55
|
});
|
|
58
56
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrowd = exports.getUserInfoById = exports.getOkrInfoWithListData = exports.getCycleSetting = void 0;
|
|
6
|
+
exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrowd = exports.getUserInfoById = exports.getOkrSetting = exports.getOkrInfoWithListData = exports.getCycleSetting = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
@@ -117,14 +117,39 @@ var getOkrInfoWithListData = /*#__PURE__*/function () {
|
|
|
117
117
|
|
|
118
118
|
exports.getOkrInfoWithListData = getOkrInfoWithListData;
|
|
119
119
|
|
|
120
|
-
var
|
|
121
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(
|
|
122
|
-
var res;
|
|
120
|
+
var getOkrSetting = /*#__PURE__*/function () {
|
|
121
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
123
122
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
124
123
|
while (1) {
|
|
125
124
|
switch (_context4.prev = _context4.next) {
|
|
126
125
|
case 0:
|
|
127
|
-
_context4.
|
|
126
|
+
return _context4.abrupt("return", (0, _request.rget)("v1")("okr/cycleSetting").then(function (res) {
|
|
127
|
+
return res.Data;
|
|
128
|
+
}));
|
|
129
|
+
|
|
130
|
+
case 1:
|
|
131
|
+
case "end":
|
|
132
|
+
return _context4.stop();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, _callee4);
|
|
136
|
+
}));
|
|
137
|
+
|
|
138
|
+
return function getOkrSetting() {
|
|
139
|
+
return _ref4.apply(this, arguments);
|
|
140
|
+
};
|
|
141
|
+
}();
|
|
142
|
+
|
|
143
|
+
exports.getOkrSetting = getOkrSetting;
|
|
144
|
+
|
|
145
|
+
var okrList = /*#__PURE__*/function () {
|
|
146
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(param) {
|
|
147
|
+
var res;
|
|
148
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
149
|
+
while (1) {
|
|
150
|
+
switch (_context5.prev = _context5.next) {
|
|
151
|
+
case 0:
|
|
152
|
+
_context5.next = 2;
|
|
128
153
|
return (0, _request.rpost)("v1")("okr/list?toUserId=".concat(param.toUserId), _objectSpread({
|
|
129
154
|
orderType: 2,
|
|
130
155
|
// 默认创建时间正序
|
|
@@ -133,94 +158,94 @@ var okrList = /*#__PURE__*/function () {
|
|
|
133
158
|
}, param));
|
|
134
159
|
|
|
135
160
|
case 2:
|
|
136
|
-
res =
|
|
161
|
+
res = _context5.sent;
|
|
137
162
|
|
|
138
163
|
if (!(res.Code == 1)) {
|
|
139
|
-
|
|
164
|
+
_context5.next = 5;
|
|
140
165
|
break;
|
|
141
166
|
}
|
|
142
167
|
|
|
143
|
-
return
|
|
168
|
+
return _context5.abrupt("return", res.Data);
|
|
144
169
|
|
|
145
170
|
case 5:
|
|
146
171
|
case "end":
|
|
147
|
-
return
|
|
172
|
+
return _context5.stop();
|
|
148
173
|
}
|
|
149
174
|
}
|
|
150
|
-
},
|
|
175
|
+
}, _callee5);
|
|
151
176
|
}));
|
|
152
177
|
|
|
153
178
|
return function okrList(_x4) {
|
|
154
|
-
return
|
|
179
|
+
return _ref5.apply(this, arguments);
|
|
155
180
|
};
|
|
156
181
|
}();
|
|
157
182
|
|
|
158
183
|
exports.okrList = okrList;
|
|
159
184
|
|
|
160
185
|
var getUserInfoById = /*#__PURE__*/function () {
|
|
161
|
-
var
|
|
162
|
-
return regeneratorRuntime.wrap(function
|
|
186
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(toUserId) {
|
|
187
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
163
188
|
while (1) {
|
|
164
|
-
switch (
|
|
189
|
+
switch (_context6.prev = _context6.next) {
|
|
165
190
|
case 0:
|
|
166
|
-
return
|
|
191
|
+
return _context6.abrupt("return", (0, _request.rget)("v2")("user/GetById?toUserid=".concat(toUserId)));
|
|
167
192
|
|
|
168
193
|
case 1:
|
|
169
194
|
case "end":
|
|
170
|
-
return
|
|
195
|
+
return _context6.stop();
|
|
171
196
|
}
|
|
172
197
|
}
|
|
173
|
-
},
|
|
198
|
+
}, _callee6);
|
|
174
199
|
}));
|
|
175
200
|
|
|
176
201
|
return function getUserInfoById(_x5) {
|
|
177
|
-
return
|
|
202
|
+
return _ref6.apply(this, arguments);
|
|
178
203
|
};
|
|
179
204
|
}();
|
|
180
205
|
|
|
181
206
|
exports.getUserInfoById = getUserInfoById;
|
|
182
207
|
|
|
183
208
|
var visitOkrCyclePag = /*#__PURE__*/function () {
|
|
184
|
-
var
|
|
185
|
-
return regeneratorRuntime.wrap(function
|
|
209
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(toUserId) {
|
|
210
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
186
211
|
while (1) {
|
|
187
|
-
switch (
|
|
212
|
+
switch (_context7.prev = _context7.next) {
|
|
188
213
|
case 0:
|
|
189
|
-
return
|
|
214
|
+
return _context7.abrupt("return", (0, _request.rpost)("v1")("okr/visitOkrCyclePag?toUserId=".concat(toUserId)));
|
|
190
215
|
|
|
191
216
|
case 1:
|
|
192
217
|
case "end":
|
|
193
|
-
return
|
|
218
|
+
return _context7.stop();
|
|
194
219
|
}
|
|
195
220
|
}
|
|
196
|
-
},
|
|
221
|
+
}, _callee7);
|
|
197
222
|
}));
|
|
198
223
|
|
|
199
224
|
return function visitOkrCyclePag(_x6) {
|
|
200
|
-
return
|
|
225
|
+
return _ref7.apply(this, arguments);
|
|
201
226
|
};
|
|
202
227
|
}();
|
|
203
228
|
|
|
204
229
|
exports.visitOkrCyclePag = visitOkrCyclePag;
|
|
205
230
|
|
|
206
231
|
var getCycleSetting = /*#__PURE__*/function () {
|
|
207
|
-
var
|
|
208
|
-
return regeneratorRuntime.wrap(function
|
|
232
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
233
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
209
234
|
while (1) {
|
|
210
|
-
switch (
|
|
235
|
+
switch (_context8.prev = _context8.next) {
|
|
211
236
|
case 0:
|
|
212
|
-
return
|
|
237
|
+
return _context8.abrupt("return", (0, _request.rget)("v1")("okr/cycleSetting"));
|
|
213
238
|
|
|
214
239
|
case 1:
|
|
215
240
|
case "end":
|
|
216
|
-
return
|
|
241
|
+
return _context8.stop();
|
|
217
242
|
}
|
|
218
243
|
}
|
|
219
|
-
},
|
|
244
|
+
}, _callee8);
|
|
220
245
|
}));
|
|
221
246
|
|
|
222
247
|
return function getCycleSetting() {
|
|
223
|
-
return
|
|
248
|
+
return _ref8.apply(this, arguments);
|
|
224
249
|
};
|
|
225
250
|
}();
|
|
226
251
|
|
package/lib/utils/auth.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.hasSuperior = exports.OAuth = exports.KRAuth = exports.EAuth = exports.D
|
|
|
9
9
|
|
|
10
10
|
var _bsGlobal = require("./bs-global");
|
|
11
11
|
|
|
12
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
12
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
13
13
|
|
|
14
14
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.88",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"react-dom": "^17.0.2",
|
|
120
120
|
"react-grid-layout": "^1.2.5",
|
|
121
121
|
"react-perfect-scrollbar": "^1.5.8",
|
|
122
|
+
"react-router": "^6.2.1",
|
|
122
123
|
"react-sizeme": "^3.0.1",
|
|
123
124
|
"react-slick": "^0.28.1",
|
|
124
125
|
"react-spring": "^9.2.4",
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { withRouter } from "react-router";
|
|
4
|
+
// import { ResizeObserver } from '@juggle/resize-observer';
|
|
5
|
+
// import ResizeObserver from "resize-observer-polyfill";
|
|
6
|
+
import FlipCard, { flipRefIns } from "../../components/flip-menu-card";
|
|
7
|
+
import MenuTree from "../../components/menu-tree";
|
|
8
|
+
import Scrollbar from "../../../scrollbar";
|
|
9
|
+
import DemoMenuData, { DemoMenusInt, defaultRefObject } from "./menus";
|
|
10
|
+
import MenuHighlight from "./menu-highlight";
|
|
11
|
+
import preCls from "../../precls";
|
|
12
|
+
import { isEn } from "../../../../utils/getLocale";
|
|
13
|
+
|
|
14
|
+
interface DemoMenusProps {
|
|
15
|
+
onSelect: (node: any) => void;
|
|
16
|
+
history: any;
|
|
17
|
+
}
|
|
18
|
+
const DemoMenus: React.FC<DemoMenusProps> = (props) => {
|
|
19
|
+
const { onSelect = () => { }, history } = props;
|
|
20
|
+
|
|
21
|
+
const menuRef = useRef<any>();
|
|
22
|
+
const okrMenusData = useRef<DemoMenusInt>(defaultRefObject);
|
|
23
|
+
const [selectedMenuKeys, setSelectedMenuKeys] = useState<string[]>([]);
|
|
24
|
+
const [expandedKeys, setExpandedKeys] = useState(["demofree"]);
|
|
25
|
+
const [menus] = useState(() => {
|
|
26
|
+
okrMenusData.current = new DemoMenuData();
|
|
27
|
+
return okrMenusData.current.getMenus();
|
|
28
|
+
});
|
|
29
|
+
const flipRef = useRef<flipRefIns>({
|
|
30
|
+
next: () => { },
|
|
31
|
+
goback: () => { },
|
|
32
|
+
});
|
|
33
|
+
const collapseMenu = (isHide) => {
|
|
34
|
+
if (isHide) {
|
|
35
|
+
menuRef.current.style.width = "0px";
|
|
36
|
+
} else {
|
|
37
|
+
menuRef.current.style.width = "";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const onExpandHandler = (expandKeys) => {
|
|
41
|
+
setExpandedKeys(expandKeys);
|
|
42
|
+
};
|
|
43
|
+
// 判断路由高亮菜单
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const menuHighlight = new MenuHighlight(history);
|
|
46
|
+
menuHighlight.highlight((menu) => setSelectedMenuKeys([menu]));
|
|
47
|
+
}, [
|
|
48
|
+
history.location.pathname,
|
|
49
|
+
history.location.search,
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
const onSelectHandler = (selectedKyes, { node }) => {
|
|
53
|
+
onSelect(node);
|
|
54
|
+
// 处理菜单选中
|
|
55
|
+
if (!selectedKyes.length) return;
|
|
56
|
+
setSelectedMenuKeys(selectedKyes);
|
|
57
|
+
};
|
|
58
|
+
return (
|
|
59
|
+
<div
|
|
60
|
+
ref={menuRef}
|
|
61
|
+
className={classNames(preCls, `${preCls}-appraisal-menus`)}
|
|
62
|
+
>
|
|
63
|
+
<FlipCard collapseMenu={collapseMenu} ref={flipRef} defaultWidth={isEn ? 210 : 180}>
|
|
64
|
+
<div className={classNames(`${preCls}-appraisal-menus-tree`)}>
|
|
65
|
+
<Scrollbar>
|
|
66
|
+
<MenuTree
|
|
67
|
+
data={menus}
|
|
68
|
+
selectedKeys={selectedMenuKeys}
|
|
69
|
+
expandedKeys={expandedKeys}
|
|
70
|
+
onExpand={onExpandHandler}
|
|
71
|
+
onSelect={onSelectHandler}
|
|
72
|
+
/>
|
|
73
|
+
</Scrollbar>
|
|
74
|
+
</div>
|
|
75
|
+
<div />
|
|
76
|
+
</FlipCard>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
export default withRouter(DemoMenus);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PAGE_UNASSIGNED_DEMOFREE,
|
|
3
|
+
PAGE_ASSIGNED_DEMOFREE,
|
|
4
|
+
PAGE_RESERVED_DEMOFREE,
|
|
5
|
+
PAGE_DONE_DEMOFREE,
|
|
6
|
+
PAGE_IGNORED_DEMOFREE,
|
|
7
|
+
} from "./menus";
|
|
8
|
+
|
|
9
|
+
export default class {
|
|
10
|
+
private history: any = null;
|
|
11
|
+
|
|
12
|
+
constructor(history: any) {
|
|
13
|
+
this.history = history;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
highlight(cb) {
|
|
17
|
+
if (this.isUnAssigned()) cb(PAGE_UNASSIGNED_DEMOFREE);
|
|
18
|
+
else if (this.isAssigned()) cb(PAGE_ASSIGNED_DEMOFREE);
|
|
19
|
+
else if (this.isReserved()) cb(PAGE_RESERVED_DEMOFREE);
|
|
20
|
+
else if (this.isDone()) cb(PAGE_DONE_DEMOFREE);
|
|
21
|
+
else if (this.isIgnore()) cb(PAGE_IGNORED_DEMOFREE);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
isUnAssigned() {
|
|
25
|
+
const { pathname, search } = this.history.location;
|
|
26
|
+
return pathname.match(/demofree/)
|
|
27
|
+
&& (!search || search.match(/selected[\s]*?=[\s]*?unassigned/));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
isAssigned() {
|
|
31
|
+
const { pathname, search } = this.history.location;
|
|
32
|
+
return pathname.match(/demofree/)
|
|
33
|
+
&& search.match(/selected[\s]*?=[\s]*?assigned/);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
isReserved() {
|
|
37
|
+
const { pathname, search } = this.history.location;
|
|
38
|
+
return pathname.match(/demofree/)
|
|
39
|
+
&& search.match(/selected[\s]*?=[\s]*?reserved/);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
isDone() {
|
|
43
|
+
const { pathname, search } = this.history.location;
|
|
44
|
+
return pathname.match(/demofree/)
|
|
45
|
+
&& search.match(/selected[\s]*?=[\s]*?done/);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
isIgnore() {
|
|
49
|
+
const { pathname, search } = this.history.location;
|
|
50
|
+
return pathname.match(/demofree/)
|
|
51
|
+
&& search.match(/selected[\s]*?=[\s]*?ignore/);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { PARENT_MENU_NODE, SUB_MENU_ITEM_NOE } from "../../components/menu-tree/tree-node/index";
|
|
2
|
+
|
|
3
|
+
interface TreeNode {
|
|
4
|
+
key: string;
|
|
5
|
+
title: string;
|
|
6
|
+
nodeType: string;
|
|
7
|
+
isLeaf: boolean;
|
|
8
|
+
data: any;
|
|
9
|
+
children?: TreeNode[];
|
|
10
|
+
}
|
|
11
|
+
export const defaultRefObject = {
|
|
12
|
+
menus: [],
|
|
13
|
+
getMenus: () => { },
|
|
14
|
+
};
|
|
15
|
+
export interface DemoMenusInt {
|
|
16
|
+
menus: any[];
|
|
17
|
+
getMenus: Function;
|
|
18
|
+
}
|
|
19
|
+
export const PAGE_UNASSIGNED_DEMOFREE = "unassigned";
|
|
20
|
+
export const PAGE_ASSIGNED_DEMOFREE = "assigned";
|
|
21
|
+
export const PAGE_RESERVED_DEMOFREE = "reserved";
|
|
22
|
+
export const PAGE_DONE_DEMOFREE = "done";
|
|
23
|
+
export const PAGE_IGNORED_DEMOFREE = "ignore";
|
|
24
|
+
export default class DemoMenuData {
|
|
25
|
+
public menus;
|
|
26
|
+
|
|
27
|
+
public isManager;
|
|
28
|
+
|
|
29
|
+
constructor() {
|
|
30
|
+
this.isManager = localStorage.getItem("DEMO_USER_IS_MANAGER") === "1";
|
|
31
|
+
this.menus = [
|
|
32
|
+
{
|
|
33
|
+
icon: "kaohe",
|
|
34
|
+
label: "任务状态",
|
|
35
|
+
key: "demofree",
|
|
36
|
+
href: this.isManager ? "#/demofree/list?selected=unassigned" : "#/demofree/list?selected=assigned",
|
|
37
|
+
isShow: true,
|
|
38
|
+
children: [{
|
|
39
|
+
icon: "",
|
|
40
|
+
label: "未分配",
|
|
41
|
+
key: "unassigned",
|
|
42
|
+
href: "#/demofree/list?selected=unassigned",
|
|
43
|
+
isShow: this.isManager,
|
|
44
|
+
}, {
|
|
45
|
+
icon: "",
|
|
46
|
+
label: "已分配",
|
|
47
|
+
key: "assigned",
|
|
48
|
+
href: "#/demofree/list?selected=assigned",
|
|
49
|
+
isShow: true,
|
|
50
|
+
}, {
|
|
51
|
+
icon: "",
|
|
52
|
+
label: "已预约",
|
|
53
|
+
key: "reserved",
|
|
54
|
+
href: "#/demofree/list?selected=reserved",
|
|
55
|
+
isShow: true,
|
|
56
|
+
}, {
|
|
57
|
+
icon: "",
|
|
58
|
+
label: "已完成",
|
|
59
|
+
key: "done",
|
|
60
|
+
href: "#/demofree/list?selected=done",
|
|
61
|
+
isShow: true,
|
|
62
|
+
}, {
|
|
63
|
+
icon: "",
|
|
64
|
+
label: "已忽略",
|
|
65
|
+
key: "ignore",
|
|
66
|
+
href: "#/demofree/list?selected=ignore",
|
|
67
|
+
isShow: this.isManager,
|
|
68
|
+
}],
|
|
69
|
+
},
|
|
70
|
+
// {
|
|
71
|
+
// icon: "KH-help",
|
|
72
|
+
// label: "客户续费情况",
|
|
73
|
+
// key: "custom",
|
|
74
|
+
// href: "#/custom",
|
|
75
|
+
// isShow: true,
|
|
76
|
+
// type: MENU_ITEM_NOE,
|
|
77
|
+
// children:[{
|
|
78
|
+
// icon: "",
|
|
79
|
+
// label: "未处理",
|
|
80
|
+
// key: "ignore",
|
|
81
|
+
// href: "#/demofree/custom?selected=未处理",
|
|
82
|
+
// isShow: true,
|
|
83
|
+
// },{
|
|
84
|
+
// icon: "",
|
|
85
|
+
// label: "待定",
|
|
86
|
+
// key: "ignore",
|
|
87
|
+
// href: "#/demofree/custom?selected=待定",
|
|
88
|
+
// isShow: true,
|
|
89
|
+
// },{
|
|
90
|
+
// icon: "",
|
|
91
|
+
// label: "已续费",
|
|
92
|
+
// key: "ignore",
|
|
93
|
+
// href: "#/demofree/custom?selected=已续费",
|
|
94
|
+
// isShow: true,
|
|
95
|
+
// },{
|
|
96
|
+
// icon: "",
|
|
97
|
+
// label: "未续费",
|
|
98
|
+
// key: "ignore",
|
|
99
|
+
// href: "#/demofree/custom?selected=未续费",
|
|
100
|
+
// isShow: true,
|
|
101
|
+
// }]
|
|
102
|
+
// },
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
getMenus() {
|
|
107
|
+
const menus = this.formateToTreeNodeData(this.menus);
|
|
108
|
+
return menus;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
formateToTreeNodeData(menus) {
|
|
112
|
+
const treeNodes: TreeNode[] = [];
|
|
113
|
+
|
|
114
|
+
for (let i = 0; i < menus.length; i += 1) {
|
|
115
|
+
const menu = menus[i];
|
|
116
|
+
const hasChildren = !!((menu.children && menu.children.length));
|
|
117
|
+
const isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
118
|
+
|
|
119
|
+
let nodeType = menu.type;
|
|
120
|
+
if (!nodeType) nodeType = !isLeaf ? PARENT_MENU_NODE : SUB_MENU_ITEM_NOE;
|
|
121
|
+
|
|
122
|
+
if (menu.isShow) {
|
|
123
|
+
treeNodes.push({
|
|
124
|
+
key: `${menu.key}`,
|
|
125
|
+
title: menu.label,
|
|
126
|
+
data: menu,
|
|
127
|
+
isLeaf,
|
|
128
|
+
children: this.formateToTreeNodeData(menu.children || []),
|
|
129
|
+
nodeType,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return treeNodes;
|
|
135
|
+
}
|
|
136
|
+
}
|