@titaui/pc 1.15.19-beta.1 → 1.15.20-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +114 -90
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +50 -32
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +1 -1
- package/lib/components/nav-top/components/app-center/index.css +21 -0
- package/lib/components/nav-top/components/app-center/index.js +37 -3
- package/lib/components/nav-top/index.js +29 -2
- package/lib/components/nav-top/utils.js +5 -1
- package/lib/components/quick-entrance/img/canceled.svg +15 -0
- package/lib/components/quick-entrance/img/drag-icon.svg +18 -0
- package/lib/components/quick-entrance/img/ork.svg +20 -0
- package/lib/components/quick-entrance/img/performance.svg +20 -0
- package/lib/components/quick-entrance/img/project.svg +21 -0
- package/lib/components/quick-entrance/index.css +155 -0
- package/lib/components/quick-entrance/index.js +273 -0
- package/lib/components/quick-entrance/render-checkbox.js +35 -0
- package/lib/components/quick-entrance/render-item.js +36 -0
- package/lib/components/quick-entrance/request-api.js +22 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +6 -2
- package/lib/pages/personal-info/components/edit-base-info/index.js +3 -0
- package/package.json +2 -2
|
@@ -11,8 +11,12 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var Sentry = _interopRequireWildcard(require("@sentry/browser"));
|
|
15
|
+
|
|
14
16
|
var _richEditor = _interopRequireWildcard(require("@titaui/rich-editor"));
|
|
15
17
|
|
|
18
|
+
var _reactIntersectionObserver = require("react-intersection-observer");
|
|
19
|
+
|
|
16
20
|
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
17
21
|
|
|
18
22
|
var _context = require("../../context");
|
|
@@ -73,14 +77,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
73
77
|
|
|
74
78
|
var getEReportType = function getEReportType(type) {
|
|
75
79
|
var reportTextMap = {
|
|
76
|
-
8: (0, _getLocale.getLocale)(
|
|
77
|
-
26: (0, _getLocale.getLocale)(
|
|
78
|
-
27: (0, _getLocale.getLocale)(
|
|
80
|
+
8: (0, _getLocale.getLocale)('Rep_Tab_Dailynewspaper'),
|
|
81
|
+
26: (0, _getLocale.getLocale)('Rep_Tab_Weeklynewspaper'),
|
|
82
|
+
27: (0, _getLocale.getLocale)('Rep_Tab_MonthlyReport')
|
|
79
83
|
};
|
|
80
84
|
return reportTextMap[type];
|
|
81
85
|
};
|
|
82
86
|
|
|
83
|
-
var prefix =
|
|
87
|
+
var prefix = 'titaui-dynamic-new-report-item';
|
|
84
88
|
var loginUserId = (0, _bsGlobal.getUserInfo)().Id;
|
|
85
89
|
|
|
86
90
|
var DynamicReply = function DynamicReply(_ref) {
|
|
@@ -134,18 +138,95 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
134
138
|
|
|
135
139
|
var renderSuffix = /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
140
|
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))
|
|
137
|
-
}, submitState === 1 && (0, _getLocale.getLocale)(
|
|
141
|
+
}, submitState === 1 && (0, _getLocale.getLocale)('Rep_Tab_Mys_Submitontime'), submitState === 2 && (0, _getLocale.getLocale)('Tasks_Tab_DelaSubmission'));
|
|
138
142
|
|
|
139
143
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
140
144
|
var reportTextMap = {
|
|
141
|
-
8: (0, _getLocale.getLocale)(
|
|
142
|
-
26: (0, _getLocale.getLocale)(
|
|
143
|
-
27: (0, _getLocale.getLocale)(
|
|
145
|
+
8: (0, _getLocale.getLocale)('Rep_Tab_Mys_Dailynewsp'),
|
|
146
|
+
26: (0, _getLocale.getLocale)('Rep_Tab_Mys_sweeklyReport'),
|
|
147
|
+
27: (0, _getLocale.getLocale)('Rep_Tab_Sub_monthlyeport')
|
|
144
148
|
};
|
|
145
149
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
146
150
|
className: "".concat(prefix, "__operate-desc")
|
|
147
151
|
}, reportTextMap[reportType]);
|
|
148
152
|
}, [reportType]);
|
|
153
|
+
|
|
154
|
+
var renderContent = function renderContent() {
|
|
155
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
|
+
className: prefix
|
|
157
|
+
}, /*#__PURE__*/_react["default"].createElement(_summaryHeader["default"], _extends({
|
|
158
|
+
data: data
|
|
159
|
+
}, restProps, {
|
|
160
|
+
desc: renderDesc,
|
|
161
|
+
user: publishUser,
|
|
162
|
+
suffixContent: renderSuffix,
|
|
163
|
+
showDelete: showDelete,
|
|
164
|
+
showEdit: showEdit,
|
|
165
|
+
canEvaluate: canEvaluate && !currentEvalutes,
|
|
166
|
+
setEvaluates: setCurrentEvalutes
|
|
167
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
168
|
+
className: "".concat(prefix, "__content")
|
|
169
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
170
|
+
className: "".concat(prefix, "__content-title")
|
|
171
|
+
}, /*#__PURE__*/_react["default"].createElement(_title["default"], {
|
|
172
|
+
content: (0, _tools.htmlDecodeByRegExp)(data.name),
|
|
173
|
+
type: getEReportType(reportType),
|
|
174
|
+
typeBgColor: "rgba(92, 142, 255, 0.5)",
|
|
175
|
+
titleBgColor: "rgba(92, 142, 255, 0.1)",
|
|
176
|
+
contentColor: "#5C8EFF"
|
|
177
|
+
}), (motionValue === null || motionValue === void 0 ? void 0 : motionValue.img) && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
178
|
+
overlay: motionValue.tips,
|
|
179
|
+
placement: "top",
|
|
180
|
+
align: {
|
|
181
|
+
offset: [0, 5]
|
|
182
|
+
}
|
|
183
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
184
|
+
src: motionValue.img,
|
|
185
|
+
className: "".concat(prefix, "__content-mind"),
|
|
186
|
+
alt: ""
|
|
187
|
+
}))), dailyContent.map(function (item) {
|
|
188
|
+
if (item.contentType === _constant.dailyContentType.richText) {
|
|
189
|
+
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", {
|
|
190
|
+
className: "".concat(prefix, "__work"),
|
|
191
|
+
key: item.richContent || Math.random()
|
|
192
|
+
}, item.title === '工作总结' ? (0, _getLocale.getLocale)('Tasks_Tab_MyS_JobSummary') : (0, _getLocale.getLocale)('Rep_Tab_Mys_NextWorkPlans'), /*#__PURE__*/_react["default"].createElement(_richEditor["default"], null, /*#__PURE__*/_react["default"].createElement(_richEditor.EditorComponent, {
|
|
193
|
+
editable: false,
|
|
194
|
+
initialState: !!item.richContent ? JSON.parse(item.richContent || '{}') : undefined,
|
|
195
|
+
placeholder: (0, _getLocale.getLocale)('Rep_NewS_Notfilled')
|
|
196
|
+
}))));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (item.contentType === _constant.dailyContentType.okr) {
|
|
200
|
+
return item.content && /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
|
|
201
|
+
data: item.content,
|
|
202
|
+
reportType: data.reportType
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (item.contentType === _constant.dailyContentType.task) {
|
|
207
|
+
return item.content && /*#__PURE__*/_react["default"].createElement(_taskProgress["default"], {
|
|
208
|
+
data: item.content,
|
|
209
|
+
reportType: data.reportType
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}), files.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
213
|
+
className: "".concat(prefix, "__upload")
|
|
214
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditorUpload["default"], {
|
|
215
|
+
text: (0, _getLocale.getLocale)('Per_Ass_New_Err_Attachment'),
|
|
216
|
+
files: files,
|
|
217
|
+
editable: false,
|
|
218
|
+
enableDelete: false
|
|
219
|
+
})), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"], {
|
|
220
|
+
data: atValue,
|
|
221
|
+
curAtUser: curAtUser
|
|
222
|
+
}), currentEvalutes && currentEvalutes.length !== 0 && /*#__PURE__*/_react["default"].createElement(_evalute["default"], {
|
|
223
|
+
evaluation: currentEvalutes[0],
|
|
224
|
+
feedId: feedId,
|
|
225
|
+
publishUser: publishUser,
|
|
226
|
+
canEvaluate: canEvaluate
|
|
227
|
+
})));
|
|
228
|
+
};
|
|
229
|
+
|
|
149
230
|
(0, _react.useEffect)(function () {
|
|
150
231
|
setCurrentEvalutes(evaluates);
|
|
151
232
|
}, [evaluates]);
|
|
@@ -169,7 +250,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
169
250
|
var motion = _constant.Motion.find(function (item) {
|
|
170
251
|
var _JSON$parse$SelectedV;
|
|
171
252
|
|
|
172
|
-
return item.id === (((_JSON$parse$SelectedV = JSON.parse(mindData.content ||
|
|
253
|
+
return item.id === (((_JSON$parse$SelectedV = JSON.parse(mindData.content || '{}').SelectedValues) === null || _JSON$parse$SelectedV === void 0 ? void 0 : _JSON$parse$SelectedV[0]) || 0);
|
|
173
254
|
});
|
|
174
255
|
|
|
175
256
|
setMotionValue(motion);
|
|
@@ -181,7 +262,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
181
262
|
return item.contentType === 5;
|
|
182
263
|
});
|
|
183
264
|
if (!(atData !== null && atData !== void 0 && atData.content)) return;
|
|
184
|
-
var atMotion = JSON.parse(atData.content ||
|
|
265
|
+
var atMotion = JSON.parse(atData.content || '{}');
|
|
185
266
|
setAtValue(atMotion);
|
|
186
267
|
}
|
|
187
268
|
}, [dailyContent]);
|
|
@@ -190,90 +271,33 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
190
271
|
setShowDelete(true);
|
|
191
272
|
setShowEdit(true);
|
|
192
273
|
}
|
|
193
|
-
}, []);
|
|
194
|
-
// if (inview) {
|
|
195
|
-
// window.titaTracker("planAction").record({
|
|
196
|
-
// actionName: "查看日报",
|
|
197
|
-
// actionGroup: "动态-查看日报",
|
|
198
|
-
// productName: "动态",
|
|
199
|
-
// feedId,
|
|
200
|
-
// });
|
|
201
|
-
// }
|
|
202
|
-
// }
|
|
203
|
-
|
|
204
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
205
|
-
className: prefix
|
|
206
|
-
}, /*#__PURE__*/_react["default"].createElement(_summaryHeader["default"], _extends({
|
|
207
|
-
data: data
|
|
208
|
-
}, restProps, {
|
|
209
|
-
desc: renderDesc,
|
|
210
|
-
user: publishUser,
|
|
211
|
-
suffixContent: renderSuffix,
|
|
212
|
-
showDelete: showDelete,
|
|
213
|
-
showEdit: showEdit,
|
|
214
|
-
canEvaluate: canEvaluate && !currentEvalutes,
|
|
215
|
-
setEvaluates: setCurrentEvalutes
|
|
216
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
217
|
-
className: "".concat(prefix, "__content")
|
|
218
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
|
-
className: "".concat(prefix, "__content-title")
|
|
220
|
-
}, /*#__PURE__*/_react["default"].createElement(_title["default"], {
|
|
221
|
-
content: (0, _tools.htmlDecodeByRegExp)(data.name),
|
|
222
|
-
type: getEReportType(reportType),
|
|
223
|
-
typeBgColor: "rgba(92, 142, 255, 0.5)",
|
|
224
|
-
titleBgColor: "rgba(92, 142, 255, 0.1)",
|
|
225
|
-
contentColor: "#5C8EFF"
|
|
226
|
-
}), (motionValue === null || motionValue === void 0 ? void 0 : motionValue.img) && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
227
|
-
overlay: motionValue.tips,
|
|
228
|
-
placement: "top",
|
|
229
|
-
align: {
|
|
230
|
-
offset: [0, 5]
|
|
231
|
-
}
|
|
232
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
233
|
-
src: motionValue.img,
|
|
234
|
-
className: "".concat(prefix, "__content-mind"),
|
|
235
|
-
alt: ""
|
|
236
|
-
}))), dailyContent.map(function (item) {
|
|
237
|
-
if (item.contentType === _constant.dailyContentType.richText) {
|
|
238
|
-
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", {
|
|
239
|
-
className: "".concat(prefix, "__work"),
|
|
240
|
-
key: item.richContent || Math.random()
|
|
241
|
-
}, item.title === "工作总结" ? (0, _getLocale.getLocale)('Tasks_Tab_MyS_JobSummary') : (0, _getLocale.getLocale)('Rep_Tab_Mys_NextWorkPlans'), /*#__PURE__*/_react["default"].createElement(_richEditor["default"], null, /*#__PURE__*/_react["default"].createElement(_richEditor.EditorComponent, {
|
|
242
|
-
editable: false,
|
|
243
|
-
initialState: !!item.richContent ? JSON.parse(item.richContent || '{}') : undefined,
|
|
244
|
-
placeholder: (0, _getLocale.getLocale)('Rep_NewS_Notfilled')
|
|
245
|
-
}))));
|
|
246
|
-
}
|
|
274
|
+
}, []);
|
|
247
275
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
276
|
+
if (!window.IntersectionObserver) {
|
|
277
|
+
Sentry.withScope(function (scope) {
|
|
278
|
+
scope.setTag('error-level', "P0");
|
|
279
|
+
scope.setTag('error-type', '总结在 window 找不到 IntersectionObserver');
|
|
280
|
+
scope.setExtra('componentStack', '总结在 window 找不到 IntersectionObserver');
|
|
281
|
+
});
|
|
282
|
+
return renderContent();
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
var handleInView = function handleInView(inview) {
|
|
286
|
+
if (inview) {
|
|
287
|
+
window.titaTracker('planAction').record({
|
|
288
|
+
actionName: '查看日报',
|
|
289
|
+
actionGroup: '动态-查看日报',
|
|
290
|
+
productName: '动态',
|
|
291
|
+
feedId: feedId
|
|
252
292
|
});
|
|
253
293
|
}
|
|
294
|
+
};
|
|
254
295
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
}), files.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
262
|
-
className: "".concat(prefix, "__upload")
|
|
263
|
-
}, /*#__PURE__*/_react["default"].createElement(_richEditorUpload["default"], {
|
|
264
|
-
text: (0, _getLocale.getLocale)("Per_Ass_New_Err_Attachment"),
|
|
265
|
-
files: files,
|
|
266
|
-
editable: false,
|
|
267
|
-
enableDelete: false
|
|
268
|
-
})), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"], {
|
|
269
|
-
data: atValue,
|
|
270
|
-
curAtUser: curAtUser
|
|
271
|
-
}), currentEvalutes && currentEvalutes.length !== 0 && /*#__PURE__*/_react["default"].createElement(_evalute["default"], {
|
|
272
|
-
evaluation: currentEvalutes[0],
|
|
273
|
-
feedId: feedId,
|
|
274
|
-
publishUser: publishUser,
|
|
275
|
-
canEvaluate: canEvaluate
|
|
276
|
-
})));
|
|
296
|
+
return /*#__PURE__*/_react["default"].createElement(_reactIntersectionObserver.InView, {
|
|
297
|
+
triggerOnce: true,
|
|
298
|
+
onChange: handleInView,
|
|
299
|
+
threshold: 0.5
|
|
300
|
+
}, renderContent());
|
|
277
301
|
};
|
|
278
302
|
|
|
279
303
|
var _default = DynamicReply;
|
|
@@ -11,6 +11,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var Sentry = _interopRequireWildcard(require("@sentry/browser"));
|
|
15
|
+
|
|
16
|
+
var _reactIntersectionObserver = require("react-intersection-observer");
|
|
17
|
+
|
|
14
18
|
var _context = require("../../context");
|
|
15
19
|
|
|
16
20
|
var _header = _interopRequireDefault(require("../components/header"));
|
|
@@ -43,14 +47,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
43
47
|
|
|
44
48
|
var getEReportType = function getEReportType(type) {
|
|
45
49
|
var reportTextMap = {
|
|
46
|
-
8: (0, _getLocale.getLocale)(
|
|
47
|
-
26: (0, _getLocale.getLocale)(
|
|
48
|
-
27: (0, _getLocale.getLocale)(
|
|
50
|
+
8: (0, _getLocale.getLocale)('Rep_Tab_Dailynewspaper'),
|
|
51
|
+
26: (0, _getLocale.getLocale)('Rep_Tab_Weeklynewspaper'),
|
|
52
|
+
27: (0, _getLocale.getLocale)('Rep_Tab_MonthlyReport')
|
|
49
53
|
};
|
|
50
54
|
return reportTextMap[type];
|
|
51
55
|
};
|
|
52
56
|
|
|
53
|
-
var prefix =
|
|
57
|
+
var prefix = 'titaui-dynamic-report-item';
|
|
54
58
|
|
|
55
59
|
var DynamicReply = function DynamicReply(_ref) {
|
|
56
60
|
var data = _ref.data,
|
|
@@ -68,16 +72,16 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
68
72
|
|
|
69
73
|
var handleClickTitle = function handleClickTitle() {
|
|
70
74
|
if (window.titaTracker) {
|
|
71
|
-
window.titaTracker(
|
|
72
|
-
actionName:
|
|
73
|
-
actionGroup:
|
|
74
|
-
productName:
|
|
75
|
+
window.titaTracker('planAction').record({
|
|
76
|
+
actionName: '查看日报',
|
|
77
|
+
actionGroup: '动态-推屏',
|
|
78
|
+
productName: '动态',
|
|
75
79
|
feedId: feedId
|
|
76
80
|
});
|
|
77
81
|
} // @ts-ignore
|
|
78
82
|
|
|
79
83
|
|
|
80
|
-
window.Talent.app.vent.trigger(
|
|
84
|
+
window.Talent.app.vent.trigger('global-daily-detail-pull-screen', feedId);
|
|
81
85
|
};
|
|
82
86
|
|
|
83
87
|
var renderSuffix = (0, _react.useMemo)(function () {
|
|
@@ -85,13 +89,13 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
85
89
|
|
|
86
90
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
91
|
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))
|
|
88
|
-
}, submitState === 1 ? (0, _getLocale.getLocale)(
|
|
92
|
+
}, submitState === 1 ? (0, _getLocale.getLocale)('Rep_Tab_Mys_Submitontime') : (0, _getLocale.getLocale)('Tasks_Tab_DelaSubmission'));
|
|
89
93
|
}, []);
|
|
90
94
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
91
95
|
var reportTextMap = {
|
|
92
|
-
8: (0, _getLocale.getLocale)(
|
|
93
|
-
26: (0, _getLocale.getLocale)(
|
|
94
|
-
27: (0, _getLocale.getLocale)(
|
|
96
|
+
8: (0, _getLocale.getLocale)('Rep_Tab_Mys_Dailynewsp'),
|
|
97
|
+
26: (0, _getLocale.getLocale)('Rep_Tab_Mys_sweeklyReport'),
|
|
98
|
+
27: (0, _getLocale.getLocale)('Rep_Tab_Sub_monthlyeport')
|
|
95
99
|
};
|
|
96
100
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
97
101
|
className: "".concat(prefix, "__operate-desc")
|
|
@@ -106,21 +110,10 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
106
110
|
parentDom: workPlanRichTextRef.current,
|
|
107
111
|
keyWord: searchKeyWord
|
|
108
112
|
});
|
|
109
|
-
}, [data, searchKeyWord]);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// actionGroup: "动态-查看日报",
|
|
114
|
-
// productName: "动态",
|
|
115
|
-
// feedId,
|
|
116
|
-
// });
|
|
117
|
-
// }
|
|
118
|
-
// }
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
/*#__PURE__*/
|
|
122
|
-
// <InView triggerOnce={true} onChange={handleInView} threshold={0.5}>
|
|
123
|
-
_react["default"].createElement("div", {
|
|
113
|
+
}, [data, searchKeyWord]);
|
|
114
|
+
|
|
115
|
+
var renderContent = function renderContent() {
|
|
116
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
117
|
className: prefix
|
|
125
118
|
}, /*#__PURE__*/_react["default"].createElement(_header["default"], _extends({
|
|
126
119
|
data: data
|
|
@@ -143,7 +136,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
143
136
|
className: "".concat(prefix, "__summary")
|
|
144
137
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
145
138
|
className: "".concat(prefix, "__block-title")
|
|
146
|
-
}, (0, _getLocale.getLocale)(
|
|
139
|
+
}, (0, _getLocale.getLocale)('Rep_Tab_Mys_Summaryobsta')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
140
|
className: "".concat(prefix, "__content-text"),
|
|
148
141
|
ref: contentRichTextRef
|
|
149
142
|
}, /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
|
|
@@ -152,14 +145,39 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
152
145
|
className: "".concat(prefix, "__work-plan")
|
|
153
146
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
147
|
className: "".concat(prefix, "__block-title")
|
|
155
|
-
}, (0, _getLocale.getLocale)(
|
|
148
|
+
}, (0, _getLocale.getLocale)('Rep_Tab_Mys_NextWorkPlans')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
149
|
className: "".concat(prefix, "__content-text"),
|
|
157
150
|
ref: workPlanRichTextRef
|
|
158
151
|
}, /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
|
|
159
152
|
htmlText: data.workPlanRichText
|
|
160
|
-
})))))
|
|
153
|
+
})))));
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
if (!window.IntersectionObserver) {
|
|
157
|
+
Sentry.withScope(function (scope) {
|
|
158
|
+
scope.setTag('error-level', "P0");
|
|
159
|
+
scope.setTag('error-type', '总结在 window 找不到 IntersectionObserver');
|
|
160
|
+
scope.setExtra('componentStack', '总结在 window 找不到 IntersectionObserver');
|
|
161
|
+
});
|
|
162
|
+
return renderContent();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
var handleInView = function handleInView(inview) {
|
|
166
|
+
if (inview) {
|
|
167
|
+
window.titaTracker('planAction').record({
|
|
168
|
+
actionName: '查看日报',
|
|
169
|
+
actionGroup: '动态-查看日报',
|
|
170
|
+
productName: '动态',
|
|
171
|
+
feedId: feedId
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
};
|
|
161
175
|
|
|
162
|
-
|
|
176
|
+
return /*#__PURE__*/_react["default"].createElement(_reactIntersectionObserver.InView, {
|
|
177
|
+
triggerOnce: true,
|
|
178
|
+
onChange: handleInView,
|
|
179
|
+
threshold: 0.5
|
|
180
|
+
}, renderContent());
|
|
163
181
|
};
|
|
164
182
|
|
|
165
183
|
var _default = DynamicReply;
|
|
@@ -176,7 +176,7 @@ var _default = function _default() {
|
|
|
176
176
|
deWeightData[item.id] = item;
|
|
177
177
|
});
|
|
178
178
|
var result = Object.values(deWeightData);
|
|
179
|
-
setRawTreeData(
|
|
179
|
+
setRawTreeData([].concat(result));
|
|
180
180
|
setTreeData((0, _utils.toTree)(rawTreeData));
|
|
181
181
|
resolve(true);
|
|
182
182
|
});
|
|
@@ -98,6 +98,27 @@
|
|
|
98
98
|
color: #141c28;
|
|
99
99
|
line-height: 26px;
|
|
100
100
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: row;
|
|
103
|
+
align-items: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.app-center__app-item-name__right-btn {
|
|
107
|
+
min-width: 46px;
|
|
108
|
+
width: 46px !important;
|
|
109
|
+
height: 20px !important;
|
|
110
|
+
border-radius: 11px;
|
|
111
|
+
border: 1px solid #2879FF;
|
|
112
|
+
font-size: 12px;
|
|
113
|
+
font-weight: normal;
|
|
114
|
+
color: #2879FF;
|
|
115
|
+
line-height: 20px;
|
|
116
|
+
text-align: center;
|
|
117
|
+
margin-left: 8px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.app-center__app-item-name__right-btn:hover {
|
|
121
|
+
background-color: rgba(40, 121, 255, 0.1);
|
|
101
122
|
}
|
|
102
123
|
|
|
103
124
|
.app-center__app-item-sub-title {
|
|
@@ -29,6 +29,8 @@ var _interface = require("./interface");
|
|
|
29
29
|
|
|
30
30
|
var _yuyueAward = _interopRequireDefault(require("./images/yuyue-award.png"));
|
|
31
31
|
|
|
32
|
+
var _quickEntrance = _interopRequireDefault(require("../../../quick-entrance"));
|
|
33
|
+
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
35
|
|
|
34
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); }
|
|
@@ -87,6 +89,13 @@ var AppCenter = function AppCenter(props) {
|
|
|
87
89
|
isTrial = _useState6[0];
|
|
88
90
|
|
|
89
91
|
var _useState7 = (0, _react.useState)(function () {
|
|
92
|
+
console.log(apps);
|
|
93
|
+
var localCurrentAppId = localStorage.getItem("LocalCurrentAppId_".concat(userId));
|
|
94
|
+
|
|
95
|
+
if (localCurrentAppId) {
|
|
96
|
+
return Number(localCurrentAppId);
|
|
97
|
+
}
|
|
98
|
+
|
|
90
99
|
var hash = window.location.hash.split('?')[0] || '';
|
|
91
100
|
|
|
92
101
|
if (hash) {
|
|
@@ -102,6 +111,7 @@ var AppCenter = function AppCenter(props) {
|
|
|
102
111
|
currentAppId = _useState8[0],
|
|
103
112
|
setCurrentAppId = _useState8[1];
|
|
104
113
|
|
|
114
|
+
var QuickEntranceDialogRef = (0, _react.useRef)(null);
|
|
105
115
|
var bookDemoRef = (0, _react.useRef)();
|
|
106
116
|
(0, _react.useEffect)(function () {
|
|
107
117
|
setInit(true);
|
|
@@ -123,7 +133,7 @@ var AppCenter = function AppCenter(props) {
|
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
closeAppCenter();
|
|
126
|
-
}, [currentAppId]);
|
|
136
|
+
}, [currentAppId, init]);
|
|
127
137
|
|
|
128
138
|
var onAppSelectHandler = function onAppSelectHandler(app) {
|
|
129
139
|
if (app.type === 'newPage') {
|
|
@@ -131,7 +141,9 @@ var AppCenter = function AppCenter(props) {
|
|
|
131
141
|
return;
|
|
132
142
|
}
|
|
133
143
|
|
|
144
|
+
console.log(app);
|
|
134
145
|
setCurrentAppId(app.id);
|
|
146
|
+
localStorage.setItem("LocalCurrentAppId_".concat(userId), app.id.toString());
|
|
135
147
|
closeAppCenter();
|
|
136
148
|
};
|
|
137
149
|
|
|
@@ -163,6 +175,22 @@ var AppCenter = function AppCenter(props) {
|
|
|
163
175
|
}
|
|
164
176
|
};
|
|
165
177
|
|
|
178
|
+
var handleOpenQuickMenu = function handleOpenQuickMenu() {
|
|
179
|
+
var quickMenuId = 23859;
|
|
180
|
+
localStorage.setItem("LocalCurrentAppId_".concat(userId), quickMenuId.toString());
|
|
181
|
+
setTimeout(function () {
|
|
182
|
+
setCurrentAppId(quickMenuId);
|
|
183
|
+
location.reload();
|
|
184
|
+
}, 500);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
var handleSetting = function handleSetting(e) {
|
|
188
|
+
var _QuickEntranceDialogR;
|
|
189
|
+
|
|
190
|
+
e.stopPropagation();
|
|
191
|
+
(_QuickEntranceDialogR = QuickEntranceDialogRef.current) === null || _QuickEntranceDialogR === void 0 ? void 0 : _QuickEntranceDialogR.showDialog();
|
|
192
|
+
};
|
|
193
|
+
|
|
166
194
|
return /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
|
|
167
195
|
className: "".concat(precls, "__drawer"),
|
|
168
196
|
placement: "top",
|
|
@@ -170,7 +198,10 @@ var AppCenter = function AppCenter(props) {
|
|
|
170
198
|
visible: appCenterVisible,
|
|
171
199
|
width: "100%",
|
|
172
200
|
autoClosable: true
|
|
173
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
201
|
+
}, /*#__PURE__*/_react["default"].createElement(_quickEntrance["default"], {
|
|
202
|
+
ref: QuickEntranceDialogRef,
|
|
203
|
+
handleOpenQuickMenu: handleOpenQuickMenu
|
|
204
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
205
|
className: precls
|
|
175
206
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
207
|
className: "".concat(precls, "__app-list")
|
|
@@ -186,7 +217,10 @@ var AppCenter = function AppCenter(props) {
|
|
|
186
217
|
className: "".concat(precls, "__app-item-desc")
|
|
187
218
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
188
219
|
className: "".concat(precls, "__app-item-name")
|
|
189
|
-
}, app.title),
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, app.title), app.appId === 1 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
221
|
+
className: "".concat(precls, "__app-item-name__right-btn"),
|
|
222
|
+
onClick: handleSetting
|
|
223
|
+
}, "\u8BBE\u7F6E")), isTrial && /*#__PURE__*/_react["default"].createElement("span", {
|
|
190
224
|
className: "".concat(precls, "__app-item-sub-title")
|
|
191
225
|
}, app.subTitle)));
|
|
192
226
|
}), new Array(20).fill(1).map(function () {
|
|
@@ -172,13 +172,29 @@ var NavTop = function NavTop() {
|
|
|
172
172
|
window.WeixinJSBridge.invoke('openAppManage', {}, function (res) {
|
|
173
173
|
console.log(res.err_msg);
|
|
174
174
|
|
|
175
|
-
if (res.err_msg == 'openAppManage:ok') {
|
|
175
|
+
if (res.err_msg == 'openAppManage:ok') {
|
|
176
|
+
// 调用成功
|
|
177
|
+
if (window.titaTracker) {
|
|
178
|
+
window.titaTracker("action").record({
|
|
179
|
+
productName: "邀请同事",
|
|
180
|
+
actionGroup: "PC",
|
|
181
|
+
actionName: "\u7BA1\u7406\u5458\u70B9\u51FB\u5E76\u8FDB\u5165\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0"
|
|
182
|
+
});
|
|
183
|
+
}
|
|
176
184
|
} else {
|
|
177
185
|
if (!inviteVisible) {
|
|
178
186
|
setInviteVisible(true);
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
setInviteAuth(false);
|
|
190
|
+
|
|
191
|
+
if (window.titaTracker) {
|
|
192
|
+
window.titaTracker("action").record({
|
|
193
|
+
productName: "邀请同事",
|
|
194
|
+
actionGroup: "PC",
|
|
195
|
+
actionName: "\u7BA1\u7406\u5458\u70B9\u51FB\u8FDB\u5165\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\u663E\u793A\u6CA1\u6743\u9650"
|
|
196
|
+
});
|
|
197
|
+
}
|
|
182
198
|
}
|
|
183
199
|
});
|
|
184
200
|
}
|
|
@@ -203,6 +219,14 @@ var NavTop = function NavTop() {
|
|
|
203
219
|
});
|
|
204
220
|
} else {// console.log(res);
|
|
205
221
|
}
|
|
222
|
+
|
|
223
|
+
if (window.titaTracker) {
|
|
224
|
+
window.titaTracker("action").record({
|
|
225
|
+
productName: "邀请同事",
|
|
226
|
+
actionGroup: "PC",
|
|
227
|
+
actionName: "\u666E\u901A\u5458\u5DE5\u81EA\u5EFA\u5E94\u7528\u9080\u8BF7\u540C\u4E8B"
|
|
228
|
+
});
|
|
229
|
+
}
|
|
206
230
|
});
|
|
207
231
|
}
|
|
208
232
|
}, []);
|
|
@@ -231,6 +255,9 @@ var NavTop = function NavTop() {
|
|
|
231
255
|
}
|
|
232
256
|
};
|
|
233
257
|
|
|
258
|
+
(0, _react.useEffect)(function () {
|
|
259
|
+
localStorage.removeItem("LocalCurrentAppId_".concat((0, _bsGlobal.getUserInfo)().Id));
|
|
260
|
+
}, []);
|
|
234
261
|
(0, _react.useEffect)(function () {
|
|
235
262
|
handleHashChange();
|
|
236
263
|
window.addEventListener('hashchange', handleHashChange);
|
|
@@ -397,7 +424,7 @@ var NavTop = function NavTop() {
|
|
|
397
424
|
}), /*#__PURE__*/_react["default"].createElement("a", {
|
|
398
425
|
className: "".concat(preCls, "__left"),
|
|
399
426
|
href: "#dynamic"
|
|
400
|
-
},
|
|
427
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
401
428
|
alt: "logo",
|
|
402
429
|
src: Logo,
|
|
403
430
|
className: "".concat(preCls, "__left-logo")
|
|
@@ -7,6 +7,10 @@ exports.transMetasToTableData = exports.getMenus = exports.getLogo = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _bsGlobal = require("../../utils/bs-global");
|
|
9
9
|
|
|
10
|
+
var _logoWhite = _interopRequireDefault(require("./images/logo-white.png"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
10
14
|
var getMenus = function getMenus() {
|
|
11
15
|
// @ts-ignore
|
|
12
16
|
var navs = window.BSGlobal.newNavigation;
|
|
@@ -484,7 +488,7 @@ exports.getMenus = getMenus;
|
|
|
484
488
|
var getLogo = function getLogo() {
|
|
485
489
|
// 232637ab8a674427a1d6489329035d86_n 是老logo的路径,没法判断是否用户自定义过,所以只能这么硬核
|
|
486
490
|
var tenantInfo = (0, _bsGlobal.getTenantInfo)();
|
|
487
|
-
return tenantInfo.isNewIndex && /232637ab8a674427a1d6489329035d86_n/g.test(tenantInfo.Logo) || !tenantInfo.Logo ?
|
|
491
|
+
return tenantInfo.isNewIndex && /232637ab8a674427a1d6489329035d86_n/g.test(tenantInfo.Logo) || !tenantInfo.Logo ? _logoWhite["default"] : tenantInfo.Logo;
|
|
488
492
|
};
|
|
489
493
|
|
|
490
494
|
exports.getLogo = getLogo;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>切片</title>
|
|
4
|
+
<g id="导航" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="快捷入口-设置" transform="translate(-764.000000, -239.000000)" fill="#444444">
|
|
6
|
+
<g id="编组-5" transform="translate(80.000000, 110.000000)">
|
|
7
|
+
<g id="编组-4" transform="translate(401.000000, 119.000000)">
|
|
8
|
+
<g id="canceled" transform="translate(283.000000, 10.000000)">
|
|
9
|
+
<path d="M3.67140452,2.88954305 L8.00814045,7.22580712 L12.3452477,2.88954305 C12.5535273,2.68126343 12.8768366,2.65812125 13.1106784,2.82011651 L13.1937758,2.88954305 C13.4280904,3.12385763 13.4280904,3.50375661 13.1937758,3.73807119 L13.1937758,3.73807119 L8.85614045,8.07480712 L13.1937758,12.4119144 C13.4280904,12.6462289 13.4280904,13.0261279 13.1937758,13.2604425 C12.9594613,13.4947571 12.5795623,13.4947571 12.3452477,13.2604425 L8.00814045,8.92280712 L3.67140452,13.2604425 C3.4631249,13.4687221 3.13981562,13.4918643 2.90597385,13.329869 L2.82287638,13.2604425 C2.58856181,13.0261279 2.58856181,12.6462289 2.82287638,12.4119144 L2.82287638,12.4119144 L7.15914045,8.07480712 L2.82287638,3.73807119 C2.58856181,3.50375661 2.58856181,3.12385763 2.82287638,2.88954305 C3.05719096,2.65522847 3.43708995,2.65522847 3.67140452,2.88954305 Z" id="形状结合"></path>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|