|
@@ -86,6 +86,9 @@ export default function createCrudOptions(crudOptionsProps: CreateCrudOptionsPro
|
|
actionbar: {
|
|
actionbar: {
|
|
show: true,
|
|
show: true,
|
|
buttons: {
|
|
buttons: {
|
|
|
|
+ add: {
|
|
|
|
+ text: '添加学员档案'
|
|
|
|
+ },
|
|
download: {
|
|
download: {
|
|
text: '打包下载档案',
|
|
text: '打包下载档案',
|
|
title: '下载当前学员所有档案',
|
|
title: '下载当前学员所有档案',
|
|
@@ -101,9 +104,15 @@ export default function createCrudOptions(crudOptionsProps: CreateCrudOptionsPro
|
|
if (!crudOptionsProps.context) {
|
|
if (!crudOptionsProps.context) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if (!crudOptionsProps.context.studentNumber) {
|
|
|
|
+ crudOptionsProps.context.message.info('没有筛选人员的情况下 , 不允许下载档案!');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const { data } = await downloadArchives(crudOptionsProps.context.studentNumber);
|
|
const { data } = await downloadArchives(crudOptionsProps.context.studentNumber);
|
|
- const fileUrl = `http://localhost:3200/proxy-pattern/archive/getFileByToken?archiveToken=${data}`;
|
|
|
|
- window.location.href = fileUrl;
|
|
|
|
|
|
+ if (data) {
|
|
|
|
+ const fileUrl = `http://localhost:3200/proxy-pattern/archive/getFileByToken?archiveToken=${data}`;
|
|
|
|
+ window.location.href = fileUrl;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|