|
@@ -1,6 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<div class="dashboard-container">
|
|
<div class="dashboard-container">
|
|
<div class="tableBox">
|
|
<div class="tableBox">
|
|
|
|
+ <div style="overflow: hidden;">
|
|
|
|
+ <el-button @click="toBack" style="float: right;">返回</el-button>
|
|
|
|
+ </div>
|
|
<div class="block">
|
|
<div class="block">
|
|
<div class="blockCon">
|
|
<div class="blockCon">
|
|
<el-date-picker v-model="formData.startTime" class="selects" type="date" format="yyyy年MM月dd日" value-format="yyyyMMdd" placeholder="就诊时间-开始"></el-date-picker>
|
|
<el-date-picker v-model="formData.startTime" class="selects" type="date" format="yyyy年MM月dd日" value-format="yyyyMMdd" placeholder="就诊时间-开始"></el-date-picker>
|
|
@@ -26,8 +29,8 @@
|
|
<span class="kong"></span>
|
|
<span class="kong"></span>
|
|
<el-button class="sc" @click="funQuery">查询</el-button>
|
|
<el-button class="sc" @click="funQuery">查询</el-button>
|
|
<el-button type="primary" plain @click="onReset">重置条件</el-button>
|
|
<el-button type="primary" plain @click="onReset">重置条件</el-button>
|
|
|
|
+ <el-button @click="onExport" type="primary" plain style="position: absolute; right: 35px;">导出Excel</el-button>
|
|
</div>
|
|
</div>
|
|
- <el-button @click="toBack" style="position: absolute; right: 35px;">返回</el-button>
|
|
|
|
</div>
|
|
</div>
|
|
<el-table :data="tableData" style="width: 100%">
|
|
<el-table :data="tableData" style="width: 100%">
|
|
<el-table-column type="index" label="序号"></el-table-column>
|
|
<el-table-column type="index" label="序号"></el-table-column>
|
|
@@ -57,6 +60,7 @@
|
|
import Title from '@/components/Title';
|
|
import Title from '@/components/Title';
|
|
import { mapGetters } from 'vuex';
|
|
import { mapGetters } from 'vuex';
|
|
import mPagination from '@/components/m-pagination';
|
|
import mPagination from '@/components/m-pagination';
|
|
|
|
+import { outHospitalExport } from '@/api/excel'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'Dashboard',
|
|
name: 'Dashboard',
|
|
@@ -73,7 +77,6 @@ export default {
|
|
dep_id: '',
|
|
dep_id: '',
|
|
startTime:'',
|
|
startTime:'',
|
|
endTime:'',
|
|
endTime:'',
|
|
- recordNum: '',
|
|
|
|
sfzh: '',
|
|
sfzh: '',
|
|
doctor_id: ''
|
|
doctor_id: ''
|
|
},
|
|
},
|
|
@@ -97,23 +100,56 @@ export default {
|
|
this.funQuery();
|
|
this.funQuery();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 导出
|
|
|
|
+ onExport() {
|
|
|
|
+ const { dep_id, startTime, endTime, sfzh, doctor_id } = this.formData
|
|
|
|
+ const params = {
|
|
|
|
+ dep_id,
|
|
|
|
+ start_time: startTime,
|
|
|
|
+ end_time: endTime,
|
|
|
|
+ sfzh,
|
|
|
|
+ doctor_id,
|
|
|
|
+ rule_id: this.rule_id,
|
|
|
|
+ is_error: this.$route.query.is_error
|
|
|
|
+ }
|
|
|
|
+ outHospitalExport(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)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 重置
|
|
onReset() {
|
|
onReset() {
|
|
this.formData = {
|
|
this.formData = {
|
|
dep_id: '',
|
|
dep_id: '',
|
|
startTime:'',
|
|
startTime:'',
|
|
endTime:'',
|
|
endTime:'',
|
|
- recordNum: '',
|
|
|
|
sfzh: '',
|
|
sfzh: '',
|
|
doctor_id: ''
|
|
doctor_id: ''
|
|
}
|
|
}
|
|
this.funQuery();
|
|
this.funQuery();
|
|
},
|
|
},
|
|
|
|
+ // 返回
|
|
toBack() {
|
|
toBack() {
|
|
this.$router.history.go(-1)
|
|
this.$router.history.go(-1)
|
|
},
|
|
},
|
|
|
|
+ // 跳转详情
|
|
funGoto(blbh) {
|
|
funGoto(blbh) {
|
|
this.$router.push({ path: '/outpatientMedicalRecordDetail', query: { blbh } })
|
|
this.$router.push({ path: '/outpatientMedicalRecordDetail', query: { blbh } })
|
|
},
|
|
},
|
|
|
|
+ // 获取部门和医生select
|
|
selectInfo() {
|
|
selectInfo() {
|
|
this.$axios.post('/omr_zk/department_list').then(res => {
|
|
this.$axios.post('/omr_zk/department_list').then(res => {
|
|
this.departmentList = res.data;
|
|
this.departmentList = res.data;
|