|
@@ -269,26 +269,31 @@ export default {
|
|
|
cancelButtonText: '取消',
|
|
|
cancelButtonClass: 'leftbtn',
|
|
|
customClass: 'exportBox1',
|
|
|
- title: '导出数据',
|
|
|
- beforeClose: (action, instance, done) => {
|
|
|
- if (action === 'confirm') {
|
|
|
- // instance.confirmButtonLoading = true;
|
|
|
- instance.confirmButtonText = '导出中...';
|
|
|
- api.exportDrugRecord().then(res => {
|
|
|
- if (res.status === 200) {
|
|
|
- setTimeout(() => {
|
|
|
- utils.downloadExportedData(res.data, '药品关联数据.xls');
|
|
|
- done();
|
|
|
- }, 1500);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- done();
|
|
|
- }
|
|
|
- }
|
|
|
+ title: '导出数据'
|
|
|
+ // beforeClose: (action, instance, done) => {
|
|
|
+ // if (action === 'confirm') {
|
|
|
+ // // instance.confirmButtonLoading = true;
|
|
|
+ // instance.confirmButtonText = '导出中...';
|
|
|
+ // api.exportDrugRecord().then(res => {
|
|
|
+ // if (res.status === 200) {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // utils.downloadExportedData(res.data, '药品关联数据.xls');
|
|
|
+ // done();
|
|
|
+ // }, 1500);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // done();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.$message({ message: '导出成功', type: 'success' });
|
|
|
+ api.exportDrugRecord().then(res => {
|
|
|
+ if (res.status === 200) {
|
|
|
+ this.$message({ message: '导出成功', type: 'success' });
|
|
|
+ utils.downloadExportedData(res.data, '药品关联数据.xls');
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {
|
|
|
// this.$message({ message: '导出失败', type: 'waring' });
|
|
@@ -324,7 +329,7 @@ export default {
|
|
|
};
|
|
|
this.uploadInfo = '导入中...';
|
|
|
api.importDrugRecord(formData, header).then(res => {
|
|
|
- if (res.data === '' && res.status === 200) {
|
|
|
+ if (res.data === '' && res.status === 200) {
|
|
|
this.$confirm(`导入成功`, '', {
|
|
|
confirmButtonText: '确定',
|
|
|
// cancelButtonText: '取消',
|
|
@@ -334,7 +339,7 @@ export default {
|
|
|
})
|
|
|
.then(() => {})
|
|
|
.catch(() => {});
|
|
|
- this.getDataList() // 重新获取列表
|
|
|
+ this.getDataList(); // 重新获取列表
|
|
|
setTimeout(() => {
|
|
|
this.uploadInfo = '导入';
|
|
|
}, 300);
|