@titaui/pc 1.13.2-beta.1 → 1.13.2-beta.12
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/okr-progress/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +12 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +13 -2
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +56 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +16 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +51 -9
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +27 -10
- package/lib/components/dynamic/dynamic-item/index.js +23 -3
- package/lib/components/dynamic/request-api.js +9 -2
- package/lib/components/file-list/components/single-file/index.js +1 -3
- package/lib/components/file-list/index.js +1 -2
- package/lib/components/nav-top/components/app-center/index.js +1 -6
- package/lib/components/nav-top/components/menu/index.js +14 -44
- package/lib/components/rich-editor-at/index.js +85 -13
- package/lib/components/scroll-container/index.js +6 -27
- package/lib/components/search-input/index.js +0 -3
- package/lib/components/upload/index.js +456 -260
- package/lib/utils/tools.js +1 -11
- package/package.json +2 -2
- package/lib/components/checkbox-list/index.css +0 -18
- package/lib/components/checkbox-list/index.js +0 -66
- package/lib/components/dialog-qq-docs/index.css +0 -90
- package/lib/components/dialog-qq-docs/index.js +0 -488
- package/lib/components/dialog-qq-docs/request-apis.js +0 -16
- package/lib/components/dialog-qq-docs/utils.js +0 -76
- package/lib/components/dialog-select/index.css +0 -9
- package/lib/components/dialog-select/index.js +0 -48
- package/lib/components/dialog-upload-type/assets/folder.svg +0 -20
- package/lib/components/dialog-upload-type/assets/qq-docs.svg +0 -20
- package/lib/components/dialog-upload-type/components/upload-type-item/index.css +0 -14
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +0 -36
- package/lib/components/dialog-upload-type/index.css +0 -7
- package/lib/components/dialog-upload-type/index.js +0 -75
- package/lib/components/file-preview/index.css +0 -37
- package/lib/components/file-preview/index.js +0 -68
- package/lib/components/loading/assets/loading.gif +0 -0
- package/lib/components/loading/index.css +0 -23
- package/lib/components/loading/index.js +0 -30
- package/lib/components/nav/index.css +0 -23
- package/lib/components/nav/index.js +0 -31
- package/lib/components/upload/upload.js +0 -555
|
@@ -111,7 +111,8 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
111
111
|
return /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_tableRowOkr["default"], {
|
|
112
112
|
text: item.Name,
|
|
113
113
|
isO: true,
|
|
114
|
-
id: item.Id
|
|
114
|
+
id: item.Id,
|
|
115
|
+
data: item
|
|
115
116
|
})), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_progress["default"], {
|
|
116
117
|
type: "o",
|
|
117
118
|
status: _constant.OkrRiskMapping[item.RiskLevel],
|
|
@@ -20,6 +20,18 @@
|
|
|
20
20
|
margin-top: 4px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
.titaui-dynamic-summary-table-row-okr__common-time {
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
padding: 1px 8px;
|
|
26
|
+
background-color: rgba(40, 121, 255, 0.16);
|
|
27
|
+
border-radius: 12px;
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
color: #3F4755;
|
|
31
|
+
line-height: 18px;
|
|
32
|
+
margin-left: 4px;
|
|
33
|
+
}
|
|
34
|
+
|
|
23
35
|
.titaui-dynamic-summary-table-row-okr__kr {
|
|
24
36
|
margin-left: 24px;
|
|
25
37
|
overflow: hidden;
|
|
@@ -13,6 +13,8 @@ var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
|
13
13
|
|
|
14
14
|
var _drawerManager = _interopRequireDefault(require("../../../../drawer-manager"));
|
|
15
15
|
|
|
16
|
+
var _utils = require("./utils");
|
|
17
|
+
|
|
16
18
|
var _openData = require("../../../../../utils/open-data");
|
|
17
19
|
|
|
18
20
|
require("./index.css");
|
|
@@ -29,7 +31,8 @@ var TableRowOKR = function TableRowOKR(_ref) {
|
|
|
29
31
|
_ref$isFirstLevel = _ref.isFirstLevel,
|
|
30
32
|
isFirstLevel = _ref$isFirstLevel === void 0 ? true : _ref$isFirstLevel,
|
|
31
33
|
_ref$order = _ref.order,
|
|
32
|
-
order = _ref$order === void 0 ? 1 : _ref$order
|
|
34
|
+
order = _ref$order === void 0 ? 1 : _ref$order,
|
|
35
|
+
data = _ref.data;
|
|
33
36
|
|
|
34
37
|
var handleClickTitle = function handleClickTitle() {
|
|
35
38
|
if (isO) {
|
|
@@ -54,7 +57,15 @@ var TableRowOKR = function TableRowOKR(_ref) {
|
|
|
54
57
|
onClick: handleClickTitle
|
|
55
58
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
56
59
|
className: "tu-icon-H5-".concat(isO ? "O" : "KR", "-s ").concat(prefix, "__common-icon")
|
|
57
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(text))
|
|
60
|
+
}), /*#__PURE__*/_react["default"].createElement("p", null, /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(text)), isO && /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
+
className: "".concat(prefix, "__common-time")
|
|
62
|
+
}, (0, _utils.formatPeriod)({
|
|
63
|
+
annualNum: data.AnnualNum,
|
|
64
|
+
yqmNum: data.YqmNum,
|
|
65
|
+
cycleType: data.CycleType,
|
|
66
|
+
startDate: data.StartDate,
|
|
67
|
+
endDate: data.EndDate
|
|
68
|
+
})))), !isFirstLevel && /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
69
|
className: (0, _classnames["default"])("".concat(prefix, "__kr")),
|
|
59
70
|
onClick: handleClickTitle
|
|
60
71
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatPeriod = void 0;
|
|
7
|
+
|
|
8
|
+
var _getLocale = require("../../../../../utils/getLocale");
|
|
9
|
+
|
|
10
|
+
var _constant = require("../../../../../utils/constant");
|
|
11
|
+
|
|
12
|
+
var formatPeriod = function formatPeriod(selected) {
|
|
13
|
+
if (!selected) return "";
|
|
14
|
+
var quarter = ["", "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_1stQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_2ndQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_3rdQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_4thQuarter"))];
|
|
15
|
+
var cycleDate = "";
|
|
16
|
+
var annualNum = Number("".concat(selected.annualNum)) === -1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_Allyears")) : "".concat(selected.annualNum).concat(_getLocale.isEn ? "" : "年");
|
|
17
|
+
var month = (0, _constant.getMonth)();
|
|
18
|
+
|
|
19
|
+
switch ("".concat(selected.cycleType)) {
|
|
20
|
+
case "-1":
|
|
21
|
+
cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStatee"));
|
|
22
|
+
break;
|
|
23
|
+
|
|
24
|
+
case "1":
|
|
25
|
+
cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Year"));
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case "2":
|
|
29
|
+
// 季度
|
|
30
|
+
cycleDate = quarter[Number(selected.yqmNum)];
|
|
31
|
+
break;
|
|
32
|
+
|
|
33
|
+
case "3":
|
|
34
|
+
cycleDate = month[Number(selected.yqmNum) - 1];
|
|
35
|
+
break;
|
|
36
|
+
|
|
37
|
+
case "4":
|
|
38
|
+
cycleDate = "".concat(month[Number(selected.yqmNum) - 1], " - ").concat(month[((Number(selected.yqmNum) + 1) % 12 || 12) - 1]);
|
|
39
|
+
break;
|
|
40
|
+
|
|
41
|
+
case "5":
|
|
42
|
+
cycleDate = Number("".concat(selected.yqmNum)) === 1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Firsthalf")) : "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Secondhalf"));
|
|
43
|
+
break;
|
|
44
|
+
|
|
45
|
+
default:
|
|
46
|
+
cycleDate = "".concat((0, _getLocale.getLocale)('Mod_Customization'));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (Number(selected.cycleType) !== 0) {
|
|
50
|
+
return "".concat(annualNum, " ").concat(cycleDate);
|
|
51
|
+
} else {
|
|
52
|
+
return "".concat(cycleDate);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.formatPeriod = formatPeriod;
|
package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css
CHANGED
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
height: 32px;
|
|
28
28
|
background: #f0f4fa;
|
|
29
29
|
border-radius: 16px;
|
|
30
|
-
padding: 5px
|
|
30
|
+
padding: 5px 12px 5px 4px;
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
font-size: 14px;
|
|
33
33
|
color: #3f4755;
|
|
34
34
|
line-height: 22px;
|
|
35
|
+
position: relative;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
.titaui-dynamic-summary__remind-view__user-avatar {
|
|
@@ -41,3 +42,17 @@
|
|
|
41
42
|
.titaui-dynamic-summary__remind-view__user-name {
|
|
42
43
|
margin-left: 6px;
|
|
43
44
|
}
|
|
45
|
+
|
|
46
|
+
.titaui-dynamic-summary__remind-view__user-name-icon {
|
|
47
|
+
position: absolute;
|
|
48
|
+
right: 6px;
|
|
49
|
+
top: 8px;
|
|
50
|
+
width: 5px;
|
|
51
|
+
height: 5px;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
background-color: #A4ACB9;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.titaui-dynamic-summary__remind-view__user-name .hasRead {
|
|
57
|
+
background-color: #5AD8A6;
|
|
58
|
+
}
|
package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js
CHANGED
|
@@ -20,28 +20,70 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
20
20
|
var preCls = 'titaui-dynamic-summary__remind-view';
|
|
21
21
|
|
|
22
22
|
var RemindUserView = function RemindUserView(props) {
|
|
23
|
-
var data = props.data
|
|
24
|
-
|
|
23
|
+
var data = props.data,
|
|
24
|
+
curAtUser = props.curAtUser;
|
|
25
|
+
|
|
26
|
+
var _ref = data || {},
|
|
27
|
+
_ref$Departments = _ref.Departments,
|
|
28
|
+
Departments = _ref$Departments === void 0 ? [] : _ref$Departments,
|
|
29
|
+
_ref$Groups = _ref.Groups,
|
|
30
|
+
Groups = _ref$Groups === void 0 ? [] : _ref$Groups,
|
|
31
|
+
_ref$Users = _ref.Users,
|
|
32
|
+
Users = _ref$Users === void 0 ? [] : _ref$Users;
|
|
33
|
+
|
|
34
|
+
if (!data || !Departments.length && !Groups.length && !Users.length) return null;
|
|
25
35
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
36
|
className: preCls
|
|
27
37
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
38
|
className: "".concat(preCls, "__title")
|
|
29
|
-
}, (0, _getLocale.getLocale)(
|
|
39
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_himher")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
40
|
className: "".concat(preCls, "__list")
|
|
31
|
-
},
|
|
41
|
+
}, Users === null || Users === void 0 ? void 0 : Users.map(function (item) {
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
43
|
+
className: "".concat(preCls, "__user")
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
45
|
+
userId: item.User.UserId,
|
|
46
|
+
name: item.User.Name,
|
|
47
|
+
src: item.User.Avatar.Medium,
|
|
48
|
+
color: item.User.Avatar.Color
|
|
49
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
50
|
+
className: "".concat(preCls, "__user-name")
|
|
51
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
52
|
+
name: item.User.Name,
|
|
53
|
+
id: item.User.UserId
|
|
54
|
+
}), /*#__PURE__*/_react["default"].createElement("i", {
|
|
55
|
+
className: "".concat(preCls, "__user-name-icon ").concat((item.User.UserId === curAtUser || item.HasRead) && "hasRead")
|
|
56
|
+
})));
|
|
57
|
+
}), Departments === null || Departments === void 0 ? void 0 : Departments.map(function (item) {
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
|
+
className: "".concat(preCls, "__user")
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
+
className: "".concat(preCls, "__user-departments")
|
|
62
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
63
|
+
userId: item.Id,
|
|
64
|
+
name: item === null || item === void 0 ? void 0 : item.Name,
|
|
65
|
+
color: "#3296fa"
|
|
66
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
67
|
+
className: "".concat(preCls, "__user-name")
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
69
|
+
name: item === null || item === void 0 ? void 0 : item.Name,
|
|
70
|
+
id: item.Id
|
|
71
|
+
}))));
|
|
72
|
+
}), Groups === null || Groups === void 0 ? void 0 : Groups.map(function (item) {
|
|
32
73
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
74
|
className: "".concat(preCls, "__user")
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "".concat(preCls, "__user-groups")
|
|
34
77
|
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
35
|
-
userId: item.
|
|
78
|
+
userId: item.id,
|
|
36
79
|
name: item.name,
|
|
37
|
-
|
|
38
|
-
color: item.avatar.color
|
|
80
|
+
color: "rgb(90, 216, 166)"
|
|
39
81
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
40
82
|
className: "".concat(preCls, "__user-name")
|
|
41
83
|
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
42
84
|
name: item.name,
|
|
43
|
-
id: item.
|
|
44
|
-
})));
|
|
85
|
+
id: item.id
|
|
86
|
+
}))));
|
|
45
87
|
})));
|
|
46
88
|
};
|
|
47
89
|
|
|
@@ -98,6 +98,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
98
98
|
attachments = data.attachments,
|
|
99
99
|
evaluates = data.evaluates,
|
|
100
100
|
canEvaluate = data.canEvaluate;
|
|
101
|
+
var curAtUser = restProps.curAtUser;
|
|
101
102
|
var files = (0, _util.formatAttachments)(attachments);
|
|
102
103
|
|
|
103
104
|
var _useState = (0, _react.useState)(),
|
|
@@ -105,15 +106,20 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
105
106
|
motionValue = _useState2[0],
|
|
106
107
|
setMotionValue = _useState2[1];
|
|
107
108
|
|
|
108
|
-
var _useState3 = (0, _react.useState)(
|
|
109
|
+
var _useState3 = (0, _react.useState)(null),
|
|
109
110
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
atValue = _useState4[0],
|
|
112
|
+
setAtValue = _useState4[1];
|
|
112
113
|
|
|
113
114
|
var _useState5 = (0, _react.useState)(false),
|
|
114
115
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
showDelete = _useState6[0],
|
|
117
|
+
setShowDelete = _useState6[1];
|
|
118
|
+
|
|
119
|
+
var _useState7 = (0, _react.useState)(false),
|
|
120
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
121
|
+
showEdit = _useState8[0],
|
|
122
|
+
setShowEdit = _useState8[1];
|
|
117
123
|
|
|
118
124
|
var contentRichTextRef = (0, _react.useRef)();
|
|
119
125
|
var workPlanRichTextRef = (0, _react.useRef)();
|
|
@@ -121,10 +127,10 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
121
127
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
122
128
|
searchKeyWord = _useContext.searchKeyWord;
|
|
123
129
|
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
currentEvalutes =
|
|
127
|
-
setCurrentEvalutes =
|
|
130
|
+
var _useState9 = (0, _react.useState)(evaluates || []),
|
|
131
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
132
|
+
currentEvalutes = _useState10[0],
|
|
133
|
+
setCurrentEvalutes = _useState10[1];
|
|
128
134
|
|
|
129
135
|
var renderSuffix = /*#__PURE__*/_react["default"].createElement("span", {
|
|
130
136
|
className: (0, _classnames["default"])("".concat(prefix, "__complete-type"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "__complete-type--normal"), submitState === 1), _defineProperty(_classNames, "".concat(prefix, "__complete-type--delay"), submitState === 2), _classNames))
|
|
@@ -169,6 +175,16 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
169
175
|
setMotionValue(motion);
|
|
170
176
|
}
|
|
171
177
|
}, [dailyContent]);
|
|
178
|
+
(0, _react.useEffect)(function () {
|
|
179
|
+
if (dailyContent) {
|
|
180
|
+
var atData = dailyContent.find(function (item) {
|
|
181
|
+
return item.contentType === 5;
|
|
182
|
+
});
|
|
183
|
+
if (!(atData !== null && atData !== void 0 && atData.content)) return;
|
|
184
|
+
var atMotion = JSON.parse(atData.content || "{}");
|
|
185
|
+
setAtValue(atMotion);
|
|
186
|
+
}
|
|
187
|
+
}, [dailyContent]);
|
|
172
188
|
(0, _react.useEffect)(function () {
|
|
173
189
|
if (loginUserId === publishUser.userId) {
|
|
174
190
|
setShowDelete(true);
|
|
@@ -250,7 +266,8 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
250
266
|
editable: false,
|
|
251
267
|
enableDelete: false
|
|
252
268
|
})), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"], {
|
|
253
|
-
data:
|
|
269
|
+
data: atValue,
|
|
270
|
+
curAtUser: curAtUser
|
|
254
271
|
}), currentEvalutes && currentEvalutes.length !== 0 && /*#__PURE__*/_react["default"].createElement(_evalute["default"], {
|
|
255
272
|
evaluation: currentEvalutes[0],
|
|
256
273
|
feedId: feedId,
|
|
@@ -79,7 +79,9 @@ var _dynamicNewReport = _interopRequireDefault(require("./dynamic-new-report"));
|
|
|
79
79
|
|
|
80
80
|
var _dynamicDiscovery = _interopRequireDefault(require("./dynamic-discovery"));
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _requestApi = require("../request-api");
|
|
83
|
+
|
|
84
|
+
var _excluded = ["data", "onDeleteFeed", "dynamicShareIsShowToping", "detailCurAtUser"];
|
|
83
85
|
|
|
84
86
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
85
87
|
|
|
@@ -120,6 +122,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
120
122
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
121
123
|
|
|
122
124
|
var prefix = "titaui-dynamic-item";
|
|
125
|
+
var loginUserId = (0, _bsGlobal.getUserInfo)().Id;
|
|
123
126
|
|
|
124
127
|
var DynamicItem = function DynamicItem(_ref) {
|
|
125
128
|
var _getBSGlobal, _JSON$parse;
|
|
@@ -127,6 +130,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
127
130
|
var data = _ref.data,
|
|
128
131
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
129
132
|
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
|
|
133
|
+
detailCurAtUser = _ref.detailCurAtUser,
|
|
130
134
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
131
135
|
|
|
132
136
|
var feedId = data.feedId,
|
|
@@ -167,6 +171,11 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
167
171
|
upvoteModalVisible = _useState12[0],
|
|
168
172
|
setUpvoteModalVisible = _useState12[1];
|
|
169
173
|
|
|
174
|
+
var _useState13 = (0, _react.useState)(detailCurAtUser),
|
|
175
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
176
|
+
curAtUser = _useState14[0],
|
|
177
|
+
setCurAtUser = _useState14[1];
|
|
178
|
+
|
|
170
179
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
171
180
|
searchKeyWord = _useContext.searchKeyWord,
|
|
172
181
|
atAllText = _useContext.atAllText,
|
|
@@ -205,6 +214,16 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
205
214
|
});
|
|
206
215
|
}
|
|
207
216
|
|
|
217
|
+
if (data.feedType === _constant.EFeedType.Report && data.newSummary) {
|
|
218
|
+
(0, _requestApi.setSummaryAlreadyRead)({
|
|
219
|
+
feedId: feedId
|
|
220
|
+
}).then(function (res) {
|
|
221
|
+
if (res.Code === 1) {
|
|
222
|
+
setCurAtUser(+loginUserId);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
208
227
|
setIsFold(false);
|
|
209
228
|
};
|
|
210
229
|
|
|
@@ -294,7 +313,8 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
294
313
|
if (data.newSummary) {
|
|
295
314
|
return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], _extends({
|
|
296
315
|
data: data,
|
|
297
|
-
onDeleteFeed: onDeleteFeed
|
|
316
|
+
onDeleteFeed: onDeleteFeed,
|
|
317
|
+
curAtUser: curAtUser
|
|
298
318
|
}, restProps));
|
|
299
319
|
}
|
|
300
320
|
|
|
@@ -380,7 +400,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
380
400
|
default:
|
|
381
401
|
return null;
|
|
382
402
|
}
|
|
383
|
-
}, [data]);
|
|
403
|
+
}, [data, curAtUser]);
|
|
384
404
|
|
|
385
405
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
386
406
|
if (count === 0) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.topDynamic = exports.deleteDynamic = exports.collectDynamic = exports.cancelTopDynamic = exports.cancelCollectDynamic = void 0;
|
|
6
|
+
exports.topDynamic = exports.setSummaryAlreadyRead = exports.deleteDynamic = exports.collectDynamic = exports.cancelTopDynamic = exports.cancelCollectDynamic = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
@@ -43,4 +43,11 @@ var deleteDynamic = function deleteDynamic(_ref5) {
|
|
|
43
43
|
return (0, _request.rdelete)('v2')("user/feed/Delete?feed_id=".concat(feedId));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
exports.deleteDynamic = deleteDynamic;
|
|
46
|
+
exports.deleteDynamic = deleteDynamic;
|
|
47
|
+
|
|
48
|
+
var setSummaryAlreadyRead = function setSummaryAlreadyRead(_ref6) {
|
|
49
|
+
var feedId = _ref6.feedId;
|
|
50
|
+
return (0, _request.rpost)('v1')("summary/remind/read/".concat(feedId));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.setSummaryAlreadyRead = setSummaryAlreadyRead;
|
|
@@ -44,8 +44,6 @@ var prefix = 'titaui-new-file-list-single-file';
|
|
|
44
44
|
var SingleFile = function SingleFile(_ref) {
|
|
45
45
|
var data = _ref.data,
|
|
46
46
|
index = _ref.index,
|
|
47
|
-
_ref$link = _ref.link,
|
|
48
|
-
link = _ref$link === void 0 ? false : _ref$link,
|
|
49
47
|
onPreview = _ref.onPreview,
|
|
50
48
|
showDownload = _ref.showDownload;
|
|
51
49
|
|
|
@@ -82,7 +80,7 @@ var SingleFile = function SingleFile(_ref) {
|
|
|
82
80
|
href: data.downloadUrl
|
|
83
81
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
84
82
|
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__operate-item-icon"))
|
|
85
|
-
}), (0, _getLocale.getLocale)('Mod_Download')),
|
|
83
|
+
}), (0, _getLocale.getLocale)('Mod_Download')), !isImg && canPreview && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
86
84
|
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
87
85
|
href: data.previewUrl,
|
|
88
86
|
target: "_blank",
|
|
@@ -55,8 +55,7 @@ var FileList = function FileList(_ref) {
|
|
|
55
55
|
key: file.documentId + index,
|
|
56
56
|
data: file,
|
|
57
57
|
index: index,
|
|
58
|
-
showDownload: showDownload
|
|
59
|
-
link: file.documentSource === 5,
|
|
58
|
+
showDownload: showDownload,
|
|
60
59
|
onPreview: handleImgPreview
|
|
61
60
|
});
|
|
62
61
|
}), /*#__PURE__*/_react["default"].createElement(_imgViewer["default"], {
|
|
@@ -27,8 +27,6 @@ require("./index.css");
|
|
|
27
27
|
|
|
28
28
|
var _interface = require("./interface");
|
|
29
29
|
|
|
30
|
-
var _new = _interopRequireDefault(require("./images/new.svg"));
|
|
31
|
-
|
|
32
30
|
var _yuyueAward = _interopRequireDefault(require("./images/yuyue-award.png"));
|
|
33
31
|
|
|
34
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -190,10 +188,7 @@ var AppCenter = function AppCenter(props) {
|
|
|
190
188
|
className: "".concat(precls, "__app-item-name")
|
|
191
189
|
}, app.title), isTrial && /*#__PURE__*/_react["default"].createElement("span", {
|
|
192
190
|
className: "".concat(precls, "__app-item-sub-title")
|
|
193
|
-
}, app.subTitle))
|
|
194
|
-
src: _new["default"],
|
|
195
|
-
className: "".concat(precls, "__app-item-new")
|
|
196
|
-
}));
|
|
191
|
+
}, app.subTitle)));
|
|
197
192
|
}), new Array(20).fill(1).map(function () {
|
|
198
193
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
194
|
className: "".concat(precls, "__app-item-placeholder")
|
|
@@ -21,8 +21,6 @@ var _conditionRender = _interopRequireDefault(require("../../../../components/co
|
|
|
21
21
|
|
|
22
22
|
var _useGlobalValue3 = _interopRequireDefault(require("../../useGlobalValue"));
|
|
23
23
|
|
|
24
|
-
var _new = _interopRequireDefault(require("./img/new.svg"));
|
|
25
|
-
|
|
26
24
|
require("./index.css");
|
|
27
25
|
|
|
28
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -45,7 +43,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
45
43
|
|
|
46
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
45
|
|
|
48
|
-
var prefix =
|
|
46
|
+
var prefix = 'titaui-nav-top-menu';
|
|
49
47
|
var popupAlign = {
|
|
50
48
|
offset: [0, 5],
|
|
51
49
|
overflow: {
|
|
@@ -54,7 +52,7 @@ var popupAlign = {
|
|
|
54
52
|
},
|
|
55
53
|
targetOffset: [0, 0]
|
|
56
54
|
};
|
|
57
|
-
var NEWMENUS =
|
|
55
|
+
var NEWMENUS = '#summary/my';
|
|
58
56
|
|
|
59
57
|
var Menu = function Menu(_ref) {
|
|
60
58
|
var menus = _ref.menus,
|
|
@@ -75,7 +73,7 @@ var Menu = function Menu(_ref) {
|
|
|
75
73
|
feedNum = _useGlobalValue2[0];
|
|
76
74
|
|
|
77
75
|
var containerRef = (0, _react.useRef)();
|
|
78
|
-
var apiPath = (0, _bsGlobal.getBSGlobal)(
|
|
76
|
+
var apiPath = (0, _bsGlobal.getBSGlobal)('apiPath');
|
|
79
77
|
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
80
78
|
|
|
81
79
|
var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
|
|
@@ -84,14 +82,14 @@ var Menu = function Menu(_ref) {
|
|
|
84
82
|
|
|
85
83
|
var handleTracker = function handleTracker(menu) {
|
|
86
84
|
if (window.titaTracker) {
|
|
87
|
-
window.titaTracker(
|
|
85
|
+
window.titaTracker('action').record({
|
|
88
86
|
actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
|
|
89
|
-
actionGroup:
|
|
90
|
-
productName:
|
|
87
|
+
actionGroup: '导航菜单',
|
|
88
|
+
productName: '导航菜单'
|
|
91
89
|
});
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
if (menu.code ===
|
|
92
|
+
if (menu.code === 'dynamic' && feedNum > 0) {
|
|
95
93
|
window.location.reload();
|
|
96
94
|
}
|
|
97
95
|
};
|
|
@@ -114,7 +112,7 @@ var Menu = function Menu(_ref) {
|
|
|
114
112
|
var renderRawItem = function renderRawItem(menu) {
|
|
115
113
|
var href = menu.href;
|
|
116
114
|
|
|
117
|
-
if (menu.title ===
|
|
115
|
+
if (menu.title === 'Learning' || menu.code === 'learning') {
|
|
118
116
|
href = "".concat(apiPath, "/").concat(href);
|
|
119
117
|
}
|
|
120
118
|
|
|
@@ -122,44 +120,16 @@ var Menu = function Menu(_ref) {
|
|
|
122
120
|
component: "span"
|
|
123
121
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
124
122
|
condition: menu.id
|
|
125
|
-
},
|
|
126
|
-
/*#__PURE__*/
|
|
127
|
-
// <GuideTip
|
|
128
|
-
// visible={guideVisible}
|
|
129
|
-
// classnames={`${prefix}__guide`}
|
|
130
|
-
// type="button"
|
|
131
|
-
// content={
|
|
132
|
-
// <span className={`${prefix}__guide-content`}>
|
|
133
|
-
// {getLocale('Rep_NewS_SuyUgraOKR')}
|
|
134
|
-
// </span>
|
|
135
|
-
// }
|
|
136
|
-
// popupAlign={{
|
|
137
|
-
// offset: [0, 140],
|
|
138
|
-
// }}
|
|
139
|
-
// onClickClose={handleClickClose}
|
|
140
|
-
// >
|
|
141
|
-
_react["default"].createElement("a", {
|
|
142
|
-
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
|
|
143
|
-
href: href,
|
|
144
|
-
target: "_self",
|
|
145
|
-
onClick: function onClick() {
|
|
146
|
-
return handleTracker(menu);
|
|
147
|
-
}
|
|
148
|
-
}, menu.title, /*#__PURE__*/_react["default"].createElement("img", {
|
|
149
|
-
src: _new["default"],
|
|
150
|
-
alt: "",
|
|
151
|
-
className: "".concat(prefix, "__tips-new")
|
|
152
|
-
})) // </GuideTip>
|
|
153
|
-
, menu.href !== NEWMENUS && /*#__PURE__*/_react["default"].createElement("a", {
|
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
154
124
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
|
|
155
125
|
href: href,
|
|
156
126
|
target: "_self",
|
|
157
127
|
onClick: function onClick() {
|
|
158
128
|
return handleTracker(menu);
|
|
159
129
|
}
|
|
160
|
-
}, menu.title, menu.href ===
|
|
161
|
-
className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href ===
|
|
162
|
-
}, feedNum > 100 ?
|
|
130
|
+
}, menu.title, menu.href === '#dynamic' && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
131
|
+
className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === '#dynamic'))
|
|
132
|
+
}, feedNum > 100 ? '99+' : feedNum))));
|
|
163
133
|
};
|
|
164
134
|
|
|
165
135
|
var renderRest = function renderRest(items) {
|
|
@@ -173,7 +143,7 @@ var Menu = function Menu(_ref) {
|
|
|
173
143
|
}, items.map(function (menu) {
|
|
174
144
|
var href = menu.href;
|
|
175
145
|
|
|
176
|
-
if (menu.title ===
|
|
146
|
+
if (menu.title === 'Learning' || menu.code === 'learning') {
|
|
177
147
|
href = "".concat(apiPath, "/").concat(href);
|
|
178
148
|
}
|
|
179
149
|
|
|
@@ -194,7 +164,7 @@ var Menu = function Menu(_ref) {
|
|
|
194
164
|
popupPlacement: "bottomLeft",
|
|
195
165
|
popupAlign: popupAlign
|
|
196
166
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
197
|
-
className: (0, _classnames["default"])(
|
|
167
|
+
className: (0, _classnames["default"])('tu-icon-diot', "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
|
|
198
168
|
}));
|
|
199
169
|
};
|
|
200
170
|
|