dataCensus.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="content">
  3. <u-cell-group>
  4. <u-cell-item title="销售名称" :value="dataInfo.name" :arrow="false"></u-cell-item>
  5. <u-cell-item title="全部客户数" :value="dataInfo.allCustomer + '人'" :arrow="false"></u-cell-item>
  6. <u-cell-item title="已报名客户数" :value="dataInfo.applicationCustomer + '人'" :arrow="false"></u-cell-item>
  7. <u-cell-item title="意向客户数" :value="dataInfo.potentialCustomer + '人'" :arrow="false"></u-cell-item>
  8. <u-cell-item title="本月新增" :value="dataInfo.nowMonthAdd + '人'" :arrow="false"></u-cell-item>
  9. </u-cell-group>
  10. <u-top-tips ref="uTips"></u-top-tips>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. mapGetters
  16. } from 'vuex'
  17. const NET = require('@/utils/request')
  18. const API = require('@/config/api')
  19. export default {
  20. computed: {
  21. ...mapGetters([
  22. 'mainColor'
  23. ])
  24. },
  25. data() {
  26. return {
  27. dataInfo: {
  28. name: '',
  29. allCustomer: 0,
  30. applicationCustomer: 0,
  31. nowMonthAdd: 0,
  32. potentialCustomer: 0
  33. }
  34. }
  35. },
  36. onLoad() {
  37. this.getData()
  38. },
  39. onReady() {},
  40. methods: {
  41. // 获取数据
  42. getData() {
  43. NET.request(API.getDataCensus, {}, 'POST').then(res => {
  44. this.dataInfo = res.data
  45. }).catch(error => {
  46. this.$refs.uTips.show({
  47. title: error.message,
  48. type: 'warning',
  49. })
  50. })
  51. }
  52. },
  53. }
  54. </script>
  55. <style>
  56. page {
  57. width: 100%;
  58. height: 100%;
  59. background-color: #f7f7f7;
  60. }
  61. </style>
  62. <style lang="scss" scoped>
  63. @import "@/static/css/themes.scss";
  64. .content {
  65. width: 100%;
  66. float: left;
  67. }
  68. </style>