@titaui/pc 1.11.39 → 1.11.40-beta.4
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 +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/avatar/text-avatar/index.css +1 -1
- package/lib/components/avatar/text-avatar/index.js +4 -4
- package/lib/components/button/rect-btn/index.css +45 -11
- package/lib/components/button/rect-btn/index.js +12 -6
- package/lib/components/change-okr-modal/index.js +2 -1
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +45 -41
- 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 +5 -1
- package/lib/components/drawer/headerDrop.js +42 -4
- package/lib/components/drawer/index.css +33 -0
- package/lib/components/drawer/index.js +26 -3
- package/lib/components/dynamic/constant.js +38 -33
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +48 -10
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +4 -2
- package/lib/components/dynamic/new-ui.css +4 -4
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -1
- package/lib/components/nav-top/index.js +6 -2
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/header/index.js +10 -3
- package/lib/components/okr-detail/components/header/o-name.js +10 -3
- package/lib/components/okr-detail/components/o-classify.js +5 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +13 -14
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +111 -54
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +59 -0
- package/lib/components/okr-detail/detail-header/index.css +11 -0
- package/lib/components/okr-detail/detail-header/index.js +228 -234
- package/lib/components/okr-detail/helper.js +108 -0
- package/lib/components/okr-detail/index.js +21 -4
- package/lib/components/okr-detail/okr-list/index.js +8 -3
- package/lib/components/okr-detail/request-apis.js +10 -4
- package/lib/components/okr-period-selector/index.js +9 -5
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/task-tree/task-item-node/constant.js +26 -21
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +26 -16
- package/lib/components/task-tree/task-item-node/e-task.js +21 -21
- package/lib/components/task-tree/task-item-node/index.css +2 -2
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +259 -0
- package/lib/components/toast/index.js +5 -3
- package/lib/index.js +40 -0
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +38 -16
- package/lib/pages/new-okr-list/header/operate-record.js +131 -0
- package/lib/pages/new-okr-list/index.js +3 -1
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/new-okr-list/request-api.js +8 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +1 -1
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _helper = require("../okr-detail/helper");
|
|
13
|
+
|
|
12
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -44,7 +46,9 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
44
46
|
colorInDrop = _ref.colorInDrop,
|
|
45
47
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
46
48
|
_onClick = _ref.onClick,
|
|
47
|
-
onClose = _ref.onClose
|
|
49
|
+
onClose = _ref.onClose,
|
|
50
|
+
approvalSetting = _ref.approvalSetting,
|
|
51
|
+
detailInfo = _ref.detailInfo;
|
|
48
52
|
|
|
49
53
|
var _useState = (0, _react.useState)(false),
|
|
50
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -52,7 +56,37 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
52
56
|
setHover = _useState2[1];
|
|
53
57
|
|
|
54
58
|
var hasIcon = !!icon && typeof icon === "string";
|
|
55
|
-
|
|
59
|
+
var applyState = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.applyState;
|
|
60
|
+
var OkrAndKrApprovalTypes = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.OkrAndKrApprovalTypes;
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalOkr)(approvalSetting, 'deleteOkr', applyState, OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
+
className: "header-drop-item",
|
|
63
|
+
style: {
|
|
64
|
+
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
65
|
+
},
|
|
66
|
+
onClick: function onClick(e) {
|
|
67
|
+
_onClick && _onClick(e);
|
|
68
|
+
onClose(false);
|
|
69
|
+
},
|
|
70
|
+
onMouseOver: function onMouseOver() {
|
|
71
|
+
return setHover(true);
|
|
72
|
+
},
|
|
73
|
+
onMouseOut: function onMouseOut() {
|
|
74
|
+
return setHover(false);
|
|
75
|
+
}
|
|
76
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: "header-drop-item-icon",
|
|
78
|
+
style: {
|
|
79
|
+
color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
|
|
80
|
+
}
|
|
81
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
className: icon
|
|
83
|
+
}) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: "header-drop-item-approval"
|
|
85
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "header-drop-item-icon"
|
|
87
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
|
+
className: icon
|
|
89
|
+
}) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
90
|
className: "header-drop-item",
|
|
57
91
|
style: {
|
|
58
92
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -74,19 +108,23 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
74
108
|
}
|
|
75
109
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
110
|
className: icon
|
|
77
|
-
}) : icon), title);
|
|
111
|
+
}) : icon), title));
|
|
78
112
|
};
|
|
79
113
|
|
|
80
114
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
81
115
|
var visible = _ref2.visible,
|
|
82
116
|
onVisibleChange = _ref2.onVisibleChange,
|
|
83
117
|
items = _ref2.items,
|
|
84
|
-
children = _ref2.children
|
|
118
|
+
children = _ref2.children,
|
|
119
|
+
approvalSetting = _ref2.approvalSetting,
|
|
120
|
+
detailInfo = _ref2.detailInfo;
|
|
85
121
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
86
122
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
123
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
88
124
|
}, items.map(function (item) {
|
|
89
125
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
126
|
+
detailInfo: detailInfo,
|
|
127
|
+
approvalSetting: approvalSetting,
|
|
90
128
|
onClose: function onClose() {
|
|
91
129
|
return onVisibleChange(false);
|
|
92
130
|
}
|
|
@@ -164,6 +164,39 @@
|
|
|
164
164
|
background-repeat: no-repeat;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
|
|
168
|
+
height: 32px;
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
padding: 0 23px;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
color: #BFC7D5;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
|
|
177
|
+
font-size: 18px;
|
|
178
|
+
color: inherit;
|
|
179
|
+
width: 18px;
|
|
180
|
+
height: 18px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
margin-right: 10px;
|
|
183
|
+
background-size: contain;
|
|
184
|
+
background-position: center center;
|
|
185
|
+
background-repeat: no-repeat;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
color: inherit;
|
|
193
|
+
width: 18px;
|
|
194
|
+
height: 18px;
|
|
195
|
+
background-size: contain;
|
|
196
|
+
background-position: center center;
|
|
197
|
+
background-repeat: no-repeat;
|
|
198
|
+
}
|
|
199
|
+
|
|
167
200
|
.drawer-left .drawer-content-wrapper,
|
|
168
201
|
.drawer-right .drawer-content-wrapper,
|
|
169
202
|
.drawer-left .drawer-content,
|
|
@@ -25,7 +25,9 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _dom = require("./utils/dom");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
33
|
|
|
@@ -70,6 +72,8 @@ var Drawer = function Drawer(props) {
|
|
|
70
72
|
bodyStyle = props.bodyStyle,
|
|
71
73
|
_props$zIndex = props.zIndex,
|
|
72
74
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
+
_props$autoClosable = props.autoClosable,
|
|
76
|
+
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
73
77
|
rest = _objectWithoutProperties(props, _excluded);
|
|
74
78
|
|
|
75
79
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -89,6 +93,20 @@ var Drawer = function Drawer(props) {
|
|
|
89
93
|
return children;
|
|
90
94
|
}
|
|
91
95
|
|
|
96
|
+
var autoClose = function autoClose(e) {
|
|
97
|
+
if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
|
|
98
|
+
onClose();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
if (autoClosable) {
|
|
103
|
+
document.addEventListener('mousedown', autoClose);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return function () {
|
|
107
|
+
document.removeEventListener('mousedown', autoClose);
|
|
108
|
+
};
|
|
109
|
+
}, []);
|
|
92
110
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
93
111
|
value: {
|
|
94
112
|
close: function close() {
|
|
@@ -123,7 +141,10 @@ function DrawerHeader(_ref) {
|
|
|
123
141
|
content = _ref.content,
|
|
124
142
|
style = _ref.style,
|
|
125
143
|
onClose = _ref.onClose,
|
|
126
|
-
actionComponent = _ref.actionComponent
|
|
144
|
+
actionComponent = _ref.actionComponent,
|
|
145
|
+
onlyShowContent = _ref.onlyShowContent,
|
|
146
|
+
approvalSetting = _ref.approvalSetting,
|
|
147
|
+
detailInfo = _ref.detailInfo;
|
|
127
148
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
128
149
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
129
150
|
var showClose = closable && (!!onClose || !!drawer);
|
|
@@ -152,9 +173,11 @@ function DrawerHeader(_ref) {
|
|
|
152
173
|
style: {
|
|
153
174
|
flex: 1
|
|
154
175
|
}
|
|
155
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
176
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, onlyShowContent), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
156
177
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
157
178
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
179
|
+
approvalSetting: approvalSetting,
|
|
180
|
+
detailInfo: detailInfo,
|
|
158
181
|
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
159
182
|
icon: "tu-icon-10",
|
|
160
183
|
children: collapsedActions
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getObjTypeMapText = exports.PlanReportType = exports.OkrRiskMapping = exports.ObjectType = exports.EStatusStatus2ClassType = exports.EShareType = exports.EObjType = exports.EFeedType = void 0;
|
|
6
|
+
exports.getObjTypeMapText = exports.PlanReportType = exports.PlanReportTrackActionNameMap = exports.OkrRiskMapping = exports.ObjectType = exports.EStatusStatus2ClassType = exports.EShareType = exports.EObjType = exports.EFeedType = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../utils/getLocale");
|
|
9
9
|
|
|
10
10
|
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; }
|
|
11
11
|
|
|
12
12
|
var OkrRiskMapping = {
|
|
13
|
-
0:
|
|
13
|
+
0: "normal",
|
|
14
14
|
// 正常推进
|
|
15
|
-
1:
|
|
15
|
+
1: "normal",
|
|
16
16
|
// 正常推进
|
|
17
|
-
2:
|
|
17
|
+
2: "risk",
|
|
18
18
|
// 注意风险
|
|
19
|
-
3:
|
|
19
|
+
3: "delay",
|
|
20
20
|
// 已有风险
|
|
21
|
-
4:
|
|
21
|
+
4: "end",
|
|
22
22
|
// kr及o全都完成
|
|
23
|
-
5:
|
|
23
|
+
5: "delay",
|
|
24
24
|
// 延期完成
|
|
25
|
-
6:
|
|
25
|
+
6: "normal" // 正常推进
|
|
26
26
|
|
|
27
27
|
};
|
|
28
28
|
exports.OkrRiskMapping = OkrRiskMapping;
|
|
@@ -82,7 +82,7 @@ exports.EObjType = EObjType;
|
|
|
82
82
|
var getObjTypeMapText = function getObjTypeMapText(key) {
|
|
83
83
|
var _data;
|
|
84
84
|
|
|
85
|
-
var data = (_data = {}, _defineProperty(_data, EObjType.Project, (0, _getLocale.getLocale)(
|
|
85
|
+
var data = (_data = {}, _defineProperty(_data, EObjType.Project, (0, _getLocale.getLocale)("Menu_Title_Projects")), _defineProperty(_data, EObjType.Task, (0, _getLocale.getLocale)("Mod_Tasks")), _defineProperty(_data, EObjType.O, (0, _getLocale.getLocale)("Mod_Objective")), _defineProperty(_data, EObjType.Kr, (0, _getLocale.getLocale)("Mod_KeyResults")), _defineProperty(_data, EObjType.MileStone, (0, _getLocale.getLocale)("Pro_page_Plan_Milestone")), _defineProperty(_data, EObjType.KanBan, (0, _getLocale.getLocale)("Pro_page_V_Tab_Kanban")), _defineProperty(_data, EObjType.Report, "总结"), _data);
|
|
86
86
|
return data[key];
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -90,34 +90,39 @@ exports.getObjTypeMapText = getObjTypeMapText;
|
|
|
90
90
|
|
|
91
91
|
var ObjectType = function ObjectType() {
|
|
92
92
|
return {
|
|
93
|
-
1: (0, _getLocale.getLocale)(
|
|
94
|
-
4: (0, _getLocale.getLocale)(
|
|
95
|
-
5: (0, _getLocale.getLocale)(
|
|
96
|
-
6: (0, _getLocale.getLocale)(
|
|
97
|
-
7: (0, _getLocale.getLocale)(
|
|
98
|
-
8: (0, _getLocale.getLocale)(
|
|
99
|
-
10: (0, _getLocale.getLocale)(
|
|
100
|
-
11: (0, _getLocale.getLocale)(
|
|
101
|
-
12: (0, _getLocale.getLocale)(
|
|
102
|
-
62: (0, _getLocale.getLocale)(
|
|
103
|
-
65: (0, _getLocale.getLocale)(
|
|
104
|
-
70: (0, _getLocale.getLocale)(
|
|
105
|
-
79: (0, _getLocale.getLocale)(
|
|
106
|
-
80: (0, _getLocale.getLocale)(
|
|
107
|
-
42: (0, _getLocale.getLocale)(
|
|
93
|
+
1: (0, _getLocale.getLocale)("Mod_sannouncement"),
|
|
94
|
+
4: (0, _getLocale.getLocale)("Menu_Title_Projects"),
|
|
95
|
+
5: (0, _getLocale.getLocale)("Mod_sPerformanceForm"),
|
|
96
|
+
6: (0, _getLocale.getLocale)("Mod_sPerformanceGoals"),
|
|
97
|
+
7: (0, _getLocale.getLocale)("Mod_stasks"),
|
|
98
|
+
8: (0, _getLocale.getLocale)("Mod_sDailySummary"),
|
|
99
|
+
10: (0, _getLocale.getLocale)("Feed_sFeed"),
|
|
100
|
+
11: (0, _getLocale.getLocale)("Pro_page_Plan"),
|
|
101
|
+
12: (0, _getLocale.getLocale)("Feed_OperationTasks"),
|
|
102
|
+
62: (0, _getLocale.getLocale)("Mod_sobjective"),
|
|
103
|
+
65: (0, _getLocale.getLocale)("Feed_Keyresults"),
|
|
104
|
+
70: (0, _getLocale.getLocale)("OKR_MyO_KRP_Review"),
|
|
105
|
+
79: (0, _getLocale.getLocale)("Mod_skeyprogress"),
|
|
106
|
+
80: (0, _getLocale.getLocale)("Feed_sAnnouncement"),
|
|
107
|
+
42: (0, _getLocale.getLocale)("OKR_MyO_E_Reward")
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
exports.ObjectType = ObjectType;
|
|
112
112
|
var EStatusStatus2ClassType = {
|
|
113
|
-
2:
|
|
114
|
-
1:
|
|
115
|
-
4:
|
|
116
|
-
3:
|
|
117
|
-
6:
|
|
118
|
-
0:
|
|
119
|
-
5:
|
|
113
|
+
2: "tu-icon-finished",
|
|
114
|
+
1: "tu-icon-running",
|
|
115
|
+
4: "tu-icon-canceled",
|
|
116
|
+
3: "tu-icon-deferred",
|
|
117
|
+
6: "tu-icon-paused",
|
|
118
|
+
0: "tu-icon-notstart",
|
|
119
|
+
5: "tu-icon-jiantou-right"
|
|
120
120
|
};
|
|
121
121
|
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
122
|
-
var PlanReportType = [
|
|
123
|
-
exports.PlanReportType = PlanReportType;
|
|
122
|
+
var PlanReportType = ["titaPlanReport", "titaPlanManagerReport"];
|
|
123
|
+
exports.PlanReportType = PlanReportType;
|
|
124
|
+
var PlanReportTrackActionNameMap = {
|
|
125
|
+
titaPlanReport: "动态日报推送",
|
|
126
|
+
titaPlanManagerReport: "动态日报推送-管理者"
|
|
127
|
+
};
|
|
128
|
+
exports.PlanReportTrackActionNameMap = PlanReportTrackActionNameMap;
|
|
@@ -29,6 +29,8 @@ var _getLocale = require("../../../../utils/getLocale");
|
|
|
29
29
|
|
|
30
30
|
var _context = require("../../context");
|
|
31
31
|
|
|
32
|
+
var _constant = require("../../constant");
|
|
33
|
+
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
35
|
|
|
34
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); }
|
|
@@ -61,12 +63,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
61
63
|
|
|
62
64
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
65
|
|
|
64
|
-
var prefix =
|
|
66
|
+
var prefix = "titaui-dynamic-item";
|
|
65
67
|
|
|
66
68
|
var DynamicFooter = function DynamicFooter(_ref) {
|
|
67
69
|
var _getBSGlobal;
|
|
68
70
|
|
|
69
|
-
var data = _ref.data
|
|
71
|
+
var data = _ref.data,
|
|
72
|
+
dailyReportType = _ref.dailyReportType;
|
|
70
73
|
var feedId = data.feedId,
|
|
71
74
|
feedComments = data.feedComments,
|
|
72
75
|
praiseType = data.praiseType,
|
|
@@ -95,8 +98,9 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
95
98
|
setUpvoteModalVisible = _useState8[1];
|
|
96
99
|
|
|
97
100
|
var communicationRef = (0, _react.useRef)();
|
|
98
|
-
var
|
|
99
|
-
|
|
101
|
+
var productName = _constant.PlanReportTrackActionNameMap[dailyReportType];
|
|
102
|
+
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("WebHead")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
103
|
+
return item.AppId === "950";
|
|
100
104
|
}));
|
|
101
105
|
|
|
102
106
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
@@ -108,16 +112,18 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
108
112
|
};
|
|
109
113
|
|
|
110
114
|
var onChangeParse = function onChangeParse(type) {
|
|
111
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
115
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)("loginUserInfo"),
|
|
112
116
|
Id = _getBSGlobal2.Id;
|
|
113
117
|
|
|
114
118
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
115
119
|
return Number("".concat(item.userId)) !== Number("".concat(Id));
|
|
116
120
|
});
|
|
117
121
|
|
|
122
|
+
var actionName = "";
|
|
123
|
+
|
|
118
124
|
if (type) {
|
|
119
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
120
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
125
|
+
var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
|
|
126
|
+
var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
|
|
121
127
|
avatar.color = avatar.Color;
|
|
122
128
|
avatar.medium = avatar.Medium;
|
|
123
129
|
var parseUser = {
|
|
@@ -127,8 +133,18 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
127
133
|
praiseType: type
|
|
128
134
|
};
|
|
129
135
|
setPraiseData([parseUser].concat(_toConsumableArray(data)));
|
|
136
|
+
actionName = "点赞总结feed";
|
|
130
137
|
} else {
|
|
131
138
|
setPraiseData(data);
|
|
139
|
+
actionName = "取消总结feed点赞";
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (window.titaTracker) {
|
|
143
|
+
window.titaTracker("action").record({
|
|
144
|
+
actionName: actionName,
|
|
145
|
+
actionGroup: "互动",
|
|
146
|
+
productName: productName
|
|
147
|
+
});
|
|
132
148
|
}
|
|
133
149
|
};
|
|
134
150
|
|
|
@@ -143,6 +159,14 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
143
159
|
};
|
|
144
160
|
|
|
145
161
|
if (window.util) {
|
|
162
|
+
if (window.titaTracker) {
|
|
163
|
+
window.titaTracker("action").record({
|
|
164
|
+
actionName: "打开打赏弹层",
|
|
165
|
+
actionGroup: "互动",
|
|
166
|
+
productName: productName
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
146
170
|
window.util.rewardGetFile(function (myReward) {
|
|
147
171
|
myReward.renderPayReward(data);
|
|
148
172
|
});
|
|
@@ -151,12 +175,25 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
151
175
|
|
|
152
176
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
153
177
|
if (count === 0) {
|
|
154
|
-
return
|
|
178
|
+
return "";
|
|
155
179
|
}
|
|
156
180
|
|
|
157
181
|
return count || type;
|
|
158
182
|
};
|
|
159
183
|
|
|
184
|
+
var handleReply = function handleReply(_ref2) {
|
|
185
|
+
var submitType = _ref2.submitType;
|
|
186
|
+
var actionName = submitType === "delete" ? "删除总结feed评论" : "评论总结feed";
|
|
187
|
+
|
|
188
|
+
if (window.titaTracker) {
|
|
189
|
+
window.titaTracker("action").record({
|
|
190
|
+
actionName: actionName,
|
|
191
|
+
actionGroup: "互动",
|
|
192
|
+
productName: productName
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
160
197
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
198
|
className: (0, _classnames["default"])("".concat(prefix, "__footer"))
|
|
162
199
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -189,7 +226,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
189
226
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
190
227
|
condition: hasRewardBtn
|
|
191
228
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
192
|
-
overlay: (0, _getLocale.getLocale)(
|
|
229
|
+
overlay: (0, _getLocale.getLocale)("Feed_Approval"),
|
|
193
230
|
align: {
|
|
194
231
|
offset: [0, 0]
|
|
195
232
|
},
|
|
@@ -199,7 +236,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
199
236
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
200
237
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
238
|
onClick: handleCommentClick,
|
|
202
|
-
className: (0, _classnames["default"])(
|
|
239
|
+
className: (0, _classnames["default"])("tu-icon-pinglun-m", "".concat(prefix, "__footer-icon"))
|
|
203
240
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
204
241
|
condition: feedComments.total > 0
|
|
205
242
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -234,6 +271,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
234
271
|
usePropsComment: usePropsComment,
|
|
235
272
|
communication: feedComments.comments,
|
|
236
273
|
totalCommunicationNum: feedComments.total,
|
|
274
|
+
onReplyChange: handleReply,
|
|
237
275
|
showUser: true,
|
|
238
276
|
showDefaultInput: true
|
|
239
277
|
}))));
|
|
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
var prefixCls =
|
|
20
|
+
var prefixCls = "titaui-dynamic-item";
|
|
21
21
|
|
|
22
22
|
var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
23
23
|
var data = _ref.data;
|
|
@@ -26,12 +26,14 @@ var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
|
26
26
|
return (0, _utils.getChartProps)(data.biId);
|
|
27
27
|
}, [data.biId]);
|
|
28
28
|
|
|
29
|
+
var type = chartQuery.type;
|
|
29
30
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
31
|
className: prefixCls
|
|
31
32
|
}, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
|
|
32
33
|
feedData: data
|
|
33
34
|
}, chartQuery)), /*#__PURE__*/_react["default"].createElement(_dynamicFooter["default"], {
|
|
34
|
-
data: data
|
|
35
|
+
data: data,
|
|
36
|
+
dailyReportType: type
|
|
35
37
|
}));
|
|
36
38
|
};
|
|
37
39
|
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.titaui-new-ui-dynamic__no-more-data::before {
|
|
132
|
-
content:
|
|
132
|
+
content: '';
|
|
133
133
|
display: inline-block;
|
|
134
134
|
margin-right: 12px;
|
|
135
135
|
width: 192px;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.titaui-new-ui-dynamic__no-more-data::after {
|
|
142
|
-
content:
|
|
142
|
+
content: '';
|
|
143
143
|
display: inline-block;
|
|
144
144
|
margin-left: 12px;
|
|
145
145
|
width: 192px;
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
|
|
151
151
|
.titaui-new-ui-dynamic__go-to-top {
|
|
152
152
|
position: fixed;
|
|
153
|
-
bottom:
|
|
154
|
-
right:
|
|
153
|
+
bottom: 20px;
|
|
154
|
+
right: 86px;
|
|
155
155
|
display: flex;
|
|
156
156
|
align-items: center;
|
|
157
157
|
justify-content: center;
|
|
@@ -84,7 +84,8 @@ function Inform(props) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
if (objType === _constant.EObjType.Interview) {
|
|
87
|
-
(0, _tools.openPage)(
|
|
87
|
+
messageType !== 153 && (0, _tools.openPage)( // 153:删除面谈的通知类型
|
|
88
|
+
"".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/interview?reactRouterName=detail&hideNavTop=true&recordId=").concat(objId, "&toUserId=").concat(user === null || user === void 0 ? void 0 : user.userId));
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -15,6 +15,8 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
15
15
|
|
|
16
16
|
var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
|
|
17
17
|
|
|
18
|
+
var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
|
|
19
|
+
|
|
18
20
|
var _menu = _interopRequireDefault(require("./components/menu"));
|
|
19
21
|
|
|
20
22
|
var _userMessage = _interopRequireDefault(require("./components/user-message"));
|
|
@@ -170,5 +172,7 @@ var NavTop = function NavTop() {
|
|
|
170
172
|
}, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
|
|
171
173
|
};
|
|
172
174
|
|
|
173
|
-
var _default = NavTop;
|
|
174
|
-
|
|
175
|
+
var _default = NavTop; // @ts-ignore
|
|
176
|
+
|
|
177
|
+
exports["default"] = _default;
|
|
178
|
+
NavTop.useGlobalValue = _useGlobalValue["default"];
|
|
@@ -13,6 +13,10 @@ var _okrPeriodSelector = _interopRequireDefault(require("../../../../okr-period-
|
|
|
13
13
|
|
|
14
14
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
15
|
|
|
16
|
+
var _context = require("../../../context");
|
|
17
|
+
|
|
18
|
+
var _helper = require("../../../helper");
|
|
19
|
+
|
|
16
20
|
require("./index.css");
|
|
17
21
|
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -40,14 +44,22 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
40
44
|
_ref$canEdit = _ref.canEdit,
|
|
41
45
|
canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit;
|
|
42
46
|
|
|
47
|
+
var _useContext = (0, _react.useContext)(_context.CommonContext),
|
|
48
|
+
okrInfo = _useContext.okrInfo,
|
|
49
|
+
approvalSetting = _useContext.approvalSetting;
|
|
50
|
+
|
|
51
|
+
var canCycleEdit = canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrTime", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes);
|
|
52
|
+
|
|
43
53
|
var _useState = (0, _react.useState)(false),
|
|
44
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
55
|
isFocus = _useState2[0],
|
|
46
56
|
setIsFocus = _useState2[1];
|
|
47
57
|
|
|
48
58
|
var handleButtonFocus = (0, _react.useCallback)(function () {
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
if (canCycleEdit) {
|
|
60
|
+
setIsFocus(true);
|
|
61
|
+
}
|
|
62
|
+
}, [canCycleEdit]);
|
|
51
63
|
var handleButtonBlur = (0, _react.useCallback)(function () {
|
|
52
64
|
setIsFocus(false);
|
|
53
65
|
}, []);
|
|
@@ -57,9 +69,10 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
57
69
|
clickCallback = _ref2.clickCallback,
|
|
58
70
|
text = _ref2.text;
|
|
59
71
|
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
72
|
+
type: "button",
|
|
60
73
|
onFocus: handleButtonFocus,
|
|
61
74
|
onBlur: handleButtonBlur,
|
|
62
|
-
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!
|
|
75
|
+
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!canCycleEdit && "base-info-date-cycle__button--disable"),
|
|
63
76
|
ref: btnRef,
|
|
64
77
|
onClick: clickCallback
|
|
65
78
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -78,10 +91,13 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
78
91
|
cycle: cycle,
|
|
79
92
|
setCycle: setCycle,
|
|
80
93
|
okrId: okrId,
|
|
81
|
-
canEdit:
|
|
94
|
+
canEdit: canCycleEdit,
|
|
82
95
|
getCycleRange: true
|
|
83
96
|
}));
|
|
84
97
|
};
|
|
85
98
|
|
|
99
|
+
DateCycle.defaultProps = {
|
|
100
|
+
canEdit: false
|
|
101
|
+
};
|
|
86
102
|
var _default = DateCycle;
|
|
87
103
|
exports["default"] = _default;
|
|
@@ -21,6 +21,10 @@ var _popConfirm = _interopRequireDefault(require("../../../../../components-v1/p
|
|
|
21
21
|
|
|
22
22
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
23
23
|
|
|
24
|
+
var _context2 = require("../../../context");
|
|
25
|
+
|
|
26
|
+
var _helper = require("../../../helper");
|
|
27
|
+
|
|
24
28
|
require("./index.css");
|
|
25
29
|
|
|
26
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -60,6 +64,10 @@ var Principal = function Principal(_ref) {
|
|
|
60
64
|
selectUser = _useState2[0],
|
|
61
65
|
setSelectUser = _useState2[1];
|
|
62
66
|
|
|
67
|
+
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
68
|
+
okrInfo = _useContext.okrInfo,
|
|
69
|
+
approvalSetting = _useContext.approvalSetting;
|
|
70
|
+
|
|
63
71
|
var handleSelected = function handleSelected(_ref2) {
|
|
64
72
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
65
73
|
user = _ref3[0];
|
|
@@ -114,7 +122,7 @@ var Principal = function Principal(_ref) {
|
|
|
114
122
|
}, (0, _getLocale.getLocale)("Mod_Owner")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
123
|
className: "base-info-other-infos__principal-user",
|
|
116
124
|
ref: selectUserRef
|
|
117
|
-
}, canEdit ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
|
|
125
|
+
}, canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
|
|
118
126
|
ref: popConfirmRef,
|
|
119
127
|
showArrow: false,
|
|
120
128
|
style: {
|