Merge branch '250213-prod-master_1202-gx' into master_1202

This commit is contained in:
joshen
2025-03-11 16:58:08 +08:00
2 changed files with 16 additions and 2 deletions

View File

@@ -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()
})

View File

@@ -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
}