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 {