zhangyun 3 лет назад
Родитель
Сommit
f677ae1ba6
97 измененных файлов с 16487 добавлено и 2460 удалено
  1. 1 1
      App.vue
  2. 3 3
      manifest.json
  3. 97 13
      pages.json
  4. 4 0
      pages/afterSale/addafter.vue
  5. 1 0
      pages/afterSale/index.vue
  6. 87 21
      pages/cb/cbd/equip-set/imgpage.vue
  7. 3 1
      pages/cb/cbd/equip-set/results.vue
  8. 37 38
      pages/cb/equip-detail/equip-detail.vue
  9. 12 17
      pages/cb/index/index.vue
  10. 99 157
      pages/distribution/index.vue
  11. 5 2
      pages/environment/gsequipment.vue
  12. 9 8
      pages/environment/index.vue
  13. 50 0
      pages/equipList/index.vue
  14. 3 9
      pages/equipList/modification.vue
  15. 8 0
      pages/equipMange/index/assignment.vue
  16. 5 1
      pages/equipMange/index/index.vue
  17. 5 2
      pages/expertDiagnosis/wormcase.vue
  18. 13 8
      pages/fourBase/index.vue
  19. 69 60
      pages/index/index.vue
  20. 703 0
      pages/irrigate/index.vue
  21. 61 0
      pages/irrigate/irrmap.vue
  22. 220 0
      pages/irrigate/realtimedata.vue
  23. 320 0
      pages/irrigate/weathdata.vue
  24. 2 2
      pages/my/about/about.vue
  25. 45 6
      pages/my/user-info/user-info.vue
  26. 3 2
      pages/prevention/index.vue
  27. 1 0
      pages/prevention/ucharts.vue
  28. 160 0
      pages/waterandfer/basestate.vue
  29. 344 0
      pages/waterandfer/datails.vue
  30. 604 0
      pages/waterandfer/elementdata.vue
  31. 344 0
      pages/waterandfer/index.vue
  32. 187 0
      pages/waterandfer/waterhis.vue
  33. BIN
      static/images/12.png
  34. BIN
      static/images/13.png
  35. BIN
      static/images/14.png
  36. BIN
      static/images/15.png
  37. BIN
      static/images/16.png
  38. BIN
      static/images/17.png
  39. BIN
      static/images/18.png
  40. BIN
      static/images/19.png
  41. BIN
      static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png
  42. BIN
      static/images/irrigate/yinxingqia.png
  43. BIN
      static/images/newindex/guangai.png
  44. BIN
      static/images/newindex/shuifeiyitihua.png
  45. 1334 0
      static/json/eleList.json
  46. 2 2
      unpackage/dist/build/app-plus/app-config-service.js
  47. 1 1
      unpackage/dist/build/app-plus/app-service.js
  48. 1 1
      unpackage/dist/build/app-plus/app-view.js
  49. 1 1
      unpackage/dist/build/app-plus/manifest.json
  50. BIN
      unpackage/dist/build/app-plus/static/images/12.png
  51. BIN
      unpackage/dist/build/app-plus/static/images/13.png
  52. BIN
      unpackage/dist/build/app-plus/static/images/14.png
  53. BIN
      unpackage/dist/build/app-plus/static/images/15.png
  54. BIN
      unpackage/dist/build/app-plus/static/images/16.png
  55. BIN
      unpackage/dist/build/app-plus/static/images/17.png
  56. BIN
      unpackage/dist/build/app-plus/static/images/18.png
  57. BIN
      unpackage/dist/build/app-plus/static/images/19.png
  58. BIN
      unpackage/dist/build/app-plus/static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png
  59. BIN
      unpackage/dist/build/app-plus/static/images/irrigate/yinxingqia.png
  60. BIN
      unpackage/dist/build/app-plus/static/images/newindex/guangai.png
  61. BIN
      unpackage/dist/build/app-plus/static/images/newindex/shuifeiyitihua.png
  62. 1334 0
      unpackage/dist/build/app-plus/static/json/eleList.json
  63. 2 2
      unpackage/dist/dev/app-plus/app-config-service.js
  64. 4949 1786
      unpackage/dist/dev/app-plus/app-service.js
  65. 4019 313
      unpackage/dist/dev/app-plus/app-view.js
  66. BIN
      unpackage/dist/dev/app-plus/static/images/12.png
  67. BIN
      unpackage/dist/dev/app-plus/static/images/13.png
  68. BIN
      unpackage/dist/dev/app-plus/static/images/14.png
  69. BIN
      unpackage/dist/dev/app-plus/static/images/15.png
  70. BIN
      unpackage/dist/dev/app-plus/static/images/16.png
  71. BIN
      unpackage/dist/dev/app-plus/static/images/17.png
  72. BIN
      unpackage/dist/dev/app-plus/static/images/18.png
  73. BIN
      unpackage/dist/dev/app-plus/static/images/19.png
  74. BIN
      unpackage/dist/dev/app-plus/static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png
  75. BIN
      unpackage/dist/dev/app-plus/static/images/irrigate/yinxingqia.png
  76. BIN
      unpackage/dist/dev/app-plus/static/images/newindex/guangai.png
  77. BIN
      unpackage/dist/dev/app-plus/static/images/newindex/shuifeiyitihua.png
  78. 1334 0
      unpackage/dist/dev/app-plus/static/json/eleList.json
  79. BIN
      unpackage/res/icons/1024x1024.png
  80. BIN
      unpackage/res/icons/120x120.png
  81. BIN
      unpackage/res/icons/144x144.png
  82. BIN
      unpackage/res/icons/152x152.png
  83. BIN
      unpackage/res/icons/167x167.png
  84. BIN
      unpackage/res/icons/180x180.png
  85. BIN
      unpackage/res/icons/192x192.png
  86. BIN
      unpackage/res/icons/20x20.png
  87. BIN
      unpackage/res/icons/29x29.png
  88. BIN
      unpackage/res/icons/40x40.png
  89. BIN
      unpackage/res/icons/58x58.png
  90. BIN
      unpackage/res/icons/60x60.png
  91. BIN
      unpackage/res/icons/72x72.png
  92. BIN
      unpackage/res/icons/76x76.png
  93. BIN
      unpackage/res/icons/80x80.png
  94. BIN
      unpackage/res/icons/87x87.png
  95. BIN
      unpackage/res/icons/96x96.png
  96. 3 1
      util/api.js
  97. 2 2
      util/neutral.js

