@titaui/pc 1.7.22 → 1.7.26
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/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/follower-visitor/index.css +8 -3
- package/lib/components/menus/components/menu-tree/tree-node/index.css +9 -6
- 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/select-tags/index.css +6 -0
- package/lib/components/select-tags/index.js +1 -1
- 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 +343 -0
- package/lib/components/weekly-report/index.js +218 -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 +52 -2
- package/lib/pages/new-okr-list/index.js +45 -6
- 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/common-share/index.scss +199 -0
- package/src/components/common-share/index.tsx +95 -0
- package/src/components/common-share/publishMblog.tsx +81 -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/menus/components/menu-tree/tree-node/index.scss +2 -1
- package/src/components/nav-top/components/user-message/index.tsx +6 -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/select-tags/index.scss +7 -0
- package/src/components/select-tags/index.tsx +7 -11
- package/src/components/weekly-report/board.tsx +25 -0
- package/src/components/weekly-report/card.tsx +150 -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/close.svg +22 -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 +309 -0
- package/src/components/weekly-report/index.tsx +115 -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 +36 -4
- package/src/pages/new-okr-list/index.tsx +33 -5
- package/src/utils/helpers.ts +4 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
.okr-share-card {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 340px;
|
|
4
|
+
height: 434px;
|
|
5
|
+
border-radius: 24px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
&-user__name {
|
|
12
|
+
margin-top: 4px;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
font-weight: bold;
|
|
15
|
+
color: #141c28;
|
|
16
|
+
line-height: 22px;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
> span {
|
|
20
|
+
max-width: 170px;
|
|
21
|
+
margin-right: 5px;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
text-overflow: ellipsis;
|
|
25
|
+
word-break: break-all;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
&::after {
|
|
29
|
+
content: "";
|
|
30
|
+
position: absolute;
|
|
31
|
+
height: 70px;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
left: 0px;
|
|
34
|
+
right: 0px;
|
|
35
|
+
border-bottom-left-radius: 24px;
|
|
36
|
+
border-bottom-right-radius: 24px;
|
|
37
|
+
}
|
|
38
|
+
&-user__dept {
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
color: #3f4755;
|
|
42
|
+
line-height: 18px;
|
|
43
|
+
max-width: 200px;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
text-overflow: ellipsis;
|
|
47
|
+
word-break: break-all;
|
|
48
|
+
}
|
|
49
|
+
.card-okr__content {
|
|
50
|
+
flex: 1;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
padding-bottom: 50px;
|
|
55
|
+
}
|
|
56
|
+
.card-okr__name {
|
|
57
|
+
position: relative;
|
|
58
|
+
width: 250px;
|
|
59
|
+
font-size: 18px;
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
color: #141c28;
|
|
62
|
+
line-height: 24px;
|
|
63
|
+
margin-top: 24px;
|
|
64
|
+
margin-bottom: 28px;
|
|
65
|
+
text-align: center;
|
|
66
|
+
&::before,
|
|
67
|
+
&::after {
|
|
68
|
+
content: "";
|
|
69
|
+
display: block;
|
|
70
|
+
position: absolute;
|
|
71
|
+
width: 16px;
|
|
72
|
+
height: 16px;
|
|
73
|
+
background-size: 100% 100%;
|
|
74
|
+
background-repeat: no-repeat;
|
|
75
|
+
}
|
|
76
|
+
&::before {
|
|
77
|
+
top: -16px;
|
|
78
|
+
left: -16px;
|
|
79
|
+
}
|
|
80
|
+
&::after {
|
|
81
|
+
bottom: -16px;
|
|
82
|
+
right: -16px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.card-kr__wrapper {
|
|
86
|
+
width: 100%;
|
|
87
|
+
max-height: 240px;
|
|
88
|
+
position: relative;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
align-items: center;
|
|
93
|
+
}
|
|
94
|
+
.card-kr__item {
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
font-weight: 400;
|
|
97
|
+
color: #3f4755;
|
|
98
|
+
line-height: 22px;
|
|
99
|
+
margin-bottom: 6px;
|
|
100
|
+
position: relative;
|
|
101
|
+
width: 250px;
|
|
102
|
+
text-align: left;
|
|
103
|
+
&::before {
|
|
104
|
+
content: "";
|
|
105
|
+
position: absolute;
|
|
106
|
+
width: 6px;
|
|
107
|
+
height: 6px;
|
|
108
|
+
border-radius: 50%;
|
|
109
|
+
top: 8px;
|
|
110
|
+
left: -14px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
.okr-share-card__selector {
|
|
115
|
+
position: relative;
|
|
116
|
+
.tu-icon-close {
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: -8.25px;
|
|
119
|
+
right: -20px;
|
|
120
|
+
font-size: 16.5px;
|
|
121
|
+
color: #fff;
|
|
122
|
+
}
|
|
123
|
+
.share-card-button__wrapper {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
}
|
|
128
|
+
.share-card-button {
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
width: 120px;
|
|
131
|
+
height: 36px;
|
|
132
|
+
border-radius: 18px;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
margin: 20px 6px 0;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
color: #ffffff;
|
|
139
|
+
transition: all 0.2s ease;
|
|
140
|
+
&.download {
|
|
141
|
+
border: 1px solid #ffffff;
|
|
142
|
+
&:hover {
|
|
143
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
&.share {
|
|
147
|
+
background: rgba($color: #5c8eff, $alpha: 0);
|
|
148
|
+
position: relative;
|
|
149
|
+
&::after {
|
|
150
|
+
content: "";
|
|
151
|
+
position: absolute;
|
|
152
|
+
z-index: -1;
|
|
153
|
+
background: linear-gradient(180deg, #88bcff 0%, #2879ff 100%);
|
|
154
|
+
border-radius: 18px;
|
|
155
|
+
top: 0;
|
|
156
|
+
right: 0;
|
|
157
|
+
bottom: 0;
|
|
158
|
+
left: 0;
|
|
159
|
+
}
|
|
160
|
+
&:hover {
|
|
161
|
+
background: rgba($color: #5c8eff, $alpha: 1);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
.okr-share-mblog {
|
|
167
|
+
&__container {
|
|
168
|
+
width: 480px;
|
|
169
|
+
height: 420px;
|
|
170
|
+
background-color: #fff;
|
|
171
|
+
border-radius: 6px;
|
|
172
|
+
}
|
|
173
|
+
&__header {
|
|
174
|
+
height: 58px;
|
|
175
|
+
padding: 0 32px;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
font-size: 18px;
|
|
179
|
+
font-weight: bold;
|
|
180
|
+
color: #141c28;
|
|
181
|
+
line-height: 26px;
|
|
182
|
+
border-bottom: 1px solid #e9ecf0;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
.tu-icon-close {
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
&__body {
|
|
189
|
+
padding: 16px 32px 20px;
|
|
190
|
+
}
|
|
191
|
+
&__attachment {
|
|
192
|
+
width: 118px;
|
|
193
|
+
height: 160px;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
> img {
|
|
196
|
+
width: 100%;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React, { useRef, useState,useEffect } from 'react';
|
|
2
|
+
import { Modal } from 'tita-ui';
|
|
3
|
+
import PublishMblog from './publishMblog';
|
|
4
|
+
import Queue from 'rc-queue-anim';
|
|
5
|
+
import './index.scss';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
closeModal: Function;
|
|
9
|
+
getModalRef: Function;
|
|
10
|
+
uid: string;
|
|
11
|
+
shareComponent: any;
|
|
12
|
+
shareImage?:string
|
|
13
|
+
defaultContent?:string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ShareContent = function({ closeModal, getModalRef, uid,shareComponent,shareImage,defaultContent }: Props) {
|
|
17
|
+
const [showPublish, setShowPublish] = useState(false);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if(shareImage){
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
setShowPublish(true)
|
|
22
|
+
}, 200);
|
|
23
|
+
}
|
|
24
|
+
}, [shareImage])
|
|
25
|
+
return (
|
|
26
|
+
<Queue type='bottom'>
|
|
27
|
+
{!shareImage && (
|
|
28
|
+
shareComponent
|
|
29
|
+
)}
|
|
30
|
+
{showPublish && shareImage && (
|
|
31
|
+
<PublishMblog
|
|
32
|
+
base64={shareImage}
|
|
33
|
+
getModalRef={getModalRef}
|
|
34
|
+
closeModal={closeModal}
|
|
35
|
+
key='publish'
|
|
36
|
+
uid={uid}
|
|
37
|
+
defaultContent={defaultContent}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
40
|
+
</Queue>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
export interface ShareData {
|
|
44
|
+
okrName: string;
|
|
45
|
+
okrId: number;
|
|
46
|
+
krs: string[];
|
|
47
|
+
user: {
|
|
48
|
+
name: string;
|
|
49
|
+
userId: number;
|
|
50
|
+
departmentName: string;
|
|
51
|
+
departmentId: number;
|
|
52
|
+
avatar: {
|
|
53
|
+
color: string;
|
|
54
|
+
src?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
interface ShareProps {
|
|
59
|
+
uid: any;
|
|
60
|
+
visible:boolean;
|
|
61
|
+
onClose: () => void
|
|
62
|
+
shareComponent: (share:(img:string) => void) => any
|
|
63
|
+
defaultContent?:string
|
|
64
|
+
}
|
|
65
|
+
const OkrShare: React.FC<ShareProps> = ({ uid,visible,onClose,shareComponent,defaultContent }) => {
|
|
66
|
+
const [shareImage,setShareImage] = useState<string>()
|
|
67
|
+
const modalRef = useRef<any>();
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<>
|
|
71
|
+
<Modal
|
|
72
|
+
visible={visible}
|
|
73
|
+
className="document-mouse-event-ignore"
|
|
74
|
+
destroyOnClose
|
|
75
|
+
customContent
|
|
76
|
+
// maskClosable
|
|
77
|
+
onCancel={() => onClose()}
|
|
78
|
+
ref={modalRef}
|
|
79
|
+
>
|
|
80
|
+
{visible ? (
|
|
81
|
+
<ShareContent
|
|
82
|
+
closeModal={() => onClose()}
|
|
83
|
+
getModalRef={() => modalRef.current.getRef()}
|
|
84
|
+
uid={uid}
|
|
85
|
+
shareImage={shareImage}
|
|
86
|
+
defaultContent={defaultContent}
|
|
87
|
+
shareComponent={shareComponent(setShareImage)}
|
|
88
|
+
/>
|
|
89
|
+
) : null}
|
|
90
|
+
</Modal>
|
|
91
|
+
</>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default OkrShare;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { ReactElement, useEffect, useState } from "react";
|
|
2
|
+
import MBlog from "../mblog";
|
|
3
|
+
import MBlogContext from "../mblog/context";
|
|
4
|
+
import { findDOMNode } from "react-dom";
|
|
5
|
+
import { addShare, uploadBase64 } from "./request-apis";
|
|
6
|
+
import Toast from "../toast";
|
|
7
|
+
import { getBSGlobal } from "../../utils/bs-global";
|
|
8
|
+
|
|
9
|
+
const loginUserId = getBSGlobal("loginUserInfo").Id;
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
base64: string;
|
|
13
|
+
getModalRef: Function;
|
|
14
|
+
closeModal: Function;
|
|
15
|
+
uid: any;
|
|
16
|
+
defaultContent?:string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function PublishMblog({
|
|
20
|
+
base64,
|
|
21
|
+
getModalRef,
|
|
22
|
+
closeModal,
|
|
23
|
+
uid,
|
|
24
|
+
defaultContent="秀一秀我的 OKR"
|
|
25
|
+
}: Props): ReactElement {
|
|
26
|
+
const [file, setFile] = useState({ url: "", pending: true });
|
|
27
|
+
const [status, setStatus] = useState(0);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
uploadBase64(base64.split(",")[1]).then((res) => {
|
|
30
|
+
setFile({
|
|
31
|
+
url: res.Data.obj,
|
|
32
|
+
pending: false,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}, []);
|
|
36
|
+
return (
|
|
37
|
+
<div className="okr-share-mblog__container">
|
|
38
|
+
<div className="okr-share-mblog__header">
|
|
39
|
+
发布动态
|
|
40
|
+
<i className="tu-icon-close" onClick={() => closeModal()} />
|
|
41
|
+
</div>
|
|
42
|
+
<div className="okr-share-mblog__body">
|
|
43
|
+
<MBlogContext.Provider
|
|
44
|
+
value={{ popContainer: findDOMNode(getModalRef()) }}
|
|
45
|
+
>
|
|
46
|
+
<MBlog
|
|
47
|
+
autoResizing={false}
|
|
48
|
+
defaultContent={defaultContent}
|
|
49
|
+
submitStatus={status}
|
|
50
|
+
commentsTypeKey={"share-okr" + loginUserId + uid}
|
|
51
|
+
autoFocus
|
|
52
|
+
onMblogSubmit={async (type, data) => {
|
|
53
|
+
if (file.pending) {
|
|
54
|
+
return Toast.Error("图片正在上传...");
|
|
55
|
+
}
|
|
56
|
+
setStatus(2);
|
|
57
|
+
await addShare({
|
|
58
|
+
...data,
|
|
59
|
+
FileUrls: file.url,
|
|
60
|
+
Visibility: 1,
|
|
61
|
+
isSendSMS: false,
|
|
62
|
+
});
|
|
63
|
+
Toast.Success("分享成功");
|
|
64
|
+
setStatus(1);
|
|
65
|
+
closeModal();
|
|
66
|
+
}}
|
|
67
|
+
isShowAttachment={false}
|
|
68
|
+
isShowSendSms={false}
|
|
69
|
+
isShowBtnCancel={false}
|
|
70
|
+
isShowRange={false}
|
|
71
|
+
/>
|
|
72
|
+
</MBlogContext.Provider>
|
|
73
|
+
<div className="okr-share-mblog__attachment">
|
|
74
|
+
<img src={base64} alt="" />
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default PublishMblog;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
const tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
|
|
4
|
+
const userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
|
|
5
|
+
|
|
6
|
+
const requestDomain = () => {
|
|
7
|
+
if (!window.location.hostname.match(/dev/)) return '';
|
|
8
|
+
return 'http://www.tita.gift'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const getImageBase64ByUrl = toUserId => {
|
|
12
|
+
return axios.post(`${requestDomain()}/api/v1/${tenantId}/${userId}/okr/share/getBase64Str`, { toUserId })
|
|
13
|
+
.then(getBase64Str => {
|
|
14
|
+
return getBase64Str.data;
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const getBase64DownloadUrl = base64 => {
|
|
19
|
+
return axios.post(`${requestDomain()}/api/v1/${tenantId}/${userId}/okr/share/imageDownLoadDfs`, { 'SharePicLink': base64 })
|
|
20
|
+
.then(dfs => {
|
|
21
|
+
return dfs.data;
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const uploadBase64 = base64 => {
|
|
26
|
+
return axios.post(`${requestDomain()}/api/v1/${tenantId}/${userId}/okr/share/imagedfs`, { 'SharePicLink': base64 })
|
|
27
|
+
.then(dfs => {
|
|
28
|
+
return dfs.data;
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const addShare = data => {
|
|
33
|
+
return axios.post(`${requestDomain()}/api/v2/${tenantId}/${userId}/user/feed/AddShare`, data)
|
|
34
|
+
.then(dfs => {
|
|
35
|
+
return dfs.data;
|
|
36
|
+
})
|
|
37
|
+
}
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
top: -17px;
|
|
7
|
+
width: 634px;
|
|
5
8
|
height: 36px;
|
|
6
|
-
|
|
9
|
+
margin: 0 auto;
|
|
7
10
|
font-size: 14px;
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
background: #FFF4D6;
|
|
12
|
+
box-shadow: 0px 4px 16px 0px rgba(127, 145, 180, 0.2);
|
|
13
|
+
border-radius: 18px;
|
|
10
14
|
font-weight: 400;
|
|
11
|
-
color: #
|
|
15
|
+
color: #704600;
|
|
16
|
+
// color: #2879ff;
|
|
12
17
|
line-height: 22px;
|
|
13
18
|
position: relative;
|
|
14
19
|
transition: all 0.3s linear;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
&-indent {
|
|
20
20
|
display: inline-block;
|
|
21
21
|
width: 16px;
|
|
22
|
+
min-width: 16px;
|
|
22
23
|
}
|
|
23
24
|
&-title {
|
|
24
25
|
font-size: 14px;
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
font-size: 14px;
|
|
37
38
|
line-height: 22px;
|
|
38
39
|
color: #141c28;
|
|
39
|
-
font-weight:
|
|
40
|
+
font-weight: 600;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -81,7 +81,9 @@ const UserMessage = () => {
|
|
|
81
81
|
const blessIndicator = indicators.filter((item) => {
|
|
82
82
|
return item.type === 'mZhufu';
|
|
83
83
|
});
|
|
84
|
-
|
|
84
|
+
const weeklyReportIndicator = indicators.filter((item) => {
|
|
85
|
+
return item.type === 'mWeekStatisticIndicator';
|
|
86
|
+
});
|
|
85
87
|
if (blessIndicator.length === 1) {
|
|
86
88
|
const userInfo = getUserInfo();
|
|
87
89
|
const options = {
|
|
@@ -92,6 +94,9 @@ const UserMessage = () => {
|
|
|
92
94
|
// @ts-ignore
|
|
93
95
|
window.util.openGift(options);
|
|
94
96
|
}
|
|
97
|
+
if(weeklyReportIndicator.length){
|
|
98
|
+
window?.Talent.app.vent.trigger('open-weekly-report-modal')
|
|
99
|
+
}
|
|
95
100
|
}
|
|
96
101
|
});
|
|
97
102
|
};
|
|
@@ -70,7 +70,7 @@ export default props => {
|
|
|
70
70
|
|
|
71
71
|
<span className={classNames(`${preCls}__e-project-node-actions-user`)}>
|
|
72
72
|
{/* <TextAvatar name={user.name} id={user.userId} width={76} editable onEditUser={onEditUserHandler} /> */}
|
|
73
|
-
<Avatar.Text name={data
|
|
73
|
+
<Avatar.Text name={data?.principalUser?.name} id={data?.principalUser?.userId} width={64} extraCls={isGray&&`${preCls}__e-project-node-gray`} />
|
|
74
74
|
</span>
|
|
75
75
|
|
|
76
76
|
<span className={classNames(`${preCls}__e-project-node-actions-date`)}>
|
|
@@ -218,8 +218,8 @@ export default (props) => {
|
|
|
218
218
|
className={classNames(`${preCls}__e-task-level2-node-actions-user`)}
|
|
219
219
|
>
|
|
220
220
|
<Avatar.Text
|
|
221
|
-
name={user
|
|
222
|
-
id={user
|
|
221
|
+
name={user?.name}
|
|
222
|
+
id={user?.userId}
|
|
223
223
|
width={64}
|
|
224
224
|
editable={hasAuth}
|
|
225
225
|
onEditUser={onEditUserHandler}
|
|
@@ -219,8 +219,8 @@ export default (props) => {
|
|
|
219
219
|
<span className={classNames(`${preCls}__e-task-node-actions`)}>
|
|
220
220
|
<span className={classNames(`${preCls}__e-task-node-actions-user`)}>
|
|
221
221
|
<Avatar.Text
|
|
222
|
-
name={user
|
|
223
|
-
id={user
|
|
222
|
+
name={user?.name}
|
|
223
|
+
id={user?.userId}
|
|
224
224
|
width={64}
|
|
225
225
|
editable={hasEditAuth}
|
|
226
226
|
onEditUser={onEditUserHandler}
|
|
@@ -8,7 +8,7 @@ import './index.scss';
|
|
|
8
8
|
interface Props {
|
|
9
9
|
closeModal: Function;
|
|
10
10
|
getModalRef: Function;
|
|
11
|
-
data:
|
|
11
|
+
data: any;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const ShareContent = function({ closeModal, getModalRef, data }: Props) {
|
|
@@ -41,23 +41,10 @@ const ShareContent = function({ closeModal, getModalRef, data }: Props) {
|
|
|
41
41
|
</Queue>
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
okrName: string;
|
|
46
|
-
okrId: number;
|
|
47
|
-
krs: string[];
|
|
48
|
-
user: {
|
|
49
|
-
name: string;
|
|
50
|
-
userId: number;
|
|
51
|
-
departmentName: string;
|
|
52
|
-
departmentId: number;
|
|
53
|
-
avatar: {
|
|
54
|
-
color: string;
|
|
55
|
-
src?: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
}
|
|
44
|
+
|
|
59
45
|
interface ShareProps {
|
|
60
|
-
|
|
46
|
+
shareComponent
|
|
47
|
+
data: any;
|
|
61
48
|
visible:boolean;
|
|
62
49
|
onClose: () => void
|
|
63
50
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.titaui-select-tags {
|
|
2
2
|
display: flex;
|
|
3
|
+
|
|
3
4
|
.rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
|
|
4
5
|
border: 1px solid #DFE3EA;
|
|
5
6
|
}
|
|
@@ -19,6 +20,10 @@
|
|
|
19
20
|
display: none;
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
.rc-select-multiple .rc-select-selector .rc-select-selection-overflow {
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
.rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
|
|
23
28
|
display: none;
|
|
24
29
|
}
|
|
@@ -47,6 +52,8 @@
|
|
|
47
52
|
height: unset;
|
|
48
53
|
padding: 7px 12px 0;
|
|
49
54
|
border: 1px solid #DFE3EA;
|
|
55
|
+
max-height: 116px;
|
|
56
|
+
overflow: auto;
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
.rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC, useState
|
|
1
|
+
import React, { FC, useState } from "react";
|
|
2
2
|
import Select, { Option } from "rc-select";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import "rc-select/assets/index.less";
|
|
@@ -11,7 +11,7 @@ interface DataProps {
|
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
data: DataProps[];
|
|
14
|
-
name?:any;
|
|
14
|
+
name?: any;
|
|
15
15
|
selected: any;
|
|
16
16
|
onChange: Function;
|
|
17
17
|
mode?: any | "single" | "multiple";
|
|
@@ -19,7 +19,7 @@ interface Props {
|
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
className?: any;
|
|
21
21
|
noBorder?: boolean;
|
|
22
|
-
suffix?:string;
|
|
22
|
+
suffix?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const preCls = "titaui-select-tags";
|
|
@@ -31,26 +31,23 @@ const SelectTags: FC<Props> = ({
|
|
|
31
31
|
style = { width: "200px" },
|
|
32
32
|
mode = "single",
|
|
33
33
|
className,
|
|
34
|
-
placeholder=
|
|
34
|
+
placeholder = "请选择",
|
|
35
35
|
name,
|
|
36
36
|
noBorder,
|
|
37
37
|
...restProps
|
|
38
38
|
}) => {
|
|
39
|
-
|
|
40
39
|
const [value, setValue] = useState(selected);
|
|
41
40
|
|
|
42
41
|
const onhandleChange = (value, options) => {
|
|
43
|
-
onChange && onChange(value, options,name);
|
|
42
|
+
onChange && onChange(value, options, name);
|
|
44
43
|
setValue(value);
|
|
45
44
|
};
|
|
46
45
|
|
|
47
46
|
return (
|
|
48
47
|
<div className={preCls}>
|
|
49
48
|
<Select
|
|
50
|
-
className={classNames(className,{[`${preCls}-noborder`]: noBorder}
|
|
51
|
-
dropdownClassName={classNames(
|
|
52
|
-
`titaui-dropDown`,
|
|
53
|
-
{
|
|
49
|
+
className={classNames(className, { [`${preCls}-noborder`]: noBorder })}
|
|
50
|
+
dropdownClassName={classNames(`titaui-dropDown`, {
|
|
54
51
|
[`${preCls}-hasSelectItem`]: mode === "multiple",
|
|
55
52
|
})}
|
|
56
53
|
value={value}
|
|
@@ -75,7 +72,6 @@ const SelectTags: FC<Props> = ({
|
|
|
75
72
|
})}
|
|
76
73
|
</Select>
|
|
77
74
|
</div>
|
|
78
|
-
|
|
79
75
|
);
|
|
80
76
|
};
|
|
81
77
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react'
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
percent: number
|
|
5
|
+
}
|
|
6
|
+
const preCls = 'weekly-report-card-board'
|
|
7
|
+
|
|
8
|
+
function Board({percent}: Props): ReactElement {
|
|
9
|
+
return (
|
|
10
|
+
<div className={preCls}>
|
|
11
|
+
<div className={preCls+'__done'}>
|
|
12
|
+
<div className={preCls+'__undone'}style={{transform:`rotate(${percent/100 * 180}deg)`}}/>
|
|
13
|
+
<div className={preCls+'__space'} style={{transform:'rotate(45deg)'}}/>
|
|
14
|
+
<div className={preCls+'__space'} />
|
|
15
|
+
<div className={preCls+'__space'} style={{transform:'rotate(-45deg)'}}/>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div className={preCls+'__center'}>
|
|
19
|
+
<div>{percent}%</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default Board
|