@titaui/pc 1.16.49-beta.3 → 1.16.49-beta.5
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/dynamic-item/components/schedule/index.js +1 -7
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/work-progress/index.css +1 -0
- package/lib/components/dynamic/dynamic-item/components/work-progress/index.js +12 -4
- package/lib/components/dynamic/dynamic-item/components/work-progress/mile-stone.js +3 -1
- package/lib/components/dynamic/dynamic-item/components/work-progress/render-row.js +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +4 -2
- package/package.json +1 -1
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
11
11
|
|
|
12
|
-
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
13
|
-
|
|
14
12
|
var _openData = require("../../../../../utils/open-data");
|
|
15
13
|
|
|
16
14
|
require("./index.css");
|
|
@@ -24,10 +22,6 @@ var Schedule = function Schedule(_ref) {
|
|
|
24
22
|
oldValue = _ref.oldValue;
|
|
25
23
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
24
|
className: prefix
|
|
27
|
-
}, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
28
|
-
style: {
|
|
29
|
-
maxHeight: 164
|
|
30
|
-
}
|
|
31
25
|
}, (value === null || value === void 0 ? void 0 : value.length) !== 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
26
|
className: "".concat(prefix, "__content")
|
|
33
27
|
}, value === null || value === void 0 ? void 0 : value.map(function (val) {
|
|
@@ -60,7 +54,7 @@ var Schedule = function Schedule(_ref) {
|
|
|
60
54
|
}
|
|
61
55
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
56
|
className: "".concat(prefix, "__no-progress")
|
|
63
|
-
}, "-")))
|
|
57
|
+
}, "-")));
|
|
64
58
|
};
|
|
65
59
|
|
|
66
60
|
exports.Schedule = Schedule;
|
|
@@ -44,7 +44,7 @@ var TableRowOProject = function TableRowOProject(_ref) {
|
|
|
44
44
|
className: (0, _classnames["default"])("".concat(prefix, " ").concat(extraClass), _defineProperty({}, "".concat(prefix, "--disable"), data.Id === -1)),
|
|
45
45
|
onClick: handleTitleClick
|
|
46
46
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
47
|
-
className: (0, _classnames["default"])("".concat(prefix, "__icon"), (_classNames2 = {}, _defineProperty(_classNames2, "tu-icon-H5-O-s", data.ParentObjType === 62 || data.ObjectType === 62), _defineProperty(_classNames2, "tu-icon-project-s", data.ParentObjType === 4 || data.ObjectType === 4), _classNames2))
|
|
47
|
+
className: (0, _classnames["default"])("".concat(prefix, "__icon"), (_classNames2 = {}, _defineProperty(_classNames2, "tu-icon-H5-O-s", data.ParentObjType === 62 || data.ObjectType === 62 && data.Id !== 0), _defineProperty(_classNames2, "tu-icon-project-s", data.ParentObjType === 4 || data.ObjectType === 4), _defineProperty(_classNames2, "tu-icon-fenlei", data.ObjectType === 62 && data.Id === 0), _classNames2))
|
|
48
48
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
49
49
|
className: "".concat(prefix, "__text")
|
|
50
50
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
@@ -44,10 +44,14 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
44
44
|
var prefix = "tita-summary-work-progress";
|
|
45
45
|
|
|
46
46
|
var Item = function Item(props) {
|
|
47
|
-
var children = props.children
|
|
47
|
+
var children = props.children,
|
|
48
|
+
openWorkMileSetting = props.openWorkMileSetting,
|
|
49
|
+
openWorkTaskSetting = props.openWorkTaskSetting;
|
|
48
50
|
return /*#__PURE__*/_react["default"].createElement("div", null, children.map(function (item) {
|
|
49
51
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_renderRow["default"], {
|
|
50
|
-
item: item
|
|
52
|
+
item: item,
|
|
53
|
+
openWorkMileSetting: openWorkMileSetting,
|
|
54
|
+
openWorkTaskSetting: openWorkTaskSetting
|
|
51
55
|
}), item.children && item.children.length !== 0 && /*#__PURE__*/_react["default"].createElement(Item, null, item.children));
|
|
52
56
|
}));
|
|
53
57
|
};
|
|
@@ -57,7 +61,9 @@ var WorkProgress = function WorkProgress(_ref) {
|
|
|
57
61
|
|
|
58
62
|
var data = _ref.data,
|
|
59
63
|
title = _ref.title,
|
|
60
|
-
reportType = _ref.reportType
|
|
64
|
+
reportType = _ref.reportType,
|
|
65
|
+
openWorkMileSetting = _ref.openWorkMileSetting,
|
|
66
|
+
openWorkTaskSetting = _ref.openWorkTaskSetting;
|
|
61
67
|
|
|
62
68
|
var _useState = (0, _react.useState)(true),
|
|
63
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -94,7 +100,9 @@ var WorkProgress = function WorkProgress(_ref) {
|
|
|
94
100
|
className: "tu-icon-wiki ".concat(prefix, "__table-title-progress-desc-icon")
|
|
95
101
|
}))))), /*#__PURE__*/_react["default"].createElement("tbody", null, (_toTree = (0, _utils.toTree)(tableData === null || tableData === void 0 ? void 0 : tableData.Rows)) === null || _toTree === void 0 ? void 0 : _toTree.map(function (item) {
|
|
96
102
|
return /*#__PURE__*/_react["default"].createElement(_renderRow["default"], {
|
|
97
|
-
item: item
|
|
103
|
+
item: item,
|
|
104
|
+
openWorkMileSetting: openWorkMileSetting,
|
|
105
|
+
openWorkTaskSetting: openWorkTaskSetting
|
|
98
106
|
});
|
|
99
107
|
})));
|
|
100
108
|
}, [tableData]);
|
|
@@ -50,7 +50,9 @@ var MileStone = function MileStone(_ref) {
|
|
|
50
50
|
className: "".concat(preCls, "__table-row-title-icon tu-icon-licheng-s")
|
|
51
51
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
52
52
|
className: "".concat(preCls, "__table-mile-title-text")
|
|
53
|
-
}, _openData["default"].parseString((0, _tools.htmlDecodeByRegExp)(data.MilestoneName)))
|
|
53
|
+
}, _openData["default"].parseString((0, _tools.htmlDecodeByRegExp)(data.MilestoneName))), data.IsDeadLine === true && /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
|
+
className: "".concat(preCls, "__table-row-title-remain")
|
|
55
|
+
}, data.RemainingContent))), /*#__PURE__*/_react["default"].createElement("td", null, !!data.MilestoneId && /*#__PURE__*/_react["default"].createElement(_progress["default"], {
|
|
54
56
|
id: "".concat(data.MilestoneId),
|
|
55
57
|
type: "task",
|
|
56
58
|
status: _constant.OkrRiskMapping[data.RiskLevel],
|
|
@@ -28,7 +28,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
28
28
|
var prefix = "tita-summary-work-progress";
|
|
29
29
|
|
|
30
30
|
var RenderRow = function RenderRow(_ref) {
|
|
31
|
-
var item = _ref.item
|
|
31
|
+
var item = _ref.item,
|
|
32
|
+
openWorkMileSetting = _ref.openWorkMileSetting,
|
|
33
|
+
openWorkTaskSetting = _ref.openWorkTaskSetting;
|
|
32
34
|
var render = (0, _react.useMemo)(function () {
|
|
33
35
|
if (!item.IsImport) {
|
|
34
36
|
var _item$children;
|
|
@@ -40,7 +42,7 @@ var RenderRow = function RenderRow(_ref) {
|
|
|
40
42
|
data: child
|
|
41
43
|
}));
|
|
42
44
|
|
|
43
|
-
if (child.Milestones) {
|
|
45
|
+
if (child.Milestones && openWorkMileSetting) {
|
|
44
46
|
var _child$Milestones;
|
|
45
47
|
|
|
46
48
|
(_child$Milestones = child.Milestones) === null || _child$Milestones === void 0 ? void 0 : _child$Milestones.forEach(function (mileStone) {
|
|
@@ -48,7 +50,7 @@ var RenderRow = function RenderRow(_ref) {
|
|
|
48
50
|
data: mileStone
|
|
49
51
|
}));
|
|
50
52
|
|
|
51
|
-
if (mileStone.Tasks) {
|
|
53
|
+
if (mileStone.Tasks && openWorkTaskSetting) {
|
|
52
54
|
var _mileStone$Tasks;
|
|
53
55
|
|
|
54
56
|
(_mileStone$Tasks = mileStone.Tasks) === null || _mileStone$Tasks === void 0 ? void 0 : _mileStone$Tasks.map(function (task) {
|
|
@@ -228,11 +228,13 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
if (item.contentType === _constant.dailyContentType.work) {
|
|
231
|
+
if (item.contentType === _constant.dailyContentType.work && data.openWorkSetting) {
|
|
232
232
|
return item.content && /*#__PURE__*/_react["default"].createElement(_workProgress["default"], {
|
|
233
233
|
data: item.content,
|
|
234
234
|
title: item.title,
|
|
235
|
-
reportType: data.reportType
|
|
235
|
+
reportType: data.reportType,
|
|
236
|
+
openWorkMileSetting: data.openWorkMileSetting,
|
|
237
|
+
openWorkTaskSetting: data.openWorkTaskSetting
|
|
236
238
|
});
|
|
237
239
|
}
|
|
238
240
|
|