wyq 3 lat temu
rodzic
commit
f3d7f5399c

+ 16 - 1
src/components/cdssManage/dept/DeptManage.vue

@@ -459,7 +459,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -475,6 +475,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importDeptRecord(formData, header);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
       //解决上传相同文件不触发change

+ 16 - 1
src/components/cdssManage/disease/Disease.vue

@@ -441,7 +441,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -457,6 +457,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importDiseaseRecord(formData, header)
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 16 - 1
src/components/cdssManage/drug/DrugManage.vue

@@ -457,7 +457,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -473,6 +473,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importDrugRecord(formData, header)
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 15 - 113
src/components/cdssManage/fusion/Fusion.vue

@@ -448,61 +448,14 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           })
             .then(() => {
-              api.importOperationRecord(formData, header).then(res => {
-                if (res.data.code === '00000001') {
-                  this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
-                    confirmButtonText: '确定',
-                    // cancelButtonText: '取消',
-                    // cancelButtonClass: 'cancelSure',
-                    // confirmButtonClass: 'sure',
-                    // customClass: 'exportConfirm',
-                    type: 'warning'
-                  })
-                    .then(() => {})
-                    .catch(() => {});
-                  this.getDataList(); // 重新获取列表
-                  setTimeout(() => {
-                    this.uploadInfo = '导入';
-                  }, 300);
-                } else if (res.data.data === true && res.status === 200) {
-                  this.$alert(`导入成功`, '提示', {
-                    confirmButtonText: '确定',
-                    // cancelButtonText: '取消',
-                    // cancelButtonClass: 'cancelSure',
-                    // confirmButtonClass: 'sure',
-                    // customClass: 'exportConfirm',
-                    type: 'success'
-                  })
-                    .then(() => {})
-                    .catch(() => {});
-                  this.getDataList(); // 重新获取列表
-                  setTimeout(() => {
-                    this.uploadInfo = '导入';
-                  }, 300);
-                } else {
-                  this.$alert(`${res.data.msg}`, '提示', {
-                    confirmButtonText: '确定',
-                    // // cancelButtonText: '取消',
-                    // cancelButtonClass: 'cancelSure',
-                    // confirmButtonClass: 'sure',
-                    // customClass: 'exportConfirm',
-                    type: 'warning'
-                  })
-                    .then(() => {})
-                    .catch(() => {});
-
-                  setTimeout(() => {
-                    this.uploadInfo = '导入';
-                  }, 300);
-                }
-              });
+              this.importFusionRecord(formData,header)
             })
             .catch(() => {
               setTimeout(() => {
@@ -510,73 +463,22 @@ export default {
               }, 300);
             });
         } else if (res.data.data === true) {
-          api.importOperationRecord(formData, header).then(res => {
-            if (res.data.code === '00000001') {
-              this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'warning'
-              })
-                .then(() => {})
-                .catch(() => {});
-              this.getDataList(); // 重新获取列表
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            } else if (res.data.data === true && res.status === 200) {
-              this.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              })
-                .then(() => {})
-                .catch(() => {});
-              this.getDataList(); // 重新获取列表
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            } else {
-              this.$alert(`${res.data.msg}`, '提示', {
-                confirmButtonText: '确定',
-                // // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'warning'
-              })
-                .then(() => {})
-                .catch(() => {});
-
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            }
-          });
-        }
-      });
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
-          this.$confirm(`${res.data.msg}`, '提示1', {
+          this.importFusionRecord(formData,header)
+        }else {
+          this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
-            cancelButtonText: '取消',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
             type: 'warning'
           })
-            .then(() => {
-              this.importFusionRecord(formData,header)
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importFusionRecord(formData,header)
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
       //解决上传相同文件不触发change

+ 16 - 1
src/components/cdssManage/lis/Lis.vue

@@ -461,7 +461,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -477,6 +477,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importLisRecord(formData, header);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 16 - 1
src/components/cdssManage/nursing/nursing.vue

@@ -458,7 +458,7 @@ export default {
       let inp = document.getElementById('upFile');
       inp.value = '';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -474,6 +474,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importNurseRecord(formData, header);
+        }else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
     },

+ 18 - 3
src/components/cdssManage/operation/Operation.vue

@@ -462,14 +462,14 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           })
             .then(() => {
-              this.importOperationRecord(formData, header)
+              this.importOperationRecord(formData, header);
             })
             .catch(() => {
               setTimeout(() => {
@@ -477,7 +477,22 @@ export default {
               }, 300);
             });
         } else if (res.data.data === true) {
-          this.importOperationRecord(formData, header)
+          this.importOperationRecord(formData, header);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 18 - 3
src/components/cdssManage/pacs/Pacs.vue

@@ -454,14 +454,14 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           })
             .then(() => {
-              this.importPacsRecord(formData, header)
+              this.importPacsRecord(formData, header);
             })
             .catch(() => {
               setTimeout(() => {
@@ -469,7 +469,22 @@ export default {
               }, 300);
             });
         } else if (res.data.data === true) {
-          this.importPacsRecord(formData, header)
+          this.importPacsRecord(formData, header);
+        } else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 16 - 1
src/components/cdssManage/scale/ScaleManage.vue

@@ -437,7 +437,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -453,6 +453,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importScaleRecord(formData, header)
+        }else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 16 - 1
src/components/cdssManage/tcmdisease/tcmdisease.vue

@@ -461,7 +461,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -477,6 +477,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importTcmRecord(formData, header);
+        }else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });
 

+ 16 - 1
src/components/cdssManage/tcmdrome/tcmdrome.vue

@@ -462,7 +462,7 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020007') {
+        if (res.data.code === '00020001') {
           this.$confirm(`${res.data.msg}`, '提示1', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -478,6 +478,21 @@ export default {
             });
         } else if (res.data.data === true) {
           this.importTcmdromeRecord(formData, header);
+        }else {
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
         }
       });