excel_info.go 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. package response
  2. import (
  3. excel2 "eta/eta_chart_lib/models/data_manage/excel"
  4. "eta/eta_chart_lib/models/data_manage/excel/request"
  5. "eta/eta_chart_lib/services/excel"
  6. "github.com/rdlucklib/rdluck_tools/paging"
  7. "time"
  8. )
  9. // AddExcelInfoResp 添加excel表格的返回
  10. type AddExcelInfoResp struct {
  11. ExcelInfoId int `description:"表格id"`
  12. UniqueCode string `description:"表格唯一编码"`
  13. }
  14. // ExcelListResp 表格列表返回数据
  15. type ExcelListResp struct {
  16. Paging *paging.PagingItem
  17. List []*excel2.MyExcelInfoList
  18. }
  19. // ExcelTableDetailResp excel表格详情
  20. type ExcelTableDetailResp struct {
  21. UniqueCode string `description:"表格唯一code"`
  22. ExcelImage string `description:"表格截图"`
  23. ExcelName string `description:"表格名称"`
  24. TableInfo excel.TableData
  25. Config ExcelTableDetailConfigResp
  26. }
  27. // ExcelTableDetailConfigResp
  28. // @Description: Excel表格的配置信息
  29. type ExcelTableDetailConfigResp struct {
  30. FontSize int
  31. }
  32. // TableCellResp 单元格
  33. type TableCellResp struct {
  34. DataType int `description:"数据类型,1:普通的,2:插值法,3:手动输入,4:公式计算"`
  35. DataTime string `description:"所属日期"`
  36. ShowValue string `description:"展示的值"`
  37. Value string `description:"实际值(计算公式)"`
  38. }
  39. type TableDataItem struct {
  40. EdbInfoId int `description:"指标id"`
  41. Data []request.ManualDataReq `description:"数据列表"`
  42. }
  43. // TableDetailResp excel表格详情
  44. type TableDetailResp struct {
  45. ExcelInfo excel2.ExcelInfo `description:"表格基础信息"`
  46. TableData request.TableDataReq `description:"表格内容"`
  47. }
  48. // ExcelInfoDetail excel表格详情(前端使用)
  49. type ExcelInfoDetail struct {
  50. ExcelInfoId int `orm:"column(excel_info_id);pk"`
  51. Source int `description:"表格来源,1:excel插件的表格,2:自定义表格,默认:1"`
  52. ExcelType int `description:"表格类型,1:指标列,2:日期列,默认:1"`
  53. ExcelName string `description:"表格名称"`
  54. UniqueCode string `description:"表格唯一编码"`
  55. ExcelClassifyId int `description:"表格分类id"`
  56. SysUserId int `description:"操作人id"`
  57. SysUserRealName string `description:"操作人真实姓名"`
  58. Content string `description:"表格内容"`
  59. ExcelImage string `description:"表格图片"`
  60. FileUrl string `description:"表格下载地址"`
  61. Sort int `description:"排序字段,数字越小越排前面"`
  62. IsDelete int `description:"是否删除,0:未删除,1:已删除"`
  63. ModifyTime time.Time `description:"最近修改日期"`
  64. CreateTime time.Time `description:"创建日期"`
  65. TableData interface{} `description:"表格内容"`
  66. Button ExcelInfoDetailButton `description:"操作权限"`
  67. CanEdit bool `description:"是否可编辑"`
  68. Editor string `description:"编辑人"`
  69. IsJoinPermission int `description:"是否加入权限管控,0:不加入;1:加入;默认:0"`
  70. HaveOperaAuth bool `description:"是否有数据权限"`
  71. }
  72. // ExcelInfoDetailButton 操作按钮
  73. type ExcelInfoDetailButton struct {
  74. RefreshButton bool `description:"是否可刷新"`
  75. CopyButton bool `description:"是否可另存为"`
  76. DownloadButton bool `description:"是否可下载"`
  77. OpButton bool `description:"是否可编辑"`
  78. DeleteButton bool `description:"是否可删除"`
  79. OpEdbButton bool `description:"是否可生成指标"`
  80. RefreshEdbButton bool `description:"是否可刷新指标"`
  81. }