Commit 0e620ae8 authored by 文旺-丰林-DEV's avatar 文旺-丰林-DEV

fix style issues

parent fd481bdf
...@@ -113,3 +113,10 @@ ol { ...@@ -113,3 +113,10 @@ ol {
background-color: #68beb9 !important; background-color: #68beb9 !important;
border-color: #68beb9 !important; border-color: #68beb9 !important;
} }
.ant-btn:hover,
.ant-btn:focus {
color: #fff;
background-color: #68beb9 !important;
border-color: #68beb9 !important;
}
...@@ -41,17 +41,17 @@ interface IUserResult { ...@@ -41,17 +41,17 @@ interface IUserResult {
role: string; role: string;
state: string; state: string;
phone: string; phone: string;
failureReason: string failureReason: string;
} }
export interface ICreateUserResult { export interface ICreateUserResult {
results: IUserResult[], results: IUserResult[];
failNum: number, failNum: number;
successNum: number, successNum: number;
} }
const { Item } = Form; const { Item } = Form;
const { Password } = Input; const { Password } = Input;
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />; const antIcon = <LoadingOutlined style={{ fontSize: 20 }} spin />;
const Loading: React.FC = () => <Spin indicator={antIcon} />; const Loading: React.FC = () => <Spin indicator={antIcon} />;
const layout = { const layout = {
...@@ -311,18 +311,18 @@ const UserManage = () => { ...@@ -311,18 +311,18 @@ const UserManage = () => {
const handleUpload = (file) => { const handleUpload = (file) => {
setUploadButtonDisable(true); setUploadButtonDisable(true);
postExcelFile(file).then(data => { postExcelFile(file).then((data) => {
setUploadButtonDisable(false); setUploadButtonDisable(false);
setUsers(data); setUsers(data);
setTimeout(() => { setTimeout(() => {
setIsModalOpen(true); setIsModalOpen(true);
}, 100) }, 100);
}); });
}; };
const downloadExcelTemplate = () => { const downloadExcelTemplate = () => {
postDowload(); postDowload();
} };
return ( return (
<PageContainer> <PageContainer>
...@@ -496,13 +496,20 @@ const UserManage = () => { ...@@ -496,13 +496,20 @@ const UserManage = () => {
headerTitle="账号列表" headerTitle="账号列表"
toolBarRender={() => [ toolBarRender={() => [
<Button> <Button>
<a href='https://baibaomen.oss-cn-hangzhou.aliyuncs.com/zhensheng/excelTemplate.xlsx'>批量添加用户Excel模板</a></Button>, <a href="https://baibaomen.oss-cn-hangzhou.aliyuncs.com/zhensheng/excelTemplate.xlsx">
<Upload 批量添加账号Excel模板
beforeUpload={handleUpload} </a>
disabled={uploadButtonDisable} </Button>,
showUploadList={false} <Upload beforeUpload={handleUpload} disabled={uploadButtonDisable} showUploadList={false}>
> {uploadButtonDisable ? (
{uploadButtonDisable ? <Button color='white'><Loading /></Button> : <div style={{color: 'red'}}><Button icon={<UploadOutlined />}>Excel表格添加账号</Button></div>} <Button color="white">
<Loading />
</Button>
) : (
<div>
<Button icon={<UploadOutlined />}>Excel表格添加账号</Button>
</div>
)}
</Upload>, </Upload>,
<Button <Button
key="button" key="button"
...@@ -517,7 +524,13 @@ const UserManage = () => { ...@@ -517,7 +524,13 @@ const UserManage = () => {
</Button>, </Button>,
]} ]}
/> />
<UserModal isModalOpen={isModalOpen} data={users} onClose={()=>{ setIsModalOpen(false) }}></UserModal> <UserModal
isModalOpen={isModalOpen}
data={users}
onClose={() => {
setIsModalOpen(false);
}}
></UserModal>
</PageContainer> </PageContainer>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment