ソースを参照

停车场管理手机端:停车记录列表加分类统计数量,部分页面改用自定义导航栏(原生导致双标题,浏览器标题会被子页面更改)

chenwen 3 年 前
コミット
fca2061602

+ 27 - 18
pages.json

@@ -66,8 +66,12 @@
             "path" : "pages/charge/chargedtl",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "收费详情",
-                "enablePullDownRefresh": false
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+				"app-plus":{
+				   	"titleNView":false,
+					"softinputMode":"adjustPan"
+				}
             }
             
         },
@@ -84,8 +88,12 @@
             "path" : "pages/parking/myparkings",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "我的停车场",
-                "enablePullDownRefresh": false
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+				"app-plus":{
+				   	"titleNView":false,
+					"softinputMode":"adjustPan"
+				}
             }
             
         }
@@ -93,8 +101,12 @@
             "path" : "pages/parking/parkingSiteDes",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "停车场主页",
-                "enablePullDownRefresh": false
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+				"app-plus":{
+				   	"titleNView":false,
+					"softinputMode":"adjustPan"
+				}
             }
             
         }
@@ -115,18 +127,11 @@
             "path" : "pages/whiteList/editWhite",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "编辑白名单车辆",
+                "navigationBarTitleText": "",
                 "enablePullDownRefresh": false,
 				"app-plus":{
-				   	"titleNView":{
-						"buttons": [{
-						                "color": "#ff5500",
-						                "colorPressed": "#eee",
-						                "float": "right",
-						                "fontSize": "14px",
-						                "text": "删除" // 字体图标\u 开头,加上字体图标unicode后面四位
-						            }]
-					}
+				   	"titleNView":false,
+				   	"softinputMode":"adjustPan"
 				}
             }
             
@@ -135,8 +140,12 @@
 		    "path" : "pages/whiteList/viewWhite",
 		    "style" :                                                                                    
 		    {
-		        "navigationBarTitleText": "查看白名单车辆",
-		        "enablePullDownRefresh": false
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false,
+				"app-plus":{
+				   	"titleNView":false,
+					"softinputMode":"adjustPan"
+				}
 		    }
 		    
 		}

+ 2 - 0
pages/charge/chargedtl.vue

@@ -1,5 +1,7 @@
 <template>
 	<view class="content">
+		<u-navbar title="收费详情"  :background="{backgroundColor: '#ffffff'}" class="top-navbar" title-size="30">
+		</u-navbar>
 		<u-card  class="charge-card" full margin="0rpx 0rpx 20rpx">
 			<view class="card-head card-head-blue" slot="head">
 				<view>{{parkingLog.car_num}}</view>

+ 2 - 0
pages/parking/myparkings.vue

@@ -1,5 +1,7 @@
 <template>
 	<view class="container">
+		<u-navbar title="我的停车场"  :background="{backgroundColor: '#ffffff'}" class="top-navbar" title-size="30">
+		</u-navbar>
 		<view class="parking-panel" v-for="(item,index) in parkingSites" :key="item.park_id">
 			<view class="panel-left">
 				<text class="left-title">{{item.parking_name}}</text>

+ 4 - 2
pages/parking/parkingSiteDes.vue

@@ -1,5 +1,7 @@
 <template>
 	<view class="container">
+		<u-navbar title="停车场主页"  :background="{backgroundColor: '#ffffff'}" class="top-navbar" title-size="30">
+		</u-navbar>
 		<view class="parking-panel">
 			<view class="panel-left">
 				<text class="left-title">{{parkingSite.parking_name}}</text>
@@ -23,8 +25,8 @@
 		<view class="li-con" v-for="(item,index) in devs">
 			<view class="dev-tit">
 				<text>{{item.channel_name}}</text>
-				<u-button type="primary" :custom-style="{height:'60rpx'}" :plain="true" @tap="manualPass(item.id,item.channel_name)">手动放行</u-button>
-				<view class="dev-view"><text>查看</text><u-icon name="arrow-right"></u-icon></view>
+				<u-button type="primary" :custom-style="{height:'60rpx',margin:'0rpx 30rpx'}" :plain="true" @tap="manualPass(item.id,item.channel_name)">手动放行</u-button>
+				<!-- <view class="dev-view"><text>查看</text><u-icon name="arrow-right"></u-icon></view> -->
 			</view>
 			<view class="dev-stat">
 				<view><text style="margin-right:10rpx;">闸口状态:{{item.channel_status=='1'?'在线':'离线'}}  </text>

