@titaui/pc 1.15.90 → 1.15.93
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/nav-top/utils.js +2 -6
- 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/pages/aha2021/index.js +1 -5
- 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;
|
|
@@ -158,7 +158,6 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
158
158
|
departmentName = _ref3.departmentName,
|
|
159
159
|
departmentId = _ref3.departmentId;
|
|
160
160
|
|
|
161
|
-
console.log('visibilityScope', visibilityScope);
|
|
162
161
|
var departmentsRender = (0, _react.useMemo)(function () {
|
|
163
162
|
return (departments === null || departments === void 0 ? void 0 : departments.length) !== 0 && departments.map(function (item, index) {
|
|
164
163
|
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();
|
|
@@ -14,14 +14,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
14
14
|
var getMenus = function getMenus() {
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
var navs = window.BSGlobal.newNavigation;
|
|
17
|
-
|
|
18
|
-
return item.href !== '#summary/my';
|
|
19
|
-
}); //新加
|
|
20
|
-
|
|
21
|
-
hnavs.sort(function (pre, next) {
|
|
17
|
+
navs.sort(function (pre, next) {
|
|
22
18
|
return pre.orderId - next.orderId;
|
|
23
19
|
});
|
|
24
|
-
return
|
|
20
|
+
return navs; // const newNavigation = [
|
|
25
21
|
// {
|
|
26
22
|
// id: 21817,
|
|
27
23
|
// tenantId: 0,
|
|
@@ -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"] = void 0;
|
|
8
|
+
exports.getOperation = exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -21,6 +21,8 @@ var _style = require("./style");
|
|
|
21
21
|
|
|
22
22
|
var _getLocale = require("../../utils/getLocale");
|
|
23
23
|
|
|
24
|
+
var _request = require("@titaui/request");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
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); }
|
|
@@ -47,6 +49,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
47
49
|
|
|
48
50
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
51
|
|
|
52
|
+
var getOperation = function getOperation(data) {
|
|
53
|
+
return (0, _request.rpost)("v1")("summaryTemplate/operations", data);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.getOperation = getOperation;
|
|
57
|
+
|
|
50
58
|
var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
51
59
|
_inherits(OperationRecord, _PureComponent);
|
|
52
60
|
|
|
@@ -86,6 +94,26 @@ var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
|
86
94
|
});
|
|
87
95
|
};
|
|
88
96
|
|
|
97
|
+
_this.getOperationInfo = function (feedId, commentCount) {
|
|
98
|
+
var params = {
|
|
99
|
+
TemplateFeedId: feedId,
|
|
100
|
+
commentCount: commentCount
|
|
101
|
+
};
|
|
102
|
+
getOperation(params).then(function (res) {
|
|
103
|
+
if (res.Code === 1) {
|
|
104
|
+
var data = res.Data;
|
|
105
|
+
console.log('data', data);
|
|
106
|
+
|
|
107
|
+
var newOperationTrackList = _this.formatCommentsDate(data.comments ? data.comments : []);
|
|
108
|
+
|
|
109
|
+
_this.setState({
|
|
110
|
+
operationTrackList: newOperationTrackList,
|
|
111
|
+
operationTrackTotal: data.total
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
|
|
89
117
|
_this.formatCommentsDate = function (comments) {
|
|
90
118
|
var thisYear = (0, _moment["default"])().year(); // 获取当前年份
|
|
91
119
|
|
|
@@ -132,13 +160,20 @@ var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
|
132
160
|
_this.handlerSwitchShowRecord = function () {
|
|
133
161
|
var _this$props = _this.props,
|
|
134
162
|
feedId = _this$props.feedId,
|
|
135
|
-
commentCount = _this$props.commentCount
|
|
163
|
+
commentCount = _this$props.commentCount,
|
|
164
|
+
isSummaryTemplate = _this$props.isSummaryTemplate; // 默认展示条数
|
|
136
165
|
|
|
137
166
|
var operationTrackTotal = _this.state.operationTrackTotal; // 记录总数
|
|
138
167
|
|
|
139
168
|
var isShowAllOperationRecord = _this.state.isShowAllOperationRecord;
|
|
140
|
-
isShowAllOperationRecord = !isShowAllOperationRecord;
|
|
141
|
-
isShowAllOperationRecord ?
|
|
169
|
+
isShowAllOperationRecord = !isShowAllOperationRecord; // isShowAllOperationRecord ? this.getFeedInfo(feedId, operationTrackTotal) : this.getFeedInfo(feedId, commentCount);
|
|
170
|
+
// isShowAllOperationRecord ? this.getOperationInfo(feedId, operationTrackTotal) : this.getOperationInfo(feedId, commentCount);
|
|
171
|
+
|
|
172
|
+
if (isSummaryTemplate) {
|
|
173
|
+
isShowAllOperationRecord ? _this.getOperationInfo(feedId, operationTrackTotal) : _this.getOperationInfo(feedId, commentCount);
|
|
174
|
+
} else {
|
|
175
|
+
isShowAllOperationRecord ? _this.getFeedInfo(feedId, operationTrackTotal) : _this.getFeedInfo(feedId, commentCount);
|
|
176
|
+
}
|
|
142
177
|
|
|
143
178
|
_this.setState({
|
|
144
179
|
isShowAllOperationRecord: isShowAllOperationRecord
|
|
@@ -158,10 +193,17 @@ var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
|
158
193
|
value: function componentDidMount() {
|
|
159
194
|
var _this$props2 = this.props,
|
|
160
195
|
feedId = _this$props2.feedId,
|
|
161
|
-
commentCount = _this$props2.commentCount
|
|
196
|
+
commentCount = _this$props2.commentCount,
|
|
197
|
+
isSummaryTemplate = _this$props2.isSummaryTemplate;
|
|
162
198
|
|
|
163
199
|
if (feedId) {
|
|
164
|
-
this.getFeedInfo(feedId, commentCount);
|
|
200
|
+
// this.getFeedInfo(feedId, commentCount);
|
|
201
|
+
// this.getOperationInfo(feedId, commentCount);
|
|
202
|
+
if (isSummaryTemplate) {
|
|
203
|
+
this.getOperationInfo(feedId, commentCount);
|
|
204
|
+
} else {
|
|
205
|
+
this.getFeedInfo(feedId, commentCount);
|
|
206
|
+
}
|
|
165
207
|
}
|
|
166
208
|
}
|
|
167
209
|
}, {
|
|
@@ -170,8 +212,14 @@ var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
|
170
212
|
if (prevProps.feedId != this.props.feedId) {
|
|
171
213
|
var _this$props3 = this.props,
|
|
172
214
|
feedId = _this$props3.feedId,
|
|
173
|
-
commentCount = _this$props3.commentCount
|
|
174
|
-
|
|
215
|
+
commentCount = _this$props3.commentCount,
|
|
216
|
+
isSummaryTemplate = _this$props3.isSummaryTemplate;
|
|
217
|
+
|
|
218
|
+
if (isSummaryTemplate) {
|
|
219
|
+
this.getOperationInfo(feedId, commentCount);
|
|
220
|
+
} else {
|
|
221
|
+
this.getFeedInfo(feedId, commentCount);
|
|
222
|
+
}
|
|
175
223
|
}
|
|
176
224
|
}
|
|
177
225
|
/**
|
|
@@ -60,13 +60,14 @@ var PromiseConfirm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
60
60
|
reject: function reject() {}
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
var handleCancelBtnClick = function handleCancelBtnClick() {
|
|
63
|
+
var handleCancelBtnClick = function handleCancelBtnClick(e) {
|
|
64
|
+
e.stopPropagation();
|
|
64
65
|
onCancel();
|
|
65
66
|
dialogPromise.current.reject();
|
|
66
67
|
setVisible(false);
|
|
67
68
|
};
|
|
68
69
|
|
|
69
|
-
var handleConfirmBtnClick = function handleConfirmBtnClick() {
|
|
70
|
+
var handleConfirmBtnClick = function handleConfirmBtnClick(e) {
|
|
70
71
|
if (onConfirm) {
|
|
71
72
|
onConfirm();
|
|
72
73
|
}
|
|
@@ -19,7 +19,7 @@ var _getLocale = require("../../utils/getLocale");
|
|
|
19
19
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["selected", "controlValue", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder"];
|
|
22
|
+
var _excluded = ["selected", "controlValue", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder", "dropdownClassName"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
@@ -67,6 +67,7 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
67
67
|
placeholder = _ref$placeholder === void 0 ? "".concat((0, _getLocale.getLocale)("Mod_Pleaseselect")) : _ref$placeholder,
|
|
68
68
|
name = _ref.name,
|
|
69
69
|
noBorder = _ref.noBorder,
|
|
70
|
+
dropdownClassName = _ref.dropdownClassName,
|
|
70
71
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
71
72
|
|
|
72
73
|
var _useState = (0, _react.useState)(selected),
|
|
@@ -88,7 +89,7 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
88
89
|
className: preCls
|
|
89
90
|
}, /*#__PURE__*/_react["default"].createElement(_rcSelect["default"], _extends({
|
|
90
91
|
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(preCls, "-noborder"), noBorder)),
|
|
91
|
-
dropdownClassName: (0, _classnames["default"])("titaui-dropDown", _defineProperty({}, "".concat(preCls, "-hasSelectItem"), mode === "multiple")),
|
|
92
|
+
dropdownClassName: (0, _classnames["default"])(dropdownClassName, "titaui-dropDown", _defineProperty({}, "".concat(preCls, "-hasSelectItem"), mode === "multiple")),
|
|
92
93
|
value: value,
|
|
93
94
|
style: style,
|
|
94
95
|
mode: mode,
|
|
@@ -109,7 +110,8 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
109
110
|
}, restProps), data.map(function (item, key) {
|
|
110
111
|
return /*#__PURE__*/_react["default"].createElement(_rcSelect.Option, {
|
|
111
112
|
key: key,
|
|
112
|
-
value: item.value
|
|
113
|
+
value: item.value,
|
|
114
|
+
disabled: item === null || item === void 0 ? void 0 : item.disabled
|
|
113
115
|
}, item.label);
|
|
114
116
|
})));
|
|
115
117
|
};
|
|
@@ -117,11 +117,7 @@ function PageLayout(props) {
|
|
|
117
117
|
|
|
118
118
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
119
|
className: (0, _classnames["default"])(preCls)
|
|
120
|
-
},
|
|
121
|
-
className: "".concat(preCls, "__update-tip")
|
|
122
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
123
|
-
className: "tu-icon-tishi update-tip-icon"
|
|
124
|
-
}), "\u4EB2\u7231\u7684\u7528\u6237\u60A8\u597D\uFF0C\u300C\u603B\u7ED3\u300D\u5C06\u4E8E\u4ECA\u665A\u8FDB\u884C\u5347\u7EA7\uFF0C22:30 - 23:00 \u5C06\u6682\u65F6\u5173\u95ED\u603B\u7ED3\u6A21\u5757\uFF0C\u8BF7\u4E8E 8.25 22:00 - \u6B21\u65E5 7:00 \u6682\u505C\u603B\u7ED3\u7684\u7F16\u8F91\u4E0E\u63D0\u4EA4\u64CD\u4F5C\uFF0C\u611F\u8C22\u60A8\u7684\u7406\u89E3\u4E0E\u914D\u5408~"), hideNavTop !== 'true' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
120
|
+
}, hideNavTop !== 'true' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
121
|
className: (0, _classnames["default"])("".concat(preCls, "__header"))
|
|
126
122
|
}, (0, _helpers.getTenantInfo)().Source === 964 ? /*#__PURE__*/_react["default"].createElement(_hrHeader["default"], null) : /*#__PURE__*/_react["default"].createElement(_navTop["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
123
|
className: (0, _classnames["default"])("".concat(preCls, "__message"))
|