@titaui/pc 1.6.12 → 1.6.16
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/avatar/index.js +1 -1
- package/lib/components/button/icon-btn/index.css +2 -0
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/rect-btn/index.css +21 -0
- package/lib/components/button/rect-btn/index.js +8 -8
- package/lib/components/button/text-btn/index.css +33 -0
- package/lib/components/button/text-btn/index.js +52 -2
- package/lib/components/change-okr/styledComponents.js +1 -1
- package/lib/components/communication/style.js +1 -1
- package/lib/components/create-okr/constant.js +1 -1
- package/lib/components/create-okr/createSuccessCmp.js +6 -2
- package/lib/components/create-okr/fields/index.js +1 -1
- package/lib/components/create-okr/index.js +16 -1
- package/lib/components/create-okr/request-api.js +1 -1
- package/lib/components/create-okr/style.js +1 -1
- package/lib/components/create-okr/utils/helper.js +1 -1
- package/lib/components/delete-confirm-pop/style.js +1 -1
- package/lib/components/dialog/index.css +1 -0
- package/lib/components/dropdown-layer/index.js +1 -1
- package/lib/components/dynamic/components/title/index.css +2 -2
- package/lib/components/dynamic/constant.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -21
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +4 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -7
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +1 -35
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/dynamic-task.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +17 -7
- package/lib/components/dynamic/dynamic-like-ranking/index.css +2 -3
- package/lib/components/dynamic/dynamic-like-ranking/index.js +11 -6
- package/lib/components/dynamic/dynamic-liking/index.css +1 -2
- package/lib/components/dynamic/dynamic-liking/item.js +2 -20
- package/lib/components/dynamic/dynamic-list/index.js +7 -1
- package/lib/components/dynamic/dynamic-topping/index.css +1 -1
- package/lib/components/dynamic/dynamic-topping/request-api.js +1 -1
- package/lib/components/dynamic/dynamic.js +7 -4
- package/lib/components/dynamic/export-module/index.js +1 -1
- package/lib/components/dynamic/index.js +1 -1
- package/lib/components/dynamic/new-ui.css +206 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +2 -2
- package/lib/components/dynamic/quick-operation/img/okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/send-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/send-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/task.png +0 -0
- package/lib/components/dynamic/request-api.js +1 -1
- package/lib/components/dynamic/util.js +2 -2
- package/lib/components/eReport/eReportLists/style.js +1 -1
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/eReport/eReportShare/toast/style.js +1 -1
- package/lib/components/edit-kr-wight/style/index.js +1 -1
- package/lib/components/emotionsSelector/style.js +1 -1
- package/lib/components/file-list/components/single-file/index.css +2 -2
- package/lib/components/file-list/components/single-file/index.js +1 -1
- package/lib/components/file-list/index.js +1 -1
- package/lib/components/form/form-fields/radios/index.css +5 -0
- package/lib/components/form/form-fields/radios/index.js +34 -5
- package/lib/components/form/index.js +1 -1
- package/lib/components/grid-page/commen-components/index.js +4 -4
- package/lib/components/grid-page/commen-components/scroll-tips.js +1 -1
- package/lib/components/grid-page/util/network.js +1 -1
- package/lib/components/help-card/index.css +17 -17
- package/lib/components/help-card/index.js +35 -31
- package/lib/components/help-card/request-api.js +2 -2
- package/lib/components/img-viewer/index.css +4 -0
- package/lib/components/img-viewer/index.js +2 -1
- package/lib/components/mblog/common/index.js +3 -3
- package/lib/components/mblog/style.js +1 -1
- package/lib/components/menus/components/drag-resize/index.css +4 -4
- package/lib/components/menus/components/drag-resize/index.js +35 -30
- package/lib/components/menus/components/flip-menu-card/index.css +7 -3
- package/lib/components/menus/components/flip-menu-card/index.js +42 -30
- package/lib/components/menus/components/menu-card/index.js +1 -6
- package/lib/components/menus/components/menu-close-btn/index.css +2 -1
- package/lib/components/menus/components/menu-tree/images/appraisal-menu/KH-help.svg +10 -0
- package/lib/components/menus/components/menu-tree/images/appraisal-menu/mypingjia.svg +10 -0
- package/lib/components/menus/components/menu-tree/images/loading-node.gif +0 -0
- package/lib/components/menus/components/menu-tree/images/okr-menu/cases.svg +9 -0
- package/lib/components/menus/components/menu-tree/images/okr-menu/{rw-zx.svg → panel.svg} +0 -0
- package/lib/components/menus/components/menu-tree/index.js +5 -4
- package/lib/components/menus/components/menu-tree/tree-node/avatar/index.css +49 -0
- package/lib/components/menus/components/menu-tree/tree-node/avatar/index.js +72 -0
- package/lib/components/menus/components/menu-tree/tree-node/company-all-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.js +5 -2
- package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +9 -4
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.css +47 -0
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.js +67 -0
- package/lib/components/menus/components/menu-tree/tree-node/group-name-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.css +126 -13
- package/lib/components/menus/components/menu-tree/tree-node/index.js +19 -0
- package/lib/components/menus/components/menu-tree/tree-node/loading-node.js +27 -0
- package/lib/components/menus/components/menu-tree/tree-node/menu-item-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/menu-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/no-follower-node.js +25 -0
- package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +9 -4
- package/lib/components/menus/components/menu-tree/tree-node/user-node/index.css +3 -1
- package/lib/components/menus/components/menu-tree/tree-node/user-node/index.js +12 -42
- package/lib/components/menus/export-modules/appraisal-menus/datas.js +58 -19
- package/lib/components/menus/export-modules/depart-menus/index.js +34 -7
- package/lib/components/menus/export-modules/okr-menus/datas.js +109 -4
- package/lib/components/menus/export-modules/okr-menus/index.css +0 -1
- package/lib/components/menus/export-modules/okr-menus/index.js +73 -20
- package/lib/components/menus/export-modules/subordinate-menus/index.js +12 -4
- package/lib/components/menus/index.js +1 -1
- package/lib/components/menus/request-apis.js +22 -5
- package/lib/components/nav-top/components/menu/index.css +1 -0
- package/lib/components/nav-top/components/menu/index.js +7 -5
- package/lib/components/nav-top/components/user-message/components/empty/index.js +1 -1
- package/lib/components/nav-top/components/user-message/components/inform/index.css +29 -6
- package/lib/components/nav-top/components/user-message/components/inform/index.js +116 -111
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +133 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/index.css +40 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/index.js +105 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/request-api.js +14 -0
- package/lib/components/nav-top/components/user-message/components/remind/index.css +26 -8
- package/lib/components/nav-top/components/user-message/components/remind/index.js +67 -60
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +71 -0
- package/lib/components/nav-top/components/user-message/components/reply/index.css +28 -6
- package/lib/components/nav-top/components/user-message/components/reply/index.js +118 -63
- package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +75 -0
- package/lib/components/nav-top/components/user-message/components/tab-title/index.js +5 -4
- package/lib/components/nav-top/components/user-message/components/todos/index.css +26 -12
- package/lib/components/nav-top/components/user-message/components/todos/index.js +118 -59
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +70 -0
- package/lib/components/nav-top/components/user-message/constant.js +2 -19
- package/lib/components/nav-top/components/user-message/images/loading.gif +0 -0
- package/lib/components/nav-top/components/user-message/images/msg-reward.png +0 -0
- package/lib/components/nav-top/components/user-message/index.css +41 -4
- package/lib/components/nav-top/components/user-message/index.js +89 -100
- package/lib/components/nav-top/components/user-message/msg/index.css +5 -30
- package/lib/components/nav-top/components/user-message/msg/index.js +28 -22
- package/lib/components/nav-top/components/user-message/utils.js +31 -0
- package/lib/components/nav-top/components/user-own-menu/index.css +2 -1
- package/lib/components/nav-top/components/user-own-menu/index.js +5 -7
- package/lib/components/nav-top/components/user-own-menu/utils.js +63 -0
- package/lib/components/nav-top/constant.js +2 -10
- package/lib/components/nav-top/index.css +55 -0
- package/lib/components/nav-top/index.js +14 -13
- package/lib/components/nav-top/request.apis.js +50 -0
- package/lib/components/nav-top/utils.js +10 -70
- package/lib/components/okr-detail/auth.js +1 -1
- package/lib/components/okr-detail/base-info/util.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/constant.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +1 -1
- package/lib/components/okr-detail/context.js +1 -1
- package/lib/components/okr-detail/detail-header/actions.js +2 -2
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +1 -1
- package/lib/components/okr-detail/detail-header/enums.js +1 -1
- package/lib/components/okr-detail/e-list/constant.js +1 -1
- package/lib/components/okr-detail/e-list/util.js +1 -1
- package/lib/components/okr-detail/okr-list/create-kr-item/style.js +1 -1
- package/lib/components/okr-detail/okr-list/drag-order-kr.js +1 -1
- package/lib/components/okr-detail/okr-list/index.js +2 -1
- package/lib/components/okr-detail/request-apis.js +1 -1
- package/lib/components/okr-detail/schedule/util.js +1 -1
- package/lib/components/okr-filter-drawer/filter-button.js +1 -0
- package/lib/components/okr-filter-drawer/filter-form.js +189 -0
- package/lib/components/okr-filter-drawer/index.css +45 -0
- package/lib/components/okr-filter-drawer/index.js +54 -0
- package/lib/components/okr-flow/index.js +1 -1
- package/lib/components/okr-flow/mini-map/utils.js +1 -1
- package/lib/components/okr-flow/open-data/index.js +1 -1
- package/lib/components/okr-flow/request-apis.js +1 -1
- package/lib/components/okr-flow/utils/config.js +1 -1
- package/lib/components/okr-flow/utils/index.js +1 -1
- package/lib/components/okr-flow/utils/tree-handler.js +1 -1
- package/lib/components/okr-progress/request-apis.js +1 -1
- package/lib/components/okr-progress/util.js +1 -1
- package/lib/components/okr-progress-detail/utils.js +1 -1
- package/lib/components/okr-progress-modal/helper.js +1 -1
- package/lib/components/okr-progress-modal/style.js +1 -1
- package/lib/components/okr-progress-modal/textarea/style.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/style.js +1 -1
- package/lib/components/okr-review/ReviewPop/style.js +1 -1
- package/lib/components/okr-review/components/ReviewItem/style.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/style.js +1 -1
- package/lib/components/okr-review/style.js +1 -1
- package/lib/components/okr-share/common-painter/utils.js +1 -1
- package/lib/components/okr-share/pink-card/images.js +1 -1
- package/lib/components/okr-share/request-apis.js +1 -1
- package/lib/components/okrcase-library/index.css +1 -1
- package/lib/components/okrcase-library/index.js +6 -1
- package/lib/components/okrcase-library/new-ui.css +52 -0
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +1 -1
- package/lib/components/okrcase-library/server/network.js +1 -1
- package/lib/components/open-data-painter/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +6 -12
- package/lib/components/period-selector/common.js +2 -2
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/components/selector/style.js +1 -1
- package/lib/components/period-selector/helper/index.js +1 -1
- package/lib/components/period-selector/mockData.js +1 -1
- package/lib/components/period-selector/style.js +1 -1
- package/lib/components/photo-card/components/card/index.css +83 -100
- package/lib/components/photo-card/components/card/index.js +119 -63
- package/lib/components/photo-card/data.js +5 -5
- package/lib/components/photo-card/images/assistant.svg +40 -0
- package/lib/components/photo-card/images/back-manager.svg +40 -0
- package/lib/components/photo-card/images/boss.svg +38 -0
- package/lib/components/photo-card/images/depart-leader.svg +40 -0
- package/lib/components/photo-card/images/super-manager.svg +40 -0
- package/lib/components/photo-card/index.css +15 -14
- package/lib/components/photo-card/index.js +59 -15
- package/lib/components/pop-down-notification/components/SuccessRender.js +1 -1
- package/lib/components/pop-down-notification/style/index.js +1 -1
- package/lib/components/praise-record/style.js +1 -1
- package/lib/components/progress/index.js +1 -1
- package/lib/components/publish-dynamic-modal/requist-api.js +1 -1
- package/lib/components/radio/radio.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation/helper.js +1 -1
- package/lib/components/task-relation/request-api.js +1 -1
- package/lib/components/tita-chart/index.js +4 -4
- package/lib/components/tita-chart/util/index.js +12 -12
- package/lib/components/tita-chart/util/utils.js +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tree/index.js +1 -3
- package/lib/components/update-modal/img/background.png +0 -0
- package/lib/components/update-modal/img/rocket.png +0 -0
- package/lib/components/update-modal/index.css +80 -0
- package/lib/components/update-modal/index.js +83 -0
- package/lib/components/update-modal/request-api.js +17 -0
- package/lib/components/upload/style.js +1 -1
- package/lib/components/upload/util.js +1 -1
- package/lib/components/upvote/request-apis.js +1 -1
- package/lib/components/user-selector/index.js +1 -1
- package/lib/components/user-selector/request-apis.js +1 -1
- package/lib/components/user-selector/utils.js +1 -1
- package/lib/components/version-change-modal/request-api.js +1 -1
- package/lib/components/viewer/index.js +1 -1
- package/lib/components-v1/avatar/styles.js +1 -1
- package/lib/components-v1/buttonv2/style/style.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/input/style/index.js +1 -1
- package/lib/components-v1/popConfirm/style.js +1 -1
- package/lib/components-v1/tabs/style.js +1 -1
- package/lib/components-v1/textarea/style.js +1 -1
- package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
- package/lib/components-v1/userSelector/style.js +1 -1
- package/lib/hooks/useLocalStorage.js +37 -0
- package/lib/index.js +18 -4
- package/lib/pages/aha2021/index.css +25 -1
- package/lib/pages/aha2021/index.js +10 -4
- package/lib/pages/group-management/components/PopDownNotification/components/SuccessRender.js +1 -1
- package/lib/pages/group-management/components/PopDownNotification/style/index.js +1 -1
- package/lib/pages/group-management/components/openData/index.js +1 -1
- package/lib/pages/group-management/groupInterface.js +10 -10
- package/lib/pages/home-page/components/data-list/table/columns/index.js +1 -1
- package/lib/pages/new-okr-list/context.js +14 -0
- package/lib/pages/new-okr-list/header/comments.js +104 -0
- package/lib/pages/new-okr-list/header/create-okr.js +61 -0
- package/lib/pages/new-okr-list/header/depart-title.js +59 -0
- package/lib/pages/new-okr-list/header/filter.js +95 -0
- package/lib/pages/new-okr-list/header/index.css +118 -0
- package/lib/pages/new-okr-list/header/index.js +133 -0
- package/lib/pages/new-okr-list/header/relation-title.js +28 -0
- package/lib/pages/new-okr-list/header/user-title.js +26 -0
- package/lib/pages/new-okr-list/index.css +10 -0
- package/lib/pages/new-okr-list/index.js +208 -0
- package/lib/pages/new-okr-list/interface.js +5 -0
- package/lib/pages/new-okr-list/keyword-search/index.css +71 -0
- package/lib/pages/new-okr-list/keyword-search/index.js +106 -0
- package/lib/pages/new-okr-list/list/index.css +0 -0
- package/lib/pages/new-okr-list/list/index.js +47 -0
- package/lib/pages/new-okr-list/precls.js +8 -0
- package/lib/pages/new-okr-list/request-api.js +158 -0
- package/lib/pages/new-okr-list/theme.css +7 -0
- package/lib/pages/okr-map/hooks/useStorage.js +1 -1
- package/lib/pages/okr-map/open-data/index.js +1 -1
- package/lib/pages/okr-map/request-apis.js +1 -1
- package/lib/pages/okr-map/utils.js +2 -1
- package/lib/utils/auth.js +1 -1
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/format-time.js +1 -1
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/local-storage.js +40 -0
- package/lib/utils/mblog.js +1 -1
- package/lib/utils/open-data.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/request-v1.js +2 -2
- package/lib/utils/request.js +1 -1
- package/lib/utils/roundWeight.js +2 -2
- package/lib/utils/tools.js +4 -3
- package/package.json +3 -2
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
- package/lib/components/nav-top/mock.js +0 -36
|
@@ -21,8 +21,6 @@ var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"))
|
|
|
21
21
|
|
|
22
22
|
var _menu = _interopRequireDefault(require("./components/menu"));
|
|
23
23
|
|
|
24
|
-
var _mock = require("./mock");
|
|
25
|
-
|
|
26
24
|
var _userMessage = _interopRequireDefault(require("./components/user-message"));
|
|
27
25
|
|
|
28
26
|
var _home = _interopRequireDefault(require("./images/home.png"));
|
|
@@ -31,6 +29,8 @@ var _version = _interopRequireDefault(require("./components/version"));
|
|
|
31
29
|
|
|
32
30
|
var _constant = require("./constant");
|
|
33
31
|
|
|
32
|
+
var _utils = require("./utils");
|
|
33
|
+
|
|
34
34
|
require("./index.css");
|
|
35
35
|
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -64,14 +64,13 @@ var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
|
64
64
|
var preCls = "titaui-nav-top";
|
|
65
65
|
|
|
66
66
|
var NavTop = function NavTop() {
|
|
67
|
-
var _useState = (0, _react.useState)(
|
|
68
|
-
_useState2 = _slicedToArray(_useState,
|
|
69
|
-
menu = _useState2[0]
|
|
70
|
-
setMenu = _useState2[1];
|
|
67
|
+
var _useState = (0, _react.useState)((0, _utils.getMenus)()),
|
|
68
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
69
|
+
menu = _useState2[0];
|
|
71
70
|
|
|
72
71
|
var versionInfo = (0, _bsGlobal.getBSGlobal)("tenantAuthentication");
|
|
73
72
|
|
|
74
|
-
var _useState3 = (0, _react.useState)(
|
|
73
|
+
var _useState3 = (0, _react.useState)(-1),
|
|
75
74
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
76
75
|
activeMenuId = _useState4[0],
|
|
77
76
|
setActiveMenuId = _useState4[1];
|
|
@@ -81,7 +80,7 @@ var NavTop = function NavTop() {
|
|
|
81
80
|
|
|
82
81
|
if (hash) {
|
|
83
82
|
var activeMenu = menu.find(function (item) {
|
|
84
|
-
return hash.includes(item.
|
|
83
|
+
return hash.includes(item.href.split("#")[1]);
|
|
85
84
|
});
|
|
86
85
|
|
|
87
86
|
if (activeMenu) {
|
|
@@ -91,16 +90,17 @@ var NavTop = function NavTop() {
|
|
|
91
90
|
};
|
|
92
91
|
|
|
93
92
|
(0, _react.useEffect)(function () {
|
|
93
|
+
handleHashChange();
|
|
94
94
|
window.addEventListener("hashchange", handleHashChange);
|
|
95
|
+
return function () {
|
|
96
|
+
window.removeEventListener("hashchange", handleHashChange);
|
|
97
|
+
};
|
|
95
98
|
}, []);
|
|
96
|
-
(0, _react.useEffect)(function () {
|
|
97
|
-
handleHashChange();
|
|
98
|
-
}, [menu]);
|
|
99
99
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
100
|
className: (0, _classnames["default"])("".concat(preCls))
|
|
101
101
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
102
102
|
className: (0, _classnames["default"])("".concat(preCls, "__left")),
|
|
103
|
-
href: "#".concat(menu[0].
|
|
103
|
+
href: "#".concat(menu[0].href)
|
|
104
104
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
105
105
|
src: Logo,
|
|
106
106
|
className: (0, _classnames["default"])("".concat(preCls, "__left-logo"))
|
|
@@ -122,7 +122,8 @@ var NavTop = function NavTop() {
|
|
|
122
122
|
className: (0, _classnames["default"])("".concat(preCls, "__version"))
|
|
123
123
|
}, /*#__PURE__*/_react["default"].createElement(_version["default"], null)), /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
124
124
|
popup: /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null),
|
|
125
|
-
popupAlign: _constant.popupAlignPhoto
|
|
125
|
+
popupAlign: _constant.popupAlignPhoto,
|
|
126
|
+
popupTransitionName: "tita-user-own-menu__popup-right-top"
|
|
126
127
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
128
|
className: (0, _classnames["default"])("".concat(preCls, "__photo"))
|
|
128
129
|
}, /*#__PURE__*/_react["default"].createElement(_default2["default"], {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTodos = exports.getReplys = exports.getReminds = exports.getMessages = exports.getInforms = exports.getData = void 0;
|
|
7
|
+
|
|
8
|
+
var _request = require("../../utils/request");
|
|
9
|
+
|
|
10
|
+
var getTodos = function getTodos(pageNum) {
|
|
11
|
+
return (0, _request.rget)("v1")("todo/Get?app_type=-1&app_id=-1&page_num=".concat(pageNum, "&page_size=10&status=1"));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.getTodos = getTodos;
|
|
15
|
+
|
|
16
|
+
var getData = function getData(url, saveData) {
|
|
17
|
+
return (0, _request.rget)("v1")(url).then(function (res) {
|
|
18
|
+
saveData(res.Data);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.getData = getData;
|
|
23
|
+
|
|
24
|
+
var getReplys = function getReplys(pageNum) {
|
|
25
|
+
return (0, _request.rget)("v1")("comment/messages?page_num=".concat(pageNum, "&page_size=10&status=2"));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.getReplys = getReplys;
|
|
29
|
+
|
|
30
|
+
var getReminds = function getReminds() {
|
|
31
|
+
return (0, _request.rget)("v2")("remind/get");
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.getReminds = getReminds;
|
|
35
|
+
|
|
36
|
+
var getInforms = function getInforms(pageNum) {
|
|
37
|
+
return (0, _request.rget)("v1")("messages/Get?page_size=10&page_num=".concat(pageNum, "&status=1&app_type=-1&app_id=-1"));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.getInforms = getInforms;
|
|
41
|
+
|
|
42
|
+
var getMessages = function getMessages() {
|
|
43
|
+
var nowTime = new Date();
|
|
44
|
+
var year = nowTime.getFullYear();
|
|
45
|
+
var month = nowTime.getMonth() + 1;
|
|
46
|
+
var date = nowTime.getDate();
|
|
47
|
+
return (0, _request.rget)("v1")("RemindV2/Get?dateTime=".concat(year, "/").concat(month, "/").concat(date));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.getMessages = getMessages;
|
|
@@ -3,75 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _set = _interopRequireDefault(require("./images/set.svg"));
|
|
17
|
-
|
|
18
|
-
var _open = _interopRequireDefault(require("./images/open.svg"));
|
|
19
|
-
|
|
20
|
-
var _qiyeO = _interopRequireDefault(require("./images/qiye-o.svg"));
|
|
21
|
-
|
|
22
|
-
var _exit = _interopRequireDefault(require("./images/exit.svg"));
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
|
-
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
27
|
-
var apiServer = (0, _bsGlobal.getBSGlobal)("apiPath");
|
|
28
|
-
var tm = (0, _bsGlobal.getBSGlobal)("tm");
|
|
29
|
-
var isBoss = new _auth.BaseAuth().isBoss();
|
|
30
|
-
var isManager = new _auth.BaseAuth().isManager();
|
|
31
|
-
|
|
32
|
-
var getOwnSet = function getOwnSet() {
|
|
33
|
-
var ownhandle = [{
|
|
34
|
-
id: "ownHome",
|
|
35
|
-
url: _ownHome["default"],
|
|
36
|
-
title: "个人信息",
|
|
37
|
-
objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home/#user-info")
|
|
38
|
-
}, {
|
|
39
|
-
id: "ownSet",
|
|
40
|
-
url: _set["default"],
|
|
41
|
-
title: "个人设置",
|
|
42
|
-
objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home/#setting")
|
|
43
|
-
}];
|
|
44
|
-
var limit = [{
|
|
45
|
-
id: "manage",
|
|
46
|
-
url: _manage["default"],
|
|
47
|
-
title: "企业管理后台",
|
|
48
|
-
objUrl: "".concat(tm)
|
|
49
|
-
}, {
|
|
50
|
-
id: "open",
|
|
51
|
-
url: _open["default"],
|
|
52
|
-
title: "开启高级设置",
|
|
53
|
-
objUrl: "".concat(tm, "/").concat(userId, "/TmHome#?iTalentFrameType=iframe&iTalentFrame=%2F%2Fadmin.tita.gift%2F500000036%2FindexV2%23%2FadvancedSettings")
|
|
54
|
-
}, {
|
|
55
|
-
id: "role",
|
|
56
|
-
url: _qiyeO["default"],
|
|
57
|
-
title: "企业管理规定",
|
|
58
|
-
objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home#setting?id=15709")
|
|
59
|
-
}];
|
|
60
|
-
var exit = [{
|
|
61
|
-
id: "Logout",
|
|
62
|
-
url: _exit["default"],
|
|
63
|
-
title: "退出登录",
|
|
64
|
-
objUrl: "".concat(apiServer, "/Account/Logout")
|
|
65
|
-
}];
|
|
66
|
-
var newOwnSet = [];
|
|
67
|
-
newOwnSet.push(ownhandle);
|
|
68
|
-
|
|
69
|
-
if (isBoss || isManager) {
|
|
70
|
-
newOwnSet.push(limit);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
newOwnSet.push(exit);
|
|
74
|
-
return newOwnSet;
|
|
6
|
+
exports.getMenus = void 0;
|
|
7
|
+
|
|
8
|
+
var getMenus = function getMenus() {
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
var navs = BSGlobal.newNavigation;
|
|
11
|
+
navs.sort(function (pre, next) {
|
|
12
|
+
return pre.orderId - next.orderId;
|
|
13
|
+
});
|
|
14
|
+
return navs;
|
|
75
15
|
};
|
|
76
16
|
|
|
77
|
-
exports.
|
|
17
|
+
exports.getMenus = getMenus;
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.OAuth = exports.KRAuth = exports.EAuth = exports.BaseAuth = void 0;
|
|
9
9
|
|
|
10
10
|
var _bsGlobal = require("../../utils/bs-global");
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.formatAvatarInfo = exports.findUserIndex = exports.findUser = void 0;
|
|
7
7
|
|
|
8
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.EStatusStatus2ClassType = exports.EStatusClass2StatusTypeText = exports.EStatusClass2StatusType = void 0;
|
|
7
7
|
var EStatusClass2StatusType = {
|
|
8
8
|
'tu-icon-finished': 2,
|
|
9
9
|
'tu-icon-running': 1,
|
package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ScoreInfoWrapperError = exports.ScoreInfoWrapper = exports.ScoreInfoSpanTextareaError = exports.ScoreInfoSpanTextarea = exports.ScoreInfoSpanText = exports.IconEdit = exports.ExtraWrapper = exports.CallSomeoneSpan = exports.AvatarWrapper = exports.Add = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultConfig = exports.
|
|
6
|
+
exports.defaultConfig = exports.OkrListContext = exports.GeneralDataContext = exports.EListContext = exports.CommonContext = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -38,8 +38,8 @@ function getOkrHeadActions(data) {
|
|
|
38
38
|
addExitButton(dataWithAuth, actions);
|
|
39
39
|
addFinishOrReopenButton(dataWithAuth, actions);
|
|
40
40
|
addCopyButton(dataWithAuth, actions);
|
|
41
|
-
addDeleteButton(dataWithAuth, actions);
|
|
42
|
-
|
|
41
|
+
addDeleteButton(dataWithAuth, actions); // addDetailButton(dataWithAuth,actions)
|
|
42
|
+
|
|
43
43
|
return actions;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Options = exports.Icon = exports.DeleteWrapper = exports.DeleteTitle = exports.ButtonGroup = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.toTree = exports.getETreeNode = exports.formatTreeDataToNode = exports.formatEListDataToSelectTree = exports.formatCondition = void 0;
|
|
7
7
|
|
|
8
8
|
var _cloneDeep = _interopRequireDefault(require("clone-deep"));
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Wrapper = exports.Toggle = exports.ProgressWrapper = exports.ProgressStatus = exports.ProgressDate = exports.Progress = exports.Percent = exports.OptionsWrapper = exports.Options = exports.Option = exports.OScore = exports.ONameWrapper = exports.OName = exports.OClassify = exports.OBadge = exports.Link = exports.Item = exports.InputWrapper = exports.InputTipsWrapper = exports.IconGroup = exports.Icon = exports.DivideLine = exports.Content = exports.AvatarWrapper = exports.AddKrBtn = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.removeKr = exports.moveNext = exports.moveFront = void 0;
|
|
7
7
|
|
|
8
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
9
9
|
|
|
@@ -412,7 +412,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
412
412
|
|
|
413
413
|
var isShowAlignOkr = (0, _react.useMemo)(function () {
|
|
414
414
|
return childOkrs && childOkrs.length > 0 || // 有子目标
|
|
415
|
-
parentOkr ||
|
|
415
|
+
parentOkr || // 有父目标
|
|
416
|
+
!parentOkr && canEditOkr // 无父目标但有权限编辑
|
|
416
417
|
;
|
|
417
418
|
}, [parentOkr, childOkrs, canEditOkr]);
|
|
418
419
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.getKrsByCondition = exports.getKrs = exports.getFeedById = exports.deleteUser = exports.deleteProgressDesc = exports.deleteKr = exports.createNewKr = exports.close = exports.cancelRel = exports.cancelPraise = exports.cancelParentOkr = exports.addUserRelation = exports.addUser = exports.addPraise = exports.addComment = void 0;
|
|
7
7
|
|
|
8
8
|
var _qs = _interopRequireDefault(require("qs"));
|
|
9
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _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 _checkbox = _interopRequireDefault(require("../checkbox"));
|
|
13
|
+
|
|
14
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
15
|
+
|
|
16
|
+
var _button = require("../button");
|
|
17
|
+
|
|
18
|
+
var _form = _interopRequireWildcard(require("../form"));
|
|
19
|
+
|
|
20
|
+
var _localStorage = require("../../utils/local-storage");
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var preCls = "tita-filter__form";
|
|
49
|
+
var useLocalStorage = new _localStorage.localStorage();
|
|
50
|
+
|
|
51
|
+
var Filter = function Filter(_ref) {
|
|
52
|
+
var onSearch = _ref.onSearch,
|
|
53
|
+
closeFilterDrawer = _ref.closeFilterDrawer;
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(useLocalStorage.getItem('okr-filter-values') || {
|
|
56
|
+
okrType: "",
|
|
57
|
+
okrClassify: "",
|
|
58
|
+
orderType: "2"
|
|
59
|
+
}),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
formFieldValues = _useState2[0],
|
|
62
|
+
setFormFieldValues = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var _useState3 = (0, _react.useState)(false),
|
|
65
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
+
isRemeber = _useState4[0],
|
|
67
|
+
setIsRemeber = _useState4[1];
|
|
68
|
+
|
|
69
|
+
var setting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting; // const openOkrType = setting.OkrTypeSetting;
|
|
70
|
+
// const openClassify = setting.OkrClassify;
|
|
71
|
+
|
|
72
|
+
var openOkrType = true;
|
|
73
|
+
var openClassify = true;
|
|
74
|
+
var formContainerRef = (0, _react.useRef)();
|
|
75
|
+
var formRef = (0, _react.useRef)();
|
|
76
|
+
|
|
77
|
+
var onFieldsChangeHandler = function onFieldsChangeHandler(fields) {
|
|
78
|
+
setFormFieldValues(_objectSpread({}, fields));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var resetValues = function resetValues() {
|
|
82
|
+
setFormFieldValues({
|
|
83
|
+
okrType: "",
|
|
84
|
+
okrClassify: "",
|
|
85
|
+
orderType: "2"
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var handleRemember = function handleRemember(checked) {
|
|
90
|
+
setIsRemeber(checked);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var handleSubmit = function handleSubmit() {
|
|
94
|
+
if (isRemeber) {
|
|
95
|
+
useLocalStorage.setItem('okr-filter-values', formFieldValues);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
onSearch && onSearch({
|
|
99
|
+
okrType: formFieldValues.okrType,
|
|
100
|
+
okrClassify: formFieldValues.okrClassify,
|
|
101
|
+
orderType: formFieldValues.orderType
|
|
102
|
+
});
|
|
103
|
+
closeFilterDrawer && closeFilterDrawer();
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var okrTypeList = [{
|
|
107
|
+
label: "公司",
|
|
108
|
+
value: 3
|
|
109
|
+
}, {
|
|
110
|
+
label: "部门",
|
|
111
|
+
value: 2
|
|
112
|
+
}, {
|
|
113
|
+
label: "团队",
|
|
114
|
+
value: 4
|
|
115
|
+
}, {
|
|
116
|
+
label: "个人",
|
|
117
|
+
value: 1
|
|
118
|
+
}];
|
|
119
|
+
var okrClassifyList = [{
|
|
120
|
+
label: "承诺型",
|
|
121
|
+
value: 1
|
|
122
|
+
}, {
|
|
123
|
+
label: "愿景型",
|
|
124
|
+
value: 2
|
|
125
|
+
}];
|
|
126
|
+
var orderTypeList = [{
|
|
127
|
+
label: "创建时间最早",
|
|
128
|
+
value: 2
|
|
129
|
+
}, {
|
|
130
|
+
label: "创建时间最晚",
|
|
131
|
+
value: 1
|
|
132
|
+
}, {
|
|
133
|
+
label: "更新时间最早",
|
|
134
|
+
value: 12
|
|
135
|
+
}, {
|
|
136
|
+
label: "更新时间最晚",
|
|
137
|
+
value: 11
|
|
138
|
+
}, {
|
|
139
|
+
label: "按负责人排序",
|
|
140
|
+
value: 13
|
|
141
|
+
}];
|
|
142
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
143
|
+
className: "".concat(preCls)
|
|
144
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
145
|
+
className: "".concat(preCls, "__content")
|
|
146
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
147
|
+
ref: formRef,
|
|
148
|
+
getFormContainer: function getFormContainer() {
|
|
149
|
+
return formContainerRef.current;
|
|
150
|
+
},
|
|
151
|
+
onFieldsChange: onFieldsChangeHandler
|
|
152
|
+
}, openOkrType ? /*#__PURE__*/_react["default"].createElement(_form.FormFields.Radios, {
|
|
153
|
+
name: "okrType",
|
|
154
|
+
label: "\u76EE\u6807\u7C7B\u578B",
|
|
155
|
+
radios: okrTypeList,
|
|
156
|
+
value: formFieldValues.okrType,
|
|
157
|
+
radioClass: "".concat(preCls, "-radio")
|
|
158
|
+
}) : /*#__PURE__*/_react["default"].createElement("span", null), openClassify ? /*#__PURE__*/_react["default"].createElement(_form.FormFields.Radios, {
|
|
159
|
+
name: "okrClassify",
|
|
160
|
+
label: "\u76EE\u6807\u7C7B\u522B",
|
|
161
|
+
radios: okrClassifyList,
|
|
162
|
+
value: formFieldValues.okrClassify,
|
|
163
|
+
radioClass: "".concat(preCls, "-radio")
|
|
164
|
+
}) : /*#__PURE__*/_react["default"].createElement("span", null), /*#__PURE__*/_react["default"].createElement(_form.FormFields.Radios, {
|
|
165
|
+
name: "orderType",
|
|
166
|
+
label: "\u76EE\u6807\u6392\u5E8F",
|
|
167
|
+
radios: orderTypeList,
|
|
168
|
+
value: formFieldValues.orderType,
|
|
169
|
+
radioClass: "".concat(preCls, "-radio")
|
|
170
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
+
className: "".concat(preCls, "__footer")
|
|
172
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
173
|
+
className: "".concat(preCls, "__footer-checkbox")
|
|
174
|
+
}, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
175
|
+
onChange: handleRemember
|
|
176
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
177
|
+
className: "".concat(preCls, "__footer-checkbox-text")
|
|
178
|
+
}, "\u8BB0\u4F4F\u9009\u62E9")), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
|
|
179
|
+
className: "".concat(preCls, "__footer-reset"),
|
|
180
|
+
onClick: resetValues
|
|
181
|
+
}, "\u91CD\u7F6E"), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
|
|
182
|
+
className: "".concat(preCls, "__footer-sure"),
|
|
183
|
+
type: "primary",
|
|
184
|
+
onClick: handleSubmit
|
|
185
|
+
}, "\u786E\u5B9A")));
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
var _default = Filter;
|
|
189
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.tita-filter__form {
|
|
2
|
+
height: calc(100% - 57px);
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
padding: 20px 32px 18px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tita-filter__form .titaui-form-field {
|
|
11
|
+
margin-top: 16px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tita-filter__form .titaui-form-field:nth-of-type(1) {
|
|
15
|
+
margin-top: unset;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tita-filter__form .form-field-radio__label {
|
|
19
|
+
margin-bottom: 16px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tita-filter__form-radio {
|
|
23
|
+
width: 154px;
|
|
24
|
+
height: 22px;
|
|
25
|
+
margin-bottom: 12px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tita-filter__form__footer {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tita-filter__form__footer-checkbox {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tita-filter__form__footer-checkbox-text {
|
|
39
|
+
margin-left: 3px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tita-filter__form__footer-reset {
|
|
43
|
+
margin-left: 40px;
|
|
44
|
+
margin-right: 12px;
|
|
45
|
+
}
|