zhangyun 3 年 前
コミット
257081e3e5
100 ファイル変更5419 行追加911 行削除
  1. 595 461
      pages.json
  2. 2 21
      pages/afterSale/index.vue
  3. 16 7
      pages/cb/cbd/equip-set/imgpage.vue
  4. 12 8
      pages/cb/cbd/equip-set/statistics.vue
  5. 92 69
      pages/cb/equip-detail/equip-detail.vue
  6. 3 1
      pages/cb/sim/sim.vue
  7. 3 3
      pages/cb/xy/equip-set/xyhistoryile.vue
  8. 1 1
      pages/cb/xy2.0/historydatas.vue
  9. 22 4
      pages/cb/xy2.0/particulars.vue
  10. 751 0
      pages/disease/cmb.vue
  11. 390 0
      pages/disease/forecastResult.vue
  12. 8 5
      pages/distribution/index.vue
  13. 15 0
      pages/environment/equipment.vue
  14. 3 3
      pages/environment/history.vue
  15. 384 205
      pages/environment/index.vue
  16. 28 23
      pages/equipList/index.vue
  17. 0 0
      pages/equipList/seabox/modification.vue
  18. 1 1
      pages/equipList/search.vue
  19. 8 5
      pages/equipMange/index/assignment.vue
  20. 9 9
      pages/equipMange/index/index.vue
  21. 3 2
      pages/expertDiagnosis/index.vue
  22. 30 8
      pages/fourBase/index.vue
  23. 24 21
      pages/index/index.vue
  24. 703 0
      pages/irrigate/index.vue
  25. 61 0
      pages/irrigate/irrmap.vue
  26. 220 0
      pages/irrigate/realtimedata.vue
  27. 320 0
      pages/irrigate/weathdata.vue
  28. 8 8
      pages/prevention/equipmentdetails.vue
  29. 160 0
      pages/waterandfer/basestate.vue
  30. 346 0
      pages/waterandfer/datails.vue
  31. 604 0
      pages/waterandfer/elementdata.vue
  32. 344 0
      pages/waterandfer/index.vue
  33. 187 0
      pages/waterandfer/waterhis.vue
  34. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  35. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  36. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  37. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/bazaar-city_list/index.js.map
  38. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/equip-item/equip-item.js.map
  39. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ksp-image-cutter/ksp-image-cutter.js.map
  40. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-icons/uni-icons.js.map
  41. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-nav-bar/uni-nav-bar.js.map
  42. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-status-bar/uni-status-bar.js.map
  43. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/addafter.js.map
  44. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map
  45. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map
  46. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js.map
  47. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/equip-set.js.map
  48. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/addimg.js.map
  49. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/equip-set.js.map
  50. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/historyfile.js.map
  51. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/imgpage.js.map
  52. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/manualinput.js.map
  53. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/note.js.map
  54. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/results.js.map
  55. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map
  56. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map
  57. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map
  58. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/search.js.map
  59. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/sim/sim.js.map
  60. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/equip-set.js.map
  61. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/xyhistoryile.js.map
  62. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map
  63. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/particulars.js.map
  64. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map
  65. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/disease/cmb.js.map
  66. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/disease/forecastResult.js.map
  67. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/distribution/index.js.map
  68. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/contros.js.map
  69. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map
  70. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/history.js.map
  71. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map
  72. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/onedaythedata.js.map
  73. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map
  74. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/sim.js.map
  75. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map
  76. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/modification.js.map
  77. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/addbase.js.map
  78. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/allocation.js.map
  79. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/basefacility.js.map
  80. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/city.js.map
  81. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/index.js.map
  82. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/modification.js.map
  83. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/seabox/modification.js.map
  84. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/seabox/search.js.map
  85. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/search.js.map
  86. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/addusers.js.map
  87. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map
  88. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/changepasswold.js.map
  89. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/index.js.map
  90. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/bzy/equip-set/bzyhistoryile.js.map
  91. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/bzy/equip-set/equip-set.js.map
  92. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/addimg.js.map
  93. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/equip-set.js.map
  94. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/historyfile.js.map
  95. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/imgpage.js.map
  96. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/manualinput.js.map
  97. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/note.js.map
  98. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/results.js.map
  99. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/statistics.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/equip-detail/equip-detail.js.map

ファイルの差分が大きいため隠しています
+ 595 - 461
pages.json


+ 2 - 21
pages/afterSale/index.vue

@@ -11,7 +11,7 @@
 				</view>
 			</uni-nav-bar>
 		</view>
-		<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/afterSale/dcd7147f4b15d00c5c90006738b8453.png'" class="expertimages"></image>
+		<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/afterSale/dcd7147f4b15d00c5c90006738b8453.png" class="expertimages"></image>
 		<view class="aftersaleTF" v-if="aftersaleTF">
 			暂无数据
 		</view>
@@ -33,7 +33,7 @@
 					<button :class="item.errorvideo?'video':'none'" :disabled="!item.errorvideo" @click="faultVideo(item.errorvideo)">视频</button>
 				</view>
 				<view class="aftersale_item_icon">
-					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+aftersale_icon[Number(item.device_type)-2].src" mode=""></image>
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/afterSale/'+item.device_type+'.png'" mode=""></image>
 				</view>
 			</view>
 		</view>
@@ -58,25 +58,6 @@
 			return {
 				BASE_URL: 'http://114.115.147.140:8002',
 				faultdata: [],
-				aftersale_icon: [{
-						src: '/image/afterSale/6.png'
-					},
-					{
-						src: '/image/afterSale/1.png'
-					},
-					{
-						src: '/image/afterSale/4.png'
-					},
-					{
-						src: '/image/afterSale/3.png'
-					},
-					{
-						src: '/image/afterSale/5.png'
-					},
-					{
-						src: '/image/afterSale/2.png'
-					}
-				],
 				title:"",//弹框标题
 				show: false,//弹框先显示
 				maskcloseable: true,

+ 16 - 7
pages/cb/cbd/equip-set/imgpage.vue

@@ -33,13 +33,16 @@
 						<view class="icon_box" @click="delimg(item.id)">
 							<p class="iconfont icon-shanchu">删除</p>
 						</view>
-						<view class="icon_box" @click="shibie(item.id,item.addr)">
+						<view class="icon_box" @click="shibie(item.id,item.addr)" v-if="disable==1 && device_type!=7">
 							<p class="iconfont icon-shibie">识别</p>
 						</view>
-						<view class="icon_box" @click="tongji(item)">
+						<view class="icon_box" v-else-if="disable==2 && device_type!=7">
+							<p class="iconfont icon-shibie">计数:{{item.des_nums}}只</p>
+						</view>
+						<view class="icon_box" @click="tongji(item)" v-if="device_type!=7">
 							<p class="iconfont icon-tongji2">手动统计</p>
 						</view>
-						<view class="icon_box" @click="add(item)">
+						<view class="icon_box" @click="add(item)" v-if="device_type!=7">
 							<p class="iconfont icon-iconzhengli_shouxieqianpi">手动添加</p>
 						</view>
 						<p style="color: #06B535;">{{item.addtime|timeFormat()}}</p>
@@ -77,7 +80,9 @@
 				isTop:false,
 				resultdata:{},
 				titleidnex:0,
-				tiemshow:false
+				tiemshow:false,
+				disable:"",
+				device_type:""
 			}
 		},
 		methods: {
@@ -212,7 +217,7 @@
 				this.imglists=[]
 				this.page =1
 				console.log(e)
-				this.timestate = +new Date(e.startDate) / 1000
+				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))
 			},
@@ -229,13 +234,16 @@
 			console.log(option)
 			this.device_id = option.device_id
 			this.d_id = option.d_id
-		},
-		onShow(){
+			this.disable = option.disable
 			this.timeend = +new Date() / 1000
 			this.timestate = this.timeend - 60 * 60 * 24
 			this.imglists=[]
+			this.device_type = option.device_type
 			this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
 		},
+		onShow(){
+			
+		},
 		onReachBottom() {
 			this.page++
 			this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
@@ -344,6 +352,7 @@
 			box-shadow: 0 0 10rpx #bcb9ca;
 			padding: 20rpx;
 			margin-bottom: 20rpx;
+			height: 140px;
 		}
 
 		.imglist_left {

+ 12 - 8
pages/cb/cbd/equip-set/statistics.vue

@@ -143,8 +143,6 @@
 	import uCharts from '../../../../components/js_sdk/u-charts/u-charts/u-charts.js';
 	var canvaColumnA = null;
 	var canvasRing = null;
-	var newtime = +new Date()
-	var strrttime = newtime - 24 * 60 * 60 * 1000
 	export default {
 		data() {
 			return {
@@ -153,8 +151,8 @@
 				pixelRatio: 1,
 				canvastishiTF: false,
 				d_id: '',
-				start_time: strrttime,
-				end_time: newtime,
+				start_time: +new Date() - 24 * 60 * 60 * 1000,
+				end_time: +new Date(),
 				titletext: ["24小时", "近一个月", "近半年", "近一年"],
 				device_id: '',
 				pest_name: '',
@@ -202,6 +200,7 @@
 					for (var i = 0; i < res.percentage.length; i++) {
 						this.wormdata.unshift(res.percentage[i].name_num)
 					}
+					this.wormdata.unshift("全部")
 					var arr1 = []
 					var arr2 = []
 					var arr3 = []
@@ -210,7 +209,7 @@
 					for (var i = 0; i < res.date.length; i++) {
 						var times = new Date(res.date[i].addtime * 1000)
 						xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" +
-							times.getSeconds())
+							times.getMinutes())
 						arr1.unshift(res.date[i].temperature == "" ? "0" : res.date[i].temperature)
 						arr2.unshift(res.date[i].humidity == "" ? "0" : res.date[i].humidity)
 						arr3.unshift(res.date[i]._sums == "" ? "0" : res.date[i]._sums)
@@ -219,7 +218,7 @@
 					for (var i = 0; i < res.percentage.length; i++) {
 						var obj = {}
 						obj.name = res.percentage[i].name_num
-						obj.data = Number(res.percentage[i].num)
+						obj.data = Number(res.percentage[i].sum)
 						maxnumarr.unshift(obj)
 					}
 					console.log(ringarr)
@@ -334,13 +333,14 @@
 					for (var i = 0; i < res.date.length; i++) {
 						this.wormdata.unshift(res.date[i].pest_name)
 					}
+					this.wormdata.unshift("全部")
 					var arr1 = []
 					var xtitle = []
 					var ringarr = []
 					for (var i = 0; i < res.date.length; i++) {
 						var times = new Date(res.date[i].add_time * 1000)
 						xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" +
-							times.getSeconds())
+							times.getMinutes())
 						arr1.unshift(res.date[i].pest_num == "" ? "0" : res.date[i].pest_num)
 						var obj = {}
 						obj.name = res.date[i].pest_name
@@ -468,7 +468,11 @@
 				console.log(index)
 				console.log(this.wormdata)
 				this.indextwo = index[0]
-				this.pest_name = this.wormdata[this.indextwo]
+				if(this.indextwo==0){
+					this.pest_name = ""
+				}else{
+					this.pest_name = this.wormdata[this.indextwo]
+				}
 				if (this.topindex == 0) {
 					this.history()
 				} else {

+ 92 - 69
pages/cb/equip-detail/equip-detail.vue

@@ -3,13 +3,15 @@
 		<view :class="['info',equipInfo.is_online==1?'on':'off']">
 			<view class="" @click="copy(equipInfo)">
 				设备ID:{{equipInfo.imei||equipInfo.device_id}}
-				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi"></image>
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi">
+				</image>
 			</view>
 			<view class="">
 				设备名称:{{equipInfo.device_name?equipInfo.device_name:"无"}}
 			</view>
 			<view class="">
-				设备类型:<span v-if="equipInfo.type">{{equipInfo.type|equipType}}</span><span v-else>{{equipInfo.type_name}}</span>
+				设备类型:<span v-if="equipInfo.type">{{equipInfo.type|equipType}}</span><span
+					v-else>{{equipInfo.type_name}}</span>
 			</view>
 			<view class="">
 				最新上报时间:{{equipInfo.addtime||equipInfo.uptime | timeFormat}}
@@ -26,21 +28,23 @@
 				<u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon>
 			</view>
 			<u-popup v-model="setTimeShow" mode="center" width="600rpx">
-				<u-field label="载玻片更换时间" placeholder="选择日期" label-width='240' required :error-message="glassErr" v-model="glass_slide_time"
-				 @click="glass_show=true" :field-style="fieldstyle">
+				<u-field label="载玻片更换时间" placeholder="选择日期" label-width='240' required :error-message="glassErr"
+					v-model="glass_slide_time" @click="glass_show=true" :field-style="fieldstyle">
 				</u-field>
-				<u-field label="培养液更换时间" placeholder="选择日期" label-width='240' required :error-message="culErr" v-model="cultivate_time"
-				 @click="cultivate_show=true" :field-style="fieldstyle">
+				<u-field label="培养液更换时间" placeholder="选择日期" label-width='240' required :error-message="culErr"
+					v-model="cultivate_time" @click="cultivate_show=true" :field-style="fieldstyle">
 				</u-field>
 				<view class="btn-box">
 					<u-button @click="setTimeSubmit" size="mini" type="success">确定</u-button>
 				</view>
-				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')"></u-calendar>
-				<u-calendar v-model="cultivate_show" mode="date" :max-date="date" @change="timeChange($event,'cultivate')"></u-calendar>
+				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')">
+				</u-calendar>
+				<u-calendar v-model="cultivate_show" mode="date" :max-date="date"
+					@change="timeChange($event,'cultivate')"></u-calendar>
 			</u-popup>
 			<u-popup v-model="yxShow" mode="center" width="600rpx">
 				<u-field label="监测害虫名称" label-width='240' required :error-message="xyErr" v-model="decoy" class="field"
-				 :field-style="fieldstyle" placeholder="请填写害虫名称">
+					:field-style="fieldstyle" placeholder="请填写害虫名称">
 				</u-field>
 				<view class="btn-box">
 					<u-button @click="yxSubmit" size="mini" type="success">确定</u-button>
@@ -217,8 +221,8 @@
 				yxShow: false, //诱芯弹框
 				xyErr: '',
 				decoy: '',
-				newtishitf: false,//暂无数据提示
-				dataloadingtf:true,//加载中提示
+				newtishitf: false, //暂无数据提示
+				dataloadingtf: true, //加载中提示
 				date: "", //日历最大可选日期
 			}
 		},
@@ -240,14 +244,14 @@
 						if (this.newState.lamp != undefined) {
 							if (this.newState.ws == 1) {
 								if (this.newState.lamp == 1) {
-									blbs = "工作中";
+									blbs = "异常";
 								} else if (equipState.lux == 0) {
 									blbs = "N/A(未检测到传感器)";
 								} else {
-									blbs = "异常";
+									blbs = "工作";
 								}
 							} else {
-								blbs = "关闭";
+								blbs = "待机";
 							}
 						} else {
 							blbs = "--";
@@ -274,12 +278,14 @@
 							}, {
 								icon: '/image/cb/icon08.png',
 								txt: '环境温度(℃)',
-								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at == "" || this.newState.at ==
+								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at ==
+									"" || this.newState.at ==
 									"25.0" ? this.newState.new_tem : this.newState.at
 							}, {
 								icon: '/image/cb/icon07.png',
 								txt: '环境湿度(%)',
-								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah == "" || this.newState.ah ==
+								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah ==
+									"" || this.newState.ah ==
 									"30.0" ? this.newState.new_hum : this.newState.ah
 							}, {
 								icon: '/image/prevention/icon16.png',
@@ -339,12 +345,14 @@
 							}, {
 								icon: '/image/cb/icon08.png',
 								txt: '环境温度(℃)',
-								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at == "" || this.newState.at ==
+								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at ==
+									"" || this.newState.at ==
 									"25.0" ? this.newState.new_tem : this.newState.at
 							}, {
 								icon: '/image/prevention/66.png',
 								txt: '环境湿度(%)',
-								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah == "" || this.newState.ah ==
+								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah ==
+									"" || this.newState.ah ==
 									"30.0" ? this.newState.new_hum : this.newState.ah
 							}, {
 								icon: '/image/prevention/icon16.png',
@@ -392,13 +400,15 @@
 							{
 								icon: '/image/cb/icon08.png',
 								txt: '环境温度(℃)',
-								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at == "" || this.newState.at ==
+								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at ==
+									"" || this.newState.at ==
 									"25.0" ? this.newState.new_tem : this.newState.at
 							},
 							{
 								icon: '/image/cb/icon07.png',
 								txt: '环境湿度(%)',
-								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah == "" || this.newState.ah ==
+								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah ==
+									"" || this.newState.ah ==
 									"30.0" ? this.newState.new_hum : this.newState.ah
 							},
 							{
@@ -463,7 +473,8 @@
 		},
 		onLoad(option) {
 			this.equipInfo = JSON.parse(option.info)
-			this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type) || Number(this.equipInfo.device_type_id)
+			this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type) || Number(this.equipInfo
+				.device_type_id)
 			this.equipInfo.type = this.type
 			this.device_status = this.equipInfo.is_online
 			this.getState()
@@ -476,70 +487,76 @@
 				success: (res) => {
 					console.log(JSON.parse(res.data))
 					let items = JSON.parse(res.data).filter((item) => {
-						return item.purview_name == "测报系统"
+						return item.pur_id == 36 //"测报系统"
 					})
 					console.log(items)
 					let items2 = items[0].children.filter((item) => {
-						return item.purview_name == "虫情测报灯"
+						return item.pur_id == 37 //"虫情测报灯"
 					})
 					let items3 = items[0].children.filter((item) => {
-						return item.purview_name == "性诱测报"
+						return item.pur_id == 38 //"性诱测报"
 					})
 					let items4 = items[0].children.filter((item) => {
-						return item.purview_name == "孢子仪"
+						return item.pur_id == 39 //"孢子仪"
 					})
-					console.log(items2)
-					var arr = items2[0].children
+					console.log(items2[0].children)
+					var arr = []
+					if (items2[0]) {
+						arr = items2[0].children
+					}
 					for (var i = 0; i < arr.length; i++) {
-						switch (arr[i].purview_name) {
-							case "数据详情":
-								this.cbd[1].tf = true
+						switch (arr[i].pur_id) {
+							case 60:
+								// this.cbd[1].tf = true "数据详情"
 								break
-							case "查看图片":
-								this.cbd[0].tf = true
+							case 61:
+								this.cbd[0].tf = true //"查看图片"
 								break
-							case "设备控制":
-								this.cbd[3].tf = true
+							case 62:
+								this.cbd[2].tf = true //"设备控制"
 								break
-							case "害虫统计":
-								this.cbd[2].tf = true
-								this.cbd[4].tf = true
-								break
-							case "SIM卡":
-								this.cbd[5].tf = true
+							case 63:
+								this.cbd[1].tf = true //"害虫统计"
 								break
 						}
 					}
-					console.log(items3[0].children)
-					var arr2 = items3[0].children
+					console.log(items3[0])
+					var arr2 = []
+					if (items3[0]) {
+						arr2 = items3[0].children
+					}
 					for (var i = 0; i < arr2.length; i++) {
-						switch (arr2[i].purview_name) {
-							case "设备控制":
-								this.xy[0].tf = true
+						switch (arr2[i].pur_id) {
+							case 65:
+								this.xy[0].tf = true //"设备控制"
 								break;
-							case "SIM卡":
-								this.xy[1].tf = true
+							case 66:
+								this.xy[1].tf = true //"SIM卡"
 								break;
-							case "数据详情":
-								this.xy[2].tf = true
+							case 67:
+								this.xy[2].tf = true //"数据详情"
 								break;
 						}
 					}
 					console.log(items4[0].children)
-					var arr3 = items4[0].children
+					// var arr3 = items4[0].children
+					var arr3 = []
+					if (items4[0]) {
+						arr3 = items4[0].children
+					}
 					for (var i = 0; i < arr3.length; i++) {
-						switch (arr3[i].purview_name) {
-							case "设备控制":
-								this.bzy[0].tf = true
+						switch (arr3[i].pur_id) {
+							case 69:
+								this.bzy[0].tf = true //"设备控制"
 								break;
-							case "查看图片":
-								this.bzy[1].tf = true
+							case 68:
+								this.bzy[1].tf = true //"查看图片"
 								break;
-							case "数据详情":
-								this.bzy[2].tf = true
+							case 71:
+								this.bzy[2].tf = true //"数据详情"
 								break;
-							case "SIM卡":
-								this.bzy[3].tf = true
+							case 70:
+								this.bzy[3].tf = true //"SIM卡"
 								break;
 						}
 					}
@@ -548,16 +565,17 @@
 		},
 		methods: {
 			async getState() {
-				this.dataloadingtf =true
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
 					data: {
-						device_type_id: this.equipInfo.type || this.equipInfo.equip_type || this.equipInfo.device_type_id,
+						device_type_id: this.equipInfo.type || this.equipInfo.equip_type || this.equipInfo
+							.device_type_id,
 						device_id: this.equipInfo.imei || this.equipInfo.device_id,
 						page: 1,
 						page_size: 1,
-						start_time: Math.floor((+new Date()-24*60*60*1000)/1000),
-						end_time: Math.floor((+new Date())/1000)
+						start_time: Math.floor((+new Date() - 24 * 60 * 60 * 1000) / 1000),
+						end_time: Math.floor((+new Date()) / 1000)
 					}
 				})
 				this.dataloadingtf = false
@@ -572,7 +590,8 @@
 				console.log(path)
 				var device_id = this.equipInfo.device_id || this.equipInfo.imei
 				uni.navigateTo({
-					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this.type
+					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this
+						.type + "&disable=" + this.equipInfo.disable
 				});
 			},
 			partClicks() {
@@ -586,7 +605,8 @@
 					path = "/pages/cb/xy/equip-set/xyhistoryile"
 				}
 				uni.navigateTo({
-					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this.type
+					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this
+						.type
 				});
 			},
 			async setTime(d_id) {
@@ -597,8 +617,10 @@
 						d_id
 					}
 				})