+ 1 - 1
App.vue

@@ -13,7 +13,7 @@
 	@import "./static/font/iconfont.css";
 	html {
 		box-sizing: border-box;
-		font-size: 28rpx;
+		font-size: 28rpx !important;
 	}
 
 	.status_bar {

+ 3 - 3
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "云飞智控",
+    "name" : "云控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.3.0",
-    "versionCode" : 130,
+    "versionName" : "1.4.1",
+    "versionCode" : 141,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 97 - 13
pages.json

@@ -14,7 +14,7 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "首页",
-				"navigationBarBackgroundColor":"#00B075"
+				"navigationBarBackgroundColor": "#00B075"
 			}
 		}, {
 			"path": "pages/cb/index/index",
@@ -175,23 +175,22 @@
 			"style": {
 				"navigationBarTitleText": "个人中心",
 				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor":"#00B075"
+				"navigationBarBackgroundColor": "#00B075"
 			}
 
 		}, {
 			"path": "pages/equipList/index",
 			"style": {
 				"navigationBarTitleText": "设备列表",
-				"navigationBarBackgroundColor":"#00B075",
+				"navigationBarBackgroundColor": "#00B075",
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/equipList/modification",
 			"style": {
-				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
+				"navigationBarTitleText": "信息修改",
+				"enablePullDownRefresh": false
 			}
 
 		}, {
@@ -199,7 +198,7 @@
 			"style": {
 				"navigationBarTitleText": "设备分布",
 				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor":"#00B075"
+				"navigationBarBackgroundColor": "#00B075"
 			}
 
 		}, {
@@ -467,34 +466,119 @@
 				"navigationStyle": "custom"
 			}
 
+		}, {
+			"path": "pages/environment/gsequipment",
+			"style": {
+				"navigationBarTitleText": "管式墒情设备详情页",
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/environment/gshistory",
+			"style": {
+				"navigationBarTitleText": "管式墒情历史记录页",
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/index/indexcopy",
+			"style": {
+				"navigationBarTitleText": "首页",
+				"enablePullDownRefresh": false
+			}
 		}
 	    ,{
-            "path" : "pages/environment/gsequipment",
+            "path" : "pages/waterandfer/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "水肥一体化",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/waterandfer/datails",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "管式墒情设备详情页",
+                "navigationBarTitleText": "设备详情",
                 "enablePullDownRefresh": false,
 				"navigationStyle": "custom"
             }
             
         }
         ,{
-            "path" : "pages/environment/gshistory",
+            "path" : "pages/waterandfer/basestate",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设备状态",
+                "enablePullDownRefresh": false,
+				"titleNView": {
+					"buttons": [{
+						"text": "记录",
+						"fontSize": "14px"
+					}]
+				}
+            }
+            
+        }
+        ,{
+            "path" : "pages/waterandfer/elementdata",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "管式墒情历史记录页",
+                "navigationBarTitleText": "要素数据",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/irrigate/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "智能灌溉",
                 "enablePullDownRefresh": false,
 				"navigationStyle": "custom"
             }
             
         }
         ,{
-            "path" : "pages/index/indexcopy",
+            "path" : "pages/waterandfer/waterhis",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "首页",
+                "navigationBarTitleText": "控制历史记录",
                 "enablePullDownRefresh": false
             }
+            
+        }
+        ,{
+            "path" : "pages/irrigate/irrmap",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设备位置",
+                "enablePullDownRefresh": false
+				// "navigationStyle": "custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/irrigate/realtimedata",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设备实时数据",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/irrigate/weathdata",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设备变量数据",
+                "enablePullDownRefresh": false
+            }
+            
         }
     ],
 	"condition": { //模式配置,仅开发期间生效

+ 4 - 0
pages/afterSale/addafter.vue

@@ -132,6 +132,10 @@
 						text: '性诱2.0',
 						id:10
 					},
+					{
+						text: '水肥一体化',
+						id:13
+					},
 				],
 				show:false,//选择器的显示
 				btnisTorF:false,

+ 1 - 0
pages/afterSale/index.vue

@@ -217,6 +217,7 @@
 
 		},
 		onShow() {
+			this.page = 1
 			this.faultdata = []
 			this.getAftersale()
 		},

+ 87 - 21
pages/cb/cbd/equip-set/imgpage.vue

@@ -6,13 +6,25 @@
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="查看图片" rightIcon="camera" @clickRight="clickRight"></uni-nav-bar>
 			</view>
 			<p class="tishi" v-if="tishi">暂无数据</p>
-			<view class="timeshow">
+			<!-- <view class="timeshow">
 				<view class="shuju_one_title">
 					<view :class="titleidnex==index?'title_text_color':'tltle_text'" v-for="(item,index) in titletext" :key="index"
 					 @click="changeindex(index)">
 						{{item}}
 					</view>
 				</view>
+			</view> -->
+			<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(timestate)}}</p>
+					<p class="or">~</p>
+					<p>{{timetab(timeend)}}</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="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">
@@ -69,6 +81,7 @@
 				resultdata:{},
 				titletext: ["24小时", "近一个月", "近半年", "近一年"],
 				titleidnex:0,
+				tiemshow:false,//时间选择器
 			}
 		},
 		methods: {
@@ -202,26 +215,42 @@
 					duration: 500
 				})
 			},
