zhengkaixin vor 1 Monat
Ursprung
Commit
4abd6b74a4

+ 21 - 0
apis/pagejs/deviceTab.js

@@ -7,6 +7,16 @@ export function add(data) {
  		url: '/mobile/application/add'
  	})
 }
+
+export function errList(data) {
+	var url='/mobile/floorlockError/errList';
+	return requestWhite({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
 export function bindStatusByNo(data) {
  	return requestWhite({
  		method: 'post',
@@ -25,6 +35,17 @@ export function companyInfoStatusList(data) {
 	})
 }
 
+export function findFloorLock(data) {
+	var url='/mobile/floorlock/findFloorLock';
+	
+	return requestWhite({
+		method: 'POST',
+		data: data,
+		url: url
+	})
+}
+
+
 export function floorlockList(data) {
 	var url='/mobile/sysUser/floorlockList';
 	

+ 10 - 0
apis/pagejs/pagesTask.js

@@ -3,6 +3,16 @@
 import request from '@/apis/utils/request'
 
 
+export function errList(data) {
+	var url='/mobile/floorlockError/errList';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
 export function findFloorLock(data) {
 	var url='/mobile/floorlock/findFloorLock';
 	return request({

+ 6 - 0
assets/img/deviceTab/index2-1.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1092 1024" width="24" height="23" style="" filter="none">
+    
+    <g>
+    <path d="M546.133333 68.266667c306.449067 0 450.3552 235.383467 477.866667 443.733333h-84.650667a36.864 36.864 0 0 1-35.2256-26.112C848.6912 306.0736 729.361067 216.1664 546.133333 216.1664c-183.227733 0-302.557867 89.9072-357.9904 269.7216A36.864 36.864 0 0 1 152.917333 512H68.266667C95.778133 303.616 239.684267 68.266667 546.133333 68.266667z" fill="rgba(22,119,255,1)" p-id="3768" stroke="none"></path><path d="M546.133333 34.133333C227.771733 34.133333 34.133333 292.795733 34.133333 591.633067v150.9376C34.133333 822.613333 98.986667 887.466667 179.029333 887.466667h734.208C993.28 887.466667 1058.133333 822.613333 1058.133333 742.570667v-150.9376C1058.133333 292.795733 864.494933 34.133333 546.133333 34.133333z m0 68.266667c275.6608 0 443.733333 224.529067 443.733334 489.233067v150.9376A76.629333 76.629333 0 0 1 913.237333 819.2H179.029333A76.629333 76.629333 0 0 1 102.4 742.570667v-150.9376C102.4 326.929067 270.472533 102.4 546.133333 102.4z" fill="rgba(22,119,255,1)" p-id="3769" stroke="none"></path><path d="M170.666667 775.304533l0.170666-1.809066c6.075733-30.856533 165.410133-55.7056 363.383467-56.661334h23.620267c201.9328 0.955733 363.758933 26.760533 363.758933 58.4704v156.0576C921.6 963.652267 753.493333 989.866667 546.133333 989.866667s-375.466667-26.2144-375.466666-58.504534v-156.0576z" fill="rgba(22,119,255,1)" p-id="3770" stroke="none"></path>
+    </g>
+  </svg>

+ 19 - 42
pages.json

@@ -22,20 +22,8 @@
 				"navigationBarTitleText" : ""
 			}
 		},
-		{
-			"path" : "pages/task/addTaskStatus",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
-		},
-		{
-			"path" : "pages/task/infoTask",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
-		},
+	
+	
 		{
 			"path" : "pages/task/maintenanceTaks",
 			"style" : 
@@ -43,13 +31,7 @@
 				"navigationBarTitleText" : ""
 			}
 		},
-		{
-			"path" : "pages/task/maintenanceTaksStatus",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
-		},
+	
 		{
 			"path" : "pages/lockTab/dataLock",
 			"style" : 
@@ -57,27 +39,8 @@
 				"navigationBarTitleText" : ""
 			}
 		},
-		{
-			"path" : "pages/task/InspectionList",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
-		},
-		{
-			"path" : "pages/task/InspectionInfo",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
-		},
-		{
-			"path" : "pages/task/InspectionInfoStatus",
-			"style" : 
-			{
-				"navigationBarTitleText" : ""
-			}
-		},
+		
+		
 		{
 			"path" : "pages/myTab/index",
 			"style" : 
@@ -167,6 +130,20 @@
 			{
 				"navigationBarTitleText" : ""
 			}
+		},
+		{
+			"path" : "pages/task/listTask",
+			"style" : 
+			{
+				"navigationBarTitleText" : ""
+			}
+		},
+		{
+			"path" : "pages/lockTab/listLock",
+			"style" : 
+			{
+				"navigationBarTitleText" : ""
+			}
 		}
 	],
 

+ 304 - 0
pages/lockTab/listLock.vue

@@ -0,0 +1,304 @@
+<template>
+	<view>
+		<u-navbar  title="地锁列表"  ></u-navbar>
+		<view class="main">
+			<view class="tabs" v-if="0">
+				<u-picker  v-model="tabsFrom.show1"
+				  :default-selector="[tabsFrom.show1Index]"
+				 mode="selector" :range="tabsFrom.selector1"  range-key="label" @confirm="selector1confirm" ></u-picker>
+				<u-picker-select title="日期选择" v-model="tabsFrom.show2"
+				 :defaultTime="tabsFrom.show2Index" :endYear="endYear"
+				 mode="time" :params="params"  @confirm="selector2confirm" @reset="selector2reset" ></u-picker-select>
+				
+				<view class="tabsItem" @click="tabsFrom.show1=!tabsFrom.show1">{{tabsFrom.show1Text}} <u-icon name="arrow-up"
+						v-if="tabsFrom.show1"></u-icon><u-icon v-else name="arrow-down"></u-icon></view>
+				<view class="tabsItem" @click="tabsFrom.show2=!tabsFrom.show2">{{tabsFrom.show2Text}} <u-icon name="arrow-up"
+						v-if="tabsFrom.show2"></u-icon><u-icon v-else name="arrow-down"></u-icon></view>
+						
+				<view class="tabsItem" @click="tabsFrom.show3=!tabsFrom.show3">{{tabsFrom.show3Text}} <u-icon name="arrow-up"
+						v-if="tabsFrom.show3"></u-icon><u-icon v-else name="arrow-down"></u-icon></view>
+			</view>
+			
+			<view class="list">
+				<view class="line"   v-for="(item,i) in list" :key="i"
+				 @click="gotoUrl('/pages/lockTab/dataLock?id='+item.id)" >
+					<view class="body">
+						<view class="imgclass">
+							<image class="img" src="@/assets/img/deviceTab/index2-1.svg" mode=""></image>
+						</view>
+						<view class="item">
+							<view class="name">
+								<view class="text">{{item.name}}</view>
+								<view class="tag" :class="'type'+item.type">{{item.typeN}}</view>
+							</view>
+							<view class="value">
+								{{item.parkingName}}
+							</view>
+						</view>
+					</view>
+					<view class="goto">
+						<view class="dian" :class="'status'+item.status"></view>
+						<view  class="text" :class="'statusText'+item.status" >{{item.status==1?'在线':'离线'}}</view>
+						<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+					</view>
+				</view>
+				
+		 
+				
+			</view>
+			
+			<view class="floating-button" 
+			  @click="gotoBind" v-if="0" >
+				<view class="button">
+					<img class="img" src="@/assets/img/deviceTab/index2-2.svg" alt="">
+			
+					绑定新地锁
+				</view>
+			
+			</view>
+			
+			
+		</view>
+		<u-divider :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
+		
+		
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/deviceTab.js'
+	
+	
+	export default {
+		
+		data() {
+			return {
+				list:[],
+				listForm:{
+					pageIndex: 1,
+					pageSize: 20,
+					recordsTotal: 1,
+				},
+				title:"场站列表",
+				tabsFrom: {
+					show1: false,
+					show1Index:0,
+					show2Index:'',
+					show2: false,
+					show1Text: "全部场站",
+					show2Text: "全部类型",
+					show3Text: "全部状态",
+					selector1:[
+						{
+								label: '全部类型',
+								value: '',
+							},
+						{
+								label: '线上充值',
+								value: '1',
+							},
+							{
+								label: '线下充值',
+								value: '2',
+							},
+					]
+				},
+			};
+		},
+		onLoad(op) {
+			if(op.companyId){
+				this.listForm.companyId=op.companyId
+			}
+			if(op.parkingId){
+				this.listForm.parkingId=op.parkingId
+			}
+			this.getList()
+		},
+		onReachBottom() {
+			if (this.list.length < this.listForm.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		methods: {
+			gotoBind(){
+				uni.navigateTo({
+				  url: '/pages/deviceTab/bindLock?parkingId='+this.listForm.parkingId,
+				  events: {
+				    // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
+				    acceptDataFromOpenerPage: (item)=>{
+						
+						this.getList(1)
+				    },
+				 
+				  }
+				  // ,
+				  // success: function(res) {
+				  //   // 通过eventChannel向被打开页面传送数据
+				  //  
+				  // }
+				})
+			},
+			myLoadmore(){
+				this.listForm.pageIndex += 1;
+				this.getList()
+			},
+			getList(bl) {
+				if(bl){
+					this.listForm.pageIndex = 1
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+							 
+				API.findFloorLock(this.listForm).then((res) => {
+					var list=[]
+					
+					if (this.listForm.pageIndex == 1) {
+						list = res.data.data;
+					} else {
+						list = [
+							...list,
+							...res.data.floorlockInfoList
+						];
+					}
+					this.list = res.data.floorlockInfoList
+					uni.hideLoading();
+				
+				}).catch(error => {
+				
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.main{
+		background-color: #fff;
+		.line{
+			    display: flex;
+			    justify-content: space-between;
+				    align-items: center;
+					padding: 32rpx;
+					border-bottom: 1px solid rgba(245,245,245,1);
+				.goto{
+					display: flex;
+					    align-items: center;
+						.dian{
+							width: 16rpx;
+							height: 16rpx;
+							 border-radius: 50px;
+							background-color: rgba(184,184,184,1);
+							 margin-right: 16rpx;
+						}
+						.status1{
+							background-color: #4CAF50;
+							color:#4CAF50;
+						}
+						.statusText1{
+							
+							color:#4CAF50;
+						}
+						.text{
+							 margin-right: 16rpx;
+							 font-size: 24rpx;
+
+						}
+				}
+				.body{
+					 display: flex;
+					     align-items: center;
+						 
+						 .imgclass{
+						 							     display: flex;
+						 							     align-items: center;
+						 							     justify-content: center;
+						 							width: 72rpx;
+						 							height: 72rpx;
+						 							     border-radius: 4px;
+						 							     background-color: rgba(219,234,255,1);
+						 }
+						 .item{
+						 							    margin-left: 16rpx;
+						 								
+						 								 .name{
+						 									 color: rgba(51,51,51,1);
+						 									 font-size: 28rpx;
+															 display: flex;
+															 align-items: center;
+															 .tag{
+																border-radius: 4px;
+																background-color: rgba(22,119,255,1);
+																color: rgba(255,255,255,1);
+																font-size: 22rpx;
+																padding:1px 8rpx;
+																margin-left: 8rpx;
+															 }
+															 .type2{
+																 background-color: #8161ff;
+															 }
+						 								 }
+						 								 .value{
+						 								 	color: rgba(119,119,119,1);
+						 								 	font-size: 24rpx;
+						 											
+						 								 }
+						 }
+						
+				}
+		}
+		.img{
+			width: 48rpx;
+			height: 48rpx;
+		}
+	}
+	
+	.tabs{
+		border-bottom: 1px solid rgba(232,232,232,1);
+		height: 96rpx;
+		line-height: 96rpx;
+		background-color: #fff;
+		border-top: 1px solid rgba(241,241,241,1);
+		display: flex;
+		justify-content: space-around;
+		.tabsItem{
+			color: rgba(51,51,51,1);
+			font-size: 14px;
+
+		}
+		
+	}
+	
+	.floating-button {
+		position: fixed;
+		bottom: 120rpx;
+		width: 100%;
+		display: flex;
+	
+		justify-content: center;
+	
+		.button {
+			border-radius: 50px;
+			background-color: rgba(49, 51, 52, 1);
+			color: rgba(255, 255, 255, 1);
+			font-size: 28rpx;
+			width: 240rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			padding: 12rpx;
+	
+			.img {
+				width: 40rpx;
+				height: 40rpx;
+				margin-right: 8rpx;
+			}
+		}
+	}
+</style>

+ 0 - 19
pages/task/InspectionInfo.vue

@@ -1,19 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>

+ 0 - 19
pages/task/InspectionInfoStatus.vue

@@ -1,19 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>

+ 0 - 20
pages/task/InspectionList.vue

@@ -1,20 +0,0 @@
-<template>
-	<view>
-		<u-navbar  title="故障详情" title-color="#101010"></u-navbar>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>

+ 0 - 81
pages/task/addTaskStatus.vue

@@ -1,81 +0,0 @@
-<template>
-	<view>
-		<u-navbar  title="提交结果" title-color="#101010"></u-navbar>
-		<view class="data">
-		<image class="img" src="@/assets/img/success.png" mode=""></image>
-					<view class="t1">上报成功
-</view>
-					<view class="t2">本次故障问题已提交成功</view>
-				</view>
-				<view class="floating-button" >
-					<view class="button button2" @click="goBack()" >
-						返回
-					</view>
-					
-		
-				</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-
-<style lang="scss" scoped>
-	
-	.body {
-		padding: 32rpx;
-		background-color: rgba(242, 244, 246, 1);
-	}
-	.data{
-		text-align: center;
-		padding-top:120rpx;
-		.img{
-			width: 200rpx;
-			height: 200rpx;
-		}
-		.t1{
-			color: #101010;
-			font-weight: bold;
-			margin-top: 40rpx;
-			font-size: 40rpx;
-
-		}
-		.t2{
-			margin-top: 8rpx;
-			color: rgba(119,119,119,1);
-			font-size: 24rpx;
-		}
-	}
-
-
-	.floating-button {
-		padding-top:120rpx;
-	text-align: center;
-		.button {
-			    margin: 0 auto;
-			
-			border-radius: 50px;
-			height: 80rpx;
-			width: 80%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			padding: 12rpx;
-
-			background-color:#1677FF ;
-			color: rgba(255, 255, 255, 1);
-			font-size: 36rpx;
-		}
-		.button2{
-			background-color: #1677FF 
-		}
-	}
-</style>

+ 0 - 159
pages/task/infoTask.vue

@@ -1,159 +0,0 @@
-<template>
-	<view  class="jpmain  ">
-		<u-navbar  title="故障详情" title-color="#101010"></u-navbar>
-		<view class="list" >
-			
-			<view class="item">
-				<view class="name">
-					地锁编号
-			
-				</view>
-				<view class="value">
-					123123123
-				</view>
-			</view>
-			<view class="item">
-				<view class="name">
-					负责人
-			
-				</view>
-				<view class="value">
-					11111111
-				</view>
-			</view>
-			<view class="item">
-				<view class="name">
-					联系电话
-			
-				</view>
-				<view class="value" style=" color:#1677FF;">
-					123123123
-				</view>
-			</view>
-		</view>
-		
-		
-		
-		<view class="list" >
-			
-			<view class="item">
-				<view class="name">
-					认领时间
-			
-				</view>
-				<view class="value">
-					123123123
-				</view>
-			</view>
-			<view class="item">
-				<view class="name">
-					负责人
-			
-				</view>
-				<view class="value">
-					11111111
-				</view>
-			</view>
-			
-		</view>
-		
-		
-		
-		<view class="list" >
-			<view class="item">
-				<view class="name">
-					处理时间
-			
-				</view>
-				<view class="value">
-					123123123
-				</view>
-			</view>
-			<view class="item">
-				<view class="name">
-					处理结果
-			
-				</view>
-				<view class="value">
-					123123123
-				</view>
-			</view>
-			<view class="item">
-				<view class="name">
-					现场照片
-			
-				</view>
-				<view class="value">
-					11111111
-				</view>
-			</view>
-			
-		</view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-.jpmain{padding-bottom: 120rpx;}
-.list{
-		background-color: rgba(255,255,255,1);
-		
-		margin: 20rpx 0;
-		.item:not(:last-child) {
-		  border-bottom:1px solid rgba(232,232,232,1);
-		}
-		.item{
-			padding: 32rpx;
-			display: flex;
-			    justify-content: space-between;
-			.name{
-				    width: 40%;
-					font-size: 32rpx;
-					color: #777777;
-					span{
-						color:red
-					}
-					white-space: pre;
-			}
-			.value{
-				font-size: 32rpx;
-				    width: 60%;
-				display: flex;
-				    justify-content: space-between;
-					input::placeholder{
-						color:#AAAAAA;
-					}
-					.img{
-						width: 40rpx;
-						height: 40rpx;
-						
-					}
-					.textarea{
-						background-color: rgba(241,242,245,1);
-						width: 100%;
-						border-radius: 4px;
-					}
-					
-			}
-		}
-		.item-plus{
-			flex-direction: column;
-			.value,.name{
-				   width: 100%;
-			}
-			.name{
-				    padding-bottom: 32rpx;
-			}
-		}
-	}
-</style>

+ 0 - 19
pages/task/maintenanceTaksStatus.vue

@@ -1,19 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>