@titaui/pc 1.11.44 → 1.12.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +2 -2
- package/lib/components/avatar/text-avatar/index.js +6 -6
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +6 -12
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +41 -45
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/dynamic/constant.js +33 -38
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +10 -48
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +2 -4
- package/lib/components/dynamic/new-ui.css +4 -4
- package/lib/components/dynamic/online-broadcast/data.js +1 -19
- package/lib/components/e-priority/index.css +4 -4
- package/lib/components/e-priority/index.js +2 -10
- package/lib/components/mblog/components/MblogContent.js +2 -5
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +8 -7
- package/lib/components/nav-top/components/menu/index.css +0 -91
- package/lib/components/nav-top/components/menu/index.js +24 -72
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -2
- package/lib/components/nav-top/components/user-message/components/todos/index.css +0 -1
- package/lib/components/nav-top/index.js +2 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +16 -16
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -10
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +54 -111
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +4 -21
- package/lib/components/okr-detail/okr-list/index.js +6 -13
- package/lib/components/okr-detail/request-apis.js +8 -14
- package/lib/components/okr-flow/child-node/index.css +1 -1
- package/lib/components/okr-flow/export-modal/index.js +3 -66
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/survey-model/index.js +0 -3
- package/lib/components/task-relation-modal/index.js +1 -0
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/index.js +7 -1
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/task-item-node/constant.js +22 -39
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +8 -38
- package/lib/components/task-tree/task-item-node/e-task.js +24 -24
- package/lib/components/task-tree/task-item-node/index.css +18 -28
- package/lib/components/task-tree/task-tree.css +1 -1
- package/lib/components/time-picker/time-picker.js +102 -34
- package/lib/components/time-picker/timer-picker-input.js +6 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +29 -51
- package/lib/pages/new-okr-list/index.js +2 -4
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- package/lib/components/nav-top/components/menu/img/new.svg +0 -30
- package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -59
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -129
|
@@ -3,56 +3,39 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.TASK_NDOE_TYPE = exports.EStatusStatus2ClassType = exports.EStatusClass2StatusTypeText = exports.EStatusClass2StatusType = void 0;
|
|
7
7
|
|
|
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
|
-
|
|
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
|
-
};
|
|
30
|
+
var EStatusClass2StatusTypeText = {
|
|
31
|
+
'tu-icon-finished': (0, _getLocale.getLocale)('OKR_MyO_E_From_Completed'),
|
|
32
|
+
'tu-icon-running': (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress'),
|
|
33
|
+
'tu-icon-canceled': (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled'),
|
|
34
|
+
'tu-icon-deferred': (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed'),
|
|
35
|
+
'tu-icon-paused': (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended'),
|
|
36
|
+
'tu-icon-notstart': (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted')
|
|
41
37
|
};
|
|
42
|
-
|
|
43
38
|
exports.EStatusClass2StatusTypeText = EStatusClass2StatusTypeText;
|
|
44
|
-
|
|
45
|
-
var getPriorityTextMapping = function getPriorityTextMapping() {
|
|
46
|
-
return {
|
|
47
|
-
1: "".concat((0, _getLocale.getLocale)("OKR_MyO_E_Priority"), "\uFF1A").concat((0, _getLocale.getLocale)("OKR_MyO_E_Butt_Highest")),
|
|
48
|
-
2: "".concat((0, _getLocale.getLocale)("OKR_MyO_E_Priority"), "\uFF1A").concat((0, _getLocale.getLocale)("OKR_MyO_E_Butt_High")),
|
|
49
|
-
3: "".concat((0, _getLocale.getLocale)("OKR_MyO_E_Priority"), "\uFF1A").concat((0, _getLocale.getLocale)("OKR_MyO_E_Butt_Middle")),
|
|
50
|
-
4: "".concat((0, _getLocale.getLocale)("OKR_MyO_E_Priority"), "\uFF1A").concat((0, _getLocale.getLocale)("OKR_MyO_E_Butt_Low")),
|
|
51
|
-
5: "".concat((0, _getLocale.getLocale)("OKR_MyO_E_Priority"), "\uFF1A").concat((0, _getLocale.getLocale)("OKR_MyO_E_Butt_Verylow"))
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.getPriorityTextMapping = getPriorityTextMapping;
|
|
56
39
|
var TASK_NDOE_TYPE;
|
|
57
40
|
exports.TASK_NDOE_TYPE = TASK_NDOE_TYPE;
|
|
58
41
|
|
|
@@ -5,20 +5,16 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = _default;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var _titaUi = require("tita-ui");
|
|
15
|
-
|
|
16
14
|
var _dropSelector = _interopRequireWildcard(require("../../drop-selector"));
|
|
17
15
|
|
|
18
16
|
var _getLocale = require("../../../utils/getLocale");
|
|
19
17
|
|
|
20
|
-
var _constant = require("./constant");
|
|
21
|
-
|
|
22
18
|
require("./index.css");
|
|
23
19
|
|
|
24
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -39,8 +35,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
35
|
|
|
40
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
// eslint-disable-next-line react/prop-types
|
|
38
|
+
function _default(props) {
|
|
44
39
|
var onChange = props.onChange,
|
|
45
40
|
checked = props.checked,
|
|
46
41
|
hasAuth = props.hasAuth;
|
|
@@ -52,47 +47,25 @@ var EStatusDropdown = function EStatusDropdown(props) {
|
|
|
52
47
|
|
|
53
48
|
var onMenuClickHandler = function onMenuClickHandler(name) {
|
|
54
49
|
setStatus(name);
|
|
55
|
-
|
|
56
|
-
if (onChange) {
|
|
57
|
-
onChange(name);
|
|
58
|
-
}
|
|
50
|
+
onChange && onChange(name);
|
|
59
51
|
};
|
|
60
52
|
|
|
61
53
|
(0, _react.useEffect)(function () {
|
|
62
54
|
setStatus(checked);
|
|
63
55
|
}, [checked]);
|
|
64
|
-
|
|
65
|
-
if (!hasAuth) {
|
|
66
|
-
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
67
|
-
content: (0, _constant.EStatusClass2StatusTypeText)()[status]
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
-
style: {
|
|
70
|
-
color: '#89919F',
|
|
71
|
-
fontSize: 16,
|
|
72
|
-
marginRight: 4,
|
|
73
|
-
verticalAlign: 'baseline'
|
|
74
|
-
},
|
|
75
|
-
className: (0, _classnames["default"])(status)
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
56
|
return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
80
57
|
onChange: onMenuClickHandler,
|
|
81
58
|
checked: status,
|
|
82
59
|
canEdit: hasAuth,
|
|
83
|
-
trigger: /*#__PURE__*/_react["default"].createElement("
|
|
60
|
+
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
61
|
style: {
|
|
85
62
|
color: '#89919F',
|
|
86
63
|
fontSize: 16,
|
|
87
64
|
marginRight: 4,
|
|
88
|
-
verticalAlign: 'baseline'
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
92
|
-
content: (0, _constant.EStatusClass2StatusTypeText)()[status]
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
65
|
+
verticalAlign: 'baseline'
|
|
66
|
+
},
|
|
94
67
|
className: (0, _classnames["default"])(status)
|
|
95
|
-
})
|
|
68
|
+
})
|
|
96
69
|
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
97
70
|
name: "tu-icon-finished",
|
|
98
71
|
icon: "tu-icon-finished",
|
|
@@ -118,7 +91,4 @@ var EStatusDropdown = function EStatusDropdown(props) {
|
|
|
118
91
|
icon: "tu-icon-notstart",
|
|
119
92
|
exIconClass: "e-node-status-icon"
|
|
120
93
|
}, (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted')));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
var _default = EStatusDropdown;
|
|
124
|
-
exports["default"] = _default;
|
|
94
|
+
}
|
|
@@ -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()
|
|
156
|
-
data.status !== 5;
|
|
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
|
}
|
|
@@ -347,7 +347,7 @@ function ETaskNode(props) {
|
|
|
347
347
|
}, /*#__PURE__*/_react["default"].createElement(_eStatusDropdown["default"], {
|
|
348
348
|
onChange: onEStatusChangeHandler,
|
|
349
349
|
checked: _constant.EStatusStatus2ClassType[dataInfo.status],
|
|
350
|
-
hasAuth: hasEditAuth
|
|
350
|
+
hasAuth: hasEditAuth
|
|
351
351
|
})), isShowPriority && /*#__PURE__*/_react["default"].createElement("span", {
|
|
352
352
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority"))
|
|
353
353
|
}, /*#__PURE__*/_react["default"].createElement(_ePriority["default"], {
|
|
@@ -356,7 +356,7 @@ function ETaskNode(props) {
|
|
|
356
356
|
hasAuth: hasEditAuth,
|
|
357
357
|
status: data.status
|
|
358
358
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
359
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title")
|
|
359
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : "")),
|
|
360
360
|
onClick: handleShowTaskDetail
|
|
361
361
|
}, /*#__PURE__*/_react["default"].createElement(TooltipText, {
|
|
362
362
|
text: (0, _helpers.escapeHtml)(title),
|
|
@@ -376,7 +376,7 @@ function ETaskNode(props) {
|
|
|
376
376
|
avatar: user === null || user === void 0 ? void 0 : user.avatar,
|
|
377
377
|
extraCls: (isCancel || isGray) && "".concat(_precls["default"], "__e-project-node-gray")
|
|
378
378
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
379
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")
|
|
379
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")),
|
|
380
380
|
onClick: updateDateHandler
|
|
381
381
|
}, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
|
|
382
382
|
deadLine: dataInfo.deadLine,
|
|
@@ -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;
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
|
|
73
73
|
.titaui-task-tree__e-task-node-actions-user {
|
|
74
74
|
display: inline-block;
|
|
75
|
-
width:
|
|
76
|
-
margin-left:
|
|
75
|
+
width: 64px;
|
|
76
|
+
margin-left: 16px;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.titaui-task-tree__e-task-node-actions-date {
|
|
@@ -83,32 +83,27 @@
|
|
|
83
83
|
line-height: 18px;
|
|
84
84
|
display: inline-flex;
|
|
85
85
|
align-items: center;
|
|
86
|
+
justify-content: flex-end;
|
|
86
87
|
box-sizing: border-box;
|
|
87
|
-
width:
|
|
88
|
-
height:
|
|
88
|
+
width: 78px;
|
|
89
|
+
height: 26px;
|
|
89
90
|
padding: 4px;
|
|
90
91
|
text-align: left;
|
|
91
|
-
line-height:
|
|
92
|
-
margin-left: 28px;
|
|
92
|
+
line-height: 26px;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.titaui-task-tree__e-task-node-actions-date > span {
|
|
96
96
|
vertical-align: text-bottom;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.titaui-task-tree__e-task-node-actions-date--canedit:hover {
|
|
100
|
-
border-radius: 8px;
|
|
101
|
-
border: 1px solid #dfe3ea;
|
|
102
|
-
padding: 3px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
99
|
.titaui-task-tree__e-task-node-actions-progress {
|
|
106
100
|
position: relative;
|
|
107
101
|
top: 3px;
|
|
108
102
|
color: #89919f;
|
|
109
103
|
cursor: auto;
|
|
110
|
-
width:
|
|
111
|
-
margin-left:
|
|
104
|
+
width: 64px;
|
|
105
|
+
margin-left: 16px;
|
|
106
|
+
margin-right: 4px;
|
|
112
107
|
}
|
|
113
108
|
|
|
114
109
|
.titaui-task-tree__e-task-node-actions-progress .tooltip-text-wrapper {
|
|
@@ -228,8 +223,8 @@
|
|
|
228
223
|
|
|
229
224
|
.titaui-task-tree__e-project-node-actions-user {
|
|
230
225
|
display: inline-block;
|
|
231
|
-
width:
|
|
232
|
-
margin-left:
|
|
226
|
+
width: 64px;
|
|
227
|
+
margin-left: 16px;
|
|
233
228
|
}
|
|
234
229
|
|
|
235
230
|
.titaui-task-tree__e-project-node-actions-date {
|
|
@@ -239,32 +234,27 @@
|
|
|
239
234
|
line-height: 18px;
|
|
240
235
|
display: inline-flex;
|
|
241
236
|
align-items: center;
|
|
237
|
+
justify-content: flex-end;
|
|
242
238
|
box-sizing: border-box;
|
|
243
|
-
width:
|
|
244
|
-
height:
|
|
239
|
+
width: 78px;
|
|
240
|
+
height: 26px;
|
|
245
241
|
padding: 4px;
|
|
246
242
|
text-align: left;
|
|
247
|
-
line-height:
|
|
248
|
-
margin-left: 28px;
|
|
243
|
+
line-height: 26px;
|
|
249
244
|
}
|
|
250
245
|
|
|
251
246
|
.titaui-task-tree__e-project-node-actions-date > span {
|
|
252
247
|
vertical-align: text-bottom;
|
|
253
248
|
}
|
|
254
249
|
|
|
255
|
-
.titaui-task-tree__e-project-node-actions-date--canedit:hover {
|
|
256
|
-
border-radius: 8px;
|
|
257
|
-
border: 1px solid #dfe3ea;
|
|
258
|
-
padding: 3px;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
250
|
.titaui-task-tree__e-project-node-actions-progress {
|
|
262
251
|
position: relative;
|
|
263
252
|
top: 3px;
|
|
264
253
|
color: #89919f;
|
|
265
254
|
cursor: auto;
|
|
266
|
-
width:
|
|
267
|
-
margin-left:
|
|
255
|
+
width: 64px;
|
|
256
|
+
margin-left: 16px;
|
|
257
|
+
margin-right: 4px;
|
|
268
258
|
}
|
|
269
259
|
|
|
270
260
|
.titaui-task-tree__e-project-node-actions-progress .tooltip-text-wrapper {
|
|
@@ -79,42 +79,49 @@ var TimePicker = function TimePicker(props) {
|
|
|
79
79
|
var mInputRef = (0, _react.useRef)();
|
|
80
80
|
var minuteRef = (0, _react.useRef)((0, _moment["default"])(value || '00:00', timeFormat).format('mm'));
|
|
81
81
|
var triggerRef = (0, _react.useRef)();
|
|
82
|
+
var timerRef = (0, _react.useRef)();
|
|
82
83
|
var hours = (0, _utils.getHours)(hourStep);
|
|
83
84
|
var minutes = (0, _utils.getMinutes)(minuteStep);
|
|
84
85
|
|
|
85
86
|
var onTimeChange = function onTimeChange() {
|
|
86
|
-
|
|
87
|
+
onChange === null || onChange === void 0 ? void 0 : onChange("".concat(hourRef.current, ":").concat(minuteRef.current));
|
|
88
|
+
}; // const onInputClick = (type) => {
|
|
89
|
+
// clearTimeout(timerRef.current)
|
|
90
|
+
// timerRef.current = setTimeout(() => {
|
|
91
|
+
// if (type === 'hour') {
|
|
92
|
+
// hInputRef.current?.focus()
|
|
93
|
+
// } else {
|
|
94
|
+
// mInputRef.current?.focus()
|
|
95
|
+
// }
|
|
96
|
+
// setTimeSettingType(() => type)
|
|
97
|
+
// }, 0)
|
|
98
|
+
// }
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
var showSelectorPop = function showSelectorPop() {
|
|
102
|
+
return setVisible(true);
|
|
87
103
|
};
|
|
88
104
|
|
|
89
|
-
var
|
|
90
|
-
|
|
105
|
+
var onFocusHandler = function onFocusHandler(type) {
|
|
106
|
+
setTimeSettingType(function () {
|
|
91
107
|
return type;
|
|
92
108
|
});
|
|
93
109
|
};
|
|
94
110
|
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
minuteRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'minute', minuteRef.current);
|
|
110
|
-
break;
|
|
111
|
-
|
|
112
|
-
default:
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
onTimeChange();
|
|
117
|
-
}
|
|
111
|
+
var onHourInputBlur = function onHourInputBlur() {
|
|
112
|
+
// setHour((prevHour) => {
|
|
113
|
+
// const prevHour = hourRef.current;
|
|
114
|
+
// let nextHour = (Array(2).join("0") + prevHour).slice(-2);
|
|
115
|
+
// if (Number(prevHour) > Number(hours[hours.length - 1])) {
|
|
116
|
+
// nextHour = `0${prevHour.slice(0, 1)}`;
|
|
117
|
+
// }
|
|
118
|
+
// hourRef.current = nextHour;
|
|
119
|
+
// });
|
|
120
|
+
// if (timeSetType === "hour" && hInputRef.current) {
|
|
121
|
+
// hInputRef.current.focus();
|
|
122
|
+
// }
|
|
123
|
+
// onTimeChange();
|
|
124
|
+
setTimeSettingType('');
|
|
118
125
|
};
|
|
119
126
|
|
|
120
127
|
var onHourInputChange = function onHourInputChange(e) {
|
|
@@ -132,6 +139,32 @@ var TimePicker = function TimePicker(props) {
|
|
|
132
139
|
}
|
|
133
140
|
};
|
|
134
141
|
|
|
142
|
+
var onMinuteInputBlur = function onMinuteInputBlur() {
|
|
143
|
+
// setMinute((prevMinute) => {
|
|
144
|
+
// let nextMinute = minuteRef.current;
|
|
145
|
+
// minutes.forEach((m, i) => {
|
|
146
|
+
// const mNum = Number(m);
|
|
147
|
+
// const nextMinuteNum = Number(nextMinute);
|
|
148
|
+
// if (mNum === nextMinuteNum) {
|
|
149
|
+
// nextMinute = m;
|
|
150
|
+
// } else if (
|
|
151
|
+
// mNum < nextMinuteNum
|
|
152
|
+
// && Number(minutes[i + 1]) > nextMinuteNum
|
|
153
|
+
// ) {
|
|
154
|
+
// nextMinute = m;
|
|
155
|
+
// } else if (nextMinuteNum > Number(minutes[minutes.length - 1])) {
|
|
156
|
+
// nextMinute = "00";
|
|
157
|
+
// }
|
|
158
|
+
// });
|
|
159
|
+
// minuteRef.current = nextMinute;
|
|
160
|
+
// });
|
|
161
|
+
// if (timeSetType === "minute" && mInputRef.current) {
|
|
162
|
+
// mInputRef.current.focus();
|
|
163
|
+
// }
|
|
164
|
+
// onTimeChange();
|
|
165
|
+
setTimeSettingType('');
|
|
166
|
+
};
|
|
167
|
+
|
|
135
168
|
var onMinuteInputChange = function onMinuteInputChange(e) {
|
|
136
169
|
var v = e.target.value;
|
|
137
170
|
|
|
@@ -192,10 +225,39 @@ var TimePicker = function TimePicker(props) {
|
|
|
192
225
|
return currTime;
|
|
193
226
|
};
|
|
194
227
|
|
|
195
|
-
var
|
|
196
|
-
|
|
228
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
229
|
+
var keyCode = e.keyCode;
|
|
230
|
+
|
|
231
|
+
if ([_utils.KEYCODE.directionLeft, _utils.KEYCODE.directionRight].includes(keyCode)) {
|
|
232
|
+
setTimeSettingType(_utils.TargetMapByKeyCode[keyCode]);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if ([_utils.KEYCODE.directionUp, _utils.KEYCODE.directionDown].includes(keyCode)) {
|
|
236
|
+
switch (timeSetingtType) {
|
|
237
|
+
case 'hour':
|
|
238
|
+
hourRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'hour', hourRef.current);
|
|
239
|
+
break;
|
|
240
|
+
|
|
241
|
+
case 'minute':
|
|
242
|
+
minuteRef.current = setTimeOnKeyboardDirectionChange(keyCode, 'minute', minuteRef.current);
|
|
243
|
+
break;
|
|
244
|
+
|
|
245
|
+
default:
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
onTimeChange();
|
|
250
|
+
}
|
|
197
251
|
};
|
|
198
252
|
|
|
253
|
+
(0, _react.useEffect)(function () {
|
|
254
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
255
|
+
enableKeyBoard && timeSetingtType && document.addEventListener('keydown', handleKeyDown);
|
|
256
|
+
return function () {
|
|
257
|
+
clearTimeout(timerRef.current);
|
|
258
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
259
|
+
};
|
|
260
|
+
}, [timeSetingtType]);
|
|
199
261
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
200
262
|
className: _utils.TimePickerClass
|
|
201
263
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -206,30 +268,36 @@ var TimePicker = function TimePicker(props) {
|
|
|
206
268
|
onClick: function onClick() {
|
|
207
269
|
return !enableKeyBoard && showSelectorPop();
|
|
208
270
|
}
|
|
209
|
-
}, /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"],
|
|
271
|
+
}, /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
|
|
210
272
|
className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-input"), {
|
|
211
273
|
active: enableKeyBoard && timeSetingtType === 'hour'
|
|
212
274
|
}),
|
|
213
275
|
disabled: disabled,
|
|
214
276
|
maxLength: 2,
|
|
277
|
+
onBlur: onHourInputBlur,
|
|
215
278
|
onChange: onHourInputChange,
|
|
216
279
|
onClick: function onClick() {
|
|
217
|
-
return
|
|
280
|
+
return !enableKeyBoard && showSelectorPop();
|
|
281
|
+
},
|
|
282
|
+
onFocus: function onFocus() {
|
|
283
|
+
return onFocusHandler('hour');
|
|
218
284
|
},
|
|
219
|
-
onKeyDown: onKeyDownHandler,
|
|
220
285
|
ref: hInputRef,
|
|
221
286
|
value: hourRef.current
|
|
222
|
-
}
|
|
287
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, ":"), /*#__PURE__*/_react["default"].createElement(_timerPickerInput["default"], {
|
|
223
288
|
className: (0, _classnames["default"])("".concat(_utils.TimePickerClass, "-input"), {
|
|
224
289
|
active: enableKeyBoard && timeSetingtType === 'minute'
|
|
225
290
|
}),
|
|
226
291
|
disabled: disabled,
|
|
227
292
|
maxLength: 2,
|
|
293
|
+
onBlur: onMinuteInputBlur,
|
|
228
294
|
onChange: onMinuteInputChange,
|
|
229
295
|
onClick: function onClick() {
|
|
230
|
-
return
|
|
296
|
+
return !enableKeyBoard && showSelectorPop();
|
|
297
|
+
},
|
|
298
|
+
onFocus: function onFocus() {
|
|
299
|
+
return onFocusHandler('minute');
|
|
231
300
|
},
|
|
232
|
-
onKeyDown: onKeyDownHandler,
|
|
233
301
|
ref: mInputRef,
|
|
234
302
|
value: minuteRef.current
|
|
235
303
|
})), !disabled && /*#__PURE__*/_react["default"].createElement(_timePickerSelector["default"], _extends({
|
|
@@ -57,6 +57,11 @@ var TimePickerInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
57
57
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
+
var onFocusHandler = function onFocusHandler(e) {
|
|
61
|
+
setSelectionRange(0);
|
|
62
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
63
|
+
};
|
|
64
|
+
|
|
60
65
|
var onChangeHandler = function onChangeHandler(e) {
|
|
61
66
|
return onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
62
67
|
};
|
|
@@ -81,6 +86,7 @@ var TimePickerInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
81
86
|
maxLength: maxLength,
|
|
82
87
|
onClick: onClickHandler,
|
|
83
88
|
onChange: onChangeHandler,
|
|
89
|
+
onFocus: onFocusHandler,
|
|
84
90
|
ref: inputRef,
|
|
85
91
|
type: type,
|
|
86
92
|
value: value
|