瀏覽代碼

术语映射

wyq 3 年之前
父節點
當前提交
712b8b505a

+ 33 - 12
src/api/cdss.js

@@ -76,11 +76,12 @@ export default {
     });
   },
   importDiseaseRecord(param) {
-    return axios.post(urls.importDiseaseRecordCDSS, param);
+    return axios.post(urls.importDiseaseRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
 
 
-
   getLisPage(param) {
     //检验列表-列表
     return axios.post(urls.getLisPageCDSS, param);
@@ -100,7 +101,9 @@ export default {
     });
   },
   importLisRecord(param) {
-    return axios.post(urls.importLisRecordCDSS, param);
+    return axios.post(urls.importLisRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   getpacsPage(param) {
     //检查列表-列表
@@ -121,7 +124,9 @@ export default {
     });
   },
   importPacsRecord(param) {
-    return axios.post(urls.importPacsRecordCDSS, param);
+    return axios.post(urls.importPacsRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   getDrugPage(param) {
     //药品列表-列表
@@ -142,7 +147,9 @@ export default {
     });
   },
   importDrugRecord(param) {
-    return axios.post(urls.importDrugRecordCDSS, param);
+    return axios.post(urls.importDrugRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   getScalePage(param) {
     //量表列表-列表
@@ -163,7 +170,9 @@ export default {
     });
   },
   importScaleRecord(param) {
-    return axios.post(urls.importScaleRecordCDSS, param);
+    return axios.post(urls.importScaleRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   exportScaleModule(param) {
     return axios.post(urls.exportScaleModuleCDSS, param, {
@@ -198,7 +207,9 @@ export default {
     });
   },
   importOperationRecord(param) {
-    return axios.post(urls.importOperationRecordCDSS, param);
+    return axios.post(urls.importOperationRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   getFusionPage(param) {
     //输血列表-列表
@@ -219,7 +230,9 @@ export default {
     });
   },
   importFusionRecord(param) {
-    return axios.post(urls.importFusionRecordCDSS, param);
+    return axios.post(urls.importFusionRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   getDeptPage(param) {
     //科室列表-列表
@@ -240,7 +253,9 @@ export default {
     });
   },
   importDeptRecord(param) {
-    return axios.post(urls.importDeptRecordCDSS, param);
+    return axios.post(urls.importDeptRecordCDSS, param, {
+      responseType: 'blob',
+    });
   },
   exportDeptModule(param) {
     return axios.post(urls.exportDeptModuleCDSS, param, {
@@ -303,7 +318,9 @@ export default {
   },
   importNurseRecord(param) {
     //护理-数据导入
-    return axios.post(urls.importNurseRecord, param);
+    return axios.post(urls.importNurseRecord, param, {
+      responseType: 'blob',
+    });
   },
   exportNurseModule(param) {
     //护理-数据导入模板导出
@@ -344,7 +361,9 @@ export default {
   },
   importTcmRecord(param) {
     //中医疾病-数据导入
-    return axios.post(urls.importTcmRecord, param);
+    return axios.post(urls.importTcmRecord, param, {
+      responseType: 'blob',
+    });
   },
   dataTcmVerify(param) {
     return axios.post(urls.dataTcmVerify, param);
@@ -387,7 +406,9 @@ export default {
   },
   importTcmdromeRecord(param) {
     //中医疾病-数据导入
-    return axios.post(urls.importTcmdromeRecord, param);
+    return axios.post(urls.importTcmdromeRecord, param, {
+      responseType: 'blob',
+    });
   },
   dataTcmdromeVerify(param) {
     return axios.post(urls.dataTcmdromeVerify, param);

+ 113 - 67
src/components/cdssManage/dept/DeptManage.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -45,11 +55,16 @@
         <el-table-column :resizable="false" prop="hisCode" label="医院科室编码" show-overflow-tooltip></el-table-column>
         <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="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -111,6 +126,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -264,7 +284,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 7,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -467,83 +488,108 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importDeptRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importDeptRecord(formData, header);
-        } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importDeptRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importDeptRecord(formData, header);
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            confirmButtonText: '确定',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-          this.getDataList(); // 重新获取列表
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        } else if (res.data.data === true && res.status === 200) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           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: '确定',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     confirmButtonText: '确定',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else if (res.data.data === true && res.status === 200) {
+        //   this.$alert(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$alert(`${res.data.msg}`, '提示', {
+        //     confirmButtonText: '确定',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 125 - 78
src/components/cdssManage/disease/Disease.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -45,11 +55,16 @@
         <el-table-column :resizable="false" prop="hisName" label="医院诊断名称" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="code" label="ICD-10编码" 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="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -104,6 +119,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       list: [],
       searched: false,
       filter: {
@@ -132,7 +152,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() {
@@ -260,9 +281,11 @@ export default {
         hisName: this.filter.hisName.trim(),
         uniqueName: this.filter.uniqueName.trim(),
         icdCode: '',
-        hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
+        hospitalId:
+          (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 4,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -449,64 +472,51 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importDiseaseRecord(formData, header)
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importDiseaseRecord(formData, header)
-        } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importDiseaseRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importDiseaseRecord(formData, header);
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -514,31 +524,68 @@ export default {
             // 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);
+          });
         }
+        // if (res.data.code === '00020007') {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 126 - 77
src/components/cdssManage/drug/DrugManage.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -45,11 +55,21 @@
         <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="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="剂型术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.source == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -112,6 +132,11 @@ export default {
         uniqueName: '', //标准诊断名称
         match: ''
       },
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -262,7 +287,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 5,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -465,65 +491,51 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importDrugRecord(formData, header)
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importDrugRecord(formData, header)
-        } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importDrugRecord(formData, header)
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importDrugRecord(formData, header)
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -531,31 +543,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 121 - 75
src/components/cdssManage/fusion/Fusion.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -44,11 +54,16 @@
         <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="uniqueName" label="标准输血类型" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -111,6 +126,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -260,7 +280,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 8,
-        isMatch:this.filter.match
+        isMatch:this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -456,63 +477,51 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importFusionRecord(formData,header)
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importFusionRecord(formData,header)
-        }else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importFusionRecord(formData,header)
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importFusionRecord(formData,header)
+      //   }else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          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)) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -520,31 +529,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 123 - 77
src/components/cdssManage/lis/Lis.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item class="selectMedicine" label="匹配状态:">
             <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -48,11 +58,16 @@
         <el-table-column :resizable="false" prop="hisName" label="检验套餐" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="hisDetailName" 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="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -108,7 +123,8 @@ export default {
         hisName: '', // 检验套餐
         hisDetailName: '', //检验细项
         uniqueName: '', //标准检验项
-        match: ''
+        match: '',
+        status:''
       },
       matchList: [
         { id: '', name: '全部' },
@@ -116,6 +132,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -266,7 +287,8 @@ export default {
         hisDetailName: this.filter.hisDetailName.trim(),
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 1,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -470,64 +492,51 @@ export default {
         }
       };
       
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importLisRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importLisRecord(formData, header);
-        } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importLisRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importLisRecord(formData, header);
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -535,31 +544,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 121 - 76
src/components/cdssManage/nursing/nursing.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -44,11 +54,16 @@
         <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="uniqueName" label="标准护理名称" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -106,6 +121,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
@@ -260,7 +280,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 11,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -462,64 +483,51 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-
+      // this.uploadInfo = '导入中...';
+      this.importNurseRecord(formData, header)
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importNurseRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importNurseRecord(formData, header);
-        }else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importNurseRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importNurseRecord(formData, header);
+      //   }else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
     },
     importNurseRecord(formData, header) {
       api.importNurseRecord(formData, header).then(res => {
-        if ((res.data.code === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -527,31 +535,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 120 - 75
src/components/cdssManage/operation/Operation.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -50,11 +60,16 @@
           label="标准手术/操作名称"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -118,6 +133,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -267,7 +287,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 6,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -471,63 +492,50 @@ export default {
         }
       };
       this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importOperationRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importOperationRecord(formData, header);
-        } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importOperationRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importOperationRecord(formData, header);
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -535,31 +543,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 122 - 78
src/components/cdssManage/pacs/Pacs.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -44,11 +54,16 @@
         <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="uniqueName" label="标准检查项目" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -111,6 +126,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -260,7 +280,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 3,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -462,97 +483,120 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importPacsRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importPacsRecord(formData, header);
-        } else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importPacsRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importPacsRecord(formData, header);
+      //   } else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
+      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 === '00020007')) {
-          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);
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
         } else {
-          this.$alert(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
             // cancelButtonClass: 'cancelSure',
             // confirmButtonClass: 'sure',
             // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            type: 'success'
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 121 - 76
src/components/cdssManage/scale/ScaleManage.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -44,11 +54,16 @@
         <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="uniqueName" label="标准量表名称" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -111,6 +126,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -261,7 +281,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 10,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -445,41 +466,42 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importScaleRecord(formData, header)
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importScaleRecord(formData, header)
-        }else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
+      this.importScaleRecord(formData, header)
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importScaleRecord(formData, header)
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importScaleRecord(formData, header)
+      //   }else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -487,23 +509,9 @@ export default {
     },
     importScaleRecord(formData, header) {
       api.importScaleRecord(formData, header).then(res => {
-        // console.log(res, '======================res导入结果');
-        if ((res.data.code === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -511,31 +519,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 121 - 75
src/components/cdssManage/tcmdisease/tcmdisease.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -50,11 +60,16 @@
           label="标准中医疾病名称"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -118,6 +133,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -267,7 +287,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 12,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -469,41 +490,42 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importTcmRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importTcmRecord(formData, header);
-        }else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
+      this.importTcmRecord(formData, header);
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importTcmRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importTcmRecord(formData, header);
+      //   }else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -511,22 +533,9 @@ export default {
     },
     importTcmRecord(formData, header) {
       api.importTcmRecord(formData, header).then(res => {
-        if ((res.data.code === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -534,31 +543,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;

+ 121 - 75
src/components/cdssManage/tcmdrome/tcmdrome.vue

@@ -15,7 +15,17 @@
     <div class="searchBar">
       <div class="searchContent">
         <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label class="selectMedicine">
+          <el-form-item class="selectMedicine" label="标准术语状态:">
+            <el-select size="mini" v-model="filter.status" placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusList"
+                :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.match" placeholder="请选择" clearable>
               <el-option
                 v-for="item in matchList"
@@ -50,11 +60,16 @@
           label="标准中医证候名称"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="operate" label="状态">
+        <el-table-column :resizable="false" prop="operate" label="匹配状态">
           <template slot-scope="scope">
             <span>{{scope.row.isMatch == 0?'未匹配':'已匹配'}}</span>
           </template>
         </el-table-column>
+        <el-table-column :resizable="false" prop="operate" label="标准术语状态">
+          <template slot-scope="scope">
+            <span>{{scope.row.status == 0?'禁用':'启用'}}</span>
+          </template>
+        </el-table-column>
         <el-table-column :resizable="false" prop="operate" label="操作">
           <template slot-scope="scope">
             <el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
@@ -117,6 +132,11 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       currentPage: 1,
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
@@ -267,7 +287,8 @@ export default {
         uniqueCode: '',
         hospitalId: (data && data.hospitalId) || localStorage.getItem('hospitalId'),
         type: 13,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status: this.filter.status,
       };
       return param;
     },
@@ -470,41 +491,42 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
-      api.importExcelDataVerify(formData, header).then(res => {
-        if (res.data.code === '00020001') {
-          this.$confirm(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              this.importTcmdromeRecord(formData, header);
-            })
-            .catch(() => {
-              setTimeout(() => {
-                this.uploadInfo = '导入';
-              }, 300);
-            });
-        } else if (res.data.data === true) {
-          this.importTcmdromeRecord(formData, header);
-        }else {
-          this.$alert(`${res.data.msg}`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
+      this.importTcmdromeRecord(formData, header);
+      // this.uploadInfo = '导入中...';
+      // api.importExcelDataVerify(formData, header).then(res => {
+      //   if (res.data.code === '00020001') {
+      //     this.$confirm(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         this.importTcmdromeRecord(formData, header);
+      //       })
+      //       .catch(() => {
+      //         setTimeout(() => {
+      //           this.uploadInfo = '导入';
+      //         }, 300);
+      //       });
+      //   } else if (res.data.data === true) {
+      //     this.importTcmdromeRecord(formData, header);
+      //   }else {
+      //     this.$alert(`${res.data.msg}`, '提示', {
+      //       confirmButtonText: '确定',
+      //       // cancelButtonText: '取消',
+      //       // cancelButtonClass: 'cancelSure',
+      //       // confirmButtonClass: 'sure',
+      //       // customClass: 'exportConfirm',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {})
+      //       .catch(() => {});
 
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -512,22 +534,9 @@ export default {
     },
     importTcmdromeRecord(formData, header) {
       api.importTcmdromeRecord(formData, header).then(res => {
-        if ((res.data.code === '00020007')) {
-          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) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -535,31 +544,68 @@ export default {
             // 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);
+          });
         }
+        // if ((res.data.code === '00020007')) {
+        //   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);
+        // }
       });
     },
+    downloadUrl(res) {
+      var disposition = res.headers['content-disposition'];
+      var fileName = decodeURI(
+        disposition.split('filename=')[1].split(';filename*=')[0]
+      );
+      let blob = new Blob([res.data], { type: 'application/.xls' }); //.xls是我和后台约定好的文件格式
+      let link = document.createElement('a');
+      link.href = window.URL.createObjectURL(blob);
+      link.download = fileName;
+      link.click();
+      link.remove();
+    },
     /********新增编辑弹窗**********/
     showModal() {
       this.modalVisiable = true;