-				this.glass_slide_time = res.glass_slide_time ? this.formatTime(res.glass_slide_time * 1000, 'yyyy-MM-dd') : ''
-				this.cultivate_time = res.cultivate_time ? this.formatTime(res.cultivate_time * 1000, 'yyyy-MM-dd') : ''
+				this.glass_slide_time = res.glass_slide_time ? this.formatTime(res.glass_slide_time * 1000,
+					'yyyy-MM-dd') : ''
+				this.cultivate_time = res.cultivate_time ? this.formatTime(res.cultivate_time * 1000, 'yyyy-MM-dd') :
+					''
 				this.setTimeShow = true
 			},
 			timeChange(e, a) {
@@ -782,6 +804,7 @@
 			text-align: center;
 			padding-top: 40rpx;
 			font-size: 32rpx;
+
 			.dataloading:after {
 				overflow: hidden;
 				display: inline-block;
@@ -789,12 +812,12 @@
 				animation: ellipsis 2s infinite;
 				content: "\2026";
 			}
-			
+
 			@keyframes ellipsis {
 				from {
 					width: 2px;
 				}
-			
+
 				to {
 					width: 15px;
 				}

+ 3 - 1
pages/cb/sim/sim.vue

@@ -119,7 +119,9 @@
 			}
 			this.d_id = option.d_id
 			this.lookSIMCode('sim')
-			this.lookSIMCode('hksim')
+			if(option.device_type!=4){
+				this.lookSIMCode('hksim')
+			}
 			this.loding = true
 			this.loding2 = true
 		},

+ 3 - 3
pages/cb/xy/equip-set/xyhistoryile.vue

@@ -30,7 +30,7 @@
 					</view>
 					<view class="wind_direction">
 						<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/xy/c44ae038324e1040a1eaa702e6d71a5.png'" mode=""></image>
-						<p>风:{{wind_drec}}</p>
+						<p>风:{{wind_drec}}</p>
 					</view>
 				</view>
 			</view>
@@ -54,7 +54,7 @@
 							<td class="td">{{items.d_h_t.cv}}</td>
 							<td class="td">{{items.d_h_t.bv}}</td>
 							<td class="td">{{items.d_h_t.bs}}</td>
-							<td class="td">{{items.d_h_t.cs?"正常":"充电"}}</td>
+							<td class="td">{{items.d_h_t.cs?"非充电":"充电"}}</td>
 							<td class="td">{{items.d_h_t.infr_ct}}</td>
 							<td class="td">{{items.d_h_t.csq}}</td>
 							<td class="td">{{items.d_h_t.dver}}</td>
@@ -201,7 +201,7 @@
 					} else if (res.data[i].d_h_t.bs == 1) {
 						this.historylistdata[i].d_h_t.bs = "欠压"
 					} else if (res.data[i].d_h_t.bs == 2) {
-						this.historylistdata[i].d_h_t.bs = "压"
+						this.historylistdata[i].d_h_t.bs = "压"
 					}
 				}
 				console.log(this.historylistdata)

+ 1 - 1
pages/cb/xy2.0/historydatas.vue

@@ -93,7 +93,7 @@
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_line_chart',
 					data: {
 						device_id: this.device_id,
-						strat_time: parseInt(this.start_time / 1000),
+						start_time: parseInt(this.start_time / 1000),
 						end_time: parseInt(this.end_time / 1000),
 						status: "pest"
 					}

+ 22 - 4
pages/cb/xy2.0/particulars.vue

@@ -62,13 +62,13 @@
 							<p>{{newState.wind}}</p>
 						</view>
 					</view>
-					<!-- <view class="realtime_item">
+					<view class="realtime_item">
 						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/xy2.0/yujing.png" mode=""></image>
 						<view class="text">
-							<p>虫害情报</p>
-							<p>{{newState.warn==""?"暂无":newState.warn}}</p>
+							<p>诱虫次数</p>
+							<p>{{trapnum}}</p>
 						</view>
-					</view> -->
+					</view>
 				</view>
 			</view>
 			<view class="sim" v-if="simTF">
@@ -137,6 +137,7 @@
 					"padding-left":"20rpx",
 					"background-color":"#f6f6f6"
 				},
+				trapnum:0
 			}
 		},
 		methods: {
@@ -256,6 +257,22 @@
 				uni.navigateTo({
 					url: "../../afterSale/addafter?device_id="+ this.newState.device_id +"&device_type="+ 10
 				})
+			},
+			async Chistory(device_id) { //历史数据列表折线图
+				this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_line_chart',
+					data: {
+						device_id: device_id,
+						start_time: Math.floor(+new Date/1000 - 24*60*60),
+						end_time: Math.floor(+new Date/1000),
+						status: "pest"
+					}
+				})
+				console.log(res)
+				if(res.data[0]){
+					this.trapnum = res.data[0].pest_num
+				}
 			}
 		},
 		onLoad(option) {
@@ -266,6 +283,7 @@
 			var times = new Date()
 			this.date = times.getFullYear()+1 + "-" + Number(times.getMonth()+1) + "-" + times.getDate()
 			console.log(this.date)
+			this.Chistory(this.equipInfo.device_id)
 			// uni.getStorage({ 待开发
 			// 	key:"jurisdiction",
 			// 	success:(res)=>{

+ 751 - 0
pages/disease/cmb.vue

@@ -0,0 +1,751 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative; top: 44px">
+			<view style="position: fixed; z-index: 100; width: 100%">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备详情"></uni-nav-bar>
+			</view>
+			<view class="info">
+				<view class="info_item">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png" mode="" class="bgi"></image>
+					<p style="font-size: 32rpx" @click="copy(eqinfo.device_id)">
+						设备 ID:{{ eqinfo.device_id }}
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode=""
+							class="tishi"></image>
+					</p>
+					<p>设备名称:{{ eqinfo.device_name || "无" }}</p>
+					<p>
+						最近上报时间:<span v-if="eqinfo.uptime">{{
+              eqinfo.uptime | timeFormat()
+            }}</span><span v-else>{{ eqinfo.addtime | timeFormat() }}</span>
+					</p>
+					<p>地址:{{ eqinfo.location || "暂无地址" }}</p>
+				</view>
+			</view>
+			<view class="control">
+				<view class="control_item" v-if="kongtf" @click="control">
+					<image :src="
+              'http://www.hnyfwlw.com:8006/bigdata_app' +
+              '/image/environment/forecastResult.png'
+            " mode=""></image>
+					<p>预测结果</p>
+				</view>
+			</view>
+			<view class="his_box">
+				<view class="selecttimes" @click="tiemshow = !tiemshow">
+					<view class="timesbox">
+						<image
+							:src="'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+							mode=""></image>
+						<p>{{ timetab(begintime) }}</p>
+						<p class="or">~</p>
+						<p>{{ timetab(end) }}</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>
+				</view>
+				<view class="shuju_one">
+					<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
+						暂无数据
+					</view>
+					<view class="canvastishi" v-if="dataloadingtf">
+						<p class="dataloading">加载中</p>
+					</view>
+					<canvas v-show="!tiemshow" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+						@touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
+						@touchend="touchEndLineA($event)" disable-scroll="true" :style="{
+              width: cWidth * pixelRatio + 'px',
+              height: cHeight * pixelRatio + 'px',
+              transform: 'scale(' + 1 / pixelRatio + ')',
+              'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
+              'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
+            }"></canvas>
+					<canvas v-show="!tiemshow" canvas-id="canvasColumnB" id="canvasColumnB" class="charts"
+						@touchstart="touchLineB($event)" @touchmove="moveLineB($event)"
+						@touchend="touchEndLineB($event)" disable-scroll="true" :style="{
+              width: cWidth * pixelRatio + 'px',
+              height: cHeight * pixelRatio + 'px',
+              transform: 'scale(' + 1 / pixelRatio + ')',
+              'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
+              'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
+            }"></canvas>
+				</view>
+				<view class="condition">
+					<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+						<table class="table">
+							<tr class="tr">
+								<th class="th" v-for="(item, index) in tableHead" :key="'a' + index">
+									{{ item }}
+								</th>
+							</tr>
+							<tr class="tr" v-for="(items, indexs) in historylistdata" :key="'b' + indexs"
+								v-if="!forbidden">
+								<td class="td">{{ items.uploadTime | timeFormat() }}</td>
+								<td class="td">{{ items.dianChiDianYa }}</td>
+								<td class="td">{{ items.fiftyTuRangHanShuiLiang }}</td>
+								<td class="td">{{ items.fiftyTuRangWenDu }}</td>
+								<td class="td">{{ items.fiveTuRangHanShuiLiang }}</td>
+								<td class="td">{{ items.fiveTuRangWenDu }}</td>
+								<td class="td">{{ items.kongQiWenDu }}</td>
+								<td class="td">{{ items.luDianWenDu }}</td>
+								<td class="td">{{ items.riZhaoShiShu }}</td>
+								<td class="td">{{ items.shiRunShiJian }}</td>
+								<td class="td">{{ items.tenTuRangHanShuiLiang }}</td>
+								<td class="td">{{ items.tenTuRangWenDu }}</td>
+								<td class="td">{{ items.tianJiangYuLiang }}</td>
+								<td class="td">{{ items.tuRangDaoDianLv }}</td>
+								<td class="td">{{ items.twentyFiveTuRangHanShuiLiang }}</td>
+								<td class="td">{{ items.twentyFiveTuRangWenDu }}</td>
+								<td class="td">{{ items.twentyTuRangHanShuiLiang }}</td>
+								<td class="td">{{ items.twentyTuRangWenDu }}</td>
+								<td class="td">{{ items.xiangDuiShiDu }}</td>
+								<td class="td">{{ items.xiaoShiJiangYuLiang }}</td>
+							</tr>
+							<tr class="tr" v-if="forbidden">
+								<td class="td" v-for="item in 13">暂无数据</td>
+							</tr>
+						</table>
+					</scroll-view>
+				</view>
+				<view class="pagenumber">
+					<button @click="prev">上一页</button>
+					<view class="pagenumber_page"> 第 {{ page }} 页 </view>
+					<view class="pagenumber_page"> 共 {{ pagesum }} 页 </view>
+					<button @click="next">下一页</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uCharts from "../../components/js_sdk/u-charts/u-charts/u-charts.js";
+	var canvaColumnA = null;
+	var canvaColumnB = null;
+	export default {
+		data() {
+			return {
+				kongtf: false,
+				eqinfo: {},
+				city: "河南省",
+				tiemshow: false, //时间筛选弹框
+				begintime: "", //开始时间
+				end: "", //结束时间
+				dataloadingtf: true,
+				canvastishiTF: false,
+				device_id: "", //设备ID
+				tableHead: [
+					"上报时间",
+					"电池电压",
+					"50cm土壤含水量",
+					"50cm土壤温度",
+					"5cm土壤含水量",
+					"5cm土壤温度",
+					"空气温度",
+					"露点温度",
+					"日照时数",
+					"叶面湿润时间",
+					"10cm土壤含水量",
+					"10cm土壤温度",
+					"天降雨量",
+					"土壤导电率",
+					"25cm土壤含水量",
+					"25cm土壤温度",
+					"20cm土壤含水量",
+					"20cm土壤温度",
+					"相对湿度",
+					"时降雨量",
+				], //表格抬头
+				forbidden: false,
+				historylistdata: [], //历史数据
+				pagesum: 1,
+				page: 1,
+				cWidth: "",
+				cHeight: "",
+				pixelRatio: 1,
+				param: {
+					dianChiDianYa: "电池电压",
+					fiftyTuRangHanShuiLiang: "50cm土壤含水量",
+					fiftyTuRangWenDu: "50cm土壤温度",
+					fiveTuRangHanShuiLiang: "5cm土壤含水量",
+					fiveTuRangWenDu: "5cm土壤温度",
+					kongQiWenDu: "空气温度",
+					luDianWenDu: "露点温度",
+					riZhaoShiShu: "日照时数",
+					shiRunShiJian: "叶面湿润时间",
+					tenTuRangHanShuiLiang: "10cm土壤含水量",
+					tenTuRangWenDu: "10cm土壤温度",
+					tianJiangYuLiang: "天降雨量",
+					tuRangDaoDianLv: "土壤导电率",
+					twentyFiveTuRangHanShuiLiang: "25cm土壤含水量",
+					twentyFiveTuRangWenDu: "25cm土壤温度",
+					twentyTuRangHanShuiLiang: "20cm土壤含水量",
+					twentyTuRangWenDu: "20cm土壤温度",
+					xiangDuiShiDu: "相对湿度",
+					xiaoShiJiangYuLiang: "小时降雨量",
+				},
+				color: [
+					"#ff7b30",
+					"#f93948",
+					"#fb2ea4",
+					"#bc59db",
+					"#7457ec",
+					"#307dfd",
+					"#31bfff",
+					"#46e9b1",
+					"#19cd48",
+					"#b2e409",
+					"#f0f254",
+					"#fed000",
+					"#f06f14",
+					"#a74040",
+					"#90bb71",
+					"#a07635",
+					"#6502bd",
+					"#048bbb",
+					"#9ebb01",
+					"#cc9202",
+					"#ff8fa0",
+					"#a3d55f",
+					"#d9bedd",
+					"#00a6b6",
+					"#236093",
+					"#009fff",
+					"#ddc0a6",
+					"#c4a6dd",
+					"#dda6a6",
+					"#779e33",
+					"#a6ddb0",
+				],
+			};
+		},
+		methods: {
+			copy(item) {
+				uni.setClipboardData({
+					data: item,
+					success: function() {
+						console.log("success");
+					},
+				});
+			},
+			control() {
+				//设备控制
+				uni.navigateTo({
+					url: "./forecastResult?id=" + this.eqinfo.device_id,
+				});
+			},
+			tiemchange(e) {
+				console.log(e);
+				//切换时间
+				// this.begintime = parseInt(+new Date(e.startDate) / 1000);
+				this.begintime = parseInt(+new Date(`${e.startDate} 00:00:00`) / 1000);
+				this.end = parseInt(+new Date(`${e.endDate} 00:00:00`) / 1000);
+				this.histprydatas();
+				this.getChartLine();
+			},
+			timetab(e) {
+				//时间转换
+				e = new Date(e * 1000);
+				var year = e.getFullYear();
+				var month =
+					e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1;
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate();
+				var time = year + "/" + month + "/" + day;
+				return time;
+			},
+			// 表格数据
+			async histprydatas() {
+				//表格历史数据
+				const res = await this.$myRequest({
+					url: "/api/api_gateway?method=wheat.wheat.wheat_data_list",
+					data: {
+						device_id: this.eqinfo.device_id,
+						page: this.page,
+						begin: this.begintime,
+						end: this.end,
+					},
+				});
+				this.pagesum = Math.ceil(res.nums / 10) || 1;
+				if (this.pagesum > 0) {
+					var dat = res.sta;
+					this.historylistdata = [];
+
+					for (var i = 0; i < dat.length; i++) {
+						// var item = eval("(" + dat[i] + ")");
+						var item = this.evals(dat[i])
+						var obj = {};
+						for (var i1 in item) {
+							// if (i1 == "uploadTime") {
+							//   obj[i1] = this.formatTime(item[i1] * 1000);
+							// } else {
+							obj[i1] = item[i1];
+							// }
+						}
+						this.historylistdata.push(obj);
+					}
+				} else {
+					this.historylistdata = [];
+				}
+			},
+			//获取折线图数据
+			async getChartLine() {
+				const res = await this.$myRequest({
+					method: "POST",
+					url: "/api/api_gateway?method=wheat.wheat.wheat_data",
+					data: {
+						device_id: this.eqinfo.device_id,
+						begin: this.begintime,
+						end: this.end,
+					},
+				});
+				this.dataloadingtf = false;
+				var dat = res;
+				if (dat.length) {
+					var regroupData = []; //重组数据
+					var kindArr = []; //通道数组
+					var time = [];
+					var xtitle = [];
+					for (var i = 0; i < dat.length; i++) {
+						// console.log(typeof dat[i])
+						
+						// var item = eval("(" + dat[i] + ")");
+						var item = this.evals(dat[i])
+						var tim = parseInt(item["uploadTime"]) * 1000 - 8 * 3600000;
+						var times = new Date(tim);
+						xtitle.unshift(
+							times.getMonth() +
+							1 +
+							"/" +
+							times.getDate() +
+							"-" +
+							times.getHours() +
+							":" +
+							times.getMinutes()
+						);
+						time.unshift(tim);
+						for (var j in item) {
+							var arr = "";
+							if (j == "id" || j == "uploadTime") {
+								continue;
+							} else if (kindArr.indexOf(j) == "-1") {
+								kindArr.push(j);
+								regroupData.push({
+									name: this.param[j],
+									color: this.color[kindArr.length - 1],
+									data: [],
+								});
+								// arr.push(tim);
+								arr = parseFloat(item[j]);
+								regroupData[kindArr.indexOf(j)].data.unshift(arr);
+							} else {
+								// arr.push(tim);
+								// arr.push(parseFloat(item[j]));
+								arr = parseFloat(item[j]);
+								regroupData[kindArr.indexOf(j)].data.unshift(arr);
+							}
+						}
+					}
+					console.log(regroupData);
+					// 分割折线图
+					const regroupDataNum = Math.ceil(regroupData.length / 2);
+					const options1 = regroupData.filter((v, i) => {
+						return i < regroupDataNum;
+					});
+					const options2 = regroupData.filter((v, i) => {
+						return i >= regroupDataNum;
+					});
+					console.log(options1, options1);
+
+					this.showColumn("canvasColumnA", xtitle, options1);
+					this.showColumn("canvasColumnB", xtitle, options2);
+					this.canvastishiTF = true;
+				} else {
+					this.canvastishiTF = false;
+					this.showColumn("canvasColumnA", xtitle, []);
+					this.showColumn("canvasColumnB", xtitle, []);
+				}
+			},
+			prev() {
+				//上一页
+				if (this.page > 1) {
+					this.page--;
+					this.histprydatas();
+				}
+			},
+			next() {
+				//下一页
+				if (this.page < this.pagesum) {
+					this.page++;
+					this.histprydatas();
+				}
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1,
+				});
+			},
+			showColumn(id, xtitle, xinfo) {
+				console.log(id);
+				var _self = this;
+				if (id === "canvasColumnA") {
+					canvaColumnA = new uCharts({
+						canvasId: id,
+						type: "line",
+						legend: {
+							position: "top",
+						},
+						fontSize: 11,
+						background: "#FFFFFF",
+						pixelRatio: 1,
+						animation: true,
+						dataLabel: false,
+						categories: xtitle,
+						series: xinfo,
+						enableScroll: true, //开启图表拖拽功能
+						xAxis: {
+							disableGrid: true,
+							type: "grid",
+							gridType: "dash",
+							itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+							scrollShow: true, //新增是否显示滚动条,默认false
+							// scrollAlign: 'left', //滚动条初始位置
+							scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
+							scrollColor: "#DEE7F7", //默认为 #A6A6A6
+						},
+						yAxis: {},
+						width: _self.cWidth * 1,
+						height: _self.cHeight * 1,
+						extra: {
+							line: {
+								type: "curve",
+							},
+						},
+					});
+				} else if (id === "canvasColumnB") {
+					canvaColumnB = new uCharts({
+						canvasId: id,
+						type: "line",
+						legend: {
+							position: "top",
+						},
+						fontSize: 11,
+						background: "#FFFFFF",
+						pixelRatio: 1,
+						animation: true,
+						dataLabel: false,
+						categories: xtitle,
+						series: xinfo,
+						enableScroll: true, //开启图表拖拽功能
+						xAxis: {
+							disableGrid: true,
+							type: "grid",
+							gridType: "dash",
+							itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+							scrollShow: true, //新增是否显示滚动条,默认false
+							// scrollAlign: 'left', //滚动条初始位置
+							scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
+							scrollColor: "#DEE7F7", //默认为 #A6A6A6
+						},
+						yAxis: {},
+						width: _self.cWidth * 1,
+						height: _self.cHeight * 1,
+						extra: {
+							line: {
+								type: "curve",
+							},
+						},
+					});
+				}
+			},
+
+			touchLineA(e) {
+				console.log(e);
+				canvaColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvaColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvaColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + " " + item.name + ":" + item.data;
+					},
+				});
+			},
+			touchLineB(e) {
+				console.log(e);
+				canvaColumnB.scrollStart(e);
+			},
+			moveLineB(e) {
+				canvaColumnB.scroll(e);
+			},
+			touchEndLineB(e) {
+				canvaColumnB.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnB.showToolTip(e, {
+					format: function(item, category) {
+						return category + " " + item.name + ":" + item.data;
+					},
+				});
+			},
+			evals(e) {//替换eval
+				var str = e.slice(1, e.length - 1)
+				// str = e.splice(-1,1)
+				var arr = str.split(", ")
+				// console.log(arr)
+				for (var i = 0; i < arr.length; i++) {
+					arr[i] = arr[i].split(":")
+				}
+				var obj = {}
+				for (var i = 0; i < arr.length; i++) {
+					var str = arr[i][0].slice(1, arr[i][0].length - 1)
+					// console.log(str)
+					obj[str] = arr[i][1]
+				}
+				// console.log(obj)
+				return obj
+			}
+		},
+		onLoad(option) {
+			this.eqinfo = JSON.parse(option.shebei);
+			console.log(this.eqinfo);
+			this.cWidth = uni.upx2px(650);
+			this.cHeight = uni.upx2px(500);
+			this.device_id = option.id;
+			this.end = parseInt(+new Date() / 1000);
+			this.begintime = parseInt(this.end - 24 * 60 * 60);
+			this.histprydatas();
+			this.getChartLine();
+			uni.getStorage({
+				key: "jurisdiction",
+				success: (res) => {
+					let items = JSON.parse(res.data).filter((item) => {
+						return item.purview_name == "环境监测系统";
+					});
+					let items2 = items[0].children.filter((item) => {
+						return item.purview_name == "环境监测";
+					});
+					var arr = items2[0].children;
+					for (var i = 0; i < arr.length; i++) {
+						switch (arr[i].purview_name) {
+							case "设备控制":
+								this.kongtf = true;
+								break;
+							case "24小时数据":
+								this.daydatatf = true;
+								break;
+							case "历史数据":
+								this.shujutf = true;
+								break;
+						}
+					}
+				},
+			});
+		},
+	};
+</script>
+
+<style lang="scss">
+	.info {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+
+		.info_item {
+			width: 90%;
+			margin: 0 auto;
+			height: 240rpx;
+			padding: 40rpx 50rpx;
+			position: relative;
+			box-sizing: border-box;
+
+			.bgi {
+				width: 100%;
+				height: 100%;
+				position: absolute;
+				top: 0;
+				left: 0;
+				z-index: -1;
+			}
+
+			p {
+				font-size: 24rpx;
+				color: #ffffff;
+				margin-bottom: 10rpx;
+
+				.tishi {
+					width: 30rpx;
+					height: 30rpx;
+					margin: 0rpx 0 0 20rpx;
+				}
+			}
+		}
+	}
+
+	.control {
+		width: 90%;
+		position: absolute;
+		top: 360rpx;
+		left: 5%;
+		display: flex;
+		text-align: center;
+		// padding: 0 30rpx;
+		box-sizing: border-box;
+
+		.control_item {
+			width: 128rpx;
+			height: 120rpx;
+			width: 20%;
+
+			image {
+				width: 70rpx;
+				height: 70rpx;
+			}
+
+			p {
+				font-size: 24rpx;
+			}
+		}
+	}
+
+	.his_box {
+		width: 100%;
+		top: 270px;
+		position: relative;
+	}
+
+	.selecttimes {
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
+		margin: 0 auto;
+		font-size: 28rpx;
+
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
+
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
+
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+			}
+		}
+
+		/deep/.u-calendar__action {
+			display: flex;
+			justify-content: space-around;
+
+			.u-calendar__action__text {
+				line-height: 25px;
+			}
+		}
+	}
+
+	.shuju_one {
+		width: 90%;
+		margin: 20px auto;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding-top: 20rpx;
+		height: 1000rpx;
+
+		.canvastishi {
+			font-size: 32rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			margin-left: -64rpx;
+			margin-top: -21rpx;
+
+			.dataloading:after {
+				overflow: hidden;
+				display: inline-block;
+				vertical-align: bottom;
+				animation: ellipsis 2s infinite;
+				content: "\2026";
+			}
+
+			@keyframes ellipsis {
+				from {
+					width: 2px;
+				}
+
+				to {
+					width: 15px;
+				}
+			}
+		}
+	}
+
+	.condition {
+		display: flex;
+		flex-wrap: wrap;
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin: 0 auto 30rpx;
+		overflow-x: auto;
+		padding: 0 20rpx;
+		box-sizing: border-box;
+		.scroll-X {
+			width: 6000px;
+			margin: 20rpx auto;
+
+			.tr {
+				display: flex;
+				overflow: hidden;
+
+				.th,
+				.td {
+					display: inline-block;
+					padding: 5rpx;
+					width: 300rpx;
+					text-align: center;
+					height: 52rpx;
+					line-height: 52rpx;
+					border: 2rpx solid #f1f1f1;
+				}
+			}
+
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
+
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
+		}
+	}
+	.pagenumber {
+		display: flex;
+		margin: 20rpx auto;
+		padding-bottom: 30rpx;
+	
+		button {
+			width: 150rpx;
+			height: 50rpx;
+			line-height: 50rpx;
+			font-size: 26rpx;
+			text-align: center;
+			background-color: #57c878;
+			color: #ffffff;
+		}
+	
+		.pagenumber_page {
+			width: 100rpx;
+			height: 50rpx;
+			line-height: 50rpx;
+			font-size: 26rpx;
+			text-align: center;
+		}
+	}
+</style>

