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

fix style issues

parent fd481bdf
......@@ -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;
}
......@@ -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: 24 }} spin />;
const antIcon = <LoadingOutlined style={{ fontSize: 20 }} 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>
);
};
......
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