This commit is contained in:
parent
460f62dff2
commit
606fbe634e
|
|
@ -130,7 +130,7 @@ export function updateAuthRole(data) {
|
|||
// 查询部门下拉树结构
|
||||
export function deptTreeSelect() {
|
||||
return request({
|
||||
url: '/system/user/deptTree',
|
||||
url: '/smartArchives/system/user/deptTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
// 下载blob文件
|
||||
export const downloadFile = ({ fileData, fileType, fileName }) => {
|
||||
const blob = new Blob([fileData], {
|
||||
type: fileType
|
||||
})
|
||||
const link = document.createElement('a')
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = fileName
|
||||
link.style.display = 'none'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
URL.revokeObjectURL(link.href)
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
// 通用a链接下载
|
||||
export const downloadFileByUrl = (url) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', '')
|
||||
link.style.display = 'none'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
URL.revokeObjectURL(link.href)
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
|
@ -504,7 +504,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('monitor/job/export', {
|
||||
this.download('smartArchives/monitor/job/export', {
|
||||
...this.queryParams
|
||||
}, `job_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/monitor/jobLog/export', {
|
||||
this.download('/smartArchives//monitor/jobLog/export', {
|
||||
...this.queryParams
|
||||
}, `log_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('monitor/logininfor/export', {
|
||||
this.download('smartArchives/monitor/logininfor/export', {
|
||||
...this.queryParams
|
||||
}, `logininfor_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('monitor/operlog/export', {
|
||||
this.download('smartArchives/monitor/operlog/export', {
|
||||
...this.queryParams
|
||||
}, `operlog_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/config/export', {
|
||||
this.download('smartArchives/system/config/export', {
|
||||
...this.queryParams
|
||||
}, `config_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/dict/data/export', {
|
||||
this.download('smartArchives/system/dict/data/export', {
|
||||
...this.queryParams
|
||||
}, `data_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/dict/type/export', {
|
||||
this.download('smartArchives/system/dict/type/export', {
|
||||
...this.queryParams
|
||||
}, `type_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/post/export', {
|
||||
this.download('smartArchives/system/post/export', {
|
||||
...this.queryParams
|
||||
}, `post_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/role/export', {
|
||||
this.download('smartArchives/system/role/export', {
|
||||
...this.queryParams
|
||||
}, `role_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/user/export', {
|
||||
this.download('smartArchives/system/user/export', {
|
||||
...this.queryParams
|
||||
}, `user_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue