wy 1 năm trước cách đây
mục cha
commit
87820a0b48

+ 2 - 0
components/PublicDrawer/PublicDrawer.vue

@@ -36,6 +36,8 @@
 				else if(this.title == '编辑车牌'){
 					//修改车牌号
 					this.$emit('HandleEditPlate')
+				}else if(this.title == '充电设置'){
+					
 				}
 			},
 			close(){

+ 5 - 5
pages/equipment-monitoring/components/BatteryCharger.vue

@@ -4,10 +4,10 @@
 			<view class="battery_title">
 				<view class="first">
 					<image class="img" src="../../../static/equipment/cangwei.png" />
-					</image><text class="p"> {{chargerCode}}号充电机</text>
-					<view :class="[buttonState[0],buttonState === 1?'is-disabled':'']" @click.stop="sendCharger">
+					</image><text class="p"> {{chargerCode}}号仓位充电机</text>
+					<!-- <view :class="[buttonState[0],buttonState === 1?'is-disabled':'']" @click.stop="sendCharger">
 						{{buttonState === 1 ?'不可操作':buttonState[1]}}
-					</view>
+					</view> -->
 				</view>
 			</view>
 			<view :class="statustext[1]">{{statustext[0]}}</view>
@@ -123,10 +123,10 @@
 
 		view {
 			line-height: 32px;
-			font-size: 14px;
+			font-size: 18px;
 			font-weight: 600;
 			height: 32px;
-			width: 200px;
+			width: 185px;
 			text-align: center;
 		}
 

+ 10 - 9
pages/equipment-monitoring/components/BatteryStatus.vue

@@ -1,11 +1,11 @@
 <template>
     <view>
-        <view class="communication">
+        <!-- <view class="communication">
             <view><image class="cangwei" src="../../../static/equipment/cangwei.png" /><text class="storeCode_num">{{storeCode}}号仓位</text></view>
             <view :class="statustext[1]">{{statustext[0]}}</view>
-        </view>
+        </view> -->
         <view class="battery-number">
-            <text>电池编号</text><text>{{sn}}</text>
+            <text>电池编号</text><text>{{sn ||'-'}}</text>
         </view>
         <view class="percent">
             <view><text>{{soc}}</text></view>
@@ -18,7 +18,7 @@
             </view>
             <view class="power-text">
                 <text>电池电量</text>
-                <text>预计 <em>{{chgEstimatedTime}}</em> 分钟后充满</text>
+                <text v-if="showCode ==0">预计 <em>{{chgEstimatedTime}}</em> 分钟后充满</text>
             </view>
         </view>
     </view>
@@ -27,7 +27,7 @@
 <script>
 export default {
     name: "BatteryStatus",
-    props:['storeCode','comState','sn','chgEstimatedTime','soc'],
+    props:['storeCode','comState','sn','chgEstimatedTime','soc','showCode'],
     computed:{
         statustext(){
             if(this.comState===1){
@@ -93,12 +93,13 @@ export default {
 .battery-number {
     margin-top: 10px;
     display: flex;
-
-    :last-child {
+	color: #414A63;
+    text:last-child {
         color: white;
-        padding-left: 10px;
+        padding-right: 10px;
         font-size: 14px;
-        font-weight: 600;
+        font-weight: 600;
+		margin-left: 10px;
     }
 }
 

+ 135 - 17
pages/equipment-monitoring/components/StorageInfo.vue

@@ -1,24 +1,53 @@
 <template>
     <view class="storage-item" >
-        <view class="container">
+        <view class="container">
+			<view class="container-header">
+				<view class="battery" :class="showCode ==0?'showCodeActive':''" @click="showCode = 0">
+					电池(有)
+				</view>
+				<view class="a-gun battery" :class="showCode ==1?'showCodeActive':''" @click="showCode = 1">
+					A枪
+				</view>
+				 <view class="b-gun battery" :class="showCode ==2?'showCodeActive':''" @click="showCode = 2">
+					B枪
+				</view> 
+			</view>
+			<view class="container-code">
+				<view class="container-code-one">
+					通讯正常
+				</view>
+				<view class="container-code-two">
+					<image src="../../../static/equipment/d5.png" mode=""></image>
+					<image src="../../../static/equipment/c1.png" mode=""></image>
+				</view>
+				
+			</view>
             <BatteryStatus
             :storeCode="storeCode"
             :comState="comState"
             :sn="sn"
             :soc="soc"
-            :chgEstimatedTime="chgEstimatedTime"
+            :chgEstimatedTime="chgEstimatedTime"
+			:showCode="showCode"
             ></BatteryStatus>
-            <view class="battery-info">
+         <view class="battery-info">
+				<view class="vim" v-if="showCode != 0">
+					<text>vin码</text><text>123456789</text>
+				</view>
                 <BatteryInfo :num="current" unit="A" text="电流"></BatteryInfo>
-                <BatteryInfo :num="voltage" unit="V" text="电压"></BatteryInfo>
-                <BatteryInfo :num="minTemperature" unit="℃" text="最低温度"></BatteryInfo>
+                <BatteryInfo :num="voltage" unit="V" text="电压"></BatteryInfo>
+				<BatteryInfo :num="soh" unit="%" text="SOH" v-if="showCode == 0"></BatteryInfo>
+				<view class="info-right" :style="chargerColor">
+				     <image class="s1" :src="require('../../../static/equipment/'+`s${chargerState[0]}`+'.png')"><text>{{chargerState[1]}}</text>
+				 </view>
+                <!--  <BatteryInfo :num="minTemperature" unit="℃" text="最低温度"></BatteryInfo>
                 <BatteryInfo :num="maxTemperature" unit="℃" text="最高温度"></BatteryInfo>
                 <BatteryInfo :num="maxCellVoltage" unit="V" text="最高单体电压"></BatteryInfo>
                 <BatteryInfo :num="minCellVoltage" unit="V" text="最低单体电压"></BatteryInfo>
-                <BatteryInfo :num="soh" unit="%" text="SOH"></BatteryInfo>
-                <view class="info-right">
-                    <image class="s1" src="../../../static/equipment/s1.png"><text class="text">{{StateNum}}</text>
+                <view class="info-right">
+                    <image class="s1" src="../../../static/equipment/s1.png"><text class="text">{{StateNum}}</text>
                 </view>
+                 -->
             </view>
             <view class="battery-charger">
                 <BatteryCharger
@@ -34,10 +63,16 @@
                     <BatteryInfo :num="chargerInfoVo.chgCurrent" unit="A" text="充电电流"></BatteryInfo>
                     <BatteryInfo :num="chargerInfoVo.chgVoltage" unit="V" text="充电电压"></BatteryInfo>
                     <BatteryInfo :num="chargerInfoVo.chgCapacity" unit="kWh" text="累计充电电量"></BatteryInfo>
-                    <view class="info-right" :style="chargerColor">
-                        <image class="s1" :src="require('../../../static/equipment/'+`s${chargerState[0]}`+'.png')"><text>{{chargerState[1]}}</text>
-                    </view>
-                </view>
+                   
+                </view>
+				<view class="battery-charger-btn">
+					<view class="Plug-gun-charging">
+						插枪充电
+					</view>
+					<view class="Settings Plug-gun-charging" @click="set">
+						设置
+					</view>
+				</view>
                 <image src="../../../static/equipment/nodata.png" class="nodata" v-show="!chargerInfoVo.chargerCode">
             </view>
         </view>
@@ -72,9 +107,15 @@ export default {
         BatteryCharger
     },
     data(){
-        return{
+        return{
+			showCode:0,//0电池1A枪2B枪
         }
-    },
+    },
+	methods:{
+		set(){
+			this.$emit('drawer')
+		}
+	},
     computed:{
         chargerState(){
             if(this.chargerInfoVo.chgState === 1){
@@ -129,12 +170,69 @@ export default {
             padding: 20px 24px;
             color: #404a63;
             font-size: 14px;
-            
+            .container-header{
+				display: flex;
+				.battery{
+					width: 112px;
+					height: 32px;
+					background: #1C263A;
+					color: #DEEFF9;
+					line-height: 32px;
+					text-align: center;
+					margin-bottom: 10px;
+				}
+				.a-gun{
+					width: 78px;
+					margin-left: 12px;
+				}
+				.b-gun{
+					width: 78px;
+					margin-left: 12px;
+				}
+				.showCodeActive{
+					background-color: #636C97;
+				}
+			}
+			.container-code{
+				display: flex;
+				margin-bottom: 10px;
+				justify-content: space-between;
+				.container-code-one{
+					font-size: 16px;
+					color: #91FDB9;
+				}
+				.container-code-two{
+					display: flex;
+					image{
+						width: 60px;
+						height: 24px;
+					}
+					image:first-child{
+						margin-right: 20px;
+					}
+				}
+			}
             .battery-info{
                 display: flex;
                 margin-top: 16px;
                 justify-content: space-between;
-                flex-wrap: wrap;
+                flex-wrap: wrap;
+				margin-bottom: 20px;
+				min-height: 116px;
+				.vim{
+					width: 100%;
+					margin: 0px 0px 12px 0px;
+					text{
+						font-size: 14px;
+						color: #414A63;
+					}
+					text:last-child{
+						display: inline-block;
+						margin-left: 10px;
+						font-weight: 600;
+						color: #fff;
+					}
+				}
                 .info-right{
                     width: 46%;
                     height: 32px;
@@ -177,7 +275,27 @@ export default {
                     height: 66px;
                 }
             }
-        }
+        }
+		.battery-charger-btn{
+			display: flex;
+			    position: absolute;
+			    bottom: 20px;
+			.Plug-gun-charging{
+				width: 135px;
+				height: 32px;
+				background: #69B889;
+				text-align: center;
+				line-height: 32px;
+				font-size: 16px;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 500;
+				color: #DEEFF9;
+			}
+			.Settings{
+				background: #636C97;
+				margin-left: 20px;
+			}
+		}
     }
 	
 </style>

+ 80 - 31
pages/equipment-monitoring/components/batteryDrawe.vue

@@ -1,44 +1,93 @@
-<template>
-	<view>
+<template>
+	<view>
 		<uni-forms :modelValue="infodata">
-			<uni-forms-item label="连接状态:" name="name" label-align="right" label-width="120px">
-				<uni-easyinput type="text" v-model="infodata.comState?'通讯正常':'通讯异常' || '-'" placeholder="请输入" disabled/>
+			<uni-forms-item label="当前充电:" name="name" label-align="right" label-width="120px">
+				<uni-easyinput type="text" v-model="infodata.comState?'通讯正常':'通讯异常' || '-'" placeholder="请输入"
+					disabled />
 			</uni-forms-item>
-			<uni-forms-item label="电池编号:" name="name" label-align="right" label-width="120px">
-				<uni-easyinput type="text" v-model="infodata.sn || '-'" placeholder="请输入" disabled/>
+			<uni-forms-item label="枪号:" name="arr" label-width="120px" label-align="right" >
+				<uni-data-select v-model="pppp" :localdata="infodata.arr" @change="changeId"></uni-data-select>
 			</uni-forms-item>
-			<uni-forms-item label="SOC:" name="name" label-align="right" label-width="120px">
-				<uni-easyinput type="text" v-model="infodata.soc || '-'" placeholder="请输入" disabled/>
+		<uni-forms-item label="按类型设置:" name="arr" label-width="120px" label-align="right" >
+			<uni-data-select v-model="pppp" :localdata="infodata.arr" @change="changeId"></uni-data-select>
+		</uni-forms-item>
+			<uni-forms-item label="充电功率:" name="name" label-align="right" label-width="120px">
+				<uni-easyinput type="text" v-model="infodata.soh || '-'" placeholder="请输入"  />
+				<view class="kwh">
+					KWH
+				</view>
 			</uni-forms-item>
-			<uni-forms-item label="SOH:" name="name" label-align="right" label-width="120px">
-				<uni-easyinput type="text" v-model="infodata.soh || '-'" placeholder="请输入" disabled/>
-			</uni-forms-item>
-		</uni-forms>
-	</view>
-</template>
-
-<script>
-export default {
-	name:'batteryDrawe',
-	props:['infodata'],
-	data() {
-		return {
-		
-		}
-	},
-	}
-
-	
+		</uni-forms>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'batteryDrawe',
+		// props: ['infodata'],
+		data() {
+			return {
+				pppp:'',
+				infodata:{
+					arr:[{
+						text:'a枪',
+						value:'0'
+					},{text:'b枪',
+						value:'1'}],
+					soh:1,
+					comState:1
+				},
+				fromData:{
+					
+				}
+				
+			}
+		},
+		methods:{
+			changeId(){
+				console.log(123)
+			}
+		}
+	}
 </script>
 <style lang="scss" scoped>
-	::v-deep .uni-forms-item__content{
-		background: rgba(255,255,255,0);
+	::v-deep .uni-forms-item__content {
+		background: rgba(255, 255, 255, 0);
 		border-radius: 2px 2px 2px 2px;
 		border: 1px solid #263042;
-		.uni-easyinput__content{
+
+		.uni-easyinput__content {
 			background: none !important;
 			border: none !important;
 			color: #fff;
 		}
 	}
-</style>
+
+	.kwh {
+		width: 50px;
+		height: 35px;
+		background: #263042;
+		font-size: 14px;
+		font-weight: 400;
+		color: #4C5D71;
+		line-height: 35px;
+		position: absolute;
+		right: 0;
+		top: 0px;
+	}
+	::v-deep .uni-select__selector{
+		background: #111827;
+		border:1px solid #263042;
+		color: #606266;
+		z-index: 9999999;
+	}
+	::v-deep .uni-select{
+		border: none;
+	}
+	::v-deep .uni-popper__arrow::after{
+		display: none;
+	}
+	::v-deep .uni-popper__arrow{
+		display: none;
+	}
+</style>

+ 11 - 11
pages/equipment-monitoring/components/manual.vue

@@ -7,8 +7,8 @@
 		</view>
 		<view class="box_swiper">
 			<scroll-view scroll-x="true" class="scroll_x">
-				<view v-for="(item, index) in storeInfoLists" :key="index" @click="drawer(item,index)">
-					<StorageInfo :store-code="item.storeCode" :com-state="item.comState" :sn="item.sn" :soc="item.soc"
+				<view v-for="(item, index) in storeInfoLists" :key="index"> <!-- @click="drawer(item,index)"-->
+					<StorageInfo :store-code="item.storeCode" :com-state="item.comState" :sn="item.sn" :soc="item.soc" @drawer="drawer(item,index)"
 						:chg-estimated-time="item.chargerInfoVo.chgEstimatedTime" :current="item.current"
 						:voltage="item.voltage" :min-temperature="item.minTemperature"
 						:max-temperature="item.maxTemperature" :max-cell-voltage="item.maxCellVoltage" index
@@ -22,21 +22,21 @@
 			<!--右侧抽屉 -->
 			<uni-drawer ref="showRight" mode="right" :width="400" :mask-click="true" @change='changemask'>
 				<scroll-view style="height: 100%;" scroll-y="true">
-					<PublicDrawer :flag="true" :title="titlenum" @closeDrawer="closeDrawer">
-						<view class="header_drawer_btn">
+					<PublicDrawer :flag="false" :title="titlenum" @closeDrawer="closeDrawer">
+						<!-- <view class="header_drawer_btn">
 							<view class="header_drawer_btn_left" :class="batteryInfoActive == 0?'active':''" @click="batteryInfoActive = 0">
 								电池
 							</view>
 							<view class="header_drawer_btn_right" :class="batteryInfoActive == 1?'active':''" @click="batteryInfoActive = 1">
 								充电机
 							</view>
-						</view>
-						<view class="drawer_main">
-							<view v-if="!batteryInfoActive">
+						</view> -->
+						<!-- <view class="drawer_main">
+							<view v-if="!batteryInfoActive"> -->
 								<batteryDrawe :infodata="infodata"></batteryDrawe>
-							</view>
+							<!-- </view>
 							<view v-if="batteryInfoActive"><chargerDrawe :infodata="infodata"></chargerDrawe></view>
-						</view>
+						</view> -->
 					</PublicDrawer>
 				</scroll-view>
 			</uni-drawer>
@@ -66,7 +66,7 @@
 			return {
 				isSlecte: true,
 				box_num: -1, //记录选中了第几个
-				titlenum: 0, //几号仓位
+				titlenum: '充电设置', //抽屉标题
 				batteryInfoActive:1,//0代表电池1代表充电机
 				infodata:{},//详情数据
 			}
@@ -78,7 +78,7 @@
 			//抽屉
 			drawer(item, index) {
 				this.box_num = index;
-				this.titlenum = item.storeCode + '号仓充电详情'
+				// this.titlenum = item.storeCode + '号仓充电详情'
 				this.$refs.showRight.open();
 				this.infodata = item;
 				console.log(item, index, 'item')

BIN
static/equipment/c1.png


BIN
static/equipment/c2.png


BIN
static/equipment/d5.png


BIN
static/equipment/d6.png