@titaui/pc 1.11.4-1 → 1.11.4-12
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/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/rect-btn/index.js +7 -7
- package/lib/components/change-okr-modal/Item.js +15 -15
- package/lib/components/communication/index.js +30 -29
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/drawer/index.js +7 -6
- package/lib/components/dynamic/constant.js +13 -6
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +243 -0
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +6 -2
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +22 -7
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +6 -7
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +19 -7
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/{es/pages/group-management/page-view/loading → lib/components/dynamic/dynamic-item/dynamic-interview-share}/index.js +40 -11
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +11 -11
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +14 -14
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/index.js +34 -13
- package/lib/components/dynamic/dynamic-list/index.js +5 -13
- package/lib/components/e-priority/index.js +18 -12
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/file-list/components/single-file/index.js +11 -11
- package/lib/components/form/form-fields/date/index.js +15 -11
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +22 -2
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/icon-button-list/index.css +2 -57
- package/lib/components/icon-button-list/index.js +10 -7
- package/lib/components/img-viewer/index.css +10 -3
- package/lib/components/img-viewer/index.js +57 -18
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/mblog/index.js +31 -30
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +4 -2
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-detail/detail-header/actions.js +62 -66
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +21 -19
- package/lib/components/okr-flow/child-node/index.css +67 -21
- package/lib/components/okr-flow/child-node/work-node.js +61 -24
- package/lib/components/okr-flow/empty/index.css +8 -1
- package/lib/components/okr-flow/export-modal/index.js +42 -18
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +30 -24
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +43 -22
- package/lib/components/okr-flow/request-apis.js +15 -8
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/root-node/index.js +26 -25
- package/lib/components/okr-flow/utils/index.js +45 -29
- package/lib/components/okr-flow/utils/tree-handler.js +29 -18
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/okrcase-library/index.css +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +36 -30
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +9 -3
- package/lib/components/period-selector/index.js +14 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +21 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +29 -8
- package/lib/components/picker/components/panels/month-panel/month-body.js +6 -4
- package/lib/components/picker/components/picker-trigger/index.css +15 -0
- package/lib/components/picker/components/picker-trigger/index.js +8 -8
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/scroll-container/index.js +423 -0
- package/lib/components/scroll-container/style.css +35 -0
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/select/Option.js +3 -3
- package/lib/components/superset-charts/components/chart/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -13
- package/{es/pages/group-management/page-view/group-empty.js → lib/components/survey-model/contact.js} +54 -27
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +265 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/{es/components/okr-detail/e-list → lib/components/task-tree}/precls.js +1 -1
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/{es/components/okr-detail/components/okr-tree/tree-node/default-node.js → lib/components/task-tree/task-item-node/e-empty.js} +13 -6
- package/{es/components/okr-detail/components/okr-tree/tree-node/e-node → lib/components/task-tree/task-item-node}/e-project.js +63 -51
- package/{es/components/e-status-dropdown/index.js → lib/components/task-tree/task-item-node/e-status-dropdown.js} +13 -13
- package/{es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js → lib/components/task-tree/task-item-node/e-task.js} +138 -124
- package/{es/components/okr-detail/components/okr-tree/tree-node → lib/components/task-tree/task-item-node}/get-process-color.js +3 -3
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/{es/components/okr-detail/components/okr-tree/index.js → lib/components/task-tree/task-tree.js} +17 -16
- package/lib/components/time-picker/index.css +6 -0
- package/lib/components/time-picker/time-picker.js +45 -33
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +338 -0
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +99 -91
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +7 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +73 -34
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +65 -42
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +26 -14
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +58 -13
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +28 -20
- package/lib/pages/okr-map/number-select/index.css +12 -9
- package/lib/pages/okr-map/number-select/index.js +3 -3
- package/lib/utils/auth.js +65 -8
- package/lib/utils/bs-global.js +18 -6
- package/lib/utils/open-data.js +63 -43
- package/package.json +6 -2
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/es/components/cascader/time.js +0 -31
- package/es/components/common-share/request-apis.js +0 -56
- package/es/components/confidence/heart.js +0 -66
- package/es/components/create-okr-modal/fields/index.js +0 -17
- package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +0 -154
- package/es/components/date-picker/BodyItem.js +0 -121
- package/es/components/date-picker/CalendarBody.js +0 -157
- package/es/components/date-picker/CalendarHeader.js +0 -187
- package/es/components/date-picker/index.js +0 -157
- package/es/components/date-range-picker/index.js +0 -210
- package/es/components/dialog/index.js +0 -119
- package/es/components/dialog-confirm/index.js +0 -154
- package/es/components/drop-selector/icon-item.js +0 -40
- package/es/components/drop-selector/index.js +0 -179
- package/es/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/es/components/dynamic/dynamic-liking/mock.js +0 -83
- package/es/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/es/components/e-priority/index.js +0 -88
- package/es/components/grid-layout/commen-components/index.js +0 -73
- package/es/components/grid-layout/image/could.js +0 -8
- package/es/components/grid-layout/image/lv.js +0 -8
- package/es/components/grid-layout/image/tita-mask.js +0 -8
- package/es/components/help-card/request-api.js +0 -35
- package/es/components/icon-button-list/index.js +0 -65
- package/es/components/menus/context.js +0 -18
- package/es/components/menus/precls.js +0 -8
- package/es/components/okr-detail/auth.js +0 -197
- package/es/components/okr-detail/components/ao-nice/index.js +0 -245
- package/es/components/okr-detail/components/block-line/index.js +0 -20
- package/es/components/okr-detail/components/header/index.js +0 -211
- package/es/components/okr-detail/components/icon-text/index.js +0 -116
- package/es/components/okr-detail/components/okr-tree/precls.js +0 -8
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +0 -88
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +0 -98
- package/es/components/okr-detail/components/okr-tree/tree-node/index.js +0 -90
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +0 -46
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +0 -421
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +0 -54
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +0 -62
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -94
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +0 -273
- package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +0 -207
- package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +0 -236
- package/es/components/okr-detail/components/padding-layout.js +0 -22
- package/es/components/okr-detail/components/tab-panel-content/index.js +0 -27
- package/es/components/okr-detail/context.js +0 -30
- package/es/components/okr-detail/e-list/index.js +0 -243
- package/es/components/okr-detail/e-list/search-form/fields/e-order.js +0 -172
- package/es/components/okr-detail/e-list/search-form/fields/e-status.js +0 -99
- package/es/components/okr-detail/e-list/search-form/fields/e-user.js +0 -49
- package/es/components/okr-detail/e-list/search-form/index.js +0 -143
- package/es/components/okr-detail/error-page/index.js +0 -33
- package/es/components/okr-detail/index.js +0 -428
- package/es/components/okr-detail/loading/index.js +0 -28
- package/es/components/okr-detail/okr-list/add-parent-okr.js +0 -37
- package/es/components/okr-detail/okr-list/create-kr-item/heart.js +0 -38
- package/es/components/okr-detail/okr-list/drag-order-kr.js +0 -62
- package/es/components/okr-detail/okr-list/empty/index.js +0 -48
- package/es/components/okr-detail/okr-list/index.js +0 -524
- package/es/components/okr-detail/okr-list/warp-parent-okr.js +0 -21
- package/es/components/okr-detail/store.js +0 -1
- package/es/components/okr-flow/child-node/fields/creator.js +0 -175
- package/es/components/okr-flow/child-node/fields/okrClassify.js +0 -31
- package/es/components/okr-flow/child-node/fields/okrType.js +0 -21
- package/es/components/okr-flow/child-node/helper.js +0 -35
- package/es/components/okr-flow/child-node/index.js +0 -110
- package/es/components/okr-flow/child-node/kr-node.js +0 -75
- package/es/components/okr-flow/child-node/work-node.js +0 -242
- package/es/components/okr-flow/context.js +0 -14
- package/es/components/okr-flow/empty/index.js +0 -29
- package/es/components/okr-flow/export-modules/okr-search-panel/index.js +0 -394
- package/es/components/okr-flow/index.js +0 -24
- package/es/components/okr-flow/mini-map/index.js +0 -112
- package/es/components/okr-flow/mini-map/map.js +0 -145
- package/es/components/okr-flow/mini-map/mini-node.js +0 -57
- package/es/components/okr-flow/mini-map/utils.js +0 -79
- package/es/components/okr-flow/okr-map/index.js +0 -192
- package/es/components/okr-flow/open-data/index.js +0 -115
- package/es/components/okr-flow/precls.js +0 -8
- package/es/components/okr-flow/request-apis.js +0 -118
- package/es/components/okr-flow/root-node/index.js +0 -229
- package/es/components/okr-flow/utils/config.js +0 -18
- package/es/components/okr-flow/utils/helper.js +0 -36
- package/es/components/okr-flow/utils/index.js +0 -66
- package/es/components/okr-flow/utils/tree-handler.js +0 -323
- package/es/components/okr-progress-modal/helper.js +0 -156
- package/es/components/okr-progress-modal/request-apis.js +0 -34
- package/es/components/okr-share/request-apis.js +0 -56
- package/es/components/okrcase-library/server/network.js +0 -407
- package/es/components/pagination/locale/en_US.js +0 -22
- package/es/components/pagination/locale/zh_CN.js +0 -22
- package/es/components/point-demo/drop-down-box/index.js +0 -159
- package/es/components/point-demo/index.js +0 -533
- package/es/components/point-demo/input/index.js +0 -176
- package/es/components/point-demo/point-demo.js +0 -75
- package/es/components/point-demo/popup/index.js +0 -113
- package/es/components/point-demo/popup/placement.js +0 -44
- package/es/components/range-picker-pop/index.js +0 -273
- package/es/components/scrollbar/simplebar/helpers.js +0 -59
- package/es/components/scrollbar/simplebar/index.js +0 -91
- package/es/components/scrollbar/simplebar/scrollbar-width.js +0 -47
- package/es/components/scrollbar/simplebar/simplebar.js +0 -852
- package/es/components/scrollbar/simplebar-react.js +0 -163
- package/es/components/search-dropdown/index.js +0 -40
- package/es/components/search-input/index.js +0 -126
- package/es/components/select/Option.js +0 -94
- package/es/components/select/index.js +0 -330
- package/es/components/selector-input/debounce.js +0 -36
- package/es/components/selector-input/index.js +0 -109
- package/es/components/slider-input/index.js +0 -119
- package/es/components/switch/index.js +0 -39
- package/es/components/table/index.js +0 -275
- package/es/components/tabs/index.js +0 -63
- package/es/components/task-relation-modal/tree-node/index.js +0 -58
- package/es/components/tita-chart/charts/img/could.js +0 -8
- package/es/components/tooltip/error-tip.js +0 -24
- package/es/components/tooltip/index.js +0 -21
- package/es/components/tree/index.js +0 -79
- package/es/components/tree/precls.js +0 -8
- package/es/components/upvote/request-apis.js +0 -45
- package/es/components/user-selector/action-btns/btn-cancel.js +0 -21
- package/es/components/user-selector/action-btns/btn-ok.js +0 -21
- package/es/components/user-selector/action-btns/index.js +0 -27
- package/es/components/user-selector/context.js +0 -18
- package/es/components/user-selector/empty/group.js +0 -55
- package/es/components/user-selector/empty/index.js +0 -28
- package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +0 -41
- package/es/components/user-selector/export-modules/group-selector/index.js +0 -170
- package/es/components/user-selector/export-modules/group-selector/searched-panel.js +0 -68
- package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +0 -246
- package/es/components/user-selector/index.js +0 -25
- package/es/components/user-selector/layout/index.js +0 -25
- package/es/components/user-selector/loading/index.js +0 -18
- package/es/components/user-selector/request-apis.js +0 -180
- package/es/components/user-selector/searched-panel/index.js +0 -139
- package/es/components/user-selector/searched-panel/result-part.js +0 -43
- package/es/components/user-selector/select-tree/selected-tree/index.js +0 -91
- package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +0 -48
- package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +0 -27
- package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +0 -57
- package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +0 -93
- package/es/components/user-selector/utils.js +0 -139
- package/es/components/viewer/ImageListRender.js +0 -143
- package/es/components/viewer/index.js +0 -168
- package/es/components/word-cloud/index.js +0 -109
- package/es/components/word-cloud/request-apis.js +0 -26
- package/es/components-v1/animate/AnimateChild.js +0 -76
- package/es/components-v1/animate/animate.js +0 -148
- package/es/components-v1/animate/index.js +0 -13
- package/es/components-v1/dom/index.js +0 -30
- package/es/components-v1/placement/index.js +0 -13
- package/es/components-v1/placement/placement.js +0 -111
- package/es/components-v1/placement/placementInner.js +0 -139
- package/es/components-v1/pop/Pop.js +0 -246
- package/es/components-v1/pop/PopInner.js +0 -163
- package/es/components-v1/pop/index.js +0 -13
- package/es/components-v1/progress/CircleProgress.js +0 -152
- package/es/components-v1/progress/LineProgress.js +0 -83
- package/es/components-v1/progress/index.js +0 -80
- package/es/components-v1/select/Option.js +0 -94
- package/es/components-v1/select/index.js +0 -330
- package/es/components-v1/utils/animate/animate.js +0 -103
- package/es/components-v1/utils/animate/event.js +0 -79
- package/es/components-v1/utils/dom/index.js +0 -30
- package/es/components-v1/utils/placement/autoAdjustPlacement.js +0 -93
- package/es/components-v1/utils/placement/getContainerVisibleArea.js +0 -22
- package/es/components-v1/utils/placement/getExpectPlacement.js +0 -49
- package/es/components-v1/utils/placement/getPlacementInContainer.js +0 -26
- package/es/components-v1/utils/placement/placement.js +0 -76
- package/es/index.js +0 -777
- package/es/pages/appointment-demo/drop-down-box/index.js +0 -159
- package/es/pages/appointment-demo/index.js +0 -649
- package/es/pages/appointment-demo/input/index.js +0 -176
- package/es/pages/appointment-demo/popup/index.js +0 -113
- package/es/pages/appointment-demo/popup/placement.js +0 -44
- package/es/pages/group-management/components/checkbox/index.js +0 -28
- package/es/pages/group-management/components/input-form/index.js +0 -174
- package/es/pages/group-management/components/radio/index.js +0 -21
- package/es/pages/group-management/components/table/index.js +0 -174
- package/es/pages/group-management/groupInterface.js +0 -293
- package/es/pages/group-management/index.js +0 -13
- package/es/pages/group-management/page-view/empty.js +0 -111
- package/es/pages/group-management/page-view/importGroupStaff/index.js +0 -208
- package/es/pages/group-management/page-view/index.js +0 -412
- package/es/pages/group-management/table/index.js +0 -104
- package/es/pages/group-management/tree/add-group-dialog/index.js +0 -153
- package/es/pages/group-management/tree/delete-group-dialog/index.js +0 -82
- package/es/pages/group-management/tree/edit-group-dialog/index.js +0 -155
- package/es/pages/group-management/tree/group-form/index.js +0 -207
- package/es/pages/group-management/tree/index.js +0 -168
- package/es/pages/group-management/tree/operation-panel.js +0 -41
- package/es/pages/group-management/tree/trigger-render.js +0 -99
- package/es/pages/like-ranking/mock.js +0 -366
- package/es/pages/okr-map/export-modules/index.js +0 -1
- package/es/pages/okr-map/export-modules/okr-map/header/index.js +0 -182
- package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +0 -47
- package/es/pages/okr-map/export-modules/okr-map/okr-map.js +0 -497
- package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -69
- package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +0 -168
- package/es/pages/okr-map/hooks/useStorage.js +0 -96
- package/es/pages/okr-map/index.js +0 -18
- package/es/pages/okr-map/level2-search/depart.js +0 -53
- package/es/pages/okr-map/level2-search/group.js +0 -69
- package/es/pages/okr-map/level2-search/index.js +0 -51
- package/es/pages/okr-map/level2-search/level2-input.js +0 -46
- package/es/pages/okr-map/level2-search/user.js +0 -54
- package/es/pages/okr-map/no-okr/index.js +0 -24
- package/es/pages/okr-map/number-select/index.js +0 -81
- package/es/pages/okr-map/open-data/index.js +0 -115
- package/es/pages/okr-map/precls.js +0 -8
- package/es/pages/okr-map/request-apis.js +0 -76
- package/es/pages/okr-map/share-dialog/index.js +0 -122
- package/es/pages/okr-map/unsupport-ie/index.js +0 -83
- package/es/pages/okr-map/utils.js +0 -51
- package/es/utils/auth.js +0 -294
- package/es/utils/bs-global.js +0 -114
- package/es/utils/local-storage.js +0 -42
- package/es/utils/mblog.js +0 -33
- package/es/utils/mock-bsglobal.js +0 -1837
- package/es/utils/open-data.js +0 -341
- package/es/utils/request-v1.js +0 -115
- package/es/utils/request.js +0 -183
- package/es/utils/tools.js +0 -286
- package/yarn-error.log +0 -21252
|
@@ -5,15 +5,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
15
15
|
|
|
16
|
-
require("
|
|
16
|
+
var _form = _interopRequireDefault(require("../form"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
@@ -33,34 +35,59 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
35
|
|
|
34
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
37
|
|
|
36
|
-
var preCls =
|
|
38
|
+
var preCls = 'tita-survey-model';
|
|
39
|
+
var Rect = _button["default"].Rect;
|
|
40
|
+
var Input = _form["default"].Fields.Input;
|
|
37
41
|
|
|
38
|
-
function
|
|
39
|
-
var
|
|
42
|
+
var ContactModel = function ContactModel(_ref) {
|
|
43
|
+
var visilble = _ref.visilble,
|
|
44
|
+
setVisible = _ref.setVisible,
|
|
45
|
+
sendData = _ref.sendData;
|
|
40
46
|
|
|
41
|
-
var _useState = (0, _react.useState)(
|
|
47
|
+
var _useState = (0, _react.useState)(''),
|
|
42
48
|
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
contact = _useState2[0],
|
|
50
|
+
setContact = _useState2[1];
|
|
51
|
+
|
|
52
|
+
var onContactChange = function onContactChange(value) {
|
|
53
|
+
setContact(value);
|
|
54
|
+
};
|
|
45
55
|
|
|
56
|
+
var handleClose = function handleClose() {
|
|
57
|
+
sendData(contact);
|
|
58
|
+
|
|
59
|
+
if (setVisible) {
|
|
60
|
+
setVisible(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var handleSubmit = function handleSubmit() {
|
|
65
|
+
sendData(contact);
|
|
66
|
+
setVisible(false);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
if (!visilble) return /*#__PURE__*/_react["default"].createElement("div", null);
|
|
46
70
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
47
|
-
className: (0, _classnames["default"])(
|
|
71
|
+
className: (0, _classnames["default"])('tita-survey-model')
|
|
48
72
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
|
-
className:
|
|
73
|
+
className: "".concat(preCls, "__head")
|
|
50
74
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
|
-
className:
|
|
52
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
className: "".concat(preCls, "__head-title")
|
|
76
|
+
}, "\u5982\u613F\u610F\u63A5\u53D7\u56DE\u8BBF\uFF0C\u8BF7\u7559\u4E0B\u59D3\u540D\u4E0E\u7535\u8BDD"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
|
+
className: "tu-icon-canceled ".concat(preCls, "__head-close "),
|
|
78
|
+
onClick: handleClose
|
|
79
|
+
})), /*#__PURE__*/_react["default"].createElement(Input, {
|
|
80
|
+
placeholder: '参与调研有礼相送哦~',
|
|
81
|
+
value: contact,
|
|
82
|
+
onChange: onContactChange,
|
|
83
|
+
className: "".concat(preCls, "__input")
|
|
84
|
+
}), /*#__PURE__*/_react["default"].createElement(Rect, {
|
|
85
|
+
type: "primary",
|
|
86
|
+
className: "".concat(preCls, "__btn"),
|
|
87
|
+
onClick: handleSubmit
|
|
88
|
+
}, "\u63D0\u4EA4"));
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
ContactModel.defaultProps = {};
|
|
92
|
+
var _default = ContactModel;
|
|
93
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
.tita-survey-model {
|
|
2
|
+
width: 436px;
|
|
3
|
+
background: #ffffff;
|
|
4
|
+
box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.2);
|
|
5
|
+
border-radius: 24px;
|
|
6
|
+
border: 1px solid #f0f2f5;
|
|
7
|
+
padding: 24px;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
position: fixed;
|
|
10
|
+
right: 20px;
|
|
11
|
+
bottom: 20px;
|
|
12
|
+
z-index: 4000;
|
|
13
|
+
animation: showModel 0.5s;
|
|
14
|
+
transition: height linear 0.5s;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tita-survey-model__head {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
align-items: center;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tita-survey-model__head-title {
|
|
25
|
+
font-size: 18px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
color: #141c28;
|
|
28
|
+
line-height: 22px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tita-survey-model__head-close {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
color: #141c28;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
font-size: 20px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
width: 24px;
|
|
39
|
+
height: 24px;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tita-survey-model__head-close:hover {
|
|
44
|
+
background: #f0f4fa;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tita-survey-model__text {
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tita-survey-model__score {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
margin-top: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.tita-survey-model__score-item {
|
|
59
|
+
width: 28px;
|
|
60
|
+
height: 28px;
|
|
61
|
+
background: #ffffff;
|
|
62
|
+
border-radius: 8px;
|
|
63
|
+
border: 1px solid #dfe3ea;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tita-survey-model__score-item:hover {
|
|
71
|
+
border: 1px solid #2879ff;
|
|
72
|
+
color: #2879ff;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tita-survey-model__score-item--active {
|
|
76
|
+
border: 1px solid #2879ff;
|
|
77
|
+
background: rgba(40, 121, 255, 0.1);
|
|
78
|
+
color: #2879ff;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.tita-survey-model__keywords {
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: space-between;
|
|
84
|
+
align-items: center;
|
|
85
|
+
margin-top: 12px;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
font-weight: normal;
|
|
88
|
+
color: #6f7886;
|
|
89
|
+
line-height: 18px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tita-survey-model__tags {
|
|
93
|
+
margin: 14px -10px 8px 0;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
flex-wrap: wrap;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.tita-survey-model__tags-item {
|
|
100
|
+
height: 26px;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
background: #ffffff;
|
|
106
|
+
margin: 0 8px 8px 0;
|
|
107
|
+
padding: 0 12px;
|
|
108
|
+
border-radius: 8px;
|
|
109
|
+
border: 1px solid #dfe3ea;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tita-survey-model__tags-item:hover {
|
|
114
|
+
color: #2879ff;
|
|
115
|
+
border: 1px solid #2879ff;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.tita-survey-model__tags-item--active {
|
|
119
|
+
background: rgba(40, 121, 255, 0.1);
|
|
120
|
+
color: #2879ff;
|
|
121
|
+
border: 1px solid #2879ff;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.tita-survey-model__btn {
|
|
125
|
+
width: 36px;
|
|
126
|
+
margin: 16px auto 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.tita-survey-model__input {
|
|
130
|
+
margin-top: 20px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes showModel {
|
|
134
|
+
0% {
|
|
135
|
+
transform: translateY(100%);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
100% {
|
|
139
|
+
transform: translateY(0);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
15
|
+
|
|
16
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
17
|
+
|
|
18
|
+
var _titaUi = require("tita-ui");
|
|
19
|
+
|
|
20
|
+
var _auth = require("../../utils/auth");
|
|
21
|
+
|
|
22
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
23
|
+
|
|
24
|
+
var _contact = _interopRequireDefault(require("./contact"));
|
|
25
|
+
|
|
26
|
+
var _requestApi = require("./request-api");
|
|
27
|
+
|
|
28
|
+
var _tools = require("../../utils/tools");
|
|
29
|
+
|
|
30
|
+
require("./index.css");
|
|
31
|
+
|
|
32
|
+
var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten;
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
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."); }
|
|
45
|
+
|
|
46
|
+
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); }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
var preCls = 'tita-survey-model';
|
|
55
|
+
var Rect = _button["default"].Rect;
|
|
56
|
+
var loginUserInfo = window.BSGlobal.loginUserInfo;
|
|
57
|
+
var Role = new _auth.MyRole();
|
|
58
|
+
var Version = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.version) || ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) === null || _window$BSGlobal2$ten === void 0 ? void 0 : _window$BSGlobal2$ten.Version) || 1;
|
|
59
|
+
|
|
60
|
+
var SurveyModel = function SurveyModel(_ref) {
|
|
61
|
+
var activityName = _ref.activityName,
|
|
62
|
+
title = _ref.title,
|
|
63
|
+
startTime = _ref.startTime,
|
|
64
|
+
endTime = _ref.endTime,
|
|
65
|
+
scores = _ref.scores,
|
|
66
|
+
scoringKeywords = _ref.scoringKeywords,
|
|
67
|
+
reasonTags = _ref.reasonTags,
|
|
68
|
+
advisePlaceholder = _ref.advisePlaceholder;
|
|
69
|
+
|
|
70
|
+
var _useState = (0, _react.useState)(false),
|
|
71
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
72
|
+
dialogVisible = _useState2[0],
|
|
73
|
+
setDialogVisible = _useState2[1];
|
|
74
|
+
|
|
75
|
+
var _useState3 = (0, _react.useState)(''),
|
|
76
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
|
+
score = _useState4[0],
|
|
78
|
+
setScore = _useState4[1];
|
|
79
|
+
|
|
80
|
+
var _useState5 = (0, _react.useState)(''),
|
|
81
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
82
|
+
scoreType = _useState6[0],
|
|
83
|
+
setScoreType = _useState6[1];
|
|
84
|
+
|
|
85
|
+
var _useState7 = (0, _react.useState)(''),
|
|
86
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
87
|
+
reason = _useState8[0],
|
|
88
|
+
setReason = _useState8[1];
|
|
89
|
+
|
|
90
|
+
var _useState9 = (0, _react.useState)(''),
|
|
91
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
92
|
+
advice = _useState10[0],
|
|
93
|
+
setAdvice = _useState10[1];
|
|
94
|
+
|
|
95
|
+
var _useState11 = (0, _react.useState)(false),
|
|
96
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
97
|
+
contact = _useState12[0],
|
|
98
|
+
setContact = _useState12[1];
|
|
99
|
+
|
|
100
|
+
var handleCloseSurvey = function handleCloseSurvey() {
|
|
101
|
+
setDialogVisible(false);
|
|
102
|
+
localStorage.setItem("survey_model_date__".concat(loginUserInfo.Id), (0, _dayjs["default"])().toString());
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
(0, _react.useEffect)(function () {
|
|
106
|
+
if (Version === 1) return;
|
|
107
|
+
if (!!window.location.hostname.match(/.work/)) return;
|
|
108
|
+
var newDate = (0, _dayjs["default"])();
|
|
109
|
+
var oldDate = localStorage.getItem("survey_model_date__".concat(loginUserInfo.Id));
|
|
110
|
+
|
|
111
|
+
if (endTime) {
|
|
112
|
+
if ((0, _dayjs["default"])(endTime).valueOf() < (0, _dayjs["default"])().valueOf()) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (oldDate) {
|
|
118
|
+
var oldDay = (0, _dayjs["default"])(oldDate);
|
|
119
|
+
|
|
120
|
+
if (newDate.diff(oldDay, 'day') < 7) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
(0, _requestApi.getData)(activityName).then(function (res) {
|
|
126
|
+
if (res.code === 200) {
|
|
127
|
+
var _res$data, _res$data$list;
|
|
128
|
+
|
|
129
|
+
if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data$list = _res$data.list) !== null && _res$data$list !== void 0 && _res$data$list.length)) {
|
|
130
|
+
setTimeout(function () {
|
|
131
|
+
setDialogVisible(true);
|
|
132
|
+
}, 15000);
|
|
133
|
+
} else {
|
|
134
|
+
setDialogVisible(false);
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
setDialogVisible(false);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}, []);
|
|
141
|
+
|
|
142
|
+
var handleScore = function handleScore(score) {
|
|
143
|
+
setScore(score);
|
|
144
|
+
|
|
145
|
+
if (score < 7) {
|
|
146
|
+
setScoreType('bad');
|
|
147
|
+
} else if (score < 9) {
|
|
148
|
+
setScoreType('normal');
|
|
149
|
+
} else {
|
|
150
|
+
setScoreType('good');
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
var handleReason = function handleReason(reason) {
|
|
155
|
+
setReason(reason);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
var onAdviceChange = function onAdviceChange(value) {
|
|
159
|
+
setAdvice(value);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
var handleSubmit = function handleSubmit(contact) {
|
|
163
|
+
var tenantInfo = window.BSGlobal.tenantInfo;
|
|
164
|
+
var npsStartTime = (0, _dayjs["default"])(startTime).unix();
|
|
165
|
+
var npsEndTime = (0, _dayjs["default"])(endTime).unix();
|
|
166
|
+
var result = {
|
|
167
|
+
fields: {
|
|
168
|
+
nps_activity_name: activityName,
|
|
169
|
+
nps_activity_title: title,
|
|
170
|
+
nps_start_time: npsStartTime,
|
|
171
|
+
nps_end_time: npsEndTime,
|
|
172
|
+
nps_score: score,
|
|
173
|
+
nps_advice: (0, _tools.htmlEncodeByRegExp)(advice),
|
|
174
|
+
nps_score_reason: reason,
|
|
175
|
+
user_id: loginUserInfo.Id,
|
|
176
|
+
user_name: loginUserInfo.Name,
|
|
177
|
+
user_contact: (0, _tools.htmlEncodeByRegExp)(contact),
|
|
178
|
+
user_role_name: Role.getRole(),
|
|
179
|
+
tenant_id: tenantInfo.Id,
|
|
180
|
+
tenant_name: tenantInfo.Name,
|
|
181
|
+
tenant_source_name: tenantInfo.Source.toString(),
|
|
182
|
+
tenant_version_name: _bsGlobal.VERSION_MAP[Version]
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
(0, _requestApi.sendData)(result, 'nps_survey').then(function (res) {
|
|
186
|
+
console.log('提交成功');
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
var handleToNext = function handleToNext() {
|
|
191
|
+
setDialogVisible(false);
|
|
192
|
+
setContact(true);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
if (contact) return /*#__PURE__*/_react["default"].createElement(_contact["default"], {
|
|
196
|
+
sendData: handleSubmit,
|
|
197
|
+
visilble: contact,
|
|
198
|
+
setVisible: setContact
|
|
199
|
+
});
|
|
200
|
+
if (!dialogVisible) return /*#__PURE__*/_react["default"].createElement("div", null);
|
|
201
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
202
|
+
className: (0, _classnames["default"])('tita-survey-model')
|
|
203
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
204
|
+
className: "".concat(preCls, "__head")
|
|
205
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
|
+
className: "".concat(preCls, "__head-title")
|
|
207
|
+
}, title), /*#__PURE__*/_react["default"].createElement("span", {
|
|
208
|
+
className: "tu-icon-canceled ".concat(preCls, "__head-close "),
|
|
209
|
+
onClick: handleCloseSurvey
|
|
210
|
+
})), (scores === null || scores === void 0 ? void 0 : scores.length) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
211
|
+
className: "".concat(preCls, "__score")
|
|
212
|
+
}, scores.map(function (item) {
|
|
213
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
|
+
className: (0, _classnames["default"])("".concat(preCls, "__score-item"), _defineProperty({}, "".concat(preCls, "__score-item--active"), item === score)),
|
|
215
|
+
key: item,
|
|
216
|
+
onClick: function onClick() {
|
|
217
|
+
return handleScore(item);
|
|
218
|
+
}
|
|
219
|
+
}, item);
|
|
220
|
+
})), (scoringKeywords === null || scoringKeywords === void 0 ? void 0 : scoringKeywords.length) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "".concat(preCls, "__keywords")
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
223
|
+
className: "".concat(preCls, "__keywords-left")
|
|
224
|
+
}, scoringKeywords[0]), /*#__PURE__*/_react["default"].createElement("div", {
|
|
225
|
+
className: "".concat(preCls, "__keywords-right")
|
|
226
|
+
}, scoringKeywords[1]))), scoreType && /*#__PURE__*/_react["default"].createElement("div", {
|
|
227
|
+
className: "".concat(preCls, "__content")
|
|
228
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
|
+
className: "".concat(preCls, "__tags")
|
|
230
|
+
}, reasonTags[scoreType].map(function (item, key) {
|
|
231
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
|
+
className: (0, _classnames["default"])("".concat(preCls, "__tags-item"), _defineProperty({}, "".concat(preCls, "__tags-item--active"), item === reason)),
|
|
233
|
+
key: key,
|
|
234
|
+
onClick: function onClick() {
|
|
235
|
+
return handleReason(item);
|
|
236
|
+
}
|
|
237
|
+
}, item);
|
|
238
|
+
})), /*#__PURE__*/_react["default"].createElement(_titaUi.Textarea, {
|
|
239
|
+
placeholder: advisePlaceholder,
|
|
240
|
+
value: advice,
|
|
241
|
+
onChange: function onChange(e) {
|
|
242
|
+
return onAdviceChange(e.target.value);
|
|
243
|
+
},
|
|
244
|
+
maxLine: 4,
|
|
245
|
+
maxLength: 500,
|
|
246
|
+
wrapperClass: "".concat(preCls, "__text")
|
|
247
|
+
}), /*#__PURE__*/_react["default"].createElement(Rect, {
|
|
248
|
+
type: "primary",
|
|
249
|
+
className: "".concat(preCls, "__btn"),
|
|
250
|
+
onClick: handleToNext
|
|
251
|
+
}, "\u63D0\u4EA4")));
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
SurveyModel.defaultProps = {
|
|
255
|
+
scoringKeywords: ['不愿意', '非常愿意'],
|
|
256
|
+
scores: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
257
|
+
reasonTags: {
|
|
258
|
+
bad: ['视角效果不美观', '没有 Excel 便捷', '感受不到管理效率提升', '速度太慢', '操作复杂', '系统不稳定', '功能不满足'],
|
|
259
|
+
normal: ['管理效率有提升', '能解决大部分管理问题', '操作再简单一些', '系统不是很稳定'],
|
|
260
|
+
good: ['OKR 与绩效天然打通', '能追踪目标落地过程', '团队管理高效', '视角效果很好']
|
|
261
|
+
},
|
|
262
|
+
advisePlaceholder: '你觉得哪些地方可以做到更好?'
|
|
263
|
+
};
|
|
264
|
+
var _default = SurveyModel;
|
|
265
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.requestDomain = exports.getJwtToken = exports["default"] = void 0;
|
|
7
|
+
exports.setToken = setToken;
|
|
8
|
+
|
|
9
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
|
|
13
|
+
var tenantId = window.BSGlobal.tenantInfo.Id;
|
|
14
|
+
var userId = window.BSGlobal.loginUserInfo.Id;
|
|
15
|
+
|
|
16
|
+
var requestDomain = function requestDomain() {
|
|
17
|
+
if (!window.location.hostname.match(/.work/)) return '';
|
|
18
|
+
return "".concat(window.location.protocol, "//www.tita.gift");
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.requestDomain = requestDomain;
|
|
22
|
+
|
|
23
|
+
function getToken() {
|
|
24
|
+
return sessionStorage.getItem('DEMOFREE_TOKEN') || '';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function setToken(token) {
|
|
28
|
+
sessionStorage.setItem('DEMOFREE_TOKEN', token);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var getJwtToken = function getJwtToken() {
|
|
32
|
+
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/const/skynetToken")).then(function (res) {
|
|
33
|
+
var _res$data;
|
|
34
|
+
|
|
35
|
+
if ((_res$data = res.data) !== null && _res$data !== void 0 && _res$data.Data) {
|
|
36
|
+
setToken(JSON.parse(res.data.Data.obj).token);
|
|
37
|
+
return JSON.parse(res.data.Data.obj);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return false;
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.getJwtToken = getJwtToken;
|
|
45
|
+
|
|
46
|
+
var instance = _axios["default"].create({
|
|
47
|
+
timeout: 10 * 1000
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
var beforeRequest = function beforeRequest(config) {
|
|
51
|
+
config.headers['authorization'] = "Bearer ".concat(getToken());
|
|
52
|
+
return config;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var beforeResponse = function beforeResponse(res) {
|
|
56
|
+
var config = res.config;
|
|
57
|
+
config.retry = 3;
|
|
58
|
+
config.__retryCount = config.__retryCount || 0;
|
|
59
|
+
|
|
60
|
+
if (res.data.code == 401) {
|
|
61
|
+
// 401错误表示未登录授权或者token失效
|
|
62
|
+
if (config.__retryCount <= config.retry) {
|
|
63
|
+
config.__retryCount += 1;
|
|
64
|
+
return getJwtToken().then(function () {
|
|
65
|
+
return instance.request(res.config);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return Promise.reject(res);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return res.data;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
var requestError = function requestError(error) {
|
|
76
|
+
return Promise.reject(error);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
instance.interceptors.request.use(beforeRequest, requestError);
|
|
80
|
+
instance.interceptors.response.use(beforeResponse, function (error) {
|
|
81
|
+
console.log({
|
|
82
|
+
error: error
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
var _default = instance;
|
|
86
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.sendData = exports.getData = void 0;
|
|
7
|
+
|
|
8
|
+
var _instance = _interopRequireDefault(require("./instance"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
+
|
|
14
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
|
+
|
|
16
|
+
// const isDev = !!window.location.hostname.match(/work/)
|
|
17
|
+
var sendData = function sendData(fields, objectName) {
|
|
18
|
+
return _instance["default"].post('https://skynet-apis.tita.cloud/api/v1/nps/insert', JSON.stringify(fields), {
|
|
19
|
+
headers: Object.assign({
|
|
20
|
+
'Content-Type': 'application/json;charset=utf-8;',
|
|
21
|
+
'x-meta': objectName
|
|
22
|
+
})
|
|
23
|
+
}).then(function (res) {
|
|
24
|
+
return res;
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.sendData = sendData;
|
|
29
|
+
|
|
30
|
+
var getData = /*#__PURE__*/function () {
|
|
31
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(objectName) {
|
|
32
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
33
|
+
while (1) {
|
|
34
|
+
switch (_context.prev = _context.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
return _context.abrupt("return", _instance["default"].get('https://skynet-apis.tita.cloud/api/v1/nps/list?name=' + objectName).then(function (res) {
|
|
37
|
+
return res;
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
case 1:
|
|
41
|
+
case "end":
|
|
42
|
+
return _context.stop();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, _callee);
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
return function getData(_x) {
|
|
49
|
+
return _ref.apply(this, arguments);
|
|
50
|
+
};
|
|
51
|
+
}(); // export const updateData = () =>{
|
|
52
|
+
// return axios
|
|
53
|
+
// .post(
|
|
54
|
+
// "https://tracker.tita.com/api/v1/metas/update",
|
|
55
|
+
// {
|
|
56
|
+
// "id": recordId,
|
|
57
|
+
// "fields": [
|
|
58
|
+
// { "name": "issue_status", "type": "string", "value": "解决中" },
|
|
59
|
+
// { "name": "issue_owner", "type": "string", "value": newPrinciple },
|
|
60
|
+
// { "name": "issue_bug_start_unix", "type": "long", "value": Math.round(new Date().getTime() / 1000) },
|
|
61
|
+
// ],
|
|
62
|
+
// "objectName": "sentry_issue",
|
|
63
|
+
// },
|
|
64
|
+
// {
|
|
65
|
+
// "headers": Object.assign(
|
|
66
|
+
// {
|
|
67
|
+
// "Content-Type": "application/json",
|
|
68
|
+
// "authorization":localStorage.getItem('BUGFREE_JWT_TOKEN'),
|
|
69
|
+
// },
|
|
70
|
+
// authHeaders,
|
|
71
|
+
// ),
|
|
72
|
+
// },
|
|
73
|
+
// )
|
|
74
|
+
// .then(res => {
|
|
75
|
+
// return res;
|
|
76
|
+
// });
|
|
77
|
+
// }
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
exports.getData = getData;
|