statistics.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view class="total-page page_env page-box container">
  3. <Nav :title="'2024- 3.12--3.18'+ statType" :back="false" is_icons is_fixed :bgHeight="bgHeight"
  4. :navsHeight="navsHeight" :opacity="scrollTop" :justify="'left'" :color="'#fff'" :fixedHeight="160">
  5. <view class="task-tabs m-t20" :style="{top:`${$tools.topHeight()}px`}">
  6. <HeadFilter @onTopSelect="onTopSelect"></HeadFilter>
  7. <view class="m-lr30 m-tb30 bor-255 r-100" v-if="statType === 3">
  8. <uv-subsection :list="list" :bgColor="'rgba(255,255,255,0.1)'" :activeColor="'#0FB160'"
  9. :inactiveColor="'#004615'" :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
  10. custom-item-style="border-radius: 30rpx;" :current="current" @change="onChange"></uv-subsection>
  11. </view>
  12. </view>
  13. </Nav>
  14. <!-- <view class="m-t30 stat_blank" style="z-index: 999999999;" :style="{minHeight:`calc(100% - ${$tools.topHeight()}px)`}">
  15. 内容
  16. </view> -->
  17. <view class="statistics_content" :style="[{top:`${$tools.topHeight() + positionHeight}px`}]">
  18. <view class="">
  19. <HeadData v-if="statType === 0 || statType === 1"></HeadData>
  20. <view class="tabs page-box-bg-fff m-lr30 r-30" v-if="statType == 2 || statType == 3"
  21. :style="[{position:is_fixed?'absolute':''},{top:`${$tools.topHeight() + 85}px`}]"
  22. style="height: 100rpx;">
  23. <z-tabs ef="tabs" :list="tabsList"
  24. :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'30rpx'}"
  25. :bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
  26. :current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
  27. </view>
  28. <!-- 顶部单行统计 -->
  29. <StatSingleData :is_fixed="is_tabs_fixed" v-if="is_single_data"></StatSingleData>
  30. <view class="sys-list-background-color p-lr30">
  31. <!-- 汇总统计-公司 -->
  32. <view v-if="statType === 0">
  33. <StatFinanceChart></StatFinanceChart>
  34. <StatFinance></StatFinance>
  35. <StatCapital :leftColor="0" :rightColor="1" :leftText="'任务资金汇总'">
  36. </StatCapital>
  37. <StatCapital :leftColor="1" :rightColor="2" :leftText="'在途资金汇总'">
  38. </StatCapital>
  39. <StatIndustry></StatIndustry>
  40. <StatAgeChart></StatAgeChart>
  41. </view>
  42. <!-- 资金统计-部门 -->
  43. <view v-if="statType === 1">
  44. <StatLoanChart :genre="1" :leftText="'放款汇总占比'"></StatLoanChart>
  45. <StatLoanChart :genre="2" :leftText="'回款汇总占比'"></StatLoanChart>
  46. <StatRanking is_group :leftText="'汇总明细'"></StatRanking>
  47. <view class="sys-background-fff r-30">
  48. <StatCapital :leftColor="0" :rightColor="1" :leftText="'任务资金汇总'">
  49. </StatCapital>
  50. <view class="view_line"></view>
  51. <StatRanking :is_margin_top="false" :leftText="'个人业绩排行'"></StatRanking>
  52. </view>
  53. <StatSituation :type="1"></StatSituation>
  54. </view>
  55. <!-- 提放统计-部门 -->
  56. <view class="" v-if="statType === 2">
  57. <StatLoanChart :genre="1" :leftText="'提放汇总占比'"></StatLoanChart>
  58. <StatRanking :leftText="'提放汇总明细'"></StatRanking>
  59. <StatRanking :is_type='2' :leftText="'个人业绩排行'"></StatRanking>
  60. <StatSituation :type="1" :leftText="'情况说明'"></StatSituation>
  61. </view>
  62. <!-- 消金统计-部门 -->
  63. <view class="" v-if="statType === 3">
  64. <StatLoanChart :genre="3" :leftText="'消金汇总占比'"></StatLoanChart>
  65. <StatRanking :genre="3" :leftText="'消金汇总明细'"></StatRanking>
  66. <StatRanking :genre="3" :is_type='2' :leftText="'个人业绩排行'"></StatRanking>
  67. <StatSituation :type="1" :genre="3" :leftText="'情况说明'"></StatSituation>
  68. </view>
  69. <!-- 任务统计-个人 -->
  70. <view class="" v-if="statType === 4">
  71. <StatLoanChart :leftText="'任务汇总占比'"></StatLoanChart>
  72. <StatRanking :is_type="3" :leftText="'任务明细'"></StatRanking>
  73. </view>
  74. <!-- 业绩统计-个人 -->
  75. <view class="" v-if="statType === 5">
  76. <StatLoanChart :leftText="'任务汇总占比'"></StatLoanChart>
  77. <StatRanking :is_type="1" :leftText="'放款汇总明细'"></StatRanking>
  78. </view>
  79. <view class="bottom_view"></view>
  80. </view>
  81. </view>
  82. </view>
  83. <Tab :tab-index="3"></Tab>
  84. </view>
  85. </template>
  86. <script>
  87. import HeadFilter from "@/common/statistics/head_filter.vue"
  88. import HeadData from "@/common/statistics/head_data.vue"
  89. // 顶部单统计数据
  90. import StatSingleData from "@/common/statistics/stat_single_data.vue"
  91. // 模块标题
  92. import StatisticsTitle from "@/common/statistics/statistics_title.vue"
  93. // 财务汇总占比
  94. import StatFinanceChart from "@/common/statistics/stat_finance_chart.vue"
  95. // 放款汇总占比
  96. import StatLoanChart from "@/common/statistics/stat_loan_chart.vue"
  97. // 财务汇总明细
  98. import StatFinance from "@/common/statistics/stat_finance.vue"
  99. // 任务资金汇总
  100. import StatCapital from "@/common/statistics/stat_capital.vue"
  101. // 行业占比
  102. import StatIndustry from "@/common/statistics/stat_industry.vue"
  103. // 年龄分布
  104. import StatAgeChart from "@/common/statistics/stat_age_chart.vue"
  105. // 情况说明
  106. import StatSituation from "@/common/statistics/stat_situation.vue"
  107. // 排名
  108. import StatRanking from "@/common/statistics/stat_ranking.vue"
  109. export default {
  110. components: {
  111. HeadFilter,
  112. HeadData,
  113. StatSingleData,
  114. StatFinanceChart,
  115. StatFinance,
  116. StatCapital,
  117. StatLoanChart,
  118. StatisticsTitle,
  119. StatIndustry,
  120. StatAgeChart,
  121. StatSituation,
  122. StatRanking
  123. },
  124. data() {
  125. return {
  126. is_single_data: false, // 顶部单行统计是否显示
  127. is_tabs_fixed: false, // tabs是否固定
  128. scrollTop: 0,
  129. statType: 0,
  130. current: 0,
  131. tabsList: [{
  132. name: '汇总',
  133. dot_color: 'red',
  134. disabled: false
  135. }, {
  136. name: '银行',
  137. dot_color: 'yellow',
  138. disabled: false
  139. }],
  140. bgHeight: 140,
  141. navsHeight: 65,
  142. positionHeight: 50,
  143. list: ['中银消费', '中邮消费', '新网车抵']
  144. }
  145. },
  146. onLoad() {
  147. uni.hideTabBar()
  148. },
  149. onPageScroll(res) {
  150. this.scrollTop = res.scrollTop / 120
  151. },
  152. mounted() {
  153. },
  154. computed: {
  155. // getBgHeight() {
  156. // switch (this.statType) {
  157. // case 0:
  158. // case 1:
  159. // this.statType = 0
  160. // return 48;
  161. // case 0:
  162. // case 1:
  163. // return 140;
  164. // default:
  165. // break;
  166. // }
  167. // },
  168. },
  169. methods: {
  170. onChange(e) {
  171. this.current = e
  172. },
  173. onTopSelect(type) {
  174. uni.pageScrollTo({
  175. scrollTop: 0,
  176. duration: 0
  177. });
  178. this.statType = type
  179. this.is_single_data = type == 0 || type == 1 ? false : true
  180. this.is_tabs_fixed = type === 2 ? true : false
  181. if (type == 0 || type == 1) {
  182. this.bgHeight = 140
  183. this.positionHeight = 50
  184. }
  185. if (type == 2) {
  186. this.bgHeight = 65
  187. this.positionHeight = 80
  188. }
  189. if (type == 3) {
  190. this.bgHeight = 120
  191. this.navsHeight = 120
  192. this.positionHeight = 135
  193. }
  194. if (type == 4 || type == 5) {
  195. this.bgHeight = 105
  196. this.navsHeight = 65
  197. this.positionHeight = 55
  198. }
  199. this.$forceUpdate()
  200. },
  201. },
  202. }
  203. </script>
  204. <style lang="scss" scoped>
  205. .statistics_content {
  206. width: 100%;
  207. position: absolute;
  208. }
  209. .stat_blank {
  210. // height: 100vh;
  211. background: red;
  212. // flex: 1;
  213. }
  214. .bottom_view {
  215. height: calc(160rpx + env(safe-area-inset-bottom));
  216. }
  217. .container {
  218. display: flex;
  219. flex-direction: column;
  220. height: 100%;
  221. /* 高度占满整个屏幕 */
  222. }
  223. .content {
  224. flex: 1;
  225. /* 充满剩余空间 */
  226. background-color: #ffffff;
  227. /* 内容区域的背景颜色 */
  228. /* 其他样式按需添加 */
  229. }
  230. </style>