@titaui/pc 1.10.6-3.beta-6 → 1.10.6-3.beta-7
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/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +18 -3
- package/lib/components/okr-detail/e-list/index.js +13 -4
- package/package.json +1 -1
|
@@ -44,6 +44,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
44
44
|
var hasProject = (0, _bsGlobal.hasWebHead)("project");
|
|
45
45
|
|
|
46
46
|
var EKrNode = function EKrNode(props) {
|
|
47
|
+
var _okrInfo$authority;
|
|
48
|
+
|
|
47
49
|
var index = props.index,
|
|
48
50
|
title = props.title,
|
|
49
51
|
data = props.data,
|
|
@@ -61,7 +63,7 @@ var EKrNode = function EKrNode(props) {
|
|
|
61
63
|
var _useContext2 = (0, _react.useContext)(_context2.EListContext),
|
|
62
64
|
refreshEList = _useContext2.refreshEList;
|
|
63
65
|
|
|
64
|
-
var isParticipant = okrInfo.authority.roleRelation && okrInfo.authority.roleRelation.roleType === 2;
|
|
66
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
65
67
|
var hasRelativeAuth;
|
|
66
68
|
|
|
67
69
|
if (isOTask) {
|
|
@@ -62,7 +62,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
62
62
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
63
|
|
|
64
64
|
function _default(props) {
|
|
65
|
-
var _data$principalUser, _data$principalUser2;
|
|
65
|
+
var _okrInfo$authority, _data$principalUser, _data$principalUser2;
|
|
66
66
|
|
|
67
67
|
var index = props.index,
|
|
68
68
|
title = props.title,
|
|
@@ -84,7 +84,7 @@ function _default(props) {
|
|
|
84
84
|
var _useContext2 = (0, _react.useContext)(_context.EListContext),
|
|
85
85
|
refreshEList = _useContext2.refreshEList;
|
|
86
86
|
|
|
87
|
-
var isParticipant = okrInfo.authority.roleRelation && okrInfo.authority.roleRelation.roleType === 2;
|
|
87
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
88
88
|
var hasRelativeAuth = new _auth.KRAuth({
|
|
89
89
|
user: data.user,
|
|
90
90
|
createUserId: createUserId
|
|
@@ -82,6 +82,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
82
82
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
83
83
|
|
|
84
84
|
function _default(props) {
|
|
85
|
+
var _okrInfo$authority;
|
|
86
|
+
|
|
85
87
|
var index = props.index,
|
|
86
88
|
title = props.title,
|
|
87
89
|
data = props.data,
|
|
@@ -147,7 +149,7 @@ function _default(props) {
|
|
|
147
149
|
principalUser: okrInfo.principalUser,
|
|
148
150
|
createUserId: okrInfo.createUserId
|
|
149
151
|
}).hasAuth()) && data.status !== 5;
|
|
150
|
-
var isParticipant = okrInfo.authority.roleRelation && okrInfo.authority.roleRelation.roleType === 2;
|
|
152
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
151
153
|
var hasRelativeAuth = new _auth.KRAuth({
|
|
152
154
|
user: data.user,
|
|
153
155
|
createUserId: createUserId
|
|
@@ -83,6 +83,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
83
83
|
|
|
84
84
|
// status=3 已过期 status=2 已完成
|
|
85
85
|
function ETaskNode(props) {
|
|
86
|
+
var _okrInfo$authority;
|
|
87
|
+
|
|
86
88
|
var index = props.index,
|
|
87
89
|
title = props.title,
|
|
88
90
|
data = props.data,
|
|
@@ -91,7 +93,9 @@ function ETaskNode(props) {
|
|
|
91
93
|
_props$hasProgress = props.hasProgress,
|
|
92
94
|
hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
|
|
93
95
|
_props$hasRelation = props.hasRelation,
|
|
94
|
-
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation
|
|
96
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
|
|
97
|
+
_props$isPushScreen = props.isPushScreen,
|
|
98
|
+
isPushScreen = _props$isPushScreen === void 0 ? false : _props$isPushScreen;
|
|
95
99
|
|
|
96
100
|
var _useState = (0, _react.useState)(false),
|
|
97
101
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -154,7 +158,7 @@ function ETaskNode(props) {
|
|
|
154
158
|
principalUser: okrInfo.principalUser,
|
|
155
159
|
createUserId: okrInfo.createUserId
|
|
156
160
|
}).hasAuth()) && data.status !== 5;
|
|
157
|
-
var isParticipant = okrInfo.authority.roleRelation && okrInfo.authority.roleRelation.roleType === 2;
|
|
161
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
158
162
|
var hasRelativeAuth = new _auth.KRAuth({
|
|
159
163
|
user: krUser,
|
|
160
164
|
createUserId: createUserId
|
|
@@ -328,7 +332,18 @@ function ETaskNode(props) {
|
|
|
328
332
|
_drawerManager["default"].close();
|
|
329
333
|
}
|
|
330
334
|
|
|
331
|
-
|
|
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
|
+
}
|
|
332
347
|
};
|
|
333
348
|
|
|
334
349
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -5,7 +5,7 @@ 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"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -51,7 +51,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
51
51
|
|
|
52
52
|
var preCls = "okr-detail-e";
|
|
53
53
|
|
|
54
|
-
function
|
|
54
|
+
function Elist(props, ref) {
|
|
55
55
|
var okrId = props.okrId,
|
|
56
56
|
_props$hasSearch = props.hasSearch,
|
|
57
57
|
hasSearch = _props$hasSearch === void 0 ? true : _props$hasSearch,
|
|
@@ -153,7 +153,6 @@ function _default(props) {
|
|
|
153
153
|
IsDateFilter: IsDateFilter
|
|
154
154
|
})
|
|
155
155
|
}).then(function (krs) {
|
|
156
|
-
debugger;
|
|
157
156
|
var formatKrs = formatEList(krs, okrId, (0, _util.getIfInitCondition)(selectName, checkedStatus, selectUsers, searchKey));
|
|
158
157
|
var expandedKrEs = (formatKrs.krsEList || []).map(function (it) {
|
|
159
158
|
return it.key;
|
|
@@ -169,6 +168,11 @@ function _default(props) {
|
|
|
169
168
|
});
|
|
170
169
|
};
|
|
171
170
|
|
|
171
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
172
|
+
return {
|
|
173
|
+
getKrEsData: getKrEsData
|
|
174
|
+
};
|
|
175
|
+
});
|
|
172
176
|
(0, _react.useEffect)(function () {
|
|
173
177
|
// 可以接收一个格式化方法
|
|
174
178
|
getKrEsData(formatTree);
|
|
@@ -227,4 +231,9 @@ function _default(props) {
|
|
|
227
231
|
}, "\u6CA1\u6709\u641C\u7D22\u5230\u7B26\u5408\u6761\u4EF6\u7684E-\u6267\u884C")))) : /*#__PURE__*/_react["default"].createElement(_loading["default"], {
|
|
228
232
|
type: "panel"
|
|
229
233
|
})));
|
|
230
|
-
}
|
|
234
|
+
} // @ts-ignore
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
Elist = /*#__PURE__*/(0, _react.forwardRef)(Elist);
|
|
238
|
+
var _default = Elist;
|
|
239
|
+
exports["default"] = _default;
|