index.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div class="coontent">
  3. </div>
  4. </template>
  5. <script>
  6. import { getDailyData,getPayAmtList, getPayUserCntList, getTicketBoxTop, getTicketSiteTop} from "@/api/admin/index";
  7. import echarts from "echarts"
  8. import moment from 'moment'
  9. import { mapGetters } from 'vuex'
  10. import { numberFormat, getTimeResult } from "@/utils/util";
  11. export default {
  12. data() {
  13. return {
  14. };
  15. },
  16. mounted: function () {
  17. this.$nextTick(function () {
  18. });
  19. },
  20. computed: {
  21. ...mapGetters(['userInfo']),
  22. },
  23. created() {
  24. this.getDailyData()
  25. //this.getPayAmtList()
  26. //this.getPayUserCntList()
  27. this.getTicketBoxTop()
  28. this.getTicketSiteTop()
  29. },
  30. methods: {
  31. // 统计今日实时交易金额、交易用户、盲票销售张数、新增经销商数量
  32. getDailyData() {
  33. getDailyData({}).then(res => {
  34. console.log("getDailyData == "+JSON.stringify(res));
  35. }).catch(() => {
  36. this.loading = false
  37. })
  38. },
  39. // 统计交易金额(带粒度)
  40. getPayAmtList() {
  41. getPayAmtList({level:"days",days:30}).then(res => {
  42. console.log("getPayAmtList == "+JSON.stringify(res));
  43. }).catch(() => {
  44. this.loading = false
  45. })
  46. },
  47. //统计交易用户数(带粒度)
  48. getPayUserCntList() {
  49. getPayUserCntList({level:"week",days:30}).then(res => {
  50. console.log("getPayUserCntList == "+JSON.stringify(res));
  51. }).catch(() => {
  52. this.loading = false
  53. })
  54. },
  55. // 统计票组销售TOP10
  56. getTicketBoxTop() {
  57. getTicketBoxTop({days:30}).then(res => {
  58. console.log("getTicketBoxTop == "+JSON.stringify(res));
  59. }).catch(() => {
  60. this.loading = false
  61. })
  62. },
  63. // 统计经销商交易额TOP10
  64. getTicketSiteTop() {
  65. getTicketSiteTop({days:30}).then(res => {
  66. console.log("getTicketSiteTop == "+JSON.stringify(res));
  67. }).catch(() => {
  68. this.loading = false
  69. })
  70. },
  71. },
  72. };
  73. </script>
  74. <style lang="scss" scoped>
  75. </style>
  76. <style rel="stylesheet/scss" lang="scss" scoped>
  77. </style>