Parcourir la source

设置充电功率

蒋科 il y a 4 mois
Parent
commit
598f13ec54

+ 4 - 4
config.js

@@ -1,8 +1,8 @@
 export default {
 	web_name: "智小狸",
-	// uni_app_web_api_url: "http://10.12.31.76:8080/api", //后端统一接口路径
-	// web_socket_url:'ws://10.12.31.76:8080/ws/',
-	uni_app_web_api_url: "http://192.168.0.50:8080/api",
-	web_socket_url:'ws://192.168.0.50:8080/ws/',
+	// uni_app_web_api_url: "http://10.12.22.137:8080/api", //后端统一接口路径
+	// web_socket_url:'ws://10.12.22.137:8080/ws/',
+	uni_app_web_api_url: "http://192.168.3.177:8080/api",
+	web_socket_url:'ws://192.168.3.177:8080/ws/',
 	debug: true
 }

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智能换电",
     "appid" : "__UNI__A9957B4",
     "description" : "",
-    "versionName" : "2.0.0",
+    "versionName" : "2.0.1",
     "versionCode" : 200,
     "transformPx" : false,
     "networkTimeout" : {

+ 6 - 1
pages/equipment-monitoring/components/StorageInfo.vue

@@ -206,13 +206,18 @@
 		},
 
 		methods: {
+			//传给父组件的showCode
+			getShowCode(){
+				this.$emit('getShowCode',this.showCode)
+			},
 			//页面切换
 			actshowCode(code) {
 				this.showCode = code;
 				this.Markers = 1
 			},
 			//打开弹窗
-			set() {
+			set(obj) {
+			  this.getShowCode()
 			  this.$emit('drawer')
 			},
 			//切换仓内仓外

+ 7 - 9
pages/equipment-monitoring/components/batteryDrawe.vue

@@ -13,15 +13,15 @@
 			<uni-forms :modelValue="fromData">
 				<view class="chargeAway">充电方式【{{fromData.chargerAway}}】</view>
 				<view class="chargeCont">
-					<view class="gunleft">
-						<view class="gun">A</view>
+					<view class="gunleft" v-if="infodata.showCode==2 && infodata.chgType==1">
+						<view class="gun">B</view>
 						<view class="power">
 							<view>{{$checks.powerFitler(fromData.powerObj.powerType)}}</view>
 							<view>{{fromData.powerObj.power?fromData.powerObj.power+'kW':'—'}}</view>
 						</view>
 					</view>
-					<view class="gunleft" v-if="fromData.powerObj.type===4 || fromData.powerObj.type===2">
-						<view class="gun">B</view>
+					<view class="gunleft" v-else>
+						<view class="gun">A</view>
 						<view class="power">
 							<view>{{$checks.powerFitler(fromData.powerObj.powerType)}}</view>
 							<view>{{fromData.powerObj.power?fromData.powerObj.power+'kW':'—'}}</view>
@@ -109,13 +109,11 @@
 			//获取充个设置数据
 			getChargePower(){
 				let type=null
-				  if(this.infodata.chargerInfoVo.chgState===2){
+				  if(this.infodata.chgType==0){
 					type=1
-				  }else if(this.infodata.chargerInfoOneVo.chgState===2 && this.infodata.chargerInfoTwoVo.chgState===2){
-					type=2
-				  }else if(this.infodata.chargerInfoOneVo.chgState===2 && this.infodata.chargerInfoTwoVo.chgState!==2){
+				  }else if(this.infodata.chgType==1 && this.infodata.showCode==1){
 					type=3
-				  }else if(this.infodata.chargerInfoOneVo.chgState!==2 && this.infodata.chargerInfoTwoVo.chgState===2){
+				  }else if(this.infodata.chgType==1 && this.infodata.showCode==2){
 					type=4
 				  }
 				this.$http.getChargePower({chargerId:this.infodata.chargerInfoVo.chargerCode,type}).then(res=>{

+ 8 - 2
pages/equipment-monitoring/components/manual.vue

@@ -10,7 +10,7 @@
 				<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"
+						@drawer="drawer(item,index)" @getShowCode="getShowCode" :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
 						:min-cell-voltage="item.minCellVoltage" :soh="item.soh" :store-state="item.storeState"
@@ -68,6 +68,7 @@
 				props: ['infodata'],
 				batteryInfoActive: 1, //0代表电池1代表充电机
 				infodata: {}, //详情数据
+				showCode:null,
 			}
 		},
 		mounted() {
@@ -76,10 +77,15 @@
 			},2000)
 		},
 		methods: {
+			getShowCode(data){
+				this.showCode=data
+			},
 			//抽屉
-			drawer(item, index) {
+			drawer(item,index,data) {
 				this.box_num = index;
 				this.$refs.showRight.open();
+				this.$refs.showRight
+				item.showCode=this.showCode
 				this.infodata = item;
 				console.log(item, index, 'item')
 			},