wyq 3 年之前
父節點
當前提交
9dd5c01482

+ 17 - 18
src/components/cdssManage/dept/DeptManage.vue

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

+ 17 - 18
src/components/cdssManage/disease/Disease.vue

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

+ 19 - 19
src/components/cdssManage/drug/DrugManage.vue

@@ -68,7 +68,7 @@
         <el-table-column :resizable="false" prop="hisName" label="医院药品名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="uniqueName" label="标准药品名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="form" label="药品剂型" show-overflow-tooltip></el-table-column>
-        
+
         <el-table-column :resizable="false" prop="operate" label="标准术语状态">
           <template slot-scope="scope">
             <span
@@ -566,11 +566,11 @@ export default {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          if (that.result != undefined) {
-            let r = new FileReader();
-            r.onload = function() {
-              console.log(that.result);
-              const code = JSON.parse(that.result);
+          let r = new FileReader();
+          r.onload = function() {
+            console.log(this.result);
+            if (this.result) {
+              const code = JSON.parse(this.result);
               if (code.code === '00020007') {
                 that
                   .$alert(`${code.msg}`, '提示', {
@@ -584,19 +584,19 @@ export default {
                   .then(() => {})
                   .catch(() => {});
               }
-            };
-            r.readAsText(res.data);
-          } else {
-            that.$alert(`导入成功`, '提示', {
-              confirmButtonText: '确定',
-              // cancelButtonText: '取消',
-              // cancelButtonClass: 'cancelSure',
-              // confirmButtonClass: 'sure',
-              // customClass: 'exportConfirm',
-              type: 'success'
-            });
-            that.getDataList();
-          }
+            } else {
+              that.$alert(`导入成功`, '提示', {
+                confirmButtonText: '确定',
+                // cancelButtonText: '取消',
+                // cancelButtonClass: 'cancelSure',
+                // confirmButtonClass: 'sure',
+                // customClass: 'exportConfirm',
+                type: 'success'
+              });
+              that.getDataList();
+            }
+          };
+          r.readAsText(res.data);
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {

+ 17 - 18
src/components/cdssManage/fusion/Fusion.vue

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

+ 32 - 29
src/components/cdssManage/lis/Lis.vue

@@ -62,12 +62,14 @@
         <el-table-column :resizable="false" prop="uniqueName" label="标准检验项" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
-            <span >{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
+            <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </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="操作">
@@ -126,7 +128,7 @@ export default {
         hisDetailName: '', //检验细项
         uniqueName: '', //标准检验项
         match: '',
-        status:''
+        status: ''
       },
       matchList: [
         { id: '', name: '全部' },
@@ -137,7 +139,7 @@ export default {
       statusList: [
         { id: '', name: '全部' },
         { id: 1, name: '启用' },
-        { id: 0, name: '禁用' },
+        { id: 0, name: '禁用' }
       ],
       currentPage: 1,
       pageSize: config.pageSize,
@@ -158,7 +160,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() {
@@ -287,10 +290,11 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         hisDetailName: this.filter.hisDetailName.trim(),
-        hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
+        hospitalId:
+          (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 1,
         isMatch: this.filter.match,
-        status: this.filter.status,
+        status: this.filter.status
       };
       return param;
     },
@@ -493,7 +497,7 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      
+
       // this.uploadInfo = '导入中...';
       // api.importExcelDataVerify(formData, header).then(res => {
       //   if (res.data.code === '00020001') {
@@ -529,23 +533,22 @@ export default {
       //     }, 300);
       //   }
       // });
-      this.importLisRecord(formData, header)
+      this.importLisRecord(formData, header);
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
     },
     importLisRecord(formData, header) {
-      let that = this
+      let that = this;
       api.importLisRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
           this.downloadUrl(res);
           this.getDataList();
         } else {
-          if (that.result != undefined) {
-            let r = new FileReader();
-            r.onload = function() {
-              console.log(that.result);
-              const code = JSON.parse(that.result);
+          let r = new FileReader();
+          r.onload = function() {
+            if (this.result) {
+              const code = JSON.parse(this.result);
               if (code.code === '00020007') {
                 that
                   .$alert(`${code.msg}`, '提示', {
@@ -559,19 +562,19 @@ export default {
                   .then(() => {})
                   .catch(() => {});
               }
-            };
-            r.readAsText(res.data);
-          } else {
-            that.$alert(`导入成功`, '提示', {
-              confirmButtonText: '确定',
-              // cancelButtonText: '取消',
-              // cancelButtonClass: 'cancelSure',
-              // confirmButtonClass: 'sure',
-              // customClass: 'exportConfirm',
-              type: 'success'
-            });
-            that.getDataList();
-          }
+            } else {
+              that.$alert(`导入成功`, '提示', {
+                confirmButtonText: '确定',
+                // cancelButtonText: '取消',
+                // cancelButtonClass: 'cancelSure',
+                // confirmButtonClass: 'sure',
+                // customClass: 'exportConfirm',
+                type: 'success'
+              });
+              that.getDataList();
+            }
+          };
+          r.readAsText(res.data);
         }
         // if ((res.data.code === '00020007')) {
         //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
@@ -711,7 +714,7 @@ export default {
     height: 80px;
     flex: 1;
     background-color: #fff;
-    .demo-form-inline{
+    .demo-form-inline {
       display: flex;
       justify-content: flex-end;
     }

+ 17 - 18
src/components/cdssManage/nursing/nursing.vue

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

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

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

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

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

+ 17 - 18
src/components/cdssManage/scale/ScaleManage.vue

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

+ 17 - 18
src/components/cdssManage/tcmdisease/tcmdisease.vue

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

+ 17 - 17
src/components/cdssManage/tcmdrome/tcmdrome.vue

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