wyq 3 年之前
父节点
当前提交
2441f6cbe3

+ 33 - 11
src/components/icss/dept/DeptManage.vue

@@ -502,19 +502,41 @@ export default {
       inp.value = '';
     },
     importDeptRecord(formData, header) {
+      let that = this
       api.importDeptRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 55 - 29
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -55,7 +55,9 @@
         </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="操作">
@@ -116,14 +118,14 @@ export default {
       statusList: [
         { id: '', name: '全部' },
         { id: 1, name: '启用' },
-        { id: 0, name: '禁用' },
+        { id: 0, name: '禁用' }
       ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
         match: '',
-        status:''
+        status: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -270,7 +272,7 @@ export default {
         icdCode: '',
         type: 4,
         isMatch: this.filter.match,
-        status:this.filter.status
+        status: this.filter.status
       };
       return param;
     },
@@ -502,34 +504,58 @@ export default {
       inp.value = '';
     },
     importDiseaseRecord(formData, header) {
+      let that = this
       api.importDiseaseRecord(formData, header).then(res => {
+        console.log(res);
+        
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
-        //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-        //     confirmButtonText: '确定',
-        //     // cancelButtonText: '取消',
-        //     // cancelButtonClass: 'cancelSure',
-        //     // confirmButtonClass: 'sure',
-        //     // customClass: 'exportConfirm',
-        //     type: 'warning'
-        //   })
-        //     .then(() => {})
-        //     .catch(() => {});
-        //   this.getDataList(); // 重新获取列表
-        //   setTimeout(() => {
-        //     this.uploadInfo = '导入';
-        //   }, 300);
+        // 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: '确定',

+ 64 - 22
src/components/icss/drug/DrugManage.vue

@@ -17,15 +17,20 @@
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="剂型术语状态:" class="selectMedicine">
+          <el-select size="mini" v-model="filter.formStatus" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in formstatusList"
+              :label="item.name"
+              :value="item.id"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="医院药品名称:">
           <el-input size="mini" v-model="filter.hisName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-        <el-form-item label="标准药品名称:">
-          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button size="mini" @click="filterDatas">检索</el-button>
-        </el-form-item>
+        
       </el-form>
       <el-form class="secLine" :inline="true">
         <el-form-item>
@@ -37,7 +42,11 @@
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
+        <el-form-item label="标准药品名称:">
+          <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
+        </el-form-item>
         <el-form-item>
+          <el-button size="mini" @click="filterDatas">检索</el-button>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -56,12 +65,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="操作">
@@ -121,14 +134,20 @@ export default {
       statusList: [
         { id: '', name: '全部' },
         { id: 1, name: '启用' },
-        { id: 0, name: '禁用' },
+        { id: 0, name: '禁用' }
+      ],
+      formstatusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' }
       ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
         match: '',
-        status:''
+        status: '',
+        formStatus:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -267,7 +286,8 @@ export default {
         uniqueCode: '',
         type: 5,
         isMatch: this.filter.match,
-        status:this.filter.status
+        status: this.filter.status,
+        formStatus:this.filter.formStatus,
       };
       return param;
     },
@@ -501,19 +521,41 @@ export default {
       inp.value = '';
     },
     importDrugRecord(formData, header) {
+      let that = this
       api.importDrugRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 33 - 11
src/components/icss/fusion/Fusion.vue

@@ -494,19 +494,41 @@ export default {
       inp.value = '';
     },
     importFusionRecord(formData, header) {
+      let that = this
       api.importFusionRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 99 - 66
src/components/icss/lis/Lis.vue

@@ -59,7 +59,9 @@
         </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="操作">
@@ -121,7 +123,7 @@ export default {
       statusList: [
         { id: '', name: '全部' },
         { id: 1, name: '启用' },
-        { id: 0, name: '禁用' },
+        { id: 0, name: '禁用' }
       ],
       searched: false,
       filter: {
@@ -129,7 +131,7 @@ export default {
         hisDetailName: '', //检验细项
         uniqueName: '', //标准检验项
         match: '',
-        status:''
+        status: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -270,7 +272,7 @@ export default {
         hisDetailName: this.filter.hisDetailName.trim(),
         type: 1,
         isMatch: this.filter.match,
-        status:this.filter.status
+        status: this.filter.status
       };
       return param;
     },
@@ -412,7 +414,8 @@ export default {
         .then(() => {
           api
             .exportLisRecord({
-              type: 1,isMatch:this.filter.match
+              type: 1,
+              isMatch: this.filter.match
             })
             .then(res => {
               if (res.status === 200) {
@@ -427,7 +430,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportLisModule({type:1}).then(res => {
+      api.exportLisModule({ type: 1 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '检验导入模板.xls');
@@ -463,7 +466,7 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.importLisRecord(formData, header)
+      this.importLisRecord(formData, header);
       // this.uploadInfo = '导入中...';
       // api.importExcelDataVerify(formData, header).then(res => {
       //   if (res.data.code === '00020001') {
@@ -504,66 +507,96 @@ export default {
       inp.value = '';
     },
     importLisRecord(formData, header) {
-      api.importLisRecord(formData, header).then(res => {
-        if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
-        // 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(() => {});
+      let that = this;
+      api
+        .importLisRecord(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 === '00020004') {
+                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);
+          }
 
-        //   setTimeout(() => {
-        //     this.uploadInfo = '导入';
-        //   }, 300);
-        // }
-      });
+          // 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);
+          // }
+        })
+        .catch(error => {
+          console.log(error);
+
+          // this.$message({ message: '导出失败', type: 'waring' });
+        });
     },
     downloadUrl(res) {
       var disposition = res.headers['content-disposition'];

+ 33 - 11
src/components/icss/nursing/nursing.vue

@@ -503,19 +503,41 @@ export default {
       inp.value = '';
     },
     importNurseRecord(formData, header) {
+      let that = this
       api.importNurseRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 33 - 11
src/components/icss/operation/Operation.vue

@@ -504,19 +504,41 @@ export default {
       inp.value = '';
     },
     importOperationRecord(formData, header) {
+      let that = this
       api.importOperationRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 33 - 11
src/components/icss/pacs/Pacs.vue

@@ -500,19 +500,41 @@ export default {
       inp.value = '';
     },
     importPacsRecord(formData, header) {
+      let that = this
       api.importPacsRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 33 - 11
src/components/icss/scale/ScaleManage.vue

@@ -501,19 +501,41 @@ export default {
       inp.value = '';
     },
     importScaleRecord(formData, header) {
+      let that = this
       api.importScaleRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 33 - 11
src/components/icss/tcmdisease/tcmdisease.vue

@@ -509,19 +509,41 @@ export default {
       inp.value = '';
     },
     importTcmRecord(formData, header) {
+      let that = this
       api.importTcmRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',

+ 33 - 11
src/components/icss/tcmdrome/tcmdrome.vue

@@ -509,19 +509,41 @@ export default {
       inp.value = '';
     },
     importTcmdromeRecord(formData, header) {
+      let that = this
       api.importTcmdromeRecord(formData, header).then(res => {
         if (res.headers['content-disposition']) {
-          this.downloadUrl(res);
-        } else {
-          this.$alert(`导入成功`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'success'
-          });
-        }
+            this.downloadUrl(res);
+            this.getDataList();
+          } else {
+            let r = new FileReader();
+            r.onload = function() {
+              const code = JSON.parse(this.result);
+              if (code.code === '00020004') {
+                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 (res.data.code === '00000001') {
         //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
         //     confirmButtonText: '确定',