@titaui/pc 1.11.4-0 → 1.11.4-3
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/dynamic/constant.js +2 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +54 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/index.js +17 -0
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +98 -0
- package/lib/components/form/form-fields/user/index.css +1 -1
- package/lib/components/form/index.js +10 -3
- package/lib/components/menus/export-modules/interview-menus/constant.js +23 -17
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
- package/lib/components/menus/export-modules/interview-menus/index.js +1 -2
- package/lib/components/picker/components/picker-trigger/index.css +16 -0
- package/lib/components/picker/components/picker-trigger/index.js +18 -9
- package/lib/components/picker/picker-panels.js +1 -1
- package/lib/components/picker/picker.js +12 -13
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +27 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +195 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +431 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +290 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +8 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +18 -0
- package/lib/components/time-picker/time-picker-selector.js +8 -12
- package/lib/components/time-picker/time-picker.js +117 -100
- package/lib/components/time-picker/utils.js +13 -2
- package/lib/index.js +8 -0
- package/package.json +5 -2
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/yarn-error.log +0 -22184
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.setTaskPriority = exports.cancelRel = void 0;
|
|
7
|
+
|
|
8
|
+
var _qs = _interopRequireDefault(require("qs"));
|
|
9
|
+
|
|
10
|
+
var _request = require("../../utils/request");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var updateTaskPrincipal = function updateTaskPrincipal(_ref) {
|
|
15
|
+
var taskId = _ref.taskId,
|
|
16
|
+
toUserId = _ref.toUserId;
|
|
17
|
+
return (0, _request.rpost)("v1")("task/UpdatePrincipal", {
|
|
18
|
+
task_id: taskId,
|
|
19
|
+
to_user_id: toUserId
|
|
20
|
+
}, {
|
|
21
|
+
headers: {
|
|
22
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
23
|
+
},
|
|
24
|
+
transformRequest: _qs["default"].stringify
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.updateTaskPrincipal = updateTaskPrincipal;
|
|
29
|
+
|
|
30
|
+
var updateTaskDate = function updateTaskDate(_ref2) {
|
|
31
|
+
var taskId = _ref2.taskId,
|
|
32
|
+
endDate = _ref2.endDate,
|
|
33
|
+
startDate = _ref2.startDate,
|
|
34
|
+
isLongTerm = _ref2.isLongTerm;
|
|
35
|
+
return (0, _request.rpost)("v1")("task/UpdateTaskDate?task_id=".concat(taskId), {
|
|
36
|
+
task_id: taskId,
|
|
37
|
+
Deadline: endDate,
|
|
38
|
+
StartDate: startDate,
|
|
39
|
+
IsLongTerm: isLongTerm
|
|
40
|
+
}, {
|
|
41
|
+
headers: {
|
|
42
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
43
|
+
},
|
|
44
|
+
transformRequest: _qs["default"].stringify
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.updateTaskDate = updateTaskDate;
|
|
49
|
+
|
|
50
|
+
var updateTaskStatus = function updateTaskStatus(_ref3) {
|
|
51
|
+
var taskId = _ref3.taskId,
|
|
52
|
+
status = _ref3.status;
|
|
53
|
+
return (0, _request.rput)("v1")("PlanV2/UpdateStatus?plan_item_id=".concat(taskId, "&Status=").concat(status), {
|
|
54
|
+
plan_item_id: taskId,
|
|
55
|
+
Status: status
|
|
56
|
+
}, {
|
|
57
|
+
headers: {
|
|
58
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
59
|
+
},
|
|
60
|
+
transformRequest: _qs["default"].stringify
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.updateTaskStatus = updateTaskStatus;
|
|
65
|
+
|
|
66
|
+
var cancelRel = function cancelRel(_ref4) {
|
|
67
|
+
var krId = _ref4.krId,
|
|
68
|
+
objType = _ref4.objType,
|
|
69
|
+
okrId = _ref4.okrId,
|
|
70
|
+
taskId = _ref4.taskId;
|
|
71
|
+
return (0, _request.rpost)("v1")("okr/task/cancelrel", {
|
|
72
|
+
krId: krId,
|
|
73
|
+
objType: objType,
|
|
74
|
+
okrId: okrId,
|
|
75
|
+
taskId: taskId
|
|
76
|
+
});
|
|
77
|
+
}; // priority:5 非常低 4 低 3 中 2 高 1 最高
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
exports.cancelRel = cancelRel;
|
|
81
|
+
|
|
82
|
+
var setTaskPriority = function setTaskPriority(_ref5) {
|
|
83
|
+
var taskId = _ref5.taskId,
|
|
84
|
+
priority = _ref5.priority;
|
|
85
|
+
return (0, _request.rpost)("v2")("task/SetTaskPriority?taskId=".concat(taskId, "&priority=").concat(priority), {});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.setTaskPriority = setTaskPriority;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TASK_NDOE_TYPE = exports.EStatusStatus2ClassType = exports.EStatusClass2StatusTypeText = exports.EStatusClass2StatusType = void 0;
|
|
7
|
+
|
|
8
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
+
|
|
10
|
+
var EStatusClass2StatusType = {
|
|
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
|
+
};
|
|
19
|
+
exports.EStatusClass2StatusType = EStatusClass2StatusType;
|
|
20
|
+
var EStatusStatus2ClassType = {
|
|
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-jiantou-right"
|
|
28
|
+
};
|
|
29
|
+
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
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")
|
|
37
|
+
};
|
|
38
|
+
exports.EStatusClass2StatusTypeText = EStatusClass2StatusTypeText;
|
|
39
|
+
var TASK_NDOE_TYPE;
|
|
40
|
+
exports.TASK_NDOE_TYPE = TASK_NDOE_TYPE;
|
|
41
|
+
|
|
42
|
+
(function (TASK_NDOE_TYPE) {
|
|
43
|
+
TASK_NDOE_TYPE[TASK_NDOE_TYPE["E_TASK"] = 0] = "E_TASK";
|
|
44
|
+
TASK_NDOE_TYPE[TASK_NDOE_TYPE["E_PROJECT"] = 1] = "E_PROJECT";
|
|
45
|
+
})(TASK_NDOE_TYPE || (exports.TASK_NDOE_TYPE = TASK_NDOE_TYPE = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _precls = _interopRequireDefault(require("../precls"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var EEmpty = function EEmpty(props) {
|
|
21
|
+
var index = props.index;
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
key: index,
|
|
24
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-empty-node"))
|
|
25
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_SupportedtaskProject"));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var _default = EEmpty;
|
|
29
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _precls = _interopRequireDefault(require("../precls"));
|
|
15
|
+
|
|
16
|
+
var _avatar = _interopRequireDefault(require("../../avatar"));
|
|
17
|
+
|
|
18
|
+
var _progress = _interopRequireDefault(require("../../progress"));
|
|
19
|
+
|
|
20
|
+
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
21
|
+
|
|
22
|
+
var _statusTime = _interopRequireDefault(require("../../status-time"));
|
|
23
|
+
|
|
24
|
+
var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
|
|
25
|
+
|
|
26
|
+
var _dialogConfirm = _interopRequireWildcard(require("../../dialog-confirm"));
|
|
27
|
+
|
|
28
|
+
var _requestApis = require("../request-apis");
|
|
29
|
+
|
|
30
|
+
var _getProcessColor = _interopRequireDefault(require("./get-process-color"));
|
|
31
|
+
|
|
32
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
33
|
+
|
|
34
|
+
var _platform = require("../../../utils/platform");
|
|
35
|
+
|
|
36
|
+
var _helpers = require("../../../utils/helpers");
|
|
37
|
+
|
|
38
|
+
var _auth = require("../../../utils/auth");
|
|
39
|
+
|
|
40
|
+
require("./index.css");
|
|
41
|
+
|
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
43
|
+
|
|
44
|
+
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); }
|
|
45
|
+
|
|
46
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
47
|
+
|
|
48
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
49
|
+
|
|
50
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
51
|
+
|
|
52
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
53
|
+
|
|
54
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
55
|
+
|
|
56
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
57
|
+
|
|
58
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
|
+
|
|
60
|
+
var TooltipText = _tooltip["default"].Text;
|
|
61
|
+
|
|
62
|
+
var _default = function _default(props) {
|
|
63
|
+
var _okrInfo$authority, _data$principalUser, _data$principalUser2;
|
|
64
|
+
|
|
65
|
+
var index = props.index,
|
|
66
|
+
title = props.title,
|
|
67
|
+
data = props.data,
|
|
68
|
+
createUserId = props.createUserId,
|
|
69
|
+
_props$hasProgress = props.hasProgress,
|
|
70
|
+
hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
|
|
71
|
+
_props$hasRelation = props.hasRelation,
|
|
72
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
|
|
73
|
+
_props$hasPrinciple = props.hasPrinciple,
|
|
74
|
+
hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
|
|
75
|
+
|
|
76
|
+
var _useState = (0, _react.useState)(false),
|
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
78
|
+
unConnectVisible = _useState2[0],
|
|
79
|
+
setUnConnectVisible = _useState2[1];
|
|
80
|
+
|
|
81
|
+
var _useState3 = (0, _react.useState)(data.status === 2),
|
|
82
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
83
|
+
isGray = _useState4[0]; // const { okrInfo } = useContext(CommonContext);
|
|
84
|
+
// const { refreshEList } = useContext(EListContext);
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
var okrInfo = {};
|
|
88
|
+
|
|
89
|
+
var refreshEList = function refreshEList() {};
|
|
90
|
+
|
|
91
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
92
|
+
var hasRelativeAuth = new _auth.KRAuth({
|
|
93
|
+
user: data.user,
|
|
94
|
+
createUserId: createUserId
|
|
95
|
+
}).hasAuth() || new _auth.OAuth({
|
|
96
|
+
principalUser: okrInfo.principalUser,
|
|
97
|
+
createUserId: okrInfo.createUserId
|
|
98
|
+
}).hasAuth();
|
|
99
|
+
|
|
100
|
+
var onSureUnConnectHandler = function onSureUnConnectHandler() {
|
|
101
|
+
(0, _requestApis.cancelRel)({
|
|
102
|
+
krId: data.mileStoneId,
|
|
103
|
+
objType: data.objType,
|
|
104
|
+
okrId: okrInfo.workId,
|
|
105
|
+
taskId: data.id
|
|
106
|
+
}).then(function (resp) {
|
|
107
|
+
if (resp.Code === 1) {
|
|
108
|
+
refreshEList();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
setUnConnectVisible(false);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var openProjectDetail = function openProjectDetail() {
|
|
115
|
+
if ((0, _platform.isPlatform)("dd")) {
|
|
116
|
+
_drawerManager["default"].close();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.id)));
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var workApplyType = data.workApplyType,
|
|
123
|
+
workApplyStatus = data.workApplyStatus;
|
|
124
|
+
var isCreate = (workApplyStatus === 1 || workApplyStatus === 3 || workApplyStatus === 4) && workApplyType === 48;
|
|
125
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
126
|
+
key: index,
|
|
127
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node"))
|
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
129
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-prefix"))
|
|
130
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
|
+
className: "tu-icon-Add-xiangmu"
|
|
132
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
133
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title ")),
|
|
134
|
+
onClick: openProjectDetail
|
|
135
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-name "))
|
|
137
|
+
}, /*#__PURE__*/_react["default"].createElement(TooltipText, {
|
|
138
|
+
text: (0, _helpers.escapeHtml)(title),
|
|
139
|
+
isPercent: true
|
|
140
|
+
})), isCreate && /*#__PURE__*/_react["default"].createElement("span", {
|
|
141
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-title-approvaling"))
|
|
142
|
+
}, (0, _getLocale.getLocale)("Pro_MyS_Establishment"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
143
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions"))
|
|
144
|
+
}, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
|
|
145
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-user"))
|
|
146
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
|
|
147
|
+
name: data === null || data === void 0 ? void 0 : (_data$principalUser = data.principalUser) === null || _data$principalUser === void 0 ? void 0 : _data$principalUser.name,
|
|
148
|
+
id: data === null || data === void 0 ? void 0 : (_data$principalUser2 = data.principalUser) === null || _data$principalUser2 === void 0 ? void 0 : _data$principalUser2.userId,
|
|
149
|
+
width: 64,
|
|
150
|
+
extraCls: isGray && "".concat(_precls["default"], "__e-project-node-gray")
|
|
151
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
152
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-date"))
|
|
153
|
+
}, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
|
|
154
|
+
deadLine: data.deadLine,
|
|
155
|
+
isComplete: data.status === 2
|
|
156
|
+
})), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
|
|
157
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-progress ").concat(isGray && "".concat(_precls["default"], "__e-project-node-gray")))
|
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
|
|
159
|
+
size: 22,
|
|
160
|
+
width: 3,
|
|
161
|
+
percent: data.progress,
|
|
162
|
+
linear: true,
|
|
163
|
+
linearId: data.taskId,
|
|
164
|
+
linearStartColor: (0, _getProcessColor["default"])(data.riskLevel, "linearStartColor", data.status),
|
|
165
|
+
linearEndColor: (0, _getProcessColor["default"])(data.riskLevel, "linearEndColor", data.status),
|
|
166
|
+
backgroundColor: (0, _getProcessColor["default"])(data.riskLevel, "backgroundColor", data.status)
|
|
167
|
+
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
168
|
+
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
|
|
169
|
+
placement: "top"
|
|
170
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
171
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-project-node-actions-connect")),
|
|
172
|
+
onClick: function onClick() {
|
|
173
|
+
return setUnConnectVisible(true);
|
|
174
|
+
}
|
|
175
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
176
|
+
className: "tu-icon-quxiaoguanlian e-node-status-icon"
|
|
177
|
+
}))) : null), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
178
|
+
visible: unConnectVisible,
|
|
179
|
+
type: "warning"
|
|
180
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
181
|
+
type: "title"
|
|
182
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_Cancelass")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
183
|
+
type: "content"
|
|
184
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_TitemnotO")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
185
|
+
type: "button",
|
|
186
|
+
onClick: function onClick() {
|
|
187
|
+
return setUnConnectVisible(false);
|
|
188
|
+
}
|
|
189
|
+
}, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
190
|
+
type: "button",
|
|
191
|
+
onClick: onSureUnConnectHandler
|
|
192
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _dropSelector = _interopRequireWildcard(require("../../drop-selector"));
|
|
15
|
+
|
|
16
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
function _default(props) {
|
|
39
|
+
var onChange = props.onChange,
|
|
40
|
+
checked = props.checked,
|
|
41
|
+
hasAuth = props.hasAuth;
|
|
42
|
+
|
|
43
|
+
var _useState = (0, _react.useState)("tu-icon-notstart"),
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
+
status = _useState2[0],
|
|
46
|
+
setStatus = _useState2[1];
|
|
47
|
+
|
|
48
|
+
var onMenuClickHandler = function onMenuClickHandler(name) {
|
|
49
|
+
setStatus(name);
|
|
50
|
+
onChange && onChange(name);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
(0, _react.useEffect)(function () {
|
|
54
|
+
setStatus(checked);
|
|
55
|
+
}, [checked]);
|
|
56
|
+
return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
57
|
+
onChange: onMenuClickHandler,
|
|
58
|
+
checked: status,
|
|
59
|
+
canEdit: hasAuth,
|
|
60
|
+
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
+
style: {
|
|
62
|
+
color: "#89919F",
|
|
63
|
+
fontSize: 14,
|
|
64
|
+
marginRight: 4,
|
|
65
|
+
verticalAlign: "baseline"
|
|
66
|
+
},
|
|
67
|
+
className: (0, _classnames["default"])(status)
|
|
68
|
+
})
|
|
69
|
+
}, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
70
|
+
name: "tu-icon-finished",
|
|
71
|
+
icon: "tu-icon-finished",
|
|
72
|
+
exIconClass: "e-node-status-icon"
|
|
73
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
74
|
+
name: "tu-icon-running",
|
|
75
|
+
icon: "tu-icon-running",
|
|
76
|
+
exIconClass: "e-node-status-icon"
|
|
77
|
+
}, (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
78
|
+
name: "tu-icon-canceled",
|
|
79
|
+
icon: "tu-icon-canceled",
|
|
80
|
+
exIconClass: "e-node-status-icon"
|
|
81
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
82
|
+
name: "tu-icon-deferred",
|
|
83
|
+
icon: "tu-icon-deferred",
|
|
84
|
+
exIconClass: "e-node-status-icon"
|
|
85
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
86
|
+
name: "tu-icon-paused",
|
|
87
|
+
icon: "tu-icon-paused",
|
|
88
|
+
exIconClass: "e-node-status-icon"
|
|
89
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended")), /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
|
|
90
|
+
name: "tu-icon-notstart",
|
|
91
|
+
icon: "tu-icon-notstart",
|
|
92
|
+
exIconClass: "e-node-status-icon"
|
|
93
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted")));
|
|
94
|
+
}
|