// @Title          社区报表导出:必须有数据才能导出
// @Description    导出当天所有案件数量
// @Success 200
// @router /formareadown [get]
func (u *FormController) FormareaDown() {
	u.Ctx.ResponseWriter.Header().Set("Access-Control-Allow-Origin", u.Ctx.Request.Header.Get("Origin"))

	state, path := models_pc.FormareaDown()  //生成excel文件
	//beego.Info("adddddddd", state)
	if "ok" == state {
		u.Ctx.Output.Download(path)
		os.Remove(path)
	}else{
		u.Data["json"] = "file does not exist"
	}
	u.ServeJSON()
}

beego API客户端浏览器下载服务器端的生成excelbeego API客户端浏览器下载服务器端的生成excel

相关文章:

  • 2022-01-29
  • 2021-09-08
  • 2022-01-29
  • 2022-01-29
  • 2021-12-05
  • 2022-02-07
  • 2021-04-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-12-05
  • 2021-12-12
  • 2022-12-23
  • 2021-10-23
相关资源
相似解决方案