增加excel模板配置,增加前端导出工具。token迁移至cookie x-token且保留header x-token 两者兼容。

This commit is contained in:
piexlMax
2023-12-30 19:57:36 +08:00
parent 5ea8947fc9
commit cd5b60c8cc
23 changed files with 1275 additions and 38 deletions

View File

@@ -0,0 +1,28 @@
<template>
<el-button
type="primary"
icon="download"
@click="exportExcelFunc"
>导出</el-button>
</template>
<script setup>
const props = defineProps({
templateId: {
type: String,
required: true
}
})
import { ElMessage } from 'element-plus'
const exportExcelFunc = async() => {
if (props.templateId === '') {
ElMessage.error('组件未设置模板ID')
return
}
const baseUrl = import.meta.env.VITE_BASE_API
const url = `${baseUrl}/sysExportTemplate/exportExcel?templateID=${props.templateId}`
window.open(url, '_blank')
}
</script>