Quellcode durchsuchen

停车记录,停车详情, 页面优化

zhengkaixin vor 3 Monaten
Ursprung
Commit
31710b3dcd

+ 8 - 7
pages/deviceTab/index.vue

@@ -4,7 +4,7 @@
 		<view class="main">
 			<view class="list">
 				<view class="line"  v-for="(item,i) in list" :key="i"
-				  @click="gotoUrl('/pages/deviceTab/deviceList?id='+item.id)" >
+				  @click="gotoUrl('/pages/deviceTab/deviceList?companyId='+item.id)" >
 					<view class="body">
 						<view class="imgclass">
 							<image class="img" src="@/assets/img/deviceTab/index1-1.svg" mode=""></image>
@@ -14,11 +14,12 @@
 								{{item.name}}
 							</view>
 							<view class="value"  >
-								<!-- 占用9<span>/</span>
-								占用9<span>/</span>
-								共9台 -->
+								占用{{item.useNum}}<span>/</span>
+								空闲{{item.idleNum}}<span>/</span>
+								错误{{item.errorNum}}<span>/</span>
+								共{{item.lockNum}}台
+								
 								
-								{{item.openStatusN}}
 							</view>
 						</view>
 					</view>
@@ -76,9 +77,9 @@
 					mask: true,
 				})
 							 