-			changeindex(index){
+			// changeindex(index){
+			// 	this.imglists=[]
+			// 	this.page =1
+			// 	this.titleidnex = index
+			// 	var newtime = new Date()
+			// 	this.timeend = +new Date(newtime)/1000
+			// 	if(index == 0){
+			// 		this.timestate = (newtime - 60 * 60 * 24*1000)/1000
+			// 		this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
+			// 	}else if(index == 1){
+			// 		this.timestate = (newtime.setMonth(newtime.getMonth() - 1))/1000
+			// 		this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
+			// 	}else if(index == 2){
+			// 		this.timestate = (newtime.setMonth(newtime.getMonth() - 6))/1000
+			// 		this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
+			// 	}else if(index == 3){
+			// 		this.timestate = (newtime.setFullYear(newtime.getFullYear() - 1))/1000
+			// 		this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
+			// 	}
+			// },
+			tiemchange(e){
 				this.imglists=[]
 				this.page =1
-				this.titleidnex = index
-				var newtime = new Date()
-				this.timeend = +new Date(newtime)/1000
-				if(index == 0){
-					this.timestate = (newtime - 60 * 60 * 24*1000)/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}else if(index == 1){
-					this.timestate = (newtime.setMonth(newtime.getMonth() - 1))/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}else if(index == 2){
-					this.timestate = (newtime.setMonth(newtime.getMonth() - 6))/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}else if(index == 3){
-					this.timestate = (newtime.setFullYear(newtime.getFullYear() - 1))/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}
-			}
+				console.log(e)
+				this.timestate = +new Date(e.startDate) / 1000
+				this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60
+				this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
+			},
+			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
+			},
 		},
 		onLoad(option) {
 			this.timeend = +new Date() / 1000
@@ -259,7 +288,44 @@
 		text-align: center;
 		font-size: 40rpx;
 	}
-
+	.selecttimes {
+		width: 100%;
+		position: fixed;
+		top: 85px;
+		left: 0;
+		z-index: 100;
+		background-color: #fff;
+		padding-top: 30rpx;
+		.timesbox {
+			display: flex;
+			width: 95%;
+			margin: 0 auto;
+			justify-content: space-around;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding: 10rpx 20rpx;
+			box-sizing: border-box;
+			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;
+			}
+		}
+	}
 	.timeshow {
 		width: 96%;
 		height: 50rpx;
@@ -309,7 +375,7 @@
 	}
 	.imglist {
 		position: absolute;
-		top: 84px;
+		top: 100px;
 		width: 95%;
 		left: 2.5%;
 

+ 3 - 1
pages/cb/cbd/equip-set/results.vue

@@ -41,7 +41,9 @@
 					url: '/api/api_gateway?method=forecast.forecast_system.equip_photo_discern',
 					data: {
 						img_id: this.id,
-						ret: ret
+						ret: ret,
+						device_type: "cbd",
+						identify_model: "A"
 					},
 				})
 				console.log(res)

+ 37 - 38
pages/cb/equip-detail/equip-detail.vue

@@ -82,12 +82,12 @@
 			<p>实时数据</p>
 			<p class="span" @click="partClicks" v-if="equipInfo.type!=4">历史数据>>></p>
 		</view>
-		<view class="newtishi" v-if="newtishitf && !dataloadingtf">
-			暂无数据
-		</view>
 		<view class="newtishi" v-if="dataloadingtf">
 			<p class="dataloading">加载中</p>
 		</view>
+		<view class="newtishi" v-else-if="newtishitf">
+			暂无数据
+		</view>
 		<view class="newState" v-else>
 			<view class="item" v-for="item in curState">
 				<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.icon" mode="widthFix"></image>
@@ -248,6 +248,7 @@
 						} else {
 							blbs = "--";
 						}
+						console.log(this.newState)
 						return [{
 								icon: '/image/cb/icon02.png',
 								txt: '在线状态',
@@ -480,66 +481,66 @@
 				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
 					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[2].tf = true
+							case 62:
+								this.cbd[2].tf = true//"设备控制"
 								break
-							case "害虫统计":
-								this.cbd[1].tf = true
+							case 63:
+								this.cbd[1].tf = true//"害虫统计"
 								break
 						}
 					}
 					// console.log(items3[0].children)
 					var 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
 					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;
 						}
 					}
@@ -557,18 +558,16 @@
 						device_id: this.equipInfo.imei || this.equipInfo.device_id,
 						page: 1,
 						page_size: 1,
-						start_time: +new Date(),
-						end_time: +new Date()-24*60*60
+						start_time: Math.floor((+new Date()-24*60*60*1000)/1000),
+						end_time: Math.floor((+new Date())/1000)
 					}
 				})
 				this.dataloadingtf = false
