@yeeyoon/library 3.2.0 → 3.2.4
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.
@@ -7,7 +7,7 @@ import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
7
7
|
import { queryOidcUserCardData } from './service';
|
8
8
|
|
9
9
|
function InfoCart(props) {
|
10
|
-
const { baseMsg } = props;
|
10
|
+
const { baseMsg, ...rest } = props;
|
11
11
|
const reg = /^(\d{3})\d*(\d{4})$/;
|
12
12
|
const [cardData, setCardData] = useState({});
|
13
13
|
const [chartData, setChartData] = useState({});
|
@@ -48,9 +48,11 @@ function InfoCart(props) {
|
|
48
48
|
};
|
49
49
|
useEffect(() => {
|
50
50
|
getCardData();
|
51
|
-
}, [baseMsg.userId]);
|
51
|
+
}, [baseMsg.userId, baseMsg.id]);
|
52
52
|
const getCardData = async () => {
|
53
|
-
const resp = await queryOidcUserCardData({
|
53
|
+
const resp = await queryOidcUserCardData({
|
54
|
+
id: baseMsg.userId || baseMsg?.id,
|
55
|
+
});
|
54
56
|
const { success, data } = resp;
|
55
57
|
if (success) {
|
56
58
|
if (data.content.length > 0) {
|
@@ -68,19 +70,19 @@ function InfoCart(props) {
|
|
68
70
|
}
|
69
71
|
};
|
70
72
|
return (
|
71
|
-
<div className={styles['info-cart-content']}>
|
73
|
+
<div className={styles['info-cart-content']} {...rest}>
|
72
74
|
<div className={styles['info-cart-base']}>
|
73
75
|
<Image
|
74
76
|
width="50px"
|
75
77
|
height="50px"
|
76
78
|
preview={false}
|
77
79
|
style={{ borderRadius: '5px' }}
|
78
|
-
src={baseMsg?.headUrl}
|
80
|
+
src={baseMsg?.headUrl || baseMsg?.icon}
|
79
81
|
/>
|
80
82
|
<div className={styles['info-cart-np']}>
|
81
83
|
<span>{baseMsg?.name}</span>
|
82
84
|
<span style={{ marginTop: '6px', fontSize: '12px' }}>
|
83
|
-
{(baseMsg?.mobile || '').replace(reg, '$1****$2')}
|
85
|
+
{(baseMsg?.mobile || baseMsg?.phone || '').replace(reg, '$1****$2')}
|
84
86
|
</span>
|
85
87
|
</div>
|
86
88
|
</div>
|
@@ -118,9 +120,10 @@ function InfoCart(props) {
|
|
118
120
|
type="monotone"
|
119
121
|
dataKey="贡献数据数"
|
120
122
|
stroke="#7367F0"
|
121
|
-
strokeWidth="
|
123
|
+
strokeWidth="2"
|
124
|
+
dot={false}
|
122
125
|
/>
|
123
|
-
<Tooltip />
|
126
|
+
<Tooltip cursor={false} />
|
124
127
|
<XAxis dataKey="name" style={{ display: 'none' }} />
|
125
128
|
</LineChart>
|
126
129
|
</div>
|
File without changes
|
File without changes
|
package/package.json
CHANGED
package/src/global.css
CHANGED
package/src/pages/index.js
CHANGED
@@ -1,17 +1,14 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { useState, useEffect } from 'react';
|
2
2
|
import Header from '../../lib/components/Header/';
|
3
|
-
import TenantSelector from '../../lib/components/TenantSelector';
|
4
3
|
|
5
4
|
// eslint-disable-next-line react/display-name
|
6
5
|
export default function () {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</>
|
16
|
-
);
|
6
|
+
const [tenantId, setTenantId] = useState('');
|
7
|
+
useEffect(() => {
|
8
|
+
setTimeout(() => {
|
9
|
+
setTenantId('053a033a063711ecb0c00c42a1ff8370');
|
10
|
+
// setTenantId('f12a71b6063611ecb0c00c42a1ff8370');
|
11
|
+
}, 3000);
|
12
|
+
}, []);
|
13
|
+
return <Header productName="bpm" tenantId={tenantId} />;
|
17
14
|
}
|