+ 12 - 3
pages/parking/parkinglog.vue

@@ -183,17 +183,26 @@
 						return;
 					}
 					
-					this.parseDatas(resp.data);
+					if(!moreLoad){
+						this.renderRptData(resp.data.rptData);
+					}
+					
+					let pagedData=resp.data.pagedData;
+					this.parseDatas(pagedData);
 					if(moreLoad){  //附加以前的数据
-						resp.data.records=resp.data.records?this.pagedData.records.concat(resp.data.records):this.pagedData.records;
+						pagedData.records=pagedData.records?this.pagedData.records.concat(pagedData.records):this.pagedData.records;
 					}
-					this.pagedData=resp.data;
+					this.pagedData=pagedData;
 					this.checkHadMore();
 					
 				}).catch(error => {
 					uni.hideLoading();
 				});
 			},
+			renderRptData(rptData){
+				let tabtxts=[{name:`已离场(${rptData&&rptData['1']?rptData['1']:0})`},{name:`未离场(${rptData&&rptData['0']?rptData['0']:0})`}];
+				this.tablist=tabtxts;
+			},
 			parseDatas(respData){
 				
 				respData['pageNum']=respData.current;

+ 12 - 8
pages/whiteList/editWhite.vue

@@ -1,5 +1,8 @@
 <template>
 	<view class="container">
+		<u-navbar title="编辑白名单车辆"  :background="{backgroundColor: '#ffffff'}" class="top-navbar" title-size="30">
+			<view slot="right" class="my-nav-right" @tap="delHandler" v-if="isUpdate"><u-icon name="trash" size="40" color="#2979ff"></u-icon></view>
+		</u-navbar>
 		<u-form :model="white" ref="uForm" style="background-color: #ffffff;" :label-style="formLabelCss" label-width="180">
 			<u-form-item label="持有人"><u-input v-model="white.memberName" placeholder="姓名或单位名"/></u-form-item>
 			<u-form-item label="持有人电话*" prop="memberPhone"><u-input v-model="white.memberPhone" placeholder="联系电话"/></u-form-item>
@@ -132,12 +135,7 @@
 			
 			
 		},
-		onNavigationBarButtonTap(e){
-			//console.log(this.white.id)
-			if(this.white.id){
-				this.del(this.white.id);
-			}
-		},
+		
 		methods: {
 			
 			confirmPark(data){
@@ -216,8 +214,11 @@
 					uni.hideLoading();
 				});
 			},
-			del(id){
-				api.del(id).then(resp => {
+			delHandler(id){
+				if(!this.white.id){
+					return;
+				}
+				api.del(this.white.id).then(resp => {
 					if(!resp.success){
 						uni.showToast({
 							title: resp.msg||'操作失败',
@@ -256,6 +257,9 @@
 			font-family: '华文行楷';
 			height: 100%;
 		}
+	.my-nav-right{
+		margin:0rpx 20rpx;
+	}
 	.u-form-item{
 		padding:10rpx 20rpx;
 	}

+ 2 - 0
pages/whiteList/viewWhite.vue

@@ -1,5 +1,7 @@
 <template>
 	<view class="container">
+		<u-navbar title="查看白名单车辆"  :background="{backgroundColor: '#ffffff'}" class="top-navbar" title-size="30">
+		</u-navbar>
 		<u-form :model="white" ref="uForm" style="background-color: #ffffff;" :label-style="formLabelCss" label-width="180">
 			<u-form-item label="持有人">{{white.memberName}}</u-form-item>
 			<u-form-item label="持有人电话" prop="memberPhone">{{white.memberPhone}}</u-form-item>

+ 2 - 2
pages/whiteList/whiteList.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="container">
-		<u-navbar title="" :is-back="false"  class="top-navbar">
+		<u-navbar title="" :is-back="false"  class="top-navbar" title-size="30">
 			
 			<view  class="navbar-left">
 				<u-icon name="arrow-left" color="#2979ff" size="32" label=""  @click="backClose" style="margin-right: 30rpx;"></u-icon>
 				<u-icon name="plus" color="#2979ff" size="32" label="增加"  @click="openEdit"></u-icon>
-				<text style="flex:1;text-align: center;">白名单管理</text>
+				<text style="flex:1;text-align: center;font-size:30rpx;">白名单管理</text>
 			</view>
 			<u-dropdown ref="filterDropdown">
 				<u-dropdown-item  title="筛选">