-				console.log(res)
-				console.log(1222)
 				if (res.counts != 0) {
 					this.newState = res.data[0].d_h_t
-					this.newtishitf = true
-				} else {
 					this.newtishitf = false
+				} else {
+					this.newtishitf = true
 				}
 			},
 			partClick(path) {

+ 12 - 17
pages/cb/index/index.vue

@@ -121,25 +121,25 @@
 				key:"jurisdiction",
 				success:(res)=>{
 					let items = JSON.parse(res.data).filter((item)=>{
-						return item.purview_name == "测报系统"
+						return item.pur_id == 36
 					})
 					var arr = items[0].children
 					for(var i =0;i<arr.length;i++){
-						switch (arr[i].purview_name){
-							case "虫情测报灯":
-								this.equipArr[0].tf = true
+						switch (arr[i].pur_id){
+							case 37:
+								this.equipArr[0].tf = true//"虫情测报灯"
 								this.getEquipList(0)
 								break
-							case "性诱测报":
-								this.equipArr[2].tf = true
+							case 38:
+								this.equipArr[2].tf = true//"性诱测报"
 								this.getEquipList(2)
 								break
-							case "孢子仪":
-								this.equipArr[1].tf = true
+							case 39:
+								this.equipArr[1].tf = true//"孢子仪"
 								this.getEquipList(1)
 								break
-							case "性诱2.0":
-								this.equipArr[3].tf = true
+							case 159:
+								this.equipArr[3].tf = true//"性诱2.0"
 								this.getxyEquipList(3)
 								break
 						}
@@ -308,16 +308,11 @@
 				this.filtrateTF = !this.filtrateTF
 			},
 			search() {//搜索按钮搜索
-				if(this.active==3){
-					this.equipArr[this.active].list =[]
-					this.getxyEquipList(3)
-				}else{
-					this.equipArr[this.active].list=[]
-					this.getEquipList(this.active)
-				}
+				this.searchinp()
 			},
 			searchinp() {//自动搜索
 				Debounce(() => {
+					this.equipArr[this.active].pageIndex = 1
 					if(this.active==3){
 						this.equipArr[this.active].list=[]
 						this.getxyEquipList(3)

+ 99 - 157
pages/distribution/index.vue

@@ -3,8 +3,8 @@
 		<view class="page-body">
 			<view class="utabs">
 				<view style="width: 95%;margin: 0 auto;">
-					<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" item-width="140" font-size="24" gutter="20"
-					 bar-width="60" active-color="#42b983"></u-tabs>
+					<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" item-width="140"
+						font-size="24" gutter="20" bar-width="60" active-color="#42b983"></u-tabs>
 				</view>
 			</view>
 			<view class="LocationAndDetails">
@@ -14,8 +14,8 @@
 				</view>
 			</view>
 			<view class="page-section page-section-gap">
-				<map class="map" scale="3" :markers="covers" :enable-zoom="true"
-				 @markertap="markertap" >
+				<map class="map" scale="3" :markers="covers" :enable-zoom="true" @markertap="markertap"
+					@regionchange="regionchange">
 				</map>
 			</view>
 		</view>
@@ -59,7 +59,7 @@
 					{
 						id: 5, //环境检测
 						url: "../../static/images/distribution/8325b1b6079456ce43f952ce13d2919.png",
-						name: "环境测"
+						name: "环境测"
 					},
 					{
 						id: 6, //监控设备
@@ -77,7 +77,7 @@
 						name: "性诱2.0"
 					},
 				],
-				type: 2, //设备类型
+				type: '', //设备类型
 				typeindex: null, //设备选择
 				device_id: '', //设备号
 				serTF: false, //设备搜索显示隐藏
@@ -85,70 +85,19 @@
 				punctuation_id: "", //点击标点的id
 				punctuation_did: '',
 				punctuation_type: '',
-				listindex:1,//以选择设备名称
-				disstyle:{
-					position:"absolute",
-					bottom:"0rpx"
+				listindex: 1, //以选择设备名称
+				disstyle: {
+					position: "absolute",
+					bottom: "0rpx"
 				},
-				facilitydatas:[]
+				facilitydatas: [],
 			}
 		},
 		onLoad() {
-			this.history(this.device_id)
-		},
-		onShow() {
 			this.device_id = ""
-			this.list = []
-			uni.getStorage({
-				key: "jurisdiction",
-				success: (res) => {
-					console.log(JSON.parse(res.data))
-					var res = JSON.parse(res.data)
-					for (var i = 0; i < res.length; i++) {
-						switch (res[i].purview_name) {
-							case "测报系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name=="虫情测报灯"?"测报灯":res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-							case "监控系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-							case "环境监测系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-							case "防治系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-						}
-					}
-					for (var i = 0; i < this.icon.length; i++) {
-						if (this.list[0].name == this.icon[i].name) {
-							this.type = this.icon[i].id
-						}
-					}
-					// this.history()
-				},
-			})
+			this.usertype()
 		},
+		onShow() {},
 		methods: {
 			async history(device_id) { //获取分布位置
 				const res = await this.$myRequest({
@@ -162,24 +111,23 @@
 				this.covers = []
 				var arr = []
 				for (var i = 0; i < res.length; i++) {
-					var obj = {}
-					obj.latitude = Number(res[i].lat)
-					obj.longitude = Number(res[i].lng)
-					obj.id = parseInt(i)
-					obj.title = res[i].device_name || res[i].device_id
-					// obj.width = 30
-					// obj.height = 30
-					for (var j = 0; j < this.icon.length; j++) {
-						if (res[i].device_type_id == this.icon[j].id) {
-							obj.iconPath = this.icon[j].url
-						}
+					if (i < 2000) {
+						var obj = {}
+						obj.latitude = Number(res[i].lat)
+						obj.longitude = Number(res[i].lng)
+						obj.id = parseInt(i)
+						obj.title = res[i].device_name || res[i].device_id
+						// obj.width = 30
+						// obj.height = 30
+						obj.iconPath = "https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/image/distribution/"+res[i].device_type_id+".png"
+						arr.push(obj)
 					}
-					arr.push(obj)
+
 					// console.log(arr)
 				}
 				this.covers = arr
 				this.facilitydatas = res
-				if(res.length == 0){
+				if (res.length == 0) {
 					uni.showToast({
 						title: '未查询到设备',
 						duration: 2000,
@@ -187,20 +135,41 @@
 					});
 				}
 			},
+			async usertype() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.user_device_type',
+				})
+				
+				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 == "温室大棚" 
+					   ){
+						continue;
+					}
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id
+					}
+					this.list.push(obj)
+				}
+				this.type = this.list[0].id
+				this.history(this.device_id)
+				// console.log(this.list)
+			},
 			change(index) {
 				console.log(index)
 				this.device_id = ''
 				this.current = index
-				if (index == 0) {
-					this.type = ''
-				}else{
-					for (var i = 0; i < this.icon.length; i++) {
-						if (this.list[index].name == this.icon[i].name) {
-							console.log(this.icon[i].id)
-							this.type = this.icon[i].id
-						}
+				for (var i = 0; i < this.icon.length; i++) {
+					if (this.list[index].name == this.icon[i].name) {
+						console.log(this.icon[i].id)
+						this.type = this.icon[i].id
 					}
 				}
+				console.log(this.device_id)
 				this.history(this.device_id)
 			},
 			markertap(e) {
@@ -210,17 +179,17 @@
 				this.device_id = this.facilitydatas[e.detail.markerId].device_id
 				console.log(this.device_id)
 				uni.showModal({
-				    title: '设备详情查询',
-				    content: "设备id:"+this.device_id,
-					cancelText:"取消",
-					confirmText:"设备详情",
-				    success:(res)=> {
-				        if (res.confirm) {
+					title: '设备详情查询',
+					content: "设备id:" + this.device_id,
+					cancelText: "取消",
+					confirmText: "设备详情",
+					success: (res) => {
+						if (res.confirm) {
 							this.eqinfo(this.facilitydatas[e.detail.markerId])
-				        } else if (res.cancel) {
+						} else if (res.cancel) {
 							// this.serTFs()
-				        }
-				    }
+						}
+					}
 				});
 			},
 			search() { //搜索
@@ -248,41 +217,44 @@
 								url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item)
 							})
 							break;
-						// case 3:
-							
-						// case 4:
-						// 	uni.navigateTo({
-						// 		url: "../cb/xy/equip-set/xyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
-						// 	})
-						// 	break;
+							// case 3:
+
+							// case 4:
+							// 	uni.navigateTo({
+							// 		url: "../cb/xy/equip-set/xyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
+							// 	})
+							// 	break;
 						case 5:
 							uni.navigateTo({
-								url: "../environment/equipment?shebei=" +JSON.stringify(item)
+								url: "../environment/equipment?shebei=" + JSON.stringify(item)
 							})
 							break;
-						// case 6:
-						// 	// uni.navigateTo({
-						// 	// 	url: "../prevention/ucharts?d_id=" + this.punctuation_did + "&device_id=" + this.punctuation_id
-						// 	// })
-						// 	break;
-						// case 7:
-						// 	uni.navigateTo({
-						// 		url: "../cb/bzy/equip-set/bzyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
-						// 	})
-						// 	break;
+							// case 6:
+							// 	// uni.navigateTo({
+							// 	// 	url: "../prevention/ucharts?d_id=" + this.punctuation_did + "&device_id=" + this.punctuation_id
+							// 	// })
+							// 	break;
+							// case 7:
+							// 	uni.navigateTo({
+							// 		url: "../cb/bzy/equip-set/bzyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
+							// 	})
+							// 	break;
 						case 10:
 							uni.navigateTo({
-								url:"../cb/xy2.0/particulars?info=" +  JSON.stringify(item)
+								url: "../cb/xy2.0/particulars?info=" + JSON.stringify(item)
 							})
 							break;
 						default:
 							uni.navigateTo({
-								url: "../cb/equip-detail/equip-detail?info=" +  JSON.stringify(item)
+								url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
 							})
 							break;
 					}
 
 				}
+			},
+			regionchange(e) {
+				console.log(e)
 			}
 		}
 	}
