@titaui/pc 1.7.26 → 1.7.30
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/cascader/index.css +1 -1
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +14 -5
- package/lib/components/nav-top/components/user-message/constant.js +3 -1
- package/lib/components/nav-top/index.js +2 -3
- package/lib/components/weekly-report/board.js +10 -1
- package/lib/components/weekly-report/card.js +14 -14
- package/lib/components/weekly-report/index.css +51 -17
- package/lib/components/weekly-report/index.js +21 -15
- package/lib/components/weekly-report/interface.js +5 -0
- package/lib/components/weekly-report/statistics.js +6 -9
- package/lib/pages/new-okr-list/header/filter.js +0 -1
- package/package.json +1 -1
- package/src/components/cascader/index.scss +1 -1
- package/src/components/nav-top/components/user-message/components/inform/inform-item.tsx +9 -2
- package/src/components/nav-top/components/user-message/constant.ts +2 -0
- package/src/components/nav-top/index.tsx +1 -2
- package/src/components/weekly-report/board.tsx +5 -0
- package/src/components/weekly-report/card.tsx +22 -15
- package/src/components/weekly-report/index.scss +50 -17
- package/src/components/weekly-report/index.tsx +18 -17
- package/src/components/weekly-report/interface.ts +31 -0
- package/src/components/weekly-report/statistics.tsx +7 -6
- package/src/pages/new-okr-list/header/filter.tsx +0 -1
- package/yarn-error.log +15894 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
&-wrapper {
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
width: 336px;
|
|
10
|
-
height:
|
|
10
|
+
height: 534px;
|
|
11
11
|
border-radius: 24px;
|
|
12
12
|
.weekly-report-card-content {
|
|
13
13
|
position: relative;
|
|
14
|
-
top: -
|
|
14
|
+
top: -52px;
|
|
15
15
|
left: -20px;
|
|
16
16
|
transform: scale(0.9);
|
|
17
17
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
width: 375px;
|
|
33
33
|
height: 710px;
|
|
34
|
-
background: linear-gradient(180deg, #B7D5FF 0%, #186FFF
|
|
34
|
+
background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 50%);
|
|
35
35
|
}
|
|
36
36
|
&__title {
|
|
37
37
|
width: 220px;
|
|
@@ -51,20 +51,28 @@
|
|
|
51
51
|
flex-direction: column;
|
|
52
52
|
align-items: center;
|
|
53
53
|
width: 335px;
|
|
54
|
-
height:
|
|
54
|
+
height: 422px;
|
|
55
55
|
background: transparent;
|
|
56
56
|
padding-top: 55px;
|
|
57
57
|
border-radius: 12px;
|
|
58
58
|
background-image: url('./img/body.png');
|
|
59
59
|
background-size: 100% 100%;
|
|
60
60
|
background-position-y: -1px;
|
|
61
|
+
box-sizing: content-box;
|
|
61
62
|
}
|
|
62
63
|
&__avatar {
|
|
63
64
|
position: absolute;
|
|
64
|
-
left:
|
|
65
|
-
top:
|
|
66
|
-
border:
|
|
65
|
+
left: 150px;
|
|
66
|
+
top: 135px;
|
|
67
|
+
// border: 2px solid #fff;
|
|
68
|
+
width: 76px;
|
|
69
|
+
height: 76px;
|
|
70
|
+
background-color: #FFF;
|
|
67
71
|
border-radius: 50%;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
z-index: 2;
|
|
68
76
|
& > img {
|
|
69
77
|
width: 72px;
|
|
70
78
|
height: 72px;
|
|
@@ -94,6 +102,7 @@
|
|
|
94
102
|
margin: 28px 0;
|
|
95
103
|
max-width: 279px;
|
|
96
104
|
text-align: center;
|
|
105
|
+
min-height: 52px;
|
|
97
106
|
}
|
|
98
107
|
&__quote {
|
|
99
108
|
position: absolute;
|
|
@@ -109,21 +118,43 @@
|
|
|
109
118
|
position: relative;
|
|
110
119
|
&__done {
|
|
111
120
|
position: absolute;
|
|
112
|
-
width:
|
|
113
|
-
height:
|
|
121
|
+
width: 150px;
|
|
122
|
+
height: 150px;
|
|
114
123
|
border-radius: 50%;
|
|
115
|
-
background: linear-gradient(
|
|
124
|
+
background: linear-gradient(90deg, #2879FF 0%, #5B8FF9 50%);
|
|
116
125
|
overflow: hidden;
|
|
126
|
+
top: 2px;
|
|
127
|
+
left: 2px;
|
|
117
128
|
}
|
|
118
129
|
&__undone {
|
|
119
130
|
position: absolute;
|
|
120
|
-
|
|
121
|
-
|
|
131
|
+
left: -5px;
|
|
132
|
+
bottom: 75px;
|
|
133
|
+
width: 160px;
|
|
134
|
+
height: 80px;
|
|
122
135
|
background-color: rgb(234, 241, 254);
|
|
123
136
|
transform-origin: center bottom;
|
|
124
137
|
transform: rotate(90deg);
|
|
125
138
|
// background: radial-gradient(at bottom center,rgb(234, 241, 254) 0,rgb(234, 241, 254) 77px,transparent 77px);
|
|
126
139
|
}
|
|
140
|
+
&__cover {
|
|
141
|
+
width: 154px;
|
|
142
|
+
height: 154px;
|
|
143
|
+
position: absolute;
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
border: 2px solid #fff;
|
|
147
|
+
z-index: 10;
|
|
148
|
+
}
|
|
149
|
+
&__cover--bottom {
|
|
150
|
+
width: 154px;
|
|
151
|
+
height: 2px;
|
|
152
|
+
position: absolute;
|
|
153
|
+
bottom: 0;
|
|
154
|
+
box-sizing: border-box;
|
|
155
|
+
background-color: #FFF;
|
|
156
|
+
z-index: 10;
|
|
157
|
+
}
|
|
127
158
|
&__space {
|
|
128
159
|
position: absolute;
|
|
129
160
|
width: 2px;
|
|
@@ -202,7 +233,7 @@
|
|
|
202
233
|
display: flex;
|
|
203
234
|
align-items: center;
|
|
204
235
|
justify-content: space-between;
|
|
205
|
-
margin-top:
|
|
236
|
+
margin-top: 18px;
|
|
206
237
|
|
|
207
238
|
&__item {
|
|
208
239
|
position: relative;
|
|
@@ -251,15 +282,15 @@
|
|
|
251
282
|
}
|
|
252
283
|
&__laba {
|
|
253
284
|
position: absolute;
|
|
254
|
-
left:
|
|
255
|
-
top:
|
|
285
|
+
left: 6px;
|
|
286
|
+
top: 108px;
|
|
256
287
|
width: 94px;
|
|
257
288
|
height: 65px;
|
|
258
289
|
}
|
|
259
290
|
&__bofang {
|
|
260
291
|
position: absolute;
|
|
261
|
-
right:
|
|
262
|
-
top:
|
|
292
|
+
right: 4px;
|
|
293
|
+
top: 124px;
|
|
263
294
|
width: 62px;
|
|
264
295
|
height: 66px;
|
|
265
296
|
z-index: 1;
|
|
@@ -286,6 +317,8 @@
|
|
|
286
317
|
background-color: transparent;
|
|
287
318
|
font-size: 14px;
|
|
288
319
|
color: #FFF;
|
|
320
|
+
backdrop-filter: blur(2px);
|
|
321
|
+
background-color: rgba($color: #FFF, $alpha: .1);
|
|
289
322
|
&:hover{
|
|
290
323
|
background-color: transparent;
|
|
291
324
|
}
|
|
@@ -3,7 +3,7 @@ import classnames from 'classnames'
|
|
|
3
3
|
import RectBtn from "../button/rect-btn";
|
|
4
4
|
import CommonShare from "../common-share";
|
|
5
5
|
import Card from "./card";
|
|
6
|
-
import {rpost,rget} from '../../utils/request'
|
|
6
|
+
import {rpost,rget, rput, rdelete} from '../../utils/request'
|
|
7
7
|
import {getQueryString,changeQueryString} from '../../utils/tools'
|
|
8
8
|
import "./index.scss";
|
|
9
9
|
|
|
@@ -26,12 +26,12 @@ function WeeklyReportPreview({ onShare,onClose,data }) {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<div style={{ position: "relative"}}>
|
|
29
|
-
<div className={classnames(
|
|
29
|
+
<div className={classnames(preCls + "__close")} onClick={onClose}/>
|
|
30
30
|
<div style={{ position: "absolute", left: "-99999999px" }}>
|
|
31
|
-
<Card ref={cardRef} />
|
|
31
|
+
<Card data={data} ref={cardRef} />
|
|
32
32
|
</div>
|
|
33
33
|
<div className={preCls + "-wrapper"}>
|
|
34
|
-
<Card />
|
|
34
|
+
<Card data={data}/>
|
|
35
35
|
</div>
|
|
36
36
|
<div className={preCls + "__button-container"}>
|
|
37
37
|
<RectBtn
|
|
@@ -63,41 +63,42 @@ function WeeklyReportPreview({ onShare,onClose,data }) {
|
|
|
63
63
|
|
|
64
64
|
function WeeklyReportModal({}: Props) {
|
|
65
65
|
const [visible, setVisible] = useState<boolean>(!!getQueryString().redisKey);
|
|
66
|
-
const [redisKey, setRedisKey] = useState<string>()
|
|
66
|
+
const [redisKey, setRedisKey] = useState<string>(getQueryString().redisKey||null)
|
|
67
67
|
const [data,setData] = useState<any>()
|
|
68
|
-
|
|
69
68
|
useEffect(() => {
|
|
70
69
|
window?.Talent?.app.vent.off('open-weekly-report-modal')
|
|
71
70
|
window?.Talent?.app.vent.on('open-weekly-report-modal',(redisKey)=>{
|
|
71
|
+
if(visible) return;
|
|
72
72
|
setRedisKey(redisKey)
|
|
73
73
|
setVisible(true)
|
|
74
74
|
})
|
|
75
75
|
return () => window?.Talent?.app.vent.off('open-weekly-report-modal')
|
|
76
|
-
}, [])
|
|
76
|
+
}, [visible])
|
|
77
77
|
|
|
78
78
|
useEffect(()=>{
|
|
79
|
-
|
|
79
|
+
if(!visible) return
|
|
80
|
+
const current = new Date()
|
|
81
|
+
const dateTimeTicks=(current.getFullYear()+'/'+(current.getMonth()+1)+'/'+current.getDate())
|
|
82
|
+
let param = `redisKey=${redisKey||null}&dateTimeTicks=${dateTimeTicks||null}`
|
|
80
83
|
if(data) {
|
|
81
84
|
setData(null)
|
|
82
85
|
}
|
|
83
|
-
if(redisKey){
|
|
84
|
-
param = 'redisKey='+redisKey
|
|
85
|
-
}else {
|
|
86
|
-
const current = new Date()
|
|
87
|
-
param = 'dateTimeTicks='+(current.getFullYear()+'/'+(current.getMonth()+1)+'/'+current.getDate())
|
|
88
|
-
}
|
|
89
86
|
|
|
90
87
|
rget('v1')('okr/wwsummary/get?'+param).then(res => {
|
|
91
|
-
|
|
88
|
+
if(res.Code == 1){
|
|
89
|
+
setData(res.Data)
|
|
90
|
+
}else {
|
|
91
|
+
setVisible(false)
|
|
92
|
+
}
|
|
92
93
|
})
|
|
93
|
-
},[redisKey])
|
|
94
|
+
},[redisKey,visible])
|
|
94
95
|
|
|
95
96
|
useEffect(() => {
|
|
96
97
|
if(!!getQueryString().redisKey){
|
|
97
98
|
location.replace(decodeURIComponent(location.href).replace(/&?redisKey=\S*(&|$)/g,''))
|
|
98
99
|
}
|
|
99
100
|
if(visible){
|
|
100
|
-
|
|
101
|
+
rdelete('v1')('Indicator/Clear?message_type=0&indicator_type=15')
|
|
101
102
|
}
|
|
102
103
|
},[visible])
|
|
103
104
|
if(!data) return null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
export interface IWeeklyReportData {
|
|
3
|
+
WeekCycle: string;
|
|
4
|
+
Lnteraction: string;
|
|
5
|
+
LoveTopNum: string;
|
|
6
|
+
LoveNum: string;
|
|
7
|
+
TaskNum: string;
|
|
8
|
+
PromptLanguage: string;
|
|
9
|
+
Increase: string;
|
|
10
|
+
Quotations: string;
|
|
11
|
+
Complete: string;
|
|
12
|
+
User: User;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface User {
|
|
16
|
+
UserId: number;
|
|
17
|
+
Name: string;
|
|
18
|
+
Avatar: Avatar;
|
|
19
|
+
UserMark?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface Avatar {
|
|
23
|
+
Original: string;
|
|
24
|
+
Small: string;
|
|
25
|
+
Medium: string;
|
|
26
|
+
Big: string;
|
|
27
|
+
Large: string;
|
|
28
|
+
Normal: string;
|
|
29
|
+
HasAvatar: boolean;
|
|
30
|
+
Color?: any;
|
|
31
|
+
}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
|
3
|
+
import { IWeeklyReportData } from './interface'
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
5
|
-
|
|
6
|
+
data:IWeeklyReportData
|
|
6
7
|
}
|
|
7
8
|
const preCls = 'weekly-report-card__statistics'
|
|
8
|
-
function Statistics({}: Props): ReactElement {
|
|
9
|
+
function Statistics({data}: Props): ReactElement {
|
|
9
10
|
return (
|
|
10
11
|
<div className={preCls}>
|
|
11
12
|
<div className={classnames(preCls+'__item',preCls+'__finish')}>
|
|
12
|
-
<div className={preCls+'__num'}>
|
|
13
|
+
<div className={preCls+'__num'}>{data.TaskNum}</div>
|
|
13
14
|
<div className={preCls+'__text'}>完成任务</div>
|
|
14
15
|
</div>
|
|
15
16
|
<div className={classnames(preCls+'__item',preCls+'__praise')}>
|
|
16
|
-
<div className={preCls+'__num'}>
|
|
17
|
+
<div className={preCls+'__num'}>{data.LoveNum}</div>
|
|
17
18
|
<div className={preCls+'__text'}>获得点赞</div>
|
|
18
|
-
<div className={preCls+'__tips'}>
|
|
19
|
+
{data.LoveTopNum && data.LoveTopNum != '0' && <div className={preCls+'__tips'}>Top{data.LoveTopNum}</div>}
|
|
19
20
|
</div>
|
|
20
21
|
<div className={classnames(preCls+'__item',preCls+'__communication')}>
|
|
21
|
-
<div className={preCls+'__num'}>
|
|
22
|
+
<div className={preCls+'__num'}>{data.Lnteraction}</div>
|
|
22
23
|
<div className={preCls+'__text'}>参与互动</div>
|
|
23
24
|
</div>
|
|
24
25
|
</div>
|