@titaui/pc 1.15.89-beta.2 → 1.15.89-beta.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/dialog-confirm/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +11 -6
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +34 -7
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -1
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +2 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +8 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +3 -1
- package/lib/components/form/form-fields/input/index.css +4 -0
- package/lib/components/form/form-fields/input/index.js +9 -6
- package/lib/components/guide-tip/index.js +4 -1
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +8 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +10 -1
- package/lib/components/menus/export-modules/summary-menus/request-api.js +8 -2
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +26 -7
- package/lib/components/menus/i18n.js +1 -0
- package/lib/components/okr-excel-create/components/kr-confidence/index.css +18 -0
- package/lib/components/okr-excel-create/components/kr-confidence/index.js +61 -0
- package/lib/components/okr-excel-create/components/kr-weight/index.css +10 -0
- package/lib/components/okr-excel-create/components/kr-weight/index.js +114 -0
- package/lib/components/okr-excel-create/components/okr-align/index.css +49 -0
- package/lib/components/okr-excel-create/components/okr-align/index.js +139 -0
- package/lib/components/okr-excel-create/components/okr-classify/index.css +74 -0
- package/lib/components/okr-excel-create/components/okr-classify/index.js +117 -0
- package/lib/components/okr-excel-create/components/okr-cycle/index.css +40 -0
- package/lib/components/okr-excel-create/components/okr-cycle/index.js +85 -0
- package/lib/components/okr-excel-create/components/okr-name/index.css +48 -0
- package/lib/components/okr-excel-create/components/okr-name/index.js +116 -0
- package/lib/components/okr-excel-create/components/okr-principal/index.css +17 -0
- package/lib/components/okr-excel-create/components/okr-principal/index.js +107 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.js +46 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.js +47 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.css +196 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.js +319 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/util.js +134 -0
- package/lib/components/okr-excel-create/components/okr-progress/index.css +25 -0
- package/lib/components/okr-excel-create/components/okr-progress/index.js +90 -0
- package/lib/components/okr-excel-create/components/okr-progress/interface.js +5 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/buttonv2.js +108 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/confirm.js +166 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/index.css +20 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/index.js +76 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/object-type.js +275 -0
- package/lib/components/okr-excel-create/components/okr-type/index.css +30 -0
- package/lib/components/okr-excel-create/components/okr-type/index.js +196 -0
- package/lib/components/okr-excel-create/components/okr-visibility/index.css +53 -0
- package/lib/components/okr-excel-create/components/okr-visibility/index.js +236 -0
- package/lib/components/okr-excel-create/components-new/kr-confidence/index.css +18 -0
- package/lib/components/okr-excel-create/components-new/kr-confidence/index.js +75 -0
- package/lib/components/okr-excel-create/components-new/kr-weight/index.css +14 -0
- package/lib/components/okr-excel-create/components-new/kr-weight/index.js +143 -0
- package/lib/components/okr-excel-create/components-new/okr-align/index.css +51 -0
- package/lib/components/okr-excel-create/components-new/okr-align/index.js +142 -0
- package/lib/components/okr-excel-create/components-new/okr-classify/index.css +74 -0
- package/lib/components/okr-excel-create/components-new/okr-classify/index.js +126 -0
- package/lib/components/okr-excel-create/components-new/okr-cycle/index.css +40 -0
- package/lib/components/okr-excel-create/components-new/okr-cycle/index.js +97 -0
- package/lib/components/okr-excel-create/components-new/okr-name/index.css +87 -0
- package/lib/components/okr-excel-create/components-new/okr-name/index.js +193 -0
- package/lib/components/okr-excel-create/components-new/okr-principal/index.css +17 -0
- package/lib/components/okr-excel-create/components-new/okr-principal/index.js +116 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/kr-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/kr-progress/index.js +46 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/o-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/o-progress/index.js +47 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.css +196 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.js +319 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/util.js +134 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/index.css +25 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/index.js +90 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/interface.js +5 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/buttonv2.js +108 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/confirm.js +166 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/index.css +20 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/index.js +76 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/object-type.js +275 -0
- package/lib/components/okr-excel-create/components-new/okr-type/index.css +30 -0
- package/lib/components/okr-excel-create/components-new/okr-type/index.js +205 -0
- package/lib/components/okr-excel-create/components-new/okr-visibility/index.css +53 -0
- package/lib/components/okr-excel-create/components-new/okr-visibility/index.js +250 -0
- package/lib/components/okr-excel-create/constant.js +14 -0
- package/lib/components/okr-excel-create/hooks.js +314 -0
- package/lib/components/okr-excel-create/img/base-info-add.svg +19 -0
- package/lib/components/okr-excel-create/img/desire.svg +61 -0
- package/lib/components/okr-excel-create/img/promise.svg +61 -0
- package/lib/components/okr-excel-create/index-old.js +258 -0
- package/lib/components/okr-excel-create/index.css +69 -0
- package/lib/components/okr-excel-create/index.js +226 -0
- package/lib/components/okr-excel-create/setting.js +21 -0
- package/lib/components/okr-excel-create/type.js +5 -0
- package/lib/components/okr-excel-create/utils.js +182 -0
- package/lib/components/operation-records/index.js +56 -8
- package/lib/components/promise-confirm/index.js +3 -2
- package/lib/components/select-tags/index.js +5 -3
- package/lib/components/table-excel-v2/index.css +59 -0
- package/lib/components/table-excel-v2/index.js +440 -0
- package/lib/components/table-excel-v2/utils.js +22 -0
- package/lib/index.js +8 -0
- package/lib/pages/aha2021/index.js +1 -5
- package/lib/pages/new-okr-list/index.js +1 -38
- package/package.json +1 -1
|
@@ -61,7 +61,9 @@ function WarningButton(props) {
|
|
|
61
61
|
children = props.children,
|
|
62
62
|
disabled = props.disabled;
|
|
63
63
|
|
|
64
|
-
var onClickHandler = function onClickHandler() {
|
|
64
|
+
var onClickHandler = function onClickHandler(e) {
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
|
|
65
67
|
if (!disabled) {
|
|
66
68
|
onClick();
|
|
67
69
|
}
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
12
14
|
var _tooltip = _interopRequireDefault(require("../../../../tooltip"));
|
|
13
15
|
|
|
14
16
|
var _newConfidence = _interopRequireDefault(require("../../../../new-confidence"));
|
|
@@ -29,8 +31,6 @@ var _interface = require("../task-progress/interface");
|
|
|
29
31
|
|
|
30
32
|
require("./index.css");
|
|
31
33
|
|
|
32
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
33
|
-
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
35
|
|
|
36
36
|
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); }
|
|
@@ -58,7 +58,8 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
58
58
|
var _rowsData$Rows, _rowsData$Rows2;
|
|
59
59
|
|
|
60
60
|
var data = _ref.data,
|
|
61
|
-
reportType = _ref.reportType
|
|
61
|
+
reportType = _ref.reportType,
|
|
62
|
+
title = _ref.title;
|
|
62
63
|
|
|
63
64
|
var _useState = (0, _react.useState)(),
|
|
64
65
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -120,7 +121,9 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
120
121
|
})), /*#__PURE__*/_react["default"].createElement("td", null), /*#__PURE__*/_react["default"].createElement("td", {
|
|
121
122
|
className: "padding-td"
|
|
122
123
|
}, /*#__PURE__*/_react["default"].createElement(_schedule["default"], {
|
|
123
|
-
|
|
124
|
+
oldValue: item.LastRichContent || item.LastContent || '' // oldValue={item.LastRichContent || ""}
|
|
125
|
+
,
|
|
126
|
+
value: item.LastContents,
|
|
124
127
|
date: item.LastContentTime,
|
|
125
128
|
id: item.Id
|
|
126
129
|
})));
|
|
@@ -142,7 +145,9 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
142
145
|
})), /*#__PURE__*/_react["default"].createElement("td", {
|
|
143
146
|
className: "padding-td"
|
|
144
147
|
}, /*#__PURE__*/_react["default"].createElement(_schedule["default"], {
|
|
145
|
-
|
|
148
|
+
oldValue: item.LastRichContent || item.LastContent || '' // oldValue={item.LastRichContent || ''}
|
|
149
|
+
,
|
|
150
|
+
value: item === null || item === void 0 ? void 0 : item.LastContents,
|
|
146
151
|
date: item.LastContentTime,
|
|
147
152
|
id: item.Id
|
|
148
153
|
})));
|
|
@@ -178,7 +183,7 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
178
183
|
className: (0, _classnames["default"])("".concat(prefix, "__title-arrow"), _defineProperty({}, "".concat(prefix, "__title-arrow--show"), !tableVisible))
|
|
179
184
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
180
185
|
className: (0, _classnames["default"])('tu-icon-caret-down', "".concat(prefix, "__title-arrow-icon"), _defineProperty({}, "".concat(prefix, "__title-arrow-icon--rotate"), !tableVisible))
|
|
181
|
-
}))),
|
|
186
|
+
}))), title, /*#__PURE__*/_react["default"].createElement("div", {
|
|
182
187
|
className: "".concat(prefix, "__title-total")
|
|
183
188
|
}, rowsData === null || rowsData === void 0 ? void 0 : (_rowsData$Rows2 = rowsData.Rows) === null || _rowsData$Rows2 === void 0 ? void 0 : _rowsData$Rows2.length)), tableVisible && /*#__PURE__*/_react["default"].createElement("div", {
|
|
184
189
|
className: "".concat(prefix, "__table")
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
white-space: pre-wrap;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.titaui-dynamic-summary-schedule__content-richContent {
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
color: #141c28;
|
|
15
|
+
line-height: 22px;
|
|
16
|
+
white-space: pre-wrap;
|
|
17
|
+
margin-bottom: 30px;
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
.titaui-dynamic-summary-schedule__content-date {
|
|
13
21
|
font-size: 12px;
|
|
14
22
|
color: #89919f;
|
|
@@ -7,8 +7,12 @@ exports["default"] = exports.Schedule = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
+
|
|
10
12
|
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
11
13
|
|
|
14
|
+
var _openData = require("../../../../../utils/open-data");
|
|
15
|
+
|
|
12
16
|
require("./index.css");
|
|
13
17
|
|
|
14
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -16,24 +20,47 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
20
|
var prefix = "titaui-dynamic-summary-schedule";
|
|
17
21
|
|
|
18
22
|
var Schedule = function Schedule(_ref) {
|
|
19
|
-
var value = _ref.value
|
|
23
|
+
var value = _ref.value,
|
|
24
|
+
oldValue = _ref.oldValue;
|
|
20
25
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
21
26
|
className: prefix
|
|
22
27
|
}, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
23
28
|
style: {
|
|
24
29
|
maxHeight: 164
|
|
25
30
|
}
|
|
26
|
-
}, value && /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
|
+
}, (value === null || value === void 0 ? void 0 : value.length) !== 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
27
32
|
className: "".concat(prefix, "__content")
|
|
28
|
-
},
|
|
29
|
-
|
|
33
|
+
}, value === null || value === void 0 ? void 0 : value.map(function (val) {
|
|
34
|
+
if (!val.EntityId) return /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
|
+
className: "".concat(prefix, "__content-richContent")
|
|
36
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
37
|
+
dangerouslySetInnerHTML: {
|
|
38
|
+
__html: val === null || val === void 0 ? void 0 : val.RichContent
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: "".concat(prefix, "__content-text")
|
|
43
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
|
+
className: "".concat(prefix, "__content-title")
|
|
45
|
+
}, (0, _moment["default"])((val === null || val === void 0 ? void 0 : val.startDate) || '').format('YYYY/MM/DD') === (0, _moment["default"])((val === null || val === void 0 ? void 0 : val.endDate) || '').format('YYYY/MM/DD') && /*#__PURE__*/_react["default"].createElement("span", null, (0, _moment["default"])(val === null || val === void 0 ? void 0 : val.startDate).format('YYYY/MM/DD')), (0, _moment["default"])(val === null || val === void 0 ? void 0 : val.startDate).format('YYYY/MM/DD') !== (0, _moment["default"])(val === null || val === void 0 ? void 0 : val.endDate).format('YYYY/MM/DD') && /*#__PURE__*/_react["default"].createElement("span", null, (0, _moment["default"])((val === null || val === void 0 ? void 0 : val.startDate) || '').format('YYYY/MM/DD'), " - ", (0, _moment["default"])((val === null || val === void 0 ? void 0 : val.endDate) || '').format('YYYY/MM/DD')), "\xA0", /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
46
|
+
id: val.UserId,
|
|
47
|
+
name: val === null || val === void 0 ? void 0 : val.UserName
|
|
48
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
|
+
className: "".concat(prefix, "__content-richContent")
|
|
50
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
51
|
+
dangerouslySetInnerHTML: {
|
|
52
|
+
__html: val === null || val === void 0 ? void 0 : val.RichContent
|
|
53
|
+
}
|
|
54
|
+
})));
|
|
55
|
+
})), (!value || (value === null || value === void 0 ? void 0 : value.length) === 0) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, oldValue ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
|
+
className: "".concat(prefix, "__content-richContent")
|
|
30
57
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
31
58
|
dangerouslySetInnerHTML: {
|
|
32
|
-
__html:
|
|
59
|
+
__html: oldValue
|
|
33
60
|
}
|
|
34
|
-
}))
|
|
61
|
+
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
62
|
className: "".concat(prefix, "__no-progress")
|
|
36
|
-
}, "-")));
|
|
63
|
+
}, "-"))));
|
|
37
64
|
};
|
|
38
65
|
|
|
39
66
|
exports.Schedule = Schedule;
|
|
@@ -160,7 +160,6 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
160
160
|
departmentName = _ref3.departmentName,
|
|
161
161
|
departmentId = _ref3.departmentId;
|
|
162
162
|
|
|
163
|
-
console.log('visibilityScope', visibilityScope);
|
|
164
163
|
var departmentsRender = (0, _react.useMemo)(function () {
|
|
165
164
|
return (departments === null || departments === void 0 ? void 0 : departments.length) !== 0 && departments.map(function (item, index) {
|
|
166
165
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
@@ -47,7 +47,8 @@ var prefix = 'titaui-dynamic-task-progress';
|
|
|
47
47
|
|
|
48
48
|
var TaskProgress = function TaskProgress(_ref) {
|
|
49
49
|
var data = _ref.data,
|
|
50
|
-
reportType = _ref.reportType
|
|
50
|
+
reportType = _ref.reportType,
|
|
51
|
+
title = _ref.title;
|
|
51
52
|
|
|
52
53
|
var _useState = (0, _react.useState)({
|
|
53
54
|
1: [],
|
|
@@ -173,7 +174,7 @@ var TaskProgress = function TaskProgress(_ref) {
|
|
|
173
174
|
className: (0, _classnames["default"])("".concat(prefix, "__title-arrow"), _defineProperty({}, "".concat(prefix, "__title-arrow--show"), !tableVisible))
|
|
174
175
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
175
176
|
className: (0, _classnames["default"])('tu-icon-caret-down', "".concat(prefix, "__title-arrow-icon"), _defineProperty({}, "".concat(prefix, "__title-arrow-icon--rotate"), !tableVisible))
|
|
176
|
-
}))),
|
|
177
|
+
}))), title), statusStatistic.done + statusStatistic.doing + statusStatistic.overDue > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
178
|
className: (0, _classnames["default"])("".concat(prefix, "__statistic"), _defineProperty({}, "".concat(prefix, "__statistic--hide"), !tableVisible))
|
|
178
179
|
}, statusStatistic.done > 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
179
180
|
onClick: handleFilterDone,
|
|
@@ -35,8 +35,12 @@ var RenderRow = function RenderRow(_ref) {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
var render = function render() {
|
|
38
|
+
var _item$LastRichContent;
|
|
39
|
+
|
|
40
|
+
console.log('LastRichContent', item === null || item === void 0 ? void 0 : (_item$LastRichContent = item.LastRichContent) === null || _item$LastRichContent === void 0 ? void 0 : _item$LastRichContent.trim());
|
|
41
|
+
|
|
38
42
|
if (item.IsImport) {
|
|
39
|
-
var _item$
|
|
43
|
+
var _item$LastRichContent2;
|
|
40
44
|
|
|
41
45
|
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
46
|
className: "".concat(prefix, "__table-row-title"),
|
|
@@ -58,7 +62,9 @@ var RenderRow = function RenderRow(_ref) {
|
|
|
58
62
|
value: item.Progress,
|
|
59
63
|
editable: false
|
|
60
64
|
})), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_schedule["default"], {
|
|
61
|
-
|
|
65
|
+
oldValue: (item === null || item === void 0 ? void 0 : (_item$LastRichContent2 = item.LastRichContent) === null || _item$LastRichContent2 === void 0 ? void 0 : _item$LastRichContent2.trim()) || (item === null || item === void 0 ? void 0 : item.LastContent) || "" // oldValue={item?.LastRichContent?.trim() || ""}
|
|
66
|
+
,
|
|
67
|
+
value: item.LastContents,
|
|
62
68
|
editable: false,
|
|
63
69
|
id: item.Id
|
|
64
70
|
})));
|
|
@@ -207,7 +207,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
207
207
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, ((item === null || item === void 0 ? void 0 : item.richContent) || !(0, _util.isEmptyImage)(item === null || item === void 0 ? void 0 : item.richContent)) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
208
|
className: "".concat(prefix, "__work"),
|
|
209
209
|
key: item.richContent || Math.random()
|
|
210
|
-
}, item.title
|
|
210
|
+
}, item.title, /*#__PURE__*/_react["default"].createElement(_richEditor["default"], {
|
|
211
211
|
plugins: templateRichPlugins({}, edit, delAble, undefined, newTaskLine)
|
|
212
212
|
}, /*#__PURE__*/_react["default"].createElement(_richEditor.EditorComponent, {
|
|
213
213
|
editable: false,
|
|
@@ -219,6 +219,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
219
219
|
if (item.contentType === _constant.dailyContentType.okr) {
|
|
220
220
|
return item.content && /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
|
|
221
221
|
data: item.content,
|
|
222
|
+
title: item.title,
|
|
222
223
|
reportType: data.reportType
|
|
223
224
|
});
|
|
224
225
|
}
|
|
@@ -226,6 +227,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
226
227
|
if (item.contentType === _constant.dailyContentType.task) {
|
|
227
228
|
return item.content && /*#__PURE__*/_react["default"].createElement(_taskProgress["default"], {
|
|
228
229
|
data: item.content,
|
|
230
|
+
title: item.title,
|
|
229
231
|
reportType: data.reportType
|
|
230
232
|
});
|
|
231
233
|
}
|
|
@@ -112,6 +112,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
112
112
|
if (errors.length) {
|
|
113
113
|
setHasError(true);
|
|
114
114
|
setTip(errors[0].tip);
|
|
115
|
+
setHasActive(false);
|
|
115
116
|
inputRef.current.focus();
|
|
116
117
|
} else {
|
|
117
118
|
setHasError(false);
|
|
@@ -156,6 +157,10 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
156
157
|
|
|
157
158
|
var errors = _verifing();
|
|
158
159
|
|
|
160
|
+
if (onBlur) {
|
|
161
|
+
onBlur();
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
if (errors.length) {
|
|
160
165
|
setHasError(true);
|
|
161
166
|
setTip(errors[0].tip);
|
|
@@ -184,15 +189,13 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
184
189
|
|
|
185
190
|
var errors = _verifing();
|
|
186
191
|
|
|
187
|
-
setHasActive(false);
|
|
188
|
-
|
|
189
192
|
if (errors.length) {
|
|
190
|
-
setHasError(true);
|
|
191
|
-
setTip(errors[0].tip);
|
|
193
|
+
// setHasError(true);
|
|
194
|
+
// setTip(errors[0].tip);
|
|
192
195
|
onCheckSuccess && onCheckSuccess(false);
|
|
193
196
|
} else {
|
|
194
|
-
setHasError(false);
|
|
195
|
-
setTip('');
|
|
197
|
+
// setHasError(false);
|
|
198
|
+
// setTip('');
|
|
196
199
|
onCheckSuccess && onCheckSuccess(true);
|
|
197
200
|
}
|
|
198
201
|
};
|
|
@@ -19,7 +19,7 @@ var _getLocale = require("../../utils/getLocale");
|
|
|
19
19
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle", "visible"];
|
|
22
|
+
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle", "visible", "isShowPopup"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
@@ -55,6 +55,8 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
55
55
|
buttonTitle = _props$buttonTitle === void 0 ? (0, _getLocale.getLocale)('TopMenu_button_InvitColleagues') : _props$buttonTitle,
|
|
56
56
|
_props$visible = props.visible,
|
|
57
57
|
visible = _props$visible === void 0 ? false : _props$visible,
|
|
58
|
+
_props$isShowPopup = props.isShowPopup,
|
|
59
|
+
isShowPopup = _props$isShowPopup === void 0 ? true : _props$isShowPopup,
|
|
58
60
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
59
61
|
|
|
60
62
|
var popupRef = (0, _react.useRef)({
|
|
@@ -104,6 +106,7 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
104
106
|
}, time);
|
|
105
107
|
}
|
|
106
108
|
}, []);
|
|
109
|
+
if (!isShowPopup) return children;
|
|
107
110
|
return /*#__PURE__*/_react["default"].createElement(_popup["default"], _extends({
|
|
108
111
|
ref: popupRef,
|
|
109
112
|
action: ['focus'],
|
|
@@ -38,6 +38,8 @@ var _default = /*#__PURE__*/function () {
|
|
|
38
38
|
cb(_menus.PAGE_SUMMARY_SUBORDINATE);
|
|
39
39
|
} else if (this.isSummaryDashboard()) {
|
|
40
40
|
cb(_menus.PAGE_SUMMARY_DASHBOARD);
|
|
41
|
+
} else if (this.isSummaryTemplate()) {
|
|
42
|
+
cb(_menus.PAGE_SUMMARY_TEMPLATE);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
return null;
|
|
@@ -84,6 +86,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
84
86
|
var pathname = this.history.location.pathname;
|
|
85
87
|
return pathname.match(/summary\/dashboard/);
|
|
86
88
|
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "isSummaryTemplate",
|
|
91
|
+
value: function isSummaryTemplate() {
|
|
92
|
+
var pathname = this.history.location.pathname;
|
|
93
|
+
return pathname.match(/summary\/template\/page/);
|
|
94
|
+
}
|
|
87
95
|
}]);
|
|
88
96
|
|
|
89
97
|
return _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_TONGJI = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_DASHBOARD = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_TONGJI = exports.PAGE_SUMMARY_TEMPLATE = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_DASHBOARD = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
7
7
|
|
|
8
8
|
var _i18n = require("../../i18n");
|
|
9
9
|
|
|
@@ -57,6 +57,8 @@ var PAGE_SUMMARY_DASHBOARD = 'dashboard';
|
|
|
57
57
|
exports.PAGE_SUMMARY_DASHBOARD = PAGE_SUMMARY_DASHBOARD;
|
|
58
58
|
var PAGE_SUMMARY_TONGJI = 'tongji';
|
|
59
59
|
exports.PAGE_SUMMARY_TONGJI = PAGE_SUMMARY_TONGJI;
|
|
60
|
+
var PAGE_SUMMARY_TEMPLATE = 'template';
|
|
61
|
+
exports.PAGE_SUMMARY_TEMPLATE = PAGE_SUMMARY_TEMPLATE;
|
|
60
62
|
|
|
61
63
|
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
62
64
|
IsLeader = _getUserInfo.IsLeader,
|
|
@@ -146,6 +148,13 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
146
148
|
type: _index.MENU_ITEM_NOE,
|
|
147
149
|
href: '#/summary/dashboard',
|
|
148
150
|
isShow: props.isShowDashboard
|
|
151
|
+
}, {
|
|
152
|
+
icon: 'template',
|
|
153
|
+
label: _i18n.locale.menu_summary_template,
|
|
154
|
+
key: PAGE_SUMMARY_TEMPLATE,
|
|
155
|
+
type: _index.MENU_ITEM_NOE,
|
|
156
|
+
href: '#/summary/template/page',
|
|
157
|
+
isShow: props.isShowTemplate
|
|
149
158
|
}, {
|
|
150
159
|
icon: "my-setup",
|
|
151
160
|
label: _i18n.locale.menu_summary_role,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getShareStatus = void 0;
|
|
6
|
+
exports.getTemplateUserRole = exports.getShareStatus = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("@titaui/request");
|
|
9
9
|
|
|
@@ -14,4 +14,10 @@ var getShareStatus = function getShareStatus() {
|
|
|
14
14
|
return (0, _request.rget)('v1')("summary/getShareUsers?toUserId=".concat(loginUser.Id));
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
exports.getShareStatus = getShareStatus;
|
|
17
|
+
exports.getShareStatus = getShareStatus;
|
|
18
|
+
|
|
19
|
+
var getTemplateUserRole = function getTemplateUserRole() {
|
|
20
|
+
return (0, _request.rget)('v1')('summaryTemplate/userRole');
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.getTemplateUserRole = getTemplateUserRole;
|
|
@@ -86,6 +86,11 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
86
86
|
isShowTongji = _useState10[0],
|
|
87
87
|
setIsShowTongji = _useState10[1];
|
|
88
88
|
|
|
89
|
+
var _useState11 = (0, _react.useState)(false),
|
|
90
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
91
|
+
isShowTemplate = _useState12[0],
|
|
92
|
+
setIsShowTemplate = _useState12[1];
|
|
93
|
+
|
|
89
94
|
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
90
95
|
var isShowDashboard = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isHrbp();
|
|
91
96
|
var flipRef = (0, _react.useRef)({
|
|
@@ -94,17 +99,18 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
94
99
|
});
|
|
95
100
|
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
96
101
|
|
|
97
|
-
var
|
|
102
|
+
var _useState13 = (0, _react.useState)(function () {
|
|
98
103
|
summaryMenusData.current = new _menus["default"]({
|
|
99
104
|
isShowShare: false,
|
|
100
105
|
isShowTongji: false,
|
|
101
|
-
isShowDept: true
|
|
106
|
+
isShowDept: true,
|
|
107
|
+
isShowTemplate: false
|
|
102
108
|
});
|
|
103
109
|
return summaryMenusData.current.getMenus();
|
|
104
110
|
}),
|
|
105
|
-
|
|
106
|
-
menus =
|
|
107
|
-
setMenus =
|
|
111
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
112
|
+
menus = _useState14[0],
|
|
113
|
+
setMenus = _useState14[1]; // 判断路由高亮菜单
|
|
108
114
|
|
|
109
115
|
|
|
110
116
|
(0, _react.useEffect)(function () {
|
|
@@ -281,11 +287,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
281
287
|
isShowShare: isShowShare,
|
|
282
288
|
isShowTongji: isShowTongji,
|
|
283
289
|
isShowDept: isShowDepartment,
|
|
284
|
-
isShowDashboard: isShowDashboard
|
|
290
|
+
isShowDashboard: isShowDashboard,
|
|
291
|
+
isShowTemplate: isShowTemplate
|
|
285
292
|
});
|
|
286
293
|
summaryMenusData.current = newMenu;
|
|
287
294
|
setMenus(newMenu.getMenus());
|
|
288
|
-
}, [isShowShare, isShowDepartment, isShowDashboard, isShowTongji]);
|
|
295
|
+
}, [isShowShare, isShowDepartment, isShowDashboard, isShowTongji, isShowTemplate]);
|
|
289
296
|
(0, _react.useEffect)(function () {
|
|
290
297
|
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
291
298
|
if (resp.Code === 1) {
|
|
@@ -299,6 +306,18 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
299
306
|
setIsShowTongji(true);
|
|
300
307
|
}
|
|
301
308
|
});
|
|
309
|
+
(0, _requestApi.getTemplateUserRole)().then(function (res) {
|
|
310
|
+
//0普通人不可以查看,1超管老板助理,2总结管理员,3模板管理员
|
|
311
|
+
console.log(res);
|
|
312
|
+
|
|
313
|
+
if (res.Code === 1) {
|
|
314
|
+
if (res.Data.userTempRoles[0] === 0) {
|
|
315
|
+
setIsShowTemplate(false);
|
|
316
|
+
} else {
|
|
317
|
+
setIsShowTemplate(true);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
});
|
|
302
321
|
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
303
322
|
var _iterator = _createForOfIteratorHelper(entries),
|
|
304
323
|
_step;
|
|
@@ -60,6 +60,7 @@ var I18N = /*#__PURE__*/_createClass(function I18N() {
|
|
|
60
60
|
this.menu_summary = 'Rep_NewS_Management';
|
|
61
61
|
this.menu_summary_dashboard = 'Rep_Das_Dashboard';
|
|
62
62
|
this.menu_summary_tongji = 'HP_MyPeer';
|
|
63
|
+
this.menu_summary_template = 'Rep_Tab_SummTemplates';
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
var locale = new I18N();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.tita-okr-excel-create-kr-confidence {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
position: absolute;
|
|
6
|
+
left: 0;
|
|
7
|
+
top: 0;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
padding: 0 12px;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tita-okr-excel-create-kr-confidence .tita-ui-new-confidence {
|
|
15
|
+
width: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 _newConfidence = _interopRequireDefault(require("../../../new-confidence"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
|
|
24
|
+
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."); }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
+
|
|
34
|
+
var preCls = 'tita-okr-excel-create-kr-confidence';
|
|
35
|
+
|
|
36
|
+
var ConfidenceRenderer = function ConfidenceRenderer(update) {
|
|
37
|
+
return function (_ref) {
|
|
38
|
+
var data = _ref.data;
|
|
39
|
+
if (data.kr.isAddKR) return null;
|
|
40
|
+
|
|
41
|
+
var _useState = (0, _react.useState)(5),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
+
value = _useState2[0],
|
|
44
|
+
setValue = _useState2[1];
|
|
45
|
+
|
|
46
|
+
var handleChangeConfidence = function handleChangeConfidence(val) {
|
|
47
|
+
setValue(val);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
|
+
className: preCls
|
|
52
|
+
}, /*#__PURE__*/_react["default"].createElement(_newConfidence["default"], {
|
|
53
|
+
onChange: handleChangeConfidence,
|
|
54
|
+
editable: true,
|
|
55
|
+
value: value
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var _default = ConfidenceRenderer;
|
|
61
|
+
exports["default"] = _default;
|