@@ -296,11 +268,13 @@
 		z-index: 100;
 		background-color: #FFFFFF;
 	}
-	.LocationAndDetails{
+
+	.LocationAndDetails {
 		width: 100%;
 		height: 60rpx;
 		position: fixed;
 		top: 54px;
+
 		.search_bot_input {
 			width: 90%;
 			height: 54rpx;
@@ -310,70 +284,37 @@
 			box-sizing: border-box;
 			padding-top: 8rpx;
 			margin: 0 auto;
+
 			input {
 				width: 85%;
 				text-indent: 1rem;
 				font-size: 26rpx;
 			}
-		
+
 			.icon {
 				position: absolute;
 				top: 8rpx;
 				right: 26rpx;
 			}
 		}
-		// background-color: #ff0;
-		// .search{
-		// 	display: flex;
-			// input{
-			// 	width: 90%;
-			// 	font-size: 28rpx;
-			// 	margin-left: 40rpx;
-			// 	border: 1px solid #cfccc9;
-			// 	height: 60rpx;
-			// 	padding-left: 15px;
-			// 	box-sizing: border-box;
-			// 	border-radius: 60rpx;
-			// }
-		// }
-		// .Location{
-		// 	display: flex;
-		// 	margin-top: 20rpx;
-		// 	justify-content: space-around;
-		// 	.particulars_par {
-		// 		background-color: #F1F1F1;
-		// 		text-align: center;
-		// 		width: 40%;
-		// 		height: 80rpx;
-		// 		line-height: 80rpx;
-		// 		font-size: 28rpx;
-		// 		border-radius: 40rpx;
-		// 	}
-		// 	.particulars_ser {
-		// 		background-color: #57C87B;
-		// 		text-align: center;
-		// 		width: 40%;
-		// 		height: 80rpx;
-		// 		line-height: 80rpx;
-		// 		font-size: 28rpx;
-		// 		color: #FFFFFF;
-		// 		border-radius: 40rpx;
-		// 	}
-		// }
 	}
+
 	.page-section {
 		margin-top: 100px;
 		height: 95vh;
-		.map{
+
+		.map {
 			width: 100%;
 			height: 100%;
 		}
 	}
+
 	.particulars {
 		width: 100%;
 		height: 160rpx;
 		position: absolute;
 		bottom: 0;
+
 		.search_btn_top {
 			width: 100%;
 			height: 80rpx;
@@ -382,11 +323,12 @@
 			padding-left: 30rpx;
 			box-sizing: border-box;
 		}
+
 		.search_btn_bot {
 			width: 100%;
 			display: flex;
 		}
-		
+
 	}
 
 	.distri_ser {
@@ -396,6 +338,7 @@
 		width: 100%;
 		height: 440rpx;
 		background-color: #FFFFFF;
+
 		.distri_ser_input {
 			width: 90%;
 			margin: 20rpx auto;
@@ -476,4 +419,3 @@
 		}
 	}
 </style>
-

+ 5 - 2
pages/environment/gsequipment.vue

@@ -163,8 +163,11 @@
 				this.setlongfun(this.stepsize)
 			},
 			clickLeft() {
-				uni.navigateTo({
-					url: "./index"
+				// uni.navigateTo({
+				// 	url: "./index"
+				// })
+				uni.navigateBack({
+					delta:1
 				})
 			},
 			tohistory() {

+ 9 - 8
pages/environment/index.vue

@@ -213,17 +213,18 @@
 				this.filtrateTF = !this.filtrateTF
 			},
 			search() { //搜索按钮搜索
-				if(this.side_type == 5){
-					this.eqlistdata = []
-					this.eqlist()
-				}else if(this.side_type == 15){
-					this.eqlistdata = []
-					this.tubulareqlist()
-				}
+				this.searchinp()
 			},
 			searchinp() { //自动搜索
 				Debounce(() => {
-					this.search()
+					this.page = 1
+					if(this.side_type == 5){
+						this.eqlistdata = []
+						this.eqlist()
+					}else if(this.side_type == 15){
+						this.eqlistdata = []
+						this.tubulareqlist()
+					}
 				}, 1000)()
 			},
 			tabClick(index,type){

+ 50 - 0
pages/equipList/index.vue

@@ -157,6 +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 == "温室大棚" 
+					   ){
+						continue;
+					}
 					var obj = {
 						name: res[i].type_name,
 						id: res[i].id
@@ -180,6 +188,7 @@
 				this.page = 1
 				this.eqlistdata = []
 				this.type_id = this.list[index].id
+				console.log(this.type_id)
 				if (this.list[index].id == 10) {
 					this.xyeqlist()
 				} else {
@@ -238,6 +247,44 @@
 							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
 						})
 						break;
+					case 7:
+						item.type = this.type_id
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
+						})
+						break;
+					case 13:
+						console.log(item)
+						var obj = {}
+						obj.d_id = item.d_id
+						obj.device_id = item.imei
+						obj.is_online = item.is_online
+						obj.lat = item.lat
+						obj.lng = item.lng
+						obj.equip_name = item.device_name
+						obj.uptime = item.addtime
+						uni.navigateTo({
+							url: "../waterandfer/datails?shebei=" + JSON.stringify(obj)
+						})
+						break;
+					case 15:
+						console.log(item)
+						var obj = {}
+						obj.d_id = item.d_id
+						obj.device_id = item.imei
+						obj.is_online = item.is_online
+						obj.lat = item.lat
+						obj.lng = item.lng
+						obj.equip_name = item.device_name
+						obj.uptime = item.addtime
+						uni.navigateTo({
+							url: "../environment/gsequipment?shebei=" + JSON.stringify(obj)
+						})
+						break;
+					case 17:
+						break;
+					case 18:
+						break;
 					default:
 						item.type = this.type_id
 						uni.navigateTo({
@@ -400,6 +447,9 @@
 				text-align: center;
 				border-radius: 10rpx;
 				line-height: 50rpx;
+				overflow: hidden;//溢出隐藏
+				white-space: nowrap;//禁止换行
+				text-overflow: ellipsis;//...
 			}
 
 			.listbox_left_item_act {

+ 3 - 9
pages/equipList/modification.vue

@@ -1,10 +1,6 @@
 <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" title="修改名称"></uni-nav-bar>
-			</view>
+		<view class="">
 			<view class="mod">
 				<view class="mod_name">
 					<p><span style="color: #ff0000;" v-if="quanxian.namealter">*</span>设备名称</p>
@@ -200,7 +196,6 @@
 					this.selectaddress(this.moddata.lng, this.moddata.lat)
 				}
 			})
