zhengkaixin 1 năm trước cách đây
mục cha
commit
f22a12532d
1 tập tin đã thay đổi với 46 bổ sung16 xóa
  1. 46 16
      pagesFinance/statistics/index.vue

+ 46 - 16
pagesFinance/statistics/index.vue

@@ -2,7 +2,9 @@
 	<view>
 		<view class="top-cover">
 			<view>
-			<view class="navbar-tit">
+			<view class="navbar-tit" :class="{
+				'navbar-tit-box':flag
+			}" >
 				<text><img src="../../assets/img/titleIcon.svg" alt=""></text>
 				{{title}}{{info.accountType==3?'':'运管中心'}}
 			</view>
@@ -686,9 +688,11 @@
 				stepname: '',
 				startTime: '',
 				stepid: 0,
-				windowWidth: 0,
+				windowWidth: 0,
+				windowHeight:300,
 				showTopobj: {},
-				showMonthlyCard: false,
+				showMonthlyCard: false,
+				flag:false,
 
 			}
 		},
@@ -718,7 +722,8 @@
 			}
 			this.title = this.info.merchantAccountName
 			uni.getSystemInfo().then(e => {
-				this.windowWidth = e[1].windowWidth
+				this.windowWidth = e[1].windowWidth
+				this.windowHeight = e[1].windowHeight
 			})
 		},
 		components: {
@@ -751,9 +756,35 @@
 				return this.queryTime2 + '-01'
 			},
 
-		},
+		},
+		onPageScroll(e) {
+		
+			this.onPageScrollMethod()
+		
+		},
+		updated() {
+			this.onPageScrollMethod()
+		},
+		
 		methods: {
-
+			
+			onPageScrollMethod() {
+				const query = uni.createSelectorQuery().in(this);
+				query.select('.income').boundingClientRect(data => {
+					 
+					if (data) {
+						var c=uni.upx2px(32);
+						 
+						if (data.top>c) {
+							this.flag = false;
+						} else {
+							this.flag = true;
+						}
+					}
+			
+				}).exec();
+			},
+			
 			indexDate5Ck(t, status) {
 
 				//单车充电
@@ -1157,12 +1188,12 @@
 				for (var i in getData) {
 					var item = getData[i]
 					item.todayEQAmount2 = (item.todayEQAmount / 10000)
-					console.log(i)
+					 
 					if (this.type_head == 1) {
 						this.showTopobj = item;
 					}
 				}
-				console.log(this.showTopobj)
+				 
 				this.indexData3.graphMap = getData
 				//var unit = this.current ? '笔' : '元'
 				var colorName = "#333"
@@ -1291,11 +1322,7 @@
 						position: (e) => {
 							var x = e[0]
 							var y = e[1]
-							// if(y<50){
-							//   y+=20
-							// }
-							// console.log(e)
-							// return [x,y]
+						 
 							if (this.windowWidth) {
 								if (y < 100) {
 									if (x < this.windowWidth / 2) {
@@ -1380,7 +1407,7 @@
 									'">' + num + u + '</span></p>';
 
 								if (this.type_head == 2) {
-									console.log(i, this.queryTime2)
+									 
 									if (value[i].seriesName == "收入") {
 										
 										if(this.showMonthlyCard){
@@ -1534,7 +1561,7 @@
 						//	name: '单位('+this.typeN+')',
 						axisLabel: {
 							formatter: (v, i) => {
-								//console.log(v,i)
+								 
 								if (dataInterval == null) {
 									return v
 								}
@@ -2193,7 +2220,7 @@
 		padding-bottom: 4px;
 		font-weight: bold;
 		position: fixed;
-		  border-bottom: 1px solid #fff;
+		 // border-bottom: 1px solid #fff;
 		    left: 0;
 		    right: 0;
 		    top: 0;
@@ -2202,6 +2229,9 @@
 		text {
 			margin-right: 8rpx;
 		}
+	}
+	.navbar-tit-box {
+		box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.15);
 	}
 
 	.statisticsData {