@titaui/pc 1.13.2-beta.10 → 1.13.2-beta.11
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/create-okr-modal/index.js +1 -4
- package/lib/components/dialog-upload/util.js +1 -19
- 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.css +0 -29
- package/lib/components/file-list/components/single-file/index.js +28 -18
- 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/nav-top/index.css +0 -6
- package/lib/components/nav-top/index.js +2 -138
- package/lib/components/nav-top/request.apis.js +2 -10
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor-at/index.js +94 -13
- package/lib/components/scroll-container/index.js +6 -27
- package/lib/components/search-input/index.css +2 -2
- package/lib/components/search-input/index.js +0 -4
- package/lib/components/upload/index.js +455 -257
- package/lib/index.js +0 -8
- package/lib/utils/tools.js +1 -11
- package/package.json +2 -2
- package/lib/components/checkbox-list/index.css +0 -31
- package/lib/components/checkbox-list/index.js +0 -68
- package/lib/components/dialog-qq-docs/index.css +0 -105
- package/lib/components/dialog-qq-docs/index.js +0 -499
- package/lib/components/dialog-qq-docs/request-apis.js +0 -16
- package/lib/components/dialog-qq-docs/utils.js +0 -83
- package/lib/components/dialog-select/index.css +0 -9
- package/lib/components/dialog-select/index.js +0 -48
- package/lib/components/dialog-upload/img/folder.svg +0 -40
- package/lib/components/dialog-upload/img/form.svg +0 -38
- package/lib/components/dialog-upload/img/mind.svg +0 -39
- 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 -43
- 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 -28
- package/lib/components/loading/index.js +0 -64
- package/lib/components/nav/index.css +0 -36
- package/lib/components/nav/index.js +0 -31
- package/lib/components/okr-guide/constant.js +0 -23
- package/lib/components/okr-guide/img/left-img.png +0 -0
- package/lib/components/okr-guide/index.css +0 -146
- package/lib/components/okr-guide/index.js +0 -244
- package/lib/components/okr-guide/request-api.js +0 -57
- package/lib/components/upload/upload.js +0 -555
|
@@ -132,9 +132,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
132
132
|
_ref$onClose = _ref.onClose,
|
|
133
133
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
134
134
|
_ref$isFromAssess = _ref.isFromAssess,
|
|
135
|
-
isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess
|
|
136
|
-
_ref$asyncOpenBookDem = _ref.asyncOpenBookDemoFun,
|
|
137
|
-
asyncOpenBookDemoFun = _ref$asyncOpenBookDem === void 0 ? function () {} : _ref$asyncOpenBookDem;
|
|
135
|
+
isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess;
|
|
138
136
|
|
|
139
137
|
var _useState = (0, _react.useState)('initialization'),
|
|
140
138
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -350,7 +348,6 @@ function CreateOkrModal(_ref, ref) {
|
|
|
350
348
|
var hideCreateOkrModal = (0, _react.useCallback)(function () {
|
|
351
349
|
onClose && onClose();
|
|
352
350
|
setVisible(false);
|
|
353
|
-
asyncOpenBookDemoFun && asyncOpenBookDemoFun();
|
|
354
351
|
}, []);
|
|
355
352
|
(0, _react.useEffect)(function () {
|
|
356
353
|
setVisible(visible);
|
|
@@ -19,12 +19,6 @@ var _video = _interopRequireDefault(require("./img/video.svg"));
|
|
|
19
19
|
|
|
20
20
|
var _xls = _interopRequireDefault(require("./img/xls.svg"));
|
|
21
21
|
|
|
22
|
-
var _folder = _interopRequireDefault(require("./img/folder.svg"));
|
|
23
|
-
|
|
24
|
-
var _form = _interopRequireDefault(require("./img/form.svg"));
|
|
25
|
-
|
|
26
|
-
var _mind = _interopRequireDefault(require("./img/mind.svg"));
|
|
27
|
-
|
|
28
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
23
|
|
|
30
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -66,7 +60,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
|
|
|
66
60
|
return _video["default"];
|
|
67
61
|
}
|
|
68
62
|
|
|
69
|
-
if (/^(pptx|ppt
|
|
63
|
+
if (/^(pptx|ppt)$/.test(fileType.toLowerCase())) {
|
|
70
64
|
return _ppt["default"];
|
|
71
65
|
}
|
|
72
66
|
|
|
@@ -82,18 +76,6 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
|
|
|
82
76
|
return _pdf["default"];
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
if (/^(folder)$/.test(fileType.toLowerCase())) {
|
|
86
|
-
return _folder["default"];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (/^(form)$/.test(fileType.toLowerCase())) {
|
|
90
|
-
return _form["default"];
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (/^(mind)$/.test(fileType.toLowerCase())) {
|
|
94
|
-
return _mind["default"];
|
|
95
|
-
}
|
|
96
|
-
|
|
97
79
|
return _other["default"];
|
|
98
80
|
};
|
|
99
81
|
|
|
@@ -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;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.titaui-new-file-list-single-file__file-preview {
|
|
7
|
-
position: relative;
|
|
8
7
|
width: 120px;
|
|
9
8
|
height: 120px;
|
|
10
9
|
border-radius: 12px;
|
|
@@ -13,7 +12,6 @@
|
|
|
13
12
|
justify-content: center;
|
|
14
13
|
margin-right: 10px;
|
|
15
14
|
background: #f0f2f5;
|
|
16
|
-
cursor: pointer;
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
.titaui-new-file-list-single-file__file-preview-img {
|
|
@@ -34,33 +32,6 @@
|
|
|
34
32
|
margin-right: 10px;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
.titaui-new-file-list-single-file__file-preview:hover .titaui-new-file-list-single-file__download-line {
|
|
38
|
-
height: 30px;
|
|
39
|
-
opacity: 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.titaui-new-file-list-single-file__download-line {
|
|
43
|
-
position: absolute;
|
|
44
|
-
width: 100%;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
color: #fff;
|
|
47
|
-
background: rgba(20, 28, 40, 0.2);
|
|
48
|
-
backdrop-filter: blur(2px);
|
|
49
|
-
line-height: 30px;
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
border-radius: 0px 0px 10px 10px;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
height: 0;
|
|
56
|
-
opacity: 0;
|
|
57
|
-
transition: height .2s, opacity .3s;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.titaui-new-file-list-single-file__download-line__icon {
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
35
|
.titaui-new-file-list-single-file__operate {
|
|
65
36
|
position: absolute;
|
|
66
37
|
top: 0;
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
28
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
31
|
|
|
30
32
|
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."); }
|
|
@@ -42,8 +44,6 @@ var prefix = 'titaui-new-file-list-single-file';
|
|
|
42
44
|
var SingleFile = function SingleFile(_ref) {
|
|
43
45
|
var data = _ref.data,
|
|
44
46
|
index = _ref.index,
|
|
45
|
-
_ref$link = _ref.link,
|
|
46
|
-
link = _ref$link === void 0 ? false : _ref$link,
|
|
47
47
|
onPreview = _ref.onPreview,
|
|
48
48
|
showDownload = _ref.showDownload;
|
|
49
49
|
|
|
@@ -72,30 +72,40 @@ var SingleFile = function SingleFile(_ref) {
|
|
|
72
72
|
|
|
73
73
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
74
|
className: prefix
|
|
75
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
+
}, isMouseEnter && /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
+
className: "".concat(prefix, "__operate"),
|
|
77
|
+
onMouseLeave: handleMouseLeave
|
|
78
|
+
}, showDownload && /*#__PURE__*/_react["default"].createElement("a", {
|
|
79
|
+
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__not-preview"), !canPreview || !data.previewUrl)),
|
|
80
|
+
href: data.downloadUrl
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
82
|
+
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__operate-item-icon"))
|
|
83
|
+
}), (0, _getLocale.getLocale)('Mod_Download')), !isImg && canPreview && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
84
|
+
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
85
|
+
href: data.previewUrl,
|
|
86
|
+
target: "_blank",
|
|
87
|
+
rel: "noreferrer"
|
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
89
|
+
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
90
|
+
}), (0, _getLocale.getLocale)('Mod_Preview')), isImg && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
91
|
+
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
92
|
+
onClick: handlePreviewImg
|
|
93
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
94
|
+
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
95
|
+
}), (0, _getLocale.getLocale)('Mod_Preview'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
96
|
className: (0, _classnames["default"])("".concat(prefix, "__file-preview")),
|
|
77
97
|
onMouseEnter: handleMouseEnter,
|
|
78
98
|
style: {
|
|
79
99
|
backgroundColor: backGroundColor
|
|
80
100
|
}
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
82
|
-
className: "".concat(prefix, "__download-line")
|
|
83
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
84
|
-
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__download-line__icon"))
|
|
85
|
-
}), (0, _getLocale.getLocale)('Mod_Download')), isImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
101
|
+
}, isImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
86
102
|
className: "".concat(prefix, "__file-preview-img"),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}), (!isImg && canPreview && data.previewUrl || link) && /*#__PURE__*/_react["default"].createElement("a", {
|
|
91
|
-
className: "".concat(prefix, "__file-preview-other"),
|
|
92
|
-
href: data.previewUrl,
|
|
93
|
-
target: "_blank",
|
|
94
|
-
rel: "noreferrer"
|
|
103
|
+
src: data.previewUrl || data.bigImageUrl
|
|
104
|
+
}), !isImg && /*#__PURE__*/_react["default"].createElement("div", {
|
|
105
|
+
className: "".concat(prefix, "__file-preview-other")
|
|
95
106
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
96
107
|
className: "".concat(prefix, "__file-preview-other-img"),
|
|
97
|
-
src: fileImg
|
|
98
|
-
alt: ""
|
|
108
|
+
src: fileImg
|
|
99
109
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
110
|
className: "".concat(prefix, "__file-name")
|
|
101
111
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
@@ -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")
|