zhengkaixin 3 mesiacov pred
rodič
commit
0422015ac2
2 zmenil súbory, kde vykonal 108 pridanie a 29 odobranie
  1. 20 0
      apis/pagejs/deviceTab.js
  2. 88 29
      pages/deviceTab/dataLock.vue

+ 20 - 0
apis/pagejs/deviceTab.js

@@ -26,6 +26,26 @@ export function floorlockList(data) {
 export function parkingList(data) {
 	var url='/mobile/sysUser/parkingList';
 	
+	return requestWhite({
+		method: 'POST',
+		data: data,
+		url: url
+	})
+}
+
+
+export function lockDetails(data) {
+	var url='/mobile/sysUser/lockDetails';
+	
+	return requestWhite({
+		method: 'POST',
+		data: data,
+		url: url
+	})
+}
+export function operateFloorlock(data) {
+	var url='/mobile/sysUser/operateFloorlock';
+	
 	return requestWhite({
 		method: 'POST',
 		data: data,

+ 88 - 29
pages/deviceTab/dataLock.vue

@@ -10,25 +10,30 @@
 		<view class="main">
 			<view class="statistics ">
 				<view class="data1">
-					<view class="item">
-						<view class="name">
-							A110
-						</view>
-						<view class="item-tags">
-							<view class="tag tag1">
-								公共车位
-
-							</view>
-							<view class="tag">
-								在线
-
-							</view>
-							<view class="tag">
-								空闲
-							</view>
+					<view class="item">
+						<view class="line">
+							<view class="name">
+								{{info.name}}
+							</view>
+							<view class="item-tags">
+								<view class="tag tag1" :class="'typeN typeN'+info.type">
+									{{info.typeN}}
+							
+								</view>
+								<view class="tag" :class="'statusN statusN'+info.status">
+									{{info.statusN}}
+							
+								</view>
+								<view class="tag" :class="'lockStatusN lockStatusN'+info.lockStatus">
+									{{info.lockStatusN}}
+								</view>
+							</view>
+						</view>
+						<view class="line">
+							编号:{{info.lockNo}}
 						</view>
 					</view>
-					<view class="value">
+					<view class="value" v-if="0">
 						<u-button type="primary" size="mini" shape="circle">
 							<img class="img" src="@/assets/img/button/lock.svg" alt="">
 							降锁
@@ -442,14 +447,17 @@
 <script>
 	import jpContent from '@/components/JPcontent.vue'
 	import * as echarts from 'echarts';
-
+	import * as API from '@/apis/pagejs/deviceTab.js'
+	
 	export default {
 		components: {
 
 			jpContent
 		},
 		data() {
-			return {
+			return {
+				id:"",
+				info:{},
 				echartsList: {},
 				jpContentMap: {
 					body1: 2,
@@ -463,7 +471,7 @@
 					body9: 2,
 					body10: 2,
 				},
-				title: "软件园",
+				title: "",
 				backgroundObj: {
 					background: '#307AF6'
 				},
@@ -508,18 +516,48 @@
 				],
 			};
 		},
-		onLoad() {
-
+		onLoad(op) {
+			if(op.id){
+				this.id=op.id
+			}
 		},
-		onReady() {
-			this.init();
+		onReady() {
+			if(this.id){
+				this.init();
+			}
+			
 		},
 		methods: {
-			init() {
+			init() {
+				this.getInfo()
 				this.getbody1()
 				this.getbody2()
 				this.getbody3()
 				this.getbody4()
+			},
+			getInfo(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var obj = {
+					id: this.id
+				}
+							
+				API.lockDetails(obj).then((res) => {
+					this.info = res.data.floorlockInfo
+					this.title	=this.info.parkingName
+					uni.hideLoading();
+					
+					//this.getWhiteList()
+				}).catch(error => {
+							
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
 			},
 			getbody1() {
 				var key = "body1pie1"
@@ -866,11 +904,16 @@
 		align-items: center;
 		justify-content: space-between;
 
-		.item {
+		.item {
+			.line{
+				    display: flex;
+				    align-items: center;
+			}
 			.name {
 				color: rgba(51, 51, 51, 1);
 				font-size: 36rpx;
-				font-weight: bold;
+				font-weight: bold;
+				margin-right: 8rpx;
 			}
 
 			.item-tags {
@@ -886,9 +929,25 @@
 					margin-right: 8rpx;
 				}
 
-				.tag1 {
+				.typeN1 {
 					background-color: rgba(22, 119, 255, 1);
-				}
+				}
+				.typeN2{
+					background-color: #8161ff;
+																				 background-color: #8161ff;
+				}
+				.statusN{
+					background-color:#838383
+				}
+				.lockStatusN {
+				
+					background-color: rgba(153, 153, 153, 1);
+				}
+				
+				.lockStatusN2 {
+					background-color: #03A9F4
+				}
+				
 			}
 		}