From 2fc512a8dd05c16609ad1607cbd1817a7d9a3a59 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Wed, 11 Dec 2024 17:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E9=87=8F=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=20=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ECG/ECGStat/statdiagnosis.vue | 27 +++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/views/ECG/ECGStat/statdiagnosis.vue b/src/views/ECG/ECGStat/statdiagnosis.vue index 81495aca..e5c899e9 100644 --- a/src/views/ECG/ECGStat/statdiagnosis.vue +++ b/src/views/ECG/ECGStat/statdiagnosis.vue @@ -17,14 +17,15 @@ 查询 导出 导出{{ Profilevo.doctorname }}工作量导出{{ Profilevo.doctorname }}全部工作量 - 导出全部 + 导出全部 ({} as ProfileVO) //当前登录人信息 const endDate = new Date() const startDate = new Date(endDate.getTime() - 7 * 24 * 3600 * 1000) const Date_value = ref<[Date, Date]>([startDate, endDate]) +const power = ref(false) + const getlogininfo = async () => { Profilevo.value = await getUserProfile() } @@ -260,15 +265,29 @@ const calculateDailyDiagnosisCounts = (data: any[], dateArray: string[]) => { } // 修改 onMounted -onMounted(() => { - getlogininfo() +onMounted(async () => { + await getlogininfo() getDoctorList() // 设置默认时间范围为当前日期往前7天 const endDate = new Date() const startDate = new Date(endDate.getTime() - 6 * 24 * 3600 * 1000) Date_value.value = [startDate, endDate] + exportpower() }) +//p判断权限 +async function exportpower() { + const data = await ConfigApi.getConfigKey('power.export') + console.log(data) + if (data) { + console.log(Profilevo.value.doctorname) + if (data.includes(Profilevo.value.doctorname)) { + power.value = true + } else { + power.value = false + } + } +} // 导出全部数据的方法 async function exportAllData() { try {