-				API.parkingList(this.listForm).then((res) => {
+				API.companyInfoStatusList(this.listForm).then((res) => {
 					
-					this.list = res.data.parkingInfoList
+					this.list = res.data.companyInfoList
 					uni.hideLoading();
 				
 				}).catch(error => {

+ 228 - 45
pages/index/index.vue

@@ -75,10 +75,10 @@
 									<view class="td td3">
 
 										<view class="td td4">公共车位<span
-												class="body1pie-num colorEF8132">{{body1data.data1.type1}}</span>台
+												class="body1pie-num colorEF8132">{{body1data.data.publicNum}}</span>台
 										</view>
 										<view class="td td4">私家车位<span
-												class="body1pie-num colorDC4441">{{body1data.data1.type2}}</span>台
+												class="body1pie-num colorDC4441">{{body1data.data.privateNum}}</span>台
 										</view>
 									</view>
 								</view>
@@ -139,7 +139,7 @@
 				</view>
 			</view>
 
-			<view class="statistics " v-show="companyId">
+			<view class="statistics " v-show="1||companyId">
 				<view class="title">
 					<view class="icon">
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
@@ -163,25 +163,34 @@
 									<!-- 
 								 -->
 									<view class="item-title">
-										{{item.name}}
-			
-									</view>
-									<view class="item-tags">
-										<view class="tag  " :class="'tag'+item.type">
-											{{item.typeN}}
-			
-										</view>
-										<view class="tag" :class="'statusN'+item.status">
-											{{item.statusN}}
-			
+										
+										<view class="item-name">
+											{{item.name}}
 										</view>
-										<view class="tag" :class="'lockStatus lockStatus'+item.lockStatus">
-											{{item.lockStatusN}}
+										<view class="item-tags">
+											<view class="tag  " :class="'tag'+item.type">
+												{{item.typeN}}
+													
+											</view>
+											
+											<view class="tag" :class="'lockStatus lockStatus'+item.lockStatus">
+												{{item.lockStatusN}}
+											</view>
 										</view>
 									</view>
+									<view class="item-body">
+										编号:{{item.lockNo}}
+									</view>
 			
 								</view>
-								<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+								<view class="goto">
+									<view  :class="'statusN statusN'+item.status">
+										{{item.statusN}}
+											
+									</view>
+									<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+								</view>
+								
 							</view>
 							<u-divider border-color="#CFD2D5" @click="gotoDeviceList()"
 								v-if="equipmentList.length==10">最多显示10条,点击查看更多</u-divider>
@@ -190,6 +199,63 @@
 			
 			
 			
+					</jpContent>
+				</view>
+			</view>
+			
+			<view class="statistics " v-show="1||companyId">
+				<view class="title">
+					<view class="icon">
+						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
+					</view>
+					<view class="text">
+						<view>停车记录</view>
+			
+						<view class="check-all" @click="gotoUrl('/pages/record/parkingRecord?compamyId='+companyId+'&parkingId='+parkingId)">查看全部<u-icon name="arrow-right"></u-icon>
+						</view>
+			
+					</view>
+			
+				</view>
+			
+				<view class="contentBody">
+					<jpContent :status="jpContentMap.body8">
+						<view class="body8main">
+							<view class="line" v-for="(item,index) in parkingRecord"
+								@click="gotoUrl('/pages/record/parkingInfo?id='+item.id)" :key="index">
+								
+								<view class="data">
+									
+									<view class="view3">
+										<u-icon name="clock"></u-icon>
+										{{showTime(item.startTime)}}
+										<template v-if="item.status!=0">
+											{{item.endTime?'-'+showTime(item.endTime):'-当前'}}
+										</template>
+										
+									</view>
+									<view class="view1">
+										{{item.parkingName}} {{item.lockName}}
+									</view>
+								</view>
+								<view class="goto " :class="'status'+item.status">
+									{{item.status==2?getTime(item):''}}
+									{{item.status==1?'使用中':''}}
+									{{item.status==0?'启动中':''}}
+								
+									<u-icon name="arrow-right" size="24" style="margin-left: 8rpx;" color="#BBBBBB"></u-icon>
+								
+								</view>
+								
+								
+							</view>
+							<u-divider border-color="#CFD2D5" @click="gotoUrl('/pages/record/parkingRecord?compamyId='+companyId+'&parkingId='+parkingId)"
+								v-if="parkingRecord.length==5">最多显示5条,点击查看更多</u-divider>
+			
+						</view>
+			
+			
+			
 					</jpContent>
 				</view>
 			</view>
@@ -402,8 +468,9 @@
 				//companyListIndex:0,
 				companyId: "",
 				parkingId: "",
-				echartsList: {},
-				equipmentList: [{}],
+				echartsList: {},
+				parkingRecord:[],
+				equipmentList: [],
 				abnormalRecordsList: [{
 						level: 1,
 						content: "1111111",
@@ -526,7 +593,39 @@
 				return sz
 			},
 		},
-		methods: {
+		methods: {
+			
+			showTime(time){
+					if(time){
+						return time.substr(5).replace('-','.')
+					}else{
+						return ''
+					}
+			},
+			getTime(item){
+				if(item.startTime&&item.endTime){
+					var stime=newDate(item.startTime)
+					var etime=newDate(item.endTime)
+					//etime=new Date()
+					var k=(etime.getTime()-stime.getTime())/1000/60
+					
+					var H=k/60
+					var fen=k%(60)
+					var str="";
+					if(k>60){
+						str+=parseInt(H)+'小时'
+					}
+					if(fen==0&&str!=''){
+						
+					}else{
+						str+=parseInt(fen)+'分钟'
+					}
+					return str
+				}else{
+					return '已完成'
+				}
+			},
+			
 			gotoDeviceList() {
 				if (this.companyId) {
 					this.gotoUrl('/pages/deviceTab/deviceList?companyId=' + this.companyId)
@@ -556,6 +655,33 @@
 
 				})
 
+			},
+			getParkingRecordList() {
+				this.jpContentMap.body8 = 0
+			
+				API.parkingRecordList({
+					companyId: this.companyId,
+					parkingId: this.parkingId,
+					pageSize: 5
+				}).then((response) => {
+					
+					uni.hideLoading();
+					if (response.data.totalPage) {
+						this.jpContentMap.body8 = 2
+						this.parkingRecord = response.data.data
+					
+					} else {
+						this.jpContentMap.body8 = 1
+					}
+			
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+			
+				})
+			
 			},
 			getfloorlockList() {
 				this.jpContentMap.body7 = 0
@@ -570,18 +696,7 @@
 					if (response.data.totalPage) {
 						this.jpContentMap.body7 = 2
 						this.equipmentList = response.data.data
-						var num1 = 0
-						var num2 = 0
-						this.equipmentList.forEach(item => {
-							if (item.type == 1) {
-								num1 += 1
-							}
-							if (item.type == 2) {
-								num2 += 1
-							}
-						})
-						this.body1data.data1.type1 = num1
-						this.body1data.data1.type2 = num2
+					
 
 					} else {
 						this.jpContentMap.body7 = 1
@@ -612,7 +727,7 @@
 				this.occupancyByTimeBar(1);
 				this.occupancyByDay(1);
 				this.durationDistribution();
-
+				this.getParkingRecordList()
 				if (this.parkingId == "") {
 
 				} else {
@@ -1796,7 +1911,8 @@
 				.check-all {
 					margin-left: auto;
 					color: rgba(131, 131, 131, 1);
-					font-size: 24rpx;
+					font-size: 24rpx;
+					font-weight: 400;
 				}
 			}
 		}
@@ -1940,19 +2056,49 @@
 			display: flex;
 			justify-content: space-between;
 			margin-bottom: 24rpx;
-
+			.goto{
+				    display: flex;
+				    align-items: center;
+			}
+			.item-body{
+				font-size: 24rpx;
+			}
+			
 			.item-title {
 				color: rgba(51, 51, 51, 1);
-				font-size: 28rpx;
-
+				font-size: 28rpx;
+				    display: flex;
+				    align-items: center;
+					.item-name{
+						margin-right: 8rpx;
+						font-size: 32rpx;
+						font-weight: bold;
+					}
+			}
+			.statusN{
+				border-radius: 4px;
+				font-size: 24rpx;
+				padding: 2rpx 8rpx;
+				margin-right: 8rpx;
+			}
+			.statusN1 {
+				
+				color: rgba(0,185,98,1);
+				border: 1px solid rgba(0,185,98,1);
+			
+			}
+			
+			.statusN0 {
+				color: rgba(51,51,51,1);
+				border: 1px solid rgba(119,119,119,1);
+			
 			}
-
 			.item-tags {
 				display: flex;
 
 				.tag {
 					border-radius: 4px;
-
+					white-space: pre;
 					background-color: rgba(39, 177, 72, 1);
 					color: rgba(255, 255, 255, 1);
 					font-size: 20rpx;
@@ -1967,12 +2113,8 @@
 				.tag2 {
 					background-color: rgba(129, 97, 255, 1);
 				}
-
-				.statusN1 {}
-
-				.statusN0 {
-					background-color: rgba(153, 153, 153, 1);
-				}
+
+				
 
 				.lockStatus {
 
@@ -1984,5 +2126,46 @@
 				}
 			}
 		}
+	}
+	
+	
+	.body8main{
+		
+		.line{
+			    display: flex;
+			    justify-content: space-between;
+			    align-items: center;
+				background: #fff;
+				padding:16rpx 0rpx;
+				border-top: 1px solid rgba(232,232,232,1);
+				.data{
+					.view1{
+						color: rgba(16,16,16,1);
+						font-size: 32rpx;
+						font-weight: bold;
+					}
+					.view3{
+						color: rgba(119,119,119,1);
+						font-size: 28rpx;
+					}
+				}
+				.goto{
+					display: flex;
+					font-size: 32rpx;
+	
+				}
+				.status1{
+					color:#FF5100 
+				}
+				.status2{
+					color: rgba(22,119,255,1);
+	 
+				}
+			
+		}
+		.line:first-child{
+			border-top: 0px ;
+			    padding-top: 0px;
+		}
 	}
 </style>

+ 32 - 5
pages/myTab/dataUser.vue

@@ -51,7 +51,7 @@
 			<view class="page">
 
 				<view class="page-content">
-					<view class="item">
+					<!-- <view class="item">
 						<view class="title">
 							用户昵称
 
@@ -60,7 +60,7 @@
 							{{userInfo.nickName?userInfo.nickName:'未设置'}}
 							<u-icon name="arrow-right" style="margin-left: 8rpx;" size="24" color="#BBBBBB"></u-icon>
 						</view>
-					</view>
+					</view> -->
 					<view class="item">
 						<view class="title">
 							车牌号
@@ -82,13 +82,18 @@
 				</view>
 			</view>
 			
-			<view class="page" v-if="false">
+			<view class="page" @click="signOut">
 			
 				<view class="button">
 					退出账号
 				
 				</view>
-			</view>
+			</view>
+			
+			
+			<u-modal v-model="show1" @confirm="confirm" confirm-color="#FF3D00" :show-cancel-button="true" ref="uModal"
+				:asyncClose="true" title="退出账号" content="是否退出当前账号?" :content-style="{color: '#333333'}"></u-modal>
+			
 
 		</view>
 	</view>
@@ -113,7 +118,7 @@
 				carNumber:"",
 				nickName:"",
 				abc:false,
-				
+				show1:false,
 				customStyle: {
 					"border-radius": "50px",
 					"background-color": 'rgba(242, 244, 246, 1)',
@@ -132,6 +137,28 @@
 			
 		},
 		methods: {
+			signOut() {
+				this.show1 = true;
+			},
+			confirm() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				userApi.logout().then((res) => {
+					uni.hideLoading();
+					this.show1 = false;
+					this.jphelp.logoff()
+					uni.redirectTo({
+						url: '/pages/login/login'
+					})
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			carNumberBtn(){
 				 
 					this.showCarNumber=1;

+ 40 - 17
pages/myTab/index.vue

@@ -8,7 +8,7 @@
 		
 		<view class="body">
 		
-			<view class="page-top" @click="gotoUrl('/pages/myTab/dataUser')" >
+			<view class="page-top" >
 		
 				<view class="name">
 					<view class="photo">
@@ -23,7 +23,7 @@
 					</view>
 				</view>
 				<view class="value">
-					<u-icon name="arrow-right" size="24" color="#fff"></u-icon>
+					<!-- <u-icon name="arrow-right" size="24" color="#fff"></u-icon> -->
 				</view>
 			</view>
 			<view class="page" v-if="0">
@@ -90,21 +90,18 @@
 					
 				</view>
 				</view>
-				<view class="page">
-				<view class="page-content">
-					<view class="item" @click="gotoUrl('/pages/myTab/setting')" >
-						<view class="title">
-							<u-icon name="setting"   size="40" label-size="32"   label="设置"></u-icon>
-							
-						</view>
-						<view class="goto">
-							<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
-						</view>
-					</view>
-					
+				<view class="page" @click="signOut">
+				
+					<view class="button">
+						退出账号
 					
+					</view>
 				</view>
-			</view>
+				
+				<u-modal v-model="show1" @confirm="confirm" confirm-color="#FF3D00" :show-cancel-button="true" ref="uModal"
+					:asyncClose="true" title="退出账号" content="是否退出当前账号?" :content-style="{color: '#333333'}"></u-modal>
+				
+				
 		
 		</view>
 		<tabbar :current="3"></tabbar>
@@ -121,6 +118,7 @@
 		},
 		data() {
 			return {
+				show1:false,
 				isReady:false,
 				userInfo:{},
 				userInfoPlus:{
@@ -135,7 +133,28 @@
 			console.log(this.userInfo)
 		},
 		methods:{
-			
+			signOut() {
+				this.show1 = true;
+			},
+			confirm() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				userApi.logout().then((res) => {
+					uni.hideLoading();
+					this.show1 = false;
+					this.jphelp.logoff()
+					uni.redirectTo({
+						url: '/pages/login/login'
+					})
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 		}
 	}
 </script>
@@ -275,7 +294,11 @@
 			}
 		}
 	
-	
+		.button{
+			text-align: center;
+			color: red;
+			    padding: 32rpx 0;
+		}
 	
 	}
 </style>

+ 326 - 0
pages/record/parkingInfo.vue

@@ -0,0 +1,326 @@
+<template>
+	<view>
+			<u-navbar title="停车记录"></u-navbar>
+		<view class="top-step">
+			<u-steps :list="numList" activeColor="#00B962"
+			 mode="number" :current="current" un-active-color="#999999"></u-steps>
+		</view>
+		<view class="top" :class="'top'+current">
+			
+			<view class="view1 viewa">
+				<view class="name">
+					扫码订单
+				</view>
+				<view class="time">
+					{{showTime(info.userParkingRecord.createTime)}}
+				</view>
+			</view>
+			<view class="view1 viewb">
+				<view class="name">
+					落锁使用
+				</view>
+				<view class="time">
+					{{showTime(info.userParkingRecord.startTime)}}
+				</view>
+			</view>
+			<view class="view1 viewc">
+				<view class="name">
+					结束抬锁
+				</view>
+				<view class="time">
+					{{showTime(info.userParkingRecord.endTime)}}
+				</view>
+			</view>
+		</view>
+		<view class="main">
+			<view class="item">
+				<view class="name">
+					停车状态
+
+				</view>
+				<view class="value" :class="'userParkingRecord-status'+info.userParkingRecord.status">
+					{{(info.userParkingRecord.statusN)}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					停车时长
+
+				</view>
+				<view class="value">
+					{{getTime(info.userParkingRecord)}}
+				</view>
+			</view>
+			<view class="item" v-if="info.parkingInfo">
+				<view class="name">
+					停车场
+
+				</view>
+				<view class="value">
+					{{info.parkingInfo.name}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					车位号
+
+				</view>
+				<view class="value">
+					{{info.floorlockInfo.name}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					车位类型
+
+				</view>
+				<view class="value">
+					{{info.floorlockInfo.typeN}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					停车单号
+			
+				</view>
+				<view class="value">
+					{{info.userParkingRecord.orderNo}}
+				</view>
+			</view>
+			
+
+			
+		</view>
+		
+		<view class="main">
+			<view class="item">
+				<view class="name">
+					地锁状态
+
+				</view>
+				<view class="value">
+					{{info.floorlockInfo.lockStatusN}}
+				</view>
+			</view>
+			<view class="item" v-if="0">
+				<view class="name">
+					电池电量
+
+				</view>
+				<view class="value">
+					123
+				</view>
+			</view>
+			
+			
+		</view>
+		
+		<view class="main" v-if="info.recordUser">
+			<view class="item">
+				<view class="name">
+					用户名
+
+				</view>
+				<view class="value">
+					{{info.recordUser.nickName?info.recordUser.nickName:'未填写'}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					用户类型
+
+				</view>
+				<view class="value">
+					停车用户
+
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					联系方式
+
+				</view>
+				<view class="value">
+					{{info.recordUser.phone?info.recordUser.phone:'未填写'}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="name">
+					车牌号
+
+				</view>
+				<view class="value">
+					{{info.recordUser.carNumber?info.recordUser.carNumber:'未填写'}}
+				</view>
+			</view>
+			
+			
+		</view>
+	</view>
+</template>
+
+
+<script>
+	import * as API from '@/apis/pagejs/record.js'
+	import {
+		newDate,
+	
+	} from '@/apis/utils'
+	export default {
+		data() {
+			return {
+				current: 0,
+				numList: [{
+					name: ''
+				}, {
+					name: ''
+				}, {
+					name: ''
+				}],
+				info:{
+					parkingInfo:{},
+					userParkingRecord:{},
+					recordUser:{},
+					floorlockInfo:{}
+				}
+			};
+		},
+		onLoad(op) {
+			this.id = op.id
+			this.getInfo()
+		
+		},
+		methods: {
+			getTime(item){
+				if(item.startTime&&item.endTime){
+					var stime=newDate(item.startTime)
+					var etime=newDate(item.endTime)
+					//etime=new Date()
+					var k=(etime.getTime()-stime.getTime())/1000/60
+					
+					var H=k/60
+					var fen=k%(60)
+					var str="";
+					if(k>60){
+						str+=parseInt(H)+'小时'
+					}
+					if(fen==0&&str!=''){
+						
+					}else{
+						str+=parseInt(fen)+'分钟'
+					}
+					return str
+				}else{
+					return '未结束'
+				}
+			},
+			showTime(time){
+					if(time){
+						return time.substr(5).replace('-','.')
+					}else{
+						return ''
+					}
+			},
+			getInfo() {
+			
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var obj = {
+					id: this.id
+				}
+			
+				API.parkingRecordDetails(obj).then((res) => {
+					this.info = res.data
+			
+					uni.hideLoading();
+					this.current=this.info.userParkingRecord.status
+					
+					//this.getWhiteList()
+				}).catch(error => {
+			
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+		
+	}
+</script>
+
+<style>
+	page {
+		background-color: rgba(242, 244, 246, 1);
+	}
+</style>
+<style lang="scss" scoped>
+	.top-step{
+		margin-top: 40rpx;
+	}
+	.top{
+		margin-bottom: 40rpx;
+		display: flex;
+		    justify-content: space-between;
+			
+			.view1{
+				width: 33%;
+				    text-align: center;
+					.name{
+						color: rgba(51,51,51,1);
+						font-size: 28rpx;
+					}
+					.time{
+						color: rgba(119,119,119,1);
+						font-size: 20rpx;
+					}
+			}
+	}
+	.top0{
+		.viewb,.viewc{
+			.name{
+				color: rgba(119,119,119,1);
+			}
+			
+		}
+	}
+	.top1{
+		.viewc{
+			.name{
+				color: rgba(119,119,119,1);
+			}
+			
+		}
+	}
+	.main{
+		margin-bottom: 24rpx;
+		background: #fff;
+		.item{
+			display: flex;
+			    justify-content: space-between;
+				padding: 20rpx 32rpx;
+				border-top: 1px solid rgba(232,232,232,1);
+				color: rgba(51,51,51,1);
+				font-size: 16px;
+			.name{
+				white-space: pre;
+				
+			}
+			.value{
+				
+			}
+			.userParkingRecord-status0{
+				
+			}
+			.userParkingRecord-status1{
+				color: #FF5100 ;
+			}
+			.userParkingRecord-status2{
+				color: rgba(22,119,255,1);
+			}
+		}
+	}
+</style>

+ 208 - 0
pages/record/parkingRecord.vue

@@ -0,0 +1,208 @@
+<template>
+	
+	<view class="jpmain  ">
+			<u-navbar title="停车记录"></u-navbar>
+		<view class="top" v-if="0">
+			<view class="search">
+				<view class="searchBox">
+					<u-search shape="square" placeholder="搜索停车场" v-model="testName" :show-action="false" :animation="true"></u-search>
+					<u-button type="primary" size="mini" @click="testBtn">搜素</u-button>
+				</view>
+			</view>
+		</view>
+		<view class="body2">
+			<view class="item" v-for="(item,i) in list"
+			 @click="gotoUrl('/pages/record/parkingInfo?id='+item.id)"
+				:key="i">
+				<view class="data">
+					<view class="view1">
+						{{item.parkingName}} {{item.lockName}}
+					</view>
+					<view class="view2">
+						
+					</view>
+					<view class="view3">
+						{{showTime(item.startTime)}}
+						<template v-if="item.status!=0">
+							{{item.endTime?'-'+showTime(item.endTime):'-当前'}}
+						</template>
+						
+					</view>
+				</view>
+				<view class="goto " :class="'status'+item.status">
+					{{item.status==2?getTime(item):''}}
+					{{item.status==1?'使用中':''}}
+					{{item.status==0?'启动中':''}}
+
+					<u-icon name="arrow-right" size="24" style="margin-left: 8rpx;" color="#BBBBBB"></u-icon>
+
+				</view>
+			</view>
+			
+		</view>
+		<u-divider  color="#B6BDC3"  :isnone="list.length==0"
+			>已经到底了</u-divider>
+
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/record.js'
+	import {
+		newDate,
+	
+	} from '@/apis/utils'
+	export default {
+		data() {
+			return {
+				list: [],
+				testName:"",
+				listForm: {
+					name: "",
+					pageIndex: 1,
+					pageSize: 20,
+					recordsTotal: 1,
+				}
+			};
+		},
+		onLoad() {
+			this.getList()
+		},
+		onReachBottom() {
+			if (this.list.length < this.listForm.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		methods: {
+			testBtn(){
+				this.listForm.name=this.testName;
+				this.list=[]
+				this.listForm.pageIndex=1
+				this.getList()
+			},
+			showTime(time){
+					if(time){
+						return time.substr(5).replace('-','.')
+					}else{
+						return ''
+					}
+			},
+			getTime(item){
+				if(item.startTime&&item.endTime){
+					var stime=newDate(item.startTime)
+					var etime=newDate(item.endTime)
+					//etime=new Date()
+					var k=(etime.getTime()-stime.getTime())/1000/60
+					
+					var H=k/60
+					var fen=k%(60)
+					var str="";
+					if(k>60){
+						str+=parseInt(H)+'小时'
+					}
+					if(fen==0&&str!=''){
+						
+					}else{
+						str+=parseInt(fen)+'分钟'
+					}
+					return str
+				}else{
+					return '已完成'
+				}
+			},
+			myLoadmore() {
+				this.listForm.pageIndex += 1;
+				this.getList()
+			},
+
+			getList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+
+				API.parkingRecordList(this.listForm).then((res) => {
+					var list = []
+
+					if (this.listForm.pageIndex == 1) {
+						list = res.data.data;
+					} else {
+						list = [
+							...list,
+							...res.data.data
+						];
+					}
+					this.list = res.data.data
+					uni.hideLoading();
+
+				}).catch(error => {
+
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page {
+		background-color: rgba(242, 244, 246, 1);
+	}
+</style>
+<style lang="scss" scoped >
+	::v-deep .u-content{
+		width: 380% !important;
+	}
+	.search {
+	
+		padding: 16rpx 32rpx;
+		background: #fff;
+	
+		.searchBox {
+			display: flex;
+			align-items: center;
+			background: #F2F2F2;
+			padding: 1px 16rpx;
+			border-radius: 8px;
+			    justify-content: space-between;
+		}
+	}
+	.body2{
+		
+		.item{
+			    display: flex;
+			    justify-content: space-between;
+			    align-items: center;
+				background: #fff;
+				padding:24rpx 32rpx;
+				border-top: 1px solid rgba(232,232,232,1);
+				.data{
+					.view1{
+						color: rgba(16,16,16,1);
+						font-size: 36rpx;
+						font-weight: bold;
+					}
+					.view3{
+						color: rgba(119,119,119,1);
+						font-size: 28rpx;
+					}
+				}
+				.goto{
+					display: flex;
+					font-size: 32rpx;
+
+				}
+				.status1{
+					color:#FF5100 
+				}
+				.status2{
+					color: rgba(22,119,255,1);
+ 
+				}
+			
+		}
+	}
+</style>