+ 390 - 0
pages/disease/forecastResult.vue

@@ -0,0 +1,390 @@
+<template>
+  <view>
+    <!-- <view class="status_bar"></view> -->
+    <view class="">
+      <!-- <view style="position: fixed; z-index: 100; width: 100%">
+        <uni-nav-bar
+          @clickLeft="clickLeft"
+          left-icon="back"
+          left-text="返回"
+          title="设备详情"
+        ></uni-nav-bar>
+      </view> -->
+      <view class="info">
+        <view class="info_item">
+          <image
+            src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png"
+            mode=""
+            class="bgi"
+          ></image>
+          <p style="font-size: 32rpx" @click="copy(device_id)">
+            设备 ID:{{ device_id }}
+            <image
+              src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png"
+              mode=""
+              class="tishi"
+            ></image>
+          </p>
+          <p>预测位置:{{ this.address || "无" }}</p>
+          <p>
+            最近预测时间:<span v-if="this.latest_uptime != ''">{{
+               formetDate(this.latest_uptime)
+            }}</span>
+            <span v-else>暂无数据</span>
+          </p>
+        </view>
+      </view>
+      <!-- <view class="control">
+				<view class="control_item" v-if="kongtf" @click="control">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/8.png'" mode=""></image>
+					<p>预测结果</p>
+				</view>
+			</view> -->
+      <view class="his_box">
+        <view class="title">预测数据</view>
+        <view class="condition">
+          <scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+            <table class="table">
+              <tr class="tr">
+                <th
+                  class="th"
+                  v-for="(item, index) in tableHead"
+                  :key="'a' + index"
+                >
+                  {{ item }}
+                </th>
+              </tr>
+              <tr
+                class="tr"
+                v-for="(items, indexs) in historylistdata"
+                :key="'b' + indexs"
+                v-if="!forbidden"
+              >
+                <td class="td">{{ formetDate(items.uptime) }}</td>
+                <td class="td">{{ items.incidence }}</td>
+                <td class="td">{{ filterIncidence(items.incidence) }}</td>
+              </tr>
+              <tr class="tr" v-if="forbidden">
+                <td class="td" v-for="item in 13">暂无数据</td>
+              </tr>
+            </table>
+          </scroll-view>
+          <view class="pagenumber">
+            <button @click="prev">上一页</button>
+            <view class="pagenumber_page"> 第 {{ page }} 页 </view>
+            <view class="pagenumber_page"> 共 {{ pagesum }} 页 </view>
+            <button @click="next">下一页</button>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import uCharts from "../../components/js_sdk/u-charts/u-charts/u-charts.js";
+var canvaColumnA = null;
+export default {
+  data() {
+    return {
+      latest_uptime: "",
+      address: "",
+      eqinfo: {},
+      tiemshow: false, //时间筛选弹框
+      begintime: "", //开始时间
+      end: "", //结束时间
+      dataloadingtf: true,
+      canvastishiTF: false,
+      device_id: "", //设备ID
+      tableHead: ["预测时间", "预测值", "预测结果"], //表格抬头
+      forbidden: false,
+      historylistdata: [], //历史数据
+      pagesum: 1,
+      page: 1,
+      cWidth: "",
+      cHeight: "",
+      pixelRatio: 1,
+      param: {
+        dianChiDianYa: "电池电压",
+        fiftyTuRangHanShuiLiang: "50cm土壤含水量",
+        fiftyTuRangWenDu: "50cm土壤温度",
+        fiveTuRangHanShuiLiang: "5cm土壤含水量",
+        fiveTuRangWenDu: "5cm土壤温度",
+        kongQiWenDu: "空气温度",
+        luDianWenDu: "露点温度",
+        riZhaoShiShu: "日照时数",
+        shiRunShiJian: "叶面湿润时间",
+        tenTuRangHanShuiLiang: "10cm土壤含水量",
+        tenTuRangWenDu: "10cm土壤温度",
+        tianJiangYuLiang: "天降雨量",
+        tuRangDaoDianLv: "土壤导电率",
+        twentyFiveTuRangHanShuiLiang: "25cm土壤含水量",
+        twentyFiveTuRangWenDu: "25cm土壤温度",
+        twentyTuRangHanShuiLiang: "20cm土壤含水量",
+        twentyTuRangWenDu: "20cm土壤温度",
+        xiangDuiShiDu: "相对湿度",
+        xiaoShiJiangYuLiang: "小时降雨量",
+      },
+      color: [
+        "#ff7b30",
+        "#f93948",
+        "#fb2ea4",
+        "#bc59db",
+        "#7457ec",
+        "#307dfd",
+        "#31bfff",
+        "#46e9b1",
+        "#19cd48",
+        "#b2e409",
+        "#f0f254",
+        "#fed000",
+        "#f06f14",
+        "#a74040",
+        "#90bb71",
+        "#a07635",
+        "#6502bd",
+        "#048bbb",
+        "#9ebb01",
+        "#cc9202",
+        "#ff8fa0",
+        "#a3d55f",
+        "#d9bedd",
+        "#00a6b6",
+        "#236093",
+        "#009fff",
+        "#ddc0a6",
+        "#c4a6dd",
+        "#dda6a6",
+        "#779e33",
+        "#a6ddb0",
+      ],
+    };
+  },
+  methods: {
+    formetDate(time) {
+      let date = new Date(time * 1000);
+      let y = date.getFullYear();
+      let m = date.getMonth() + 1;
+      let d = date.getDate();
+      return `${y}-${this.addZero(m)}-${this.addZero(d)}`;
+    },
+    addZero(x) {
+      return Number(x) < 10 ? `0${x}` : x;
+    },
+    copy(item) {
+      uni.setClipboardData({
+        data: item,
+        success: function () {
+          console.log("success");
+        },
+      });
+    },
+    filterIncidence(data) {
+      if (data === "") {
+        return "暂无预测结果";
+      } else if (Number(data) <= 0.1) {
+        return "不发生";
+      } else if (Number(data) > 0.1 && Number(data) <= 10) {
+        return "轻发生";
+      } else if (Number(data) > 10 && Number(data) <= 20) {
+        return "偏轻发生";
+      } else if (Number(data) > 20 && Number(data) <= 30) {
+        return "中等发生";
+      } else if (Number(data) > 30 && Number(data) <= 40) {
+        return "偏重发生";
+      } else if (Number(data) > 40) {
+        return "大发生";
+      }
+    },
+    // 表格数据
+    async histprydatas() {
+      //表格历史数据
+      this.dataloadingtf = true;
+      const res = await this.$myRequest({
+        url: "/api/api_gateway?method=wheat.wheat.wheat_incidence",
+        data: {
+          device_id: this.device_id,
+          page: this.page,
+          begin: this.begintime,
+          end: this.end,
+        },
+      });
+      console.log(res);
+      this.pagesum = Math.ceil(res.nums / 10) || 1;
+      this.address = res.province + res.city + res.county;
+      this.latest_uptime = res.latest_uptime;
+      if (this.pagesum > 0) {
+        var dat = res.data;
+        this.historylistdata = [];
+        for (var i = 0; i < dat.length; i++) {
+          // console.log(eval("(" + dat[i] + ")"));
+          var item = dat[i];
+          var obj = {};
+          for (var i1 in item) {
+            if (i1 === "incidence") {
+              obj[i1] = item[i1].toFixed(5);
+            } else {
+              obj[i1] = item[i1];
+            }
+            // if (i1 == "uploadTime") {
+            //   obj[i1] = this.formatTime(item[i1] * 1000);
+            // } else {
+            // }
+          }
+          this.historylistdata.push(obj);
+        }
+      } else {
+        this.historylistdata = [];
+      }
+      console.log(this.historylistdata);
+    },
+
+    prev() {
+      //上一页
+      if (this.page > 1) {
+        this.page--;
+        this.histprydatas();
+      }
+    },
+    next() {
+      //下一页
+      if (this.page < this.pagesum) {
+        this.page++;
+        this.histprydatas();
+      }
+    },
+    clickLeft() {
+      uni.navigateBack({
+        delta: 1,
+      });
+    },
+
+    touchLineA(e) {
+      console.log(e);
+      canvaColumnA.scrollStart(e);
+    },
+    moveLineA(e) {
+      canvaColumnA.scroll(e);
+    },
+    touchEndLineA(e) {
+      canvaColumnA.scrollEnd(e);
+      //下面是toolTip事件,如果滚动后不需要显示,可不填写
+      canvaColumnA.showToolTip(e, {
+        format: function (item, category) {
+          return category + " " + item.name + ":" + item.data;
+        },
+      });
+    },
+  },
+  onLoad(option) {
+    // console.log(option);
+    // this.eqinfo = JSON.parse(option);
+    this.cWidth = uni.upx2px(650);
+    this.cHeight = uni.upx2px(500);
+    this.device_id = option.id;
+    this.histprydatas();
+  },
+};
+</script>
+
+<style lang="scss">
+.info {
+  width: 100%;
+  .info_item {
+    width: 90%;
+    margin: 0 auto;
+    // height: 180rpx;
+    padding: 50rpx 50rpx;
+    position: relative;
+    box-sizing: border-box;
+    .bgi {
+      width: 100%;
+      height: 100%;
+      position: absolute;
+      top: 0;
+      left: 0;
+      z-index: -1;
+    }
+
+    p {
+      font-size: 28rpx;
+      color: #ffffff;
+      margin-bottom: 10rpx;
+
+      .tishi {
+        width: 30rpx;
+        height: 30rpx;
+        margin: 0rpx 0 0 20rpx;
+      }
+    }
+  }
+}
+.his_box {
+  width: 100%;
+  position: relative;
+  .title {
+    padding: 20rpx 50rpx;
+    font-weight: 600;
+    font-size: 28rpx;
+  }
+}
+
+.condition {
+  display: flex;
+  flex-wrap: wrap;
+  width: 90%;
+  box-shadow: 0 0 10rpx #bcb9ca;
+  margin: 0 auto 30rpx;
+  .scroll-X {
+    width: 95%;
+    margin: 20rpx auto;
+    .tr {
+      display: flex;
+      overflow: hidden;
+
+      .th,
+      .td {
+        display: inline-block;
+        padding: 5rpx;
+        width: 300rpx;
+        text-align: center;
+        height: 52rpx;
+        line-height: 52rpx;
+        border: 2rpx solid #f1f1f1;
+      }
+    }
+
+    .tr:nth-child(2n-1) {
+      background-color: #f5fff8;
+    }
+
+    .tr:first-child {
+      background-color: #57c878;
+      color: #fff;
+    }
+  }
+
+  .pagenumber {
+    display: flex;
+    margin: 20rpx auto;
+
+    button {
+      width: 150rpx;
+      height: 50rpx;
+      line-height: 50rpx;
+      font-size: 26rpx;
+      text-align: center;
+      background-color: #57c878;
+      color: #ffffff;
+    }
+
+    .pagenumber_page {
+      width: 100rpx;
+      height: 50rpx;
+      line-height: 50rpx;
+      font-size: 26rpx;
+      text-align: center;
+    }
+  }
+}
+</style>

+ 8 - 5
pages/distribution/index.vue

@@ -149,11 +149,14 @@
 				})
 
 				for (var i = 0; i < res.length; i++) {
-					if (res[i].type_name == "性诱3.0" ||
-						res[i].type_name == "吸虫塔" ||
-						res[i].type_name == "病虫害可视监测" ||
-						res[i].type_name == "小麦赤霉病" ||
-						res[i].type_name == "温室大棚"
+					if (res[i].id == 8  ||
+					   res[i].id == 12  ||
+					   res[i].id == 14  ||
+					   res[i].id == 11  ||
+					   res[i].id == 13  ||
+					   res[i].id == 16  ||
+					   res[i].id == 17  ||
+					   res[i].id == 18
 					) {
 						continue;
 					}

+ 15 - 0
pages/environment/equipment.vue

@@ -294,12 +294,27 @@
 				uni.navigateTo({
 					url: "./sim?simid="+sim
 				})
+			},
+			async getbaseinfo(id){
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.qxz_page',
+					data: {
+						page: 1,
+						page_size: 10,
+						device_id: id,
+					}
+				})
+				// console.log(res.ids.id)
+				this.eqinfo.item = res.ids[0]
 			}
 		},
 		onLoad(option) {
 			this.$forceUpdate()
 			this.eqinfo.item = JSON.parse(option.shebei)
 			console.log(JSON.parse(option.shebei))
+			if(!this.eqinfo.item.iccid){
+				this.getbaseinfo(this.eqinfo.item.equip_id)
+			}
 			this.history()
 			this.onehistory()
 			if (this.eqinfo.item.lat == '' || this.eqinfo.item.lng == "") {

+ 3 - 3
pages/environment/history.vue

@@ -112,8 +112,8 @@
 					url: '/api/api_gateway?method=weather.weather.qxz_detail',
 					data: {
 						device_id: datas,
-						begin: parseInt(this.begintime),
-						end: parseInt(this.end),
+						start_time: parseInt(this.begintime),
+						end_time: parseInt(this.end),
 						page: this.page
 					}
 				})
@@ -176,7 +176,7 @@
 				var arr = []
 				for (var i = 0; i < res.data.length; i++) {
 					if (parseFloat(res.data[i].dat[eindex]) != -99.99) {
-						arr.push(parseFloat(res.data[0].dat[eindex]))
+						arr.unshift(parseFloat(res.data[i].dat[eindex]))
 					}
 				}
 				obj.data = arr

+ 384 - 205
pages/environment/index.vue

@@ -1,70 +1,104 @@
 <template>
 	<view>
 		<view class="status_bar"></view>
-		<view class="" style="position: relative;top: 40px;">
-			<view style="position: fixed;z-index: 100;">
-				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"
-				 size="16">
-					<view class="bases_search">
-						<view class="bases_search_text" @click="clickRight">
-							<u-icon name="search" class="search" @click="search"></u-icon>
-							<input type="text" v-model="data.search" placeholder="设备ID搜索" disabled/>
-						</view>
-					</view>
-				 </uni-nav-bar>
+		<view class="" style="position: relative; top: 44px">
+			<view style="position: fixed; z-index: 100">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="环境监测系统" right-icon="search"
+					@clickRight="clickRight" size="16"></uni-nav-bar>
+				<view class="inputs" :style="{ width: width + 'rpx' }">
+					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
+						class="inputbox" :clearable="false" />
+					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+				</view>
 			</view>
-			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/1.png'" mode="" class="image"></image>
+			<image :src="
+          'http://www.hnyfwlw.com:8006/bigdata_app' + '/image/environment/1.png'
+        " mode="" class="image">
+			</image>
 			<view class="loading" v-if="loadingtf">
 				<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
 			</view>
 			<view class="tab-box">
-				<view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf" @click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
-					<text>{{item.name}}</text>
+				<view v-for="(item, index) in equipArr" :key="item.type" v-if="item.tf"
+					@click="tabClick(index, item.type)" :class="['tab-item', active == index ? 'active' : '']">
+					<text>{{ item.name }}</text>
 					<text class="bottom-line"></text>
 				</view>
 			</view>
 			<view class="prevents">
