提交 e8ebd0eb authored 作者: lhh's avatar lhh

update

上级 9bd6f676
......@@ -128,5 +128,5 @@ export function deleteStudent(data) {
* 搜索考试
*/
export function downloadProcess(params) {
return httpRequest.get('/api/zy-admin/school/student/download-process', { params })
return httpRequest.get('/api/zy-admin/school/student/download-process', { params, responseType: 'blob' })
}
......@@ -82,12 +82,12 @@ export default {
window.open(`/personnel/student/process?id=${row.id}`)
},
downloadProcess() {
// window.open('https://learn-api.ezijing.com/api/zy-admin/school/student/download-process?class_id=6975998351439298560')
downloadProcess({ class_id: this.$route.query.id }).then(res => {
console.log(res, 'res')
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
if ('download' in document.createElement('a')) {
const elink = document.createElement('a')
elink.download = '学员学习进度数据.xlsx'
elink.download = '学员学习进度数据'
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
......
......@@ -21,7 +21,7 @@ export default defineConfig(({ mode }) => {
// changeOrigin: true,
// rewrite: path => path.replace('/api/zy-admin/', '/')
// },
'/api': 'https://x-admin.ezijing.com/'
'/api': 'https://learn-api.ezijing.com'
}
},
resolve: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论