wyq пре 3 година
родитељ
комит
eb6b2e6efe

+ 5 - 0
src/api/cdss.js

@@ -723,4 +723,9 @@ export default {
     //推荐匹配
     return axios.post(urls.getTermMatching, param);
   },
+  importExcelDataVerify(param) {
+    //数据导入校验
+    return axios.post(urls.importExcelDataVerify, param);
+  },
+
 };

+ 2 - 0
src/api/config.js

@@ -630,6 +630,8 @@ export default {
     'saveOrUpdateRecord': '/api/cdssman/kl/conceptCollection/saveOrUpdateRecord',
     'searchCollectionConceptVO': '/api/cdssman/klDisease/searchCollectionConceptVO',
     'collectionMatch': '/api/cdssman/kl/conceptCollection/collectionMatch',
+
+    'importExcelDataVerify': '/api/cdssman/tran/mappingConfig/importExcelDataVerify',
     
   },
   menuIconList: { //菜单对应图标

+ 32 - 7
src/components/cdssManage/dept/DeptManage.vue

@@ -184,7 +184,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataDeptVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -411,7 +411,11 @@ export default {
       })
         .then(() => {
           api
-            .exportDeptRecord({ hospitalId: this.hospitalId, type: 7,isMatch:this.filter.match })
+            .exportDeptRecord({
+              hospitalId: this.hospitalId,
+              type: 7,
+              isMatch: this.filter.match
+            })
             .then(res => {
               if (res.status === 200) {
                 this.$message({ message: '导出成功', type: 'success' });
@@ -424,7 +428,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDeptModule({type:7}).then(res => {
+      api.exportDeptModule({ type: 7 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '科室导入模板.xls');
@@ -454,6 +458,30 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importDeptRecord(formData, header);
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importDeptRecord(formData, header);
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importDeptRecord(formData, header) {
       api.importDeptRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -466,7 +494,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             type: 'success'
@@ -490,9 +518,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 48 - 21
src/components/cdssManage/disease/Disease.vue

@@ -4,10 +4,10 @@
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
           <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
           <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch"  @change="uploadFileMatch($event)" />
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
@@ -108,7 +108,7 @@ export default {
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
-        uniqueName: '',//标准诊断名称
+        uniqueName: '', //标准诊断名称
         match: ''
       },
       currentPage: 1,
@@ -183,7 +183,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataDiseaseVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -257,7 +257,7 @@ export default {
         icdCode: '',
         hospitalId: data && data.hospitalId,
         type: 4,
-        isMatch:this.filter.match
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -274,7 +274,7 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-        this.data={}
+      this.data = {};
       this.showModal();
       /*this.$router.push({
         name: 'AddDisease',
@@ -392,21 +392,26 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          api.exportDiseaseRecord({ hospitalId: this.hospitalId,type:4,isMatch:this.filter.match }).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '诊断关联数据.xls');
-            }
-          });
+          api
+            .exportDiseaseRecord({
+              hospitalId: this.hospitalId,
+              type: 4,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '诊断关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
         });
     },
-
     // 导入模板
     exportModule() {
-      api.exportDiseaseModule({type:4}).then(res => {
+      api.exportDiseaseModule({ type: 4 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '诊断导入模板.xls');
@@ -414,10 +419,10 @@ export default {
         }
       });
     },
-
     // 点击导入
-    importPage() {
+    importPage(e) {
       let inp = document.getElementById('upFile');
+
       inp.click();
     },
     // 导入数据
@@ -435,6 +440,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importDiseaseRecord(formData, header)
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importDiseaseRecord(formData, header)
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importDiseaseRecord(formData, header) {
       api.importDiseaseRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -451,7 +481,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -483,9 +513,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {
@@ -498,7 +525,7 @@ export default {
         this.modalVisiable = false;
         this.getDataList();
       }
-    },
+    }
   }
 };
 </script>

+ 48 - 20
src/components/cdssManage/drug/DrugManage.vue

@@ -5,7 +5,7 @@
         <el-form-item style="marginBottom: 0px">
           <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
           <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData" >预匹配</el-button>
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
           <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
           <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
           <el-button size="mini" @click="exportData">导出</el-button>
@@ -110,7 +110,7 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match:''
+        match: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -125,7 +125,7 @@ export default {
       data: {}
     };
   },
-  components:{
+  components: {
     LtModal
   },
   created() {
@@ -182,7 +182,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataDrugVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -257,7 +257,7 @@ export default {
         uniqueCode: '',
         hospitalId: data && data.hospitalId,
         type: 5,
-        isMatch:this.filter.match
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -282,8 +282,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data={}
-      this.showModal()
+      this.data = {};
+      this.showModal();
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -303,8 +303,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data = item
-      this.showModal()
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -407,12 +407,18 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDrugRecord({ hospitalId: this.hospitalId,type:5,isMatch:this.filter.match }).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '药品关联数据.xls');
-            }
-          });
+          api
+            .exportDrugRecord({
+              hospitalId: this.hospitalId,
+              type: 5,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '药品关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -421,7 +427,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDrugModule({type:5}).then(res => {
+      api.exportDrugModule({ type: 5 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '药品导入模板.xls');
@@ -450,6 +456,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importDrugRecord(formData, header)
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importDrugRecord(formData, header)
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importDrugRecord(formData, header) {
       api.importDrugRecord(formData, header).then(res => {
         // console.log(res, '======================res导入结果');
         if (res.data.code === '00000001') {
@@ -467,7 +498,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -499,9 +530,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 137 - 3
src/components/cdssManage/fusion/Fusion.vue

@@ -447,6 +447,143 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          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);
+                }
+              });
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 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', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importFusionRecord(formData,header)
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importFusionRecord(formData,header)
+        }
+      });
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importFusionRecord(formData,header){
       api.importFusionRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -495,9 +632,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 39 - 11
src/components/cdssManage/lis/Lis.vue

@@ -186,7 +186,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataLisVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -412,12 +412,18 @@ export default {
         // }
       })
         .then(() => {
-          api.exportLisRecord({ hospitalId: this.hospitalId,type:1,isMatch:this.filter.match }).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '检验数据.xls');
-            }
-          });
+          api
+            .exportLisRecord({
+              hospitalId: this.hospitalId,
+              type: 1,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '检验数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -425,7 +431,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');
@@ -454,6 +460,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importLisRecord(formData, header);
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importLisRecord(formData, header);
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importLisRecord(formData, header) {
       api.importLisRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -502,9 +533,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

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

@@ -109,7 +109,7 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match:''
+        match: ''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -181,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataNurseVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -255,7 +255,7 @@ export default {
         uniqueCode: '',
         hospitalId: data && data.hospitalId,
         type: 11,
-        isMatch:this.filter.match
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -280,8 +280,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data={}
-      this.showModal()
+      this.data = {};
+      this.showModal();
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -301,8 +301,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data = item
-      this.showModal()
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -405,12 +405,18 @@ export default {
         // }
       })
         .then(() => {
-          api.exportNurseRecord({ hospitalId: this.hospitalId,type:11,isMatch:this.filter.match }).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '护理关联数据.xls');
-            }
-          });
+          api
+            .exportNurseRecord({
+              hospitalId: this.hospitalId,
+              type: 11,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '护理关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -418,7 +424,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportNurseModule({type:11}).then(res => {
+      api.exportNurseModule({ type: 11 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '护理导入模板.xls');
@@ -447,6 +453,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importNurseRecord(formData, header);
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importNurseRecord(formData, header);
+        }
+      });
+    },
+    importNurseRecord(formData, header) {
       api.importNurseRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -463,7 +494,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -495,9 +526,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 26 - 9
src/components/cdssManage/operation/Operation.vue

@@ -43,12 +43,7 @@
         <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院手术/操作名称" show-overflow-tooltip></el-table-column>
-        <el-table-column
-          :resizable="false"
-          prop="code"
-          label="手术/操作代码"
-          show-overflow-tooltip
-        ></el-table-column>
+        <el-table-column :resizable="false" prop="code" label="手术/操作代码" show-overflow-tooltip></el-table-column>
         <el-table-column
           :resizable="false"
           prop="uniqueName"
@@ -466,6 +461,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importOperationRecord(formData, header)
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importOperationRecord(formData, header)
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importOperationRecord(formData, header) {
       api.importOperationRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -514,9 +534,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 40 - 12
src/components/cdssManage/pacs/Pacs.vue

@@ -181,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataPacsVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -405,12 +405,18 @@ export default {
         // }
       })
         .then(() => {
-          api.exportPacsRecord({ hospitalId: this.hospitalId,type:3 ,isMatch:this.filter.match}).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '检查关联数据.xls');
-            }
-          });
+          api
+            .exportPacsRecord({
+              hospitalId: this.hospitalId,
+              type: 3,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '检查关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -418,7 +424,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportPacsModule({type:3}).then(res => {
+      api.exportPacsModule({ type: 3 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '检查导入模板.xls');
@@ -447,6 +453,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importPacsRecord(formData, header)
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importPacsRecord(formData, header)
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importPacsRecord(formData, header) {
       api.importPacsRecord(formData, header).then(res => {
         // code === '00000001'  导入失败统一提示 数据存在异常,导入失败,请修改后再试
         if (res.data.code === '00000001') {
@@ -464,7 +495,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // // cancelButtonText: '取消',
@@ -496,9 +527,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 47 - 19
src/components/cdssManage/scale/ScaleManage.vue

@@ -103,7 +103,7 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match:''
+        match: ''
       },
       matchList: [
         { id: '', name: '全部' },
@@ -124,7 +124,7 @@ export default {
       data: {}
     };
   },
-  components:{
+  components: {
     LtModal
   },
   created() {
@@ -181,7 +181,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataScaleVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -256,7 +256,7 @@ export default {
         uniqueCode: '',
         hospitalId: data && data.hospitalId,
         type: 10,
-        isMatch:this.filter.match
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -281,8 +281,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data={}
-      this.showModal()
+      this.data = {};
+      this.showModal();
     },
     // 修改诊断关联-跳转至编辑页面
     modifyRelation(row) {
@@ -302,8 +302,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data = item
-      this.showModal()
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -387,12 +387,18 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          api.exportScaleRecord({ hospitalId: this.hospitalId,type:10,isMatch:this.filter.match }).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '量表关联数据.xls');
-            }
-          });
+          api
+            .exportScaleRecord({
+              hospitalId: this.hospitalId,
+              type: 10,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '量表关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -401,7 +407,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportScaleModule({type:10}).then(res => {
+      api.exportScaleModule({ type: 10 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '量表导入模板.xls');
@@ -430,6 +436,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importScaleRecord(formData, header)
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importScaleRecord(formData, header)
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importScaleRecord(formData, header) {
       api.importScaleRecord(formData, header).then(res => {
         // console.log(res, '======================res导入结果');
         if (res.data.code === '00000001') {
@@ -447,7 +478,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -479,9 +510,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 52 - 19
src/components/cdssManage/tcmdisease/tcmdisease.vue

@@ -44,7 +44,12 @@
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院中医疾病名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="code" 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="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>
@@ -105,7 +110,7 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match:''
+        match: ''
       },
       matchList: [
         { id: '', name: '全部' },
@@ -183,7 +188,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataTcmVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -257,7 +262,7 @@ export default {
         uniqueCode: '',
         hospitalId: data && data.hospitalId,
         type: 12,
-        isMatch:this.filter.match
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -274,8 +279,8 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-        this.data={}
-        this.showModal()
+      this.data = {};
+      this.showModal();
       // this.$router.push({
       //   name: 'AddTcmdisease',
       //   params: Object.assign(pam, {
@@ -303,8 +308,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data = item
-      this.showModal()
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -407,12 +412,18 @@ export default {
         // }
       })
         .then(() => {
-          api.exportTcmRecord({ hospitalId: this.hospitalId,type:12 ,isMatch:this.filter.match}).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
-            }
-          });
+          api
+            .exportTcmRecord({
+              hospitalId: this.hospitalId,
+              type: 12,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '中医疾病关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -420,7 +431,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportTcmModule({type:12}).then(res => {
+      api.exportTcmModule({ type: 12 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '中医疾病导入模板.xls');
@@ -449,6 +460,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importTcmRecord(formData, header);
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importTcmRecord(formData, header);
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importTcmRecord(formData, header) {
       api.importTcmRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -465,7 +501,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -497,9 +533,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {

+ 53 - 20
src/components/cdssManage/tcmdrome/tcmdrome.vue

@@ -44,7 +44,12 @@
         <el-table-column :resizable="false" prop="gmtModified" label="操作时间" width="180"></el-table-column>
         <el-table-column :resizable="false" prop="hisName" label="医院中医证候名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="code" 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="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>
@@ -104,7 +109,7 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match:''
+        match: ''
       },
       matchList: [
         { id: '', name: '全部' },
@@ -183,7 +188,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
       api.dataTcmdromeVerify(formData, header).then(res => {
-        if ((res.data.code === '00020007' || res.data.code === '00020004')) {
+        if (res.data.code === '00020007' || res.data.code === '00020004') {
           loading.close();
           this.$alert(`${res.data.msg}`, '提示', {
             confirmButtonText: '确定',
@@ -257,7 +262,7 @@ export default {
         uniqueCode: '',
         hospitalId: data && data.hospitalId,
         type: 13,
-        isMatch:this.filter.match
+        isMatch: this.filter.match
       };
       return param;
     },
@@ -267,7 +272,7 @@ export default {
       this.getDataList();
     },
     addRelation() {
-      console.log(11)
+      console.log(11);
       const pam = this.searched
         ? {
             currentPage: this.currentPage,
@@ -275,8 +280,8 @@ export default {
             filter: this.filter
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
-        this.data={}
-        this.showModal()
+      this.data = {};
+      this.showModal();
       // this.$router.push({
       //   name: 'AddTcmdrome',
       //   params: Object.assign(pam, {
@@ -304,8 +309,8 @@ export default {
       //     hospitaiName: this.hospitaiName
       //   })
       // });
-      this.data = item
-      this.showModal()
+      this.data = item;
+      this.showModal();
     },
     currentChange(next) {
       this.currentPage = next;
@@ -408,12 +413,18 @@ export default {
         // }
       })
         .then(() => {
-          api.exportTcmdromeRecord({ hospitalId: this.hospitalId,type:13 ,isMatch:this.filter.match}).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '中医证候关联数据.xls');
-            }
-          });
+          api
+            .exportTcmdromeRecord({
+              hospitalId: this.hospitalId,
+              type: 13,
+              isMatch: this.filter.match
+            })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '中医证候关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -421,7 +432,7 @@ export default {
     },
     // 导入模板
     exportModule() {
-      api.exportTcmdromeModule({type:13}).then(res => {
+      api.exportTcmdromeModule({ type: 13 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '中医证候导入模板.xls');
@@ -450,6 +461,31 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
+      api.importExcelDataVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          this.$confirm(`${res.data.msg}`, '提示1', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              this.importTcmdromeRecord(formData, header);
+            })
+            .catch(() => {
+              setTimeout(() => {
+                this.uploadInfo = '导入';
+              }, 300);
+            });
+        } else if (res.data.data === true) {
+          this.importTcmdromeRecord(formData, header);
+        }
+      });
+
+      //解决上传相同文件不触发change
+      let inp = document.getElementById('upFile');
+      inp.value = '';
+    },
+    importTcmdromeRecord(formData, header) {
       api.importTcmdromeRecord(formData, header).then(res => {
         if (res.data.code === '00000001') {
           this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
@@ -466,7 +502,7 @@ export default {
           setTimeout(() => {
             this.uploadInfo = '导入';
           }, 300);
-        } else if ((res.data.data === true && res.status === 200)) {
+        } else if (res.data.data === true && res.status === 200) {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -498,9 +534,6 @@ export default {
           }, 300);
         }
       });
-      //解决上传相同文件不触发change
-      let inp = document.getElementById('upFile');
-      inp.value = '';
     },
     /********新增编辑弹窗**********/
     showModal() {