| | |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmit">查询</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="success" @click="daochuExcel">导出</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div class="scrollable-table" :style="{maxHeight:tableHe}"> |
| | |
| | | import {nutritionalSummary} from '/@/api/Patients' |
| | | import {editUserInfo} from '/@/api/login' |
| | | import { ElLoading } from 'element-plus'; |
| | | import * as XLSX from 'xlsx'; |
| | | import {formatDate} from '/@/utils/formatTime' |
| | | const stores = useUserInfo(); |
| | | const { userInfos } = storeToRefs(stores); |
| | |
| | | }, |
| | | dialogTableVisible:false |
| | | }) |
| | | const daochuExcel=()=>{ |
| | | let table = document.getElementById('tabledome'); |
| | | if (table) { |
| | | const wb = XLSX.utils.table_to_book(table, { sheet: "Sheet1" }); |
| | | XLSX.writeFile(wb, "患者健康服务统计.xlsx"); // 文件名和扩展名可以根据需要更改 |
| | | } else { |
| | | console.error("找不到指定的表格"); |
| | | } |
| | | } |
| | | const onSubmit=()=>{ |
| | | const pasm={ |
| | | startTime:state.formInline.date[0]+ ' 00:00:00', |
| | |
| | | queryValue:'' |
| | | } |
| | | console.log(pasm) |
| | | const loading = ElLoading.service({ |
| | | lock: true, |
| | | text: 'Loading', |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | nutritionalSummary(pasm).then(re=>{ |
| | | console.log(re.data) |
| | | state.tableData=re.data |
| | | }).finally(()=>{ |
| | | loading.close() |
| | | }) |
| | | |
| | | } |