-			
 		}
 	}
 </script>
@@ -211,15 +206,14 @@
 	}
 	.mod {
 		width: 100%;
-		position: absolute;
-		top: 44px;
+		padding-top: 30rpx;
 		.mod_name,
 		.mod_id,
 		.mod_user,
 		.mod_time,
 		.mod_city {
 			width: 90%;
-			margin: 30rpx auto;
+			margin: 0 auto 30rpx;
 			display: flex;
 			justify-content: space-between;
 			background-color: #FFFFFF;

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

@@ -83,6 +83,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 == "温室大棚" 
+					   ){
+						continue;
+					}
 					var obj = {
 						name:res[i].type_name,
 						id:res[i].id

+ 5 - 1
pages/equipMange/index/index.vue

@@ -223,7 +223,11 @@
 			float: left;
 			box-shadow: 0 0 10rpx #bcb9ca;
 			text-align: center;
-
+			.userlist-li-city{
+				overflow: hidden;//溢出隐藏
+				white-space: nowrap;//禁止换行
+				text-overflow: ellipsis;//...
+			}
 			image {
 				width: 80rpx;
 				height: 80rpx;

+ 5 - 2
pages/expertDiagnosis/wormcase.vue

@@ -57,8 +57,11 @@
 				this.content = this.content.concat(res.data)
 			},
 			clickLeft() {
-				uni.navigateTo({
-					url: "./index"
+				// uni.navigateTo({
+				// 	url: "./index"
+				// })
+				uni.navigateBack({
+					delta:1
 				})
 			},
 			introduce(id) {

+ 13 - 8
pages/fourBase/index.vue

@@ -22,7 +22,8 @@
 						<view class="bgcolor"></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_charge}}</p>
+						<p style="font-size: 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>
@@ -191,22 +192,23 @@
 		},
 		onLoad() {
 			// this.getFourbase()
+			this.getFourbase()
 			uni.getStorage({
 				key:"jurisdiction",
 				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 == 36//"基地管理"
 					})
 					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//"修改"
 					})
 				},
 			})
@@ -216,8 +218,7 @@
 			this.getFourbase()
 		},
 		onShow() {
-			this.baselist = []
-			this.getFourbase()
+			
 			this.$forceUpdate()
 		},
 		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
@@ -308,7 +309,11 @@
 				z-index: 10;
 				padding: 40rpx;
 				color: #FFFFFF;
-
+				width: 100%;
+				box-sizing: border-box;
+				p:first-child{
+					font-size: 36rpx;
+				}
 				p {
 					margin-bottom: 10rpx;
 				}

+ 69 - 60
pages/index/index.vue

@@ -1,8 +1,9 @@
 <template>
 	<view>
 		<view class="weather">
-			<image :src="'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/'+weatherinfo.wea+'.png'" mode=""
-				class="weaimg"></image>
+			<image
+				:src="'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/'+weatherinfo.wea+'.png'"
+				mode="" class="weaimg"></image>
 			<view class="weatext">
 				<view class="weatext_title">
 					{{hello}}
@@ -76,31 +77,44 @@
 				系统设备
 			</view>
 			<view class="facilitybox_itembox">
-				<view class="facilitybox_item" v-if="jurisdiction.cbtf" @click="tabequipment(0)">
+				<view class="facilitybox_item" v-if="jurisdiction.cbtf" @click="tabequipment('../cb/index/index')">
 					<image src="../../static/images/newindex/cb.png" mode="" class="itemimg"></image>
 					<view class="">
 						测报系统
 					</view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.fztf" @click="tabequipment(1)">
+				<view class="facilitybox_item" v-if="jurisdiction.fztf" @click="tabequipment('../prevention/index')">
 					<image src="../../static/images/newindex/fz.png" mode="" class="itemimg"></image>
 					<view class="">
 						防治系统
 					</view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment(2)">
+				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../monitor/index')">
 					<image src="../../static/images/newindex/jk.png" mode="" class="itemimg"></image>
 					<view class="">
 						监控系统
 					</view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.hjtf" @click="tabequipment(3)">
+				<view class="facilitybox_item" v-if="jurisdiction.hjtf" @click="tabequipment('../environment/index')">
 					<image src="../../static/images/newindex/hj.png" mode="" class="itemimg"></image>
 					<view class="">
 						环境监测
 					</view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.sbtf" @click="tabequipment(4)">
