@titaui/pc 1.11.39 → 1.11.41
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 +1 -1
- package/lib/components/avatar/text-avatar/index.js +4 -4
- 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/nav-top/components/user-message/components/inform/inform-item.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/package.json +1 -1
|
@@ -41,7 +41,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
41
41
|
|
|
42
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
43
|
|
|
44
|
-
var preCls =
|
|
44
|
+
var preCls = 'titaui-text-avatar';
|
|
45
45
|
|
|
46
46
|
function TextAvatar(props) {
|
|
47
47
|
var name = props.name,
|
|
@@ -54,7 +54,7 @@ function TextAvatar(props) {
|
|
|
54
54
|
_props$isGetRoot = props.isGetRoot,
|
|
55
55
|
isGetRoot = _props$isGetRoot === void 0 ? false : _props$isGetRoot,
|
|
56
56
|
_props$extraCls = props.extraCls,
|
|
57
|
-
extraCls = _props$extraCls === void 0 ?
|
|
57
|
+
extraCls = _props$extraCls === void 0 ? '' : _props$extraCls,
|
|
58
58
|
_props$nameTips = props.nameTips,
|
|
59
59
|
nameTips = _props$nameTips === void 0 ? function (name) {
|
|
60
60
|
return name;
|
|
@@ -83,7 +83,7 @@ function TextAvatar(props) {
|
|
|
83
83
|
}; // 非编辑态,不可以弹出选人组件
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var FieldPerson = editable ? _userSelector["default"] :
|
|
86
|
+
var FieldPerson = editable ? _userSelector["default"] : 'span';
|
|
87
87
|
|
|
88
88
|
var renderAvatar = function renderAvatar() {
|
|
89
89
|
if (showAvatar) {
|
|
@@ -91,7 +91,7 @@ function TextAvatar(props) {
|
|
|
91
91
|
className: "".concat(preCls, "__img")
|
|
92
92
|
}, /*#__PURE__*/_react["default"].createElement(_default2["default"], {
|
|
93
93
|
userId: id,
|
|
94
|
-
src: avatar !== null && avatar !== void 0 && avatar.HasAvatar || avatar !== null && avatar !== void 0 && avatar.hasAvatar ? avatar.medium :
|
|
94
|
+
src: avatar !== null && avatar !== void 0 && avatar.HasAvatar || avatar !== null && avatar !== void 0 && avatar.hasAvatar ? avatar.medium : '',
|
|
95
95
|
color: avatar === null || avatar === void 0 ? void 0 : avatar.color,
|
|
96
96
|
name: name,
|
|
97
97
|
size: {
|
|
@@ -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 = "点赞";
|
|
130
137
|
} else {
|
|
131
138
|
setPraiseData(data);
|
|
139
|
+
actionName = "取消点赞";
|
|
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" ? "删除评论" : "评论";
|
|
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
|
|
|
@@ -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
|
|
|
@@ -8,33 +8,38 @@ exports.TASK_NDOE_TYPE = exports.EStatusStatus2ClassType = exports.EStatusClass2
|
|
|
8
8
|
var _getLocale = require("../../../utils/getLocale");
|
|
9
9
|
|
|
10
10
|
var EStatusClass2StatusType = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
"tu-icon-finished": 2,
|
|
12
|
+
"tu-icon-running": 1,
|
|
13
|
+
"tu-icon-canceled": 4,
|
|
14
|
+
"tu-icon-deferred": 3,
|
|
15
|
+
"tu-icon-paused": 6,
|
|
16
|
+
"tu-icon-notstart": 0,
|
|
17
|
+
"tu-icon-jiantou-right": 5
|
|
18
18
|
};
|
|
19
19
|
exports.EStatusClass2StatusType = EStatusClass2StatusType;
|
|
20
20
|
var EStatusStatus2ClassType = {
|
|
21
|
-
2:
|
|
22
|
-
1:
|
|
23
|
-
4:
|
|
24
|
-
3:
|
|
25
|
-
6:
|
|
26
|
-
0:
|
|
27
|
-
5:
|
|
21
|
+
2: "tu-icon-finished",
|
|
22
|
+
1: "tu-icon-running",
|
|
23
|
+
4: "tu-icon-canceled",
|
|
24
|
+
3: "tu-icon-deferred",
|
|
25
|
+
6: "tu-icon-paused",
|
|
26
|
+
0: "tu-icon-notstart",
|
|
27
|
+
5: "tu-icon-weijieshou-right"
|
|
28
28
|
};
|
|
29
29
|
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
|
|
31
|
+
var EStatusClass2StatusTypeText = function EStatusClass2StatusTypeText() {
|
|
32
|
+
return {
|
|
33
|
+
"tu-icon-finished": (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed"),
|
|
34
|
+
"tu-icon-running": (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
35
|
+
"tu-icon-canceled": (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled"),
|
|
36
|
+
"tu-icon-deferred": (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed"),
|
|
37
|
+
"tu-icon-paused": (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended"),
|
|
38
|
+
"tu-icon-notstart": (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted"),
|
|
39
|
+
"tu-icon-weijieshou-right": (0, _getLocale.getLocale)("OKR_MyO_E_From_Notaccepted")
|
|
40
|
+
};
|
|
37
41
|
};
|
|
42
|
+
|
|
38
43
|
exports.EStatusClass2StatusTypeText = EStatusClass2StatusTypeText;
|
|
39
44
|
var TASK_NDOE_TYPE;
|
|
40
45
|
exports.TASK_NDOE_TYPE = TASK_NDOE_TYPE;
|
|
@@ -11,10 +11,14 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _titaUi = require("tita-ui");
|
|
15
|
+
|
|
14
16
|
var _dropSelector = _interopRequireWildcard(require("../../drop-selector"));
|
|
15
17
|
|
|
16
18
|
var _getLocale = require("../../../utils/getLocale");
|
|
17
19
|
|
|
20
|
+
var _constant = require("./constant");
|
|
21
|
+
|
|
18
22
|
require("./index.css");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -41,7 +45,7 @@ var EStatusDropdown = function EStatusDropdown(props) {
|
|
|
41
45
|
checked = props.checked,
|
|
42
46
|
hasAuth = props.hasAuth;
|
|
43
47
|
|
|
44
|
-
var _useState = (0, _react.useState)(
|
|
48
|
+
var _useState = (0, _react.useState)('tu-icon-notstart'),
|
|
45
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
50
|
status = _useState2[0],
|
|
47
51
|
setStatus = _useState2[1];
|
|
@@ -59,55 +63,61 @@ var EStatusDropdown = function EStatusDropdown(props) {
|
|
|
59
63
|
}, [checked]);
|
|
60
64
|
|
|
61
65
|
if (!hasAuth) {
|
|
62
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
67
|
+
content: (0, _constant.EStatusClass2StatusTypeText)()[status]
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
69
|
style: {
|
|
64
|
-
color:
|
|
70
|
+
color: '#89919F',
|
|
65
71
|
fontSize: 16,
|
|
66
72
|
marginRight: 4,
|
|
67
|
-
verticalAlign:
|
|
73
|
+
verticalAlign: 'baseline'
|
|
68
74
|
},
|
|
69
75
|
className: (0, _classnames["default"])(status)
|
|
70
|
-
});
|
|
76
|
+
}));
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
74
80
|
onChange: onMenuClickHandler,
|
|
75
81
|
checked: status,
|
|
76
82
|
canEdit: hasAuth,
|
|
77
|
-
trigger: /*#__PURE__*/_react["default"].createElement("
|
|
83
|
+
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
84
|
style: {
|
|
79
|
-
color:
|
|
85
|
+
color: '#89919F',
|
|
80
86
|
fontSize: 16,
|
|
81
87
|
marginRight: 4,
|
|
82
|
-
verticalAlign:
|
|
83
|
-
|
|
88
|
+
verticalAlign: 'baseline',
|
|
89
|
+
display: 'flex'
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
92
|
+
content: (0, _constant.EStatusClass2StatusTypeText)()[status]
|
|
93
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
94
|
className: (0, _classnames["default"])(status)
|
|
85
|
-
})
|
|
95
|
+
})))
|
|
86
96
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
87
97
|
name: "tu-icon-finished",
|
|
88
98
|
icon: "tu-icon-finished",
|
|
89
99
|
exIconClass: "e-node-status-icon"
|
|
90
|
-
}, (0, _getLocale.getLocale)(
|
|
100
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_Completed')), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
91
101
|
name: "tu-icon-running",
|
|
92
102
|
icon: "tu-icon-running",
|
|
93
103
|
exIconClass: "e-node-status-icon"
|
|
94
|
-
}, (0, _getLocale.getLocale)(
|
|
104
|
+
}, (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress')), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
95
105
|
name: "tu-icon-canceled",
|
|
96
106
|
icon: "tu-icon-canceled",
|
|
97
107
|
exIconClass: "e-node-status-icon"
|
|
98
|
-
}, (0, _getLocale.getLocale)(
|
|
108
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled')), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
99
109
|
name: "tu-icon-deferred",
|
|
100
110
|
icon: "tu-icon-deferred",
|
|
101
111
|
exIconClass: "e-node-status-icon"
|
|
102
|
-
}, (0, _getLocale.getLocale)(
|
|
112
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed')), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
103
113
|
name: "tu-icon-paused",
|
|
104
114
|
icon: "tu-icon-paused",
|
|
105
115
|
exIconClass: "e-node-status-icon"
|
|
106
|
-
}, (0, _getLocale.getLocale)(
|
|
116
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended')), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
107
117
|
name: "tu-icon-notstart",
|
|
108
118
|
icon: "tu-icon-notstart",
|
|
109
119
|
exIconClass: "e-node-status-icon"
|
|
110
|
-
}, (0, _getLocale.getLocale)(
|
|
120
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted')));
|
|
111
121
|
};
|
|
112
122
|
|
|
113
123
|
var _default = EStatusDropdown;
|
|
@@ -138,7 +138,7 @@ function ETaskNode(props) {
|
|
|
138
138
|
setDataInfo = _useState14[1];
|
|
139
139
|
|
|
140
140
|
var _useState15 = (0, _react.useState)(function () {
|
|
141
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
141
|
+
return (0, _bsGlobal.getBSGlobal)('TaskAdvancedSetting').TaskFunctionSetting.TaskPriority;
|
|
142
142
|
}),
|
|
143
143
|
_useState16 = _slicedToArray(_useState15, 1),
|
|
144
144
|
isShowPriority = _useState16[0];
|
|
@@ -152,8 +152,8 @@ function ETaskNode(props) {
|
|
|
152
152
|
var hasEditAuth = new _auth.EAuth({
|
|
153
153
|
principalUser: data.principalUser,
|
|
154
154
|
user: data.user
|
|
155
|
-
}).hasAuth() // || extraEditAuth
|
|
156
|
-
|
|
155
|
+
}).hasAuth() && // || extraEditAuth
|
|
156
|
+
data.status !== 5;
|
|
157
157
|
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
158
158
|
var hasRelativeAuth = new _auth.KRAuth({
|
|
159
159
|
user: krUser,
|
|
@@ -174,7 +174,7 @@ function ETaskNode(props) {
|
|
|
174
174
|
if (data.Code === 1) {
|
|
175
175
|
setUser(user.data);
|
|
176
176
|
|
|
177
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
177
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
178
178
|
canClose: false
|
|
179
179
|
});
|
|
180
180
|
} else {
|
|
@@ -183,7 +183,7 @@ function ETaskNode(props) {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
})["catch"](function () {
|
|
186
|
-
_toast["default"].Error(
|
|
186
|
+
_toast["default"].Error('网络异常', {
|
|
187
187
|
canClose: false
|
|
188
188
|
});
|
|
189
189
|
});
|
|
@@ -195,7 +195,7 @@ function ETaskNode(props) {
|
|
|
195
195
|
status: _constant.EStatusClass2StatusType[statusType]
|
|
196
196
|
}).then(function (resp) {
|
|
197
197
|
if (resp.Code === 1) {
|
|
198
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
198
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
199
199
|
canClose: false
|
|
200
200
|
});
|
|
201
201
|
|
|
@@ -210,7 +210,7 @@ function ETaskNode(props) {
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
})["catch"](function () {
|
|
213
|
-
_toast["default"].Error(
|
|
213
|
+
_toast["default"].Error('网络异常', {
|
|
214
214
|
canClose: false
|
|
215
215
|
});
|
|
216
216
|
});
|
|
@@ -224,7 +224,7 @@ function ETaskNode(props) {
|
|
|
224
224
|
taskId: data.taskId
|
|
225
225
|
}).then(function (resp) {
|
|
226
226
|
if (resp.Code === 1) {
|
|
227
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
227
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
228
228
|
canClose: false
|
|
229
229
|
});
|
|
230
230
|
} else {
|
|
@@ -233,7 +233,7 @@ function ETaskNode(props) {
|
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
})["catch"](function () {
|
|
236
|
-
_toast["default"].Error(
|
|
236
|
+
_toast["default"].Error('网络异常', {
|
|
237
237
|
canClose: false
|
|
238
238
|
});
|
|
239
239
|
})["finally"](setUnConnectVisible(false));
|
|
@@ -279,7 +279,7 @@ function ETaskNode(props) {
|
|
|
279
279
|
status: resp.Data.status
|
|
280
280
|
}));
|
|
281
281
|
|
|
282
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
282
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
283
283
|
canClose: false
|
|
284
284
|
});
|
|
285
285
|
} else {
|
|
@@ -288,7 +288,7 @@ function ETaskNode(props) {
|
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
})["catch"](function () {
|
|
291
|
-
_toast["default"].Error(
|
|
291
|
+
_toast["default"].Error('网络异常', {
|
|
292
292
|
canClose: false
|
|
293
293
|
});
|
|
294
294
|
});
|
|
@@ -322,7 +322,7 @@ function ETaskNode(props) {
|
|
|
322
322
|
};
|
|
323
323
|
|
|
324
324
|
var handleShowTaskDetail = function handleShowTaskDetail() {
|
|
325
|
-
if ((0, _platform.isPlatform)(
|
|
325
|
+
if ((0, _platform.isPlatform)('dd')) {
|
|
326
326
|
_drawerManager["default"].close();
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -333,7 +333,7 @@ function ETaskNode(props) {
|
|
|
333
333
|
(_window$Talent2 = window.Talent) === null || _window$Talent2 === void 0 ? void 0 : _window$Talent2.app.vent.on("global-pull-screen:closed:".concat(data.taskId), function () {// refreshEList && refreshEList();
|
|
334
334
|
}); // 任务:打开推屏
|
|
335
335
|
|
|
336
|
-
window.Talent.app.vent.trigger(
|
|
336
|
+
window.Talent.app.vent.trigger('global-pull-screen', data.taskId, 'task');
|
|
337
337
|
} else {
|
|
338
338
|
window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
|
|
339
339
|
}
|
|
@@ -391,11 +391,11 @@ function ETaskNode(props) {
|
|
|
391
391
|
percent: progress,
|
|
392
392
|
linear: true,
|
|
393
393
|
linearId: data.taskId,
|
|
394
|
-
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel,
|
|
395
|
-
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel,
|
|
396
|
-
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel,
|
|
394
|
+
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, 'linearStartColor', dataInfo.status),
|
|
395
|
+
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, 'linearEndColor', dataInfo.status),
|
|
396
|
+
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, 'backgroundColor', dataInfo.status)
|
|
397
397
|
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
398
|
-
overlay: (0, _getLocale.getLocale)(
|
|
398
|
+
overlay: (0, _getLocale.getLocale)('OKR_MyO_Text_Cancel'),
|
|
399
399
|
placement: "top"
|
|
400
400
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
401
401
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-connect")),
|
|
@@ -409,17 +409,17 @@ function ETaskNode(props) {
|
|
|
409
409
|
type: "warning"
|
|
410
410
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
411
411
|
type: "title"
|
|
412
|
-
}, (0, _getLocale.getLocale)(
|
|
412
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Cancelass')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
413
413
|
type: "content"
|
|
414
|
-
}, (0, _getLocale.getLocale)(
|
|
414
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_TtasknotO')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
415
415
|
type: "button",
|
|
416
416
|
onClick: function onClick() {
|
|
417
417
|
return setUnConnectVisible(false);
|
|
418
418
|
}
|
|
419
|
-
}, (0, _getLocale.getLocale)(
|
|
419
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
420
420
|
type: "button",
|
|
421
421
|
onClick: onSureUnConnectHandler
|
|
422
|
-
}, (0, _getLocale.getLocale)(
|
|
422
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))));
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
var _default = ETaskNode;
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
|
|
99
99
|
.titaui-task-tree__e-task-node-actions-date--canedit:hover {
|
|
100
100
|
border-radius: 8px;
|
|
101
|
-
border: 1px solid #
|
|
101
|
+
border: 1px solid #dfe3ea;
|
|
102
102
|
padding: 3px;
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
|
|
255
255
|
.titaui-task-tree__e-project-node-actions-date--canedit:hover {
|
|
256
256
|
border-radius: 8px;
|
|
257
|
-
border: 1px solid #
|
|
257
|
+
border: 1px solid #dfe3ea;
|
|
258
258
|
padding: 3px;
|
|
259
259
|
}
|
|
260
260
|
|