|
@@ -165,7 +165,7 @@
|
|
|
<el-button class="btn2" @click="searchBtn(1)">检索</el-button>
|
|
|
</div>
|
|
|
<!-- 专业检索 -->
|
|
|
- <ProfessionSearchVue v-if="choice == 2" @search="handleProfessionSearch" />
|
|
|
+ <ProfessionSearchVue v-if="choice == 2" @search="handleProfessionSearch" @export="handelExport" @reset="handleReset" />
|
|
|
</div>
|
|
|
<div class="tableBox">
|
|
|
<div class="flextab" style="margin: 0; margin-bottom: 30px; display: block">
|
|
@@ -405,7 +405,7 @@
|
|
|
import Title from '@/components/Title';
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import mPagination from '@/components/m-pagination';
|
|
|
-import { bassNormalSearchDownload, bassHighSearchDownload } from '@/api/excel';
|
|
|
+import { bassNormalSearchDownload, bassHighSearchDownload, professionSearchExport } from '@/api/excel';
|
|
|
import ProfessionSearchVue from './components/ProfessionSearch.vue';
|
|
|
|
|
|
export default {
|
|
@@ -763,6 +763,7 @@ export default {
|
|
|
},
|
|
|
// 专业检索
|
|
|
handleProfessionSearch(params) {
|
|
|
+ this.paginationData.currentPage = 1
|
|
|
this.$axios3.post('/bl/serach', params).then(res => {
|
|
|
this.tableData = res.data.list || [];
|
|
|
this.tableDataDetails = res.data.detail || [];
|
|
@@ -782,6 +783,32 @@ export default {
|
|
|
} else {
|
|
|
return true
|
|
|
}
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ handelExport(params) {
|
|
|
+ professionSearchExport(params).then(res => {
|
|
|
+ const content = res.data; // 后台返回二进制数据
|
|
|
+ const blob = new Blob([content]);
|
|
|
+ const fileName = `住院病历查询.csv`;
|
|
|
+ if ('download' in document.createElement('a')) {
|
|
|
+ // 非IE下载
|
|
|
+ const elink = document.createElement('a');
|
|
|
+ elink.download = fileName;
|
|
|
+ elink.style.display = 'none';
|
|
|
+ elink.href = URL.createObjectURL(blob);
|
|
|
+ document.body.appendChild(elink);
|
|
|
+ elink.click();
|
|
|
+ URL.revokeObjectURL(elink.href); // 释放URL 对象
|
|
|
+ document.body.removeChild(elink);
|
|
|
+ } else {
|
|
|
+ // IE10+下载
|
|
|
+ navigator.msSaveBlob(blob, fileName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ handleReset() {
|
|
|
+ this.handleProfessionSearch({})
|
|
|
}
|
|
|
},
|
|
|
};
|