mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
Merge branch '250213-prod-master_1202-gx' into master_1202
This commit is contained in:
@@ -2,6 +2,7 @@ import axios from 'axios'
|
||||
import {getCookieForName} from "@/api/method";
|
||||
|
||||
|
||||
|
||||
const mimeMap = {
|
||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
zip: 'application/zip'
|
||||
@@ -36,6 +37,14 @@ export function downLoadZipManage(str, filename,fun) {
|
||||
responseType: 'blob',
|
||||
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||
}).then(res => {
|
||||
console.log("downLoadZipManage res nginx ==> ",res)
|
||||
console.log("downLoadZipManage res res.headers.ecode ==> ",res.headers.ecode)
|
||||
if(res.headers.ecode == 4){
|
||||
console.log("downLoadZipManage res res.headers.ecode 进入 ==> ",res.headers.ecode)
|
||||
//TODO1-1 弹出框
|
||||
if(fun) fun(res.headers.ecode)
|
||||
return;
|
||||
}
|
||||
resolveBlob(res, mimeMap.xlsx,filename)
|
||||
if(fun) fun()
|
||||
})
|
||||
|
||||
@@ -15,11 +15,16 @@ import { computed,onMounted,ref } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { reportOrgs } from "@/api/indexProject";
|
||||
import {downLoadZipManage} from "@/utils/zipdownload";
|
||||
import { message } from "ant-design-vue";
|
||||
const downReport = () => {
|
||||
spinning.value = true
|
||||
if(uploadAdmin('training-admin')){
|
||||
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据',function(){
|
||||
spinning.value = false
|
||||
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据',function(code){
|
||||
if(code == 4){
|
||||
spinning.value = false;
|
||||
message.error("权限不足!");
|
||||
}
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user