-				<view class="prevents_item" v-for="item,index in eqlistdata" :key="index" @click="eqdetails(item)">
+				<view class="prevents_item" v-for="(item, index) in eqlistdata" :key="index" @click="eqdetails(item)">
 					<view class="" v-if="side_type == 5">
-						<image
-							:src="item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
-							mode="" class="prevents_item_img"></image>
+						<image :src="
+                item.is_online == 1
+                  ? 'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png'
+                  : 'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'
+              " mode="" class="prevents_item_img"></image>
 						<view class="prevents_item_top">
-							<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
-							<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
+							<p>
+								设备名称:{{
+                  item.equip_name == "" ? "环境监测" : item.equip_name
+                }}
+							</p>
+							<p :class="item.is_online == 1 ? 'green' : 'red'"
+								v-text="item.is_online == 1 ? '在线' : '离线'"></p>
 						</view>
 						<view class="prevents_item_bot">
-							<p>设备 ID:{{item.equip_id || item.device_id}}</p>
-							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
-							<view class="" style="display: flex;justify-content: space-between;">
-								<p>设备到期情况:<span
-										:class="'prevents_item_bot_sapn'+item.device_expire">{{item.device_expiretext}}</span>
+							<p>设备 ID:{{ item.equip_id || item.device_id }}</p>
+							<p>最新上报时间:{{ item.uptime | timeFormat() }}</p>
+							<view class="" style="display: flex; justify-content: space-between">
+								<p>
+									设备到期情况:<span
+										:class="'prevents_item_bot_sapn' + item.device_expire">{{ item.device_expiretext }}</span>
+								</p>
+								<p style="color: #3c84fe" v-if="item.device_expire != 0" @click.stop="examine(item)">
+									查看详情
 								</p>
-								<p style="color: #3C84FE;" v-if="item.device_expire!=0" @click.stop="examine(item)">查看详情</p>
 							</view>
 						</view>
 					</view>
 					<view class="" v-if="side_type == 15">
-						<image
-							src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png"
-							mode="" class="prevents_item_img"></image>
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
+							class="prevents_item_img"></image>
 						<view class="prevents_item_top">
-							<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
+							<p>
+								设备名称:{{
+                  item.device_name == "" ? "管式墒情" : item.device_name
+                }}
+							</p>
 						</view>
 						<view class="prevents_item_bot">
-							<p>设备 ID:{{item.device_id}}</p>
-							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+							<p>设备 ID:{{ item.device_id }}</p>
+							<p>最新上报时间:{{ item.uptime | timeFormat() }}</p>
+						</view>
+					</view>
+					<view class="" v-if="side_type == 11 || side_type == 19 || side_type == 20">
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
+							class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>
+								设备名称:{{
+                  item.device_name == "" ? "暂无" : item.device_name
+                }}
+							</p>
+						</view>
+						<view class="prevents_item_bot">
+							<p>设备 ID:{{ item.device_id }}</p>
+							<p>最新上报时间:{{ item.uptime | timeFormat() }}</p>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{'text-align':'left','padding-left':'10px','font-weight':700}" :mask-close-able="true">
+		<u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{
+        'text-align': 'left',
+        'padding-left': '10px',
+        'font-weight': 700,
+      }" :mask-close-able="true">
 			<view class="slot-content">
 				<rich-text :nodes="content"></rich-text>
 			</view>
 		</u-modal>
-		<view class="top" v-if="side_type==5">
+		<view class="top" v-if="side_type == 5">
 			<view class="backtop" @click="top" v-if="isTop">
 				<image src="../../static/images/1.png" mode="" class="img0"></image>
 			</view>
@@ -87,262 +121,399 @@
 </template>
 
 <script>
+	import {
+		Debounce
+	} from "../../util/anitthro.js";
 	export default {
 		data() {
 			return {
+				diseaseId: 11,
 				page: 1,
 				size: 10,
 				eqlistdata: [],
-				isTop:false,
-				filtrateTF:false,
-				device_status:"",
-				loadingtf:false,//加载提示
+				isTop: false,
+				filtrateTF: false,
+				device_status: "",
+				width: 0, //顶部搜索栏宽度
+				imports: "", //搜索设备id
+				loadingtf: false,
 				equipArr: [{
-						name: '环境监测',
+						name: "环境监测",
 						type: 5, //5 环境监测 15 管式墒情
 						list: [],
 						pageIndex: 1,
-						tf:false,
-					}, {
-						name: '管式墒情',
+						tf: false,
+					},
+					{
+						name: "管式墒情",
 						type: 15, //5 环境监测 15 管式墒情
 						list: [],
 						pageIndex: 1,
-						tf:false,
-					}
+						tf: false,
+					},
+					{
+						name: "小麦赤霉病",
+						type: 11, //5 环境监测 15 管式墒情 11小麦赤霉病 19玉米大斑病
+						list: [],
+						pageIndex: 1,
+						tf: false,
+					},
+					{
+						name: "玉米大斑病",
+						type: 19, //5 环境监测 15 管式墒情 11小麦赤霉病 19玉米大斑病
+						list: [],
+						pageIndex: 1,
+						tf: false,
+					},
+					{
+						name: "小麦条锈病",
+						type: 20, //5 环境监测 15 管式墒情 11小麦赤霉病 19玉米大斑病  20小麦条锈病
+						list: [],
+						pageIndex: 1,
+						tf: false,
+					},
 				],
-				active:0,//tab选中的下标
-				side_type:5,//当前选中的设备类型
+				active: 0, //tab选中的下标
+				side_type: 5, //当前选中的设备类型
 				show: false,
 				title: "",
-				content: ""
-			}
+				content: "",
+			};
 		},
 		methods: {
-			async eqlist() { //设备列表
-				this.loadingtf = true
+			async eqlist() {
+				console.log("搜素字段s", this.imports);
+				//设备列表 环境监测
+				this.loadingtf = true;
 				const res = await this.$myRequest({
-					url: '/api/api_gateway?method=weather.weather.qxz_page',
-					data: {
-						page: this.page,
-						device_status:this.device_status,
-						page_size: 10,
-					}
-				})
-				this.loadingtf = false
-				this.eqlistdata = this.eqlistdata.concat(res.ids)
-				console.log(res.ids)
-			},
-			async tubulareqlist() { //设备列表 环境监测
-				this.loadingtf = true
-				const res = await this.$myRequest({
-					url: '/api/api_gateway?method=weather.weather.nd_qxz_page',
+					url: "/api/api_gateway?method=weather.weather.qxz_page",
 					data: {
 						page: this.page,
 						device_status: this.device_status,
 						page_size: 10,
-					}
-				})
-				this.loadingtf = false
-				this.eqlistdata = this.eqlistdata.concat(res.ids)
+						device_id: this.imports,
+					},
+				});
+				this.loadingtf = false;
+				this.eqlistdata = this.eqlistdata.concat(res.ids);
 				for (var i = 0; i < this.eqlistdata.length; i++) {
 					if (this.eqlistdata[i].device_expire == 0) {
-						this.eqlistdata[i]['device_expiretext'] = "未到期"
+						this.eqlistdata[i]["device_expiretext"] = "未到期";
 					} else if (this.eqlistdata[i].device_expire == 1) {
-						this.eqlistdata[i]['device_expiretext'] = "已到期"
+						this.eqlistdata[i]["device_expiretext"] = "已到期";
 					} else if (this.eqlistdata[i].device_expire == 2) {
-						this.eqlistdata[i]['device_expiretext'] = "即将到期"
+						this.eqlistdata[i]["device_expiretext"] = "即将到期";
 					}
 				}
-				console.log(res.ids)
+				console.log(res.ids);
+			},
+			// weather.weather.nd_qxz_page 管式墒情
+			async tubulareqlist() {
+				//设备列表 环境监测
+				this.loadingtf = true;
+				const res = await this.$myRequest({
+					url: "/api/api_gateway?method=weather.weather.nd_qxz_page",
+					data: {
+						page: this.page,
+						device_status: this.device_status,
+						page_size: 10,
+						device_id: this.imports,
+					},
+				});
+				this.loadingtf = false;
+				this.eqlistdata = this.eqlistdata.concat(res.ids);
+			},
+			//设备列表 病害
+			async getEquipList() {
+				this.loadingtf = true;
+				const res = await this.$myRequest({
+					method: "POST",
+					url: "/api/api_gateway?method=wheat.wheat.wheat_list",
+					data: {
+						device_id: this.imports,
+						device_name: "",
+						page: this.page,
+						device_type: this.diseaseId,
+					},
+				});
+				this.loadingtf = false;
+				this.eqlistdata = this.eqlistdata.concat(res.ids);
 			},
 			clickRight() {
-				uni.navigateTo({
-					url: "./search?type="+this.side_type
-				})
+				this.width = 600;
 			},
 			clickLeft() {
 				uni.switchTab({
-					url: "../index/index"
-				})
+					url: "../index/index",
+				});
 			},
 			eqdetails(data) {
-				if(this.side_type == 5){
+				console.log(data, this.side_type);
+				if (this.side_type == 5) {
+					uni.navigateTo({
+						url: "./equipment?shebei=" + JSON.stringify(data),
+					});
+				} else if (this.side_type == 15) {
+					uni.navigateTo({
+						url: "./gsequipment?shebei=" + JSON.stringify(data),
+					});
+				} else if (this.side_type == 11) {
 					uni.navigateTo({
-						url: "./equipment?shebei=" + JSON.stringify(data)
-					})
-				}else if(this.side_type == 15){
+						url: "../disease/cmb?shebei=" + JSON.stringify(data),
+					});
+				} else if (this.side_type == 19) {
 					uni.navigateTo({
-						url: "./gsequipment?shebei=" + JSON.stringify(data)
-					})
+						url: "../disease/cmb?shebei=" + JSON.stringify(data),
+					});
+				} else if (this.side_type == 20) {
+					uni.navigateTo({
+						url: "../disease/cmb?shebei=" + JSON.stringify(data),
+					});
 				}
 			},
-			filtrate(){
-				this.filtrateTF = !this.filtrateTF
+			filtrate() {
+				this.filtrateTF = !this.filtrateTF;
 			},
 			top() {
 				uni.pageScrollTo({
 					scrollTop: 0,
-					duration: 500
-				})
+					duration: 500,
+				});
+			},
+			online() {
+				this.eqlistdata = [];
+				this.page = 1;
+				this.device_status = 1;
+				this.eqlist();
+				this.filtrateTF = !this.filtrateTF;
 			},
