@titaui/pc 1.11.27-beta.8 → 1.11.29
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/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- 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/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- 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/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- 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 +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- 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/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- 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/index.js +10 -14
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- 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/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- 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/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- 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/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -27,8 +27,6 @@ var _schedule = _interopRequireDefault(require("./schedule"));
|
|
|
27
27
|
|
|
28
28
|
var _requestApis = require("./request-apis");
|
|
29
29
|
|
|
30
|
-
var _helper = require("./helper");
|
|
31
|
-
|
|
32
30
|
var _okrReview = _interopRequireDefault(require("../okr-review"));
|
|
33
31
|
|
|
34
32
|
var _reportList = _interopRequireDefault(require("../eReport/eReportLists/reportList"));
|
|
@@ -79,7 +77,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
79
77
|
|
|
80
78
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
81
79
|
|
|
82
|
-
var preCls =
|
|
80
|
+
var preCls = 'okr-detail'; // E周报和复盘开关
|
|
83
81
|
|
|
84
82
|
var EWorkReport = BSGlobal.OkrAdvancedSetting ? BSGlobal.OkrAdvancedSetting.KRSetting.EWorkReport : false;
|
|
85
83
|
var OkrAnalyse = BSGlobal.OkrAdvancedSetting ? BSGlobal.OkrAdvancedSetting.KRSetting.OkrAnalyse : false;
|
|
@@ -98,20 +96,20 @@ function OkrDetail(props) {
|
|
|
98
96
|
okrInfo = _useState4[0],
|
|
99
97
|
setOkrInfo = _useState4[1];
|
|
100
98
|
|
|
101
|
-
var _useState5 = (0, _react.useState)(props.activeTabKey ||
|
|
99
|
+
var _useState5 = (0, _react.useState)(props.activeTabKey || 'okr'),
|
|
102
100
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
103
101
|
activeTabKey = _useState6[0],
|
|
104
102
|
setActiveTabKey = _useState6[1];
|
|
105
103
|
|
|
106
104
|
var drawerManagerContext = (0, _react.useContext)(_context2["default"]);
|
|
107
105
|
|
|
108
|
-
var _useState7 = (0, _react.useState)(
|
|
106
|
+
var _useState7 = (0, _react.useState)(''),
|
|
109
107
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
110
108
|
errorMsg = _useState8[0],
|
|
111
109
|
setErrorMsg = _useState8[1];
|
|
112
110
|
|
|
113
111
|
var changeTabActive = function changeTabActive(key) {
|
|
114
|
-
if (!
|
|
112
|
+
if (!'okr,exec,progress,cooperation,eReport,review,baseInfo'.match(key)) {
|
|
115
113
|
return console.log("\u672A\u627E\u5230\u5BF9\u5E94\u7684tab\u9875\u7B7E: ".concat(key));
|
|
116
114
|
}
|
|
117
115
|
|
|
@@ -120,7 +118,7 @@ function OkrDetail(props) {
|
|
|
120
118
|
});
|
|
121
119
|
setActiveTabKey(key);
|
|
122
120
|
|
|
123
|
-
if (key ==
|
|
121
|
+
if (key == 'cooperation') {
|
|
124
122
|
bottomReply.current.show(undefined, false);
|
|
125
123
|
} else {
|
|
126
124
|
bottomReply.current.hide();
|
|
@@ -175,14 +173,7 @@ function OkrDetail(props) {
|
|
|
175
173
|
var _useState23 = (0, _react.useState)(),
|
|
176
174
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
177
175
|
generalRoleType = _useState24[0],
|
|
178
|
-
setGeneralRoleType = _useState24[1];
|
|
179
|
-
|
|
180
|
-
var _useState25 = (0, _react.useState)({
|
|
181
|
-
isOpen: false
|
|
182
|
-
}),
|
|
183
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
184
|
-
approvalSetting = _useState26[0],
|
|
185
|
-
setApprovalSetting = _useState26[1]; // 计算元素的ref,用于实现 tabs 吸顶,点赞吸底
|
|
176
|
+
setGeneralRoleType = _useState24[1]; // 计算元素的ref,用于实现 tabs 吸顶,点赞吸底
|
|
186
177
|
|
|
187
178
|
|
|
188
179
|
var tabRef = (0, _react.useRef)();
|
|
@@ -193,7 +184,7 @@ function OkrDetail(props) {
|
|
|
193
184
|
var okrListRef = (0, _react.useRef)();
|
|
194
185
|
var onAfterReply = (0, _react.useCallback)(function () {
|
|
195
186
|
communicationRef && communicationRef.current && communicationRef.current.refresh();
|
|
196
|
-
setActiveTabKey(
|
|
187
|
+
setActiveTabKey('cooperation');
|
|
197
188
|
}, []);
|
|
198
189
|
|
|
199
190
|
var getData = function getData() {
|
|
@@ -212,18 +203,9 @@ function OkrDetail(props) {
|
|
|
212
203
|
getData();
|
|
213
204
|
};
|
|
214
205
|
|
|
215
|
-
var getApprovalShow = function getApprovalShow() {
|
|
216
|
-
(0, _requestApis.getOkrApprovalSettingInfo)().then(function (resp) {
|
|
217
|
-
if (resp.Code === 1) {
|
|
218
|
-
setApprovalSetting((0, _helper.getApprovalOpenItem)(resp.Data));
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
};
|
|
222
|
-
|
|
223
206
|
(0, _react.useEffect)(function () {
|
|
224
207
|
setLoading(true);
|
|
225
208
|
getData();
|
|
226
|
-
getApprovalShow();
|
|
227
209
|
}, []);
|
|
228
210
|
(0, _react.useEffect)(function () {
|
|
229
211
|
if (!okrInfo || !okrInfo.workId) return;
|
|
@@ -268,19 +250,19 @@ function OkrDetail(props) {
|
|
|
268
250
|
|
|
269
251
|
var onScrollHandler = function onScrollHandler() {
|
|
270
252
|
// tabs 粘顶
|
|
271
|
-
var tabsNav = tabsContnetRef.current.querySelector(
|
|
272
|
-
if (bodyRef.current.scrollTop > 98) tabsNav.classList.add(
|
|
253
|
+
var tabsNav = tabsContnetRef.current.querySelector('.rc-tabs-nav');
|
|
254
|
+
if (bodyRef.current.scrollTop > 98) tabsNav.classList.add('okr-tabs-fixed-top');else tabsNav.classList.remove('okr-tabs-fixed-top');
|
|
273
255
|
};
|
|
274
256
|
|
|
275
257
|
var handleContainerMouseDown = (0, _react.useCallback)(function () {
|
|
276
|
-
if (activeTabKey ==
|
|
258
|
+
if (activeTabKey == 'cooperation') return;
|
|
277
259
|
bottomReply && bottomReply.current && bottomReply.current.hide();
|
|
278
260
|
}, [activeTabKey]);
|
|
279
261
|
|
|
280
262
|
var refreshKrs = function refreshKrs() {
|
|
281
|
-
var active = activeTabKey ||
|
|
263
|
+
var active = activeTabKey || 'okr';
|
|
282
264
|
|
|
283
|
-
if (active ==
|
|
265
|
+
if (active == 'okr') {
|
|
284
266
|
okrListRef.current && okrListRef.current.updateKrs();
|
|
285
267
|
}
|
|
286
268
|
};
|
|
@@ -294,8 +276,7 @@ function OkrDetail(props) {
|
|
|
294
276
|
changeTabActive: changeTabActive,
|
|
295
277
|
refreshAll: refreshAll,
|
|
296
278
|
setOkrInfo: setOkrInfo,
|
|
297
|
-
refreshKrs: refreshKrs
|
|
298
|
-
approvalSetting: approvalSetting
|
|
279
|
+
refreshKrs: refreshKrs
|
|
299
280
|
})
|
|
300
281
|
}, /*#__PURE__*/_react["default"].createElement(_context.GeneralDataContext.Provider, {
|
|
301
282
|
value: {
|
|
@@ -338,7 +319,7 @@ function OkrDetail(props) {
|
|
|
338
319
|
activeKey: activeTabKey,
|
|
339
320
|
onChange: changeTabActive,
|
|
340
321
|
tabBarStyle: {
|
|
341
|
-
boxShadow:
|
|
322
|
+
boxShadow: '0px 0px 24px 0px rgba(127, 145, 180, 0.2)'
|
|
342
323
|
}
|
|
343
324
|
}, /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
344
325
|
tab: "OKRs",
|
|
@@ -352,7 +333,7 @@ function OkrDetail(props) {
|
|
|
352
333
|
okrInfo: okrInfo,
|
|
353
334
|
ref: okrListRef
|
|
354
335
|
}))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
355
|
-
tab: (0, _getLocale.getLocale)(
|
|
336
|
+
tab: (0, _getLocale.getLocale)('OKR_MyO_Exec_Tab_Execution'),
|
|
356
337
|
key: "exec"
|
|
357
338
|
}, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
|
|
358
339
|
style: {
|
|
@@ -362,7 +343,7 @@ function OkrDetail(props) {
|
|
|
362
343
|
okrId: okrId,
|
|
363
344
|
okrInfo: okrInfo
|
|
364
345
|
}))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
365
|
-
tab: (0, _getLocale.getLocale)(
|
|
346
|
+
tab: (0, _getLocale.getLocale)('Feed_Tab_Title_Progress'),
|
|
366
347
|
key: "progress"
|
|
367
348
|
}, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
|
|
368
349
|
style: {
|
|
@@ -371,7 +352,7 @@ function OkrDetail(props) {
|
|
|
371
352
|
}, /*#__PURE__*/_react["default"].createElement(_schedule["default"], {
|
|
372
353
|
okrInfo: okrInfo
|
|
373
354
|
}))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
374
|
-
tab: (0, _getLocale.getLocale)(
|
|
355
|
+
tab: (0, _getLocale.getLocale)('OKR_MyO_KRP_nteract'),
|
|
375
356
|
key: "cooperation"
|
|
376
357
|
}, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
|
|
377
358
|
style: {
|
|
@@ -388,7 +369,7 @@ function OkrDetail(props) {
|
|
|
388
369
|
},
|
|
389
370
|
communicationRef: communicationRef
|
|
390
371
|
}))), EWorkReport && source != 861 && /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
391
|
-
tab: (0, _getLocale.getLocale)(
|
|
372
|
+
tab: (0, _getLocale.getLocale)('OKR_MyO_Ew_Tab_Eweekly'),
|
|
392
373
|
key: "eReport"
|
|
393
374
|
}, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
|
|
394
375
|
style: {
|
|
@@ -400,7 +381,7 @@ function OkrDetail(props) {
|
|
|
400
381
|
okrName: okrInfo.workName,
|
|
401
382
|
isVisible: okrInfo.visibility
|
|
402
383
|
}))), OkrAnalyse && /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
403
|
-
tab: (0, _getLocale.getLocale)(
|
|
384
|
+
tab: (0, _getLocale.getLocale)('OKR_MyO_KRP_Review'),
|
|
404
385
|
key: "review"
|
|
405
386
|
}, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
|
|
406
387
|
style: {
|
|
@@ -421,7 +402,7 @@ function OkrDetail(props) {
|
|
|
421
402
|
endDate: okrInfo.endDate
|
|
422
403
|
}
|
|
423
404
|
}))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
424
|
-
tab: (0, _getLocale.getLocale)(
|
|
405
|
+
tab: (0, _getLocale.getLocale)('Per_Ass_New_title_text_BasicIn'),
|
|
425
406
|
key: "baseInfo"
|
|
426
407
|
}, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
|
|
427
408
|
style: {
|
|
@@ -437,7 +418,7 @@ function OkrDetail(props) {
|
|
|
437
418
|
feedId: okrInfo.feedId,
|
|
438
419
|
ref: bottomReply,
|
|
439
420
|
onAfterSubmit: onAfterReply,
|
|
440
|
-
isFocusReply: props.activeTabKey ===
|
|
421
|
+
isFocusReply: props.activeTabKey === 'cooperation'
|
|
441
422
|
})) : /*#__PURE__*/_react["default"].createElement(_loading["default"], {
|
|
442
423
|
type: "zone"
|
|
443
424
|
}))));
|
|
@@ -43,8 +43,6 @@ var _auth = require("../../../utils/auth");
|
|
|
43
43
|
|
|
44
44
|
var _getLocale = require("../../../utils/getLocale");
|
|
45
45
|
|
|
46
|
-
var _helper = require("../helper");
|
|
47
|
-
|
|
48
46
|
require("./index.css");
|
|
49
47
|
|
|
50
48
|
var _excluded = ["mileStoneId"];
|
|
@@ -98,6 +96,7 @@ var preCls = "okr-detail-okrs-list";
|
|
|
98
96
|
|
|
99
97
|
var treeDataFormate = function treeDataFormate(nodes) {
|
|
100
98
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "kr";
|
|
99
|
+
var canEditOkr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
101
100
|
var formateNodes = [];
|
|
102
101
|
nodes.forEach(function (it, index) {
|
|
103
102
|
var title = "";
|
|
@@ -109,7 +108,8 @@ var treeDataFormate = function treeDataFormate(nodes) {
|
|
|
109
108
|
title: title,
|
|
110
109
|
isLeaf: true,
|
|
111
110
|
nodeType: type,
|
|
112
|
-
data: it
|
|
111
|
+
data: it,
|
|
112
|
+
canEditOkr: canEditOkr
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
return formateNodes;
|
|
@@ -153,8 +153,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
153
153
|
setShowOkrEvalute = _useContext.setShowOkrEvalute;
|
|
154
154
|
|
|
155
155
|
var _useContext2 = (0, _react.useContext)(_context2.CommonContext),
|
|
156
|
-
refreshAll = _useContext2.refreshAll
|
|
157
|
-
approvalSetting = _useContext2.approvalSetting;
|
|
156
|
+
refreshAll = _useContext2.refreshAll;
|
|
158
157
|
|
|
159
158
|
var parentId = generalParent.parentId,
|
|
160
159
|
parentOkr = generalParent.parentOkr,
|
|
@@ -275,9 +274,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
275
274
|
updateKrs();
|
|
276
275
|
}, []);
|
|
277
276
|
(0, _react.useEffect)(function () {
|
|
278
|
-
var strucKrs = treeDataFormate(pureKrs, "kr");
|
|
277
|
+
var strucKrs = treeDataFormate(pureKrs, "kr", canEditOkr);
|
|
279
278
|
setKrs(strucKrs);
|
|
280
|
-
}, [pureKrs]);
|
|
279
|
+
}, [pureKrs, canEditOkr]);
|
|
281
280
|
|
|
282
281
|
var onAddKrHandler = function onAddKrHandler(kr) {
|
|
283
282
|
refreshAll();
|
|
@@ -443,11 +442,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
443
442
|
padding: "0 32px 0 18px"
|
|
444
443
|
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
445
444
|
data: krs,
|
|
446
|
-
|
|
447
|
-
okrInfo: okrInfo,
|
|
448
|
-
draggable: canEditOkr && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) === _helper.EApproveStatus.UnderApproval,
|
|
445
|
+
draggable: canEditOkr,
|
|
449
446
|
onDrop: onOkrItemDropHandler
|
|
450
|
-
}))), (canEditOkr || isInnerUser) &&
|
|
447
|
+
}))), (canEditOkr || isInnerUser) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
451
448
|
ref: wrapperRef,
|
|
452
449
|
className: (0, _classnames["default"])("".concat(preCls, "__addkr"))
|
|
453
450
|
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, createKrShow ? /*#__PURE__*/_react["default"].createElement(_createKrItem["default"], {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = 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.
|
|
6
|
+
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = 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
|
|
|
@@ -110,12 +110,6 @@ var getOkrDetail = function getOkrDetail(_ref5) {
|
|
|
110
110
|
|
|
111
111
|
exports.getOkrDetail = getOkrDetail;
|
|
112
112
|
|
|
113
|
-
var getOkrApprovalSettingInfo = function getOkrApprovalSettingInfo() {
|
|
114
|
-
return (0, _request.rget)("v1")("WorkManageSetting/GetOkrApproval");
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
exports.getOkrApprovalSettingInfo = getOkrApprovalSettingInfo;
|
|
118
|
-
|
|
119
113
|
var updateClassify = function updateClassify(_ref6) {
|
|
120
114
|
var okrId = _ref6.okrId,
|
|
121
115
|
okrClassify = _ref6.okrClassify;
|
|
@@ -413,7 +407,7 @@ var deleteUser = function deleteUser(delUserId, okrId, relation) {
|
|
|
413
407
|
exports.deleteUser = deleteUser;
|
|
414
408
|
|
|
415
409
|
var workDelete = function workDelete(data) {
|
|
416
|
-
return (0, _request.rdelete)("
|
|
410
|
+
return (0, _request.rdelete)("v2")("work/deleteV2?workId=".concat(data.workId), {
|
|
417
411
|
data: data
|
|
418
412
|
});
|
|
419
413
|
};
|
|
@@ -421,7 +415,7 @@ var workDelete = function workDelete(data) {
|
|
|
421
415
|
exports.workDelete = workDelete;
|
|
422
416
|
|
|
423
417
|
var start = function start(okrId) {
|
|
424
|
-
return (0, _request.rpost)("v1")("
|
|
418
|
+
return (0, _request.rpost)("v1")("Work/Start", {
|
|
425
419
|
work_id: okrId
|
|
426
420
|
}, {
|
|
427
421
|
headers: {
|
|
@@ -434,7 +428,7 @@ var start = function start(okrId) {
|
|
|
434
428
|
exports.start = start;
|
|
435
429
|
|
|
436
430
|
var close = function close(okrId) {
|
|
437
|
-
return (0, _request.rpost)("v1")("
|
|
431
|
+
return (0, _request.rpost)("v1")("Work/Close", {
|
|
438
432
|
work_id: okrId
|
|
439
433
|
}, {
|
|
440
434
|
headers: {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
.titaui-okr-flow--node__kr {
|
|
60
60
|
border: 1px solid rgba(90, 216, 166, 0.5);
|
|
61
|
-
background: #
|
|
61
|
+
background: #eefbf6;
|
|
62
62
|
height: 96px;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
flex: 1;
|
|
99
99
|
font-size: 13px;
|
|
100
100
|
font-weight: 400;
|
|
101
|
-
color: #
|
|
101
|
+
color: #3f4755;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.titaui-okr-flow--node-kr-progress {
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
line-height: 24px;
|
|
203
203
|
font-size: 12px;
|
|
204
204
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
205
|
-
color: #
|
|
205
|
+
color: #6f7886;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
.titaui-okr-flow--node-weight:before {
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
align-items: center;
|
|
225
225
|
font-size: 12px;
|
|
226
226
|
line-height: 24px;
|
|
227
|
-
color: #
|
|
227
|
+
color: #6f7886;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.titaui-okr-flow--node-progress .t-c-progress-circle {
|
|
@@ -413,7 +413,7 @@
|
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
.titaui-okr-flow__dark .titaui-okr-flow--node-status__normal {
|
|
416
|
-
color: #
|
|
416
|
+
color: #1fa7ff;
|
|
417
417
|
background: #3b4e6e;
|
|
418
418
|
}
|
|
419
419
|
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
.titaui-okr-flow__dark .titaui-okr-flow--node-kr-status__normal {
|
|
435
|
-
color: #
|
|
435
|
+
color: #1fa7ff;
|
|
436
436
|
background: #3b4e6e;
|
|
437
437
|
}
|
|
438
438
|
|
|
@@ -65,7 +65,7 @@ function WorkNode(_ref) {
|
|
|
65
65
|
darkTheme = _ref.darkTheme;
|
|
66
66
|
var workId = data.workId,
|
|
67
67
|
_data$workName = data.workName,
|
|
68
|
-
workName = _data$workName === void 0 ?
|
|
68
|
+
workName = _data$workName === void 0 ? '' : _data$workName,
|
|
69
69
|
okrType = data.okrType,
|
|
70
70
|
departmentId = data.departmentId,
|
|
71
71
|
departmentName = data.departmentName,
|
|
@@ -101,7 +101,7 @@ function WorkNode(_ref) {
|
|
|
101
101
|
|
|
102
102
|
var getOkrTypeMap = function getOkrTypeMap() {
|
|
103
103
|
return {
|
|
104
|
-
1: (0, _getLocale.getLocale)(
|
|
104
|
+
1: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
|
|
105
105
|
// 2: <OpenDepartmentName id={departmentId} name={departmentName} />,
|
|
106
106
|
2: /*#__PURE__*/_react["default"].createElement("img", {
|
|
107
107
|
src: darkTheme ? whiteImg : departUrl,
|
|
@@ -110,8 +110,8 @@ function WorkNode(_ref) {
|
|
|
110
110
|
},
|
|
111
111
|
width: imgWidth
|
|
112
112
|
}),
|
|
113
|
-
3: (0, _getLocale.getLocale)(
|
|
114
|
-
4: groupName || (0, _getLocale.getLocale)(
|
|
113
|
+
3: (0, _getLocale.getLocale)('OKR_MyO_Pop_Company'),
|
|
114
|
+
4: groupName || (0, _getLocale.getLocale)('OKR_MyO_Text_Team')
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
|
|
@@ -122,7 +122,7 @@ function WorkNode(_ref) {
|
|
|
122
122
|
while (1) {
|
|
123
123
|
switch (_context.prev = _context.next) {
|
|
124
124
|
case 0:
|
|
125
|
-
name = departmentName ||
|
|
125
|
+
name = departmentName || '默认部门';
|
|
126
126
|
|
|
127
127
|
if (!(0, _bsGlobal.isWx)()) {
|
|
128
128
|
_context.next = 5;
|
|
@@ -133,15 +133,15 @@ function WorkNode(_ref) {
|
|
|
133
133
|
return (0, _openDataPainter.getOpenData)({
|
|
134
134
|
id: departmentId,
|
|
135
135
|
name: departmentName,
|
|
136
|
-
type:
|
|
136
|
+
type: 'departmentName'
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
case 4:
|
|
140
140
|
name = _context.sent;
|
|
141
141
|
|
|
142
142
|
case 5:
|
|
143
|
-
getCanvasImg(
|
|
144
|
-
getCanvasImg(
|
|
143
|
+
getCanvasImg('white', name);
|
|
144
|
+
getCanvasImg('dark', name);
|
|
145
145
|
|
|
146
146
|
case 7:
|
|
147
147
|
case "end":
|
|
@@ -157,11 +157,11 @@ function WorkNode(_ref) {
|
|
|
157
157
|
}();
|
|
158
158
|
|
|
159
159
|
var getCanvasImg = function getCanvasImg() {
|
|
160
|
-
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
160
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'white';
|
|
161
161
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
162
|
-
var canvas = document.createElement(
|
|
163
|
-
var ctx = canvas.getContext(
|
|
164
|
-
var font =
|
|
162
|
+
var canvas = document.createElement('canvas');
|
|
163
|
+
var ctx = canvas.getContext('2d');
|
|
164
|
+
var font = 'normal 12px/24px -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei';
|
|
165
165
|
ctx.font = font; // const fitStr = fittingString(ctx, name, 92);
|
|
166
166
|
|
|
167
167
|
var _ctx$measureText = ctx.measureText(name),
|
|
@@ -170,11 +170,11 @@ function WorkNode(_ref) {
|
|
|
170
170
|
var actualWidth = Math.min(width, 92);
|
|
171
171
|
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 24);
|
|
172
172
|
setImgWidth(actualWidth);
|
|
173
|
-
ctx.textBaseline =
|
|
173
|
+
ctx.textBaseline = 'middle';
|
|
174
174
|
ctx.font = font;
|
|
175
|
-
ctx.fillStyle = theme ==
|
|
175
|
+
ctx.fillStyle = theme == 'white' ? '#FFFFFF' : '#6f7886';
|
|
176
176
|
ctx.fillText(name, 0, 12);
|
|
177
|
-
theme ==
|
|
177
|
+
theme == 'white' ? setWhiteImg(canvas.toDataURL()) : setDepartUrl(canvas.toDataURL());
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
(0, _react.useEffect)(function () {
|
|
@@ -184,13 +184,13 @@ function WorkNode(_ref) {
|
|
|
184
184
|
}, []);
|
|
185
185
|
|
|
186
186
|
var openODetail = function openODetail(id) {
|
|
187
|
-
_drawerManager["default"].open(
|
|
187
|
+
_drawerManager["default"].open('okrDetail', {
|
|
188
188
|
okrId: workId
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
var openKr = function openKr(id) {
|
|
193
|
-
_drawerManager["default"].open(
|
|
193
|
+
_drawerManager["default"].open('krDetail', {
|
|
194
194
|
krId: id
|
|
195
195
|
});
|
|
196
196
|
};
|
|
@@ -206,7 +206,7 @@ function WorkNode(_ref) {
|
|
|
206
206
|
|
|
207
207
|
switch (cycleTypeCopy) {
|
|
208
208
|
case 0:
|
|
209
|
-
return (0, _getLocale.getLocale)(
|
|
209
|
+
return (0, _getLocale.getLocale)('Mod_Customization');
|
|
210
210
|
|
|
211
211
|
case 1:
|
|
212
212
|
return "".concat(annualNum, "\u5E74");
|
|
@@ -221,15 +221,15 @@ function WorkNode(_ref) {
|
|
|
221
221
|
return "".concat(yqmnum, "-").concat((yqmnum + 1) % 12 || 12, "\u6708");
|
|
222
222
|
|
|
223
223
|
case 5:
|
|
224
|
-
return "".concat(yqmnum == 1 ?
|
|
224
|
+
return "".concat(yqmnum == 1 ? '上' : '下', "\u534A\u5E74");
|
|
225
225
|
|
|
226
226
|
case -1:
|
|
227
|
-
return KrIndex ? "KR".concat(KrIndex) :
|
|
227
|
+
return KrIndex ? "KR".concat(KrIndex) : 'KR';
|
|
228
228
|
}
|
|
229
229
|
}; // 1:正常 2:有风险 3:过期 4:完成 5:过期完成 ,
|
|
230
230
|
|
|
231
231
|
|
|
232
|
-
var riskLevelSuffix = [
|
|
232
|
+
var riskLevelSuffix = ['normal', 'normal', 'risk', 'expired', 'complete', 'complete_over', 'normal'];
|
|
233
233
|
if (!MapOkrVisible) return /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
234
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), "".concat(_precls["default"], "--node__private"))
|
|
235
235
|
});
|
|
@@ -87,7 +87,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
87
87
|
mapInstance = _useState2[0],
|
|
88
88
|
setMapInstance = _useState2[1];
|
|
89
89
|
|
|
90
|
-
var _useState3 = (0, _react.useState)(
|
|
90
|
+
var _useState3 = (0, _react.useState)('none'),
|
|
91
91
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
92
92
|
bgColor = _useState4[0],
|
|
93
93
|
setBgColor = _useState4[1];
|
|
@@ -123,12 +123,12 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
123
123
|
while (1) {
|
|
124
124
|
switch (_context.prev = _context.next) {
|
|
125
125
|
case 0:
|
|
126
|
-
okrMapRef = document.querySelector(
|
|
126
|
+
okrMapRef = document.querySelector('.titaui-okr-flow__export') || document.createElement('div');
|
|
127
127
|
width = okrMapRef.clientWidth; // 获取dom 宽度
|
|
128
128
|
|
|
129
129
|
height = okrMapRef.clientHeight; // 获取dom 高度
|
|
130
130
|
|
|
131
|
-
canvas = document.createElement(
|
|
131
|
+
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
132
132
|
|
|
133
133
|
scale = 20; // 定义任意放大倍数 支持小数
|
|
134
134
|
|
|
@@ -165,36 +165,50 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
var imgUrl = result.toDataURL(
|
|
168
|
+
var imgUrl = result.toDataURL('image/png'); // 得到图片的base64编码数据
|
|
169
|
+
// @ts-ignore
|
|
169
170
|
|
|
170
171
|
// 得到图片的base64编码数据
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
window.titaTracker && window.titaTracker("action").record({
|
|
174
|
+
actionName: '我得到了图片' + imgUrl,
|
|
175
|
+
actionGroup: 'okr地图图片',
|
|
176
|
+
productName: 'okr地图导出'
|
|
177
|
+
});
|
|
178
|
+
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
179
|
+
var image = new Image(); // @ts-ignore
|
|
180
|
+
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
window.titaTracker && window.titaTracker("action").record({
|
|
183
|
+
actionName: '我获得了地址' + url.Data.obj,
|
|
184
|
+
actionGroup: 'okr地图接口',
|
|
185
|
+
productName: 'okr地图导出'
|
|
186
|
+
});
|
|
187
|
+
image.setAttribute('crossOrigin', 'anonymous');
|
|
174
188
|
|
|
175
189
|
image.onload = function () {
|
|
176
190
|
if (!url.Data.obj) {
|
|
177
|
-
_toast["default"].Error(
|
|
191
|
+
_toast["default"].Error('导出失败,请稍后重试', {
|
|
178
192
|
canClose: false
|
|
179
193
|
});
|
|
180
194
|
}
|
|
181
195
|
|
|
182
|
-
var a = document.createElement(
|
|
196
|
+
var a = document.createElement('a'); // 生成一个a元素
|
|
183
197
|
|
|
184
198
|
// 生成一个a元素
|
|
185
|
-
var event = new MouseEvent(
|
|
199
|
+
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
186
200
|
|
|
187
201
|
// 创建一个单击事件
|
|
188
|
-
a.download =
|
|
202
|
+
a.download = 'okr地图'; // 设置图片名称
|
|
189
203
|
|
|
190
204
|
// 设置图片名称
|
|
191
|
-
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
205
|
+
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
192
206
|
|
|
193
|
-
// 将生成的URL设置为a
|
|
207
|
+
// 将生成的URL设置为a
|
|
194
208
|
a.dispatchEvent(event); // 触发a的单击事件
|
|
195
209
|
|
|
196
210
|
// 触发a的单击事件
|
|
197
|
-
_toast["default"].Success(
|
|
211
|
+
_toast["default"].Success('导出成功');
|
|
198
212
|
|
|
199
213
|
setIsExport(false);
|
|
200
214
|
|
|
@@ -228,7 +242,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
228
242
|
|
|
229
243
|
var confirmHandler = function confirmHandler() {
|
|
230
244
|
if (isExport) {
|
|
231
|
-
_toast["default"].Warning(
|
|
245
|
+
_toast["default"].Warning('正在导出中', {
|
|
232
246
|
canClose: true
|
|
233
247
|
});
|
|
234
248
|
|
|
@@ -244,7 +258,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
244
258
|
};
|
|
245
259
|
|
|
246
260
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
247
|
-
setBgColor(colors ? colors.color :
|
|
261
|
+
setBgColor(colors ? colors.color : 'none');
|
|
248
262
|
};
|
|
249
263
|
|
|
250
264
|
var NodeDebug = function NodeDebug() {
|
|
@@ -261,7 +275,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
261
275
|
};
|
|
262
276
|
|
|
263
277
|
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
264
|
-
title: (0, _getLocale.getLocale)(
|
|
278
|
+
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
265
279
|
noFooterLine: true,
|
|
266
280
|
visible: visible,
|
|
267
281
|
width: "1000px",
|
|
@@ -277,7 +291,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
277
291
|
style: {
|
|
278
292
|
marginRight: 10
|
|
279
293
|
}
|
|
280
|
-
}, (0, _getLocale.getLocale)(
|
|
294
|
+
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
281
295
|
animation: "slide-up",
|
|
282
296
|
color: "#FFFFFF",
|
|
283
297
|
onChange: colorChangeHandler,
|
|
@@ -308,7 +322,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
308
322
|
paneMoveable: false,
|
|
309
323
|
style: {
|
|
310
324
|
height: 600,
|
|
311
|
-
width:
|
|
325
|
+
width: '100%',
|
|
312
326
|
background: bgColor
|
|
313
327
|
}
|
|
314
328
|
}, /*#__PURE__*/_react["default"].createElement(NodeDebug, null)))))));
|