+				<!-- <view class="facilitybox_item" v-if="jurisdiction.sftf" @click="tabequipment('../waterandfer/index')">
+					<image src="../../static/images/newindex/shuifeiyitihua.png" mode="" class="itemimg"></image>
+					<view class="">
+						水肥一体化
+					</view>
+				</view> -->
+				<view class="facilitybox_item" v-if="jurisdiction.ggtf" @click="tabequipment('../irrigate/index')">
+					<image src="../../static/images/newindex/guangai.png" mode="" class="itemimg"></image>
+					<view class="">
+						智能灌溉
+					</view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.sbtf"
+					@click="tabequipment('../equipMange/index/index')">
 					<image src="../../static/images/newindex/user.png" mode="" class="itemimg"></image>
 					<view class="">
 						用户管理
@@ -284,16 +298,18 @@
 					sytf: false,
 					sbtf: false,
 					sqtf: false,
-					zjtf: false
+					zjtf: false,
+					sftf: false,
+					ggtf: false
 				},
-				show:false,
-				url:"",
-				loadTF:false
+				show: false,
+				url: "",
+				loadTF: false
 			}
 		},
-		watch:{
-			url(news){
-				if(news!=""){
+		watch: {
+			url(news) {
+				if (news != "") {
 					uni.pageScrollTo({
 						scrollTop: 0,
 						duration: 500
@@ -302,7 +318,7 @@
 			}
 		},
 		methods: {
-			moveHandle(){
+			moveHandle() {
 				return
 			},
 			async getcity(lng, lat) {
@@ -336,34 +352,42 @@
 					sytf: false,
 					sbtf: false,
 					sqtf: false,
-					zjtf: false
+					zjtf: false,
+					sftf: false,
+					ggtf: false
 				}
 				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 42:
+							this.jurisdiction.jktf = true//"可视农业"
 							break;
-						case "可视农业":
-							this.jurisdiction.jktf = true
+						case 40:
+							this.jurisdiction.hjtf = true//"环境监测系统"
 							break;
-						case "环境监测系统":
-							this.jurisdiction.hjtf = true
+						case 44:
+							this.jurisdiction.fztf = true//"防治系统"
 							break;
-						case "防治系统":
-							this.jurisdiction.fztf = true
+						case 58:
+							this.jurisdiction.sytf = true//"溯源系统"
 							break;
-						case "溯源系统":
-							this.jurisdiction.sytf = true
+						case 28:
+							this.jurisdiction.sbtf = true//"系统管理"
 							break;
-						case "系统管理":
-							this.jurisdiction.sbtf = true
+						case 25:
+							this.jurisdiction.sqtf = true//"四情基地"
 							break;
-						case "四情基地":
-							this.jurisdiction.sqtf = true
+						case 124:
+							this.jurisdiction.zjtf = true//"专家诊断"
 							break;
-						case "专家诊断":
-							this.jurisdiction.zjtf = true
+						// case "灌溉控制系统":
+						// 	this.jurisdiction.sftf = true
+						// 	break;
+						case 202:
+							this.jurisdiction.ggtf = true//"灌溉控制系统"
 							break;
 					}
 				}
@@ -386,28 +410,11 @@
 					})
 				}
 			},
-			tabequipment(index) {
-				if (index == 0) {
-					uni.navigateTo({
-						url: "../cb/index/index"
-					})
-				} else if (index == 1) {
-					uni.navigateTo({
-						url: "../prevention/index"
-					})
-				} else if (index == 2) {
-					uni.navigateTo({
-						url: "/pages/monitor/index"
-					})
-				} else if (index == 3) {
-					uni.navigateTo({
-						url: "../environment/index"
-					})
-				} else if (index == 4) {
-					uni.navigateTo({
-						url: "../equipMange/index/index"
-					})
-				}
+			tabequipment(url) {
+				console.log(url)
+				uni.navigateTo({
+					url: url
+				})
 			},
 			onok(ev) {
 				this.path = this.url
@@ -433,7 +440,8 @@
 						success: (uploadFileRes) => {
 							console.log(JSON.parse(uploadFileRes.data))
 							uni.navigateTo({
-								url: "../disandpests/index?datas=" + uploadFileRes.data + "&path=" + ev.path
+								url: "../disandpests/index?datas=" + uploadFileRes.data + "&path=" + ev
+									.path
 							})
 						}
 					});
@@ -491,17 +499,17 @@
 			},
 			worm() {
 				uni.navigateTo({
-					url:"../expertDiagnosis/wormcase?name=虫情百科",
+					url: "../expertDiagnosis/wormcase?name=虫情百科",
 				});
 			},
 			virus() {
 				uni.navigateTo({
-					url:"../expertDiagnosis/wormcase?name=病害百科",
+					url: "../expertDiagnosis/wormcase?name=病害百科",
 				});
 			},
-			introduce(id,title) {
+			introduce(id, title) {
 				uni.navigateTo({
-					url:"../expertDiagnosis/introduce?id=" + id + "&title=" + title
+					url: "../expertDiagnosis/introduce?id=" + id + "&title=" + title
 				})
 			},
 		},
@@ -768,6 +776,7 @@
 			}
 		}
 	}
+
 	.loading {
 		position: absolute;
 		top: 0;

+ 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>

+ 2 - 2
pages/my/about/about.vue

@@ -44,8 +44,8 @@
 				<text class="val">hnyf826@163.com</text>
 			</view>
 		</view>
-		<view class="line" v-if="$isneutral"></view>
-		<view class="part" v-if="$isneutral">
+		<view class="line"></view>
+		<view class="part">
 			<view class="info-item" @click="renewal">
 				<text class="tit" >版本更新</text>
 				<p class="update" v-if="updateTF">NEW</p>

+ 45 - 6
pages/my/user-info/user-info.vue

@@ -32,8 +32,9 @@
 		</view>
 		<view class="info-item">
 			<text class="tit">我的地址</text>
+			<!-- <text class="val" >{{location}}<u-icon v-if="compileTF" name="arrow-right"></u-icon></text> -->
 			<input type="text" v-model="location" :class="compileTF?'valinput valinput2':'valinput'"
-			 :disabled="!compileTF" />
+			 :disabled="!compileTF" @click="cutticy"/>
 		</view>
 		<view class="compile">
 			<p @click="compile" v-if="!compileTF">编辑</p>
@@ -97,6 +98,15 @@
 					}
 				})
 				console.log(res)
