zhangsijie 1 سال پیش
والد
کامیت
8f46ad1b62

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "云飞智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.8.2",
-    "versionCode" : 182,
+    "versionName" : "1.8.4",
+    "versionCode" : 184,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 58 - 10
pages/cb/cbd/equip-set/imgpage.vue

@@ -7,16 +7,16 @@
 					@clickRight="clickRight"></uni-nav-bar>
 			</view>
 			<p class="tishi" v-if="tishi">暂无数据</p>
-			<u-select v-model="modelPicker" mode="single-column" @confirm="confirmModel"
+			<u-select v-model="modelPicker" mode="single-column" @confirm="confirmModel" v-if="device_type != 7"
 				:default-value="[identify_model]" :list="modelList"></u-select>
-			<view class="schedule" @click="modelPicker=!modelPicker">
+			<view class="schedule" @click="modelPicker=!modelPicker" v-if="device_type != 7">
 				<p class="schedule_value">{{modelList[identify_model].label}}</p>
 				<!-- {{titletext[indexone]}} -->
 				<p class="schedule_icon">
 					<u-icon name="arrow-down"></u-icon>
 				</p>
 			</view>
-			<view class="selecttimes" @click="tiemshow=!tiemshow">
+			<view :class="`selecttimes ${device_type == 7 ? 'bigSelect' : ''}`" @click="tiemshow=!tiemshow">
 				<view class="timesbox">
 					<image
 						:src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
@@ -131,6 +131,28 @@
 					this.tishi = false
 				}
 			},
+			// 孢子仪的图片列表
+			async imglistdataBzy(time_begin, time_end) { //获取图片列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
+					data: {
+						device_id: this.device_id,
+						page: this.page,
+						ret: "list",
+						page_number: 12,
+						// identify_model: this.modelList[this.identify_model].value,
+						time_begin: time_begin, //开始时间
+						time_end: time_end, //结束时间
+					}
+				})
+				this.imglists = this.imglists.concat(res.data)
+				console.log(this.imglists)
+				if (this.imglists.length == 0) {
+					this.tishi = true
+				} else {
+					this.tishi = false
+				}
+			},
 			//forecast.forecast_system.equip_photo_del
 			async del(id) { //删除图片
 				var arr = [id]
@@ -148,7 +170,12 @@
 					});
 					this.page = 1
 					this.imglists = []
-					this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+					if(this.device_type == 7) {
+						this.imglistdataBzy(parseInt(this.timestate), parseInt(this.timeend))
+					} else {
+						this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+					}
+					// this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
 				} else {
 					uni.showToast({
 						title: '指令下发失败!',
@@ -178,7 +205,12 @@
 					});
 					var that = this
 					setTimeout(() => {
-						that.imglistdata(parseInt(that.timestate), parseInt(that.timeend))
+						if(that.device_type == 7) {
+							that.imglistdataBzy(parseInt(that.timestate), parseInt(that.timeend))
+						} else {
+							that.imglistdata(parseInt(that.timestate), parseInt(that.timeend))
+						}
+						// that.imglistdata(parseInt(that.timestate), parseInt(that.timeend))
 					}, 1000)
 				} else {
 					uni.showToast({
@@ -250,8 +282,13 @@
 				this.page = 1
 				console.log(e)
 				this.timestate = +new Date(e.startDate) / 1000 - 8 * 60 * 60
-				this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60
-				this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+				this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60;
+				if(this.device_type == 7) {
+					this.imglistdataBzy(parseInt(this.timestate), parseInt(this.timeend))
+				} else {
+					this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+				}
+				// this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
 			},
 			timetab(e) {
 				e = new Date(e * 1000)
@@ -279,7 +316,11 @@
 			this.disable = option.disable
 			this.device_type = option.device_type
 			console.log(this.timestate)
-			this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+			if(this.device_type == 7) {
+				this.imglistdataBzy(parseInt(this.timestate), parseInt(this.timeend))
+			} else {
+				this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+			}
 		},
 		onShow() {
 
@@ -287,7 +328,11 @@
 		onReachBottom() {
 			this.page++
 			console.log(this.timestate)
-			this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+			if(this.device_type == 7) {
+				this.imglistdataBzy(parseInt(this.timestate), parseInt(this.timeend))
+			} else {
+				this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
+			}
 		},
 		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
 			if (e.scrollTop > 200) { //距离大于200时显示
@@ -344,7 +389,6 @@
 			}
 		}
 	}
-
 	.selecttimes {
 		width: 65%;
 		position: fixed;
@@ -387,6 +431,10 @@
 		}
 	}
 
+	
+	.bigSelect{
+		width: 100%;
+	}
 	.timeshow {
 		width: 96%;
 		height: 50rpx;

+ 44 - 26
pages/waterandfernew/details.vue

@@ -126,24 +126,24 @@
 					</view>
 					<!-- 注肥泵 -->
 					<view class="feiLight"
-						@click="switchchange(!feiBeng, facilityvalve[feiBengIndex].number, facilityvalve[feiBengIndex], feiBengIndex)">
-						<image v-if="feiBeng" src="../../static/images/waterandfernew/feiAllopen.png"></image>
+						@click="switchchange(!feiBengItem.e_status, feiBengItem.number, feiBengItem, feiBengIndex)">
+						<image v-if="feiBengItem.e_status" src="../../static/images/waterandfernew/feiAllopen.png"></image>
 						<image v-else src="../../static/images/waterandfernew/feiAllclose.png"></image>
 					</view>
 					<!-- 控制柜 -->
 					<view class="kongBox">
-						<image v-if="feiBeng" src="../../static/images/waterandfernew/kongclose.png"></image>
+						<image v-if="feiBengItem.e_status" src="../../static/images/waterandfernew/kongclose.png"></image>
 						<image v-else src="../../static/images/waterandfernew/kongopen.png"></image>
 					</view>
 					<!-- 进水泵 -->
 					<view class="warterIn"
-						@click="switchchange(!mainBeng, facilityvalve[mainBengIndex].number, facilityvalve[mainBengIndex], mainBengIndex)">
-						<image v-if="mainBeng" src="../../static/images/waterandfernew/feiopen.png"></image>
+						@click="switchchange(!mainBengItem.e_status, mainBengItem.number, mainBengItem, mainBengIndex)">
+						<image v-if="mainBengItem.e_status" src="../../static/images/waterandfernew/feiopen.png"></image>
 						<image v-else src="../../static/images/waterandfernew/feiclose.png"></image>
 					</view>
 					<!-- 进水指示 -->
 					<view class="warterLight">
-						<image v-if="mainBeng" src="../../static/images/waterandfernew/bengopen.png"></image>
+						<image v-if="mainBengItem.e_status" src="../../static/images/waterandfernew/bengopen.png"></image>
 						<image v-else src="../../static/images/waterandfernew/bengclose.png"></image>
 					</view>
 					<!-- 电风扇 -->
@@ -235,10 +235,13 @@
 					fontSize: "12px"
 				},
 				device_id: '',
+				mainBengEKey: '',
 				mainBengIndex: 0, // 进水泵的位置
+				mainBengItem:{},
 				mainBeng: false,
 				feiBeng: false,				
-				feiBengIndex: 0, // 施肥泵的位置
+				feiBengItem: {}, // 施肥泵的位置
+				feiBengEKey:'',
 				calendarshow: false,
 				historyTime: {},
 				cWidth: '350',
@@ -285,7 +288,7 @@
 					this.facilityvalve[changeIndex].disabled = false;
 					this.getEquipstatus()
 					this.timer = null; // 清空定时器引用
-				}, 15000);
+				}, 20000);
 			},
 			// 选择日期
 			changeDate(e) {
@@ -527,12 +530,16 @@
 							let pickObj = Object.assign(pick,item);
 							if(pick.e_type == 2) {
 								this.mainBengIndex = pickList.length;
-								this.mainBeng = pickObj.off;
+								this.mainBengItem = pickObj;
+								this.mainBeng = pickObj.e_status;
+								this.mainBengEKey = pickObj.e_key;
 							}
 							// 获取当前施肥泵位置
 							if(pick.e_type == 4) {
 								this.feiBengIndex = pickList.length;
-								this.feiBeng = pickObj.off;
+								this.feiBengItem = pickObj;
+								this.feiBeng = pickObj.e_status;
+								this.feiBengEKey = pickObj.e_key;
 							}
 							// 获取肥料开关列表
 							if(pick.e_type == 6) {
@@ -651,15 +658,21 @@
 				this.getPickList();
 				console.log(this.facilityvalve)
 			},
-			async getEquipcontrol(num, state, double_order) {
+			async getEquipcontrol(num, state, double_order, item) {
 				//设备控制
+				console.log({
+						device_id: item.cc_device_id == '' ? this.device_id : item.cc_device_id,
+						relayNum: num,
+						relayState: state,
+						double_order
+					});
 				uni.showLoading({
 					title: '正在下发指令'
 				});
 				let res = await this.$myRequest({
 					url: "/api/api_gateway?method=xphsp.views.control_order",
 					data: {
-						device_id: this.device_id,
+						device_id: item.cc_device_id == '' ? this.device_id : item.cc_device_id, // 判断当前阀门是不是控制柜 如果是控制柜 则传控制柜ID
 						relayNum: num,
 						relayState: state,
 						double_order
@@ -736,28 +749,33 @@
 				// 是否是肥料开关,是的话 两个合并为一个
 				item.disabled = true;
 				if (isfeiButton) {
-					item.off = e;
+					// console.log(item, this.mainBengEKey, this.feiBengEKey)
 					this.changeTimeStatus(item, index);
 					// 当前是打开
-					if (e) {
+					if (!item.e_status) {
 						// 打开通道传1,关闭通道传0
-						this.getEquipcontrol(state, 1, 1);
+						this.getEquipcontrol(state, 1, 1, item);
 						// this.getEquipcontrol(state + 1, 0);
 					} else {
 						// this.getEquipcontrol(state + 1, 0);
-						this.getEquipcontrol(state, 0, 1);
+						this.getEquipcontrol(state, 0, 1, item);
 					}
+					item.off = !item.off;
+					item.e_status = !item.e_status;
 					return
 				}
-				item.off = e;
-				if (item.type == 'j10') {
-					// 判断注水泵是否打开
-					this.mainBeng = e;
-				}
-				if (item.type == 'j9') {
-					// 判断施肥阀是否打开
-					this.feiBeng = e;
-				}
+				item.off = !item.off;
+				item.e_status = !item.e_status;
+				// if (item.type == this.mainBengEKey) {
+				// 	// 判断注水泵是否打开
+				// 	this.mainBeng = !item.e_status;
+				// 	// console.log(this.mainBeng);
+				// }
+				// if (item.type == this.feiBengEKey) {
+				// 	// 判断施肥阀是否打开
+				// 	this.feiBeng = !item.e_status;
+				// }
+				// console.log(item, this.mainBengEKey, this.feiBengEKey)
 				// if (this.colomRoundList.indexOf(item.type) > -1) {
 				//   let changeIndex = index;
 				//   if ((index + 1) % 2 == 0) {
@@ -777,7 +795,7 @@
 				item.disabled = true;
 				this.changeTimeStatus(item, index);
 				//console.log(Number(e), state);
-				this.getEquipcontrol(state, Number(e));
+				this.getEquipcontrol(state, Number(e), undefined, item);
 			},
 			currentchange(e) {
 				//页码

BIN
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://app.liuyingyong.cn/build/download/f5d0fc10-0b87-11ef-9cf2-2545b78b5ad2
+https://app.liuyingyong.cn/build/download/748867d0-0de6-11ef-b96e-4de533c7e0a0

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
unpackage/cache/apk/cmManifestCache.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 3
unpackage/cache/wgt/__UNI__DBA6730/app-service.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-view.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/manifest.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 3
unpackage/dist/build/app-plus/app-service.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json