@titaui/pc 1.7.21 → 1.7.25
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/button/text-btn/index.css +1 -0
- package/lib/components/button/text-btn/index.js +10 -12
- package/lib/components/cascader/index.css +38 -11
- package/lib/components/cascader/index.js +10 -5
- package/lib/components/cascader/time.js +31 -0
- package/lib/components/common-share/index.css +223 -0
- package/lib/components/common-share/index.js +104 -0
- package/lib/components/common-share/publishMblog.js +155 -0
- package/lib/components/common-share/request-apis.js +56 -0
- package/lib/components/common-share/types.js +5 -0
- package/lib/components/follower-visitor/index.css +8 -3
- package/lib/components/form/form-fields/group/index.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.css +9 -6
- 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/scrollbar/index.js +13 -3
- package/lib/components/select-tags/index.css +28 -18
- package/lib/components/select-tags/index.js +2 -2
- package/lib/components/weekly-report/board.js +43 -0
- package/lib/components/weekly-report/card.js +235 -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/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 +332 -0
- package/lib/components/weekly-report/index.js +134 -0
- package/lib/components/weekly-report/statistics.js +47 -0
- package/lib/index.js +8 -0
- package/lib/pages/aha2021/index.css +0 -1
- package/lib/pages/new-okr-list/header/filter.js +51 -2
- package/lib/pages/new-okr-list/index.js +44 -5
- package/lib/utils/helpers.js +8 -1
- package/package.json +1 -1
- package/src/components/button/text-btn/index.scss +1 -0
- package/src/components/button/text-btn/index.tsx +13 -13
- package/src/components/button/types.ts +1 -0
- package/src/components/cascader/index.scss +50 -27
- package/src/components/cascader/index.tsx +18 -16
- package/src/components/cascader/time.js +13 -0
- package/src/components/common-share/index.scss +199 -0
- package/src/components/common-share/index.tsx +91 -0
- package/src/components/common-share/publishMblog.tsx +79 -0
- package/src/components/common-share/request-apis.js +37 -0
- package/src/components/common-share/types.ts +4 -0
- package/src/components/follower-visitor/index.scss +9 -4
- package/src/components/form/form-fields/group/index.tsx +3 -3
- package/src/components/menus/components/menu-tree/tree-node/index.scss +2 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +1 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +2 -2
- package/src/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +2 -2
- package/src/components/okr-share/index.tsx +4 -17
- package/src/components/scrollbar/index.tsx +2 -1
- package/src/components/select-tags/index.scss +9 -1
- package/src/components/select-tags/index.tsx +8 -12
- package/src/components/weekly-report/board.tsx +25 -0
- package/src/components/weekly-report/card.tsx +125 -0
- package/src/components/weekly-report/common-painter/darwAvatar.ts +81 -0
- package/src/components/weekly-report/common-painter/drawName.ts +19 -0
- package/src/components/weekly-report/common-painter/openDataPainter.ts +47 -0
- package/src/components/weekly-report/common-painter/setSize.ts +12 -0
- package/src/components/weekly-report/common-painter/utils.ts +83 -0
- package/src/components/weekly-report/img/body.png +0 -0
- package/src/components/weekly-report/img/bofang.png +0 -0
- package/src/components/weekly-report/img/bottom.png +0 -0
- package/src/components/weekly-report/img/communication.png +0 -0
- package/src/components/weekly-report/img/down.png +0 -0
- package/src/components/weekly-report/img/finish.png +0 -0
- package/src/components/weekly-report/img/laba.png +0 -0
- package/src/components/weekly-report/img/praise.png +0 -0
- package/src/components/weekly-report/img/quote.png +0 -0
- package/src/components/weekly-report/img/title.png +0 -0
- package/src/components/weekly-report/img/triangle-pop.png +0 -0
- package/src/components/weekly-report/img/up.png +0 -0
- package/src/components/weekly-report/index.scss +299 -0
- package/src/components/weekly-report/index.tsx +51 -0
- package/src/components/weekly-report/statistics.tsx +28 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +2 -1
- package/src/pages/aha2021/index.scss +0 -1
- package/src/pages/new-okr-list/header/filter.tsx +35 -4
- package/src/pages/new-okr-list/index.tsx +33 -5
- package/src/utils/helpers.ts +4 -1
|
@@ -0,0 +1,332 @@
|
|
|
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-content {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: center;
|
|
23
|
+
width: 375px;
|
|
24
|
+
height: 710px;
|
|
25
|
+
background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 100%);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.weekly-report-card__title {
|
|
29
|
+
width: 220px;
|
|
30
|
+
height: 40px;
|
|
31
|
+
margin-top: 48px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.weekly-report-card__date-range {
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
color: #FFFFFF;
|
|
38
|
+
line-height: 20px;
|
|
39
|
+
margin-top: 11px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.weekly-report-card__body {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
width: 335px;
|
|
48
|
+
height: 452px;
|
|
49
|
+
background: transparent;
|
|
50
|
+
padding-top: 55px;
|
|
51
|
+
border-radius: 12px;
|
|
52
|
+
background-image: url("./img/body.png");
|
|
53
|
+
background-size: 100% 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.weekly-report-card__avatar {
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: 129px;
|
|
59
|
+
top: 17px;
|
|
60
|
+
border: 3px solid #fff;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.weekly-report-card__avatar > img {
|
|
65
|
+
width: 72px;
|
|
66
|
+
height: 72px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.weekly-report-card__shadow {
|
|
70
|
+
position: absolute;
|
|
71
|
+
box-shadow: 0px 0px 18px 0px rgba(40, 121, 255, 0.4);
|
|
72
|
+
width: 78px;
|
|
73
|
+
height: 78px;
|
|
74
|
+
border-radius: 50%;
|
|
75
|
+
top: 135px;
|
|
76
|
+
left: 150px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weekly-report-card__userName {
|
|
80
|
+
width: 295px;
|
|
81
|
+
height: 24px;
|
|
82
|
+
margin-top: 46px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.weekly-report-card__text {
|
|
86
|
+
position: relative;
|
|
87
|
+
z-index: 1;
|
|
88
|
+
font-size: 18px;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
color: #2879FF;
|
|
91
|
+
line-height: 26px;
|
|
92
|
+
margin: 28px 0;
|
|
93
|
+
max-width: 279px;
|
|
94
|
+
text-align: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.weekly-report-card__quote {
|
|
98
|
+
position: absolute;
|
|
99
|
+
top: 142px;
|
|
100
|
+
left: 20px;
|
|
101
|
+
width: 22px;
|
|
102
|
+
height: 22px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.weekly-report-card-board {
|
|
106
|
+
width: 154px;
|
|
107
|
+
height: 77px;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
position: relative;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.weekly-report-card-board__done {
|
|
113
|
+
position: absolute;
|
|
114
|
+
width: 154px;
|
|
115
|
+
height: 154px;
|
|
116
|
+
border-radius: 50%;
|
|
117
|
+
background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 50%);
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.weekly-report-card-board__undone {
|
|
122
|
+
position: absolute;
|
|
123
|
+
width: 154px;
|
|
124
|
+
height: 77px;
|
|
125
|
+
background-color: #eaf1fe;
|
|
126
|
+
transform-origin: center bottom;
|
|
127
|
+
transform: rotate(90deg);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.weekly-report-card-board__space {
|
|
131
|
+
position: absolute;
|
|
132
|
+
width: 2px;
|
|
133
|
+
height: 77px;
|
|
134
|
+
bottom: 50%;
|
|
135
|
+
right: 50%;
|
|
136
|
+
transform-origin: center bottom;
|
|
137
|
+
background-color: #FFF;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.weekly-report-card-board__center {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: flex-start;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
position: absolute;
|
|
145
|
+
bottom: -47px;
|
|
146
|
+
left: 30px;
|
|
147
|
+
width: 94px;
|
|
148
|
+
height: 94px;
|
|
149
|
+
background: #FFF;
|
|
150
|
+
border-radius: 50%;
|
|
151
|
+
font-size: 24px;
|
|
152
|
+
font-weight: 600;
|
|
153
|
+
color: #141C28;
|
|
154
|
+
line-height: 24px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.weekly-report-card-board__center > div {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: flex-end;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 47px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.weekly-report-card-board__num {
|
|
166
|
+
position: absolute;
|
|
167
|
+
bottom: 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.weekly-report-card__comparison {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
margin-top: 6px;
|
|
174
|
+
font-size: 12px;
|
|
175
|
+
font-weight: 400;
|
|
176
|
+
color: #6F7886;
|
|
177
|
+
line-height: 18px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.weekly-report-card__direction {
|
|
181
|
+
width: 13px;
|
|
182
|
+
height: 13px;
|
|
183
|
+
margin: 0 2px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.weekly-report-card__colleague {
|
|
187
|
+
box-sizing: border-box;
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
width: 275px;
|
|
192
|
+
height: 39px;
|
|
193
|
+
padding-top: 7px;
|
|
194
|
+
background-image: url("./img/triangle-pop.png");
|
|
195
|
+
background-size: 100% 100%;
|
|
196
|
+
font-size: 14px;
|
|
197
|
+
font-weight: 400;
|
|
198
|
+
color: #3F4755;
|
|
199
|
+
line-height: 24px;
|
|
200
|
+
margin-top: 6px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.weekly-report-card__colleague > span {
|
|
204
|
+
color: #2879FF;
|
|
205
|
+
margin: 0 5px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.weekly-report-card__statistics {
|
|
209
|
+
width: 100%;
|
|
210
|
+
padding: 0 20px;
|
|
211
|
+
box-sizing: border-box;
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: space-between;
|
|
215
|
+
margin-top: 29px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.weekly-report-card__statistics__item {
|
|
219
|
+
position: relative;
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-direction: column;
|
|
222
|
+
align-items: center;
|
|
223
|
+
padding: 7px 12px 0;
|
|
224
|
+
background-position: 0 20px;
|
|
225
|
+
background-size: 36px 36px;
|
|
226
|
+
background-repeat: no-repeat;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.weekly-report-card__statistics__finish {
|
|
230
|
+
background-image: url("./img/finish.png");
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.weekly-report-card__statistics__praise {
|
|
234
|
+
background-image: url("./img/praise.png");
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.weekly-report-card__statistics__communication {
|
|
238
|
+
background-image: url("./img/communication.png");
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.weekly-report-card__statistics__num {
|
|
242
|
+
font-size: 22px;
|
|
243
|
+
font-weight: 600;
|
|
244
|
+
color: #141C28;
|
|
245
|
+
line-height: 30px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.weekly-report-card__statistics__text {
|
|
249
|
+
font-size: 13px;
|
|
250
|
+
font-weight: 400;
|
|
251
|
+
color: #6F7886;
|
|
252
|
+
line-height: 22px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.weekly-report-card__statistics__tips {
|
|
256
|
+
position: absolute;
|
|
257
|
+
top: 0;
|
|
258
|
+
right: 0;
|
|
259
|
+
padding: 0 4px;
|
|
260
|
+
height: 17px;
|
|
261
|
+
background: linear-gradient(180deg, #F99797 0%, #F05E5E 100%);
|
|
262
|
+
border-radius: 9px 9px 9px 1px;
|
|
263
|
+
font-size: 11px;
|
|
264
|
+
color: #FFFFFF;
|
|
265
|
+
line-height: 17px;
|
|
266
|
+
text-align: center;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.weekly-report-card__laba {
|
|
270
|
+
position: absolute;
|
|
271
|
+
left: 0;
|
|
272
|
+
top: 118px;
|
|
273
|
+
width: 94px;
|
|
274
|
+
height: 65px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.weekly-report-card__bofang {
|
|
278
|
+
position: absolute;
|
|
279
|
+
right: 0;
|
|
280
|
+
top: 130px;
|
|
281
|
+
width: 62px;
|
|
282
|
+
height: 66px;
|
|
283
|
+
z-index: 1;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.weekly-report-card__bottom {
|
|
287
|
+
width: 320px;
|
|
288
|
+
height: 60px;
|
|
289
|
+
margin-top: 15px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.weekly-report-card__button-container {
|
|
293
|
+
display: flex;
|
|
294
|
+
margin-top: 20px;
|
|
295
|
+
justify-content: center;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.weekly-report-card__download {
|
|
299
|
+
display: flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
justify-content: center;
|
|
302
|
+
width: 120px;
|
|
303
|
+
height: 36px;
|
|
304
|
+
margin-right: 12px;
|
|
305
|
+
border-radius: 18px;
|
|
306
|
+
border: 1px solid #FFFFFF;
|
|
307
|
+
background-color: transparent;
|
|
308
|
+
font-size: 14px;
|
|
309
|
+
color: #FFF;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.weekly-report-card__download:hover {
|
|
313
|
+
background-color: transparent;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.weekly-report-card__share {
|
|
317
|
+
display: flex;
|
|
318
|
+
align-items: center;
|
|
319
|
+
justify-content: center;
|
|
320
|
+
width: 120px;
|
|
321
|
+
height: 36px;
|
|
322
|
+
border-radius: 18px;
|
|
323
|
+
border: 1px solid #FFFFFF;
|
|
324
|
+
background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 100%);
|
|
325
|
+
font-size: 14px;
|
|
326
|
+
color: #FFF;
|
|
327
|
+
border: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.weekly-report-card__share:hover {
|
|
331
|
+
background: linear-gradient(360deg, #2879FF 0%, #5B8FF9 100%);
|
|
332
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
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 _rectBtn = _interopRequireDefault(require("../button/rect-btn"));
|
|
13
|
+
|
|
14
|
+
var _commonShare = _interopRequireDefault(require("../common-share"));
|
|
15
|
+
|
|
16
|
+
var _card = _interopRequireDefault(require("./card"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
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."); }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
39
|
+
|
|
40
|
+
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); } }
|
|
41
|
+
|
|
42
|
+
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); }); }; }
|
|
43
|
+
|
|
44
|
+
var preCls = "weekly-report-card";
|
|
45
|
+
|
|
46
|
+
function WeeklyReportPreview(_ref) {
|
|
47
|
+
var onShare = _ref.onShare;
|
|
48
|
+
var cardRef = (0, _react.useRef)();
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
style: {
|
|
51
|
+
position: "absolute",
|
|
52
|
+
left: "-999px"
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement(_card["default"], {
|
|
55
|
+
ref: cardRef
|
|
56
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
|
+
className: preCls + "-wrapper"
|
|
58
|
+
}, /*#__PURE__*/_react["default"].createElement(_card["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
|
+
className: preCls + "__button-container"
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement(_rectBtn["default"], {
|
|
61
|
+
className: preCls + "__download",
|
|
62
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
63
|
+
var img, ele;
|
|
64
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
65
|
+
while (1) {
|
|
66
|
+
switch (_context.prev = _context.next) {
|
|
67
|
+
case 0:
|
|
68
|
+
_context.next = 2;
|
|
69
|
+
return cardRef.current.getImage();
|
|
70
|
+
|
|
71
|
+
case 2:
|
|
72
|
+
img = _context.sent;
|
|
73
|
+
ele = document.createElement("img");
|
|
74
|
+
ele.src = img;
|
|
75
|
+
ele.width = 375;
|
|
76
|
+
ele.style = "position:fixed;z-index:100000;top:0";
|
|
77
|
+
document.body.appendChild(ele);
|
|
78
|
+
|
|
79
|
+
case 8:
|
|
80
|
+
case "end":
|
|
81
|
+
return _context.stop();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, _callee);
|
|
85
|
+
}))
|
|
86
|
+
}, "\u4E0B\u8F7D\u56FE\u7247"), /*#__PURE__*/_react["default"].createElement(_rectBtn["default"], {
|
|
87
|
+
className: preCls + "__share",
|
|
88
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
89
|
+
var img;
|
|
90
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
91
|
+
while (1) {
|
|
92
|
+
switch (_context2.prev = _context2.next) {
|
|
93
|
+
case 0:
|
|
94
|
+
_context2.next = 2;
|
|
95
|
+
return cardRef.current.getImage();
|
|
96
|
+
|
|
97
|
+
case 2:
|
|
98
|
+
img = _context2.sent;
|
|
99
|
+
onShare(img);
|
|
100
|
+
|
|
101
|
+
case 4:
|
|
102
|
+
case "end":
|
|
103
|
+
return _context2.stop();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, _callee2);
|
|
107
|
+
}))
|
|
108
|
+
}, "\u5206\u4EAB\u5230\u52A8\u6001")));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function WeeklyReportModal(_ref4) {
|
|
112
|
+
_objectDestructuringEmpty(_ref4);
|
|
113
|
+
|
|
114
|
+
var _useState = (0, _react.useState)(),
|
|
115
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
116
|
+
visible = _useState2[0],
|
|
117
|
+
setVisible = _useState2[1];
|
|
118
|
+
|
|
119
|
+
return /*#__PURE__*/_react["default"].createElement(_commonShare["default"], {
|
|
120
|
+
uid: 1,
|
|
121
|
+
visible: true,
|
|
122
|
+
onClose: function onClose() {
|
|
123
|
+
return setVisible(false);
|
|
124
|
+
},
|
|
125
|
+
shareComponent: function shareComponent(onShare) {
|
|
126
|
+
return /*#__PURE__*/_react["default"].createElement(WeeklyReportPreview, {
|
|
127
|
+
onShare: onShare
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
var _default = WeeklyReportModal;
|
|
134
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
15
|
+
|
|
16
|
+
var preCls = 'weekly-report-card__statistics';
|
|
17
|
+
|
|
18
|
+
function Statistics(_ref) {
|
|
19
|
+
_objectDestructuringEmpty(_ref);
|
|
20
|
+
|
|
21
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
|
+
className: preCls
|
|
23
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: (0, _classnames["default"])(preCls + '__item', preCls + '__finish')
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
+
className: preCls + '__num'
|
|
27
|
+
}, "12"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
|
+
className: preCls + '__text'
|
|
29
|
+
}, "\u5B8C\u6210\u4EFB\u52A1")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
|
+
className: (0, _classnames["default"])(preCls + '__item', preCls + '__praise')
|
|
31
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
className: preCls + '__num'
|
|
33
|
+
}, "12"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
|
+
className: preCls + '__text'
|
|
35
|
+
}, "\u83B7\u5F97\u70B9\u8D5E"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
36
|
+
className: preCls + '__tips'
|
|
37
|
+
}, "Top1")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
|
+
className: (0, _classnames["default"])(preCls + '__item', preCls + '__communication')
|
|
39
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
40
|
+
className: preCls + '__num'
|
|
41
|
+
}, "12"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: preCls + '__text'
|
|
43
|
+
}, "\u53C2\u4E0E\u4E92\u52A8")));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var _default = Statistics;
|
|
47
|
+
exports["default"] = _default;
|
package/lib/index.js
CHANGED
|
@@ -465,6 +465,12 @@ Object.defineProperty(exports, "VersionChangeModal", {
|
|
|
465
465
|
return _versionChangeModal["default"];
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
|
+
Object.defineProperty(exports, "WeeklyReport", {
|
|
469
|
+
enumerable: true,
|
|
470
|
+
get: function get() {
|
|
471
|
+
return _weeklyReport["default"];
|
|
472
|
+
}
|
|
473
|
+
});
|
|
468
474
|
Object.defineProperty(exports, "WordCloud", {
|
|
469
475
|
enumerable: true,
|
|
470
476
|
get: function get() {
|
|
@@ -670,4 +676,6 @@ var _pointDemo = _interopRequireDefault(require("./components/point-demo"));
|
|
|
670
676
|
|
|
671
677
|
var _scrollbar = _interopRequireDefault(require("./components/scrollbar"));
|
|
672
678
|
|
|
679
|
+
var _weeklyReport = _interopRequireDefault(require("./components/weekly-report"));
|
|
680
|
+
|
|
673
681
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -17,6 +17,8 @@ var _periodSelector = _interopRequireDefault(require("../../../components/period
|
|
|
17
17
|
|
|
18
18
|
var _localStorage = require("../../../utils/local-storage");
|
|
19
19
|
|
|
20
|
+
var _tools = require("../../../utils/tools");
|
|
21
|
+
|
|
20
22
|
var _precls = require("../precls");
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,12 +70,59 @@ var Filter = function Filter(props) {
|
|
|
68
70
|
filterNum = _useState4[0],
|
|
69
71
|
setFilterNum = _useState4[1];
|
|
70
72
|
|
|
71
|
-
var _useState5 = (0, _react.useState)(
|
|
73
|
+
var _useState5 = (0, _react.useState)(function () {
|
|
74
|
+
var routerData = (0, _tools.getQueryString)();
|
|
75
|
+
var annualNum = routerData.annualNum,
|
|
76
|
+
cycleType = routerData.cycleType,
|
|
77
|
+
yqmNum = routerData.yqmNum;
|
|
78
|
+
|
|
79
|
+
if (!!annualNum && !!cycleType && !!yqmNum) {
|
|
80
|
+
return {
|
|
81
|
+
annualNum: annualNum,
|
|
82
|
+
cycleType: cycleType,
|
|
83
|
+
yqmNum: yqmNum
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return useLocalStorage.getItem("okr-filter-cycle") || "";
|
|
88
|
+
}),
|
|
72
89
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
73
90
|
cycle = _useState6[0],
|
|
74
91
|
setCycle = _useState6[1];
|
|
75
92
|
|
|
93
|
+
(0, _react.useEffect)(function () {
|
|
94
|
+
var routerData = (0, _tools.getQueryString)();
|
|
95
|
+
var annualNum = routerData.annualNum,
|
|
96
|
+
cycleType = routerData.cycleType,
|
|
97
|
+
yqmNum = routerData.yqmNum;
|
|
98
|
+
|
|
99
|
+
if (!!annualNum && !!cycleType && !!yqmNum) {
|
|
100
|
+
var _cycle = {
|
|
101
|
+
annualNum: annualNum,
|
|
102
|
+
cycleType: cycleType,
|
|
103
|
+
yqmNum: yqmNum
|
|
104
|
+
};
|
|
105
|
+
setCycle(_cycle);
|
|
106
|
+
onSearch(_cycle);
|
|
107
|
+
}
|
|
108
|
+
}, []);
|
|
109
|
+
|
|
110
|
+
var changeCycleUrl = function changeCycleUrl(s) {
|
|
111
|
+
var routerData = (0, _tools.getQueryString)();
|
|
112
|
+
var annualNum = routerData.annualNum,
|
|
113
|
+
cycleType = routerData.cycleType,
|
|
114
|
+
yqmNum = routerData.yqmNum,
|
|
115
|
+
toUserId = routerData.toUserId;
|
|
116
|
+
|
|
117
|
+
if (!!annualNum && !!cycleType && !!yqmNum) {
|
|
118
|
+
var origin = window.location.href.split('?')[0];
|
|
119
|
+
var url = "".concat(origin, "?cycleType=").concat(s.cycleType, "&yqmNum=").concat(s.yqmNum, "&annualNum=").concat(s.annualNum, "&toUserId=").concat(toUserId);
|
|
120
|
+
history.pushState('', '', url);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
76
124
|
var handleChangeCycle = function handleChangeCycle(s) {
|
|
125
|
+
changeCycleUrl(s);
|
|
77
126
|
setCycle(s);
|
|
78
127
|
onSearch && onSearch({
|
|
79
128
|
annualNum: s.annualNum,
|
|
@@ -88,7 +137,7 @@ var Filter = function Filter(props) {
|
|
|
88
137
|
};
|
|
89
138
|
|
|
90
139
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
-
className: "".concat(_precls.precls, "__header-filter")
|
|
140
|
+
className: "".concat(_precls.precls, "__header-filter okr-list__twinkle")
|
|
92
141
|
}, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
93
142
|
selected: cycle,
|
|
94
143
|
yearsRange: [2019, 2030],
|
|
@@ -90,11 +90,28 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
90
90
|
targetCategory: "",
|
|
91
91
|
targetSort: ""
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
|
|
94
|
+
var filterCycle = function filterCycle() {
|
|
95
|
+
var routerData = (0, _tools.getQueryString)();
|
|
96
|
+
var annualNum = routerData.annualNum,
|
|
97
|
+
cycleType = routerData.cycleType,
|
|
98
|
+
yqmNum = routerData.yqmNum;
|
|
99
|
+
|
|
100
|
+
if (!!annualNum && !!cycleType && !!yqmNum) {
|
|
101
|
+
return {
|
|
102
|
+
annualNum: annualNum,
|
|
103
|
+
cycleType: cycleType,
|
|
104
|
+
yqmNum: yqmNum
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return useLocalStorage.getItem("okr-filter-cycle") || {
|
|
109
|
+
annualNum: new Date().getFullYear() + "",
|
|
110
|
+
cycleType: "2",
|
|
111
|
+
yqmNum: "".concat((0, _moment["default"])().quarter())
|
|
112
|
+
};
|
|
97
113
|
};
|
|
114
|
+
|
|
98
115
|
var showWorkExecution = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting.ShowWorkExecution;
|
|
99
116
|
|
|
100
117
|
var _useState = (0, _react.useState)(true),
|
|
@@ -249,6 +266,23 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
249
266
|
_toast["default"].Success("成功套用");
|
|
250
267
|
};
|
|
251
268
|
|
|
269
|
+
var triggerAnimation = function triggerAnimation() {
|
|
270
|
+
//@ts-ignore
|
|
271
|
+
document.querySelector('.tita-okr-list-v2').scrollTop = 0;
|
|
272
|
+
var twinkleEles = document.getElementsByClassName('okr-list__twinkle');
|
|
273
|
+
|
|
274
|
+
var _loop = function _loop(i) {
|
|
275
|
+
twinkleEles[i].classList.add('okr-list__twinkle--animation');
|
|
276
|
+
setTimeout(function () {
|
|
277
|
+
twinkleEles[i].classList.remove('okr-list__twinkle--animation');
|
|
278
|
+
}, 3000);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
for (var i = 0; i < twinkleEles.length; i++) {
|
|
282
|
+
_loop(i);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
252
286
|
var onCasesCloseHandler = function onCasesCloseHandler() {
|
|
253
287
|
return setCasesVisible(false);
|
|
254
288
|
};
|
|
@@ -305,7 +339,12 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
305
339
|
}
|
|
306
340
|
})), /*#__PURE__*/_react["default"].createElement(_initCycleSetting["default"], {
|
|
307
341
|
SetCycleModal: SetCycleModal
|
|
308
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
342
|
+
}), !loading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
343
|
+
className: "okr-list__check-filter-tips"
|
|
344
|
+
}, "\u627E\u4E0D\u5230OKR\uFF1F\u8BD5\u8BD5", /*#__PURE__*/_react["default"].createElement("span", {
|
|
345
|
+
className: "okr-list__check-filter-btn",
|
|
346
|
+
onClick: triggerAnimation
|
|
347
|
+
}, "\u68C0\u67E5"), "\u9876\u90E8\u7B5B\u9009\u6761\u4EF6"), /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
309
348
|
zIndex: 99999,
|
|
310
349
|
noHeadLine: true,
|
|
311
350
|
visible: casesVisible,
|