Merge branch 'zcwy-0415' into dev0223

This commit is contained in:
zhangsir
2024-05-09 15:25:20 +08:00
2 changed files with 16 additions and 4 deletions

View File

@@ -19,4 +19,6 @@ export const dataStatisticsSelectV1= (obj) => http.post('/data/statistics/select
//柱状体右侧获取数据接口
export const dataStatisticsSelectV2= (obj) => http.post('/data/statistics/select/v2', obj )
// 图表2 学习情况数据接口
export const boeuStudyDataGetStudyStaisticsList= (obj) => http.post('/boeu/studyData/getStudyStatisticsList', obj )
export const boeuStudyDataGetStudyStaisticsList= (obj) => http.post('/boeu/studyData/getStudyStatisticsList', obj )
//查看用户有无权限
export const reportOrgs = (obj) => https.get('/orgHrbp/reportOrgs', {params:obj} )

View File

@@ -1,7 +1,7 @@
<template>
<div class="train_newman">
<div class="title">新任管理者线下学习项目定制报表</div>
<div class="btn" @click="downReport" v-if="uploadAdmin('training-admin')">
<div class="btn" @click="downReport" v-if="uploadAdmin('training-admin')||adminType?.length>0">
<div class="img"></div>
<div class="text">报表下载</div>
</div>
@@ -9,14 +9,24 @@
</template>
<script setup>
import { computed } from "vue";
import { computed,onMounted,ref } from "vue";
import { useStore } from "vuex";
import { reportOrgs } from "@/api/indexProject";
const downReport = () => {
console.log('下载报表')
window.open(`${process.env.VUE_APP_BASE_API}/admin/project/report/data`)
}
const store = useStore();
const userInfo = computed(() => store.state.userInfo);
onMounted(()=>{
getReportOrgs()
})
const store = useStore();
const adminType = ref()
const getReportOrgs = () => {
reportOrgs({workNum: userInfo.value.userNo}).then((res) => {
adminType.value = res.data
});
};
const uploadAdmin = (admin)=>{
const roleCode = userInfo.value.roleList.map((item)=>item.roleCode)
if (admin){