cfel-base-components 2.5.21 → 2.5.23
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/package.json +1 -1
- package/src/components/layout/index.tsx +9 -0
- package/src/components/layout/user-card/index.tsx +7 -2
- package/src/components/universal-pages/cpcAccountInfo/EditAccountDrawer/index.tsx +1 -1
- package/src/components/universal-pages/cpcRoleInfo/EditAccountDrawer/index.tsx +3 -4
- package/src/components/universal-pages/cpcRoleInfo/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -19,11 +19,15 @@ export interface LiosLayoutlProps {
|
|
|
19
19
|
availableAmount: string;
|
|
20
20
|
currency: string;
|
|
21
21
|
};
|
|
22
|
+
MyLoginInfo?: {
|
|
23
|
+
isAdmin: any;
|
|
24
|
+
};
|
|
22
25
|
amountInfo?: {
|
|
23
26
|
residueNum: string;
|
|
24
27
|
currencyCode: string;
|
|
25
28
|
};
|
|
26
29
|
myWalletInfoAction?: Function;
|
|
30
|
+
myLoginInfoAction?: Function;
|
|
27
31
|
logoutUrl?: string;
|
|
28
32
|
switchTenantUrl?: string;
|
|
29
33
|
defaultOpenKeys?: string[];
|
|
@@ -43,8 +47,10 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
43
47
|
|
|
44
48
|
defaultOpenKeys,
|
|
45
49
|
myWalletInfo,
|
|
50
|
+
MyLoginInfo,
|
|
46
51
|
amountInfo,
|
|
47
52
|
myWalletInfoAction,
|
|
53
|
+
myLoginInfoAction,
|
|
48
54
|
isHideHeader,
|
|
49
55
|
} = props;
|
|
50
56
|
|
|
@@ -154,6 +160,7 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
154
160
|
content={
|
|
155
161
|
<UserCard
|
|
156
162
|
myWalletInfo={myWalletInfo}
|
|
163
|
+
MyLoginInfo={MyLoginInfo}
|
|
157
164
|
amountInfo={amountInfo}
|
|
158
165
|
customAction={customAction}
|
|
159
166
|
isCopied={isCopied}
|
|
@@ -171,6 +178,8 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
171
178
|
tenantId:false
|
|
172
179
|
});
|
|
173
180
|
myWalletInfoAction && myWalletInfoAction();
|
|
181
|
+
myLoginInfoAction && myLoginInfoAction();
|
|
182
|
+
|
|
174
183
|
}}
|
|
175
184
|
>
|
|
176
185
|
<div className="layout-header-user">
|
|
@@ -27,7 +27,9 @@ interface MyWalletInfoType {
|
|
|
27
27
|
availableAmount: string;
|
|
28
28
|
currency: string;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
interface MyLoginInfoType {
|
|
31
|
+
isAdmin: any;
|
|
32
|
+
}
|
|
31
33
|
interface AmountInfoType {
|
|
32
34
|
residueNum: string;
|
|
33
35
|
currencyCode: string;
|
|
@@ -48,6 +50,7 @@ const renderCurrency = (currency: string) => {
|
|
|
48
50
|
|
|
49
51
|
export default function UserCard({
|
|
50
52
|
myWalletInfo,
|
|
53
|
+
MyLoginInfo,
|
|
51
54
|
amountInfo,
|
|
52
55
|
customAction,
|
|
53
56
|
isCopied,
|
|
@@ -63,6 +66,8 @@ export default function UserCard({
|
|
|
63
66
|
|
|
64
67
|
const { availableCashAmount, availableAmount, currency }: MyWalletInfoType =
|
|
65
68
|
myWalletInfo || {};
|
|
69
|
+
const { isAdmin }: MyLoginInfoType = MyLoginInfo || {};
|
|
70
|
+
|
|
66
71
|
const { residueNum, currencyCode }: AmountInfoType = amountInfo || {};
|
|
67
72
|
|
|
68
73
|
const UserCard = () => {
|
|
@@ -71,7 +76,7 @@ export default function UserCard({
|
|
|
71
76
|
<div className="user-info">
|
|
72
77
|
<div className="user-avatarBox">
|
|
73
78
|
<img className="user-avatar" src={avatar} />
|
|
74
|
-
<div className="user-mater">{
|
|
79
|
+
<div className="user-mater">{isAdmin ? "主账号" : "子账号"}</div>
|
|
75
80
|
</div>
|
|
76
81
|
<div className="user-info-right">
|
|
77
82
|
<span className="name">{name}</span>
|
|
@@ -9,14 +9,14 @@ interface propsType {
|
|
|
9
9
|
queryByKeywordFunc: Function;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export default function
|
|
12
|
+
export default function Index({
|
|
13
13
|
open,
|
|
14
14
|
editOpenStatus,
|
|
15
15
|
roleBoundAccountsFunc,
|
|
16
16
|
queryByKeywordFunc
|
|
17
17
|
}: propsType) {
|
|
18
18
|
const [form] = Form.useForm();
|
|
19
|
-
const [selectOptions,
|
|
19
|
+
const [selectOptions, setSelectOptions] = useState([])
|
|
20
20
|
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
form.resetFields()
|
|
@@ -50,8 +50,7 @@ export default function index({
|
|
|
50
50
|
queryByKeywordFunc({
|
|
51
51
|
keyword
|
|
52
52
|
}).then((res: any) => {
|
|
53
|
-
|
|
54
|
-
}).catch((err) => {
|
|
53
|
+
setSelectOptions(res)
|
|
55
54
|
})
|
|
56
55
|
}, 500)
|
|
57
56
|
|
|
@@ -563,7 +563,7 @@ export default function RoleInfo({
|
|
|
563
563
|
rowSelection={
|
|
564
564
|
isResourceAction && roleCode !== 'admin'
|
|
565
565
|
? {
|
|
566
|
-
checkStrictly:
|
|
566
|
+
checkStrictly: true,
|
|
567
567
|
selectedRowKeys: selectedRowKeys,
|
|
568
568
|
onChange: (selectedRowKeys: any, selectedRows: any) => {
|
|
569
569
|
setselectedRowKeys(selectedRowKeys)
|