소스 검색

术语隐射导入

wyq 3 년 전
부모
커밋
9131bcf3bc

+ 33 - 11
src/api/icss.js

@@ -72,7 +72,9 @@ export default {
     });
   },
   importDiseaseRecord(param) {
-    return axios.post(urls.importDiseaseRecord, param);
+    return axios.post(urls.importDiseaseRecord, param, {
+      responseType: 'blob',
+    });
   },
   getLisPage(param) {
     //检验列表-列表
@@ -93,7 +95,9 @@ export default {
     });
   },
   importLisRecord(param) {
-    return axios.post(urls.importLisRecord, param);
+    return axios.post(urls.importLisRecord, param, {
+      responseType: 'blob',
+    });
   },
   getpacsPage(param) {
     //检查列表-列表
@@ -114,7 +118,9 @@ export default {
     });
   },
   importPacsRecord(param) {
-    return axios.post(urls.importPacsRecord, param);
+    return axios.post(urls.importPacsRecord, param, {
+      responseType: 'blob',
+    });
   },
   getDrugPage(param) {
     //药品列表-列表
@@ -135,7 +141,9 @@ export default {
     });
   },
   importDrugRecord(param) {
-    return axios.post(urls.importDrugRecord, param);
+    return axios.post(urls.importDrugRecord, param, {
+      responseType: 'blob',
+    });
   },
 
 
