mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +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";
|
import {getCookieForName} from "@/api/method";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const mimeMap = {
|
const mimeMap = {
|
||||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
zip: 'application/zip'
|
zip: 'application/zip'
|
||||||
@@ -36,6 +37,14 @@ export function downLoadZipManage(str, filename,fun) {
|
|||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||||
}).then(res => {
|
}).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)
|
resolveBlob(res, mimeMap.xlsx,filename)
|
||||||
if(fun) fun()
|
if(fun) fun()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,11 +15,16 @@ import { computed,onMounted,ref } from "vue";
|
|||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { reportOrgs } from "@/api/indexProject";
|
import { reportOrgs } from "@/api/indexProject";
|
||||||
import {downLoadZipManage} from "@/utils/zipdownload";
|
import {downLoadZipManage} from "@/utils/zipdownload";
|
||||||
|
import { message } from "ant-design-vue";
|
||||||
const downReport = () => {
|
const downReport = () => {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
if(uploadAdmin('training-admin')){
|
if(uploadAdmin('training-admin')){
|
||||||
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据',function(){
|
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据',function(code){
|
||||||
spinning.value = false
|
if(code == 4){
|
||||||
|
spinning.value = false;
|
||||||
|
message.error("权限不足!");
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user