@titaui/pc 1.7.23 → 1.7.27
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/common-share/index.css +223 -0
- package/lib/components/common-share/index.js +108 -0
- package/lib/components/common-share/publishMblog.js +157 -0
- package/lib/components/common-share/request-apis.js +56 -0
- package/lib/components/common-share/types.js +5 -0
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +7 -1
- package/lib/components/nav-top/components/user-message/index.js +9 -0
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +4 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +2 -2
- package/lib/components/weekly-report/board.js +43 -0
- package/lib/components/weekly-report/card.js +231 -0
- package/lib/components/weekly-report/common-painter/darwAvatar.js +157 -0
- package/lib/components/weekly-report/common-painter/drawName.js +59 -0
- package/lib/components/weekly-report/common-painter/openDataPainter.js +95 -0
- package/lib/components/weekly-report/common-painter/setSize.js +19 -0
- package/lib/components/weekly-report/common-painter/utils.js +85 -0
- package/lib/components/weekly-report/img/body.png +0 -0
- package/lib/components/weekly-report/img/bofang.png +0 -0
- package/lib/components/weekly-report/img/bottom.png +0 -0
- package/lib/components/weekly-report/img/close.svg +22 -0
- package/lib/components/weekly-report/img/communication.png +0 -0
- package/lib/components/weekly-report/img/down.png +0 -0
- package/lib/components/weekly-report/img/finish.png +0 -0
- package/lib/components/weekly-report/img/laba.png +0 -0
- package/lib/components/weekly-report/img/praise.png +0 -0
- package/lib/components/weekly-report/img/quote.png +0 -0
- package/lib/components/weekly-report/img/title.png +0 -0
- package/lib/components/weekly-report/img/triangle-pop.png +0 -0
- package/lib/components/weekly-report/img/up.png +0 -0
- package/lib/components/weekly-report/index.css +352 -0
- package/lib/components/weekly-report/index.js +224 -0
- package/lib/components/weekly-report/interface.js +5 -0
- package/lib/components/weekly-report/statistics.js +44 -0
- package/lib/index.js +10 -1
- package/lib/utils/helpers.js +8 -1
- package/package.json +1 -1
- package/yarn-error.log +15894 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
.weekly-report-card__dialog .rc-dialog-content {
|
|
2
|
+
background-color: transparent;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.weekly-report-card-wrapper {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
width: 336px;
|
|
8
|
+
height: 548px;
|
|
9
|
+
border-radius: 24px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.weekly-report-card-wrapper .weekly-report-card-content {
|
|
13
|
+
position: relative;
|
|
14
|
+
top: -66px;
|
|
15
|
+
left: -20px;
|
|
16
|
+
transform: scale(0.9);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.weekly-report-card__close {
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: -42px;
|
|
22
|
+
top: 0;
|
|
23
|
+
width: 32px;
|
|
24
|
+
height: 32px;
|
|
25
|
+
background-image: url("./img/close.svg");
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.weekly-report-card-content {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: center;
|
|
33
|
+
width: 375px;
|
|
34
|
+
height: 710px;
|
|
35
|
+
background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 100%);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.weekly-report-card__title {
|
|
39
|
+
width: 220px;
|
|
40
|
+
height: 40px;
|
|
41
|
+
margin-top: 48px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.weekly-report-card__date-range {
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
color: #FFFFFF;
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
margin-top: 11px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.weekly-report-card__body {
|
|
53
|
+
position: relative;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
align-items: center;
|
|
57
|
+
width: 335px;
|
|
58
|
+
height: 452px;
|
|
59
|
+
background: transparent;
|
|
60
|
+
padding-top: 55px;
|
|
61
|
+
border-radius: 12px;
|
|
62
|
+
background-image: url("./img/body.png");
|
|
63
|
+
background-size: 100% 100%;
|
|
64
|
+
background-position-y: -1px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.weekly-report-card__avatar {
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 150px;
|
|
70
|
+
top: 135px;
|
|
71
|
+
width: 76px;
|
|
72
|
+
height: 76px;
|
|
73
|
+
background-color: #FFF;
|
|
74
|
+
border-radius: 50%;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
z-index: 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.weekly-report-card__avatar > img {
|
|
82
|
+
width: 72px;
|
|
83
|
+
height: 72px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.weekly-report-card__shadow {
|
|
87
|
+
position: absolute;
|
|
88
|
+
box-shadow: 0px 0px 18px 0px rgba(40, 121, 255, 0.4);
|
|
89
|
+
width: 78px;
|
|
90
|
+
height: 78px;
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
top: 135px;
|
|
93
|
+
left: 150px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.weekly-report-card__userName {
|
|
97
|
+
width: 295px;
|
|
98
|
+
height: 24px;
|
|
99
|
+
margin-top: 46px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.weekly-report-card__text {
|
|
103
|
+
position: relative;
|
|
104
|
+
z-index: 1;
|
|
105
|
+
font-size: 18px;
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
color: #2879FF;
|
|
108
|
+
line-height: 26px;
|
|
109
|
+
margin: 28px 0;
|
|
110
|
+
max-width: 279px;
|
|
111
|
+
text-align: center;
|
|
112
|
+
min-height: 52px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.weekly-report-card__quote {
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: 142px;
|
|
118
|
+
left: 20px;
|
|
119
|
+
width: 22px;
|
|
120
|
+
height: 22px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.weekly-report-card-board {
|
|
124
|
+
width: 154px;
|
|
125
|
+
height: 77px;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
position: relative;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.weekly-report-card-board__done {
|
|
131
|
+
position: absolute;
|
|
132
|
+
width: 154px;
|
|
133
|
+
height: 154px;
|
|
134
|
+
border-radius: 50%;
|
|
135
|
+
background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 50%);
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.weekly-report-card-board__undone {
|
|
140
|
+
position: absolute;
|
|
141
|
+
left: -3px;
|
|
142
|
+
bottom: 50%;
|
|
143
|
+
width: 160px;
|
|
144
|
+
height: 80px;
|
|
145
|
+
background-color: #eaf1fe;
|
|
146
|
+
transform-origin: center bottom;
|
|
147
|
+
transform: rotate(90deg);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.weekly-report-card-board__space {
|
|
151
|
+
position: absolute;
|
|
152
|
+
width: 2px;
|
|
153
|
+
height: 77px;
|
|
154
|
+
bottom: 50%;
|
|
155
|
+
right: 50%;
|
|
156
|
+
transform-origin: center bottom;
|
|
157
|
+
background-color: #FFF;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.weekly-report-card-board__center {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: flex-start;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
position: absolute;
|
|
165
|
+
bottom: -47px;
|
|
166
|
+
left: 30px;
|
|
167
|
+
width: 94px;
|
|
168
|
+
height: 94px;
|
|
169
|
+
background: #FFF;
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
font-size: 24px;
|
|
172
|
+
font-weight: 600;
|
|
173
|
+
color: #141C28;
|
|
174
|
+
line-height: 24px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.weekly-report-card-board__center > div {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: flex-end;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 47px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.weekly-report-card-board__num {
|
|
186
|
+
position: absolute;
|
|
187
|
+
bottom: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.weekly-report-card__comparison {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
margin-top: 6px;
|
|
194
|
+
font-size: 12px;
|
|
195
|
+
font-weight: 400;
|
|
196
|
+
color: #6F7886;
|
|
197
|
+
line-height: 18px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.weekly-report-card__direction {
|
|
201
|
+
width: 13px;
|
|
202
|
+
height: 13px;
|
|
203
|
+
margin: 0 2px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.weekly-report-card__colleague {
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
width: 275px;
|
|
212
|
+
height: 39px;
|
|
213
|
+
padding-top: 7px;
|
|
214
|
+
background-image: url("./img/triangle-pop.png");
|
|
215
|
+
background-size: 100% 100%;
|
|
216
|
+
font-size: 14px;
|
|
217
|
+
font-weight: 400;
|
|
218
|
+
color: #3F4755;
|
|
219
|
+
line-height: 24px;
|
|
220
|
+
margin-top: 6px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.weekly-report-card__colleague > span {
|
|
224
|
+
color: #2879FF;
|
|
225
|
+
margin: 0 5px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.weekly-report-card__statistics {
|
|
229
|
+
width: 100%;
|
|
230
|
+
padding: 0 20px;
|
|
231
|
+
box-sizing: border-box;
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
justify-content: space-between;
|
|
235
|
+
margin-top: 29px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.weekly-report-card__statistics__item {
|
|
239
|
+
position: relative;
|
|
240
|
+
display: flex;
|
|
241
|
+
flex-direction: column;
|
|
242
|
+
align-items: center;
|
|
243
|
+
padding: 7px 12px 0;
|
|
244
|
+
background-position: 0 20px;
|
|
245
|
+
background-size: 36px 36px;
|
|
246
|
+
background-repeat: no-repeat;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.weekly-report-card__statistics__finish {
|
|
250
|
+
background-image: url("./img/finish.png");
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.weekly-report-card__statistics__praise {
|
|
254
|
+
background-image: url("./img/praise.png");
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.weekly-report-card__statistics__communication {
|
|
258
|
+
background-image: url("./img/communication.png");
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.weekly-report-card__statistics__num {
|
|
262
|
+
font-size: 22px;
|
|
263
|
+
font-weight: 600;
|
|
264
|
+
color: #141C28;
|
|
265
|
+
line-height: 30px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.weekly-report-card__statistics__text {
|
|
269
|
+
font-size: 13px;
|
|
270
|
+
font-weight: 400;
|
|
271
|
+
color: #6F7886;
|
|
272
|
+
line-height: 22px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.weekly-report-card__statistics__tips {
|
|
276
|
+
position: absolute;
|
|
277
|
+
top: 0;
|
|
278
|
+
right: 0;
|
|
279
|
+
padding: 0 4px;
|
|
280
|
+
height: 17px;
|
|
281
|
+
background: linear-gradient(180deg, #F99797 0%, #F05E5E 100%);
|
|
282
|
+
border-radius: 9px 9px 9px 1px;
|
|
283
|
+
font-size: 11px;
|
|
284
|
+
color: #FFFFFF;
|
|
285
|
+
line-height: 17px;
|
|
286
|
+
text-align: center;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.weekly-report-card__laba {
|
|
290
|
+
position: absolute;
|
|
291
|
+
left: 0;
|
|
292
|
+
top: 118px;
|
|
293
|
+
width: 94px;
|
|
294
|
+
height: 65px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.weekly-report-card__bofang {
|
|
298
|
+
position: absolute;
|
|
299
|
+
right: 0;
|
|
300
|
+
top: 130px;
|
|
301
|
+
width: 62px;
|
|
302
|
+
height: 66px;
|
|
303
|
+
z-index: 1;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.weekly-report-card__bottom {
|
|
307
|
+
width: 320px;
|
|
308
|
+
height: 60px;
|
|
309
|
+
margin-top: 15px;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.weekly-report-card__button-container {
|
|
313
|
+
display: flex;
|
|
314
|
+
margin-top: 20px;
|
|
315
|
+
justify-content: center;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.weekly-report-card__download {
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
justify-content: center;
|
|
322
|
+
width: 120px;
|
|
323
|
+
height: 36px;
|
|
324
|
+
margin-right: 12px;
|
|
325
|
+
border-radius: 18px;
|
|
326
|
+
border: 1px solid #FFFFFF;
|
|
327
|
+
background-color: transparent;
|
|
328
|
+
font-size: 14px;
|
|
329
|
+
color: #FFF;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.weekly-report-card__download:hover {
|
|
333
|
+
background-color: transparent;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.weekly-report-card__share {
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
justify-content: center;
|
|
340
|
+
width: 120px;
|
|
341
|
+
height: 36px;
|
|
342
|
+
border-radius: 18px;
|
|
343
|
+
border: 1px solid #FFFFFF;
|
|
344
|
+
background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 100%);
|
|
345
|
+
font-size: 14px;
|
|
346
|
+
color: #FFF;
|
|
347
|
+
border: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.weekly-report-card__share:hover {
|
|
351
|
+
background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 100%);
|
|
352
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _rectBtn = _interopRequireDefault(require("../button/rect-btn"));
|
|
15
|
+
|
|
16
|
+
var _commonShare = _interopRequireDefault(require("../common-share"));
|
|
17
|
+
|
|
18
|
+
var _card = _interopRequireDefault(require("./card"));
|
|
19
|
+
|
|
20
|
+
var _request = require("../../utils/request");
|
|
21
|
+
|
|
22
|
+
var _tools = require("../../utils/tools");
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
+
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
+
|
|
34
|
+
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."); }
|
|
35
|
+
|
|
36
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
|
+
|
|
38
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
|
+
|
|
40
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
|
+
|
|
42
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
+
|
|
44
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
45
|
+
|
|
46
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
47
|
+
|
|
48
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
49
|
+
|
|
50
|
+
var preCls = "weekly-report-card";
|
|
51
|
+
|
|
52
|
+
var getImageBase64ByUrl = function getImageBase64ByUrl(base64) {
|
|
53
|
+
return (0, _request.rpost)('v1')("/okr/share/imageDownLoadDfs", {
|
|
54
|
+
'SharePicLink': base64
|
|
55
|
+
}).then(function (res) {
|
|
56
|
+
return res.Data;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
function WeeklyReportPreview(_ref) {
|
|
61
|
+
var onShare = _ref.onShare,
|
|
62
|
+
onClose = _ref.onClose,
|
|
63
|
+
data = _ref.data;
|
|
64
|
+
var cardRef = (0, _react.useRef)();
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
|
+
style: {
|
|
67
|
+
position: "relative"
|
|
68
|
+
}
|
|
69
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
+
className: (0, _classnames["default"])("tu-icon-circle", preCls + "__close"),
|
|
71
|
+
onClick: onClose
|
|
72
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
|
+
style: {
|
|
74
|
+
position: "absolute",
|
|
75
|
+
left: "-99999999px"
|
|
76
|
+
}
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement(_card["default"], {
|
|
78
|
+
data: data,
|
|
79
|
+
ref: cardRef
|
|
80
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
|
+
className: preCls + "-wrapper"
|
|
82
|
+
}, /*#__PURE__*/_react["default"].createElement(_card["default"], {
|
|
83
|
+
data: data
|
|
84
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
|
+
className: preCls + "__button-container"
|
|
86
|
+
}, /*#__PURE__*/_react["default"].createElement(_rectBtn["default"], {
|
|
87
|
+
className: preCls + "__download",
|
|
88
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
89
|
+
var _cardRef$current;
|
|
90
|
+
|
|
91
|
+
var img, url, a;
|
|
92
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
93
|
+
while (1) {
|
|
94
|
+
switch (_context.prev = _context.next) {
|
|
95
|
+
case 0:
|
|
96
|
+
_context.next = 2;
|
|
97
|
+
return cardRef === null || cardRef === void 0 ? void 0 : (_cardRef$current = cardRef.current) === null || _cardRef$current === void 0 ? void 0 : _cardRef$current.getImage();
|
|
98
|
+
|
|
99
|
+
case 2:
|
|
100
|
+
img = _context.sent;
|
|
101
|
+
_context.next = 5;
|
|
102
|
+
return getImageBase64ByUrl(img.split(',')[1]);
|
|
103
|
+
|
|
104
|
+
case 5:
|
|
105
|
+
url = _context.sent;
|
|
106
|
+
a = document.createElement('a');
|
|
107
|
+
a.href = url.obj;
|
|
108
|
+
a.download = 'okr.png';
|
|
109
|
+
a.click();
|
|
110
|
+
|
|
111
|
+
case 10:
|
|
112
|
+
case "end":
|
|
113
|
+
return _context.stop();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, _callee);
|
|
117
|
+
}))
|
|
118
|
+
}, "\u4E0B\u8F7D\u56FE\u7247"), /*#__PURE__*/_react["default"].createElement(_rectBtn["default"], {
|
|
119
|
+
className: preCls + "__share",
|
|
120
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
121
|
+
var img;
|
|
122
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
123
|
+
while (1) {
|
|
124
|
+
switch (_context2.prev = _context2.next) {
|
|
125
|
+
case 0:
|
|
126
|
+
_context2.next = 2;
|
|
127
|
+
return cardRef.current.getImage();
|
|
128
|
+
|
|
129
|
+
case 2:
|
|
130
|
+
img = _context2.sent;
|
|
131
|
+
onShare(img);
|
|
132
|
+
|
|
133
|
+
case 4:
|
|
134
|
+
case "end":
|
|
135
|
+
return _context2.stop();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, _callee2);
|
|
139
|
+
}))
|
|
140
|
+
}, "\u5206\u4EAB\u5230\u52A8\u6001")));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function WeeklyReportModal(_ref4) {
|
|
144
|
+
_objectDestructuringEmpty(_ref4);
|
|
145
|
+
|
|
146
|
+
var _useState = (0, _react.useState)(!!(0, _tools.getQueryString)().redisKey),
|
|
147
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
148
|
+
visible = _useState2[0],
|
|
149
|
+
setVisible = _useState2[1];
|
|
150
|
+
|
|
151
|
+
var _useState3 = (0, _react.useState)((0, _tools.getQueryString)().redisKey || null),
|
|
152
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
153
|
+
redisKey = _useState4[0],
|
|
154
|
+
setRedisKey = _useState4[1];
|
|
155
|
+
|
|
156
|
+
var _useState5 = (0, _react.useState)(),
|
|
157
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
158
|
+
data = _useState6[0],
|
|
159
|
+
setData = _useState6[1];
|
|
160
|
+
|
|
161
|
+
(0, _react.useEffect)(function () {
|
|
162
|
+
var _window, _window$Talent, _window2, _window2$Talent;
|
|
163
|
+
|
|
164
|
+
(_window = window) === null || _window === void 0 ? void 0 : (_window$Talent = _window.Talent) === null || _window$Talent === void 0 ? void 0 : _window$Talent.app.vent.off('open-weekly-report-modal');
|
|
165
|
+
(_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Talent = _window2.Talent) === null || _window2$Talent === void 0 ? void 0 : _window2$Talent.app.vent.on('open-weekly-report-modal', function (redisKey) {
|
|
166
|
+
if (visible) return;
|
|
167
|
+
setRedisKey(redisKey);
|
|
168
|
+
setVisible(true);
|
|
169
|
+
});
|
|
170
|
+
return function () {
|
|
171
|
+
var _window3, _window3$Talent;
|
|
172
|
+
|
|
173
|
+
return (_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$Talent = _window3.Talent) === null || _window3$Talent === void 0 ? void 0 : _window3$Talent.app.vent.off('open-weekly-report-modal');
|
|
174
|
+
};
|
|
175
|
+
}, []);
|
|
176
|
+
(0, _react.useEffect)(function () {
|
|
177
|
+
if (!visible) return;
|
|
178
|
+
var current = new Date();
|
|
179
|
+
var dateTimeTicks = current.getFullYear() + '/' + (current.getMonth() + 1) + '/' + current.getDate();
|
|
180
|
+
var param = "redisKey=".concat(redisKey || null, "&dateTimeTicks=").concat(dateTimeTicks || null);
|
|
181
|
+
|
|
182
|
+
if (data) {
|
|
183
|
+
setData(null);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
(0, _request.rget)('v1')('okr/wwsummary/get?' + param).then(function (res) {
|
|
187
|
+
if (res.Code == 1) {
|
|
188
|
+
setData(res.Data);
|
|
189
|
+
} else {
|
|
190
|
+
setVisible(false);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}, [redisKey, visible]);
|
|
194
|
+
(0, _react.useEffect)(function () {
|
|
195
|
+
if (!!(0, _tools.getQueryString)().redisKey) {
|
|
196
|
+
location.replace(decodeURIComponent(location.href).replace(/&?redisKey=\S*(&|$)/g, ''));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (visible) {
|
|
200
|
+
(0, _request.rdelete)('v1')('Indicator/Clear?message_type=0&indicator_type=15');
|
|
201
|
+
}
|
|
202
|
+
}, [visible]);
|
|
203
|
+
if (!data) return null;
|
|
204
|
+
return /*#__PURE__*/_react["default"].createElement(_commonShare["default"], {
|
|
205
|
+
uid: new Date().getTime(),
|
|
206
|
+
visible: visible,
|
|
207
|
+
onClose: function onClose() {
|
|
208
|
+
return setVisible(false);
|
|
209
|
+
},
|
|
210
|
+
defaultContent: "Show \u4E00\u4E0B\u6211\u8FD9\u5468\u7684\u52AA\u529B\uFF5E",
|
|
211
|
+
shareComponent: function shareComponent(onShare) {
|
|
212
|
+
return /*#__PURE__*/_react["default"].createElement(WeeklyReportPreview, {
|
|
213
|
+
onShare: onShare,
|
|
214
|
+
onClose: function onClose() {
|
|
215
|
+
return setVisible(false);
|
|
216
|
+
},
|
|
217
|
+
data: data
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
var _default = WeeklyReportModal;
|
|
224
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var preCls = 'weekly-report-card__statistics';
|
|
15
|
+
|
|
16
|
+
function Statistics(_ref) {
|
|
17
|
+
var data = _ref.data;
|
|
18
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
19
|
+
className: preCls
|
|
20
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
21
|
+
className: (0, _classnames["default"])(preCls + '__item', preCls + '__finish')
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
className: preCls + '__num'
|
|
24
|
+
}, data.TaskNum), /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: preCls + '__text'
|
|
26
|
+
}, "\u5B8C\u6210\u4EFB\u52A1")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
27
|
+
className: (0, _classnames["default"])(preCls + '__item', preCls + '__praise')
|
|
28
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
29
|
+
className: preCls + '__num'
|
|
30
|
+
}, data.LoveNum), /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
|
+
className: preCls + '__text'
|
|
32
|
+
}, "\u83B7\u5F97\u70B9\u8D5E"), data.LoveTopNum && /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
|
+
className: preCls + '__tips'
|
|
34
|
+
}, "Top", data.LoveTopNum)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
|
+
className: (0, _classnames["default"])(preCls + '__item', preCls + '__communication')
|
|
36
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
+
className: preCls + '__num'
|
|
38
|
+
}, data.Lnteraction), /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
|
+
className: preCls + '__text'
|
|
40
|
+
}, "\u53C2\u4E0E\u4E92\u52A8")));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var _default = Statistics;
|
|
44
|
+
exports["default"] = _default;
|
package/lib/index.js
CHANGED
|
@@ -13,7 +13,14 @@ Object.defineProperty(exports, "PointDemo", {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
exports.UpvoteButtonForFeed = exports.Upvote = exports.Upload = exports.UpdateModal = exports.Tree = exports.TooltipText = exports.Tooltip = exports.Toast = exports.TitaWordsCloud = exports.TitaPieChart = exports.TitaLiquidBall = exports.TextBtn = exports.TextAvatar = exports.TextArea = exports.TaskRelationModal = exports.Tabs = exports.Table = exports.TabPane = exports.Switch = exports.StatusTime = exports.SlideInput = exports.SingleSelector = exports.SelectorInput = exports.SelectTags = exports.SearchInput = exports.SearchDropdownOption = exports.SearchDropdown = exports.Review = exports.RectBtn = exports.RangePickerPop = exports.RadioGroup = exports.Radio = exports.Popup = void 0;
|
|
16
|
-
exports.
|
|
16
|
+
exports.VersionChangeModal = exports.UserGroupManagementPage = exports.UpvoteButtonForFeed = exports.Upvote = exports.Upload = exports.UpdateModal = exports.Tree = exports.TooltipText = exports.Tooltip = exports.Toast = exports.TitaWordsCloud = exports.TitaPieChart = exports.TitaLiquidBall = exports.TextBtn = exports.TextAvatar = exports.TextArea = exports.TaskRelationModal = exports.Tabs = exports.Table = exports.TabPane = exports.Switch = exports.StatusTime = exports.SlideInput = exports.SingleSelector = exports.SelectorInput = exports.SelectTags = exports.SearchInput = exports.SearchDropdownOption = exports.SearchDropdown = exports.Review = exports.RectBtn = exports.RangePickerPop = exports.RadioGroup = exports.Radio = exports.Popup = void 0;
|
|
17
|
+
Object.defineProperty(exports, "WeeklyReport", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function get() {
|
|
20
|
+
return _weeklyReport["default"];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
exports.requestApi = exports.openData = exports.firework = exports.drawerManager = exports.WordCloud = void 0;
|
|
17
24
|
|
|
18
25
|
var _errorBoundary = _interopRequireDefault(require("./components/error-boundary"));
|
|
19
26
|
|
|
@@ -185,6 +192,8 @@ var _cascader = _interopRequireDefault(require("./components/cascader"));
|
|
|
185
192
|
|
|
186
193
|
var _pointDemo = _interopRequireDefault(require("./components/point-demo"));
|
|
187
194
|
|
|
195
|
+
var _weeklyReport = _interopRequireDefault(require("./components/weekly-report"));
|
|
196
|
+
|
|
188
197
|
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); }
|
|
189
198
|
|
|
190
199
|
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; }
|
package/lib/utils/helpers.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.cssSupport = cssSupport;
|
|
7
7
|
exports.escapeHtml = escapeHtml;
|
|
8
|
+
exports.getLoginUserInfo = void 0;
|
|
8
9
|
exports.getTenantInfo = getTenantInfo;
|
|
9
10
|
exports.getUploadMaxSize = getUploadMaxSize;
|
|
10
11
|
exports.isLocal = exports.isDingDing = void 0;
|
|
@@ -58,4 +59,10 @@ function escapeHtml(str) {
|
|
|
58
59
|
return str.replace(/(&|<|>|"|')/g, function (str) {
|
|
59
60
|
return htmlEscapes[str];
|
|
60
61
|
});
|
|
61
|
-
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var getLoginUserInfo = function getLoginUserInfo() {
|
|
65
|
+
return (0, _bsGlobal.getBSGlobal)('loginUserInfo');
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.getLoginUserInfo = getLoginUserInfo;
|