mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
@@ -62,9 +62,9 @@ const {data: userList, loading} = useThrottlePage(USER_LIST, memberParam.value,
|
||||
|
||||
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
||||
label: e.realName + e.userNo,
|
||||
value: e.id,
|
||||
...e,
|
||||
audienceList: null
|
||||
value: e.id //,
|
||||
// ...e,
|
||||
// audienceList: null
|
||||
})))
|
||||
|
||||
watch(props, init)
|
||||
|
||||
@@ -62,9 +62,9 @@ const {data: userList, loading} = useThrottlePage(USER_LIST, memberParam.value,
|
||||
|
||||
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
||||
label: e.realName + e.userNo,
|
||||
value: e.id,
|
||||
...e,
|
||||
audienceList: null
|
||||
value: e.id // ,
|
||||
// ...e,
|
||||
// audienceList: null
|
||||
})))
|
||||
|
||||
watch(props, init)
|
||||
|
||||
@@ -19,7 +19,7 @@ export function downLoadZip(str, filename) {
|
||||
})
|
||||
}
|
||||
const baseUrlManage = process.env.VUE_APP_BASE_API
|
||||
export function downLoadZipManage(str, filename) {
|
||||
export function downLoadZipManage(str, filename,fun) {
|
||||
var url = baseUrlManage + str
|
||||
axios({
|
||||
method: 'get',
|
||||
@@ -28,6 +28,7 @@ export function downLoadZipManage(str, filename) {
|
||||
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||
}).then(res => {
|
||||
resolveBlob(res, mimeMap.xlsx,filename)
|
||||
if(fun) fun()
|
||||
})
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="报表生成中...">
|
||||
<div class="train_newman">
|
||||
<div class="title">新任管理者线下学习项目定制报表</div>
|
||||
<div class="btn" @click="downReport" v-if="uploadAdmin('training-admin')||adminType?.length>0">
|
||||
@@ -6,6 +7,7 @@
|
||||
<div class="text">报表下载</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -14,14 +16,18 @@ import { useStore } from "vuex";
|
||||
import { reportOrgs } from "@/api/indexProject";
|
||||
import {downLoadZipManage} from "@/utils/zipdownload";
|
||||
const downReport = () => {
|
||||
console.log('下载报表')
|
||||
spinning.value = true
|
||||
if(uploadAdmin('training-admin')){
|
||||
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据')
|
||||
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据',function(){
|
||||
spinning.value = false
|
||||
})
|
||||
return
|
||||
}
|
||||
if(adminType?.value.length>0){
|
||||
let orgs = adminType.value.join(',')
|
||||
downLoadZipManage(`/admin/project/report/data?orgs=${orgs}`,'新任管理者培训数据')
|
||||
downLoadZipManage(`/admin/project/report/data?orgs=${orgs}`,'新任管理者培训数据',function(){
|
||||
spinning.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
@@ -30,6 +36,7 @@ import {downLoadZipManage} from "@/utils/zipdownload";
|
||||
})
|
||||
const store = useStore();
|
||||
const adminType = ref()
|
||||
const spinning = ref(false)
|
||||
const getReportOrgs = () => {
|
||||
reportOrgs({workNum: userInfo.value.userNo}).then((res) => {
|
||||
console.log(res,'res')
|
||||
@@ -46,6 +53,7 @@ import {downLoadZipManage} from "@/utils/zipdownload";
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.train_newman{
|
||||
width: calc(100vw - 300px);
|
||||
margin: 40px 0 0 50px;
|
||||
.title{
|
||||
color: #000000;
|
||||
|
||||
Reference in New Issue
Block a user