api.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import { get,post } from './request';
  2. interface IChartParams {
  3. UniqueCode: string | any;
  4. }
  5. interface IRefreshParams {
  6. UniqueCode: string;
  7. }
  8. /* 图表模块 */
  9. export const ChartApi = {
  10. /**
  11. * 获取图表详情
  12. * @param params UniqueCode
  13. * @returns
  14. */
  15. getChart: (params:IChartParams) => {
  16. return get('/chart/common/detail',params);
  17. },
  18. /**
  19. * 图表刷新
  20. * @param params UniqueCode
  21. * @returns
  22. */
  23. refreshChart: (params:IRefreshParams) => {
  24. return get('/chart/refresh',params)
  25. },
  26. /**
  27. * 商品价格图表刷新
  28. * @param params UniqueCode
  29. * @returns
  30. */
  31. refreshCommordityChart: (params:IRefreshParams) => {
  32. return get('/chart/future_good/refresh',params)
  33. },
  34. /**
  35. * 商品价格图表刷新
  36. * @param params UniqueCode
  37. * @returns
  38. */
  39. refreshRelevanceChart: (params:IRefreshParams) => {
  40. return get('/chart/correlation/refresh',params)
  41. },
  42. /**
  43. * 刷新图表
  44. * @param {*} params UniqueCode
  45. * @returns
  46. */
  47. refreshCrossVarietyChart: (params:IRefreshParams) => {
  48. return get('/cross_variety/chart_info/refresh',params)
  49. },
  50. /**
  51. * 图表取消收藏
  52. */
  53. chartCollectCancel:params=>{
  54. return post('/chart/dw/collectCancel',params)
  55. },
  56. /**
  57. * 图表收藏
  58. */
  59. chartCollect:params=>{
  60. return post('/chart/dw/collect',params)
  61. }
  62. }
  63. /* 表格模块 */
  64. interface IExcelParams {
  65. UniqueCode: string | any;
  66. FromScene: number;
  67. ReferencedId:number;
  68. Uuid: string;
  69. }
  70. interface IFreshParams {
  71. UniqueCode: string | any
  72. }
  73. export const SheetApi = {
  74. /**
  75. * 获取表格详情
  76. * @param params UniqueCode
  77. * @returns
  78. */
  79. getInfo: (params: IExcelParams) => {
  80. return get('/excel_info/detail',params);
  81. },
  82. refreshInfo:(params:IFreshParams) => {
  83. return get('excel_info/refresh',params)
  84. }
  85. }