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
6284bf37
Commit
6284bf37
authored
May 09, 2023
by
文旺-丰林-DEV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add import user refresh user list
parent
9f1b5602
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
901 additions
and
19 deletions
+901
-19
excelTemplate.xlsx
...e/host/BBM.ChatGLM.HttpApi.Host/Excels/excelTemplate.xlsx
+0
-0
appsettings.json
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/appsettings.json
+0
-1
logs-20230509.txt
...core/host/BBM.ChatGLM.HttpApi.Host/logs/logs-20230509.txt
+867
-0
index.tsx
react/src/pages/UserManage/index.tsx
+34
-18
No files found.
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/Excels/excelTemplate.xlsx
0 → 100644
View file @
6284bf37
File added
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/appsettings.json
View file @
6284bf37
...
...
@@ -39,7 +39,6 @@
},
"Redis"
:
{
"Configuration"
:
"yg-redis-dev-wan.redis.rds.aliyuncs.com:6379,password=YG@redis!dev2022123,defaultDatabase=5"
},
"Jwt"
:
{
"Audience"
:
"BBM.ChatGLM"
,
...
...
aspnet-core/host/BBM.ChatGLM.HttpApi.Host/logs/logs-20230509.txt
0 → 100644
View file @
6284bf37
This source diff could not be displayed because it is too large. You can
view the blob
instead.
react/src/pages/UserManage/index.tsx
View file @
6284bf37
...
...
@@ -6,13 +6,26 @@ import {
postResetUser
,
postEditUser
,
postExcelFile
,
postDowload
postDowload
,
}
from
'@/services/chatGLM/api'
;
import
{
PlusOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
type
{
ActionType
}
from
'@ant-design/pro-components'
;
import
{
PageContainer
}
from
'@ant-design/pro-components'
;
import
{
ProTable
}
from
'@ant-design/pro-components'
;
import
{
Button
,
Col
,
Divider
,
Form
,
Input
,
Modal
,
Radio
,
Row
,
Switch
,
message
,
Upload
,
Spin
}
from
'antd'
;
import
{
Button
,
Col
,
Divider
,
Form
,
Input
,
Modal
,
Radio
,
Row
,
Switch
,
message
,
Upload
,
Spin
,
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
{
isEmpty
}
from
'lodash'
;
...
...
@@ -22,7 +35,6 @@ import styles from './index.less';
import
{
Exclamtion
}
from
'@/components/Icons/Icons'
;
import
{
LoadingOutlined
}
from
'@ant-design/icons'
;
const
{
Item
}
=
Form
;
const
{
Password
}
=
Input
;
const
antIcon
=
<
LoadingOutlined
style=
{
{
fontSize
:
24
}
}
spin
/>;
...
...
@@ -179,7 +191,6 @@ const UserManage = () => {
},
];
const
handleOk
=
()
=>
{
setIsModalAccountOpen
(
false
);
};
...
...
@@ -224,7 +235,7 @@ const UserManage = () => {
const
onHandleClickAccountFinish
=
(
values
:
any
)
=>
{
if
(
accountModalName
===
'添加账号'
)
{
alert
(
"2"
);
alert
(
'2'
);
createdAccount
(
values
);
}
if
(
accountModalName
===
'编辑账号'
)
{
...
...
@@ -284,16 +295,16 @@ const UserManage = () => {
const
handleUpload
=
(
file
)
=>
{
setUploadButtonDisable
(
true
);
postExcelFile
(
file
).
then
(
res
=>
{
postExcelFile
(
file
).
then
(
(
res
)
=>
{
setUploadButtonDisable
(
false
);
actionRef
.
current
?.
reload
();
message
.
success
(
`批量添加用户: 成功人数:
${
res
.
successNum
}
失败人数:
${
res
.
failNum
}
人`
);
})
})
;
};
const
downloadExcelTemplate
=
()
=>
{
postDowload
();
}
};
return
(
<
PageContainer
>
...
...
@@ -467,13 +478,18 @@ 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
><
Loading
/></
Button
>
:
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Excel表格添加账号
</
Button
>
}
<
a
href=
"https://baibaomen.oss-cn-hangzhou.aliyuncs.com/zhensheng/excelTemplate.xlsx"
>
批量添加用户模板下载
</
a
>
</
Button
>,
<
Upload
beforeUpload=
{
handleUpload
}
disabled=
{
uploadButtonDisable
}
showUploadList=
{
false
}
>
{
uploadButtonDisable
?
(
<
Button
>
<
Loading
/>
</
Button
>
)
:
(
<
Button
icon=
{
<
UploadOutlined
/>
}
>
批量添加账号
</
Button
>
)
}
</
Upload
>,
<
Button
key=
"button"
...
...
@@ -485,11 +501,11 @@ const UserManage = () => {
type=
"primary"
>
添加账号
</
Button
>
</
Button
>
,
]
}
/>
</
PageContainer
>
);
};
export
default
UserManage
;
\ No newline at end of file
export
default
UserManage
;
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