wyq 3 years ago
parent
commit
7fca6381d5

+ 31 - 28
src/components/cdssManage/dept/DeptManage.vue

@@ -535,34 +535,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/disease/Disease.vue

@@ -520,34 +520,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if (res.headers['content-disposition']) {
         //   this.downloadUrl(res);

+ 50 - 41
src/components/cdssManage/drug/DrugManage.vue

@@ -60,7 +60,7 @@
         </el-form>
       </div>
     </div>
-    
+
     <div class="contentsOther">
       <el-table :data="list" border style="width: 100%">
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
@@ -75,12 +75,16 @@
         </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="标准术语状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.uniqueName && scope.row.uniqueName!=''">{{scope.row.status == 0?'禁用':'启用'}}</span>
+            <span
+              v-if="scope.row.uniqueName && scope.row.uniqueName!=''"
+            >{{scope.row.status == 0?'禁用':'启用'}}</span>
           </template>
         </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="剂型术语状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.form && scope.row.form!=''">{{scope.row.formStatus == 0?'禁用':'启用'}}</span>
+            <span
+              v-if="scope.row.form && scope.row.form!=''"
+            >{{scope.row.formStatus == 0?'禁用':'启用'}}</span>
           </template>
         </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
@@ -144,18 +148,18 @@ export default {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
         match: '',
-        status:'',
-        formStatus:''
+        status: '',
+        formStatus: ''
       },
       statusList: [
         { id: '', name: '全部' },
         { id: 1, name: '启用' },
-        { id: 0, name: '禁用' },
+        { id: 0, name: '禁用' }
       ],
       formstatusList: [
         { id: '', name: '全部' },
         { id: 1, name: '启用' },
-        { id: 0, name: '禁用' },
+        { id: 0, name: '禁用' }
       ],
       currentPage: 1,
       pageSize: config.pageSize,
@@ -176,7 +180,8 @@ export default {
   created() {
     const { data } = this.$route.params;
     this.hospitaiName = (data && data.name) || localStorage.getItem('name');
-    this.hospitalId = (data && data.hospitalId) || localStorage.getItem('hospitalId');
+    this.hospitalId =
+      (data && data.hospitalId) || localStorage.getItem('hospitalId');
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
@@ -305,11 +310,12 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
-        hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
+        hospitalId:
+          (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 5,
         isMatch: this.filter.match,
         status: this.filter.status,
-        formStatus: this.filter.formStatus,
+        formStatus: this.filter.formStatus
       };
       return param;
     },
@@ -547,46 +553,49 @@ export default {
       //     }, 300);
       //   }
       // });
-      this.importDrugRecord(formData, header)
+      this.importDrugRecord(formData, header);
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
     },
     importDrugRecord(formData, header) {
-      let taht = this
+      let that = this;
       api.importDrugRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
@@ -726,7 +735,7 @@ export default {
     height: 80px;
     flex: 1;
     background-color: #fff;
-    .demo-form-inline{
+    .demo-form-inline {
       display: flex;
       justify-content: flex-end;
     }

+ 31 - 28
src/components/cdssManage/fusion/Fusion.vue

@@ -524,34 +524,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/lis/Lis.vue

@@ -541,34 +541,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/nursing/nursing.vue

@@ -530,34 +530,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/operation/Operation.vue

@@ -539,34 +539,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/pacs/Pacs.vue

@@ -530,34 +530,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/scale/ScaleManage.vue

@@ -514,34 +514,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/tcmdisease/tcmdisease.vue

@@ -538,34 +538,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 31 - 28
src/components/cdssManage/tcmdrome/tcmdrome.vue

@@ -539,34 +539,37 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          let r = new FileReader();
-          r.onload = function() {
-            const code = JSON.parse(this.result);
-            if (code.code === '00020007') {
-              that
-                .$alert(`${code.msg}`, '提示', {
-                  confirmButtonText: '确定',
-                  // cancelButtonText: '取消',
-                  // cancelButtonClass: 'cancelSure',
-                  // confirmButtonClass: 'sure',
-                  // customClass: 'exportConfirm',
-                  type: 'warning'
-                })
-                .then(() => {})
-                .catch(() => {});
-            } else {
-              that.$alert(`导入成功`, '提示', {
-                confirmButtonText: '确定',
-                // cancelButtonText: '取消',
-                // cancelButtonClass: 'cancelSure',
-                // confirmButtonClass: 'sure',
-                // customClass: 'exportConfirm',
-                type: 'success'
-              });
-              that.getDataList();
-            }
-          };
-          r.readAsText(res.data);
+          if (that.result != undefined) {
+            let r = new FileReader();
+            r.onload = function() {
+              console.log(that.result);
+              const code = JSON.parse(that.result);
+              if (code.code === '00020007') {
+                that
+                  .$alert(`${code.msg}`, '提示', {
+                    confirmButtonText: '确定',
+                    // cancelButtonText: '取消',
+                    // cancelButtonClass: 'cancelSure',
+                    // confirmButtonClass: 'sure',
+                    // customClass: 'exportConfirm',
+                    type: 'warning'
+                  })
+                  .then(() => {})
+                  .catch(() => {});
+              }
+            };
+            r.readAsText(res.data);
+          } else {
+            that.$alert(`导入成功`, '提示', {
+              confirmButtonText: '确定',
+              // cancelButtonText: '取消',
+              // cancelButtonClass: 'cancelSure',
+              // confirmButtonClass: 'sure',
+              // customClass: 'exportConfirm',
+              type: 'success'
+            });
+            that.getDataList();
+          }
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {