exa_excel.go 665 B

1234567891011121314151617181920
  1. package example
  2. import (
  3. v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type ExcelRouter struct {
  7. }
  8. func (e *ExcelRouter) InitExcelRouter(Router *gin.RouterGroup) {
  9. excelRouter := Router.Group("excel")
  10. var exaExcelApi = v1.ApiGroupApp.ExampleApiGroup.ExcelApi
  11. {
  12. excelRouter.POST("/importExcel", exaExcelApi.ImportExcel) // 导入Excel
  13. excelRouter.GET("/loadExcel", exaExcelApi.LoadExcel) // 加载Excel数据
  14. excelRouter.POST("/exportExcel", exaExcelApi.ExportExcel) // 导出Excel
  15. excelRouter.GET("/downloadTemplate", exaExcelApi.DownloadTemplate) // 下载模板文件
  16. }
  17. }