@titaui/pc 1.10.6-3.beta-1 → 1.10.6-3.beta-4
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.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +7 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +7 -3
- package/lib/components/okr-detail/e-list/index.js +36 -9
- package/lib/components/okr-detail/e-list/util.js +9 -2
- package/lib/components/okr-progress-detail/index.js +5 -1
- package/package.json +1 -1
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
color: #2879ff;
|
|
39
39
|
line-height: 18px;
|
|
40
40
|
cursor: pointer;
|
|
41
|
-
margin-right: 20px;
|
|
42
41
|
display: inline-flex;
|
|
43
42
|
align-items: center;
|
|
44
43
|
}
|
|
@@ -58,6 +57,7 @@
|
|
|
58
57
|
color: #2879ff;
|
|
59
58
|
line-height: 18px;
|
|
60
59
|
cursor: pointer;
|
|
60
|
+
margin-left: 20px;
|
|
61
61
|
display: inline-flex;
|
|
62
62
|
align-items: center;
|
|
63
63
|
}
|
|
@@ -47,8 +47,13 @@ var EKrNode = function EKrNode(props) {
|
|
|
47
47
|
var index = props.index,
|
|
48
48
|
title = props.title,
|
|
49
49
|
data = props.data,
|
|
50
|
-
isOTask = props.isOTask
|
|
50
|
+
isOTask = props.isOTask,
|
|
51
|
+
_props$hasAddProject = props.hasAddProject,
|
|
52
|
+
hasAddProject = _props$hasAddProject === void 0 ? true : _props$hasAddProject,
|
|
53
|
+
_props$hasRelation = props.hasRelation,
|
|
54
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
|
|
51
55
|
var btnRef = (0, _react.useRef)();
|
|
56
|
+
hasProject = hasProject && hasAddProject;
|
|
52
57
|
|
|
53
58
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
54
59
|
okrInfo = _useContext.okrInfo;
|
|
@@ -202,7 +207,7 @@ var EKrNode = function EKrNode(props) {
|
|
|
202
207
|
icon: "tu-icon-Add-xiangmu",
|
|
203
208
|
exIconClass: "e-kr-node-layer-icon",
|
|
204
209
|
name: "addProject"
|
|
205
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addproject"))) : /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addproject"))) : /*#__PURE__*/_react["default"].createElement("span", null)), hasRelation && /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
206
211
|
popupPlacement: "bottomRight",
|
|
207
212
|
onChange: openRelatePop,
|
|
208
213
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -87,7 +87,11 @@ function ETaskNode(props) {
|
|
|
87
87
|
title = props.title,
|
|
88
88
|
data = props.data,
|
|
89
89
|
createUserId = props.createUserId,
|
|
90
|
-
krUser = props.krUser
|
|
90
|
+
krUser = props.krUser,
|
|
91
|
+
_props$hasProgress = props.hasProgress,
|
|
92
|
+
hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
|
|
93
|
+
_props$hasRelation = props.hasRelation,
|
|
94
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
|
|
91
95
|
|
|
92
96
|
var _useState = (0, _react.useState)(false),
|
|
93
97
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -369,7 +373,7 @@ function ETaskNode(props) {
|
|
|
369
373
|
isLongTerm: dataInfo.isLongTerm,
|
|
370
374
|
isCancel: dataInfo.status === 4,
|
|
371
375
|
isComplete: dataInfo.status === 2
|
|
372
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
376
|
+
})), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
|
|
373
377
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
|
|
374
378
|
}, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
|
|
375
379
|
size: 22,
|
|
@@ -380,7 +384,7 @@ function ETaskNode(props) {
|
|
|
380
384
|
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
|
|
381
385
|
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
|
|
382
386
|
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
|
|
383
|
-
})), okrInfo.status === 1 && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
387
|
+
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
384
388
|
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
|
|
385
389
|
placement: "top"
|
|
386
390
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -52,9 +52,25 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
52
52
|
var preCls = "okr-detail-e";
|
|
53
53
|
|
|
54
54
|
function _default(props) {
|
|
55
|
-
var okrId = props.okrId
|
|
55
|
+
var okrId = props.okrId,
|
|
56
|
+
_props$hasSearch = props.hasSearch,
|
|
57
|
+
hasSearch = _props$hasSearch === void 0 ? true : _props$hasSearch,
|
|
58
|
+
_props$formatTree = props.formatTree,
|
|
59
|
+
formatTree = _props$formatTree === void 0 ? _util.formatEListDataToSelectTree : _props$formatTree,
|
|
60
|
+
_props$startDate = props.startDate,
|
|
61
|
+
startDate = _props$startDate === void 0 ? '' : _props$startDate,
|
|
62
|
+
_props$endDate = props.endDate,
|
|
63
|
+
endDate = _props$endDate === void 0 ? '' : _props$endDate,
|
|
64
|
+
_props$toLevel = props.toLevel,
|
|
65
|
+
toLevel = _props$toLevel === void 0 ? 999 : _props$toLevel,
|
|
66
|
+
_props$hasdivider = props.hasdivider,
|
|
67
|
+
hasdivider = _props$hasdivider === void 0 ? false : _props$hasdivider,
|
|
68
|
+
className = props.className,
|
|
69
|
+
changeData = props.changeData,
|
|
70
|
+
_props$includeWork = props.includeWork,
|
|
71
|
+
includeWork = _props$includeWork === void 0 ? true : _props$includeWork;
|
|
56
72
|
var loginUser = (0, _bsGlobal.getUserInfo)().Id;
|
|
57
|
-
var hasCondition = localStorage.getItem("hasRememberCondition".concat(loginUser));
|
|
73
|
+
var hasCondition = hasSearch && localStorage.getItem("hasRememberCondition".concat(loginUser));
|
|
58
74
|
|
|
59
75
|
var _useState = (0, _react.useState)([]),
|
|
60
76
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -111,8 +127,9 @@ function _default(props) {
|
|
|
111
127
|
totalDataNum = _useState22[0],
|
|
112
128
|
setTotalDataNum = _useState22[1];
|
|
113
129
|
|
|
114
|
-
var getKrEsData = function getKrEsData() {
|
|
130
|
+
var getKrEsData = function getKrEsData(formatTree) {
|
|
115
131
|
setLoading(true);
|
|
132
|
+
var formatEList = formatTree ? formatTree : _util.formatEListDataToSelectTree;
|
|
116
133
|
(0, _requestApis.getKrsByCondition)({
|
|
117
134
|
okrId: okrId,
|
|
118
135
|
condition: (0, _util.formatCondition)({
|
|
@@ -121,11 +138,20 @@ function _default(props) {
|
|
|
121
138
|
selectName: selectName,
|
|
122
139
|
checkedStatus: checkedStatus,
|
|
123
140
|
users: selectUsers,
|
|
124
|
-
keyWord: searchKey
|
|
141
|
+
keyWord: searchKey,
|
|
142
|
+
startDate: startDate,
|
|
143
|
+
endDate: endDate,
|
|
144
|
+
toLevel: toLevel,
|
|
145
|
+
includeWork: includeWork
|
|
125
146
|
})
|
|
126
147
|
}).then(function (krs) {
|
|
127
148
|
debugger;
|
|
128
|
-
|
|
149
|
+
|
|
150
|
+
if (!krs || !krs.length) {
|
|
151
|
+
changeData(true);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
var formatKrs = formatEList(krs, okrId, (0, _util.getIfInitCondition)(selectName, checkedStatus, selectUsers, searchKey));
|
|
129
155
|
var expandedKrEs = (formatKrs.krsEList || []).map(function (it) {
|
|
130
156
|
return it.key;
|
|
131
157
|
});
|
|
@@ -141,7 +167,8 @@ function _default(props) {
|
|
|
141
167
|
};
|
|
142
168
|
|
|
143
169
|
(0, _react.useEffect)(function () {
|
|
144
|
-
|
|
170
|
+
// 可以接收一个格式化方法
|
|
171
|
+
getKrEsData(formatTree);
|
|
145
172
|
}, [noteOrder, searchKey, selectName, checkedStatus, selectUsers]);
|
|
146
173
|
(0, _react.useEffect)(function () {
|
|
147
174
|
var oElistLength = oEList[0] && oEList[0].length || 0;
|
|
@@ -152,8 +179,8 @@ function _default(props) {
|
|
|
152
179
|
refreshEList: getKrEsData
|
|
153
180
|
}
|
|
154
181
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
|
-
className: preCls
|
|
156
|
-
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
182
|
+
className: "".concat(preCls, " ").concat(className)
|
|
183
|
+
}, hasSearch && /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
|
|
157
184
|
checkedStatus: checkedStatus,
|
|
158
185
|
setCheckedStatus: setCheckedStatus,
|
|
159
186
|
selectName: selectName,
|
|
@@ -173,7 +200,7 @@ function _default(props) {
|
|
|
173
200
|
data: [kr],
|
|
174
201
|
defaultExpandedKeys: expandedKrEs
|
|
175
202
|
})), // kr左后一个节点 && 没有 OE 时,不显示横线
|
|
176
|
-
!(index + 1 == krList.length && oEList.length == 0) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
|
+
!(index + 1 == krList.length && oEList.length == 0) && hasdivider && /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
204
|
className: "e__divider"
|
|
178
205
|
}));
|
|
179
206
|
}), oEList.map(function (kr) {
|
|
@@ -163,7 +163,11 @@ var formatCondition = function formatCondition(_ref) {
|
|
|
163
163
|
selectName = _ref.selectName,
|
|
164
164
|
checkedStatus = _ref.checkedStatus,
|
|
165
165
|
users = _ref.users,
|
|
166
|
-
keyWord = _ref.keyWord
|
|
166
|
+
keyWord = _ref.keyWord,
|
|
167
|
+
startDate = _ref.startDate,
|
|
168
|
+
endDate = _ref.endDate,
|
|
169
|
+
toLevel = _ref.toLevel,
|
|
170
|
+
includeWork = _ref.includeWork;
|
|
167
171
|
var resultStatus = [];
|
|
168
172
|
|
|
169
173
|
if (checkedStatus.includes("all")) {
|
|
@@ -189,10 +193,13 @@ var formatCondition = function formatCondition(_ref) {
|
|
|
189
193
|
pageIndex: 1,
|
|
190
194
|
FeedId: 0,
|
|
191
195
|
filter: 1,
|
|
192
|
-
toLevel: 999,
|
|
196
|
+
toLevel: toLevel || 999,
|
|
193
197
|
app_id: 1,
|
|
194
198
|
app_type: 1,
|
|
195
199
|
FilterKey: keyWord,
|
|
200
|
+
startDate: startDate || '',
|
|
201
|
+
endDate: endDate || '',
|
|
202
|
+
includeWork: includeWork,
|
|
196
203
|
status: resultStatus.join(","),
|
|
197
204
|
userObjects: users.map(function (user) {
|
|
198
205
|
return {
|
|
@@ -25,6 +25,8 @@ var _utils = require("./utils");
|
|
|
25
25
|
|
|
26
26
|
var _getLocale = require("../../utils/getLocale");
|
|
27
27
|
|
|
28
|
+
var _dangerousHtml = _interopRequireDefault(require("../dangerous-html"));
|
|
29
|
+
|
|
28
30
|
require("./index.css");
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -128,7 +130,9 @@ var Detail = function Detail(_ref) {
|
|
|
128
130
|
src: _progressLeftQuoto["default"]
|
|
129
131
|
}) : null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
130
132
|
className: "".concat($prefix, "__content")
|
|
131
|
-
}, content &&
|
|
133
|
+
}, content && /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
|
|
134
|
+
htmlText: content.trim()
|
|
135
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
132
136
|
className: "".concat($prefix, "__content-bottom")
|
|
133
137
|
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _utils.getTimeString)(time, nowTime)), canEdit && isMouseEnterDetail ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
134
138
|
className: "".concat($prefix, "__bottom-func-btns")
|