-			online(){
-				this.eqlistdata=[]
-				this.page = 1
-				this.device_status = 1
-				this.eqlist()
-				this.filtrateTF = !this.filtrateTF
+			offline() {
+				this.eqlistdata = [];
+				this.page = 1;
+				this.device_status = 0;
+				this.eqlist();
+				this.filtrateTF = !this.filtrateTF;
 			},
-			offline(){
-				this.eqlistdata=[]
-				this.page = 1
-				this.device_status = 0
-				this.eqlist()
-				this.filtrateTF = !this.filtrateTF
+			complete() {
+				this.eqlistdata = [];
+				this.page = 1;
+				this.device_status = "";
+				this.eqlist();
+				this.filtrateTF = !this.filtrateTF;
 			},
-			complete(){
-				this.eqlistdata=[]
-				this.page = 1
-				this.device_status = ""
-				this.eqlist()
-				this.filtrateTF = !this.filtrateTF
+			search() {
+				//搜索按钮搜索
+				this.searchinp();
 			},
-			tabClick(index,type){
-				this.active = index
-				this.side_type = type
-				this.page = 1
-				if(type == 5){
-					this.eqlistdata = []
-					this.eqlist()
-				}else if(type == 15){
-					this.eqlistdata = []
-					this.tubulareqlist()
+			searchinp() {
+				//自动搜索
+				Debounce(() => {
+					this.page = 1;
+					if (this.side_type == 5) {
+						this.eqlistdata = [];
+						this.eqlist();
+					} else if (this.side_type == 15) {
+						this.eqlistdata = [];
+						this.tubulareqlist();
+					} else if (
+						this.side_type == 11 ||
+						this.side_type == 19 ||
+						this.side_type == 20
+					) {
+						this.eqlistdata = [];
+						this.getEquipList();
+					}
+				}, 1000)();
+			},
+			tabClick(index, type) {
+				this.active = index;
+				this.side_type = type;
+				this.page = 1;
+				if (type == 5) {
+					this.eqlistdata = [];
+					this.eqlist();
+				} else if (type == 15) {
+					this.eqlistdata = [];
+					this.tubulareqlist();
+				} else if (type == 11) {
+					this.diseaseId = type;
+					this.eqlistdata = [];
+					this.getEquipList();
+				} else if (type == 19) {
+					this.diseaseId = type;
+					this.eqlistdata = [];
+					this.getEquipList();
+				} else if (type == 20) {
+					this.diseaseId = type;
+					this.eqlistdata = [];
+					this.getEquipList();
 				}
 			},
 			examine(e) {
 				// console.log(this)
-				this.show = true
-				this.title = e.device_expiretext
-				this.content = `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间  ${this.timezhuan(e.device_expire_time)}
-				</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`
+				this.show = true;
+				this.title = e.device_expiretext;
+				this.content =
+					`<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间  ${this.timezhuan(
+        e.device_expire_time
+      )}
+				</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`;
 			},
 			timezhuan(time) {
 				function fun(a) {
-					return String(a).length == 1 ? '0' + a : a
+					return String(a).length == 1 ? "0" + a : a;
 				}
-				let date = new Date(time * 1000)
-				let y = date.getFullYear()
-				let m = date.getMonth() + 1
-				let d = date.getDate()
-				let h = date.getHours()
-				let min = date.getMinutes()
-				let sec = date.getSeconds()
-				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
+				let date = new Date(time * 1000);
+				let y = date.getFullYear();
+				let m = date.getMonth() + 1;
+				let d = date.getDate();
+				let h = date.getHours();
+				let min = date.getMinutes();
+				let sec = date.getSeconds();
+				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`;
 			},
 		},
 		onLoad() {
-			this.eqlist()
+			this.eqlist();
 			uni.getStorage({
-				key:"jurisdiction",
-				success:(res)=>{
-					let items = JSON.parse(res.data).filter((item)=>{
-						return item.purview_name == "环境监测系统"
-					})
-					var itemarr = items[0].children
-					console.log(itemarr)
-					for(var i =0;i<itemarr.length;i++){
-						switch (itemarr[i].purview_name){
-							case "环境监测":
-								this.equipArr[0].tf = true
-								break
-							case "管式墒情":
-								this.equipArr[1].tf = true
-								break
+				key: "jurisdiction",
+				success: (res) => {
+					let items = JSON.parse(res.data).filter((item) => {
+						return item.pur_id == 40;
+					});
+					var itemarr = items[0].children;
+					console.log(itemarr);
+					for (var i = 0; i < itemarr.length; i++) {
+						switch (itemarr[i].pur_id) {
+							case 41:
+								this.equipArr[0].tf = true;
+								break;
+							case 170:
+								this.equipArr[1].tf = true;
+								break;
+							case 218:
+								this.equipArr[2].tf = true;
+								break;
+							case 219:
+								this.equipArr[3].tf = true;
+								break;
+							case 220:
+								this.equipArr[4].tf = true;
+								break;
 						}
 					}
-				}
-			})
+				},
+			});
 		},
 		onReachBottom() {
-			this.page++
-			this.eqlist()
+			this.page++;
+			if (this.side_type == 5) {
+				this.eqlist();
+			} else if (this.side_type == 15) {
+				this.tubulareqlist();
+			} else if (
+				this.side_type == 11 ||
+				this.side_type == 19 ||
+				this.side_type == 20
+			) {
+				this.getEquipList();
+			}
 		},
-		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
-			if (e.scrollTop > 200) { //距离大于200时显示
-				this.isTop = true
-			} else { //距离小于200时隐藏
-				this.isTop = false
+		onPageScroll(e) {
+			//nvue暂不支持滚动监听,可用bindingx代替
+			if (e.scrollTop > 200) {
+				//距离大于200时显示
+				this.isTop = true;
+			} else {
+				//距离小于200时隐藏
+				this.isTop = false;
 			}
 		},
-	}
+	};
 </script>
 
 <style lang="scss">
+	page {
+		background: $uni-bg-color-grey;
+	}
+
+	.inputs {
+		height: 54rpx;
+		background-color: #e4e4e4;
+		border-radius: 27rpx;
+		position: absolute;
+		right: 20rpx;
+		top: 20rpx;
+		transition: width 0.5s;
+		overflow: hidden;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+
+		.inputbox {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
 	/deep/.uni-icons {
 		font-size: 40rpx !important;
 	}
-	page{
-		background: $uni-bg-color-grey;
-	}
+
 	.image {
 		position: fixed;
-		top: 80px;
+		top: 84px;
 		width: 100%;
 		height: 160rpx;
 		z-index: 555;
 	}
-	.loading{
+
+	.loading {
 		position: fixed;
 		top: 440px;
 		width: 95%;
 		left: 2.5%;
 		text-align: center;
-		.img{
+		z-index: 9;
+
+		.img {
 			width: 300rpx;
 			height: 40rpx;
 		}
 	}
-	.bases_search {
-		width: 60%;
-		background-color: #FFFFFF;
-		position: absolute;
-		top: 10rpx;
-		left: 50%;
-		margin-left: -33%;
-		.bases_search_text {
-			width: 90%;
-			margin: 0 auto;
-			background-color: #F8F8F8;
-			height: 60rpx;
-			border-radius: 30rpx;
-			display: flex;
-			line-height: 60rpx;
-			.search {
-				padding: 0 20rpx;
-				font-size: 34rpx;
-			}
-	
-			input {
-				width: 80%;
-				margin-top: 10rpx;
-				font-size: 28rpx;
-			}
-		}
+
+	.tab-box::-webkit-scrollbar {
+		display: none;
 	}
+
 	.tab-box {
 		position: fixed;
-		top: 159px;
-		display: flex;
-		justify-content: space-around;
+		top: 170px;
+		// display: flex;
+		// justify-content: space-around;
 		font-size: 30rpx;
 		line-height: 80rpx;
-		background-color: #FFFFFF;
+		background-color: #ffffff;
 		width: 100%;
 		z-index: 2;
+		overflow: hidden;
+		overflow-x: scroll;
+		white-space: nowrap;
+
 		.tab-item {
 			cursor: pointer;
 			position: relative;
-		};
+			width: 25%;
+			text-align: center;
+			display: inline-block;
+		}
+
 		.tab-item.active {
 			.bottom-line {
 				bottom: 0;
@@ -357,10 +528,11 @@
 			}
 		}
 	}
+
 	.prevents {
 		width: 100%;
 		position: absolute;
-		top: 170px;
+		top: 180px;
 
 		.prevents_item {
 			width: 95%;
@@ -371,6 +543,7 @@
 			box-sizing: border-box;
 			position: relative;
 			background-color: #fff;
+
 			.prevents_item_img {
 				width: 30rpx;
 				height: 50rpx;
@@ -383,7 +556,7 @@
 				display: flex;
 				justify-content: space-between;
 				height: 60rpx;
-				border-bottom: 2rpx solid #F4F4F4;
+				border-bottom: 2rpx solid #f4f4f4;
 				line-height: 60rpx;
 				font-size: 26rpx;
 
@@ -392,49 +565,55 @@
 				}
 
 				.green {
-					color: #7DBB91;
+					color: #7dbb91;
 				}
 			}
 
 			.prevents_item_bot {
 				margin-top: 20rpx;
 				font-size: 26rpx;
-				color: #BDBDBD;
+				color: #bdbdbd;
+
 				.prevents_item_bot_sapn0 {
-					color: #00B075;
+					color: #00b075;
 				}
-				
+
 				.prevents_item_bot_sapn1 {
-					color: #FF4747;
+					color: #ff4747;
 				}
-				
+
 				.prevents_item_bot_sapn2 {
-					color: #FFAB00;
+					color: #ffab00;
 				}
 			}
 		}
 	}
+
 	.top {
 		position: fixed;
 		right: 10px;
 		bottom: 40px;
 		z-index: 100;
+
 		image {
 			width: 100rpx;
 			height: 100rpx;
 		}
-		.backtop{
+
+		.backtop {
 			display: flex;
 			justify-content: flex-end;
 			margin-bottom: 10rpx;
 		}
-		.more{
+
+		.more {
 			display: flex;
 		}
-		.box{
+
+		.box {
 			width: 80rpx;
 			height: 80rpx;
-			background-color: rgba(161,161,161,0.45);
+			background-color: rgba(161, 161, 161, 0.45);
 			border-radius: 50%;
 			text-align: center;
 			line-height: 80rpx;

+ 28 - 23
pages/equipList/index.vue

@@ -157,11 +157,14 @@
 				})
 				console.log(res)
 				for (var i = 0; i < res.length; i++) {
-					if(res[i].type_name == "性诱3.0" ||
-					   res[i].type_name == "吸虫塔" ||
-					   res[i].type_name == "病虫害可视监测" ||
-					   res[i].type_name == "小麦赤霉病" ||
-					   res[i].type_name == "温室大棚" 
+					if(res[i].id == 8 ||
+					   res[i].id == 12 ||
+					   res[i].id == 14 ||
+					   res[i].id == 11||
+					   res[i].id == 13  ||
+					   res[i].id == 16  ||
+					   res[i].id == 17  ||
+					   res[i].id == 18 
 					   ){
 						continue;
 					}
@@ -199,7 +202,7 @@
 			},
 			modification(item) {
 				uni.navigateTo({
-					url: "./modification?data=" + JSON.stringify(item) + "&id=" + this.type_id,
+					url: "./seabox/modification?data=" + JSON.stringify(item) + "&id=" + this.type_id,
 				})
 			},
 			top() {
@@ -331,7 +334,7 @@
 				
 			},
 		},
-		onShow() {
+		onLoad() {
 			this.list = []
 			this.camera()
 			this.current = 0
@@ -340,22 +343,24 @@
 			this.usertype()
 			this.width = 0
 			uni.getStorage({
-				key: "jurisdiction",
-				success: (res) => {
-					console.log(JSON.parse(res.data))
-					let items = JSON.parse(res.data).filter((item) => {
-						return item.purview_name == "设备管理"
-					})
-					let items2 = items[0].children.filter((item) => {
-						return item.purview_name == "设备列表"
-					})
-					console.log(items2[0].children)
-					this.infoalter = items2[0].children.some((item) => {
-						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
-					})
-					console.log(this.infoalter)
-				},
-			})
+			  key: "jurisdiction",
+			  success: (res) => {
+			    console.log(JSON.parse(res.data));
+			    let items = JSON.parse(res.data).filter((item) => {
+			      return item.pur_id == 22//"设备管理";
+			    });
+			    let items2 = items[0].children.filter((item) => {
+			      return item.pur_id == 23//"设备列表";
+			    });
+			    console.log(items2[0].children);
+			    this.infoalter = items2[0].children.some((item) => {
+			      return (
+			        item.pur_id == 108 || item.pur_id == 109
+			      );
+			    });
+			    console.log(this.infoalter);
+			  },
+			});
 		},
 		onReachBottom() {
 			this.page++

pages/equipList/modification.vue → pages/equipList/seabox/modification.vue


+ 1 - 1
pages/equipList/search.vue

@@ -39,7 +39,7 @@
 	import {
 		Debounce,
 		Throttle
-	} from "../../util/anitthro.js"
+	} from "../../../util/anitthro.js"
 	export default {
 		data() {
 			return {

+ 8 - 5
pages/equipMange/index/assignment.vue

@@ -82,11 +82,14 @@
 					}
 				]
 				for (var i = 0; i < res.length; i++) {
-					if(res[i].type_name == "性诱3.0" ||
-					   res[i].type_name == "吸虫塔" ||
-					   res[i].type_name == "病虫害可视监测" ||
-					   res[i].type_name == "小麦赤霉病" ||
-					   res[i].type_name == "温室大棚" 
+					if(res[i].id == 8  ||
+					   res[i].id == 12 ||
+					   res[i].id == 14 ||
+					   res[i].id == 11 ||
+					   res[i].id == 13 ||
+					   res[i].id == 16 ||
+					   res[i].id == 17 ||
+					   res[i].id == 18 
 					   ){
 						continue;
 					}

+ 9 - 9
pages/equipMange/index/index.vue

@@ -142,20 +142,20 @@
 		onLoad() {
 			this.getState(this.argument)
 			uni.getStorage({
-				key: "jurisdiction",
-				success: (res) => {
+				key:"jurisdiction",
+				success:(res)=>{
 					console.log(JSON.parse(res.data))
-					let items = JSON.parse(res.data).filter((item) => {
-						return item.purview_name == "系统管理"
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.pur_id == 28//"系统管理"
 					})
-					let items2 = items[0].children.filter((item) => {
-						return item.purview_name == "用户管理"
+					let items2 = items[0].children.filter((item)=>{
+						return item.pur_id == 29//"用户管理"
 					})
 					var arr = items2[0].children
 					console.log(arr)
-					for (var i = 0; i < arr.length; i++) {
-						switch (arr[i].purview_name) {
-							case "添加用户":
+					for(var i =0;i<arr.length;i++){
+						switch (arr[i].pur_id){
+							case 116://"添加用户"
 								this.addtf = true
 								break
 						}

+ 3 - 2
pages/expertDiagnosis/index.vue

@@ -116,10 +116,11 @@
 				success:(res)=>{
 					console.log(JSON.parse(res.data))
 					let items = JSON.parse(res.data).filter((item)=>{
-						return item.purview_name == "专家诊断"
+						return item.pur_id == 124//"专家诊断"
 					})
+					console.log(items)
 					this.jurisdiction = items[0].children.some((item)=>{
-						return item.purview_name == "发帖列表"
+						return item.pur_id == 143//"发帖列表"
 					})
 				},
 			})

+ 30 - 8
pages/fourBase/index.vue

@@ -23,12 +23,16 @@
 						</view>
 					</view>
 					<view class="bases_list_text">
-						<p><span style="margin-right: 30rpx;">{{items.base_name}}</span><span>{{items.base_area}}亩</span></p>
+						<p >{{items.base_name}}</p>
+						<p style="margin-right: 24rpx;">面积:{{items.base_area}}亩</p>
 						<p style="font-size: 24rpx;">联系人:{{items.base_charge}}</p>
 						<p style="font-size: 24rpx;">联系电话:{{items.base_phone}}</p>
-						<p style="font-size: 24rpx;">地址:{{items.base_name}}</p>
+						<p style="font-size: 24rpx;">描述:{{items.base_describe}}</p>
+					</view>
+					<!-- <u-icon name="more-dot-fill" class="bases_list_xiangqing" @click.native.stop="XQclick(items)"></u-icon> -->
+					<view class="bases_list_xiangqing">
+						<u-icon name="more-dot-fill" class="" @click.native.stop="XQclick(items)"></u-icon>
 					</view>
-					<u-icon name="more-dot-fill" class="bases_list_xiangqing" @click.native.stop="XQclick(items)"></u-icon>
 					<view class="photoshow">
 						<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/fourMoodBase/1.png'" mode=""></image>
 						<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/fourMoodBase/3.png'" mode=""></image>
@@ -193,17 +197,17 @@
 				success:(res)=>{
 					console.log(JSON.parse(res.data))
 					let items = JSON.parse(res.data).filter((item)=>{
-						return item.purview_name == "四情基地"
+						return item.pur_id == 25//"四情基地"
 					})
 					let items2 = items[0].children.filter((item)=>{
-						return item.purview_name == "基地管理"
+						return item.pur_id == 26//"基地管理"
 					})
 					console.log(items2)
 					this.jurisdiction.addbase =items2[0].children.some((item)=>{
-						return item.purview_name == "新增"
+						return item.pur_id == 111//"新增"
 					})
 					this.jurisdiction.alter =items2[0].children.some((item)=>{
-						return item.purview_name == "修改"
+						return item.pur_id == 110//"修改"
 					})
 				},
 			})
@@ -269,6 +273,7 @@
 	}
 	.bases {
 		width: 100%;
+		height: 90%;
 		position: relative;
 		top: 170rpx;
 		margin-bottom:100rpx;
@@ -298,15 +303,29 @@
 			}
 
 			.bases_list_text {
+				width: 100%;
 				position: absolute;
 				top: 0;
 				left: 0;
 				z-index: 10;
 				padding: 40rpx;
 				color: #FFFFFF;
-
+				box-sizing: border-box;
+				p:first-child{
+					font-size: 36rpx;
+					width: 80%;
+				}
+				p:nth-child(3){
+					width: 70%;
+				}
+				p:last-child{
+					width: 70%;
+				}
 				p {
 					margin-bottom: 10rpx;
+					overflow: hidden;//溢出隐藏
+					white-space: nowrap;//禁止换行
+					text-overflow: ellipsis;//...
 				}
 			}
 
@@ -317,6 +336,9 @@
 				transform: rotate(90deg);
 				font-size: 26rpx;
 				color: #FFFFFF;
+				width: 40rpx;
+				height: 40rpx;
+				z-index: 99999;
 			}
 
 			.photoshow {

+ 24 - 21
pages/index/index.vue

@@ -8,7 +8,7 @@
 					{{hello}}
 				</view>
 				<view class="">
-					欢迎登云飞智控
+					欢迎登云飞智控
 				</view>
 			</view>
 		</view>
@@ -88,7 +88,7 @@
 						防治系统
 					</view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../pages/monitor/index')">
+				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../monitor/index')">
 					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/jk.png" mode="" class="itemimg"></image>
 					<view class="">
 						监控系统
@@ -373,33 +373,36 @@
 				}
 				console.log(res.children)
 				for (var i = 0; i < res.children.length; i++) {
-					switch (res.children[i].purview_name) {
-						case "测报系统":
-							this.jurisdiction.cbtf = true
+					switch (res.children[i].pur_id) {
+						case 36:
+							this.jurisdiction.cbtf = true//"测报系统"
 							break;
-						case "可视农业":
-							this.jurisdiction.jktf = true
+						case 42:
+							this.jurisdiction.jktf = true//"可视农业"
 							break;
-						case "环境监测系统":
-							this.jurisdiction.hjtf = true
+						case 40:
+							this.jurisdiction.hjtf = true//"环境监测系统"
 							break;
-						case "防治系统":
-							this.jurisdiction.fztf = true
+						case 44:
+							this.jurisdiction.fztf = true//"防治系统"
 							break;
-						case "溯源系统":
-							this.jurisdiction.sytf = true
+						case 58:
+							this.jurisdiction.sytf = true//"溯源系统"
 							break;
-						case "系统管理":
-							this.jurisdiction.sbtf = true
+						case 28:
+							this.jurisdiction.sbtf = true//"系统管理"
 							break;
-						case "四情基地":
-							this.jurisdiction.sqtf = true
+						case 25:
+							this.jurisdiction.sqtf = true//"四情基地"
 							break;
-						case "专家诊断":
-							this.jurisdiction.zjtf = true
+						case 124:
+							this.jurisdiction.zjtf = true//"专家诊断"
 							break;
-						case "灌溉控制系统":
-							this.jurisdiction.ggtf = true
+						// case "灌溉控制系统":
+						// 	this.jurisdiction.sftf = true
+						// 	break;
+						case 202:
+							this.jurisdiction.ggtf = true//"灌溉控制系统"
 							break;
 					}
 				}

+ 703 - 0
pages/irrigate/index.vue

@@ -0,0 +1,703 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 44px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="灌溉控制系统" right-icon="search"
+					@clickRight="clickRight" size="16"></uni-nav-bar>
+				<view class="inputs" :style="{'width':width+'rpx'}">
+					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
+						class="inputbox" :clearable="false" />
+					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+				</view>
+			</view>
+			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/irrigate/1.png'" mode="" class="image">
+			</image>
+			<view class="loading" v-if="loadingtf">
+				<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
+			</view>
+			<view class="tab-box">
+				<view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf"
+					@click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
+					<text>{{item.name}}</text>
+					<text class="bottom-line"></text>
+				</view>
+			</view>
+			<view class="prevents">
+				<view class="prevents_item" v-for="item,index in eqlistdata" :key="index" @click="eqdetails(item)">
+					<view class="" v-if="side_type == 18">
+						<image
+							:src="item.device_status==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
+							mode="" class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.device_name}}</p>
+							<view class="" style="display: flex;">
+								<view class="" :style="{'margin-right': '10rpx','color':item.status2?'#00B075':'#f00'}">
+									{{item.status2?"已启用":"已禁用"}}
+								</view>
+								<u-switch v-model="item.status2" size="35" active-color="#00B075"
+									style="margin-top: 10rpx;" inactive-color="#f00"
+									@change="switchchange2($event,item.d_id,index)">
+								</u-switch>
+							</view>
+						</view>
+						<view class="prevents_item_bot">
+							<view class="prevents_item_bot_item">
+								<p>设备 ID:{{item.device_id}}</p>
+								<p @click="newdata(item)">数据查看</p>
+							</view>
+							<p style="color:#909696;height: 60rpx;line-height: 60rpx;">
+								设备状态:{{item.device_status==1?"在线":"离线"}}</p>
+							<p style="color:#909696;height: 60rpx;line-height: 60rpx;">设备备注:{{item.device_notes}}
+								<u-icon name="edit-pen" size="36" color="#00B075" @click="changeremark(item,index)">
+								</u-icon>
+							</p>
+							<view class="prevents_item_bot_item">
+								<p>地址:{{item.city}}</p>
+								<u-icon name="map" size="40" color="#00B075"
+									@click="selectaddress(item.city,item.device_name)"></u-icon>
+							</view>
+						</view>
+					</view>
+					<view class="" v-if="side_type == 17">
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
+							class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.device_name}}</p>
+							<view class="" style="display: flex;">
+								<view class=""
+									:style="{'margin-right': '10rpx','color':item.water_pump_switch2?'#00B075':'#f00'}">
+									{{item.water_pump_switch2?"已开泵":"已关泵"}}
+								</view>
+								<u-switch v-model="item.water_pump_switch2" size="35" active-color="#00B075"
+									inactive-color="#f00" style="margin-top: 10rpx;"
+									@change="switchchange($event,item.device_id,index)">
+								</u-switch>
+							</view>
+						</view>
+						<view class="prevents_item_bot">
+							<view class="prevents_item_bot_item">
+								<p>设备 ID:{{item.device_id}}</p>
+								<p @click="newdata(item)" v-if="item.water_pump_switch2">实时数据</p>
+							</view>
+							<p style="color:#909696;height: 60rpx;line-height: 60rpx;">
+								设备状态:{{item.device_status==1?"在线":"离线"}}</p>
+							<p style="color:#909696;height: 60rpx;line-height: 60rpx;">设备备注:{{item.device_notes}}
+								<u-icon name="edit-pen" size="36" color="#00B075" @click="changeremark(item,index)">
+								</u-icon>
+							</p>
+							<view class="prevents_item_bot_item">
+								<p>地址:{{item.city}}</p>
+								<u-icon name="map" size="40" color="#00B075"
+									@click="selectaddress(item.city,item.device_name)"></u-icon>
+							</view>
+						</view>
+					</view>
+					<view class="" v-if="side_type == 13">
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
+							class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.device_name}}</p>
+						</view>
+						<view class="prevents_item_bot">
+							<p>设备 ID:{{item.equip_id || item.device_id}}</p>
+							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-modal v-model="show" :show-cancel-button="true" title="请设置开泵时间" @confirm="modalconfirm"
+			@cancel="modalcancel">
+			<view class="slot-content">
+				<u-input v-model="timevalue" type="number" />分钟
+			</view>
+		</u-modal>
+		<u-modal v-model="showremark" :show-cancel-button="true" title="请填写设备备注" @confirm="modalconfirmremark"
+			@cancel="modalcancelremark">
+			<view class="slot-contentremark">
+				<u-input v-model="timevalueremark" maxlength="12" />
+			</view>
+		</u-modal>
+		<view class="top">
+			<view class="backtop" @click="top" v-if="isTop">
+				<image src="../../static/images/1.png" mode="" class="img0"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce
+	} from "../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				page: 1,
+				size: 10,
+				eqlistdata: [],
+				isTop: false,
+				filtrateTF: false,
+				device_status: "",
+				width: 0, //顶部搜索栏宽度
+				imports: "", //搜索设备id
+				loadingtf: false,
+				equipArr: [{
+					name: '机井水电双控',
+					type: 17, //5 环境监测 15 管式墒情
+					list: [],
+					pageIndex: 1,
+					tf: false,
+				}, {
+					name: '水肥一体化(L)',
+					type: 18, //5 环境监测 15 管式墒情
+					list: [],
+					pageIndex: 1,
+					tf: false,
+				}, {
+					name: '水肥一体化(X)',
+					type: 13, //5 环境监测 15 管式墒情
+					list: [],
+					pageIndex: 1,
+					tf: false,
+				}],
+				active: 0, //tab选中的下标
+				side_type: 17, //当前选中的设备类型
+				show: false,
+				timevalue: "",
+				selindex: "", //选中的设备index
+				selid: "", //选中的设备id
+				showremark: false,
+				timevalueremark: ""
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表 水肥一体化 L
+				this.loadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fertilizer_list',
+					data: {
+						page: this.page,
+						page_size: 10,
+						content: this.imports
+					}
+				})
+				console.log(res)
+				this.loadingtf = false
+				for (var i = 0; i < res.data.length; i++) {
+					res.data[i]["status2"] = res.data[i].status == 1 ? true : false
+				}
+				this.eqlistdata = this.eqlistdata.concat(res.data)
+			},
+			async tubulareqlist() { //水电双计
+				this.loadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.hydropower.hydropower_list',
+					data: {
+						page: this.page,
+						page_size: 10,
+						content: this.imports
+					}
+				})
+				console.log(res)
+				this.loadingtf = false
+				for (var i = 0; i < res.data.length; i++) {
+					res.data[i]["water_pump_switch2"] = res.data[i].water_pump_switch == 1 ? true : false
+				}
+				this.eqlistdata = this.eqlistdata.concat(res.data)
+				// console.log(res)
+			},
+			async sfeqlist() { //设备列表
+				this.loadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_page',
+					data: {
+						page: this.page,
+						page_size: "10",
+						device_id: this.imports,
+					}
+				})
+				this.loadingtf = false
+				this.eqlistdata = this.eqlistdata.concat(res.ids)
+				console.log(this.eqlistdata)
+			},
+			clickRight() {
+				this.width = 600
+			},
+			clickLeft() {
+				uni.switchTab({
+					url: "../index/index"
+				})
+			},
+			eqdetails(data) {
+				if (this.side_type == 13) {
+					uni.navigateTo({
+						url: "../waterandfer/datails?shebei=" + JSON.stringify(data)
+					})
+				}
+			},
+			top() {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 500
+				})
+			},
+			search() { //搜索按钮搜索
+				this.searchinp()
+			},
+			searchinp() { //自动搜索
+				Debounce(() => {
+					this.page = 1
+					this.eqlistdata = []
+					if (this.side_type == 18) {
+						this.eqlist()
+					} else if (this.side_type == 17) {
+						this.tubulareqlist()
+					} else if (this.side_type == 13) {
+						this.sfeqlist()
+					}
+				}, 1000)()
+			},
+			tabClick(index, type) {
+				this.active = index
+				this.side_type = type
+				this.page = 1
+				if (type == 18) {
+					this.eqlistdata = []
+					this.eqlist()
+				} else if (type == 17) {
+					this.eqlistdata = []
+					this.tubulareqlist()
+				} else if (type == 13) {
+					this.eqlistdata = []
+					this.sfeqlist()
+				}
+			},
+			timezhuan(time) {
+				function fun(a) {
+					return String(a).length == 1 ? '0' + a : a
+				}
+				let date = new Date(time * 1000)
+				let y = date.getFullYear()
+				let m = date.getMonth() + 1
+				let d = date.getDate()
+				let h = date.getHours()
+				let min = date.getMinutes()
+				let sec = date.getSeconds()
+				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
+			},
+			newdata(item) {
+				if (this.side_type == 17) {
+					uni.navigateTo({
+						url: "realtimedata?item=" + JSON.stringify(item)
+					})
+				} else {
+					uni.navigateTo({
+						url: "weathdata?item=" + JSON.stringify(item)
+					})
+				}
+
+			},
+			selectaddress(city, name) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/geo?address=" + city +
+						"&key=78ce288400f4fc6d9458989875c833c2",
+					dataType: "json",
+					complete: ress => {
+						console.log(ress)
+						if (ress.data.status == 1) {
+							// ress.data.geocodes[0].location
+							uni.navigateTo({
+								url: "./irrmap?lnglat=" + ress.data.geocodes[0].location +
+									"&basename=" + name
+							})
+						} else {
+							uni.showToast({
+								title: "地址编译失败",
+								icon: "none"
+							})
+						}
+					}
+				});
+			},
+			async pumpcontrol(en) { //水肥开关
+				console.log(en)
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.hydropower.water_pump_control',
+					data: {
+						times: Math.floor(this.timevalue * 60),
+						device_id: this.selid,
+						status: en ? 1 : 0
+					}
+				})
+				console.log(res)
+				if (res.code == 200) {
+					uni.showToast({
+						title: "操作成功",
+						icon: "none"
+					})
+				} else {
+					uni.showToast({
+						title: res.msg,
+						icon: "none"
+					})
+					this.eqlistdata[this.selindex].water_pump_switch2 = !this.eqlistdata[this.selindex]
+						.water_pump_switch2
+				}
+				this.timevalue = ""
+			},
+			switchchange(e, id, index) { //水肥 开关
+				console.log(e)
+				if (e) {
+					this.show = true
+					this.selindex = index
+					this.selid = id
+				} else {
+					this.selid = id
+					this.pumpcontrol(false)
+				}
+			},
+			async switchchange2(e, id, index) { //水电开关
+				console.log(id)
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fertilizer_control',
+					data: {
+						device_ids: id,
+						isopen: e ? 1 : 0
+					}
+				})
+				console.log(res)
+				if (res.info == "ok") {
+					uni.showToast({
+						title: "操作成功",
+						icon: "none"
+					})
+				} else {
+					uni.showToast({
+						title: res.msg,
+						icon: "none"
+					})
+					this.eqlistdata[index].status2 = !this.eqlistdata[index].status2
+				}
+			},
+			modalcancel() { //水肥开关 确定
+				this.eqlistdata[this.selindex].water_pump_switch2 = !this.eqlistdata[this.selindex].water_pump_switch2
+				this.timevalue = ""
+			},
+			modalconfirm() { //水肥开关 取消
+				this.show = true
+				if (this.timevalue == "") {
+					uni.showToast({
+						title: "请输入开泵时间",
+						icon: "none"
+					})
+				} else {
+					this.show = false
+					this.pumpcontrol(true)
+				}
+			},
+			changeremark(item, index) { //修改备注
+				this.timevalueremark = item.device_notes
+				this.showremark = true
+				this.selindex = index
+				this.selid = item.device_id
+			},
+			modalcancelremark() { //修改备注 取消
+			},
+			modalconfirmremark() { //修改备注 确定
+				this.showremark = true
+				if (this.timevalueremark == "") {
+					uni.showToast({
+						title: "请输入设备备注",
+						icon: "none"
+					})
+				} else {
+					this.showremark = false
+					this.setchangeremark()
+				}
+			},
+			async setchangeremark() { //水肥开关
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.hydropower.water_pump_modify_device_notes',
+					data: {
+						device_id: this.selid,
+						content: this.timevalueremark
+					}
+				})
+				console.log(res)
+				if (res) {
+					uni.showToast({
+						title: "操作成功",
+						icon: "none"
+					})
+					this.eqlistdata[this.selindex].device_notes = this.timevalueremark
+				}
+			},
+		},
+		onLoad() {
+			this.tubulareqlist()
+			uni.getStorage({
+				key: "jurisdiction",
+				success: (res) => {
+					let items = JSON.parse(res.data).filter((item) => {
+						return item.pur_id == 202
+					})
+					var itemarr = items[0].children
+					console.log(itemarr)
+					for (var i = 0; i < itemarr.length; i++) {
+						switch (itemarr[i].pur_id) {
+							case 203:
+								this.equipArr[0].tf = true
+								break
+							case 204:
+								this.equipArr[1].tf = true
+								break
+							case 195:
+								this.equipArr[2].tf = true
+								break;
+						}
+					}
+				}
+			})
+		},
+		onReachBottom() {
+			this.page++
+			// this.eqlist()
+			if (this.side_type == 18) {
+				this.eqlist()
+			} else if (this.side_type == 17) {
+				this.tubulareqlist()
+			} else if (this.side_type == 13) {
+				this.sfeqlist()
+			}
+		},
+		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
+			if (e.scrollTop > 200) { //距离大于200时显示
+				this.isTop = true
+			} else { //距离小于200时隐藏
+				this.isTop = false
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: $uni-bg-color-grey;
+	}
+
+	.inputs {
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		right: 20rpx;
+		top: 20rpx;
+		transition: width 0.5s;
+		overflow: hidden;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+
+		.inputbox {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	/deep/.uni-icons {
+		font-size: 40rpx !important;
+	}
+
+	.image {
+		position: fixed;
+		top: 84px;
+		width: 100%;
+		height: 160rpx;
+		z-index: 555;
+	}
+
+	.loading {
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+		z-index: 9;
+
+		.img {
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
+
+	.tab-box {
+		position: fixed;
+		top: 170px;
+		display: flex;
+		justify-content: space-around;
+		font-size: 30rpx;
+		line-height: 80rpx;
+		background-color: #FFFFFF;
+		width: 100%;
+		z-index: 2;
+
+		.tab-item {
+			cursor: pointer;
+			position: relative;
+		}
+
+		;
+
+		.tab-item.active {
+			.bottom-line {
+				bottom: 0;
+				position: absolute;
+				display: inline-block;
+				width: 90rpx;
+				height: 6rpx;
+				left: 0;
+				right: 0;
+				margin: auto;
+				background: $uni-color-success;
+			}
+		}
+	}
+
+	.prevents {
+		width: 100%;
+		position: absolute;
+		top: 180px;
+
+		.prevents_item {
+			width: 95%;
+			margin: 0 auto 30rpx;
+			border-radius: 10rpx;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding: 20rpx 40rpx 20rpx 80rpx;
+			box-sizing: border-box;
+			position: relative;
+			background-color: #fff;
+
+			.prevents_item_img {
+				width: 30rpx;
+				height: 50rpx;
+				position: absolute;
+				top: -4rpx;
+				left: 30rpx;
+			}
+
+			.prevents_item_top {
+				display: flex;
+				justify-content: space-between;
+				height: 60rpx;
+				border-bottom: 2rpx solid #F4F4F4;
+				line-height: 60rpx;
+				font-size: 26rpx;
+
+				.red {
+					color: #ff0000;
+				}
+
+				.green {
+					color: #7DBB91;
+				}
+			}
+
+			.prevents_item_bot {
+				margin-top: 20rpx;
+				font-size: 26rpx;
+				color: #BDBDBD;
+
+				.prevents_item_bot_item {
+					height: 60rpx;
+					line-height: 60rpx;
+					display: flex;
+					justify-content: space-between;
+					color: #909696;
+
+					p:first-child {
+						width: 80%;
+						overflow: hidden; //溢出隐藏
+						white-space: nowrap; //禁止换行
+						text-overflow: ellipsis; //...
+					}
+
+					p:nth-child(2) {
+						height: 45rpx;
+						color: #00B075;
+						border-bottom: 1px solid #00B075;
+					}
+				}
+
+				.prevents_item_bot_sapn0 {
+					color: #00B075;
+				}
+
+				.prevents_item_bot_sapn1 {
+					color: #FF4747;
+				}
+
+				.prevents_item_bot_sapn2 {
+					color: #FFAB00;
+				}
+			}
+		}
+	}
+
+	.top {
+		position: fixed;
+		right: 10px;
+		bottom: 40px;
+		z-index: 100;
+
+		image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+
+		.backtop {
+			display: flex;
+			justify-content: flex-end;
+			margin-bottom: 10rpx;
+		}
+
+		.more {
+			display: flex;
+		}
+
+		.box {
+			width: 80rpx;
+			height: 80rpx;
+			background-color: rgba(161, 161, 161, 0.45);
+			border-radius: 50%;
+			text-align: center;
+			line-height: 80rpx;
+			box-sizing: border-box;
+			margin: 14rpx 10rpx 0 0;
+			color: #fff;
+		}
+	}
+
+	.slot-content {
+		width: 50%;
+		margin: 30rpx auto;
+		display: flex;
+		line-height: 70rpx;
+	}
+
+	.slot-contentremark {
+		width: 70%;
+		margin: 30rpx auto;
+		display: flex;
+		line-height: 70rpx;
+	}
+</style>

+ 61 - 0
pages/irrigate/irrmap.vue

@@ -0,0 +1,61 @@
+<template>
+	<view>
+		<view class="mapbox">
+			<map class="map" :markers="covers" :latitude="latitude" :longitude="longitude"></map>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				latitude: "",
+				longitude: "",
+				covers: []
+			}
+		},
+		onLoad(option) {
+			console.log(option)
+			// var 
+			var res = option.lnglat.split(",")
+			var obj = {}
+			obj.latitude = Number(res[1])
+			this.latitude = Number(res[1])
+			obj.longitude = Number(res[0])
+			this.longitude = Number(res[0])
+			obj.title = option.basename
+			obj.id = 1
+			obj.callout = { //自定义标记点上方的气泡窗口 点击有效  
+				content: option.basename, //文本
+				color: '#ffffff', //文字颜色
+				fontSize: 14, //文本大小
+				borderRadius: 2, //边框圆角
+				bgColor: '#00c16f', //背景颜色
+				display: 'ALWAYS', //常显
+			}
+			obj.iconPath = "../../static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png"
+			this.covers.push(obj)
+			console.log(this.covers)
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.mapbox {
+		width: 100%;
+		height: 100vh;
+
+		.map {
+			width: 100%;
+			height: 100%;
+
+			/deep/.csssprite {
+				display: none;
+			}
+		}
+	}
+</style>

+ 220 - 0
pages/irrigate/realtimedata.vue

@@ -0,0 +1,220 @@
+<template>
+	<view style="padding-top: 20rpx;">
+		<view class="datainfo">
+			<view class="datainfo_item">
+				<view class="">
+					{{item.device_name}}
+				</view>
+				<view class="" :style="{'color':item.water_pump_switch==1?'#00B075':'#f64a4a'}">
+					{{item.water_pump_switch==1?"已开泵":"已关泵"}}
+				</view>
+			</view>
+			<view class="datainfo_item">
+				设备ID:{{item.device_id}}
+			</view>
+			<view class="datainfo_item">
+				设备备注:{{item.device_notes==''?"--":item.device_notes}}
+			</view>
+			<view class="datainfo_item">
+				设备状态:{{item.device_status==1?"在线":"离线"}}
+			</view>
+			<view class="datainfo_item">
+				<view class="datainfo_item_1">
+					地址:{{item.city}}
+				</view>
+				<view class="">
+					<u-icon name="map" size="40" color="#00B075" @click="selectaddress(item.city,item.device_name)">
+					</u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="datadetails">
+			<view class="datadetails_img">
+				<image src="../../static/images/irrigate/yinxingqia.png" mode="" class="img"></image>
+			</view>
+			<view class="datadetails_box">
+				<view class="datadetails_box_item">
+					用户卡号:{{data.card_no}}
+				</view>
+				<view class="datadetails_box_item">
+					当前耗水量:<span style="color:#00B075;">{{data.water_consume}}T</span>
+				</view>
+				<view class="datadetails_box_item">
+					当前耗电量:<span style="color:#00B075;">{{data.electric_consume}}Kwh</span>
+				</view>
+				<view class="datadetails_box_item">
+					刷卡使用状态:{{data.status==1?"刷卡开泵":"刷卡关泵"}}
+				</view>
+				<view class="datadetails_box_item">
+					倒计时:<span style="color:#00B075;">{{data.time_consume}}s</span>
+				</view>
+				<view class="datadetails_box_item">
+					用户卡余额:<span style="color:#f64a4a;">{{data.money_remain}}</span>
+				</view>
+				<view class="datadetails_box_item">
+					水表总耗电量:{{data.total_water}}
+				</view>
+				<view class="datadetails_box_item">
+					数据更新时间:{{data.addtime|timeFormat()}}
+				</view>
+			</view>
+		</view>
+		<u-mask :show="maskshow">
+			<view class="loading" v-if="maskshow">
+				<image src="../../static/images/cb/6286299.gif" mode="" class="img"></image>
+			</view>
+		</u-mask>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				item: {},
+				data: {},
+				Interval: null,
+				maskshow: false
+			}
+		},
+		onLoad(option) {
+			// console.log(JSON.parse(option.item))
+			this.item = JSON.parse(option.item)
+			this.getbaseinfo()
+			this.Interval = setInterval(() => {
+				this.getbaseinfo()
+			}, 15000)
+		},
+		onHide() {
+			// console.log("5555")
+			// clearInterval(this.Interval)
+		},
+		onBackPress(e) {
+			// console.log("5555")
+			clearInterval(this.Interval)
+		},
+		methods: {
+			async getbaseinfo(){
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.hydropower.hydropower_list',
+					data: {
+						content: this.item.device_id,
+					}
+				})
+				console.log(res)
+				this.item = res.data[0]
+				this.tubulareqlist()
+			},
+			async tubulareqlist() { //实时数据
+				this.maskshow = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.hydropower.water_pump_instant_data',
+					data: {
+						device_id: this.item.device_id,
+					}
+				})
+				this.maskshow = false
+				console.log(res)
+				this.data = {}
+				this.data = res[0]
+			},
+			selectaddress(city, name) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/geo?address=" + city +
+						"&key=78ce288400f4fc6d9458989875c833c2",
+					dataType: "json",
+					complete: ress => {
+						console.log(ress)
+						if (ress.data.status == 1) {
+							// ress.data.geocodes[0].location
+							uni.navigateTo({
+								url: "./irrmap?lnglat=" + ress.data.geocodes[0].location +
+									"&basename=" + name
+							})
+						} else {
+							uni.showToast({
+								title: "地址编译失败",
+								icon: "none"
+							})
+						}
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: $uni-bg-color-grey;
+	}
+
+	.datainfo {
+		width: 100%;
+		background-color: #fff;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+
+		.datainfo_item {
+			display: flex;
+			justify-content: space-between;
+			height: 60rpx;
+			font-size: 28rpx;
+			color: #909696;
+
+			.datainfo_item_1 {
+				width: 80%;
+				overflow: hidden; //溢出隐藏
+				white-space: nowrap; //禁止换行
+				text-overflow: ellipsis; //...
+			}
+		}
+
+		.datainfo_item:first-child {
+			font-size: 32rpx;
+			color: #000;
+		}
+	}
+
+	.datadetails {
+		width: 100%;
+		margin-top: 20rpx;
+		background-color: #fff;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+		display: flex;
+		justify-content: space-between;
+
+		.datadetails_img {
+			width: 5%;
+			height: 40rpx;
+
+			.img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.datadetails_box {
+			width: 92%;
+
+			.datadetails_box_item {
+				height: 60rpx;
+			}
+		}
+	}
+
+	.loading {
+		position: fixed;
+		top: 200px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+
+		.img {
+			width: 300rpx;
+			height: 300rpx;
+		}
+	}
+</style>

+ 320 - 0
pages/irrigate/weathdata.vue

@@ -0,0 +1,320 @@
+<template>
+	<view style="padding-top: 20rpx;">
+		<view class="datainfo">
+			<view class="datainfo_item">
+				<view class="">
+					{{item.device_name}}
+				</view>
+				<view class="" :style="{'color':item.status==1?'#00B075':'#f64a4a'}">
+					{{item.status==1?"已开启":"已禁用"}}
+				</view>
+			</view>
+			<view class="datainfo_item">
+				设备ID:{{item.device_id}}
+			</view>
+			<view class="datainfo_item">
+				设备状态:{{item.device_notes==''?"--":item.device_notes}}
+			</view>
+			<view class="datainfo_item">
+				设备状态:{{item.device_status==1?"在线":"离线"}}
+			</view>
+			<view class="datainfo_item">
+				<view class="datainfo_item_1">
+					地址:{{item.city}}
+				</view>
+				<view class="">
+					<u-icon name="map" size="40" color="#00B075" @click="selectaddress(item.city,item.device_name)">
+					</u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="datadetails">
+			<view class="datadetails_box1">
+				<view class="">
+					设备变量名称
+				</view>
+				<view class="">
+					当前值
+				</view>
+			</view>
+			<!-- datadetails_box_item -->
+			<view class="datadetails_box" v-for="item,index in data" :key="index">
+				<view class="datadetails_box_name">
+					{{item.name}}
+				</view>
+				<view class="datadetails_box_conf" v-if="compile && item.device_status==1">
+					<u-switch v-model="item.values" size="35" active-color="#00B075" style="margin-top: 30rpx;" inactive-color="#f00"
+						v-if="item.types==1" @change="switchchange2($event,item,index)">
+					</u-switch>
+					<view class="" v-if="item.types==0 || item.types==4" style="display: flex;">
+						<!-- <u-input v-model="item.values" :type="item.values==0?'number':'text'" :clearable="false" style="width: 200rpx;margin: 10rpx 10rpx 0 0;" input-align="right"/> -->
+						<view class="">
+							{{item.values}}{{item.unit}}
+						</view>
+						<view class="">
+							<u-icon name="edit-pen" size="36" color="#00B075" @click="inputfill(item,index)">
+							</u-icon>
+						</view>
+					</view>
+				</view>
+				<view class="datadetails_box_conf" v-else>
+					<view class="" v-if="item.types==1">
+						{{item.values==true?"开":"关"}}{{item.unit}}
+					</view>
+					<view class="" v-if="item.types==0 || item.types==4">
+						{{item.values?item.values:"--"}}{{item.unit}}
+					</view>
+				</view>
+			</view>
+			<u-modal v-model="show" :show-cancel-button="true" :title="baseinfo.title" @confirm="modalconfirm"
+				@cancel="modalcancel">
+				<view class="slot-content">
+					<u-input v-model="baseinfo.content" type="number" />{{baseinfo.unit}}
+				</view>
+			</u-modal>
+			<!-- <view class="loading" v-if="maskshow">
+				<image src="../../static/images/cb/6286299.gif" mode="" class="img"></image>
+			</view> -->
+			<u-mask :show="maskshow">
+				<view class="loading" v-if="maskshow">
+					<image src="../../static/images/cb/6286299.gif" mode="" class="img"></image>
+				</view>
+			</u-mask>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				item: {},
+				data: {},
+				show: false,
+				baseinfo: {
+					title: "",
+					unit: "",
+					d_id: "",
+					content: "",
+					index: "",
+					types: ""
+				},
+				maskshow: false,
+				compile:false
+			}
+		},
+		onLoad(option) {
+			this.item = JSON.parse(option.item)
+			this.getbaseinfo()
+		},
+		methods: {
+			async getbaseinfo(){
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fertilizer_list',
+					data: {
+						content: this.item.device_id,
+					}
+				})
+				console.log(res)
+				this.item = res.data[0]
+				if(this.item.status==1){
+					this.compile = true
+				}else{
+					this.compile = false
+				}
+				
+				this.tubulareqlist()
+			},
+			async tubulareqlist() { //实时数据
+				this.maskshow = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fertilizer_data_list',
+					data: {
+						device_id: this.item.device_id,
+					}
+				})
+				this.maskshow = false
+				console.log(res)
+				for (var i = 0; i < res.length; i++) {
+					if (res[i].types == 1) {
+						res[i].values = res[i].values == 1 ? true : false
+					}
+				}
+				this.data = res
+			},
+			async controlfill() { //设备控制
+			this.maskshow = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=irrigation_system.waterfertilizer.water_fer_parametric_control',
+					data: {
+						device_id: this.item.device_id,
+						d_id: this.baseinfo.d_id,
+						content: this.baseinfo.content
+					}
+				})
+				this.maskshow = false
+				console.log(res)
+				if (res.status == 200) {
+					uni.showToast({
+						title: "下发成功",
+						icon: "none"
+					})
+					if (this.baseinfo.types == 1) {
+						this.data[this.baseinfo.index].values = this.baseinfo.content==1?true:false
+					}else{
+						this.data[this.baseinfo.index].values = this.baseinfo.content
+					}
+					
+				} else {
+					uni.showToast({
+						title: "下发失败",
+						icon: "none"
+					})
+					if (this.baseinfo.types == 1) {
+						this.data[this.baseinfo.index].values = !this.data[this.baseinfo.index].values
+					}
+				}
+				// this.data = res
+			},
+			selectaddress(city, name) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/geo?address=" + city +
+						"&key=78ce288400f4fc6d9458989875c833c2",
+					dataType: "json",
+					complete: ress => {
+						console.log(ress)
+						if (ress.data.status == 1) {
+							// ress.data.geocodes[0].location
+							uni.navigateTo({
+								url: "./irrmap?lnglat=" + ress.data.geocodes[0].location +
+									"&basename=" + name
+							})
+						} else {
+							uni.showToast({
+								title: "地址编译失败",
+								icon: "none"
+							})
+						}
+					}
+				});
+			},
+			switchchange2(e, item, index) {
+				console.log(e)
+				this.baseinfo.title = item.name
+				this.baseinfo.unit = item.unit
+				this.baseinfo.d_id = item.d_id
+				this.baseinfo.index = index
+				this.baseinfo.types = item.types
+				this.baseinfo.content = e == true ? "1" : "0"
+				this.controlfill()
+			},
+			inputfill(e, index) {
+				console.log(e)
+				this.show = true
+				this.baseinfo.title = e.name
+				this.baseinfo.unit = e.unit
+				this.baseinfo.d_id = e.d_id
+				this.baseinfo.index = index
+			},
+			modalconfirm() {
+				this.controlfill()
+			},
+			modalcancel() {
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: $uni-bg-color-grey;
+	}
+
+	.datainfo {
+		width: 100%;
+		background-color: #fff;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+
+		.datainfo_item {
+			display: flex;
+			justify-content: space-between;
+			height: 60rpx;
+			font-size: 28rpx;
+			color: #909696;
+
+			.datainfo_item_1 {
+				width: 80%;
+				overflow: hidden; //溢出隐藏
+				white-space: nowrap; //禁止换行
+				text-overflow: ellipsis; //...
+			}
+		}
+
+		.datainfo_item:first-child {
+			font-size: 32rpx;
+			color: #000;
+		}
+	}
+
+	.datadetails {
+		width: 100%;
+		margin-top: 20rpx;
+		background-color: #fff;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+
+		.datadetails_box1 {
+			font-size: 30rpx;
+			font-weight: 700;
+			display: flex;
+			justify-content: space-between;
+			height: 60rpx;
+			border-bottom: 1px solid #efefef;
+			line-height: 60rpx;
+		}
+
+		.datadetails_box {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			border-bottom: 1px solid #efefef;
+			line-height: 100rpx;
+
+			.datadetails_box_item {}
+
+			.datadetails_box_name {
+				width: 50%;
+				overflow: hidden; //溢出隐藏
+				white-space: nowrap; //禁止换行
+				text-overflow: ellipsis; //...
+			}
+
+			.datadetails_box_conf_lng {
+				display: flex;
+				margin-top: 10rpx;
+			}
+		}
+	}
+
+	.slot-content {
+		width: 50%;
+		margin: 30rpx auto;
+		display: flex;
+		line-height: 70rpx;
+	}
+	.loading {
+		position: fixed;
+		top: 200px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+	
+		.img {
+			width: 300rpx;
+			height: 300rpx;
+		}
+	}
+</style>

+ 8 - 8
pages/prevention/equipmentdetails.vue

@@ -242,28 +242,28 @@
 				success: (res) => {
 					console.log(JSON.parse(res.data))
 					let items = JSON.parse(res.data).filter((item) => {
-						return item.purview_name == "防治系统"
+						return item.pur_id == 44
 					})
 					let items2 = items[0].children.filter((item) => {
-						return item.purview_name == "杀虫灯"
+						return item.pur_id == 45
 					})
 					var arr = items2[0].children
 					console.log(arr)
 					for (var i = 0; i < arr.length; i++) {
-						switch (arr[i].purview_name) {
-							case "设备操作":
+						switch (arr[i].pur_id) {
+							case 75://"设备操作"
 								this.kongtf = true
 								break
-							case "设备控制":
+							case 78:
 								this.kongtf = true
 								break
-							case "SIM卡状态":
+							case 76://"SIM卡状态"
 								this.simtf = true
 								break
-							case "SIM卡":
+							case 76://"SIM卡"
 								this.simtf = true
 								break
-							case "数据详情":
+							case 77://"数据详情"
 								this.shujutf = true
 								break
 						}

+ 160 - 0
pages/waterandfer/basestate.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="statebox">
+		<view class="stateitem" v-for="item,index in olddatas" :key="index">
+			<view class="stateitem_img">
+				<image :src="'http://www.hnyfwlw.com:8006/bigdata_pc/sf/tubiao/'+typename[item.icon]+item.value+'.png'" mode="" class="img"></image>
+			</view>
+			<view class="stateitem_txt">
+				{{item.txt}}
+			</view>
+			<view class="stateitem_btn">
+				<u-switch v-model="item.valuenum" active-color="#6EF1BE" size="40" @change="change(item,$event)"></u-switch>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				olddatas: [],
+				typename: [
+					"-",
+					"风机",
+					"水泵",
+					"增氧机",
+					"湿帘",
+					"遮阳",
+					"开窗",
+					"保温",
+					"投食机",
+				],
+				device_id:""
+			}
+		},
+		onLoad(option) {
+			this.device_id = option.device_id
+			this.history()
+		},
+		onNavigationBarButtonTap(e) {
+			console.log(e)
+			uni.navigateTo({
+				url:"./waterhis?device_id="+this.device_id
+			})
+		},
+		methods: {
+			async history() { //设备列表
+				// this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_status',
+					data: {
+						device_id: this.device_id
+					}
+				})
+				// this.dataloadingtf = false
+				// console.log(res)
+				this.olddatas = []
+				var dataarr = res.conf.relayName.split("/")
+				var elearr = res.conf.relayNum.split("/")
+				var numarr = JSON.stringify(res.dat.device_status).slice(2, -2)
+				numarr = numarr.split(",")
+				var numobj = {}
+				for (var i = 0; i < numarr.length; i++) {
+					numarr[i] = numarr[i].split(":")
+					var index = numarr[i][0].indexOf("j") == -1 ? numarr[i][0].indexOf("e") : numarr[i][0].indexOf("j")
+					numobj[numarr[i][0].slice(index, -1)] = Number(numarr[i][1])
+				}
+				// console.log(numobj)
+				for (var i = 0; i < dataarr.length; i++) {
+					if (dataarr[i] != "-") {
+						var obj = {
+							txt: dataarr[i],
+							icon: elearr[i],
+							value: numobj['j' + (i + 1)],
+							valuenum: numobj['j' + (i + 1)]== 1 ? true : false,
+							id:i
+							// + elelist[elearr[i]].unit
+						}
+						this.olddatas.push(obj)
+					}
+				}
+				// console.log(this.olddatas)
+			},
+			change(item,e){
+				if(e){
+					item.value = 1
+				}else{
+					item.value = 0
+				}
+				this.sf_control(item)
+			},
+			async sf_control(item){
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_control',
+					data: {
+						device_id: this.device_id,
+						relayNum: item.id,
+						relayState: item.value,
+					}
+				})
+				// console.log(res)
+				if(res.controlState){
+					uni.showToast({
+						title: "操作成功",
+						icon: "none"
+					})
+				}else{
+					uni.showToast({
+						title: "操作失败",
+						icon: "none"
+					})
+					for(var i=0;i<this.olddatas.length;i++){
+						if(this.olddatas[i].id == res.relayNum ){
+							this.olddatas[i].valuenum = res.controlState
+							this.olddatas[i].value = res.controlState ? 1 : 0
+						}
+					}
+				}
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: $uni-bg-color-grey;
+	}
+	.statebox{
+		padding-top: 30rpx;
+	}
+	.stateitem {
+		width: 90%;
+		margin: 0 auto 30rpx;
+		display: flex;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		background-color: #fff;
+		justify-content: space-between;
+		border-radius: 20rpx;
+		.stateitem_img{
+			width: 60rpx;
+			height: 60rpx;
+			.img{
+				width: 60rpx;
+				height: 60rpx;
+			}
+		}
+		.stateitem_txt{
+			height: 60rpx;
+			line-height: 60rpx;
+			font-size: 32rpx;
+			width: 60%;
+		}
+		.stateitem_btn{
+			padding-top:10rpx ;
+		}
+	}
+</style>

+ 346 - 0
pages/waterandfer/datails.vue

@@ -0,0 +1,346 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 44px;">
+			<view style="position: fixed;z-index: 100;width: 100%;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备详情"></uni-nav-bar>
+			</view>
+			<view class="info">
+				<view class="info_item">
+					<!-- <image
+						:src="eqinfo.item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/cb/offBg.png'"
+						mode="" class="bgi"></image> -->
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png" mode="" class="bgi"></image>
+					<p style="font-size: 32rpx;" @click="copy(eqinfo.item.imei || eqinfo.item.device_id)">设备
+						ID:{{eqinfo.item.imei || eqinfo.item.device_id}}
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode=""
+							class="tishi"></image>
+					</p>
+					<p>设备名称:{{eqinfo.item.device_name}}</p>
+					<p>设备型号:水肥一体化</p>
+					<p>最近上报时间:{{eqinfo.item.uptime|timeFormat()}}</p>
+					<p>设备地址:{{city}}</p>
+				</view>
+			</view>
+			<view class="control">
+				<view class="control_item" v-if="zttf" @click="control">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/8.png'" mode=""></image>
+					<p>设备状态</p>
+				</view>
+				<view class="control_item" v-if="ystf" @click="charts">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/10.png'" mode=""></image>
+					<p>要素数据</p>
+				</view>
+				<view class="control_item" @click="repairs">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/7.png'" mode=""></image>
+					<p>一键报修</p>
+				</view>
+			</view>
+			<view class="realtime">
+				<p class="realtime_title">实时数据</p>
+				<view class="realtime_tishi" v-if="olddatas.length==0 && dataloadingtf == false">
+					暂无数据
+				</view>
+				<view class="realtime_text" v-else>
+					<view class="realtime_text_item">
+						<view class="realtime_text_item_info" v-for="item,index in olddatas" :key="index">
+							<view class="item_info_img">
+								<image :src="'http://www.hnyfwlw.com:8006/bigdata_pc/sf/dev/icon_'+item.icon+'.png'"
+									mode=""></image>
+							</view>
+							<view class="item_info_text">
+								<p>{{item.txt}}</p>
+								<p style="margin-top: 20rpx;">{{item.value}}</p>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="realtime_tishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import elelist from "../../static/json/eleList.json"
+	export default {
+		data() {
+			return {
+				eqinfo: {
+					item:{}
+				},
+				olddata: {},
+				olddatas: [],
+				newdatesTF: false, //暂无数据显示隐藏
+				work: "",
+				zttf: false,
+				ystf: false,
+				city: "",
+				dataloadingtf: true, //加载中显示隐藏
+			}
+		},
+		methods: {
+			async history() { //设备列表
+				var newtime = +new Date() / 1000
+				var oldtime = newtime - 24 * 60 * 60
+				this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_status',
+					data: {
+						device_id: this.eqinfo.item.device_id
+					}
+				})
+				this.dataloadingtf = false
+				console.log(res)
+				this.olddatas = []
+				var dataarr = res.conf.eleName.split("/")
+				var elearr = res.conf.eleNum.split("/")
+				var numarr = JSON.stringify(res.dat.device_status).slice(2, -2)
+				numarr = numarr.split(",")
+				var numobj = {}
+				for (var i = 0; i < numarr.length; i++) {
+					numarr[i] = numarr[i].split(":")
+					var index = numarr[i][0].indexOf("e")==-1?numarr[i][0].indexOf("j"):numarr[i][0].indexOf("e")
+					numobj[numarr[i][0].slice(index, -1)] = Number(numarr[i][1])
+				}
+				console.log(numobj)
+				// for(var key in numarr){
+				// 	console.log(numarr[key])
+				// }
+				for (var i = 0; i < dataarr.length; i++) {
+					if(dataarr[i]!="-"){
+						var obj = {
+							txt: dataarr[i],
+							icon: elearr[i],
+							value: numobj['e'+(i+1)] + elelist[elearr[i]].unit
+						}
+						this.olddatas.push(obj)
+					}
+				}
+				console.log(this.olddatas)
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			repairs() {
+				console.log(this.eqinfo.item)
+				var device_id = this.eqinfo.item.device_id
+				uni.navigateTo({
+					url: "../afterSale/addafter?device_id=" + device_id + "&device_type=" + 13
+				})
+			},
+			control() { //设备控制
+				uni.navigateTo({
+					url: "./basestate?device_id=" + this.eqinfo.item.device_id
+				})
+			},
+			charts() { //历史数据
+				uni.navigateTo({
+					url: "./elementdata?device_id=" + this.eqinfo.item.device_id
+				})
+			},
+			copy(item) {
+				uni.setClipboardData({
+					data: item,
+					success: function() {
+						console.log('success');
+					}
+				});
+			},
+			selectaddress(lat, lng) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						console.log(ress.data.regeocode.formatted_address)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "暂无"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			this.$forceUpdate()
+			this.eqinfo.item = JSON.parse(option.shebei)
+			console.log(JSON.parse(option.shebei))
+			this.history()
+			this.selectaddress(this.eqinfo.item.lat, this.eqinfo.item.lng)
+			uni.getStorage({
+				key: "jurisdiction",
+				success: (res) => {
+					// console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item) => {
+						return item.pur_id == 202 //灌溉控制系统
+					})
+					let items2 = items[0].children.filter((item) => {
+						return item.pur_id == 195//"水肥一体化(X)"
+					})
+					console.log(items2)
+					var arr = items2[0].children
+					console.log(arr)
+					for (var i = 0; i < arr.length; i++) {
+						switch (arr[i].pur_id) {
+							case 196:
+								this.zttf = true//"设备状态"
+								break
+							case 197:
+								this.ystf = true//"要素数据"
+								break
+						}
+					}
+				},
+			})
+		}
+	}
+</script>
+
+<style lang="scss">
+	.info {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+
+		.info_item {
+			width: 90%;
+			margin: 0 auto;
+			height: 280rpx;
+			padding: 26rpx 50rpx;
+			position: relative;
+			box-sizing: border-box;
+
+			.bgi {
+				width: 100%;
+				height: 280rpx;
+				position: absolute;
+				top: 0;
+				left: 0;
+				z-index: -1;
+			}
+
+			p {
+				font-size: 24rpx;
+				color: #FFFFFF;
+				margin-bottom: 10rpx;
+
+				.tishi {
+					width: 30rpx;
+					height: 30rpx;
+					margin: 0rpx 0 0 20rpx;
+				}
+			}
+		}
+	}
+
+	.control {
+		width: 90%;
+		position: absolute;
+		top: 392rpx;
+		left: 5%;
+		display: flex;
+		justify-content: space-between;
+		text-align: center;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+
+		.control_item {
+			width: 120rpx;
+			height: 120rpx;
+
+			image {
+				width: 70rpx;
+				height: 70rpx;
+			}
+
+			p {
+				font-size: 24rpx;
+			}
+		}
+	}
+
+	.realtime {
+		width: 100%;
+		position: absolute;
+		top: 520rpx;
+
+		.realtime_title {
+			font-weight: 700;
+			width: 90%;
+			margin: 0 auto;
+		}
+
+		.dataloading:after {
+			overflow: hidden;
+			display: inline-block;
+			vertical-align: bottom;
+			animation: ellipsis 2s infinite;
+			content: "\2026";
+		}
+
+		@keyframes ellipsis {
+			from {
+				width: 2px;
+			}
+
+			to {
+				width: 15px;
+			}
+		}
+
+		.realtime_tishi {
+			width: 90%;
+			margin: 0 auto;
+			text-align: center;
+			font-size: 32rpx;
+			padding-top: 40rpx;
+		}
+
+		.realtime_text {
+			width: 90%;
+			margin: 0 auto;
+
+			.realtime_text_item {
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				flex-wrap: wrap;
+				margin-bottom: 50rpx;
+
+				.realtime_text_item_info {
+					width: 48%;
+					box-shadow: 0 0 10rpx #bcb9ca;
+					margin-top: 20rpx;
+					display: flex;
+					padding: 20rpx 20rpx;
+					box-sizing: border-box;
+
+					.item_info_img {
+						width: 30%;
+						text-align: center;
+						margin-right: 30rpx;
+						background-image: linear-gradient(to bottom,#5ee3ee,#3cbaef);
+						border-radius: 50%;
+						image {
+							width: 64rpx;
+							height: 64rpx;
+							margin-top: 10rpx;
+						}
+					}
+
+					.item_info_text {
+						font-size: 24rpx;
+
+					}
+				}
+			}
+		}
+
+	}
+</style>

+ 604 - 0
pages/waterandfer/elementdata.vue

@@ -0,0 +1,604 @@
+<template>
+	<view>
+		<view class="">
+			<view class="selecttimes" @click="tiemshow=!tiemshow">
+				<view class="timesbox">
+					<image
+						:src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+						mode=""></image>
+					<p>{{timetab(oldtime)}}</p>
+					<p class="or">~</p>
+					<p>{{timetab(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>
+			</view>
+			<view class="shuju_one">
+				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
+					暂无数据
+				</view>
+				<view class="canvastishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
+				<canvas v-if="canvastishiTF" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+					@touchstart="touchLineA($event)" @touchmove="moveLineA($event)" @touchend="touchEndLineA($event)"
+					disable-scroll=true
+					:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
+			</view>
+			<view class="refresh" @click="refresh">
+				刷 新
+			</view>
+			<view class="condition">
+				<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+					<table class="table">
+						<tr class="tr">
+							<th class="th" v-for="(item,index) in thdata" :key="'a'+index">{{item}}</th>
+						</tr>
+						<tr class="tr" v-for="(items,indexs) in eqlistdata[0].length" :key="'b'+indexs">
+							<td class="td" v-for="(item,index) in eqlistdata" :key="'c'+index">{{item[indexs]}}</td>
+							<!-- |timeFormat() -->
+						</tr>
+						<tr class="tr" v-if="!forbidden">
+							<td class="td" v-for="item in 12">暂无数据</td>
+						</tr>
+					</table>
+				</scroll-view>
+				<view class="pagenumber">
+					<button @click="prev">上一页</button>
+					<view class="pagenumber_page">
+						第{{page}}页
+					</view>
+					<view class="pagenumber_page">
+						共 {{pagesum}} 页
+					</view>
+					<button @click="next" :disabled="!forbidden">下一页</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<style lang="scss">
+
+</style>
+<script>
+	import uCharts from '../../components/js_sdk/u-charts/u-charts/u-charts.js';
+	var canvaColumnA = null;
+	var presenttime = null
+	// var oldpresenttime = presenttime - 24*60*60*1000
+	export default {
+		data() {
+			return {
+				thdata: ["上报时间"],
+				eqlistdata: [[]],
+				cWidth: '400',
+				cHeight: '400',
+				pixelRatio: 1,
+				oldtime: '',
+				newtime: '',
+				page: 1,
+				forbidden: false, //暂无数据
+				times: {
+					d_id: null,
+					start_time: null,
+					end_time: null,
+					device_id: null
+				},
+				canvastishiTF: false, //折线图暂无数据提示
+				dataloadingtf: true, //加载中提示
+				pagesum: 1,
+				tiemshow: false, //日历选择器
+			}
+		},
+		// 页面加载执行的函数
+		onLoad(option) {
+			this.times.device_id = option.device_id
+			// this.times.imei = option.imei
+			this.cWidth = uni.upx2px(650);
+			this.cHeight = uni.upx2px(500);
+			presenttime = +new Date();
+			this.oldtime = parseInt((presenttime - 30 * 24 * 60 * 60 * 1000) / 1000)
+			this.newtime = parseInt(presenttime / 1000)
+			setTimeout(() => {
+				this.getServerData(parseInt(presenttime / 1000), parseInt((presenttime - 30 * 24 * 60 * 60 *
+					1000) /
+					1000))
+				this.historydata(parseInt(presenttime / 1000), parseInt((presenttime - 30 * 24 * 60 * 60 * 1000) /
+					1000))
+			}, 1000)
+		},
+		onShow() {
+
+		},
+		onPullDownRefresh() {
+			console.log('refresh');
+			this.getServerData(parseInt(presenttime / 1000), parseInt((presenttime - 24 * 60 * 60 * 1000) /
+				1000))
+			this.historydata(parseInt(presenttime / 1000), parseInt((presenttime - 24 * 60 * 60 * 1000) /
+				1000))
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		methods: { // 
+			//forecast.worm_lamp.device_polyline_data
+			// 获取数据,发请求
+			async getServerData(newtime, oldtimes) { //设备折线图
+				this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_data_chart',
+					data: {
+						device_id: this.times.device_id,
+						end: newtime,
+						begin: oldtimes,
+					}
+				})
+				this.dataloadingtf = false
+				if (res.length == 0) {
+					this.canvastishiTF = false
+				} else {
+					this.canvastishiTF = true
+					var dataarr = res.conf.eleName.split("/")
+					var elearr = res.conf.eleNum.split("/")
+					var xtitle = []
+					var arr = []
+					var color = ['#F97000', '#00E29D', '#FF3F3F', '#6CBBFF', '#00E29D']
+					for (var i = 0; i < dataarr.length; i++) {
+						if (dataarr[i] != "-") {
+							var valuearr = []
+							for (var j = 0; j < res.dat.length; j++) {
+								var numarr = JSON.stringify(res.dat[j].device_status).slice(2, -2)
+								numarr = numarr.split(",")
+								var numobj = {}
+								for (var k = 0; k < numarr.length; k++) {
+									numarr[k] = numarr[k].split(":")
+									var index = numarr[k][0].indexOf("e") == -1 ? numarr[k][0].indexOf("j") : numarr[k]
+										[0].indexOf("e")
+									numobj[numarr[k][0].slice(index, -1)] = Number(numarr[k][1])
+								}
+								valuearr.unshift(numobj['e' + (i + 1)]) // + elelist[elearr[i]].unit
+								var times = new Date(res.dat[j].uptime * 1000)
+								xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() +
+									":" +
+									times.getMinutes())
+							}
+							var obj = {
+								name: dataarr[i],
+								data: valuearr,
+								color: color[i]
+							}
+							arr.push(obj)
+						}
+					}
+					console.log(arr)
+					this.showColumn("canvasColumnA", xtitle, arr)
+				}
+			},
+			async historydata(newtime, oldtimes) { //设备表格数据
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_data',
+					data: {
+						device_id: this.times.device_id,
+						page: this.page,
+						page_size: 10,
+						begin: oldtimes,
+						end: newtime,
+					}
+				})
+				console.log(res)
+				if (res.length == 0) {
+					this.forbidden = false
+				} else {
+					this.pagesum = Math.floor(res.nums / 10) + 1
+					this.forbidden = true
+					this.eqlistdata = []
+					var dataarr = res.conf.eleName.split("/")
+					var elearr = res.conf.eleNum.split("/")
+					this.thdata = ["上报时间"]
+					var timearr = []
+					for (var i = 0; i < dataarr.length; i++) {
+						if (dataarr[i] != "-") {
+							this.thdata.push(dataarr[i])
+							var valuearr = []
+							for (var j = 0; j < res.dat.length; j++) {
+								var numarr = JSON.stringify(res.dat[j].device_status).slice(2, -2)
+								numarr = numarr.split(",")
+								var numobj = {}
+								for (var k = 0; k < numarr.length; k++) {
+									numarr[k] = numarr[k].split(":")
+									var index = numarr[k][0].indexOf("e")
+									numobj[numarr[k][0].slice(index, -1)] = Number(numarr[k][1])
+								}
+								valuearr.push(numobj['e' + (i + 1)]) // + elelist[elearr[i]].unit
+							}
+							console.log(valuearr)
+							this.eqlistdata.push(valuearr)
+							// console.log(valuearr)
+						}
+					}
+					for (var j = 0; j < res.dat.length; j++) {
+						// valuearr.unshift(numobj['e' + (i + 1)]) // + elelist[elearr[i]].unit
+						timearr.push(this.tiemtag(res.dat[j].uptime))
+					}
+					this.eqlistdata.unshift(timearr)
+					console.log(this.eqlistdata)
+				}
+			},
+			prev() { //上一页
+				if (this.page != 1) {
+					this.page--
+					this.historydata(this.newtime, this.oldtime)
+				}
+			},
+			next() { //下一页
+				if (this.page < this.pagesum) {
+					this.page++
+					this.historydata(this.newtime, this.oldtime)
+				}
+			},
+			tiemchange(e) {
+				console.log(e)
+				this.oldtime = +new Date(e.startDate) / 1000
+				this.newtime = +new Date(e.endDate) / 1000 + 16 * 60 * 60
+				this.getServerData(this.newtime, this.oldtime)
+				this.historydata(this.newtime, this.oldtime)
+			},
+			timetab(e) {
+				e = new Date(e * 1000)
+				var year = e.getFullYear()
+				var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
+				var time = year + "/" + month + "/" + day
+				return time
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			showColumn(id, xtitle, xinfo) {
+				var _self = this
+				canvaColumnA = new uCharts({
+					canvasId: id,
+					type: 'line',
+					legend: {
+						position: "top"
+					},
+					fontSize: 11,
+					background: '#FFFFFF',
+					pixelRatio: 1,
+					animation: true,
+					dataLabel: false,
+					categories: xtitle,
+					series: xinfo,
+					enableScroll: true, //开启图表拖拽功能
+					xAxis: {
+						disableGrid: true,
+						type: 'grid',
+						gridType: 'dash',
+						itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+						scrollShow: true, //新增是否显示滚动条,默认false
+						// scrollAlign: 'left', //滚动条初始位置
+						scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
+						scrollColor: '#DEE7F7', //默认为 #A6A6A6
+					},
+					yAxis: {},
+					width: _self.cWidth * 1,
+					height: _self.cHeight * 1,
+					extra: {
+						line: {
+							type: 'curve'
+						}
+					}
+				});
+			},
+			showColumnb(id, xtitle, xinfo) {
+				var _self = this
+				canvaColumnB = new uCharts({
+					canvasId: id,
+					type: 'line',
+					legend: {
+						position: "top"
+					},
+					fontSize: 11,
+					background: '#FFFFFF',
+					pixelRatio: 1,
+					animation: true,
+					dataLabel: false,
+					categories: xtitle,
+					series: xinfo,
+					enableScroll: true, //开启图表拖拽功能
+					xAxis: {
+						disableGrid: true,
+						type: 'grid',
+						gridType: 'dash',
+						itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+						scrollShow: true, //新增是否显示滚动条,默认false
+						// scrollAlign: 'left', //滚动条初始位置
+						scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
+						scrollColor: '#DEE7F7', //默认为 #A6A6A6
+					},
+					yAxis: {},
+					width: _self.cWidth * 1,
+					height: _self.cHeight * 1,
+					extra: {
+						line: {
+							type: 'curve'
+						}
+					}
+				});
+			},
+			touchLineA(e) {
+				console.log(e)
+				canvaColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvaColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvaColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + Number(item.data).toFixed(3)
+					}
+				});
+			},
+			touchLineBb(e) {
+				console.log(e)
+				canvaColumnB.scrollStart(e);
+			},
+			moveLineBb(e) {
+				canvaColumnB.scroll(e);
+			},
+			touchEndLineBb(e) {
+				canvaColumnB.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnB.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data
+					}
+				});
+			},
+			async newdata() {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.send_control.get_device_config',
+					data: {
+						device_type_id: 2,
+						d_id: this.times.d_id,
+						control_type: "data"
+					}
+				})
+				if (res) {
+					uni.showToast({
+						title: '刷新成功',
+						duration: 2000,
+						icon: "none"
+					});
+				} else {
+					uni.showToast({
+						title: '刷新失败',
+						duration: 2000,
+						icon: "none"
+					});
+				}
+			},
+			refresh() { //获取当前时间的数据
+				this.newdata()
+			},
+			tiemtag(time) {
+				var date = new Date(time * 1000)
+				var year = date.getFullYear()
+				var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1
+				var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
+				var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours()
+				var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()
+				var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds()
+				return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/*样式的width和height一定要与定义的cWidth和cHeight相对应*/
+	.shuju_one {
+		position: relative;
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding-top: 20rpx;
+		height: 550rpx;
+		margin: 30rpx auto;
+
+		.canvastishi {
+			font-size: 32rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			margin-left: -64rpx;
+			margin-top: -21rpx;
+
+			.dataloading:after {
+				overflow: hidden;
+				display: inline-block;
+				vertical-align: bottom;
+				animation: ellipsis 2s infinite;
+				content: "\2026";
+			}
+
+			@keyframes ellipsis {
+				from {
+					width: 2px;
+				}
+
+				to {
+					width: 15px;
+				}
+			}
+		}
+
+		.shuju_one_title {
+			width: 70%;
+			margin: 0 auto;
+			display: flex;
+
+			.tltle_text {
+				width: 25%;
+				border: 2rpx solid #B2B2B2;
+				color: #57c878;
+				text-align: center;
+				font-size: 24rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+			}
+
+			.title_text_color {
+				width: 25%;
+				border: 2rpx solid #57c878;
+				background-color: #57c878;
+				color: #fff;
+				text-align: center;
+				font-size: 24rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+			}
+		}
+
+		.qiun-columns {
+			.qiun-charts {
+				width: 650upx;
+				height: 400upx;
+				background-color: #FFFFFF;
+			}
+
+			.charts {
+				width: 650upx;
+				height: 400upx;
+				background-color: #FFFFFF;
+			}
+		}
+	}
+
+	.shuju_two {
+		top: 790rpx;
+	}
+
+	.selecttimes {
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
+		margin: 30rpx auto;
+
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
+
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
+
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+
+			}
+		}
+	}
+
+	.refresh {
+		width: 160rpx;
+		height: 50rpx;
+		background-color: #57c878;
+		color: #FFFFFF;
+		line-height: 50rpx;
+		text-align: center;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin: 30rpx 5%;
+	}
+
+	.condition {
+		display: flex;
+		flex-wrap: wrap;
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin-bottom: 30rpx;
+		margin: 30rpx auto;
+
+		.scroll-X {
+			width: 95%;
+			margin: 20rpx auto;
+
+			.tr {
+				display: flex;
+				overflow: hidden;
+
+				.th,
+				.td {
+					display: inline-block;
+					padding: 5rpx;
+					width: 140rpx;
+					text-align: center;
+					height: 52rpx;
+					line-height: 52rpx;
+					// border: 2rpx solid #F1F1F1;
+				}
+
+				.th:first-child,
+				.td:first-child {
+					width: 300rpx;
+				}
+
+				.th:nth-last-child(1),
+				.th:nth-last-child(2),
+				.td:nth-last-child(1),
+				.td:nth-last-child(2) {
+					width: 200rpx;
+				}
+			}
+
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
+
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
+		}
+
+		.pagenumber {
+			display: flex;
+			margin: 20rpx auto;
+
+			button {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+				background-color: #57c878;
+				color: #FFFFFF;
+			}
+
+			.pagenumber_page {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+			}
+		}
+	}
+
+	/deep/.u-calendar__action {
+		display: flex;
+		justify-content: space-around;
+
+		.u-calendar__action__text {
+			line-height: 25px;
+		}
+	}
+</style>

+ 344 - 0
pages/waterandfer/index.vue

@@ -0,0 +1,344 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 44px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="水肥一体化" right-icon="search"
+					@clickRight="clickRight" size="16"></uni-nav-bar>
+				<view class="inputs" :style="{'width':width+'rpx'}">
+					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
+						class="inputbox" :clearable="false" />
+					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+				</view>
+			</view>
+			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/waterandfer/1.png'" mode="" class="image">
+			</image>
+			<view class="loading" v-if="loadingtf">
+				<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
+			</view>
+			<view class="prevents">
+				<view class="prevents_item" v-for="item,index in eqlistdata" :key="index" @click="eqdetails(item)">
+					<!-- <image
+						:src="item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
+						mode="" class="prevents_item_img"></image> 在线离线区分-->
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode="" class="prevents_item_img"></image>
+					<view class="prevents_item_top">
+						<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
+						<!-- <p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p> -->
+					</view>
+					<view class="prevents_item_bot">
+						<p>设备 ID:{{item.device_id}}</p>
+						<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+						<!-- <view class="" style="display: flex;justify-content: space-between;">
+							<p>设备到期情况:<span
+									:class="'prevents_item_bot_sapn'+item.device_expire">{{item.device_expiretext}}</span>
+							</p>
+							<p style="color: #3C84FE;" v-if="item.device_expire!=0" @click.stop="examine(item)">查看详情</p>
+						</view> -->
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{'text-align':'left','padding-left':'10px','font-weight':700}" :mask-close-able="true">
+			<view class="slot-content">
+				<rich-text :nodes="content"></rich-text>
+			</view>
+		</u-modal>
+		<view class="top">
+			<view class="backtop" @click="top" v-if="isTop">
+				<image src="../../static/images/1.png" mode="" class="img0"></image>
+			</view>
+			<!-- <view class="more">
+				<view class="box" @click="online" v-show="filtrateTF">
+					<p>在线</p>
+				</view>
+				<view class="box" @click="offline" v-show="filtrateTF">
+					<p>离线</p>
+				</view>
+				<view class="box" @click="complete" v-show="filtrateTF">
+					<p>全部</p>
+				</view>
+				<view @click="filtrate">
+					<image src="../../static/images/b0bcdb0e3fe8690520f743aa8303bf2.png" mode="" class="img1"></image>
+				</view>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce
+	} from "../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				page: 1,
+				size: 10,
+				eqlistdata: [],
+				isTop: false,
+				filtrateTF: false,
+				device_status: "",
+				width: 0,
+				imports: "", //搜索内容
+				loadingtf: false, //loading
+				show: false,
+				title: "",
+				content: ""
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表
+				this.loadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_page',
+					data: {
+						page: this.page,
+						page_size: "10",
+						device_id: this.imports,
+					}
+				})
+				this.loadingtf = false
+				this.eqlistdata = this.eqlistdata.concat(res.ids)
+				console.log(this.eqlistdata)
+			},
+			clickLeft() {
+				uni.switchTab({
+					url: "../index/index"
+				})
+			},
+			clickRight() {
+				// uni.navigateTo({
+				// 	url: "./search"
+				// })
+				this.width = 600
+				this.page = 1
+			},
+			eqdetails(data) {
+				uni.navigateTo({
+					url: "./datails?shebei=" + JSON.stringify(data)
+				})
+			},
+			filtrate() {
+				this.filtrateTF = !this.filtrateTF
+			},
+			top() {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 500
+				})
+			},
+			online() {
+				this.eqlistdata = []
+				this.page = 1
+				this.device_status = 1
+				this.eqlist()
+				this.filtrateTF = !this.filtrateTF
+			},
+			offline() {
+				this.eqlistdata = []
+				this.page = 1
+				this.device_status = 0
+				this.eqlist()
+				this.filtrateTF = !this.filtrateTF
+			},
+			complete() {
+				this.eqlistdata = []
+				this.page = 1
+				this.device_status = ""
+				this.eqlist()
+				this.filtrateTF = !this.filtrateTF
+			},
+			search() { //搜索按钮搜索
+				// this.eqlistdata = []
+				this.searchinp()
+			},
+			searchinp() { //自动搜索
+				Debounce(() => {
+					this.page = 1
+					this.eqlistdata = []
+					this.eqlist()
+				}, 1000)()
+			},
+			examine(e) {
+				// console.log(this)
+				this.show = true
+				this.title = e.device_expiretext
+				this.content = `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间  ${this.timezhuan(e.device_expire_time)}
+				</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`
+			},
+			timezhuan(time) {
+				function fun(a) {
+					return String(a).length == 1 ? '0' + a : a
+				}
+				let date = new Date(time * 1000)
+				let y = date.getFullYear()
+				let m = date.getMonth() + 1
+				let d = date.getDate()
+				let h = date.getHours()
+				let min = date.getMinutes()
+				let sec = date.getSeconds()
+				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
+			},
+		},
+		onLoad() {
+			this.eqlist()
+		},
+		onReachBottom() {
+			this.page++
+			this.eqlist()
+		},
+		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
+			if (e.scrollTop > 200) { //距离大于200时显示
+				this.isTop = true
+			} else { //距离小于200时隐藏
+				this.isTop = false
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inputs {
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		right: 20rpx;
+		top: 24rpx;
+		transition: width 0.5s;
+		overflow: hidden;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+
+		.inputbox {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	/deep/.uni-icons {
+		font-size: 40rpx !important;
+	}
+
+	.image {
+		position: fixed;
+		top: 88px;
+		width: 100%;
+		height: 160rpx;
+		z-index: 555;
+	}
+
+	.loading {
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+
+		.img {
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
+
+	.prevents {
+		width: 100%;
+		position: absolute;
+		top: 140px;
+
+		.prevents_item {
+			width: 95%;
+			margin: 0 auto 30rpx;
+			border-radius: 10rpx;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding: 20rpx 40rpx 20rpx 80rpx;
+			position: relative;
+			box-sizing: border-box;
+
+			.prevents_item_img {
+				width: 30rpx;
+				height: 50rpx;
+				position: absolute;
+				top: -4rpx;
+				left: 30rpx;
+			}
+
+			.prevents_item_top {
+				display: flex;
+				justify-content: space-between;
+				height: 60rpx;
+				border-bottom: 2rpx solid #F4F4F4;
+				line-height: 60rpx;
+				font-size: 26rpx;
+
+				.red {
+					color: #FF4747;
+				}
+
+				.green {
+					color: #00B075;
+				}
+			}
+
+			.prevents_item_bot {
+				margin-top: 20rpx;
+				font-size: 26rpx;
+				color: #BDBDBD;
+
+				.prevents_item_bot_sapn0 {
+					color: #00B075;
+				}
+
+				.prevents_item_bot_sapn1 {
+					color: #FF4747;
+				}
+
+				.prevents_item_bot_sapn2 {
+					color: #FFAB00;
+				}
+			}
+		}
+	}
+
+	.top {
+		position: fixed;
+		right: 10px;
+		bottom: 40px;
+		z-index: 100;
+
+		image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+
+		.backtop {
+			display: flex;
+			justify-content: flex-end;
+			margin-bottom: 10rpx;
+		}
+
+		.more {
+			display: flex;
+		}
+
+		.box {
+			width: 80rpx;
+			height: 80rpx;
+			background-color: rgba(161, 161, 161, 0.45);
+			border-radius: 50%;
+			text-align: center;
+			line-height: 80rpx;
+			box-sizing: border-box;
+			margin: 14rpx 10rpx 0 0;
+			color: #fff;
+		}
+	}
+</style>

+ 187 - 0
pages/waterandfer/waterhis.vue

@@ -0,0 +1,187 @@
+<template>
+	<view>
+		<view class="selecttimesbox">
+			<view class="selecttimes" @click="tiemshow=!tiemshow">
+				<view class="timesbox">
+					<image
+						src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png"
+						mode=""></image>
+					<p>{{timetab(oldtime)}}</p>
+					<p class="or">~</p>
+					<p>{{timetab(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>
+			</view>
+		</view>
+		
+		<view class="historicaldata">
+			<view class="historicaldatanone" v-if="hisdatalist.length==0">
+				暂无数据
+			</view>
+			<view class="historicaldata_item" v-for="item,index in hisdatalist" :key="index">
+				<view class="item">
+					<view class="">
+						操作内容
+					</view>
+					<view class="" :style="{'color':item.txt.slice(0,2)=='开启'?'#3EB984 ':'#f64a4a'}">
+						{{item.txt}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="">
+						操作时间
+					</view>
+					<view class="">
+						{{item.uptime|timeFormat()}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="">
+						操作账号
+					</view>
+					<view class="">
+						{{item.user}}
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				oldtime:"",
+				newtime:"",
+				tiemshow:false,
+				page:1,
+				device_id:"",
+				hisdatalist:[]
+			}
+		},
+		onLoad(option) {
+			this.newtime = +new Date()/1000
+			this.oldtime = (+new Date() - 24*60*60*1000)/1000
+			this.device_id = option.device_id
+			this.sf_control()
+		},
+		onReachBottom() {
+			// console.log("触底")
+			this.page++
+			this.sf_control()
+		},
+		methods: {
+			timetab(e) {
+				e = new Date(e * 1000)
+				var year = e.getFullYear()
+				var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
+				var time = year + "/" + month + "/" + day
+				return time
+			},
+			tiemchange(e){
+				console.log(e)
+				this.oldtime = +new Date(e.startDate) / 1000
+				this.newtime = +new Date(e.endDate) / 1000 + 16 * 60 * 60
+				this.page = 1
+				this.hisdatalist = []
+				this.sf_control()
+			},
+			async sf_control(){
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.sf_control_data',
+					data: {
+						begin: Math.floor(this.oldtime),
+						device_id: this.device_id,
+						end: Math.floor(this.newtime),
+						page: this.page,
+					}
+				})
+				console.log(res.dat)
+					for(var i=0;i<res.dat.length;i++){
+						var name = res.dat[i].relayName.split("/")[Number(res.dat[i].relayNum)]
+						var state = res.dat[i].relayState == 1?"开启":"关闭"
+						var obj = {
+							txt:state + name,
+							uptime:res.dat[i].uptime,
+							user:res.dat[i].user
+						}
+						this.hisdatalist.push(obj)
+					}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: $uni-bg-color-grey;
+	}
+	.selecttimesbox{
+		position: fixed;
+		width: 100%;
+		padding: 30rpx 0;
+		background-color: #fff;
+		z-index: 99;
+	}
+	.selecttimes {
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 10rpx 20rpx;
+		margin: 0 auto;
+		box-sizing: border-box;
+	
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
+	
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
+	
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+	
+			}
+		}
+	}
+	.historicaldata{
+		position: absolute;
+		top: 130rpx;
+		width: 100%;
+		.historicaldatanone{
+			font-size: 32rpx;
+			width: 100%;
+			padding: 20rpx 0;
+			text-align: center;
+		}
+		.historicaldata_item{
+			width: 100%;
+			margin: 20rpx auto;
+			background-color: #fff;
+			.item{
+				width: 90%;
+				margin: 0rpx auto;
+				border-bottom: 1px solid #F6F6F6 ;
+				font-size: 32rpx;
+				display: flex;
+				justify-content: space-between;
+				padding: 20rpx 0;
+			}
+		}
+	}
+	/deep/.u-calendar__action {
+		display: flex;
+		justify-content: space-around;
+	
+		.u-calendar__action__text {
+			line-height: 25px;
+		}
+	}
+</style>

ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/bazaar-city_list/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/equip-item/equip-item.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/ksp-image-cutter/ksp-image-cutter.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-icons/uni-icons.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-nav-bar/uni-nav-bar.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-status-bar/uni-status-bar.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/addafter.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/equip-set.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/addimg.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/equip-set.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/historyfile.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/imgpage.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/manualinput.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/note.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/results.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/search.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/sim/sim.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/equip-set.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/xyhistoryile.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/particulars.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/disease/cmb.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/disease/forecastResult.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/distribution/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/contros.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/history.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/onedaythedata.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/sim.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/modification.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/addbase.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/allocation.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/basefacility.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/city.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/pages/fourBase/modification.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/seabox/modification.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/seabox/search.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/search.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/addusers.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/changepasswold.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/index.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/bzy/equip-set/bzyhistoryile.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/bzy/equip-set/equip-set.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/addimg.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/equip-set.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/historyfile.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/imgpage.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/manualinput.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/note.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/results.js.map


ファイルの差分が大きいため隠しています
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/cbd/equip-set/statistics.js.map


+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/pages/cb/equip-detail/equip-detail.js.map


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません