瀏覽代碼

电单车调整

zhengkaixin 2 年之前
父節點
當前提交
a2471b13c0
共有 2 個文件被更改,包括 288 次插入16 次删除
  1. 12 1
      apis/finance.js
  2. 276 15
      pagesFinance/statistics/index.vue

+ 12 - 1
apis/finance.js

@@ -15,6 +15,15 @@ export function findByOpenId(data) {
 }
 
 
+ export function homeChargingSingleCarStatusDetail(data) {
+ 	var url='/mobile/roleSharing/homeChargingSingleCarStatusDetail';
+ 	return request({
+ 		jp_identity:"merchantUser",// 分润接口
+ 		method: 'post',
+ 		data: data,
+ 		url: url
+ 	})
+ }
  
 
 
@@ -679,4 +688,6 @@ export function queryAccountByStationIdAndType(data) {
 		data:data ,
 		url: "/mobile/withdrawal/queryAccountByStationIdAndType"
 	})
-} 
+} 
+
+

+ 276 - 15
pagesFinance/statistics/index.vue

@@ -97,12 +97,19 @@
 			:default-selector="[selectstationIndex]"></u-picker>
 
 		<view class="statisticsChart chargingpile" v-if="indexData4">
-			<view class="statisticsChart-head" style="margin-top: 20px;">
+			<view class="statisticsChart-head" style="margin-top: 40rpx;">
 				<h4>充电枪运行情况</h4>
 			</view>
 			<view class="details detailstablepile" style="padding: 12px  0 12px 12px ;">
-				<p><img style="    vertical-align: bottom;" src="@/assets/img/riFill-charging-pile-fill.svg"></img>
-					快(超)充枪<span>共</span>
+				<p>
+					<svg   xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20" style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+					    
+					    <g>
+					    <path fill="rgba(23.97,90.015,197.88,1)" d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z" ></path>
+					    </g>
+					  </svg>
+<!-- 					<img style="    vertical-align: bottom;" src="@/assets/img/riFill-charging-pile-fill.svg"></img>
+ -->					快(超)充枪<span>共</span>
 					<span
 						style="color:#000">{{indexData4.fastGunFaultNum+indexData4.fastGunFreeNum+indexData4.fastGunWorkNum}}</span>
 					<span>支</span>
@@ -136,8 +143,15 @@
 					</view>
 				</view>
 
-				<p style="margin-top: 16rpx;color:#00B962"><img src="@/assets/img/riFill-charging-pile-fill2.svg">
-					</img>慢充枪<span>共</span>
+				<p style="margin-top: 16rpx;color:#00B962">
+					<svg   xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20" style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+					    
+					    <g>
+					    <path fill="#00B962" d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z" ></path>
+					    </g>
+					  </svg>
+					
+					慢充枪<span>共</span>
 					<span
 						style="color:#000">{{indexData4.slowGunFaultNum+indexData4.slowGunFreeNum+indexData4.slowGunWorkNum}}</span>
 					<span>支</span>
@@ -170,7 +184,103 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view>
+		
+		<view class="statisticsChart chargingpile" v-if="indexData4">
+			<view class="statisticsChart-head" style="margin-top: 20rpx;">
+				<h4>电单车充电桩运行情况</h4>
+			</view>
+			<view class="details detailstablepile" style="padding: 12px  0 12px 12px ;">
+				<p  style="color:#1677FF">
+					<svg   xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20" style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+					    
+					    <g>
+					    <path fill="#1677FF" d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z" ></path>
+					    </g>
+					  </svg>
+					电单车充电桩<span>共</span>
+					<span
+						style="color:#000">{{indexData4.singleCarOnlineNum+indexData4.singleCarNotOnlineNum}}</span>
+					<span>台</span>
+				</p>
+		
+				<view class="detailsline">
+		
+					<view class="details-row details-row-1" @click="indexDate5Ck(1,1)">
+		
+						<view class="span1"><span class="bot bot1"></span>正常<span
+								class="bot1span">{{indexData4.singleCarOnlineNum}}</span>台
+							<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
+						</view>
+		
+					</view>
+					
+					<view class="details-row details-row-1" @click="indexDate5Ck(0,99)">
+		
+						<view class="span1"><span class="bot bot3"></span>故障<span
+								class="bot3span">{{indexData4.singleCarNotOnlineNum}}</span>台
+							<u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
+						</view>
+		
+					</view>
+				</view>
+		
+			</view>
+		</view>
+		
+		<u-popup v-model="popupShow6" mode="bottom" border-radius="30"	>
+		
+			<view class="indexData5content">
+				<view class="contentTitle">
+					电单车充电桩{{indexData5Obj.type?'正常':'故障'}}明细
+				</view>
+				<scroll-view scroll-y="true" style="height: 520rpx;">
+					
+						<u-collapse style="padding-bottom: 30rpx;" >
+							<u-collapse-item v-for="(item,index) in indexData5List" class="contentItem" v-show="item.deviceNum" :key="index" >
+							<svg slot="title"   xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20" style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+								<g>
+								<path fill="#1677FF" d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z" ></path>
+								</g>
+							  </svg>
+							<view  slot="title" class="span1" >
+								
+								{{item.stationName}}
+								
+							</view>
+							<view  slot="title"  >
+								
+								<span class="span2 color777">
+									共<span  class="color333" >{{item.deviceNum}}</span>台
+								</span>
+								<span  class="span3 color777"> 
+									通道数<span  class="color333" >{{item.channelNum}}</span>
+								</span>
+							</view>
+							<view style="padding-bottom: 30rpx;">
+								<view class="contentBody" v-for="(gun,i) in item.device" :key="i">
+									
+										<view class="body1">{{gun.deviceName}}</view>
+										<view class="body2" v-if="indexData5Obj.type">
+											<view class="body2-0">在用<span class="body2-1">{{gun.useNum}}</span> </view>
+											<view  class="body2-2">| 空闲 {{gun.freeNum}}</view>
+										</view>
+										<view class="body3" v-else >故障</view>
+									
+								</view>
+							</view>
+						</u-collapse-item>
+					</u-collapse>
+					
+				</scroll-view>
+				<view class="confrim-btn">
+					<u-button  shape="square"  type="primary"
+					 
+					 @click="popupShow6 = false;">关闭</u-button>
+				</view>
+			</view>
+		
+		</u-popup>
 		<u-popup v-model="popupShow5" mode="bottom" border-radius="30"	>
 
 			<view class="indexData4content">
@@ -178,7 +288,7 @@
 					{{indexData4Obj.typeName}}枪{{indexData4Obj.text}}明细
 				</view>
 				<scroll-view scroll-y="true" style="height: 520rpx;">
-					<view >
+					<view style="padding-bottom: 30rpx;">
 						<view class="contentItem" v-for="(item,index) in indexData4List" v-show="item.queryNum" :key="index" >
 							
 								
@@ -211,7 +321,7 @@
 		<view class="statisticsChart">
 
 
-			<view class="statisticsChart-head" style="margin-top: 20px;">
+			<view class="statisticsChart-head" style="margin-top: 40rpx;">
 				<h4>流水统计</h4>
 				<!-- <view class="navbar-screen" >
 					 {{startTime}}至{{endTime}}
@@ -350,7 +460,7 @@
 
 			</view>
 
-			<view class="statisticsChart-head" style="margin-top: 20px;">
+			<view class="statisticsChart-head" style="margin-top: 40rpx;">
 				<h4>站主/桩主收益统计</h4>
 				<!-- <view class="navbar-screen" >
 					 {{startTime}}至{{endTime}}
@@ -438,7 +548,9 @@
 					second: false
 				},
 				indexData4List:[],
-				indexData4Obj:{},
+				indexData4Obj:{},
+				indexData5List:[],
+				indexData5Obj:{},
 				headitemby: "",
 				isinit: true,
 				form: {},
@@ -449,7 +561,8 @@
 				popupShow2: false,
 				popupShow: false,
 				popupShow4: false,
-				popupShow5: false,
+				popupShow5: false,
+				popupShow6: false,
 				nowTime: 0,
 				selectstationId2: "",
 				selectstationIndex: 0,
@@ -580,8 +693,56 @@
 			},
 
 		},
-		methods: {
+		methods: {
+			
+			indexDate5Ck(t,status) {
+				
+				//单车充电
+				
+				API.homeChargingGunStatus().then((res) => {
+				
+					this.indexData4 = res.data;
+				
+				}).catch(error => {
+					uni.showToast({
+				
+						title: error
+					})
+				})
+				this.indexData5Obj.type=t
+				
+				API.homeChargingSingleCarStatusDetail({
+				
+					status:status
+				}).then((res) => {
+					
+					this.popupShow6=true;
+					
+					this.indexData5List = res.data.stationList;
+					
+					for(var i in this.indexData5List){
+						var item=this.indexData5List[i];
+						if(item.deviceNum){
+							this.popupShow6 = true
+							break
+						}
+						this.popupShow6 = false;
+					}
+					if(!this.popupShow6 ){
+						uni.showToast({			
+							title:"电单车充电桩"+(t?"正常":"故障")+"0支"
+						})
+					}
+				}).catch(error => {
+					uni.showToast({
+				
+						title: error
+					})
+				})
+				
+			},
 			indexDate4Ck(c, t) {
+				//汽车充电
 				API.homeChargingGunStatus().then((res) => {
 				
 					this.indexData4 = res.data;
@@ -1219,7 +1380,107 @@
 	}
 </style>
 
-<style lang="scss" scoped>
+<style lang="scss" scoped>
+	.indexData5content {
+		padding: 40rpx 20rpx;
+		
+		.contentTitle{
+			color:#333333;
+			font-size: 40rpx;
+			text-align: center;
+			font-weight: bold;
+			margin-bottom: 8px;
+		}
+		.contentBody{
+			color: #777777 ;
+			font-size: 28rpx;
+			display: flex;
+			justify-content: space-between;
+			flex-direction: row;
+			padding: 0 16rpx;
+			margin-bottom: 16rpx;
+			.body1{
+				color:#333333;
+				margin-left: 20rpx;
+			}
+			.body2{
+				display: flex;
+				 .body2-0{
+					 width: 110rpx;
+				 }
+				.body2-1{
+					padding: 0 8rpx;
+					color: #00B962;
+					
+				}
+				.body2-2{
+					width: 120rpx;
+				}
+			}
+			.body3{
+				padding: 0 8rpx;
+				color:#FF3D00 ;
+			}
+		}
+		.contentItem{
+			border-bottom: 1px solid #ededed;
+			
+			// margin: 16rpx;
+			// padding:12rpx;
+			img,svg{
+				vertical-align: bottom;
+				height: 44rpx;
+				//margin-right: 8rpx;
+			}
+			.span1{
+				
+				text-align: left;
+				font-weight: bold;
+				font-size: 36rpx;
+				width: 310rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+			}
+			.color777{
+					color: #777777;
+			}
+			.color333{
+					color: #333333;
+			}
+			.span2{
+				 
+				border-right: 1px solid #ededed;
+			
+				width: 120rpx;
+				padding: 0 16rpx;
+				span{
+					padding: 0 8rpx;
+				}
+			}
+			.span3{
+				padding: 0 0 0 16rpx;
+				span{
+					padding: 0 8rpx;
+				}
+				width: 154rpx;
+				color: #333;
+				.bot1span {
+					color: #00B962;
+				}
+				
+				.bot2span {
+					color: #AAAAAA;
+				}
+				
+				.bot3span {
+					color: #FF3D00;
+				}
+			}
+			
+		}
+	}
+	
 	.indexData4content {
 		padding: 40rpx 20rpx;
 		
@@ -1710,10 +1971,10 @@
 	}
 
 	.statisticsChart {
-		margin: 16px;
+		margin: 32rpx;
 
 		.statisticsChart-head {
-			margin-bottom: 5px;
+			margin-bottom: 10rpx;
 			display: flex;
 			justify-content: space-between;
 			align-items: center;