Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chatGLM
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘坚-丰林-DEV
chatGLM
Commits
0e620ae8
Commit
0e620ae8
authored
May 10, 2023
by
文旺-丰林-DEV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix style issues
parent
fd481bdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
17 deletions
+37
-17
global.less
react/src/global.less
+7
-0
index.tsx
react/src/pages/UserManage/index.tsx
+30
-17
No files found.
react/src/global.less
View file @
0e620ae8
...
...
@@ -113,3 +113,10 @@ ol {
background-color: #68beb9 !important;
border-color: #68beb9 !important;
}
.ant-btn:hover,
.ant-btn:focus {
color: #fff;
background-color: #68beb9 !important;
border-color: #68beb9 !important;
}
react/src/pages/UserManage/index.tsx
View file @
0e620ae8
...
...
@@ -41,17 +41,17 @@ interface IUserResult {
role
:
string
;
state
:
string
;
phone
:
string
;
failureReason
:
string
failureReason
:
string
;
}
export
interface
ICreateUserResult
{
results
:
IUserResult
[]
,
failNum
:
number
,
successNum
:
number
,
results
:
IUserResult
[]
;
failNum
:
number
;
successNum
:
number
;
}
const
{
Item
}
=
Form
;
const
{
Password
}
=
Input
;
const
antIcon
=
<
LoadingOutlined
style=
{
{
fontSize
:
2
4
}
}
spin
/>;
const
antIcon
=
<
LoadingOutlined
style=
{
{
fontSize
:
2
0
}
}
spin
/>;
const
Loading
:
React
.
FC
=
()
=>
<
Spin
indicator=
{
antIcon
}
/>;
const
layout
=
{
...
...
@@ -311,18 +311,18 @@ const UserManage = () => {
const
handleUpload
=
(
file
)
=>
{
setUploadButtonDisable
(
true
);
postExcelFile
(
file
).
then
(
data
=>
{
postExcelFile
(
file
).
then
(
(
data
)
=>
{
setUploadButtonDisable
(
false
);
setUsers
(
data
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
setIsModalOpen
(
true
);
},
100
)
},
100
)
;
});
};
const
downloadExcelTemplate
=
()
=>
{
postDowload
();
}
}
;
return
(
<
PageContainer
>
...
...
@@ -496,13 +496,20 @@ const UserManage = () => {
headerTitle=
"账号列表"
toolBarRender=
{
()
=>
[
<
Button
>
<
a
href=
'https://baibaomen.oss-cn-hangzhou.aliyuncs.com/zhensheng/excelTemplate.xlsx'
>
批量添加用户Excel模板
</
a
></
Button
>,
<
Upload
beforeUpload=
{
handleUpload
}
disabled=
{
uploadButtonDisable
}
showUploadList=
{
false
}
>
{
uploadButtonDisable
?
<
Button
color=
'white'
><
Loading
/></
Button
>
:
<
div
style=
{
{
color
:
'red'
}
}
><
Button
icon=
{
<
UploadOutlined
/>
}
>
Excel表格添加账号
</
Button
></
div
>
}
<
a
href=
"https://baibaomen.oss-cn-hangzhou.aliyuncs.com/zhensheng/excelTemplate.xlsx"
>
批量添加账号Excel模板
</
a
>
</
Button
>,
<
Upload
beforeUpload=
{
handleUpload
}
disabled=
{
uploadButtonDisable
}
showUploadList=
{
false
}
>
{
uploadButtonDisable
?
(
<
Button
color=
"white"
>
<
Loading
/>
</
Button
>
)
:
(
<
div
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Excel表格添加账号
</
Button
>
</
div
>
)
}
</
Upload
>,
<
Button
key=
"button"
...
...
@@ -517,7 +524,13 @@ const UserManage = () => {
</
Button
>,
]
}
/>
<
UserModal
isModalOpen=
{
isModalOpen
}
data=
{
users
}
onClose=
{
()
=>
{
setIsModalOpen
(
false
)
}
}
></
UserModal
>
<
UserModal
isModalOpen=
{
isModalOpen
}
data=
{
users
}
onClose=
{
()
=>
{
setIsModalOpen
(
false
);
}
}
></
UserModal
>
</
PageContainer
>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment