فهرست منبع

Merge branch 'master' into baixiang

yf_zhb 2 سال پیش
والد
کامیت
82b426254e
37فایلهای تغییر یافته به همراه3330 افزوده شده و 720 حذف شده
  1. 2 2
      manifest.json
  2. 96 71
      pages/cb/cbd/equip-set/analyse.vue
  3. 546 545
      pages/environment/equipment.vue
  4. 2 2
      pages/prevention/control.vue
  5. 3 2
      pages/prevention/ucharts.vue
  6. 1262 0
      pages/waterandfernew/details -新设计图无动态接入.vue
  7. 329 74
      pages/waterandfernew/details.vue
  8. 1066 0
      pages/waterandfernew/details第一版vue
  9. BIN
      static/images/waterandfernew/bengclose.png
  10. BIN
      static/images/waterandfernew/bengopen.png
  11. BIN
      static/images/waterandfernew/bottomNew.png
  12. BIN
      static/images/waterandfernew/colCenter.png
  13. BIN
      static/images/waterandfernew/colLeft.png
  14. BIN
      static/images/waterandfernew/colNew.png
  15. BIN
      static/images/waterandfernew/colRight.png
  16. BIN
      static/images/waterandfernew/exit.png
  17. BIN
      static/images/waterandfernew/feiAllclose.png
  18. BIN
      static/images/waterandfernew/feiAllopen.png
  19. BIN
      static/images/waterandfernew/feiclose.png
  20. BIN
      static/images/waterandfernew/feiopen.png
  21. BIN
      static/images/waterandfernew/kongclose.png
  22. BIN
      static/images/waterandfernew/kongopen.png
  23. BIN
      static/images/waterandfernew/mainNew.png
  24. BIN
      static/images/waterandfernew/shan.png
  25. BIN
      static/images/waterandfernew/shanannimate.png
  26. BIN
      unpackage/cache/apk/__UNI__DBA6730_cm.apk
  27. 1 1
      unpackage/cache/apk/apkurl
  28. 1 1
      unpackage/cache/apk/cmManifestCache.json
  29. 2 2
      unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js
  30. 5 5
      unpackage/cache/wgt/__UNI__DBA6730/app-service.js
  31. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-view.js
  32. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/manifest.json
  33. 2 2
      unpackage/dist/build/app-plus/app-config-service.js
  34. 5 5
      unpackage/dist/build/app-plus/app-service.js
  35. 1 1
      unpackage/dist/build/app-plus/app-view.js
  36. 1 1
      unpackage/dist/build/app-plus/manifest.json
  37. 4 4
      util/api.js

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.7.1",
-    "versionCode" : 171,
+    "versionName" : "1.7.3",
+    "versionCode" : 173,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 96 - 71
pages/cb/cbd/equip-set/analyse.vue

@@ -40,21 +40,22 @@
 				</view>
 			</view>
 			<view class="selecttimes" @click="tiemshow=!tiemshow">
-					<view class="" style="line-height: 28px;">
-						日期
-					</view>
-					<view class="timesbox">
-						<!-- <image
+				<view class="" style="line-height: 28px;">
+					日期
+				</view>
+				<view class="timesbox">
+					<!-- <image
 						:src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
 						mode=""></image> -->
-						<p>{{oldtime}}</p>
-						<p class="or">至</p>
-						<p>{{newtime}}</p>
-						<!-- <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon> -->
-					</view>
-					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
-					<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
-					<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange" :default-value="defaultValue"></u-select>
+					<p>{{oldtime}}</p>
+					<p class="or">至</p>
+					<p>{{newtime}}</p>
+					<!-- <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon> -->
+				</view>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
+				<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange"
+					:default-value="defaultValue"></u-select>
 			</view>
 			<view class="tendency">
 				<canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts" @touchstart="touchLineA($event)"
@@ -146,7 +147,7 @@
 				sp_hour_st: '00:00', // 归档开始时间
 				sp_hour_ed: '00:00', // 归档结束时间
 				timeshow: false, // 归档时间设置弹框
-				defaultValue:[0,0],
+				defaultValue: [0, 0],
 				list: [
 					[{
 							value: '00:00',
@@ -490,65 +491,86 @@
 				console.log(ringarr)
 				this.progresslist = ringarr
 			},
+			// 根据起始日期获取中间时间列表
+			getDates(startDate, endDate) {
+				var dates = [];
+				var currentDate = new Date(startDate);
+				endDate = new Date(endDate);
+
+				while (currentDate <= endDate) {
+					dates.push(currentDate.toISOString().split('T')[0].substring(5));
+					currentDate.setDate(currentDate.getDate() + 1);
+				}
+
+				return dates;
+			},
+			// 时间戳转换为月日,并以-分割,同时确保不足两位的数字补零
+			formatMonthDay(timestamp) {
+				var date = new Date(timestamp * 1000);
+				var month = (date.getMonth() + 1).toString().padStart(2, '0'); // 获取月份并补零
+				var day = date.getDate().toString().padStart(2, '0'); // 获取日期并补零
+
+				return `${month}-${day}`;
+			},
 			setlineoption() {
 				var res = this.reslist
-				var xtitle = []
 				var obj = []
-				if (res.at_ah_info.length != 0) {
-					var aharr = []
-					var atarr = []
-					var pestArr = []
-					let indentText = 0;
-					for (var i = 0; i < res.at_ah_info.length; i++) {
-						var times = new Date(res.at_ah_info[i].addtime * 1000)
-						xtitle.push(times.getMonth() + 1 + "/" + times.getDate())
-						atarr.push(res.at_ah_info[i].at == "" ? "0" : res.at_ah_info[i].at)
-						aharr.push(res.at_ah_info[i].ah == "" ? "0" : res.at_ah_info[i].ah)
-						if (this.checkObj(res.char_data) && res.char_data[this.wormvalue]) {
-							if (res.char_data[this.wormvalue][i - indentText] && (res.char_data[this.wormvalue][i -
-									indentText
-								].addtime == res.at_ah_info[i].addtime)) {
-								pestArr.push(res.char_data[this.wormvalue][i - indentText].sum)
-							} else {
-								indentText++
-								pestArr.push(null)
-							}
-						}
-					}
-					// console.log(this.wormvalue)
-					// if (this.checkObj(res.char_data)) {
-					// 	for (var key in res.char_data) {
-					// 		if (this.wormvalue == key) {
-					// 			var wormobj = {
-					// 				name: key,
-					// 				data: [],
-					// 			}
-					// 			for (var i = 0; i < res.char_data[key].length; i++) {
-					// 				wormobj.data.push(res.char_data[key][i].ah == "" ? "0" : res.char_data[key][i].sum)
-					// 			}
-					// 			obj.push(wormobj)
-					// 		}
-					// 	}
+				let xtitle = this.getDates(this.oldtime, this.newtime)
+				var aharr = Array(xtitle.length).fill(null)
+				var atHigharr = Array(xtitle.length).fill(null) //高温
+				var atLowarr = Array(xtitle.length).fill(null) //低温
+				var pestArr = Array(xtitle.length).fill(null)
+				let indentText = 0;
+				res.at_ah_info.forEach(item => {
+					let index = xtitle.indexOf(this.formatMonthDay(item.addtime));
+					atHigharr[index] = item.height
+					atLowarr[index] = item.low
+					aharr[index] = item.ah
+				})
+				res.char_data[this.wormvalue] && res.char_data[this.wormvalue].forEach(pest => {
+					let index = xtitle.indexOf(this.formatMonthDay(pest.addtime));
+					pestArr[index] = pest.sum
+				})
+				// console.log(this.wormvalue)
+				// if (this.checkObj(res.char_data)) {
+				// 	for (var key in res.char_data) {
+				// 		if (this.wormvalue == key) {
+				// 			var wormobj = {
+				// 				name: key,
+				// 				data: [],
+				// 			}
+				// 			for (var i = 0; i < res.char_data[key].length; i++) {
+				// 				wormobj.data.push(res.char_data[key][i].ah == "" ? "0" : res.char_data[key][i].sum)
+				// 			}
+				// 			obj.push(wormobj)
+				// 		}
+				// 	}
 
-					// }
-					var atobj = {
-						name: '温度',
-						data: atarr,
-						color: '#00E29D'
-					}
-					var ahobj = {
-						name: '湿度',
-						data: aharr,
-						color: '#6CBBFF'
-					}
-					var pestObj = {
-						name: this.wormvalue,
-						data: pestArr,
-					}
-					obj.push(atobj)
-					obj.push(ahobj)
-					obj.push(pestObj)
+				// }
+				var atHighobj = {
+					name: '高温',
+					data: atHigharr,
+					color: '#ff0000'
+				}
+				var atlowobj = {
+					name: '低温',
+					data: atLowarr,
+					color: '#00E29D'
+				}
+				var ahobj = {
+					name: '湿度',
+					data: aharr,
+					color: '#6CBBFF'
+				}
+				var pestObj = {
+					name: this.wormvalue,
+					data: pestArr,
 				}
+				obj.push(atHighobj)
+				obj.push(atlowobj)
+				obj.push(ahobj)
+				obj.push(pestObj)
+				console.log(xtitle, 'xtitle')
 				this.showColumn("canvasColumnA", xtitle, obj)
 			},
 			checkObj(obj) {
@@ -764,9 +786,12 @@
 			var date = +new Date()
 			this.oldtime = this.formatTime(date, 'yyyy-MM-dd');
 			this.newtime = this.formatTime(date, 'yyyy-MM-dd');
-			this.sp_hour_st = uni.getStorageSync('sp_hour_st') == '' ?  '00:00' : uni.getStorageSync('sp_hour_st');
-			this.sp_hour_ed = uni.getStorageSync('sp_hour_ed') == '' ?  '00:00' : uni.getStorageSync('sp_hour_ed');
-			this.defaultValue=[this.sp_hour_st.substring(0, 1) == '0' ? this.sp_hour_st.substring(1, 2): this.sp_hour_st.substring(0, 2), this.sp_hour_ed.substring(0, 1) == '0' ? this.sp_hour_ed.substring(1, 2): this.sp_hour_ed.substring(0, 2)]
+			this.sp_hour_st = uni.getStorageSync('sp_hour_st') == '' ? '00:00' : uni.getStorageSync('sp_hour_st');
+			this.sp_hour_ed = uni.getStorageSync('sp_hour_ed') == '' ? '00:00' : uni.getStorageSync('sp_hour_ed');
+			this.defaultValue = [this.sp_hour_st.substring(0, 1) == '0' ? this.sp_hour_st.substring(1, 2) : this.sp_hour_st
+				.substring(0, 2), this.sp_hour_ed.substring(0, 1) == '0' ? this.sp_hour_ed.substring(1, 2) : this
+				.sp_hour_ed.substring(0, 2)
+			]
 			this.cWidth = uni.upx2px(650);
 			this.cHeight = uni.upx2px(500);
 			this.getyear()

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 546 - 545
pages/environment/equipment.vue


+ 2 - 2
pages/prevention/control.vue

@@ -49,7 +49,7 @@
 					</view>
 				</view>
 				<view class="control_interval">
-					<p class="title_p">上传时间间隔(min)</p>
+					<p class="title_p">数据间隔(min)</p>
 					<view class="slider">
 						<view class="" style="width: 100%;padding-top: 18rpx;">
 							<slider  v-model="condatas.dat_f" min="0" max="120" step="1" show-value block-size="18" activeColor="#57C878" @changing="changing"></slider>
@@ -57,7 +57,7 @@
 					</view>
 				</view>
 				<view class="control_timing">
-					<p class="title_p">自清虫定时(min)</p>
+					<p class="title_p">清虫间隔(min)</p>
 					<view class="slider">
 						<view class="" style="width: 100%;padding-top: 18rpx;">
 							<slider  v-model="condatas.clt_t" min="0" max="120" step="1" show-value block-size="18" activeColor="#57C878" @changing="changing2"></slider>

+ 3 - 2
pages/prevention/ucharts.vue

@@ -68,11 +68,12 @@
 							<td class="td">{{items.d_h_t.at==""?"--":items.d_h_t.at}}</td>
 							<td class="td">{{items.d_h_t.ah==""?"--":items.d_h_t.ah}}</td>
 							<td class="td">{{items.d_h_t.cv}}</td>
+							<td class="td">{{ items.d_h_t.vps == 0 ? '正常' :  items.d_h_t.vps == 1 ? '欠压' : items.d_h_t.vps == 2 ? '过压' : items.d_h_t.vps}}</td>
 							<td class="td">{{items.d_h_t.bv}}</td>
 							<td class="td">{{items.d_h_t.csq}}</td>
 						</tr>
 						<tr class="tr" v-if="!forbidden">
-							<td class="td" v-for="item in 13">暂无数据</td>
+							<td class="td" v-for="item in 14">暂无数据</td>
 						</tr>
 					</table>
 					<table class="table2" v-else-if="!allqingchong">
@@ -139,7 +140,7 @@
 	export default {
 		data() {
 			return {
-				thdata: ["上报时间", "设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)", "充电电压(v)",
+				thdata: ["上报时间", "设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)", "充电电压(v)","电压状态",
 					"电池电压(v)", "信号强度"
 				],
 				thdata2: ["上报时间", "设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)"],

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1262 - 0
pages/waterandfernew/details -新设计图无动态接入.vue


+ 329 - 74
pages/waterandfernew/details.vue

@@ -53,10 +53,10 @@
 			<!-- 设备图 -->
 			<view class="devicePhoto" v-if="current == 0">
 				<view class="titleBox">
-					<u-alert-tips type="primary" :title-style="alertTipColor" title="点击按钮可对应控制阀门开关"
+					<u-alert-tips type="primary" :title-style="alertTipColor" title="点击按钮可对应控制阀门开关,开即打开,关即关闭"
 						:show-icon="true"></u-alert-tips>
-					<view class="btn" @click="statusPanel=true">控制面板</view>
-					<u-popup v-model="statusPanel" mode="bottom">
+					<!-- <view class="btn" @click="statusPanel=true">控制面板</view> -->
+					<!-- <u-popup v-model="statusPanel" mode="bottom">
 						<view class="consoleBox">
 							<view class="swichBox">
 								<u-row :gutter="16" justify="space-between">
@@ -81,37 +81,85 @@
 							</view>
 							<u-button type="success" @click="statusPanel=false">确定</u-button>
 						</view>
-					</u-popup>
+					</u-popup> -->
 				</view>
 				<view class="main">
-					<image class="mainContent" src="../../static/images/waterandfernew/main.png"></image>
-					<view class="sourceBox">
+					<image class="mainContent" src="../../static/images/waterandfernew/mainNew.png"></image>
+					<!-- <view class="sourceBox">
 						<view class="smallBox">
 							水源
 						</view>
-					</view>
+					</view> -->
 					<!-- 桶 -->
 					<view class="colList">
-						<view class="preClo" v-for="(fei, index) in Array(feiNum / 2)" :key="`fei${index}`">
+						<view class="preClo" v-for="item, index in pickBtnList"  :key="`fei${index}`">
 							<view>
-								肥料{{ index + 1 }}
+								肥料{{ index + 1}}
+							</view>
+							<image src="../../static/images/waterandfernew/colNew.png" v-if="pickBtnList.length == 1">
+							</image>
+							<image src="../../static/images/waterandfernew/colLeft.png"
+								v-else-if="pickBtnList.length > 1 && index == 0"></image>
+							<image src="../../static/images/waterandfernew/colRight.png"
+								v-else-if="pickBtnList.length > 1 && index == pickBtnList.length - 1"></image>
+							<image src="../../static/images/waterandfernew/colCenter.png" v-else></image>
+							<view class="jiaoBtn" v-if="resultBan.length > 0">
+								<u-switch v-model="resultBan[index]['off']"
+									active-color="#14A478" inactive-color="#AEB4C2"
+									:loading="resultBan[index]['disabled']"
+									@change="switchchange($event, resultBan[index]['number'], resultBan[index], index)"></u-switch>
+							</view>
+							<view class="shanBox" v-if="resultBan.length > 0">
+								<image v-if="!resultBan[index]['off']"
+									src="../../static/images/waterandfernew/shan.png"></image>
+								<image v-else class="circleAnm"
+									src="../../static/images/waterandfernew/shanannimate.png"></image>
+							</view>
+							<view class="btnBox" @click="switchchange($event, item.number, item, index, true)">
+								<image v-if="item.off" src="../../static/images/waterandfernew/feiopen.png"></image>
+								<image v-else src="../../static/images/waterandfernew/feiclose.png"></image>
 							</view>
-							<image src="../../static/images/waterandfernew/col.png"></image>
 						</view>
 					</view>
+					<!-- 废料管口 -->
+					<view class="exit">
+						<image src="../../static/images/waterandfernew/exit.png"></image>
+					</view>
+					<!-- 注肥泵 -->
+					<view class="feiLight"
+						@click="switchchange(!feiBeng, facilityvalve[feiBengIndex].number, facilityvalve[feiBengIndex], feiBengIndex)">
+						<image v-if="feiBeng" 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-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>
+						<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-else src="../../static/images/waterandfernew/bengclose.png"></image>
+					</view>
 					<!-- 电风扇 -->
-					<view class="fengBox">
+					<!-- <view class="fengBox">
 						<view class="relativeBox">
 							<image src="../../static/images/waterandfernew/fengmain.png"></image>
 							<image :class="feiBeng ? 'circleAnm' : ''"
 								src="../../static/images/waterandfernew/fengleafs.png"></image>
 						</view>
-					</view>
+					</view> -->
 					<!-- 水管控制阀 -->
 					<view class="benList">
-						<view class="preBen" v-for="item, index in buttonList" v-if="(index + 1) % 2 == 1"
+						<!-- <view class="preBen" v-for="item, index in buttonList" v-if="(index + 1) % 2 == 1"
 							@click="switchchange(!item.off, item.number, item, index, true)">
-							<image class="daoguan" src="../../static/images/waterandfernew/bottom.png"
+							<image class="daoguan" src="../../static/images/waterandfernew/bottomNew.png"
 								v-if="(index + 1) % 2 < 4"></image>
 							<view class="info">
 								肥料{{ (index + 1) / 2 > 1 ? (index + 2) / 2 : 1 }}开关
@@ -119,11 +167,11 @@
 							<image class="status" v-if="item.off" src="../../static/images/waterandfernew/open.png">
 							</image>
 							<image class="status" v-else src="../../static/images/waterandfernew/close.png"></image>
-						</view>
-						<view class="preBen" v-for="item, index in facilityvalve" v-if="index > buttonList.length - 1"
+						</view> -->
+						<view class="preBen" v-for="item, index in faList"
 							@click="switchchange(!item.off, item.number, item, index)">
-							<image class="daoguan" src="../../static/images/waterandfernew/bottom.png"
-								v-if="(index-buttonList.length + buttonList.length/2) < 4"></image>
+							<image class="daoguan" src="../../static/images/waterandfernew/bottomNew.png"
+								v-if="index < 4"></image>
 							<view class="info">
 								{{item.name}}
 							</view>
@@ -155,7 +203,7 @@
 				</view>
 				<view class="tableList" v-for="(item, index) in tableData" :key="item.uptime + index">
 					<view>{{item.device_name}}</view>
-					<view>{{item.operation_content}}</view>
+					<view :class="item.status ? 'success' : 'error'">{{item.operation_content}}</view>
 					<view>{{item.uptime}}</view>
 				</view>
 				<u-loadmore :status="status" />
@@ -172,13 +220,26 @@
 	export default {
 		data() {
 			return {
+				typeObj:{
+					1:'控制柜',
+					2:'灌溉泵',
+					3:'搅拌机',
+					4:'注肥泵',
+					5:'阀控器',
+					6:'施肥桶'
+				}, //阀控器类型对应
+				pickBtnList:[], // 肥料开关列表
+				resultBan:[], // 搅拌机开关列表
+				faList:[], // 发空气开关列表
 				alertTipColor: {
 					color: '#1890FF',
-					fontSize: "28rpx"
+					fontSize: "12px"
 				},
 				device_id: '',
+				mainBengIndex: 0, // 进水泵的位置
 				mainBeng: false,
-				feiBeng: false,
+				feiBeng: false,				
+				feiBengIndex: 0, // 施肥泵的位置
 				calendarshow: false,
 				historyTime: {},
 				cWidth: '350',
@@ -441,6 +502,70 @@
 				})
 				// console.log(this.ElementList)
 			},
+			// 当前配置的元素列表
+			async getPickList() {
+				// e_type类型对应
+				// 1:'控制柜',
+				// 2:'灌溉泵',
+				// 3:'搅拌机',
+				// 4:'注肥泵',
+				// 5:'阀控器',
+				// 6:'施肥桶'
+				let res = await this.$myRequest({
+					url: "/api/api_gateway?method=xphsp.views.sf_valve_location_list",
+					data: {
+						sf_device_id: this.device_id,
+					},
+				});
+				let pickList = [];
+				let pickBtnList = []; // 肥料开关
+				let pickBanList = []; // 肥料搅拌机开关
+				let faList = []; // 管道阀开关
+				this.facilityvalve.forEach(item => {
+					res.forEach((pick, index) => {
+						if(pick.e_key == item.type) {
+							let pickObj = Object.assign(item, pick);
+							// 获取当前灌溉泵位置
+							if(pick.e_type == 2) {
+								this.mainBengIndex = pickList.length;
+								this.mainBeng = pickObj.off;
+							}
+							// 获取当前施肥泵位置
+							if(pick.e_type == 4) {
+								this.feiBengIndex = pickList.length;
+								this.feiBeng = pickObj.off;
+							}
+							// 获取肥料开关列表
+							if(pick.e_type == 6) {
+								pickBtnList.push(pickObj)
+							}
+							// 获取搅拌机开关列表
+							if(pick.e_type == 3) {
+								pickBanList.push(pickObj)
+							}
+							// 获取管道阀开关列表
+							if(pick.e_type == 1 || pick.e_type == 5) {
+								faList.push(pickObj)
+							}
+							pickList.push(pickObj)
+						}
+					})
+				})
+				// 把肥料和搅拌机位置对应起来(根据创建时间)
+				let resultBan = [];
+				pickBtnList.forEach(fei => {
+					pickBanList.forEach(ban => {
+						if(fei.create_time == ban.create_time) {
+							resultBan.push(ban)
+						}
+					})
+				})
+				this.pickBtnList = pickBtnList;
+				this.resultBan = resultBan;
+				this.faList = faList;
+				console.log(pickBtnList, pickBanList, resultBan, faList)
+			},
+			// 元素状态
 			async getEquipstatus() {
 				uni.showLoading({
 					title: '加载中'
@@ -515,16 +640,6 @@
 						this.facilityvalve.push(arr1[i]);
 					}
 				}
-				this.facilityvalve.forEach(item => {
-					if (item.type == 'j9' && item.off == true) {
-						// 判断注水泵是否打开
-						this.mainBeng = true;
-					}
-					if (item.type == 'j10' && item.off == true) {
-						// 判断施肥阀是否打开
-						this.feiBeng = true;
-					}
-				})
 				let feiNum = 0; // 记录废料桶占据通道个数,两个通道为一个肥料桶
 				this.buttonList = [];
 				this.facilityvalve.forEach((item, index) => {
@@ -532,16 +647,9 @@
 						feiNum++;
 						this.buttonList.push(item);
 					}
-					if (item.type == 'j10' && item.off == true) {
-						// 判断注水泵是否打开
-						this.mainBeng = true;
-					}
-					if (item.type == 'j9' && item.off == true) {
-						// 判断施肥阀是否打开
-						this.feiBeng = true;
-					}
 				})
 				this.feiNum = feiNum;
+				this.getPickList();
 				console.log(this.facilityvalve)
 			},
 			async getEquipcontrol(num, state, double_order) {
@@ -559,7 +667,7 @@
 					},
 				})
 				uni.hideLoading();
-				if (res.controlState) {
+				if (res.msg_code == 200) {
 					uni.showToast({
 						title: '指令下发成功',
 						duration: 2000,
@@ -567,10 +675,13 @@
 					});
 				} else {
 					uni.showToast({
-						title: res.message,
+						title: res.msg,
 						duration: 2000,
 						icon: 'none'
 					})
+					setTimeout(() => {
+						this.getEquipstatus()
+					}, 2000)
 				}
 			},
 			// sf_control_data
@@ -620,13 +731,13 @@
 				} else {
 					this.status = 'loadmore'
 				}
-				console.log(this.tableData);
+				// console.log(this.tableData);
 			},
 			switchchange(e, state, item, index, isfeiButton) {
 				// 是否是肥料开关,是的话 两个合并为一个
+				item.disabled = true;
 				if (isfeiButton) {
 					item.off = e;
-					item.disabled = true;
 					this.changeTimeStatus(item, index);
 					// 当前是打开
 					if (e) {
@@ -691,15 +802,31 @@
 			this.getEquipstatus();
 			this.getElmentInfo();
 			this.getEquipcontroldata();
+			// this.getPickList();
 		}
 	}
 </script>
 
 <style scoped lang="less">
+	.circleAnm {
+		animation: ancirle 1s linear infinite;
+	}
+
+	// 旋转
+	@keyframes ancirle {
+		0% {
+			transform: rotate(360deg);
+		}
+
+		100% {
+			transform: rotate(0);
+		}
+	}
+
 	.box {
 		position: relative;
 		width: 100%;
-		height: 100vh;
+		min-height: 100vh;
 		overflow: auto;
 	}
 
@@ -837,6 +964,7 @@
 		.axiosBox {
 			position: relative;
 			padding: 48rpx 32rpx;
+
 			.title {
 				color: #333333;
 				font-size: 28rpx;
@@ -885,15 +1013,17 @@
 
 		.main {
 			position: relative;
-			padding-top: 32rpx;
+			width: 678rpx;
+			height: 612rpx;
+			margin-top: 10px;
 
 			.mainContent {
 				position: absolute;
 				left: 50%;
 				transform: translateX(-50%);
-				width: 565rpx;
-				top: 112rpx;
-				height: 242rpx;
+				width: 678rpx;
+				top: 10rpx;
+				height: 602rpx;
 				z-index: 1;
 			}
 
@@ -924,15 +1054,18 @@
 			.colList {
 				position: absolute;
 				z-index: 2;
-				top: 24rpx;
-				left: 120rpx;
-				width: 470rpx;
+				top: 44rpx;
+				left: 154rpx;
+				width: 528rpx;
 				display: flex;
-				justify-content: space-between;
+				justify-content: center;
+				overflow: hidden;
 
 				.preClo {
-					width: 80rpx;
-					margin-left: 40rpx;
+					position: relative;
+					float: left;
+					width: 88rpx;
+					// margin-left: 40rpx;
 
 					view {
 						text-align: center;
@@ -942,23 +1075,81 @@
 					}
 
 					image {
-						width: 80rpx;
-						height: 164rpx;
+						width: 88rpx;
+						height: 272rpx;
+					}
+
+					.shanBox {
+						position: absolute;
+						width: 64rpx;
+						height: 64rpx;
+						top: 116rpx;
+						left: 50%;
+						transform: translateX(-50%);
+						z-index: 2;
+
+						image {
+							width: 64rpx;
+							height: 64rpx;
+						}
+					}
+
+					.jiaoBtn {
+						position: absolute;
+						width: 64rpx;
+						height: 32rpx;
+						top: 72rpx;
+						left: 50%;
+						transform: translateX(-50%);
+						z-index: 2;
+
+						.u-switch {
+							width: 64rpx;
+							height: 32rpx;
+
+							/deep/ .u-switch__node {
+								width: 28rpx !important;
+								height: 28rpx !important;
+								top: 2rpx !important;
+							}
+
+							/deep/ .u-switch__loading {
+								height: 20rpx !important;
+							}
+						}
+
+						/deep/ .u-switch--on .u-switch__node {
+							transform: translateX(36rpx) !important;
+						}
+					}
+
+					.btnBox {
+						position: absolute;
+						width: 66rpx;
+						height: 72rpx;
+						bottom: 40rpx;
+						left: 22rpx;
+						z-index: 2;
+
+						image {
+							width: 66rpx;
+							height: 72rpx;
+						}
 					}
 				}
 			}
 
 			.benList {
 				position: absolute;
-				width: 565rpx;
+				width: 678rpx;
 				left: 50%;
 				transform: translateX(-50%);
-				top: 342rpx;
+				top: 610rpx;
 
 				.preBen {
 					float: left;
 					text-align: center;
-					width: 25%;
+					width: 20%;
 
 					.daoguan {
 						width: 20rpx;
@@ -979,6 +1170,78 @@
 				}
 			}
 
+			.lineExit {}
+
+			.exit {
+				position: absolute;
+				width: 22rpx;
+				height: 20rpx;
+				top: 360rpx;
+				right: 251rpx;
+				z-index: 2;
+
+				image {
+					width: 22rpx;
+					height: 20rpx;
+				}
+			}
+
+			.warterIn {
+				position: absolute;
+				width: 66rpx;
+				height: 72rpx;
+				top: 190rpx;
+				left: 52rpx;
+				z-index: 3;
+
+				image {
+					width: 66rpx;
+					height: 72rpx;
+				}
+			}
+
+			.warterLight {
+				position: absolute;
+				width: 72rpx;
+				height: 48rpx;
+				top: 506rpx;
+				left: 110rpx;
+				z-index: 3;
+
+				image {
+					width: 72rpx;
+					height: 48rpx;
+				}
+			}
+
+			.feiLight {
+				position: absolute;
+				width: 72rpx;
+				height: 66rpx;
+				top: 424rpx;
+				right: 140rpx;
+				z-index: 3;
+
+				image {
+					width: 72rpx;
+					height: 66rpx;
+				}
+			}
+
+			.kongBox {
+				position: absolute;
+				width: 84rpx;
+				height: 108rpx;
+				top: 390rpx;
+				right: 228rpx;
+				z-index: 3;
+
+				image {
+					width: 84rpx;
+					height: 108rpx;
+				}
+			}
+
 			.fengBox {
 				position: absolute;
 				right: 12rpx;
@@ -1006,20 +1269,6 @@
 					}
 				}
 
-				.circleAnm {
-					animation: ancirle 2s linear infinite;
-				}
-
-				// 旋转
-				@keyframes ancirle {
-					0% {
-						transform: rotate(0);
-					}
-
-					100% {
-						transform: rotate(360deg);
-					}
-				}
 			}
 		}
 	}
@@ -1049,9 +1298,15 @@
 			view {
 				text-align: center;
 			}
-
+			.success{
+				color: #14A478;
+			}
+			.error{
+				color: #FF5951;
+			}
 			view:nth-child(1) {
 				width: 120rpx;
+				text-align: left;
 			}
 
 			view:nth-child(2) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1066 - 0
pages/waterandfernew/details第一版vue


BIN
static/images/waterandfernew/bengclose.png


BIN
static/images/waterandfernew/bengopen.png


BIN
static/images/waterandfernew/bottomNew.png


BIN
static/images/waterandfernew/colCenter.png


BIN
static/images/waterandfernew/colLeft.png


BIN
static/images/waterandfernew/colNew.png


BIN
static/images/waterandfernew/colRight.png


BIN
static/images/waterandfernew/exit.png


BIN
static/images/waterandfernew/feiAllclose.png


BIN
static/images/waterandfernew/feiAllopen.png


BIN
static/images/waterandfernew/feiclose.png


BIN
static/images/waterandfernew/feiopen.png


BIN
static/images/waterandfernew/kongclose.png


BIN
static/images/waterandfernew/kongopen.png


BIN
static/images/waterandfernew/mainNew.png


BIN
static/images/waterandfernew/shan.png


BIN
static/images/waterandfernew/shanannimate.png


BIN
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/dc2ec810-7965-11ee-830c-05575d56160e
+https://app.liuyingyong.cn/build/download/921d7260-ddbf-11ee-b1d4-c5470969b847

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


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


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5 - 5
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


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


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5 - 5
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


+ 4 - 4
util/api.js

@@ -55,8 +55,8 @@ export const myRequest = (options) => {
         'Content-Type': 'application/x-www-form-urlencoded',
       },
       data: data,
-      success: (res) => {
-		  console.log(url,'response 12131313',url)
+      success: (res) => {
+        console.log(url, 'response 12131313', url);
         if (res.data.message) {
           if (
             res.data.message == '识别无结果' ||
@@ -72,8 +72,8 @@ export const myRequest = (options) => {
         }
         resolve(res.data.data);
       },
-      fail: (err) => {
-		  console.log(err,'response 12131313',url,data)
+      fail: (err) => {
+        console.log(err, 'response 12131313', url, data);
         uni.showToast({
           title: '请求接口失败',
         });