@@ -158,7 +166,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, {
@@ -185,7 +195,9 @@ export default {
     });
   },
   importOperationRecord(param) {
-    return axios.post(urls.importOperationRecord, param);
+    return axios.post(urls.importOperationRecord, param, {
+      responseType: 'blob',
+    });
   },
   getFusionPage(param) {
     //输血列表-列表
@@ -206,7 +218,9 @@ export default {
     });
   },
   importFusionRecord(param) {
-    return axios.post(urls.importFusionRecord, param);
+    return axios.post(urls.importFusionRecord, param, {
+      responseType: 'blob',
+    });
   },
   getDeptPage(param) {
     //科室列表-列表
@@ -227,7 +241,9 @@ export default {
     });
   },
   importDeptRecord(param) {
-    return axios.post(urls.importDeptRecord, param);
+    return axios.post(urls.importDeptRecord, param, {
+      responseType: 'blob',
+    });
   },
   exportDeptModule(param) {
     return axios.post(urls.exportDeptModule, param, {
@@ -292,7 +308,9 @@ export default {
   },
   importNurseRecord(param) {
     //护理-数据导入
-    return axios.post(urls.importNurseRecord, param);
+    return axios.post(urls.importNurseRecord, param, {
+      responseType: 'blob',
+    });
   },
   exportNurseModule(param) {
     //护理-数据导入模板导出
@@ -325,7 +343,9 @@ export default {
   },
   importTcmRecord(param) {
     //中医疾病-数据导入
-    return axios.post(urls.importTcmRecord, param);
+    return axios.post(urls.importTcmRecord, param, {
+      responseType: 'blob',
+    });
   },
   exportTcmModule(param) {
     //中医疾病-数据导入模板导出
@@ -360,7 +380,9 @@ export default {
   },
   importTcmdromeRecord(param) {
     //中医疾病-数据导入
-    return axios.post(urls.importTcmdromeRecord, param);
+    return axios.post(urls.importTcmdromeRecord, param, {
+      responseType: 'blob',
+    });
   },
   exportTcmdromeModule(param) {
     //中医疾病-数据导入模板导出

+ 133 - 90
src/components/icss/dept/DeptManage.vue

@@ -2,16 +2,17 @@
   <div>
     <crumbs title="科室关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -22,10 +23,21 @@
         <el-form-item label="标准科室名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -97,11 +109,17 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -245,7 +263,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 7,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -436,41 +455,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.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.importDeptRecord(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.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);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -478,55 +498,78 @@ export default {
     },
     importDeptRecord(formData, header) {
       api.importDeptRecord(formData, header).then(res => {
-        // console.log('导入文件结果', '===================', res);
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 143 - 92
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="诊断关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -21,10 +23,20 @@
         <el-form-item label="标准诊断名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -36,11 +48,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>
@@ -96,11 +113,17 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -246,7 +269,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         icdCode: '',
         type: 4,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -385,12 +409,14 @@ export default {
         // }
       })
         .then(() => {
-          api.exportDiseaseRecord({type:4,isMatch:this.filter.match}).then(res => {
-            if (res.status === 200) {
-              this.$message({ message: '导出成功', type: 'success' });
-              utils.downloadExportedData(res.data, '诊断关联数据.xls');
-            }
-          });
+          api
+            .exportDiseaseRecord({ type: 4, isMatch: this.filter.match })
+            .then(res => {
+              if (res.status === 200) {
+                this.$message({ message: '导出成功', type: 'success' });
+                utils.downloadExportedData(res.data, '诊断关联数据.xls');
+              }
+            });
         })
         .catch(() => {
           // this.$message({ message: '导出失败', type: 'waring' });
@@ -399,7 +425,7 @@ export default {
 
     // 导入模板
     exportModule() {
-      api.exportDiseaseModule({type:4}).then(res => {
+      api.exportDiseaseModule({ type: 4 }).then(res => {
         if (res.status === 200) {
           setTimeout(() => {
             utils.downloadExportedData(res.data, '诊断导入模板.xls');
@@ -435,63 +461,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(() => {});
+      this.importDiseaseRecord(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.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);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
     },
     importDiseaseRecord(formData, header) {
       api.importDiseaseRecord(formData, header).then(res => {
-        if (res.data.code === '00000001') {
-          this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-          this.getDataList(); // 重新获取列表
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        } else if (res.data.data === true && res.status === 200) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -499,31 +513,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 === '00000001') {
+        //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else if (res.data.data === true && res.status === 200) {
+        //   this.$alert(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$alert(`${res.data.msg}`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // }
       });
     },
+    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;

+ 133 - 89
src/components/icss/drug/DrugManage.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="药品关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -21,10 +23,21 @@
         <el-form-item label="标准药品名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -95,11 +108,17 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -237,7 +256,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 5,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -429,41 +449,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.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(() => {});
+      this.importDrugRecord(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.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);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -471,55 +492,78 @@ export default {
     },
     importDrugRecord(formData, header) {
       api.importDrugRecord(formData, header).then(res => {
-        // console.log(res, '======================res导入结果');
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 133 - 88
src/components/icss/fusion/Fusion.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="输血关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -21,10 +23,21 @@
         <el-form-item label="标准输血术语:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -94,11 +107,17 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -237,7 +256,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 8,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -427,41 +447,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.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.importFusionRecord(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.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);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -469,54 +490,78 @@ export default {
     },
     importFusionRecord(formData, header) {
       api.importFusionRecord(formData, header).then(res => {
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 129 - 84
src/components/icss/lis/Lis.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="检验关联维护" style="min-width: 1060px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -24,10 +26,21 @@
         <el-form-item label="标准检验项:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -100,12 +113,18 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 检验套餐
         hisDetailName: '', //检验细项
         uniqueName: '', //标准检验项
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -245,7 +264,8 @@ export default {
         uniqueCode: '',
         hisDetailName: this.filter.hisDetailName.trim(),
         type: 1,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -438,63 +458,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.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(() => {});
+      this.importLisRecord(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.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);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
       inp.value = '';
     },
     importLisRecord(formData, header) {
       api.importLisRecord(formData, header).then(res => {
-        if (res.data.code === '00000001') {
-          this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            confirmButtonText: '确定',
-            // cancelButtonText: '取消',
-            // cancelButtonClass: 'cancelSure',
-            // confirmButtonClass: 'sure',
-            // customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-          this.getDataList(); // 重新获取列表
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
-        } else if (res.data.data === true && res.status === 200) {
+        if (res.headers['content-disposition']) {
+          this.downloadUrl(res);
+        } else {
           this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
@@ -502,31 +510,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 === '00000001') {
+        //   this.$alert(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else if (res.data.data === true && res.status === 200) {
+        //   this.$alert(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$alert(`${res.data.msg}`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     // cancelButtonClass: 'cancelSure',
+        //     // confirmButtonClass: 'sure',
+        //     // customClass: 'exportConfirm',
+        //     type: 'warning'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // }
       });
     },
+    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;

+ 140 - 91
src/components/icss/nursing/nursing.vue

@@ -2,16 +2,18 @@
   <div>
     <crumbs title="护理关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -22,10 +24,21 @@
         <el-form-item label="标准护理名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -36,11 +49,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>
@@ -97,10 +115,16 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -245,7 +269,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 11,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -436,41 +461,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.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(() => {});
+      this.importNurseRecord(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.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);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -478,55 +504,78 @@ export default {
     },
     importNurseRecord(formData, header) {
       api.importNurseRecord(formData, header).then(res => {
-        // console.log('导入文件结果', '===================', res);
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 133 - 88
src/components/icss/operation/Operation.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="手术/操作关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -21,10 +23,21 @@
         <el-form-item label="标准手术/操作名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -102,11 +115,17 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -245,7 +264,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 6,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -436,42 +456,43 @@ export default {
           'Content-Type': 'multipart/form-data'
         }
       };
-      this.uploadInfo = '导入中...';
+      this.importOperationRecord(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.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(() => {});
+      // 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);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -479,54 +500,78 @@ export default {
     },
     importOperationRecord(formData, header) {
       api.importOperationRecord(formData, header).then(res => {
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 133 - 89
src/components/icss/pacs/Pacs.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="检查关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -21,10 +23,21 @@
         <el-form-item label="标准检查项目:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -95,11 +108,17 @@ export default {
         { id: 0, name: '未匹配' },
         { id: 2, name: '多项匹配' }
       ],
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       searched: false,
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       currentPage: 1,
       pageSize: config.pageSize,
@@ -243,7 +262,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 3,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -433,41 +453,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.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(() => {});
+      this.importPacsRecord(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.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);
-        }
-      });
+      //     setTimeout(() => {
+      //       this.uploadInfo = '导入';
+      //     }, 300);
+      //   }
+      // });
 
       //解决上传相同文件不触发change
       let inp = document.getElementById('upFile');
@@ -475,55 +496,78 @@ export default {
     },
     importPacsRecord(formData, header) {
       api.importPacsRecord(formData, header).then(res => {
-        // code === '00000001'  导入失败统一提示 医院术语字符数超出最大数量,请修改后再试
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 133 - 89
src/components/icss/scale/ScaleManage.vue

@@ -2,15 +2,17 @@
   <div>
     <crumbs title="量表关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -21,10 +23,21 @@
         <el-form-item label="标准量表名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -93,7 +106,8 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
       matchList: [
         { id: '', name: '全部' },
@@ -101,6 +115,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,
@@ -243,7 +262,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 10,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -434,41 +454,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');
@@ -476,55 +497,78 @@ export default {
     },
     importScaleRecord(formData, header) {
       api.importScaleRecord(formData, header).then(res => {
-        // console.log(res, '======================res导入结果');
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 133 - 90
src/components/icss/tcmdisease/tcmdisease.vue

@@ -2,16 +2,17 @@
   <div>
     <crumbs title="中医疾病关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -22,10 +23,21 @@
         <el-form-item label="标准中医疾病名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -101,8 +113,14 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       matchList: [
         { id: '', name: '全部' },
         { id: 1, name: '已匹配' },
@@ -252,7 +270,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 12,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -443,41 +462,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');
@@ -485,55 +505,78 @@ export default {
     },
     importTcmRecord(formData, header) {
       api.importTcmRecord(formData, header).then(res => {
-        // console.log('导入文件结果', '===================', res);
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;

+ 133 - 90
src/components/icss/tcmdrome/tcmdrome.vue

@@ -2,16 +2,17 @@
   <div>
     <crumbs title="中医证候关联维护" style="min-width: 980px" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item>
-          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
-          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
-          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
-          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
-          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
-          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
-          <el-button size="mini" @click="exportData">导出</el-button>
+        <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-form-item label="匹配状态:" class="selectMedicine">
           <el-select size="mini" v-model="filter.match" placeholder="请选择" clearable>
             <el-option v-for="item in matchList" :label="item.name" :value="item.id" :key="item.id"></el-option>
           </el-select>
@@ -22,10 +23,21 @@
         <el-form-item label="标准中医证候名称:">
           <el-input size="mini" v-model="filter.uniqueName" placeholder="请输入" clearable></el-input>
         </el-form-item>
-      </el-form>
-      <el-form class="secLine">
         <el-form-item>
           <el-button size="mini" @click="filterDatas">检索</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item>
+          <el-button type="text" class="downTemplate" @click="exportModule">导入模板下载</el-button>
+          <input type="file" name="uploadfile " id="upFile" @change="uploadFile($event)" />
+          <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
+          <el-button size="mini" @click="handleMatchData">预匹配</el-button>
+          <el-button size="mini" @click="importPage" style="margin:0 10px">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="exportData">导出</el-button>
+        </el-form-item>
+        <el-form-item>
           <el-button size="mini" type="warning" @click="addRelation">添加关联</el-button>
         </el-form-item>
       </el-form>
@@ -101,8 +113,14 @@ export default {
       filter: {
         hisName: '', // 医院诊断名称
         uniqueName: '', //标准诊断名称
-        match: ''
+        match: '',
+        status:''
       },
+      statusList: [
+        { id: '', name: '全部' },
+        { id: 1, name: '启用' },
+        { id: 0, name: '禁用' },
+      ],
       matchList: [
         { id: '', name: '全部' },
         { id: 1, name: '已匹配' },
@@ -252,7 +270,8 @@ export default {
         uniqueName: this.filter.uniqueName.trim(),
         uniqueCode: '',
         type: 13,
-        isMatch: this.filter.match
+        isMatch: this.filter.match,
+        status:this.filter.status
       };
       return param;
     },
@@ -443,41 +462,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');
@@ -485,55 +505,78 @@ export default {
     },
     importTcmdromeRecord(formData, header) {
       api.importTcmdromeRecord(formData, header).then(res => {
-        // console.log('导入文件结果', '===================', res);
-        if (res.data.code === '00000001') {
-          this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
-            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.$confirm(`导入成功`, '提示', {
-            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.$confirm(`${res.data.msg}`, '提示', {
+          this.$alert(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',
-            cancelButtonClass: 'cancelSure',
-            confirmButtonClass: 'sure',
-            customClass: 'exportConfirm',
-            type: 'warning'
-          })
-            .then(() => {})
-            .catch(() => {});
-
-          setTimeout(() => {
-            this.uploadInfo = '导入';
-          }, 300);
+            // cancelButtonClass: 'cancelSure',
+            // confirmButtonClass: 'sure',
+            // customClass: 'exportConfirm',
+            type: 'success'
+          });
         }
+        // if (res.data.code === '00000001') {
+        //   this.$confirm(`医院术语字符数超出最大数量,请修改后再试`, '提示', {
+        //     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.$confirm(`导入成功`, '提示', {
+        //     confirmButtonText: '确定',
+        //     // cancelButtonText: '取消',
+        //     cancelButtonClass: 'cancelSure',
+        //     confirmButtonClass: 'sure',
+        //     customClass: 'exportConfirm',
+        //     type: 'success'
+        //   })
+        //     .then(() => {})
+        //     .catch(() => {});
+        //   this.getDataList(); // 重新获取列表
+        //   setTimeout(() => {
+        //     this.uploadInfo = '导入';
+        //   }, 300);
+        // } else {
+        //   this.$confirm(`${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;