mirror of
https://github.com/PlayEdu/backend
synced 2025-06-08 03:14:11 +08:00
学员批量导入增加模板下载
This commit is contained in:
parent
4684252fd5
commit
0f2ffd306d
BIN
public/template/学员批量导入模板.xlsx
Normal file
BIN
public/template/学员批量导入模板.xlsx
Normal file
Binary file not shown.
@ -4,6 +4,7 @@ import { Row, Col, Form, Input, Cascader, Button, Upload, message } from "antd";
|
||||
import { BackBartment } from "../../compenents";
|
||||
import { user } from "../../api/index";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { getHost } from "../../utils/index";
|
||||
|
||||
export const MemberImportPage: React.FC = () => {
|
||||
const navigate = useNavigate();
|
||||
@ -66,6 +67,11 @@ export const MemberImportPage: React.FC = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const download = () => {
|
||||
let url = getHost() + "template/学员批量导入模板.xlsx";
|
||||
window.open(url);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Row className="playedu-main-body">
|
||||
@ -73,10 +79,13 @@ export const MemberImportPage: React.FC = () => {
|
||||
<div className="float-left mb-24">
|
||||
<BackBartment title="学员批量导入" />
|
||||
</div>
|
||||
<div className="float-left">
|
||||
<div className="float-left d-flex">
|
||||
<Upload {...uploadProps}>
|
||||
<Button type="primary">导入Excel</Button>
|
||||
</Upload>
|
||||
<Button type="link" className="ml-15" danger onClick={download}>
|
||||
下载「学员批量导入模板」
|
||||
</Button>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
@ -79,3 +79,7 @@ export function parseVideo(file: File): Promise<VideoParseInfo> {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function getHost() {
|
||||
return window.location.protocol + "//" + window.location.host+"/";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user