@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,431 @@
|
|
|
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 _toast = _interopRequireDefault(require("../../toast"));
|
|
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 _ePriority = _interopRequireDefault(require("../../e-priority"));
|
|
27
|
+
|
|
28
|
+
var _dialogConfirm = _interopRequireWildcard(require("../../dialog-confirm"));
|
|
29
|
+
|
|
30
|
+
var _eStatusDropdown = _interopRequireDefault(require("./e-status-dropdown"));
|
|
31
|
+
|
|
32
|
+
var _requestApis = require("../request-apis");
|
|
33
|
+
|
|
34
|
+
var _constant = require("./constant");
|
|
35
|
+
|
|
36
|
+
var _getProcessColor = _interopRequireDefault(require("./get-process-color"));
|
|
37
|
+
|
|
38
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
39
|
+
|
|
40
|
+
var _platform = require("../../../utils/platform");
|
|
41
|
+
|
|
42
|
+
var _bsGlobal = require("../../../utils/bs-global");
|
|
43
|
+
|
|
44
|
+
var _helpers = require("../../../utils/helpers");
|
|
45
|
+
|
|
46
|
+
var _auth = require("../../../utils/auth");
|
|
47
|
+
|
|
48
|
+
var _precls = _interopRequireDefault(require("../precls"));
|
|
49
|
+
|
|
50
|
+
require("./index.css");
|
|
51
|
+
|
|
52
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
|
+
|
|
54
|
+
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); }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
59
|
+
|
|
60
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
61
|
+
|
|
62
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
63
|
+
|
|
64
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
65
|
+
|
|
66
|
+
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; }
|
|
67
|
+
|
|
68
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
69
|
+
|
|
70
|
+
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."); }
|
|
71
|
+
|
|
72
|
+
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); }
|
|
73
|
+
|
|
74
|
+
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; }
|
|
75
|
+
|
|
76
|
+
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; }
|
|
77
|
+
|
|
78
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
79
|
+
|
|
80
|
+
var TooltipText = _tooltip["default"].Text; // status=3 已过期 status=2 已完成
|
|
81
|
+
|
|
82
|
+
function ETaskNode(props) {
|
|
83
|
+
var _okrInfo$authority;
|
|
84
|
+
|
|
85
|
+
var index = props.index,
|
|
86
|
+
title = props.title,
|
|
87
|
+
data = props.data,
|
|
88
|
+
_props$createUserId = props.createUserId,
|
|
89
|
+
createUserId = _props$createUserId === void 0 ? {} : _props$createUserId,
|
|
90
|
+
_props$krUser = props.krUser,
|
|
91
|
+
krUser = _props$krUser === void 0 ? {} : _props$krUser,
|
|
92
|
+
_props$hasProgress = props.hasProgress,
|
|
93
|
+
hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
|
|
94
|
+
_props$hasRelation = props.hasRelation,
|
|
95
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
|
|
96
|
+
_props$isPushScreen = props.isPushScreen,
|
|
97
|
+
isPushScreen = _props$isPushScreen === void 0 ? false : _props$isPushScreen,
|
|
98
|
+
_props$hasPrinciple = props.hasPrinciple,
|
|
99
|
+
hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
|
|
100
|
+
|
|
101
|
+
var _useState = (0, _react.useState)(false),
|
|
102
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
103
|
+
unConnectVisible = _useState2[0],
|
|
104
|
+
setUnConnectVisible = _useState2[1];
|
|
105
|
+
|
|
106
|
+
var _useState3 = (0, _react.useState)(data.progress),
|
|
107
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
108
|
+
progress = _useState4[0];
|
|
109
|
+
|
|
110
|
+
var _useState5 = (0, _react.useState)(data.principalUser || {}),
|
|
111
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
112
|
+
user = _useState6[0],
|
|
113
|
+
setUser = _useState6[1];
|
|
114
|
+
|
|
115
|
+
var _useState7 = (0, _react.useState)(data.status === 2),
|
|
116
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
117
|
+
isGray = _useState8[0],
|
|
118
|
+
setIsGray = _useState8[1];
|
|
119
|
+
|
|
120
|
+
var _useState9 = (0, _react.useState)(data.status === 4),
|
|
121
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
122
|
+
isCancel = _useState10[0],
|
|
123
|
+
setIsCancel = _useState10[1];
|
|
124
|
+
|
|
125
|
+
var _useState11 = (0, _react.useState)("".concat(data.priority)),
|
|
126
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
127
|
+
priority = _useState12[0],
|
|
128
|
+
setPriority = _useState12[1];
|
|
129
|
+
|
|
130
|
+
var _useState13 = (0, _react.useState)({
|
|
131
|
+
deadLine: data.deadLine,
|
|
132
|
+
isLongTerm: data.isLongTerm,
|
|
133
|
+
status: data.status,
|
|
134
|
+
riskLevel: data.riskLevel
|
|
135
|
+
}),
|
|
136
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
137
|
+
dataInfo = _useState14[0],
|
|
138
|
+
setDataInfo = _useState14[1];
|
|
139
|
+
|
|
140
|
+
var _useState15 = (0, _react.useState)(function () {
|
|
141
|
+
return (0, _bsGlobal.getBSGlobal)("TaskAdvancedSetting").TaskFunctionSetting.TaskPriority;
|
|
142
|
+
}),
|
|
143
|
+
_useState16 = _slicedToArray(_useState15, 1),
|
|
144
|
+
isShowPriority = _useState16[0]; // const { okrInfo } = useContext(CommonContext);
|
|
145
|
+
// const { refreshEList } = useContext(EListContext);
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
var okrInfo = {};
|
|
149
|
+
|
|
150
|
+
var refreshEList = function refreshEList() {}; // extraEditAuth = new KRAuth({ user: krUser, createUserId }).hasAuth()
|
|
151
|
+
// || new OAuth({
|
|
152
|
+
// principalUser: okrInfo.principalUser,
|
|
153
|
+
// createUserId: okrInfo.createUserId,
|
|
154
|
+
// }).hasAuth()
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
var hasEditAuth = (new _auth.EAuth({
|
|
158
|
+
principalUser: data.principalUser,
|
|
159
|
+
user: data.user
|
|
160
|
+
}).hasAuth() || extraEditAuth) && data.status !== 5;
|
|
161
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
162
|
+
var hasRelativeAuth = new _auth.KRAuth({
|
|
163
|
+
user: krUser,
|
|
164
|
+
createUserId: createUserId
|
|
165
|
+
}).hasAuth() || new _auth.OAuth({
|
|
166
|
+
principalUser: okrInfo.principalUser,
|
|
167
|
+
createUserId: okrInfo.createUserId
|
|
168
|
+
}).hasAuth();
|
|
169
|
+
|
|
170
|
+
var onEditUserHandler = function onEditUserHandler(_ref) {
|
|
171
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
172
|
+
user = _ref2[0];
|
|
173
|
+
|
|
174
|
+
(0, _requestApis.updateTaskPrincipal)({
|
|
175
|
+
taskId: data.taskId,
|
|
176
|
+
toUserId: Number(user.id)
|
|
177
|
+
}).then(function (data) {
|
|
178
|
+
if (data.Code === 1) {
|
|
179
|
+
setUser(user.data);
|
|
180
|
+
|
|
181
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
182
|
+
canClose: false
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
_toast["default"].Error(data.Message, {
|
|
186
|
+
canClose: false
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
})["catch"](function () {
|
|
190
|
+
_toast["default"].Error("网络异常", {
|
|
191
|
+
canClose: false
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
var onEStatusChangeHandler = function onEStatusChangeHandler(statusType) {
|
|
197
|
+
(0, _requestApis.updateTaskStatus)({
|
|
198
|
+
taskId: data.taskId,
|
|
199
|
+
status: _constant.EStatusClass2StatusType[statusType]
|
|
200
|
+
}).then(function (resp) {
|
|
201
|
+
if (resp.Code === 1) {
|
|
202
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
203
|
+
canClose: false
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
|
|
207
|
+
status: _constant.EStatusClass2StatusType[statusType]
|
|
208
|
+
}));
|
|
209
|
+
setIsGray(_constant.EStatusClass2StatusType[statusType] === 2);
|
|
210
|
+
setIsCancel(_constant.EStatusClass2StatusType[statusType] === 4);
|
|
211
|
+
} else {
|
|
212
|
+
_toast["default"].Error(resp.Message, {
|
|
213
|
+
canClose: false
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
})["catch"](function () {
|
|
217
|
+
_toast["default"].Error("网络异常", {
|
|
218
|
+
canClose: false
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
var onSureUnConnectHandler = function onSureUnConnectHandler() {
|
|
224
|
+
(0, _requestApis.cancelRel)({
|
|
225
|
+
krId: data.mileStoneId,
|
|
226
|
+
objType: data.objType,
|
|
227
|
+
okrId: okrInfo.workId,
|
|
228
|
+
taskId: data.taskId
|
|
229
|
+
}).then(function (resp) {
|
|
230
|
+
if (resp.Code === 1) {
|
|
231
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
232
|
+
canClose: false
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
refreshEList();
|
|
236
|
+
} else {
|
|
237
|
+
_toast["default"].Error(resp.Message, {
|
|
238
|
+
canClose: false
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
})["catch"](function () {
|
|
242
|
+
_toast["default"].Error("网络异常", {
|
|
243
|
+
canClose: false
|
|
244
|
+
});
|
|
245
|
+
})["finally"](setUnConnectVisible(false));
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
var updateDateHandler = /*#__PURE__*/function () {
|
|
249
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
|
|
250
|
+
var res;
|
|
251
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
252
|
+
while (1) {
|
|
253
|
+
switch (_context.prev = _context.next) {
|
|
254
|
+
case 0:
|
|
255
|
+
if (!(!hasEditAuth || dataInfo.status === 2)) {
|
|
256
|
+
_context.next = 2;
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return _context.abrupt("return");
|
|
261
|
+
|
|
262
|
+
case 2:
|
|
263
|
+
_context.next = 4;
|
|
264
|
+
return window.openDatePicker(e.target, {
|
|
265
|
+
isShowCycleView: false,
|
|
266
|
+
rangepickerOptions: {
|
|
267
|
+
startDate: dataInfo.startDate,
|
|
268
|
+
endDate: dataInfo.deadLine
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
case 4:
|
|
273
|
+
res = _context.sent;
|
|
274
|
+
_context.next = 7;
|
|
275
|
+
return (0, _requestApis.updateTaskDate)({
|
|
276
|
+
taskId: data.taskId,
|
|
277
|
+
startDate: res.startDate,
|
|
278
|
+
endDate: res.endDate,
|
|
279
|
+
isLongTerm: res.isLongTerm
|
|
280
|
+
}).then(function (resp) {
|
|
281
|
+
if (resp.Code === 1) {
|
|
282
|
+
setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
|
|
283
|
+
deadLine: resp.Data.deadLine,
|
|
284
|
+
isLongTerm: resp.Data.isLongTerm,
|
|
285
|
+
status: resp.Data.status
|
|
286
|
+
}));
|
|
287
|
+
|
|
288
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
289
|
+
canClose: false
|
|
290
|
+
});
|
|
291
|
+
} else {
|
|
292
|
+
_toast["default"].Error(resp.Message, {
|
|
293
|
+
canClose: false
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
})["catch"](function () {
|
|
297
|
+
_toast["default"].Error("网络异常", {
|
|
298
|
+
canClose: false
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
case 7:
|
|
303
|
+
case "end":
|
|
304
|
+
return _context.stop();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}, _callee);
|
|
308
|
+
}));
|
|
309
|
+
|
|
310
|
+
return function updateDateHandler(_x) {
|
|
311
|
+
return _ref3.apply(this, arguments);
|
|
312
|
+
};
|
|
313
|
+
}();
|
|
314
|
+
|
|
315
|
+
var onEPriorityChangeHandler = function onEPriorityChangeHandler(selectPriority) {
|
|
316
|
+
(0, _requestApis.setTaskPriority)({
|
|
317
|
+
taskId: data.taskId,
|
|
318
|
+
priority: selectPriority
|
|
319
|
+
}).then(function (resp) {
|
|
320
|
+
if (resp.Code === 1) {
|
|
321
|
+
_toast["default"].Success(resp.Message);
|
|
322
|
+
|
|
323
|
+
setPriority(selectPriority);
|
|
324
|
+
} else {
|
|
325
|
+
_toast["default"].Error(resp.Message);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
var handleShowTaskDetail = function handleShowTaskDetail() {
|
|
331
|
+
if ((0, _platform.isPlatform)("dd")) {
|
|
332
|
+
_drawerManager["default"].close();
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (isPushScreen) {
|
|
336
|
+
var _window$Talent, _window$Talent2;
|
|
337
|
+
|
|
338
|
+
(_window$Talent = window.Talent) === null || _window$Talent === void 0 ? void 0 : _window$Talent.app.vent.off("global-pull-screen:closed:".concat(data.taskId));
|
|
339
|
+
(_window$Talent2 = window.Talent) === null || _window$Talent2 === void 0 ? void 0 : _window$Talent2.app.vent.on("global-pull-screen:closed:".concat(data.taskId), function () {
|
|
340
|
+
refreshEList && refreshEList();
|
|
341
|
+
}); // 任务:打开推屏
|
|
342
|
+
|
|
343
|
+
window.Talent.app.vent.trigger("global-pull-screen", data.taskId, "task");
|
|
344
|
+
} else {
|
|
345
|
+
window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
350
|
+
key: index,
|
|
351
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node"))
|
|
352
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
353
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-prefix"))
|
|
354
|
+
}, /*#__PURE__*/_react["default"].createElement(_eStatusDropdown["default"], {
|
|
355
|
+
onChange: onEStatusChangeHandler,
|
|
356
|
+
checked: _constant.EStatusStatus2ClassType[dataInfo.status],
|
|
357
|
+
hasAuth: hasEditAuth
|
|
358
|
+
})), isShowPriority && /*#__PURE__*/_react["default"].createElement("span", {
|
|
359
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority"))
|
|
360
|
+
}, /*#__PURE__*/_react["default"].createElement(_ePriority["default"], {
|
|
361
|
+
onChange: onEPriorityChangeHandler,
|
|
362
|
+
checked: priority,
|
|
363
|
+
hasAuth: hasEditAuth,
|
|
364
|
+
status: data.status
|
|
365
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
366
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : "")),
|
|
367
|
+
onClick: handleShowTaskDetail
|
|
368
|
+
}, /*#__PURE__*/_react["default"].createElement(TooltipText, {
|
|
369
|
+
text: (0, _helpers.escapeHtml)(title),
|
|
370
|
+
isPercent: true
|
|
371
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
372
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions"))
|
|
373
|
+
}, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
|
|
374
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-user"))
|
|
375
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
|
|
376
|
+
name: user === null || user === void 0 ? void 0 : user.name,
|
|
377
|
+
id: user === null || user === void 0 ? void 0 : user.userId,
|
|
378
|
+
width: 64,
|
|
379
|
+
editable: dataInfo.status !== 2 && hasEditAuth,
|
|
380
|
+
onEditUser: onEditUserHandler,
|
|
381
|
+
isGetRoot: true,
|
|
382
|
+
extraCls: (isCancel || isGray) && "".concat(_precls["default"], "__e-project-node-gray")
|
|
383
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
384
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")),
|
|
385
|
+
onClick: updateDateHandler
|
|
386
|
+
}, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
|
|
387
|
+
deadLine: dataInfo.deadLine,
|
|
388
|
+
isLongTerm: dataInfo.isLongTerm,
|
|
389
|
+
isCancel: dataInfo.status === 4,
|
|
390
|
+
isComplete: dataInfo.status === 2
|
|
391
|
+
})), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
|
|
392
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
|
|
393
|
+
}, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
|
|
394
|
+
size: 22,
|
|
395
|
+
width: 3,
|
|
396
|
+
percent: progress,
|
|
397
|
+
linear: true,
|
|
398
|
+
linearId: data.taskId,
|
|
399
|
+
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
|
|
400
|
+
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
|
|
401
|
+
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
|
|
402
|
+
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
403
|
+
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
|
|
404
|
+
placement: "top"
|
|
405
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
406
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-connect")),
|
|
407
|
+
onClick: function onClick() {
|
|
408
|
+
return setUnConnectVisible(true);
|
|
409
|
+
}
|
|
410
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
411
|
+
className: "tu-icon-quxiaoguanlian e-node-status-icon"
|
|
412
|
+
}))) : null), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
413
|
+
visible: unConnectVisible,
|
|
414
|
+
type: "warning"
|
|
415
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
416
|
+
type: "title"
|
|
417
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_Cancelass")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
418
|
+
type: "content"
|
|
419
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_TtasknotO")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
420
|
+
type: "button",
|
|
421
|
+
onClick: function onClick() {
|
|
422
|
+
return setUnConnectVisible(false);
|
|
423
|
+
}
|
|
424
|
+
}, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
425
|
+
type: "button",
|
|
426
|
+
onClick: onSureUnConnectHandler
|
|
427
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
var _default = ETaskNode;
|
|
431
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var getProcessColor = function getProcessColor(level, type, status) {
|
|
9
|
+
var cancelColor = {
|
|
10
|
+
linearStartColor: "#e1e5ec",
|
|
11
|
+
linearEndColor: "#bfc7d5",
|
|
12
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
if (status === 2) {
|
|
16
|
+
return cancelColor[type];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (status === 4) {
|
|
20
|
+
return cancelColor[type];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var processColor = {
|
|
24
|
+
1: {
|
|
25
|
+
riskLevel: 1,
|
|
26
|
+
linearStartColor: "#9fbfff",
|
|
27
|
+
linearEndColor: "#2879ff",
|
|
28
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
29
|
+
},
|
|
30
|
+
2: {
|
|
31
|
+
riskLevel: 2,
|
|
32
|
+
linearStartColor: "#9fbfff",
|
|
33
|
+
linearEndColor: "#2879ff",
|
|
34
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
35
|
+
},
|
|
36
|
+
3: {
|
|
37
|
+
riskLevel: 3,
|
|
38
|
+
linearStartColor: "#FFA5A5",
|
|
39
|
+
linearEndColor: "#F05E5E",
|
|
40
|
+
backgroundColor: "rgba(222, 89, 89, 0.1)"
|
|
41
|
+
},
|
|
42
|
+
4: {
|
|
43
|
+
riskLevel: 4,
|
|
44
|
+
linearStartColor: "#93eed2",
|
|
45
|
+
linearEndColor: "#5ad8a6",
|
|
46
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
47
|
+
},
|
|
48
|
+
5: {
|
|
49
|
+
riskLevel: 5,
|
|
50
|
+
linearStartColor: "#93eed2",
|
|
51
|
+
linearEndColor: "#5ad8a6",
|
|
52
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var color = processColor["".concat(level)];
|
|
56
|
+
if (level === 0) color = processColor["1"];
|
|
57
|
+
if (!color) return {};
|
|
58
|
+
return color[type];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var _default = getProcessColor;
|
|
62
|
+
exports["default"] = _default;
|