statistics.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="">
  3. <Tab :tab-index="3"></Tab>
  4. </view>
  5. </template>
  6. <!--
  7. 财务汇总占比 stat_finance_chart
  8. 放款汇总占比 stat_loan_chart
  9. 财务汇总明细 stat_finance
  10. 任务资金汇总 stat_capital
  11. 行业占比 stat_industry
  12. 年龄分布 stat_age_chart
  13. 情况说明 stat_situation
  14. 排名 stat_rankin
  15. -->
  16. <script>
  17. // 顶部筛选
  18. import HeadFilter from "./module/head_filter.vue"
  19. // 顶部左右统计数据
  20. import HeadData from "./module/head_data.vue"
  21. // 顶部单统计数据
  22. import StatSingleData from "./module/stat_single_data.vue"
  23. // 汇总统计
  24. import GeneralStat from "./components/general_stat.vue"
  25. // 资金统计
  26. import CapitalStat from "./components/capital_stat.vue"
  27. // 提放统计
  28. import DrawingsStat from "./components/drawings_stat.vue"
  29. // 消金统计
  30. import ConsumeStat from "./components/consume_stat.vue"
  31. // 任务统计
  32. import TaskStat from "./components/task_stat.vue"
  33. // 业绩统计
  34. import PerformanceStat from "./components/performance_stat.vue"
  35. import {
  36. getConsumeType,
  37. getUserType
  38. } from "@/api/statistics";
  39. export default {
  40. components: {
  41. HeadFilter,
  42. HeadData,
  43. StatSingleData,
  44. CapitalStat,
  45. GeneralStat,
  46. ConsumeStat,
  47. DrawingsStat,
  48. PerformanceStat,
  49. TaskStat
  50. },
  51. data() {
  52. return {
  53. timeData: ['', ''],
  54. scrollTop: 0,
  55. statType: 0,
  56. current: 0,
  57. bgHeight: 50,
  58. navsHeight: 65,
  59. positionHeight: 50,
  60. bgSize: 150,
  61. bg_path: 'https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/statistics/statistics-bg.png',
  62. list: [],
  63. userStatusList: [],
  64. dateTypeObj: {
  65. dateType: 1, //时间类型
  66. selectDate: '2023-02-25', //自定义的时候传数组,其它传开始日期
  67. money_type: 1,
  68. censusUserType: 0,
  69. product_id: 0,
  70. },
  71. }
  72. },
  73. onLoad() {},
  74. onPageScroll(res) {},
  75. mounted() {},
  76. computed: {
  77. // getBgHeight() {
  78. // switch (this.statType) {
  79. // case 0:
  80. // case 1:
  81. // this.statType = 0
  82. // return 48;
  83. // case 0:
  84. // case 1:
  85. // return 140;
  86. // default:
  87. // break;
  88. // }
  89. // },
  90. },
  91. methods: {
  92. onChange(e) {
  93. this.current = e
  94. this.dateTypeObj.product_id = this.list[e].id
  95. },
  96. getConsumeType() {
  97. getConsumeType().then((res) => {
  98. if (res.code === 1) {
  99. this.list = res.data
  100. }
  101. })
  102. },
  103. setTimeDate(timeDate) {
  104. this.timeData = timeDate
  105. },
  106. getUserType() {
  107. getUserType().then((res) => {
  108. if (res.code === 1) {
  109. this.userStatusList = res.data
  110. this.statType = this.userStatusList[0].id
  111. console.log(this.statType)
  112. }
  113. })
  114. },
  115. onTopSelect(type) {
  116. uni.pageScrollTo({
  117. scrollTop: 0,
  118. duration: 0
  119. });
  120. this.statType = type
  121. this.is_single_data = this.dateTypeObj.censusUserType == 3 || type == 4 ? false : true
  122. console.log(type);
  123. if (type == 3 || type == 4) {
  124. this.bgSize = 150
  125. this.bgHeight = 50
  126. this.navsHeight = 65
  127. }
  128. if (type == 1 || type == 2) {
  129. this.bgSize = 125
  130. this.bgHeight = 55
  131. this.navsHeight = 65
  132. }
  133. if (type == 6 || type == 7) {
  134. this.bg_path =
  135. 'https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/statistics/statistics-bg2.png'
  136. } else {
  137. this.bg_path =
  138. 'https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/statistics/statistics-bg.png'
  139. }
  140. if (type == 6) {
  141. this.bgSize = 65
  142. this.bgHeight = 65
  143. this.navsHeight = 65
  144. }
  145. if (type == 7) {
  146. this.bgSize = 120
  147. this.bgHeight = 120
  148. this.navsHeight = 120
  149. }
  150. this.$forceUpdate()
  151. },
  152. },
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. .statistics_content {
  157. width: 100%;
  158. position: absolute;
  159. }
  160. .stat_blank {
  161. // height: 100vh;
  162. background: red;
  163. // flex: 1;
  164. }
  165. .bottom_view {
  166. height: calc(160rpx + env(safe-area-inset-bottom));
  167. }
  168. .container {
  169. display: flex;
  170. flex-direction: column;
  171. min-height: 100%;
  172. /* 高度占满整个屏幕 */
  173. background-image: url('https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/statistics/statistics-bg.png');
  174. background-repeat: no-repeat;
  175. background-size: 100% 240px;
  176. }
  177. .content {
  178. flex: 1;
  179. /* 充满剩余空间 */
  180. background-color: #ffffff;
  181. /* 内容区域的背景颜色 */
  182. /* 其他样式按需添加 */
  183. }
  184. </style>