Ver Fonte

no message

DESKTOP-70VPDLK\Administrator há 1 ano atrás
pai
commit
631c95bd9e
2 ficheiros alterados com 36 adições e 13 exclusões
  1. 12 0
      common/statistics/head_filter.vue
  2. 24 13
      pages/statistics/statistics.vue

+ 12 - 0
common/statistics/head_filter.vue

@@ -31,6 +31,14 @@
 		components: {
 			EnSelect
 		},
+    props:{
+      userStatusList:{
+        type: Array,
+        default: function () {
+          return []
+        }
+      }
+    },
 		data() {
 			return {
 				type: 'down',
@@ -39,7 +47,11 @@
 				animation: null,
 			};
 		},
+    mounted() {
+
+    },
 		methods: {
+
 			onChange(type) {
 				this.$refs.popup.close('bottom')
 				this.$emit('onTopSelect', type)

+ 24 - 13
pages/statistics/statistics.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="total-page page_env page-box container">
-		<Nav :title="'2024- 3.12--3.18'+ statType" :back="false" is_icons is_fixed :bgHeight="bgHeight"
+		<Nav :title="'2024-3.12-3.18'+ statType" :back="false" is_icons is_fixed :bgHeight="bgHeight"
 			:navsHeight="navsHeight" :opacity="scrollTop" :justify="'left'" :color="'#fff'" :fixedHeight="160">
 			<view class="task-tabs m-t20" :style="{top:`${$tools.topHeight()}px`}">
-				<HeadFilter @onTopSelect="onTopSelect"></HeadFilter>
-				<view class="m-lr30 m-tb30 bor-255 r-100" v-if="statType === 3">
+				<HeadFilter @onTopSelect="onTopSelect" :user-status-list="userStatusList"></HeadFilter>
+				<view class="m-lr30 m-tb30 bor-255 r-100" v-if="statType === 7">
 					<uv-subsection :list="list" :bgColor="'rgba(255,255,255,0.1)'" :activeColor="'#0FB160'"
 						:inactiveColor="'#004615'" :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
 						custom-item-style="border-radius: 30rpx;" :current="current" @change="onChange"></uv-subsection>
@@ -17,8 +17,8 @@
 		<view class="statistics_content" :style="[{top:`${$tools.topHeight() + positionHeight}px`}]">
 
 			<view class="">
-				<HeadData v-if="statType === 0 || statType === 1"></HeadData>
-				<view class="tabs page-box-bg-fff m-lr30 r-30" v-if="statType == 2 || statType == 3"
+				<HeadData v-if="statType === 3"></HeadData>
+				<view class="tabs page-box-bg-fff m-lr30 r-30" v-if="statType ===7"
 					:style="[{position:is_fixed?'absolute':''},{top:`${$tools.topHeight() + 85}px`}]"
 					style="height: 100rpx;">
 					<z-tabs ref="tabs" :list="tabsList"
@@ -30,7 +30,7 @@
 				<StatSingleData :is_fixed="is_tabs_fixed" v-if="is_single_data"></StatSingleData>
 				<view class="sys-list-background-color p-lr30">
 					<!-- 汇总统计-公司 -->
-					<view v-if="statType === 0">
+					<view v-if="statType === 3">
 						<StatFinanceChart></StatFinanceChart>
 						<StatFinance></StatFinance>
 						<StatCapital :leftColor="0" :rightColor="1" :leftText="'任务资金汇总'">
@@ -41,7 +41,7 @@
 						<StatAgeChart></StatAgeChart>
 					</view>
 					<!-- 资金统计-部门 -->
-					<view v-if="statType === 1">
+					<view v-if="statType === 4">
 						<StatLoanChart :genre="1" :leftText="'放款汇总占比'"></StatLoanChart>
 						<StatLoanChart :genre="2" :leftText="'回款汇总占比'"></StatLoanChart>
 						<StatRanking is_group :leftText="'汇总明细'"></StatRanking>
@@ -54,26 +54,26 @@
 						<StatSituation :type="1"></StatSituation>
 					</view>
 					<!-- 提放统计-部门 -->
-					<view class="" v-if="statType === 2">
+					<view class="" v-if="statType === 6">
 						<StatLoanChart :genre="1" :leftText="'提放汇总占比'"></StatLoanChart>
 						<StatRanking :leftText="'提放汇总明细'"></StatRanking>
 						<StatRanking :is_type='2' :leftText="'个人业绩排行'"></StatRanking>
 						<StatSituation :type="1" :leftText="'情况说明'"></StatSituation>
 					</view>
 					<!-- 消金统计-部门 -->
-					<view class="" v-if="statType === 3">
+					<view class="" v-if="statType === 7">
 						<StatLoanChart :genre="3" :leftText="'消金汇总占比'"></StatLoanChart>
 						<StatRanking :genre="3" :leftText="'消金汇总明细'"></StatRanking>
 						<StatRanking :genre="3" :is_type='2' :leftText="'个人业绩排行'"></StatRanking>
 						<StatSituation :type="1" :genre="3" :leftText="'情况说明'"></StatSituation>
 					</view>
 					<!-- 任务统计-个人 -->
-					<view class="" v-if="statType === 4">
+					<view class="" v-if="statType === 1">
 						<StatLoanChart :leftText="'任务汇总占比'"></StatLoanChart>
 						<StatRanking :is_type="3" :leftText="'任务明细'"></StatRanking>
 					</view>
 					<!-- 业绩统计-个人 -->
-					<view class="" v-if="statType === 5">
+					<view class="" v-if="statType === 2">
 						<StatLoanChart :leftText="'任务汇总占比'"></StatLoanChart>
 						<StatRanking :is_type="1" :leftText="'放款汇总明细'"></StatRanking>
 					</view>
@@ -108,6 +108,7 @@
 	import StatSituation from "@/common/statistics/stat_situation.vue"
 	// 排名
 	import StatRanking from "@/common/statistics/stat_ranking.vue"
+  import {getUserType} from "@/api/statistics";
 
 	export default {
 		components: {
@@ -143,7 +144,8 @@
 				bgHeight: 140,
 				navsHeight: 65,
 				positionHeight: 50,
-				list: ['中银消费', '中邮消费', '新网车抵']
+				list: ['中银消费', '中邮消费', '新网车抵'],
+        userStatusList:[]
 			}
 		},
 		onLoad() {
@@ -153,7 +155,7 @@
 			this.scrollTop = res.scrollTop / 120
 		},
 		mounted() {
-
+      this.getUserType()
 		},
 
 		computed: {
@@ -172,6 +174,15 @@
 			// },
 		},
 		methods: {
+      getUserType(){
+        getUserType().then((res)=>{
+          if(res.code===1){
+            this.userStatusList=res.data
+            this.statType=this.userStatusList[0].id
+            console.log(this.statType)
+          }
+        })
+      },
 			onChange(e) {
 				this.current = e
 			},