+				if(!res){
+					this.compileTF = false
+					uni.removeStorage({
+						key: "location",
+					})
+					uni.navigateBack({
+						delta:1
+					})
+				}
 			},
 			compile() { //编辑按钮
 				this.compileTF = true
@@ -107,10 +117,6 @@
 					this.userinfos.city = this.location.slice(this.location.indexOf("省")+1,this.location.indexOf("市")+1)
 					this.userinfos.district = this.location.slice(this.location.indexOf("市")+1)
 					this.postusers()
-					this.compileTF = false
-					uni.redirectTo({
-						url:"../index/index"
-					})
 				}
 			},
 			verifyphone() { //手机号验证
@@ -128,7 +134,40 @@
 				} else {
 					this.emailhint = false
 				}
-			}
+			},
+			cutticy(){
+				if(this.compileTF){
+					uni.navigateTo({
+						url: "../../fourBase/city"
+					})
+				}
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=78ce288400f4fc6d9458989875c833c2&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.location = "--"
+						} else {
+							this.location = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					var lat = res.data[1]
+					var lng = res.data[0]
+					this.selectaddress(lng, lat)
+				}
+			})
 		},
 		onLoad(option) {
 			this.userinfos = JSON.parse(option.data)

+ 3 - 2
pages/prevention/index.vue

@@ -159,11 +159,12 @@
 				this.filtrateTF = !this.filtrateTF
 			},
 			search() { //搜索按钮搜索
-				this.eqlistdata = []
-				this.eqlist()
+				// this.eqlistdata = []
+				this.searchinp()
 			},
 			searchinp() { //自动搜索
 				Debounce(() => {
+					this.page = 1
 					this.eqlistdata = []
 					this.eqlist()
 				}, 1000)()

+ 1 - 0
pages/prevention/ucharts.vue

@@ -213,6 +213,7 @@
 						data: arr5,
 						color: '#00E29D'
 					}]
+					// console.log(obj)
 					this.showColumn("canvasColumnA", xtitle, obj)
 					this.showColumnb("canvasColumnB", xtitle, obj2)
 				}

+ 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>

+ 344 - 0
pages/waterandfer/datails.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;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: {},
+				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 == 208 //灌溉控制系统
+					})
+					let items2 = items[0].children.filter((item) => {
+						return item.pur_id == 184//"水肥一体化(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 172:
+								this.zttf = true//"设备状态"
+								break
+							case 173:
+								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>

BIN
static/images/12.png


BIN
static/images/13.png


BIN
static/images/14.png


BIN
static/images/15.png


BIN
static/images/16.png


BIN
static/images/17.png


BIN
static/images/18.png


BIN
static/images/19.png


BIN
static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png


BIN
static/images/irrigate/yinxingqia.png


BIN
static/images/newindex/guangai.png


BIN
static/images/newindex/shuifeiyitihua.png


Разница между файлами не показана из-за своего большого размера
+ 1334 - 0
static/json/eleList.json


Разница между файлами не показана из-за своего большого размера
+ 2 - 2
unpackage/dist/build/app-plus/app-config-service.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/build/app-plus/app-service.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json


BIN
unpackage/dist/build/app-plus/static/images/12.png


BIN
unpackage/dist/build/app-plus/static/images/13.png


BIN
unpackage/dist/build/app-plus/static/images/14.png


BIN
unpackage/dist/build/app-plus/static/images/15.png


BIN
unpackage/dist/build/app-plus/static/images/16.png


BIN
unpackage/dist/build/app-plus/static/images/17.png


BIN
unpackage/dist/build/app-plus/static/images/18.png


BIN
unpackage/dist/build/app-plus/static/images/19.png


BIN
unpackage/dist/build/app-plus/static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png


BIN
unpackage/dist/build/app-plus/static/images/irrigate/yinxingqia.png


BIN
unpackage/dist/build/app-plus/static/images/newindex/guangai.png


BIN
unpackage/dist/build/app-plus/static/images/newindex/shuifeiyitihua.png


Разница между файлами не показана из-за своего большого размера
+ 1334 - 0
unpackage/dist/build/app-plus/static/json/eleList.json


Разница между файлами не показана из-за своего большого размера
+ 2 - 2
unpackage/dist/dev/app-plus/app-config-service.js


Разница между файлами не показана из-за своего большого размера
+ 4949 - 1786
unpackage/dist/dev/app-plus/app-service.js


Разница между файлами не показана из-за своего большого размера
+ 4019 - 313
unpackage/dist/dev/app-plus/app-view.js


BIN
unpackage/dist/dev/app-plus/static/images/12.png


BIN
unpackage/dist/dev/app-plus/static/images/13.png


BIN
unpackage/dist/dev/app-plus/static/images/14.png


BIN
unpackage/dist/dev/app-plus/static/images/15.png


BIN
unpackage/dist/dev/app-plus/static/images/16.png


BIN
unpackage/dist/dev/app-plus/static/images/17.png


BIN
unpackage/dist/dev/app-plus/static/images/18.png


BIN
unpackage/dist/dev/app-plus/static/images/19.png


BIN
unpackage/dist/dev/app-plus/static/images/distribution/f2df86753bf7c9e311a59f632f5c545.png


BIN
unpackage/dist/dev/app-plus/static/images/irrigate/yinxingqia.png


BIN
unpackage/dist/dev/app-plus/static/images/newindex/guangai.png


BIN
unpackage/dist/dev/app-plus/static/images/newindex/shuifeiyitihua.png


Разница между файлами не показана из-за своего большого размера
+ 1334 - 0
unpackage/dist/dev/app-plus/static/json/eleList.json


BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png


+ 3 - 1
util/api.js

@@ -3,7 +3,9 @@ let BASE_URL = 'http://192.168.1.112:8002'
 export const myRequest = (options) => {
 	BASE_URL = uni.getStorageSync('http')
 	if (BASE_URL == '') {
-		BASE_URL = 'http://8.136.98.49:8002'
+		BASE_URL = 'http://8.136.98.49:8002'//线上
+		// BASE_URL = 'http://114.115.147.140:8002'//线下
+		// BASE_URL = 'http://192.168.1.77:8002'
 	}
 	// BASE_URL = 'http://192.168.1.77:8003'
 	console.log(BASE_URL)

+ 2 - 2
util/neutral.js

@@ -1,4 +1,4 @@
 export default{
-	isneutral:true//云飞智控
-	// isneutral:false//智控
+	// isneutral:true//云飞智控
+	isneutral:false//智控
 }