morphone1995 4 år sedan
förälder
incheckning
3e5951d71c

+ 25 - 20
src/components/icss/dept/DeptManage.vue

@@ -271,29 +271,34 @@ export default {
         cancelButtonText: '取消',
         cancelButtonClass: 'leftbtn',
         customClass: 'exportBox1',
-        title: '导出数据',
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            // instance.confirmButtonLoading = true;
-            instance.confirmButtonText = '导出中...';
-            api.exportDeptRecord().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 = '导出中...';
+        //     done()
+        //     api.exportDeptRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '科室关联数据.xls');
+        //           // done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
       })
         .then(() => {
-          this.$message({ message: '导出成功', type: 'success' });
+          api.exportDeptRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '科室关联数据.xls');
+            }
+          });
         })
         .catch(() => {
-          // this.$message({ message: '导出失败', type: 'waring' });
         });
     },
 
@@ -328,7 +333,7 @@ export default {
       this.uploadInfo = '导入中...';
       api.importDeptRecord(formData, header).then(res => {
         // console.log('导入文件结果', '===================', res);
-        if (res.data === ''  &&  res.status === 200) {
+        if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 22 - 17
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -275,25 +275,30 @@ export default {
         cancelButtonClass: 'leftbtn',
         customClass: 'exportBox1',
         title: '导出数据',
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            // instance.confirmButtonLoading = true;
-            instance.confirmButtonText = '导出中...';
-            api.exportDiseaseRecord().then(res => {
-              if (res.status === 200) {
-                setTimeout(() => {
-                  utils.downloadExportedData(res.data, '诊断关联数据.xls');
-                  done();
-                }, 1500);
-              }
-            });
-          } else {
-            done();
-          }
-        }
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     instance.confirmButtonText = '导出中...';
+        //     api.exportDiseaseRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '诊断关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
       })
         .then(() => {
-          this.$message({ message: '导出成功', type: 'success' });
+           api.exportDiseaseRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '诊断关联数据.xls');
+            }
+          });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });

+ 25 - 20
src/components/icss/drug/DrugManage.vue

@@ -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);

+ 22 - 17
src/components/icss/fusion/Fusion.vue

@@ -270,25 +270,30 @@ export default {
         cancelButtonClass: 'leftbtn',
         customClass: 'exportBox1',
         title: '导出数据',
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            // instance.confirmButtonLoading = true;
-            instance.confirmButtonText = '导出中...';
-            api.exportFusionRecord().then(res => {
-              if (res.status === 200) {
-                setTimeout(() => {
-                  utils.downloadExportedData(res.data, '输血关联数据.xls');
-                  done();
-                }, 1500);
-              }
-            });
-          } else {
-            done();
-          }
-        }
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     instance.confirmButtonText = '导出中...';
+        //     api.exportFusionRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '输血关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
       })
         .then(() => {
-          this.$message({ message: '导出成功', type: 'success' });
+          api.exportFusionRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '输血关联数据.xls');
+            }
+          });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });

+ 22 - 17
src/components/icss/lis/Lis.vue

@@ -276,25 +276,30 @@ export default {
         cancelButtonClass: 'leftbtn',
         customClass: 'exportBox1',
         title: '导出数据',
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            // instance.confirmButtonLoading = true;
-            instance.confirmButtonText = '导出中...';
-            api.exportLisRecord().then(res => {
-              if (res.status === 200) {
-                setTimeout(() => {
-                  utils.downloadExportedData(res.data, '检验数据.xls');
-                  done();
-                }, 1500);
-              }
-            });
-          } else {
-            done();
-          }
-        }
+        // beforeClose: (action, instance, done) => {
+        //   if (action === 'confirm') {
+        //     // instance.confirmButtonLoading = true;
+        //     instance.confirmButtonText = '导出中...';
+        //     api.exportLisRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '检验数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
       })
         .then(() => {
-          this.$message({ message: '导出成功', type: 'success' });
+           api.exportLisRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '检验数据.xls');
+            }
+          });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });

+ 23 - 19
src/components/icss/operation/Operation.vue

@@ -12,7 +12,6 @@
             accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
           />
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
-          <el-button size="mini" @click="importPage">导入</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label="医院手术/操作名称:">
@@ -275,26 +274,31 @@ export default {
         cancelButtonText: '取消',
         cancelButtonClass: 'leftbtn',
         customClass: 'exportBox1',
-        title: '导出数据',
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            // instance.confirmButtonLoading = true;
-            instance.confirmButtonText = '导出中...';
-            api.exportOperationRecord().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.exportOperationRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '手术/操作关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
       })
         .then(() => {
-          this.$message({ message: '导出成功', type: 'success' });
+          api.exportOperationRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '手术/操作关联数据.xls');
+            }
+          });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });

+ 23 - 18
src/components/icss/pacs/Pacs.vue

@@ -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.exportPacsRecord().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.exportPacsRecord().then(res => {
+        //       if (res.status === 200) {
+        //         setTimeout(() => {
+        //           utils.downloadExportedData(res.data, '检查关联数据.xls');
+        //           done();
+        //         }, 1500);
+        //       }
+        //     });
+        //   } else {
+        //     done();
+        //   }
+        // }
       })
         .then(() => {
-          this.$message({ message: '导出成功', type: 'success' });
+          api.exportPacsRecord().then(res => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, '检查关联数据.xls');
+            }
+          });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });