@yeeyoon/library 3.1.9 → 3.2.3
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/CommonTable/index.jsx +1 -1
- package/lib/components/{InfoCart/index.js → InfoCard/index.jsx} +15 -14
- package/lib/components/{InfoCart → InfoCard}/index.less +0 -0
- package/lib/components/{InfoCart → InfoCard}/service.js +0 -0
- package/package.json +1 -1
- package/src/global.css +1 -1
- package/src/pages/index.js +9 -12
@@ -48,22 +48,22 @@ 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) {
|
57
59
|
let monthContribute = data.content[0].last_month_contribute || '';
|
58
60
|
setCardData(data.content[0]);
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
)
|
66
|
-
: setChartData([{ 贡献数据数: 0 }]);
|
61
|
+
setChartData(
|
62
|
+
monthContribute?.split(',').map((item) => ({
|
63
|
+
贡献数据数: parseInt(item.split(':')[1]),
|
64
|
+
name: item.split(':')[0],
|
65
|
+
}))
|
66
|
+
);
|
67
67
|
} else {
|
68
68
|
setCardData(obj);
|
69
69
|
}
|
@@ -77,12 +77,12 @@ function InfoCart(props) {
|
|
77
77
|
height="50px"
|
78
78
|
preview={false}
|
79
79
|
style={{ borderRadius: '5px' }}
|
80
|
-
src={baseMsg?.headUrl}
|
80
|
+
src={baseMsg?.headUrl || baseMsg?.icon}
|
81
81
|
/>
|
82
82
|
<div className={styles['info-cart-np']}>
|
83
83
|
<span>{baseMsg?.name}</span>
|
84
84
|
<span style={{ marginTop: '6px', fontSize: '12px' }}>
|
85
|
-
{(baseMsg?.mobile || '').replace(reg, '$1****$2')}
|
85
|
+
{(baseMsg?.mobile || baseMsg?.phone || '').replace(reg, '$1****$2')}
|
86
86
|
</span>
|
87
87
|
</div>
|
88
88
|
</div>
|
@@ -120,9 +120,10 @@ function InfoCart(props) {
|
|
120
120
|
type="monotone"
|
121
121
|
dataKey="贡献数据数"
|
122
122
|
stroke="#7367F0"
|
123
|
-
strokeWidth="
|
123
|
+
strokeWidth="3"
|
124
|
+
dot={false}
|
124
125
|
/>
|
125
|
-
<Tooltip />
|
126
|
+
<Tooltip cursor={false} />
|
126
127
|
<XAxis dataKey="name" style={{ display: 'none' }} />
|
127
128
|
</LineChart>
|
128
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
|
}
|