Bladeren bron

新增预匹配

wyq 4 jaren geleden
bovenliggende
commit
7f4f029e46

+ 2 - 1
src/api/config.js

@@ -109,7 +109,8 @@ export default {
     'importTcmdromeRecord': '/tran/mappingConfig/importExcel',   //中医证候-数据导入
     'exportTcmdromeModule': '/tran/mappingConfig/exportExcelModule',   //中医证候-数据导入模板导出
 
-
+    'precDiseaseDataMatch': '/tran/mappingConfig/precDataMatch',
+    'dataDiseaseVerify': '/tran/mappingConfig/dataVerify',
     'getRelatedMapping': '/tran/mappingConfig/getRelatedMapping',//查询映射关联
     'getTermMatching': '/term/termMatching',//查询推荐匹配
 

+ 9 - 0
src/api/icss.js

@@ -433,4 +433,13 @@ export default {
     //推荐匹配
     return axios.post(urls.getTermMatching, param);
   },
+
+  dataDiseaseVerify(param) {
+    return axios.post(urls.dataDiseaseVerify, param);
+  },
+  precDiseaseDataMatch(param) {
+    return axios.post(urls.precDiseaseDataMatch, param, {
+      responseType: 'blob',
+    });
+  },
 };

+ 54 - 0
src/components/icss/dept/DeptManage.vue

@@ -12,6 +12,8 @@
           />
                       <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -142,6 +144,55 @@ export default {
     }
   },
   methods: {
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 7);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -508,4 +559,7 @@ export default {
     display: none;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

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

@@ -6,6 +6,8 @@
           <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="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -137,6 +139,56 @@ export default {
   //   });
   // },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 4);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -454,6 +506,9 @@ export default {
 .delete {
   color: red;
 }
+#upFileMatch {
+  display: none;
+}
 .delete:hover {
   color: red !important;
 }

+ 55 - 0
src/components/icss/drug/DrugManage.vue

@@ -11,6 +11,8 @@
             @change="uploadFile($event)"
           />
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -133,6 +135,56 @@ export default {
     }
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 5);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -490,4 +542,7 @@ export default {
     border-bottom: 1px solid #dcdfe6;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 55 - 0
src/components/icss/fusion/Fusion.vue

@@ -11,6 +11,8 @@
             @change="uploadFile($event)"
           />
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -133,6 +135,56 @@ export default {
   },
 
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 5);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -489,4 +541,7 @@ export default {
     border-bottom: 1px solid #dcdfe6;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 54 - 0
src/components/icss/lis/Lis.vue

@@ -6,6 +6,8 @@
           <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="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -136,6 +138,55 @@ export default {
   },
 
   methods: {
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 1);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -458,6 +509,9 @@ export default {
 .delete {
   color: red;
 }
+#upFileMatch {
+  display: none;
+}
 .delete:hover {
   color: red;
 }

+ 55 - 0
src/components/icss/nursing/nursing.vue

@@ -12,6 +12,8 @@
           />
                       <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -141,6 +143,56 @@ export default {
     }
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 1);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -507,4 +559,7 @@ export default {
     display: none;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 55 - 0
src/components/icss/operation/Operation.vue

@@ -11,6 +11,8 @@
             @change="uploadFile($event)"
           />
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -139,6 +141,56 @@ export default {
     }
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 6);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -496,4 +548,7 @@ export default {
     border-bottom: 1px solid #dcdfe6;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 55 - 0
src/components/icss/pacs/Pacs.vue

@@ -11,6 +11,8 @@
             @change="uploadFile($event)"
           />
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -139,6 +141,56 @@ export default {
     });
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 3);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -496,4 +548,7 @@ export default {
     border-bottom: 1px solid #dcdfe6;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 55 - 0
src/components/icss/scale/ScaleManage.vue

@@ -6,6 +6,8 @@
           <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="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -134,6 +136,56 @@ export default {
     });
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 10);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -492,4 +544,7 @@ export default {
     border-bottom: 1px solid #dcdfe6;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 55 - 0
src/components/icss/tcmdisease/tcmdisease.vue

@@ -12,6 +12,8 @@
           />
                       <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -143,6 +145,56 @@ export default {
     }
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 12);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -509,4 +561,7 @@ export default {
     display: none;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>

+ 55 - 0
src/components/icss/tcmdrome/tcmdrome.vue

@@ -12,6 +12,8 @@
           />
                       <!-- accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -->
           <el-button size="mini" @click="importPage">{{uploadInfo}}</el-button>
+          <input type="file" name="uploadfile " id="upFileMatch" @change="uploadFileMatch($event)" />
+          <el-button size="mini" @click="handleMatchData" style="marginLeft: 10px">预匹配</el-button>
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
         <el-form-item label class="selectMedicine">
@@ -143,6 +145,56 @@ export default {
     }
   },
   methods: {
+    // 预匹配
+    handleMatchData() {
+      let inp = document.getElementById('upFileMatch');
+      inp.click();
+    },
+    // 导入数据
+    uploadFileMatch(e) {
+      let fileInfo = e.target.files[0];
+      e.preventDefault();
+      let formData = new FormData();
+      formData.append('file', fileInfo);
+      formData.append('type', 13);
+      const header = {
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: '预匹配中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api.dataDiseaseVerify(formData, header).then(res => {
+        if (res.data.code === '00020007') {
+          loading.close();
+          this.$alert(`${res.data.msg}`, '提示', {
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+        } else {
+          api.precDiseaseDataMatch(formData, header).then(res => {
+            setTimeout(() => {
+              loading.close();
+            }, 800);
+            if (res.status === 200) {
+              utils.downloadExportedData(
+                res.data,
+                '诊断关联数据(预匹配).xls'
+              );
+            }
+          });
+        }
+      });
+
+      let inp = document.getElementById('upFileMatch');
+      inp.value = '';
+    },
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = utils.getCurrentPage(
@@ -509,4 +561,7 @@ export default {
     display: none;
   }
 }
+#upFileMatch{
+  display: none;
+}
 </style>