@titaui/pc 1.11.4-0 → 1.11.4-0.beta-2
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 +9 -2
- package/lib/components/avatar/text-avatar/index.js +34 -9
- 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/drawer/index.js +7 -6
- package/lib/components/dynamic/constant.js +43 -36
- 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/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 +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 +70 -41
- package/lib/components/dynamic/dynamic-list/index.js +5 -13
- package/lib/components/e-priority/index.js +18 -12
- package/lib/components/eReport/eReportShare/index.js +12 -12
- package/lib/components/file-list/components/single-file/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 +11 -5
- 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/MblogContent.js +5 -2
- 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 +23 -17
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +5 -4
- package/lib/components/nav-top/components/menu/img/new.svg +30 -0
- package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
- package/lib/components/nav-top/components/menu/index.css +91 -0
- package/lib/components/nav-top/components/menu/index.js +80 -32
- 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/index.js +3 -2
- 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 +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-detail/okr-list/index.js +5 -3
- package/lib/components/okr-flow/child-node/index.css +68 -22
- 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 +108 -21
- 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/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 +31 -0
- package/lib/components/picker/components/picker-trigger/index.js +24 -15
- package/lib/components/picker/picker-panels.js +1 -1
- package/lib/components/picker/picker.js +12 -13
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- 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/superset-charts/components/chart/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -13
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +268 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-relation-modal/index.js +0 -1
- 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 +16 -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 +114 -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 +299 -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 +24 -0
- package/lib/components/time-picker/time-picker-selector.js +8 -12
- package/lib/components/time-picker/time-picker.js +94 -133
- package/lib/components/time-picker/timer-picker-input.js +3 -7
- package/lib/components/time-picker/utils.js +13 -2
- 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/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- 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/yarn-error.log +0 -22184
|
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
51
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
|
|
54
|
-
var prefixCls =
|
|
54
|
+
var prefixCls = 'titaui-user-message';
|
|
55
55
|
|
|
56
56
|
function UserMessage() {
|
|
57
57
|
var _useState = (0, _react.useState)(0),
|
|
@@ -79,7 +79,7 @@ function UserMessage() {
|
|
|
79
79
|
preData = _useState10[0],
|
|
80
80
|
setPreData = _useState10[1];
|
|
81
81
|
|
|
82
|
-
var _useState11 = (0, _react.useState)(
|
|
82
|
+
var _useState11 = (0, _react.useState)('todos'),
|
|
83
83
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
84
84
|
firstTab = _useState12[0],
|
|
85
85
|
setFirstTab = _useState12[1];
|
|
@@ -96,16 +96,16 @@ function UserMessage() {
|
|
|
96
96
|
setAllData(res.Data.indicators);
|
|
97
97
|
var indicators = res.Data.indicators;
|
|
98
98
|
var todos = indicators.find(function (item) {
|
|
99
|
-
return item.type ===
|
|
99
|
+
return item.type === 'todoIndicator';
|
|
100
100
|
});
|
|
101
101
|
var informs = indicators.find(function (item) {
|
|
102
|
-
return item.type ===
|
|
102
|
+
return item.type === 'messageIndicator';
|
|
103
103
|
});
|
|
104
104
|
var replys = indicators.find(function (item) {
|
|
105
|
-
return item.type ===
|
|
105
|
+
return item.type === 'mLeaveandComment';
|
|
106
106
|
});
|
|
107
107
|
var reminds = indicators.find(function (item) {
|
|
108
|
-
return item.type ===
|
|
108
|
+
return item.type === 'Tx';
|
|
109
109
|
});
|
|
110
110
|
var total = 0; // @与回复的数量在通知里面包含了
|
|
111
111
|
|
|
@@ -125,17 +125,17 @@ function UserMessage() {
|
|
|
125
125
|
setInfosNum(total);
|
|
126
126
|
|
|
127
127
|
if (todos && todos.value) {
|
|
128
|
-
setFirstTab(
|
|
128
|
+
setFirstTab('todos');
|
|
129
129
|
} else if (informs && !replys && informs.value) {
|
|
130
|
-
setFirstTab(
|
|
130
|
+
setFirstTab('informs');
|
|
131
131
|
} else if (replys && informs.value - replys.value === 0) {
|
|
132
|
-
setFirstTab(
|
|
132
|
+
setFirstTab('replys');
|
|
133
133
|
} else if (replys && informs.value - replys.value > 0) {
|
|
134
|
-
setFirstTab(
|
|
134
|
+
setFirstTab('informs');
|
|
135
135
|
} else if (reminds && reminds.value) {
|
|
136
|
-
setFirstTab(
|
|
136
|
+
setFirstTab('reminds');
|
|
137
137
|
} else {
|
|
138
|
-
setFirstTab(
|
|
138
|
+
setFirstTab('todos');
|
|
139
139
|
} // 判断是企业勋章
|
|
140
140
|
|
|
141
141
|
|
|
@@ -148,7 +148,7 @@ function UserMessage() {
|
|
|
148
148
|
} // upaas 勋章
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
var medalDetail = (0, _bsGlobal.getBSGlobal)(
|
|
151
|
+
var medalDetail = (0, _bsGlobal.getBSGlobal)('medalDetail');
|
|
152
152
|
|
|
153
153
|
if (medalDetail) {
|
|
154
154
|
window.util.upaasMedal()(medalDetail);
|
|
@@ -156,7 +156,7 @@ function UserMessage() {
|
|
|
156
156
|
|
|
157
157
|
|
|
158
158
|
var mRedPackIndicator = indicators.filter(function (item) {
|
|
159
|
-
return item.type ===
|
|
159
|
+
return item.type === 'mRedPackIndicator';
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
if (mRedPackIndicator.length > 0) {
|
|
@@ -165,10 +165,10 @@ function UserMessage() {
|
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
var blessIndicator = indicators.filter(function (item) {
|
|
168
|
-
return item.type ===
|
|
168
|
+
return item.type === 'mZhufu';
|
|
169
169
|
});
|
|
170
170
|
var weeklyReportIndicator = indicators.filter(function (item) {
|
|
171
|
-
return item.type ===
|
|
171
|
+
return item.type === 'mWeekStatisticIndicator';
|
|
172
172
|
});
|
|
173
173
|
|
|
174
174
|
if (blessIndicator.length === 1) {
|
|
@@ -185,11 +185,11 @@ function UserMessage() {
|
|
|
185
185
|
if (weeklyReportIndicator.length) {
|
|
186
186
|
var _window;
|
|
187
187
|
|
|
188
|
-
(_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger(
|
|
188
|
+
(_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger('open-weekly-report-modal');
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
var feedInfo = indicators.find(function (item) {
|
|
192
|
-
return item.type ===
|
|
192
|
+
return item.type === 'feedAboutMeIndicator';
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
if (feedInfo) {
|
|
@@ -206,7 +206,10 @@ function UserMessage() {
|
|
|
206
206
|
(0, _react.useEffect)(function () {
|
|
207
207
|
setPreData(infosNum);
|
|
208
208
|
handleIntervalRequestMessageInfo();
|
|
209
|
-
setInterval(handleIntervalRequestMessageInfo, 15000);
|
|
209
|
+
var interval = setInterval(handleIntervalRequestMessageInfo, 15000);
|
|
210
|
+
return function () {
|
|
211
|
+
return clearInterval(interval);
|
|
212
|
+
};
|
|
210
213
|
}, []);
|
|
211
214
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
212
215
|
popup: /*#__PURE__*/_react["default"].createElement(_msg["default"], {
|
|
@@ -227,7 +230,7 @@ function UserMessage() {
|
|
|
227
230
|
condition: infosNum !== 0
|
|
228
231
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
232
|
className: (0, _classnames["default"])("".concat(prefixCls, "__msg-total"))
|
|
230
|
-
}, infosNum > 100 ?
|
|
233
|
+
}, infosNum > 100 ? '99+' : infosNum)), /*#__PURE__*/_react["default"].createElement("img", {
|
|
231
234
|
src: _bell3x["default"],
|
|
232
235
|
className: (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "__msg-dot"), infosNum !== preData)),
|
|
233
236
|
alt: ""
|
|
@@ -81,6 +81,8 @@ var getMessages = function getMessages() {
|
|
|
81
81
|
_axios["default"].interceptors.response.use(function (response) {
|
|
82
82
|
return response;
|
|
83
83
|
}, function (error) {
|
|
84
|
+
var _error$response;
|
|
85
|
+
|
|
84
86
|
if (error.response) {
|
|
85
87
|
switch (error.response.status) {
|
|
86
88
|
case 401:
|
|
@@ -88,7 +90,7 @@ var getMessages = function getMessages() {
|
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
return Promise.reject(error.response.data);
|
|
93
|
+
return Promise.reject(error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data);
|
|
92
94
|
});
|
|
93
95
|
|
|
94
96
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/RemindV2/Get?dateTime=").concat(year, "/").concat(month, "/").concat(date)).then(function (resp) {
|
package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js
CHANGED
|
@@ -43,7 +43,7 @@ function _default(props) {
|
|
|
43
43
|
hasAuth = props.hasAuth,
|
|
44
44
|
status = props.status;
|
|
45
45
|
|
|
46
|
-
var _useState = (0, _react.useState)(
|
|
46
|
+
var _useState = (0, _react.useState)('1'),
|
|
47
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
48
|
level = _useState2[0],
|
|
49
49
|
setLevel = _useState2[1];
|
|
@@ -59,7 +59,7 @@ function _default(props) {
|
|
|
59
59
|
return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
60
60
|
onChange: onMenuClickHandler,
|
|
61
61
|
checked: level,
|
|
62
|
-
canEdit: hasAuth && status !==
|
|
62
|
+
canEdit: hasAuth && status !== '5',
|
|
63
63
|
limitHeight: false,
|
|
64
64
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
65
65
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p").concat(level))
|
|
@@ -68,21 +68,21 @@ function _default(props) {
|
|
|
68
68
|
name: "1"
|
|
69
69
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
70
70
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p1 ").concat(_precls["default"], "__e-task-node-select-priority"))
|
|
71
|
-
}), (0, _getLocale.getLocale)(
|
|
71
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Highest')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
72
72
|
name: "2"
|
|
73
73
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
74
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p2 ").concat(_precls["default"], "__e-task-node-select-priority"))
|
|
75
|
-
}), (0, _getLocale.getLocale)(
|
|
75
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_High')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
76
76
|
name: "3"
|
|
77
77
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
78
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p3 ").concat(_precls["default"], "__e-task-node-select-priority"))
|
|
79
|
-
}), (0, _getLocale.getLocale)(
|
|
79
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Middle')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
80
80
|
name: "4"
|
|
81
81
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
82
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p4 ").concat(_precls["default"], "__e-task-node-select-priority"))
|
|
83
|
-
}), (0, _getLocale.getLocale)(
|
|
83
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Low')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
84
84
|
name: "5"
|
|
85
85
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
86
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p5 ").concat(_precls["default"], "__e-task-node-select-priority"))
|
|
87
|
-
}), (0, _getLocale.getLocale)(
|
|
87
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Verylow')));
|
|
88
88
|
}
|
|
@@ -94,7 +94,8 @@ function _default(props) {
|
|
|
94
94
|
var data = props.data,
|
|
95
95
|
index = props.index,
|
|
96
96
|
title = props.title,
|
|
97
|
-
key = props.key
|
|
97
|
+
key = props.key,
|
|
98
|
+
canEditOkr = props.canEditOkr;
|
|
98
99
|
|
|
99
100
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
100
101
|
refreshAll = _useContext.refreshAll,
|
|
@@ -155,7 +156,7 @@ function _default(props) {
|
|
|
155
156
|
var hasAuth = new _auth.KRAuth({
|
|
156
157
|
user: data.user,
|
|
157
158
|
createUserId: data.createUserId
|
|
158
|
-
}).hasAuth();
|
|
159
|
+
}).hasAuth() || canEditOkr;
|
|
159
160
|
var livetime = okrInfo.status != 2;
|
|
160
161
|
return hasAuth && livetime;
|
|
161
162
|
}),
|
|
@@ -15,6 +15,10 @@ var _requestApis = require("../../../../request-apis");
|
|
|
15
15
|
|
|
16
16
|
var _rangePickerPop = _interopRequireDefault(require("../../../../../range-picker-pop"));
|
|
17
17
|
|
|
18
|
+
var _toast = _interopRequireDefault(require("../../../../../toast"));
|
|
19
|
+
|
|
20
|
+
var _getLocale = require("../../../../../../utils/getLocale");
|
|
21
|
+
|
|
18
22
|
require("./index.css");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,6 +72,12 @@ function _default(props) {
|
|
|
68
72
|
kr: data,
|
|
69
73
|
startDate: startDate,
|
|
70
74
|
endDate: endDate
|
|
75
|
+
}).then(function (resp) {
|
|
76
|
+
if (resp.Code === 1) {
|
|
77
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
78
|
+
} else {
|
|
79
|
+
_toast["default"].Error(resp.Message);
|
|
80
|
+
}
|
|
71
81
|
});
|
|
72
82
|
rangePicker.current.setRange({
|
|
73
83
|
startDate: startDate,
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getOkrHeadActions = getOkrHeadActions;
|
|
7
7
|
|
|
8
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
9
|
-
|
|
10
8
|
var _bsGlobal = require("../../../utils/bs-global");
|
|
11
9
|
|
|
12
10
|
var _auth = require("../../../utils/auth");
|
|
@@ -15,41 +13,17 @@ var _enums = require("./enums");
|
|
|
15
13
|
|
|
16
14
|
var _getLocale = require("../../../utils/getLocale");
|
|
17
15
|
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
17
|
|
|
22
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
19
|
|
|
24
20
|
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; }
|
|
25
21
|
|
|
26
|
-
function getOkrHeadActions(data) {
|
|
27
|
-
var actions = [];
|
|
28
|
-
var auth = new _auth.OAuth({
|
|
29
|
-
principalUser: data.principalUser,
|
|
30
|
-
createUserId: data.detailInfo.createUserId
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var dataWithAuth = _objectSpread(_objectSpread({}, data), {}, {
|
|
34
|
-
auth: auth
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
addShareButton(dataWithAuth, actions);
|
|
38
|
-
addVisibilityButton(dataWithAuth, actions);
|
|
39
|
-
addFollowButton(dataWithAuth, actions);
|
|
40
|
-
addExitButton(dataWithAuth, actions);
|
|
41
|
-
addFinishOrReopenButton(dataWithAuth, actions);
|
|
42
|
-
addCopyButton(dataWithAuth, actions);
|
|
43
|
-
addDeleteButton(dataWithAuth, actions); // addDetailButton(dataWithAuth,actions)
|
|
44
|
-
|
|
45
|
-
return actions;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
22
|
var addShareButton = function addShareButton(_ref, actions) {
|
|
49
23
|
var openShareModal = _ref.openShareModal;
|
|
50
24
|
actions.push({
|
|
51
|
-
icon:
|
|
52
|
-
title: (0, _getLocale.getLocale)(
|
|
25
|
+
icon: 'tu-icon-fenxiang',
|
|
26
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Share'),
|
|
53
27
|
onClick: openShareModal
|
|
54
28
|
});
|
|
55
29
|
};
|
|
@@ -60,56 +34,55 @@ var addVisibilityButton = function addVisibilityButton(_ref2, actions) {
|
|
|
60
34
|
detailInfo = _ref2.detailInfo,
|
|
61
35
|
changeVisiblilty = _ref2.changeVisiblilty;
|
|
62
36
|
var children = [{
|
|
63
|
-
title: (0, _getLocale.getLocale)(
|
|
37
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Pop_Public'),
|
|
64
38
|
onClick: function onClick() {
|
|
65
39
|
return changeVisiblilty(1);
|
|
66
40
|
}
|
|
67
41
|
}, {
|
|
68
|
-
title: (0, _getLocale.getLocale)(
|
|
42
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_From_Associatedmem'),
|
|
69
43
|
onClick: function onClick() {
|
|
70
44
|
return changeVisiblilty(2);
|
|
71
45
|
}
|
|
72
46
|
}, {
|
|
73
|
-
title: (0, _getLocale.getLocale)(
|
|
47
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Pop_Directrep'),
|
|
74
48
|
onClick: function onClick() {
|
|
75
49
|
return changeVisiblilty(3);
|
|
76
50
|
}
|
|
77
51
|
}, {
|
|
78
|
-
title: (0, _getLocale.getLocale)(
|
|
52
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Pop_Specified'),
|
|
79
53
|
onClick: function onClick() {
|
|
80
54
|
return changeVisiblilty(4);
|
|
81
55
|
}
|
|
82
56
|
}];
|
|
83
57
|
|
|
84
|
-
var editable = auth.hasAuth() && detailInfo.status
|
|
58
|
+
var editable = auth.hasAuth() && detailInfo.status === _enums.OkrStatus.inProgress;
|
|
85
59
|
|
|
86
60
|
actions.push({
|
|
87
|
-
icon: visibility
|
|
88
|
-
title: children[visibility - 1].title + (0, _getLocale.getLocale)(
|
|
61
|
+
icon: visibility !== 1 ? 'tu-icon-simi-icon' : 'tu-icon-gongkai',
|
|
62
|
+
title: children[visibility - 1].title + (0, _getLocale.getLocale)('OKR_MyO_Text_Visible'),
|
|
89
63
|
children: editable ? children : null
|
|
90
64
|
});
|
|
91
65
|
};
|
|
92
66
|
|
|
93
67
|
var addFollowButton = function addFollowButton(_ref3, actions) {
|
|
94
68
|
var roleType = _ref3.roleType,
|
|
95
|
-
detailInfo = _ref3.detailInfo,
|
|
96
69
|
onChangeOkrFollow = _ref3.onChangeOkrFollow;
|
|
97
70
|
|
|
98
71
|
// 未开启关注目标功能
|
|
99
|
-
if (!(0, _bsGlobal.getBSGlobal)(
|
|
72
|
+
if (!(0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.TargetFollowers) {
|
|
100
73
|
return;
|
|
101
74
|
} // 是负责人或是内部成员不能关注目标
|
|
102
75
|
|
|
103
76
|
|
|
104
|
-
if (roleType
|
|
77
|
+
if (roleType === _enums.OkrRole.principal || roleType === _enums.OkrRole.member) {
|
|
105
78
|
return;
|
|
106
79
|
} // 已关注目标
|
|
107
80
|
|
|
108
81
|
|
|
109
|
-
if (roleType
|
|
82
|
+
if (roleType === _enums.OkrRole.follower) {
|
|
110
83
|
actions.push({
|
|
111
|
-
icon:
|
|
112
|
-
title: (0, _getLocale.getLocale)(
|
|
84
|
+
icon: 'okr-drawer-header-followed',
|
|
85
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Butt_Unfollow'),
|
|
113
86
|
onClick: function onClick() {
|
|
114
87
|
return onChangeOkrFollow(false);
|
|
115
88
|
}
|
|
@@ -119,8 +92,8 @@ var addFollowButton = function addFollowButton(_ref3, actions) {
|
|
|
119
92
|
|
|
120
93
|
|
|
121
94
|
actions.push({
|
|
122
|
-
icon:
|
|
123
|
-
title:
|
|
95
|
+
icon: 'tu-icon-APP-shoucang',
|
|
96
|
+
title: '关注目标',
|
|
124
97
|
onClick: function onClick() {
|
|
125
98
|
return onChangeOkrFollow(true);
|
|
126
99
|
}
|
|
@@ -131,10 +104,10 @@ var addExitButton = function addExitButton(_ref4, actions) {
|
|
|
131
104
|
var roleType = _ref4.roleType,
|
|
132
105
|
onQuit = _ref4.onQuit;
|
|
133
106
|
|
|
134
|
-
if (roleType
|
|
107
|
+
if (roleType === _enums.OkrRole.member) {
|
|
135
108
|
actions.push({
|
|
136
|
-
icon:
|
|
137
|
-
title: (0, _getLocale.getLocale)(
|
|
109
|
+
icon: 'tu-icon-tuichu',
|
|
110
|
+
title: (0, _getLocale.getLocale)('Pro_Admin_pop_Withdraw'),
|
|
138
111
|
onClick: onQuit
|
|
139
112
|
});
|
|
140
113
|
}
|
|
@@ -146,18 +119,18 @@ var addFinishOrReopenButton = function addFinishOrReopenButton(_ref5, actions) {
|
|
|
146
119
|
onFinishOrReOpen = _ref5.onFinishOrReOpen;
|
|
147
120
|
if (!auth.hasAuth()) return;
|
|
148
121
|
|
|
149
|
-
if (detailInfo.status
|
|
122
|
+
if (detailInfo.status === _enums.OkrStatus.inProgress) {
|
|
150
123
|
actions.push({
|
|
151
|
-
icon:
|
|
152
|
-
title: (0, _getLocale.getLocale)(
|
|
124
|
+
icon: 'tu-icon-liebiao-jieshu',
|
|
125
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_EndObjective'),
|
|
153
126
|
onClick: function onClick() {
|
|
154
127
|
return onFinishOrReOpen(true);
|
|
155
128
|
}
|
|
156
129
|
});
|
|
157
130
|
} else {
|
|
158
131
|
actions.push({
|
|
159
|
-
icon:
|
|
160
|
-
title:
|
|
132
|
+
icon: 'tu-icon-gengxin1',
|
|
133
|
+
title: '重启目标',
|
|
161
134
|
onClick: function onClick() {
|
|
162
135
|
return onFinishOrReOpen(false);
|
|
163
136
|
}
|
|
@@ -168,8 +141,8 @@ var addFinishOrReopenButton = function addFinishOrReopenButton(_ref5, actions) {
|
|
|
168
141
|
var addCopyButton = function addCopyButton(_ref6, actions) {
|
|
169
142
|
var onCopyOkr = _ref6.onCopyOkr;
|
|
170
143
|
actions.push({
|
|
171
|
-
icon:
|
|
172
|
-
title: (0, _getLocale.getLocale)(
|
|
144
|
+
icon: 'tu-icon-liebiao-fuzhi',
|
|
145
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Butt_CopyObjective'),
|
|
173
146
|
onClick: function onClick() {
|
|
174
147
|
return onCopyOkr();
|
|
175
148
|
}
|
|
@@ -181,20 +154,43 @@ var addDeleteButton = function addDeleteButton(_ref7, actions) {
|
|
|
181
154
|
onDeleteOkr = _ref7.onDeleteOkr;
|
|
182
155
|
if (!auth.hasAuth()) return;
|
|
183
156
|
actions.push({
|
|
184
|
-
icon:
|
|
185
|
-
title: (0, _getLocale.getLocale)(
|
|
157
|
+
icon: 'tu-icon-del',
|
|
158
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Butt_DeleteO'),
|
|
186
159
|
onClick: onDeleteOkr
|
|
187
160
|
});
|
|
188
|
-
};
|
|
161
|
+
}; // const addDetailButton: ActionDealFunction = ({ detailInfo }, actions) => {
|
|
162
|
+
// const registerDate = window.BSGlobal.tenantAuthentication.StartDate;
|
|
163
|
+
// dayjs(registerDate).year() < 2021
|
|
164
|
+
// && actions.push({
|
|
165
|
+
// icon: "tu-icon-xiangqing1",
|
|
166
|
+
// title: "目标详情",
|
|
167
|
+
// onClick: () => {
|
|
168
|
+
// window.open(
|
|
169
|
+
// `${location.pathname}#okr/manage?work_id=${detailInfo.workId}`,
|
|
170
|
+
// );
|
|
171
|
+
// },
|
|
172
|
+
// });
|
|
173
|
+
// };
|
|
189
174
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
onClick: function onClick() {
|
|
197
|
-
window.open("".concat(location.pathname, "#okr/manage?work_id=").concat(detailInfo.workId));
|
|
198
|
-
}
|
|
175
|
+
|
|
176
|
+
function getOkrHeadActions(data) {
|
|
177
|
+
var actions = [];
|
|
178
|
+
var auth = new _auth.OAuth({
|
|
179
|
+
principalUser: data.principalUser,
|
|
180
|
+
createUserId: data.detailInfo.createUserId
|
|
199
181
|
});
|
|
200
|
-
|
|
182
|
+
|
|
183
|
+
var dataWithAuth = _objectSpread(_objectSpread({}, data), {}, {
|
|
184
|
+
auth: auth
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
addShareButton(dataWithAuth, actions);
|
|
188
|
+
addVisibilityButton(dataWithAuth, actions);
|
|
189
|
+
addFollowButton(dataWithAuth, actions);
|
|
190
|
+
addExitButton(dataWithAuth, actions);
|
|
191
|
+
addFinishOrReopenButton(dataWithAuth, actions);
|
|
192
|
+
addCopyButton(dataWithAuth, actions);
|
|
193
|
+
addDeleteButton(dataWithAuth, actions); // addDetailButton(dataWithAuth,actions)
|
|
194
|
+
|
|
195
|
+
return actions;
|
|
196
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
.okr-detail-head-parent {
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
|
-
color: #
|
|
8
|
+
color: #89919f;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.okr-detail-head-parent .tu-icon-liebiao-duiqinubiao {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.okr-detail-head-parent > span:hover {
|
|
26
|
-
color: #
|
|
26
|
+
color: #2879ff;
|
|
27
27
|
}
|