123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <template>
- <div class="bg-box">
- <div class="bg-card">
- <SearchBoxVue :data="searchData" @search="handleSearch" @reset="handleReset" />
- <div style="margin-top: -22px;">
- <el-divider></el-divider>
- <TableBoxVue :data="tableData" @sort="handleSort" @export="handleExport" />
- <Pagination :page="paginationData.page" :limit="paginationData.page_size" :total="paginationData.total" @pagination="handlePagination" />
- </div>
- </div>
- </div>
- </template>
- <script>
- import SearchBoxVue from './components/doctorBl/SearchBox.vue'
- import TableBoxVue from './components/doctorBl/TableBox.vue'
- import Pagination from '@/components/Pagination'
- import { bmyDoctorRankingBlExport } from '@/api/excel'
- export default {
- components: {
- SearchBoxVue,
- TableBoxVue,
- Pagination
- },
- data() {
- return {
- searchData: {
- time: [],
- level: '',
- doctor_name: [],
- AAC11N: '',
- sort: []
- },
- tableData: [
- {
- "AAA28": "00045458",
- "ZYH": "805905",
- "AAC01": "2023-06-28 08:36:00",
- "AAC11N": "康复医学科",
- "KZRXM": "王德强",
- "ZHFZRYSXM": "王德强",
- "ZZYSXM": "孙芳菲",
- "ZYYSXM": "赵威东",
- "ZZYISXM": "",
- "home_bmy_score": 100,
- "bl_level": "甲级"
- },
- {
- "AAA28": "00047338",
- "ZYH": "805903",
- "AAC01": "2023-06-28 08:35:00",
- "AAC11N": "康复医学科",
- "KZRXM": "王德强",
- "ZHFZRYSXM": "王德强",
- "ZZYSXM": "孙芳菲",
- "ZYYSXM": "赵威东",
- "ZZYISXM": "",
- "home_bmy_score": 100,
- "bl_level": "甲级"
- }
- ],
- paginationData: {
- page: 1,
- page_size: 10,
- total: 0
- }
- }
- },
- created() {
- const { start_time, end_time } = this.$route.query
- this.$set(this.searchData, 'AAC01', [start_time, end_time])
- this.getList()
- },
- methods: {
- getList() {
- const {
- page,
- page_size
- } = this.paginationData
- const { time } = this.searchData
- const params = {
- is_export: 0,
- page,
- page_size,
- ...this.searchData
- }
- if (time && time.length) {
- params.start_time = time[0]
- params.end_time = time[1]
- }
- this.$axios.post('/bmy/doctorRankingBlList', params).then(res => {
- this.tableData = res.data.list
- this.paginationData.total = res.data.count
- });
- },
- handleSearch() {
- this.paginationData.page = 1
- this.getList()
- },
- handleReset() {
- this.searchData = {
- time: [],
- level: '',
- doctor_name: [],
- AAC11N: '',
- sort: []
- }
- },
- handlePagination(val) {
- const { page, limit } = val
- this.paginationData.page = page
- this.paginationData.page_size = limit
- this.getList()
- },
- handleSort(val) {
- this.searchData.sort = val
- this.getList()
- },
- handleExport() {
- const { time } = this.searchData
- const params = {
- is_export: 1,
- ...this.searchData
- }
- if (time && time.length) {
- params.start_time = time[0]
- params.end_time = time[1]
- }
- bmyDoctorRankingBlExport(params).then(res => {
- const content = res.data;
- const blob = new Blob([content]);
- const fileName = `首页质控(编码员)-医生病历总数.csv`;
- if ('download' in document.createElement('a')) {
-
- 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);
- document.body.removeChild(elink);
- } else {
-
- navigator.msSaveBlob(blob, fileName);
- }
- });
- }
- }
- }
- </script>
- <style>
- </style>
|