Sfoglia il codice sorgente

管式墒情上线

zhangyun 4 anni fa
parent
commit
dcc7860831
100 ha cambiato i file con 2713 aggiunte e 4648 eliminazioni
  1. 1 314
      App.vue
  2. 1 1
      manifest.json
  3. 20 0
      pages.json
  4. 1 1
      pages/afterSale/index.vue
  5. 1 1
      pages/afterSale/search.vue
  6. 38 13
      pages/cb/bzy/equip-set/bzyhistoryile.vue
  7. 37 5
      pages/cb/cbd/equip-set/historyfile.vue
  8. 15 6
      pages/cb/cbd/equip-set/statistics.vue
  9. 25 2
      pages/cb/equip-detail/equip-detail.vue
  10. 21 2
      pages/cb/index/index.vue
  11. 37 5
      pages/cb/xy/equip-set/xyhistoryile.vue
  12. 38 52
      pages/cb/xy2.0/historydatas.vue
  13. 2 2
      pages/disandpests/index.vue
  14. 38 5
      pages/environment/equipment.vue
  15. 342 0
      pages/environment/gsequipment.vue
  16. 406 0
      pages/environment/gshistory.vue
  17. 125 145
      pages/environment/history.vue
  18. 156 19
      pages/environment/index.vue
  19. 58 37
      pages/environment/search.vue
  20. 27 97
      pages/equipList/index.vue
  21. 92 56
      pages/equipMange/index/assignment.vue
  22. 82 25
      pages/equipMange/index/index.vue
  23. 55 33
      pages/fourBase/allocation.vue
  24. 2 2
      pages/fourBase/modification.vue
  25. 119 97
      pages/index/index.vue
  26. 1 1
      pages/login/login.vue
  27. 9 2
      pages/monitor/index.vue
  28. 1 1
      pages/my/about/about.vue
  29. 2 2
      pages/my/index/index.vue
  30. 1 1
      pages/my/user-info/user-info.vue
  31. 56 24
      pages/prevention/equipmentdetails.vue
  32. 18 2
      pages/prevention/index.vue
  33. 147 116
      pages/prevention/ucharts.vue
  34. BIN
      static/images/ajax-loader.gif
  35. 0 539
      style/font/demo.css
  36. 0 1850
      style/font/demo_index.html
  37. 290 148
      style/font/iconfont.css
  38. BIN
      style/font/iconfont.eot
  39. 0 1
      style/font/iconfont.js
  40. 0 520
      style/font/iconfont.json
  41. 0 245
      style/font/iconfont.svg
  42. BIN
      style/font/iconfont.ttf
  43. BIN
      style/font/iconfont.woff
  44. BIN
      style/font/iconfont.woff2
  45. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  46. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map
  47. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map
  48. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js.map
  49. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/historyfile.js.map
  50. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map
  51. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map
  52. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map
  53. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/xyhistoryile.js.map
  54. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map
  55. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map
  56. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map
  57. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequiment.js.map
  58. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequipment.js.map
  59. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gshistory.js.map
  60. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/history.js.map
  61. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map
  62. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map
  63. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map
  64. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map
  65. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/index.js.map
  66. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/allocation.js.map
  67. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/modification.js.map
  68. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  69. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
  70. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/monitor/index.js.map
  71. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/about/about.js.map
  72. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index/index.js.map
  73. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/user-info/user-info.js.map
  74. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/equipmentdetails.js.map
  75. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/index.js.map
  76. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/ucharts.js.map
  77. 3 1
      unpackage/dist/dev/mp-weixin/app.json
  78. 266 159
      unpackage/dist/dev/mp-weixin/common/main.wxss
  79. 11 11
      unpackage/dist/dev/mp-weixin/common/vendor.js
  80. 8 8
      unpackage/dist/dev/mp-weixin/components/bazaar-city_list/index.js
  81. 2 2
      unpackage/dist/dev/mp-weixin/components/bazaar-city_list/index.json
  82. 8 8
      unpackage/dist/dev/mp-weixin/components/equip-item/equip-item.js
  83. 8 8
      unpackage/dist/dev/mp-weixin/components/ksp-image-cutter/ksp-image-cutter.js
  84. 8 8
      unpackage/dist/dev/mp-weixin/components/uni-icons/uni-icons.js
  85. 8 8
      unpackage/dist/dev/mp-weixin/components/uni-nav-bar/uni-nav-bar.js
  86. 8 8
      unpackage/dist/dev/mp-weixin/components/uni-status-bar/uni-status-bar.js
  87. 2 2
      unpackage/dist/dev/mp-weixin/pages/afterSale/addafter.js
  88. 2 2
      unpackage/dist/dev/mp-weixin/pages/afterSale/index.js
  89. 2 2
      unpackage/dist/dev/mp-weixin/pages/afterSale/search.js
  90. 5 5
      unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js
  91. 1 1
      unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.wxml
  92. 33 4
      unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.wxss
  93. 1 1
      unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/equip-set.js
  94. 1 1
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/addimg.js
  95. 1 1
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/equip-set.js
  96. 5 5
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/historyfile.js
  97. 1 1
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/historyfile.wxml
  98. 32 0
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/historyfile.wxss
  99. 1 1
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/imgpage.js
  100. 0 0
      unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/manualinput.js

File diff suppressed because it is too large
+ 1 - 314
App.vue


+ 1 - 1
manifest.json

@@ -144,7 +144,7 @@
             "disableHostCheck" : true,
             "proxy" : {
                 "/ksy" : {
-                    "target" : "http://182.92.193.64:8002",
+                    "target" : "http://114.115.147.140:8002",
                     "changeOrigin" : true,
                     "ws" : true,
                     "pathRewrite" : {

+ 20 - 0
pages.json

@@ -520,6 +520,26 @@
             }
             
         }
+        ,{
+            "path" : "pages/environment/gshistory",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "管式墒情历史记录",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/environment/gsequipment",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "管式墒情设备详情",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+            }
+            
+        }
     ],
 	"condition": { //模式配置,仅开发期间生效
 		"current": 3, //当前激活的模式(list 的索引项)

+ 1 - 1
pages/afterSale/index.vue

@@ -56,7 +56,7 @@
 	export default {
 		data() {  
 			return {
-				BASE_URL: 'http://182.92.193.64:8002',
+				BASE_URL: 'http://114.115.147.140:8002',
 				faultdata: [],
 				aftersale_icon: [{
 						src: '/image/afterSale/6.png'

+ 1 - 1
pages/afterSale/search.vue

@@ -51,7 +51,7 @@
 		data() {
 			return {
 				imports:'',
-				BASE_URL: 'http://182.92.193.64:8002',
+				BASE_URL: 'http://114.115.147.140:8002',
 				faultdata:[],
 				aftersale_icon: [{
 						src: '/image/afterSale/6.png'

+ 38 - 13
pages/cb/bzy/equip-set/bzyhistoryile.vue

@@ -12,9 +12,12 @@
 						{{item}}
 					</view>
 				</view>
-				<view class="canvastishi" v-if="!canvastishiTF">
+				<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>
@@ -82,12 +85,12 @@
 				page: 1,
 				pagesum: 1,
 				historylistdata: [],
-				thdata: ["上报时间", "设备开关", "环境温度(°C)", "环境湿度(%)", "保温仓温度设定温度(°C)", "保温仓温度当前温度(°C)", "电池状态", "雨控状态", "摄像头状态", "信号强度",
-					"电流(mA)",
-					"电压(V)", "设备版本"
+				thdata: ["上报时间", "设备开关", "环境温度(°C)", "环境湿度(%)", "保温仓设定温度(°C)", "保温仓当前温度(°C)", "电池状态", "雨控状态", "摄像头状态", "信号强度",
+					"电流(mA)","电压(V)", "设备版本"
 				],
 				forbidden: false,
-				canvastishiTF: false,
+				canvastishiTF: false,//暂无数据提示
+				dataloadingtf:true,//加载中提示
 				cWidth: '400',
 				cHeight: '400',
 				pixelRatio: 1,
@@ -99,7 +102,8 @@
 			//    d_id                    必传                            设备id
 			//    start_time              非必传(string 时间戳)           开始时间    (用于时间搜索)
 			//    end_time
-			async history() { //获取图片列表
+			async history() {
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
 					data: {
@@ -109,6 +113,7 @@
 						end_time: parseInt(this.end_time / 1000)
 					}
 				})
+				this.dataloadingtf = false
 				console.log(res)
 				this.historydatas = res
 				console.log(this.historydatas)
@@ -145,7 +150,7 @@
 				}
 			},
 			//forecast.worm_lamp.device_history_data历史数据列表
-			async historylist() { //获取图片列表
+			async historylist() { 
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
 					data: {
@@ -157,7 +162,7 @@
 					}
 				})
 				this.historylistdata = res.data
-				this.pagesum = Math.ceil(res.counts / 10 + 1)
+				this.pagesum = Math.ceil(res.counts / 10) || 1
 				if (res.data.length == 0) {
 					this.forbidden = true
 					console.log(res.data.length)
@@ -324,6 +329,23 @@
 			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 {
@@ -388,22 +410,25 @@
 				.td {
 					display: inline-block;
 					padding: 5rpx;
-					width: 240rpx;
+					width: 300rpx;
 					text-align: center;
 					height: 52rpx;
 					line-height: 52rpx;
 					border: 2rpx solid #F1F1F1;
 				}
 
-				.th {
-					height: 100rpx;
-				}
-
 				.th:first-child,
 				.td:first-child {
 					width: 300rpx;
 				}
 			}
+			.tr:nth-child(2n-1){
+				background-color: #f5fff8;
+			}
+			.tr:first-child{
+				background-color: #57c878;
+				color: #fff;
+			}
 		}
 
 		.pagenumber {

+ 37 - 5
pages/cb/cbd/equip-set/historyfile.vue

@@ -12,9 +12,12 @@
 						{{item}}
 					</view>
 				</view>
-				<view class="canvastishi" v-if="!canvastishiTF">
+				<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>
@@ -88,12 +91,14 @@
 				cWidth: '400',
 				cHeight: '400',
 				pixelRatio: 1,
-				canvastishiTF: false,
+				canvastishiTF: false,//暂无数据提示
+				dataloadingtf:true,//加载中提示
 				pagesum: 1
 			}
 		},
 		methods: {
 			async history() { //历史数据列表折线图
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
 					data: {
@@ -103,6 +108,7 @@
 						end_time: parseInt(this.end_time / 1000)
 					}
 				})
+				this.dataloadingtf = false
 				this.historydatas = res
 				console.log(this.historydatas)
 				if (this.historydatas.length == 0) {
@@ -151,7 +157,7 @@
 					}
 				})
 				this.historylistdata = res.data
-				this.pagesum = Math.ceil(res.counts / 10) + 1
+				this.pagesum = Math.ceil(res.counts / 10) || 1
 				if (res.data.length == 0) {
 					this.forbidden = true
 					console.log(res.data.length)
@@ -232,8 +238,10 @@
 				}
 			},
 			next() { //下一页
-				this.page++
-				this.historylist()
+				if(this.page<this.pagesum){
+					this.page++
+					this.historylist()
+				}
 			},
 			clickLeft() {
 				uni.navigateBack({
@@ -335,6 +343,23 @@
 			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 {
@@ -412,6 +437,13 @@
 					width: 300rpx;
 				}
 			}
+			.tr:nth-child(2n-1){
+				background-color: #f5fff8;
+			}
+			.tr:first-child{
+				background-color: #57c878;
+				color: #fff;
+			}
 		}
 
 		.pagenumber {

+ 15 - 6
pages/cb/cbd/equip-set/statistics.vue

@@ -37,7 +37,7 @@
 					<view class="canvastishi" v-if="!canvastishiTF">
 						暂无数据
 					</view>
-					<canvas v-if="canvastishiTF" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+					<canvas v-if="canvastishiTF" canvas-id="canvasColumnA" id="canvasColumnA" class="charts" v-show="showCanvas"
 						@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>
@@ -47,7 +47,7 @@
 					<view class="canvastishi" v-if="!canvastishiTF">
 						暂无数据
 					</view>
-					<canvas v-if="canvastishiTF" canvas-id="canvasRing" id="canvasRing" class="charts"
+					<canvas v-if="canvastishiTF" canvas-id="canvasRing" id="canvasRing" class="charts" v-show="showCanvas"
 						@touchstart="touchRing"
 						: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>
@@ -167,9 +167,18 @@
 				tishi: false,
 				toptext: ["自动统计", "手动统计"],
 				topindex: 0,
-				tableval: []
+				tableval: [],
+				showCanvas:true
 			}
 		},
+		watch: {
+			pickertfone(newValue, oldValue){
+				this.showCanvas = !newValue
+			},
+			pickertftwo(newValue, oldValue){
+				this.showCanvas = !newValue
+			},
+		},
 		methods: {
 			async historys() { //获取统计虫子 自动统计 初始化统计 没有传入害虫名称
 				const res = await this.$myRequest({
@@ -225,11 +234,11 @@
 						}
 					}
 
-					if (maxnumarr.length < 20) {
+					if (maxnumarr.length < 15) {
 						ringarr = maxnumarr
 					} else {
-						ringarr = maxnumarr.splice(0, 20)
-						this.tableval = maxnumarr.splice(20)
+						ringarr = maxnumarr.splice(0, 15)
+						this.tableval = maxnumarr.splice(15)
 					}
 					var tablevalsum = 0
 					for (var i = 0; i < maxnumarr.length; i++) {

+ 25 - 2
pages/cb/equip-detail/equip-detail.vue

@@ -78,9 +78,12 @@
 			<p>实时数据</p>
 			<p class="span" @click="partClicks" v-if="equipInfo.type!=4">历史数据>>></p>
 		</view>
-		<view class="newtishi" v-if="!newtishitf">
+		<view class="newtishi" v-if="!newtishitf && !dataloadingtf">
 			暂无数据
 		</view>
+		<view class="newtishi" v-if="dataloadingtf">
+			<p class="dataloading">加载中</p>
+		</view>
 		<view class="newState" v-else>
 			<view class="item" v-for="item in curState">
 				<view class="item_info_img">
@@ -214,7 +217,8 @@
 				yxShow: false, //诱芯弹框
 				xyErr: '',
 				decoy: '',
-				newtishitf: false,
+				newtishitf: false,//暂无数据提示
+				dataloadingtf:true,//加载中提示
 				date: "", //日历最大可选日期
 			}
 		},
@@ -544,6 +548,7 @@
 		},
 		methods: {
 			async getState() {
+				this.dataloadingtf =true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
 					data: {
@@ -553,6 +558,7 @@
 						page_size: 1,
 					}
 				})
+				this.dataloadingtf = false
 				console.log(res)
 				console.log(1222)
 				if (res.counts != 0) {
@@ -776,6 +782,23 @@
 			text-align: center;
 			padding-top: 40rpx;
 			font-size: 32rpx;
+			.dataloading:after {
+				overflow: hidden;
+				display: inline-block;
+				vertical-align: bottom;
+				animation: ellipsis 2s infinite;
+				content: "\2026";
+			}
+			
+			@keyframes ellipsis {
+				from {
+					width: 2px;
+				}
+			
+				to {
+					width: 15px;
+				}
+			}
 		}
 
 		.newState {

+ 21 - 2
pages/cb/index/index.vue

@@ -21,6 +21,9 @@
 					</view>
 				</view>
 			</view>
+			<view class="loading" v-if="loadingtf">
+				<image src="../../../static/images/ajax-loader.gif" mode="" class="img"></image>
+			</view>
 			<view class="" style="position: absolute;top: 180px;width: 100%;">
 				<view class="content">
 					<template v-for="(item,index) in equipArr[active].list">
@@ -93,7 +96,8 @@
 				device_id: '3', //筛选的设备id
 				isTop: false,
 				filtrateTF:false,
-				device_status:""
+				device_status:"",
+				loadingtf:false,//设备列表加载中
 			}
 		},
 		onLoad() {
@@ -176,6 +180,7 @@
 		},
 		methods: {
 			async getEquipList(act) {
+				this.loadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
 					data: {
@@ -185,11 +190,13 @@
 						device_status:this.device_status
 					}
 				})
+				this.loadingtf =false
 				console.log(res)
 				this.equipArr[act].list = [...this.equipArr[act].list, ...res.data]
 				console.log(this.equipArr[act].list)
 			},
 			async getxyEquipList(act) {
+				this.loadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
 					data: {
@@ -199,6 +206,7 @@
 						device_status:this.device_status
 					}
 				})
+				this.loadingtf =false
 				console.log(res)
 				this.equipArr[act].list = [...this.equipArr[act].list, ...res.data]
 				console.log(this.equipArr[act].list)
@@ -293,7 +301,18 @@
 	image {
 		width: 100%;
 	}
-	
+	.loading{
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+		z-index: 100;
+		.img{
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
 	.bases_search {
 		width: 60%;
 		background-color: #FFFFFF;

+ 37 - 5
pages/cb/xy/equip-set/xyhistoryile.vue

@@ -12,9 +12,12 @@
 						{{item}}
 					</view>
 				</view>
-				<view class="canvastishi" v-if="!canvastishiTF">
+				<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>
@@ -84,7 +87,8 @@
 				cWidth: '400',
 				cHeight: '400',
 				pixelRatio: 1,
-				canvastishiTF: false,
+				canvastishiTF: false,//暂无数据提示
+				dataloadingtf:true,//加载中提示
 				d_id: '',
 				start_time: "",
 				end_time: "",
@@ -110,6 +114,7 @@
 			//    start_time              非必传(string 时间戳)           开始时间    (用于时间搜索)
 			//    end_time
 			async history() { //历史数据折线图
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
 					data: {
@@ -119,6 +124,7 @@
 						end_time: parseInt(this.end_time / 1000)
 					}
 				})
+				this.dataloadingtf =false
 				this.historydatas = res
 				console.log(this.historydatas)
 				if (res.length == 0) {
@@ -183,7 +189,7 @@
 					}
 				})
 				this.historylistdata = res.data
-				this.pagesum = Math.ceil(res.counts / 10)+1
+				this.pagesum = Math.ceil(res.counts / 10) || 1
 				if (res.data.length == 0) {
 					this.forbidden = true
 				} else {
@@ -232,8 +238,10 @@
 				}
 			},
 			next() { //下一页
-				this.page++
-				this.historylist()
+				if(this.page<this.pagesum){
+					this.page++
+					this.historylist()
+				}
 			},
 			clickLeft() {
 				uni.navigateBack({
@@ -357,6 +365,23 @@
 			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 {
@@ -464,6 +489,13 @@
 					width: 300rpx;
 				}
 			}
+			.tr:nth-child(2n-1){
+				background-color: #f5fff8;
+			}
+			.tr:first-child{
+				background-color: #57c878;
+				color: #fff;
+			}
 		}
 
 		.pagenumber {

+ 38 - 52
pages/cb/xy2.0/historydatas.vue

@@ -8,9 +8,12 @@
 						{{item}}
 					</view>
 				</view>
-				<view class="canvastishi" v-if="!canvastishiTF">
+				<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>
@@ -77,54 +80,15 @@
 				cWidth: '400',
 				cHeight: '400',
 				pixelRatio: 1,
-				canvastishiTF: false,
-				pagesum: null,
+				canvastishiTF: false,//暂无数据提示
+				dataloadingtf:true,//加载中提示
+				pagesum: 1,
 				worms: []
 			}
 		},
 		methods: {
-			async history() { //历史数据列表折线图
-				// this.Chistory()
-				const res = await this.$myRequest({
-					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_line_chart',
-					data: {
-						device_id: this.device_id,
-						strat_time: parseInt(this.start_time / 1000),
-						end_time: parseInt(this.end_time / 1000),
-						status: "at_ah"
-					}
-				})
-				this.historydatas = res
-				console.log(this.historydatas)
-				if (this.historydatas.length == 0) {
-					this.canvastishiTF = false
-				} else {
-					this.canvastishiTF = true
-					// var arr1 = []
-					// var arr2 = []
-					var arr3 = []
-					var xtitle = []
-					for (var i = 0; i < res.length; i++) {
-						var times = new Date(res[i].xy_addtime)
-						xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
-						// arr1.unshift(res[i].ah == "" ? "0" : res[i].ah)
-						// arr2.unshift(res[i].at == "" ? "0" : res[i].at)
-					}
-					for (var j = 0; j < this.worms.length; j++) {
-						var times = new Date(res[i].xy_addtime)
-						arr3.unshift(res[i].pest_num == "" ? "0" : res[i].pest_num)
-					}
-					this.$nextTick(() => {
-						var obj = [{
-							name: '诱虫次数',
-							data: arr3,
-							color: '#ff0000'
-						}]
-						this.showColumn("canvasColumnA", xtitle, obj)
-					})
-				}
-			},
 			async Chistory() { //历史数据列表折线图
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_line_chart',
 					data: {
@@ -134,6 +98,7 @@
 						status: "pest"
 					}
 				})
+				this.dataloadingtf = false
 				this.worms = res
 				console.log(this.worms)
 				if (this.worms.data.length == 0) {
@@ -143,14 +108,9 @@
 					var arr3 = []
 					var xtitle = []
 					for (var i = 0; i < res.data.length; i++) {
-						// var times = new Date(res[i].xy_addtime)
-						// xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
 						xtitle.unshift(res.data[i].xy_addtime)
-						// arr1.unshift(res[i].ah == "" ? "0" : res[i].ah)
-						// arr2.unshift(res[i].at == "" ? "0" : res[i].at)
 					}
 					for (var j = 0; j < this.worms.data.length; j++) {
-						// var times = new Date(res[i].xy_addtime)
 						arr3.unshift(this.worms.data[j].pest_num == "" ? "0" : this.worms.data[j].pest_num)
 					}
 					console.log(arr3)
@@ -177,7 +137,7 @@
 				})
 				this.historylistdata = res.data
 				console.log(res.data)
-				this.pagesum = Math.ceil(res.nums / 10) + 1
+				this.pagesum = Math.ceil(res.nums / 10) || 1
 				if (res.data.length == 0) {
 					this.forbidden = true
 				} else {
@@ -249,8 +209,10 @@
 				}
 			},
 			next() { //下一页
-				this.page++
-				this.historylist()
+				if(this.page<this.pagesum){
+					this.page++
+					this.historylist()
+				}
 			},
 			clickLeft() {
 				uni.navigateBack({
@@ -353,6 +315,23 @@
 			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 {
@@ -432,6 +411,13 @@
 					width: 300rpx;
 				}
 			}
+			.tr:nth-child(2n-1){
+				background-color: #f5fff8;
+			}
+			.tr:first-child{
+				background-color: #57c878;
+				color: #fff;
+			}
 		}
 
 		.pagenumber {

+ 2 - 2
pages/disandpests/index.vue

@@ -99,7 +99,7 @@
 				if (this.flag == 2) {
 					// pest.pests.insect_discern 虫害
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 						url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
@@ -115,7 +115,7 @@
 				} else if (this.flag == 1) {
 					//pest.pests.insect_discern病害识别
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 						url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',

+ 38 - 5
pages/environment/equipment.vue

@@ -36,7 +36,7 @@
 				</view>
 			</view>
 			<view class="realtime">
-				<p class="realtime_title"><span v-if="realtimeTF">实时数据</span><span v-else>实时数据(暂无数据)</span></p>
+				<p class="realtime_title"><span>实时数据</span></p>
 				<view class="realtime_text">
 					<view class="realtime_text_item">
 						<view class="realtime_text_item_info" v-for="(item,index) in olddata.conf" :key="index" v-if="olddata.dat[index][1]&&item" @click="oneday(item,index)">
@@ -51,6 +51,12 @@
 						</view>
 					</view>
 				</view>
+				<view class="realtime_tishi" v-if="!realtimeTF && !dataloadingtf">
+					暂无数据
+				</view>
+				<view class="realtime_tishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
 			</view>
 		</view>
 		<u-modal v-model="show" :title-style="{color: 'red'}" :mask-close-able="true" title="24小时数据">
@@ -102,7 +108,8 @@
 				onedatasMaxtime:"",
 				onedatasMintime:"",
 				tishiTF:false,
-				realtimeTF:false
+				realtimeTF:false,//暂无数据提示
+				dataloadingtf:true,//加载中提示
 			}
 		},
 		methods: {
@@ -111,13 +118,15 @@
 					delta: 1
 				})
 			},
-			async history() { //设备列表
+			async history() { //实时数据
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=weather.weather.qxz_status',
 					data: {
 						device_id: this.eqinfo.item.equip_id || this.eqinfo.item.device_id
 					}
 				})
+				this.dataloadingtf = false
 				this.olddata = res
 				var arr = []
 				for (var key in this.olddata.conf) {
@@ -135,7 +144,7 @@
 				console.log(this.realtimeTF)
 			},
 			// weather.weather.qxz_data_chart 一天的数据
-			async onehistory() { //设备列表
+			async onehistory() {
 				var  newtime = +new Date()/1000
 				var  oldtime = newtime-24*60*60
 				const res = await this.$myRequest({
@@ -402,7 +411,31 @@
 			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;

+ 342 - 0
pages/environment/gsequipment.vue

@@ -0,0 +1,342 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 40px;">
+			<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="" style="position: relative;top: 44px;">
+				<view class="info">
+					<view class="info_item">
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png" mode="" class="bgi"></image>
+						<p style="font-size: 32rpx;" @click="copy(eqinfo.device_id)">设备 ID:{{eqinfo.device_id}}
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode=""
+								class="tishi"></image>
+						</p>
+						<p>设备名称:{{eqinfo.device_name||"无"}}</p>
+						<p>最近上报时间:<span v-if="eqinfo.uptime">{{eqinfo.uptime|timeFormat()}}</span><span
+								v-else>{{eqinfo.addtime|timeFormat()}}</span></p>
+						<p>地址:{{city}}</p>
+						<p @click="setlongfun('')">
+							<text space="emsp">设置步长</text>
+							<u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon>
+						</p>
+					</view>
+				</view>
+				<u-modal v-model="modalshow" @confirm="confirm" show-cancel-button>
+					<view class="modalbox">
+						<p>设置步长:</p>
+						<input type="number" v-model="stepsize" class="uinput" placeholder="请输入步长" />
+						<p>cm</p>
+					</view>
+				</u-modal>
+				<view class="newdatas">
+					<view class="newdatas_title">
+						<span>实时数据</span>
+						<p @click="tohistory">历史数据>>></p>
+					</view>
+					<view class="newdatas_air">
+						<view class="newdatas_air_box">
+							<view class="imgbox">
+								<image src="http://www.hnyfwlw.com:8006//bigdata_app/image/environment/tubular/daqi.png"
+									mode="" class="img"></image>
+							</view>
+							<view class="infobox">
+								<p>大气压强</p>
+								<p>{{newdataobj.atm}}Pa</p>
+							</view>
+						</view>
+						<view class="newdatas_air_box">
+							<view class="imgbox">
+								<image src="http://www.hnyfwlw.com:8006//bigdata_app/image/environment/tubular/kqs.png"
+									mode="" class="img"></image>
+							</view>
+							<view class="infobox">
+								<p>空气湿度</p>
+								<p>{{newdataobj.ats}}%RH</p>
+							</view>
+						</view>
+						<view class="newdatas_air_box">
+							<view class="imgbox">
+								<image src="http://www.hnyfwlw.com:8006//bigdata_app/image/environment/tubular/kqw.png"
+									mode="" class="img"></image>
+							</view>
+							<view class="infobox">
+								<p>空气温度</p>
+								<p>{{newdataobj.at}}℃</p>
+							</view>
+						</view>
+					</view>
+					<view class="newdatas_land" v-for="item,index in newdataobj.temp" :key="index">
+						<p class="newdatas_land_title">{{newdataobj.topic * (index+1)}}cm</p>
+						<view class="newdatas_land_info">
+							<view class="newdatas_land_box">
+								<view class="imgbox">
+									<image
+										:src="'http://www.hnyfwlw.com:8006//bigdata_app/image/environment/tubular/trs'+(index+1)+'.png'"
+										mode="" class="img"></image>
+								</view>
+								<view class="infobox">
+									<p>土壤湿度</p>
+									<p>{{newdataobj.swc[index]}}%RH</p>
+								</view>
+							</view>
+							<view class="newdatas_land_box">
+								<view class="imgbox">
+									<image
+										:src="'http://www.hnyfwlw.com:8006//bigdata_app/image/environment/tubular/trw'+(index+1)+'.png'"
+										mode="" class="img"></image>
+								</view>
+								<view class="infobox">
+									<p>土壤温度</p>
+									<p>{{newdataobj.temp[index]}}℃</p>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				eqinfo: {},
+				city: "",
+				modalshow: false, //设置步长弹框,
+				stepsize: "", //步长值
+				newdataobj: {}, //实时数据
+			}
+		},
+		methods: {
+			reverseGeocode(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)
+						// this.city = ress.data.regeocode.formatted_address
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+			// weather.weather.nd_topic_change 设置 获取步长
+			async setlongfun(stepsize) { //设备列表
+				this.modalshow = !this.modalshow
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.nd_topic_change',
+					data: {
+						device_id: this.eqinfo.device_id,
+						topic: stepsize
+					}
+				})
+				this.stepsize = res.topic
+				if (stepsize) {
+					uni.showToast({
+						title: "设置成功",
+						icon: "none"
+					})
+				}
+			},
+			//weather.weather.nd_status 实时数据
+			async newdatafun() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.nd_status',
+					data: {
+						device_id: this.eqinfo.device_id,
+					}
+				})
+				this.newdataobj = res
+				this.newdataobj.temp = this.newdataobj.temp.split(",")
+				this.newdataobj.swc = this.newdataobj.swc.split(",")
+				console.log(this.newdataobj)
+			},
+			confirm() {
+				this.modalshow = !this.modalshow
+				this.setlongfun(this.stepsize)
+			},
+			clickLeft() {
+				uni.navigateTo({
+					url: "./index"
+				})
+			},
+			tohistory() {
+				uni.navigateTo({
+					url: "./gshistory?id="+ this.eqinfo.device_id
+				})
+			},
+			copy(item) {
+				uni.setClipboardData({
+					data: item,
+					success: function() {
+						console.log('success');
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			this.eqinfo = JSON.parse(option.shebei)
+			this.reverseGeocode(this.eqinfo.lat, this.eqinfo.lng)
+			this.newdatafun()
+			console.log(this.eqinfo)
+		}
+	}
+</script>
+
+<style lang="scss">
+	.info {
+		width: 100%;
+
+		.info_item {
+			width: 90%;
+			margin: 0 auto;
+			padding: 26rpx 50rpx;
+			position: relative;
+			box-sizing: border-box;
+
+			.bgi {
+				width: 100%;
+				height: 100%;
+				position: absolute;
+				top: 0;
+				left: 0;
+				z-index: -1;
+			}
+
+			p {
+				font-size: 24rpx;
+				color: #FFFFFF;
+				margin-bottom: 10rpx;
+
+				.tishi {
+					width: 30rpx;
+					height: 30rpx;
+					margin: 0rpx 0 0 20rpx;
+				}
+			}
+		}
+	}
+
+	.modalbox {
+		display: flex;
+		padding: 20px 10px;
+
+		.uinput {
+			width: 50%;
+			border-radius: 22px;
+			background-color: #f4f4f4;
+			margin: 0 10px;
+			text-indent: 1rem;
+			font-size: 28rpx;
+		}
+	}
+
+	.newdatas {
+		width: 100%;
+		margin-top: 20rpx;
+		.newdatas_title {
+			width: 90%;
+			margin: 0 auto;
+			display: flex;
+			justify-content: space-between;
+			height: 50rpx;
+			line-height: 50rpx;
+
+			span,p {
+				font-size: 13px;
+			}
+
+			span:first-child {
+				font-size: 16px;
+				font-weight: 700;
+			}
+		}
+
+		.newdatas_air {
+			width: 90%;
+			margin: 0 auto 20rpx;
+			display: flex;
+			justify-content: space-between;
+			flex-wrap: wrap;
+
+			.newdatas_air_box {
+				width: 48%;
+				padding: 20rpx;
+				box-sizing: border-box;
+				box-shadow: 0 0 10rpx #bcb9ca;
+				margin-top: 20rpx;
+				display: flex;
+
+				.imgbox {
+					width: 60rpx;
+					height: 60rpx;
+					margin: 16rpx 30rpx 0rpx 20rpx;
+
+					.img {
+						width: 60rpx;
+						height: 60rpx;
+					}
+				}
+
+				.infobox {
+					font-size: 28rpx;
+
+					p {
+						margin-bottom: 10rpx;
+					}
+				}
+			}
+		}
+
+		.newdatas_land {
+			width: 90%;
+			margin: 0 auto 20rpx;
+			.newdatas_land_title{
+				font-size: 28rpx;
+			}
+			.newdatas_land_info {
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				flex-wrap: wrap;
+
+				.newdatas_land_box {
+					width: 48%;
+					padding: 20rpx;
+					box-sizing: border-box;
+					box-shadow: 0 0 10rpx #bcb9ca;
+					margin-top: 20rpx;
+					display: flex;
+
+					.imgbox {
+						width: 60rpx;
+						height: 60rpx;
+						margin: 16rpx 30rpx 0rpx 20rpx;
+
+						.img {
+							width: 60rpx;
+							height: 60rpx;
+						}
+					}
+
+					.infobox {
+						font-size: 28rpx;
+
+						p {
+							margin-bottom: 10rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 406 - 0
pages/environment/gshistory.vue

@@ -0,0 +1,406 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 40px;">
+			<view style="position: fixed;z-index: 10000000;width: 100%;background-color: #000000;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="历史数据"></uni-nav-bar>
+			</view>
+		</view>
+		<view class="" style="position: relative;top: 100px;">
+			<view class="selecttimes" @click="tiemshow=!tiemshow">
+				<view class="timesbox">
+					<image
+						:src="'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+						mode=""></image>
+					<p>{{timetab(begintime)}}</p>
+					<p class="or">~</p>
+					<p>{{timetab(end)}}</p>
+					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
+				</view>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+			</view>
+			<view class="shuju_one">
+				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
+					暂无数据
+				</view>
+				<view class="canvastishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
+				<canvas v-show="!tiemshow" canvas-id="canvasColumnA" id="canvasColumnA" class="charts" @touchstart="touchLineA($event)"
+					@touchmove="moveLineA($event)" @touchend="touchEndLineA($event)" disable-scroll=true
+					:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
+			</view>
+			<view class="condition">
+				<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+					<table class="table" :style="{width:300*thdata.length+'rpx'}">
+						<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 historylistdata" :key="'b'+indexs" v-if="!forbidden">
+							<td class="td">{{items.uptime|timeFormat()}}</td>
+							<td class="td">{{items.ats}}</td>
+							<td class="td">{{items.at}}</td>
+							<td class="td" v-for="(item,index) in items.temp" :key="'c'+index">{{item}}</td>
+							<td class="td" v-for="(item,index) in items.swc" :key="'d'+index">{{item}}</td>
+							<td class="td">{{items.atm}}</td>
+						</tr>
+						<tr class="tr" v-if="forbidden">
+							<td class="td" v-for="item in 13">暂无数据</td>
+						</tr>
+					</table>
+				</scroll-view>
+				<view class="pagenumber">
+					<button @click="prev">上一页</button>
+					<view class="pagenumber_page">
+						第 {{page}} 页
+					</view>
+					<view class="pagenumber_page">
+						共 {{pagesum}} 页
+					</view>
+					<button @click="next">下一页</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uCharts from '../../components/js_sdk/u-charts/u-charts/u-charts.js';
+	var canvaColumnA = null;
+	export default {
+		data() {
+			return {
+				tiemshow: false, //时间筛选弹框
+				begintime: "", //开始时间
+				end: "", //结束时间
+				dataloadingtf: true,
+				canvastishiTF: false,
+				device_id: '', //设备ID
+				thdata: ["上传时间", "空气湿度(%RH)", "空气温度(℃)", "10cm土壤温度(%RH)", "20cm土壤温度(%RH)", "30cm土壤温度(%RH)", "10cm土壤湿度(%RH)", "20cm土壤湿度(%RH)", "30cm土壤湿度(%RH)",
+					"大气压强(Pa)"
+				], //表格抬头
+				forbidden: false,
+				historylistdata: [], //历史数据
+				pagesum: 1,
+				page: 1,
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+			}
+		},
+		methods: {
+			tiemchange(e) { //切换时间
+				this.begintime = parseInt(+new Date(e.startDate) / 1000)
+				this.end = parseInt(+new Date(e.endDate) / 1000)
+				this.histprydatas()
+			},
+			timetab(e) { //时间转换
+				e = new Date(e * 1000)
+				var year = e.getFullYear()
+				var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
+				var time = year + "/" + month + "/" + day
+				return time
+			},
+			async histprydatas() { //历史数据
+				this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.nd_data',
+					data: {
+						device_id: this.device_id,
+						page: this.page,
+						begin: this.begintime,
+						end: this.end
+					}
+				})
+				this.dataloadingtf = false
+				console.log(res.nums)
+				this.pagesum = Math.ceil(res.nums / 10) || 1
+				this.historylistdata = res.dat_list
+				for (var i = 0; i < this.historylistdata.length; i++) {
+					this.historylistdata[i].temp = this.historylistdata[i].temp.split(",")
+					this.historylistdata[i].swc = this.historylistdata[i].swc.split(",")
+				}
+				var arr1 = []
+				var arr2 = []
+				var xtitle = []
+				var obj = [{
+					name: '空气温度',
+					data: [],
+					color: '#00E29D'
+				}, {
+					name: '空气湿度',
+					data: [],
+					color: '#6CBBFF'
+				}]
+				var arr3 = []
+				var k = 0
+				for (var i = 0; i < res.dat_char.length; i++) {
+					var times = new Date(res.dat_char[i].uptime * 1000)
+					xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times
+						.getMinutes())
+					arr1.unshift(res.dat_char[i].at == "" ? "0" : res.dat_char[i].at) //空气温度
+					arr2.unshift(res.dat_char[i].ats == "" ? "0" : res.dat_char[i].ats) //空气湿度
+					res.dat_char[i].temp = res.dat_char[i].temp.split(",")
+					res.dat_char[i].swc = res.dat_char[i].swc.split(",")
+					for (var j = 0; j < res.dat_char[i].temp.length; j++) {
+						arr3.unshift(res.dat_char[i].temp[j] == "" ? "0" : res.dat_char[i].temp[j]) //10cm土壤温度
+					}
+					res.dat_char[i].temp.forEach((items, indexs) => {
+						var tempdata = [];
+						var tempdatas = [];
+						tempdata.push(Number(items));
+						tempdatas.push(Number(res.dat_char[i].swc[indexs]));
+						var temparrs = {
+							name: 10 + indexs * res.topic + "cm土壤温度",
+							data: tempdata,
+						};
+						var temparr = {
+							name: 10 + indexs * res.topic + "cm土壤湿度",
+							data: tempdatas,
+						};
+						obj.push(temparr);
+						obj.push(temparrs);
+					})
+				}
+				obj[0].data = arr1
+				obj[1].data = arr2
+				var listArr = [];
+				obj.forEach(function(el, index) {
+					for (var i = 0; i < listArr.length; i++) {
+						// 对比相同的字段key,相同放入对应的数组中
+						if (listArr[i].name == el.name && el.data !== undefined) {
+							listArr[i].data.push(el.data[0]);
+							return;
+						}
+					}
+					// 第一次对比没有参照,放入参照
+					listArr.push({
+						name: el.name,
+						data: el.data,
+					});
+				});
+				console.log(listArr)
+				if(listArr.length==0){
+					this.canvastishiTF = false
+				}else{
+					this.canvastishiTF = true
+				}
+				this.showColumn("canvasColumnA", xtitle, listArr)
+				// console.log(this.historylistdata)
+			},
+			prev() { //上一页
+				if (this.page > 1) {
+					this.page--
+					this.histprydatas()
+				}
+			},
+			next() { //下一页
+				if (this.page < this.pagesum) {
+					this.page++
+					this.histprydatas()
+				}
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			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'
+						}
+					}
+				});
+			},
+			touchLineA(e) {
+				console.log(e)
+				canvaColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvaColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvaColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			this.cWidth = uni.upx2px(650);
+			this.cHeight = uni.upx2px(500);
+			this.device_id = option.id
+			this.end = parseInt(+new Date() / 1000)
+			this.begintime = parseInt(this.end - 24 * 60 * 60)
+			this.histprydatas()
+		}
+	}
+</script>
+
+<style lang="scss">
+	.selecttimes {
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
+		margin: 0 auto;
+		font-size: 28rpx;
+
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
+
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
+
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+
+			}
+		}
+
+		/deep/.u-calendar__action {
+			display: flex;
+			justify-content: space-around;
+
+			.u-calendar__action__text {
+				line-height: 25px;
+			}
+		}
+	}
+
+	.shuju_one {
+		width: 90%;
+		left: 5%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding-top: 20rpx;
+		height: 550rpx;
+		margin: 20rpx 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;
+				}
+			}
+		}
+	}
+
+	.condition {
+		display: flex;
+		flex-wrap: wrap;
+		width: 90%;
+		left: 5%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin-bottom: 30rpx;
+		margin: 20rpx auto;
+		.scroll-X {
+			width: 95%;
+			margin: 20rpx auto;
+
+			.tr {
+				display: flex;
+				overflow: hidden;
+
+				.th,
+				.td {
+					display: inline-block;
+					padding: 5rpx;
+					width: 300rpx;
+					text-align: center;
+					height: 52rpx;
+					line-height: 52rpx;
+					border: 2rpx solid #F1F1F1;
+				}
+			}
+
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
+
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
+		}
+
+		.pagenumber {
+			display: flex;
+			margin: 20rpx auto;
+
+			button {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+				background-color: #57c878;
+				color: #FFFFFF;
+			}
+
+			.pagenumber_page {
+				width: 100rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 125 - 145
pages/environment/history.vue

@@ -6,7 +6,7 @@
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="历史数据"></uni-nav-bar>
 			</view>
 			<view class="graph">
-				<view class="canvasbox" v-show="!pickshow&&!picktwoshow">
+				<view class="canvasbox">
 					<view class="" style="display: flex;justify-content: flex-end;">
 						<view class="schedule" @click="pickertfone=!pickertfone">
 							<p class="schedule_value">{{titletext[indexone]}}</p>
@@ -15,40 +15,30 @@
 							</p>
 						</view>
 					</view>
-					<u-picker v-model="pickertfone" mode="selector" @confirm="confirmFun" :default-selector="[indexone]" :range="titletext"></u-picker>
-					<view class="canvastishi" v-if="!canvastishiTF">
+					<u-picker v-model="pickertfone" mode="selector" @confirm="confirmFun" :default-selector="[indexone]"
+						:range="titletext"></u-picker>
+					<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
 						暂无数据
 					</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 class="canvastishi" v-if="dataloadingtf">
+						<p class="dataloading">加载中</p>
+					</view>
+					<canvas v-show="!tiemshow" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+						@touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
+						@touchend="touchEndLineA($event)" disable-scroll=true
+						:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
 				</view>
-				<view class="selecttimes">
-					<view class="newtimes">
-						<view class="newtimes_state" @click="pickshow = !pickshow">
-							<view class="oldtimes_left">
-								<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/841f87bfd8abb1b09610fa0789f9d8e.png'" mode=""></image>
-								开始时间:{{this.begintime|timeFormat()}}
-							</view>
-							<view class="oldtimes_left">
-								<u-icon name="arrow-down"></u-icon>
-							</view>
-							<u-picker mode="time" v-model="pickshow" :params="params" @confirm="pickone"></u-picker>
-						</view>
-						<view class="newtimes_end" @click="picktwoshow = !picktwoshow">
-							<view class="oldtimes_left">
-								<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'" mode=""></image>
-								结束时间:{{this.end|timeFormat()}}
-							</view>
-							<view class="oldtimes_left">
-								<u-icon name="arrow-down"></u-icon>
-							</view>
-							<u-picker mode="time" v-model="picktwoshow" :params="params" @confirm="picktwo"></u-picker>
-						</view>
-						<p class="tishi" v-if="tishiTF">请选择正确的结束时间</p>
-						<view class="btnser" @click="serter">
-							搜 索
-						</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(begintime)}}</p>
+						<p class="or">~</p>
+						<p>{{timetab(end)}}</p>
+						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
 				</view>
 				<view class="condition" v-if="scrollTF">
 					<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
@@ -56,11 +46,14 @@
 						<table class="table" :style="{width:300+240*datalength+'rpx'}">
 							<tr class="tr">
 								<th class="th">日期</th>
-								<th class="th" v-for="key,index in historydatas.conf" :key="index" v-if="key">{{key.replace("#","(")+")"}}</th>
+								<th class="th" v-for="key,index in historydatas.conf" :key="index" v-if="key">
+									{{key.replace("#","(")+")"}}</th>
 							</tr>
 							<tr class="tr" v-for="(items,index) in historydatas.data" :key="index" v-if="!forbidden">
 								<td class="td">{{items.time|timeFormat()}}</td>
-								<td class="td" v-for="item,indexss in datalength" :key="indexss">{{parseFloat(items.dat["e"+(indexss+1)])==-99.99?"N/A":parseFloat(items.dat["e"+(indexss+1)])}}</td>
+								<td class="td" v-for="item,indexss in datalength" :key="indexss">
+									{{parseFloat(items.dat["e"+(indexss+1)])==-99.99?"N/A":parseFloat(items.dat["e"+(indexss+1)])}}
+								</td>
 							</tr>
 							<tr class="tr" v-if="forbidden">
 								<td class="td" v-for="item in 10">暂无数据</td>
@@ -93,32 +86,24 @@
 				cWidth: '400',
 				cHeight: '400',
 				pixelRatio: 1,
-				canvastishiTF: false,
+				canvastishiTF: false, //暂无数据提示
+				dataloadingtf: true, //加载中提示
 				id: "",
 				begintime: '', //开始时间
 				end: '', //结束时间
-				titletext: [],//折线图数据切换列表数据
+				titletext: [], //折线图数据切换列表数据
 				titleidnex: 0,
-				pickshow: false, //选择时间一
-				picktwoshow: false, //选择时间二
-				params: { //时间格式
-					year: true,
-					month: true,
-					day: true,
-					hour: true,
-					minute: true,
-					second: false
-				},
+				tiemshow: false, //选择时间
 				tishiTF: false, //提示
 				historydatas: [],
 				page: 1,
 				forbidden: false,
 				pagesum: 1,
-				datalength:0,
-				scrollTF:true,
-				indexone:0,//折线图数据切换列表下标
-				pickertfone:false,//折线图数据切换列表
-				chartdata:{}//折线图数据
+				datalength: 0,
+				scrollTF: true,
+				indexone: 0, //折线图数据切换列表下标
+				pickertfone: false, //折线图数据切换列表
+				chartdata: {} //折线图数据
 			}
 		},
 		methods: { //weather.weather.qxz_detail
@@ -134,19 +119,19 @@
 				})
 				this.historydatas = res
 				console.log(res)
-				this.datalength=0
-				for(var key in res.conf){
-					if(res.conf[key]!=""){
+				this.datalength = 0
+				for (var key in res.conf) {
+					if (res.conf[key] != "") {
 						this.datalength++
 					}
 				}
 				console.log(this.datalength)
-				if(this.datalength==0){
+				if (this.datalength == 0) {
 					this.scrollTF = false
-				}else{
+				} else {
 					this.scrollTF = true
 				}
-				this.pagesum = Math.ceil(res.nums / 10) + 1
+				this.pagesum = Math.ceil(res.nums / 10) || 1
 				if (res.data.length == 0) {
 					this.forbidden = true
 				} else {
@@ -154,6 +139,7 @@
 				}
 			},
 			async historydata(datas) { //上传时间 //折线图
+				this.dataloadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=weather.weather.qxz_data_chart',
 					data: {
@@ -162,6 +148,7 @@
 						end: parseInt(this.end)
 					}
 				})
+				this.dataloadingtf = false
 				console.log(res)
 				this.chartdata = res
 				if (res.data.length == 0) {
@@ -169,71 +156,52 @@
 				} else {
 					this.canvastishiTF = true
 					for (var key in res.conf) {
-						if(res.conf[key]!=""){
+						if (res.conf[key] != "") {
 							this.titletext.push(res.conf[key])
 						}
 					}
-					this.conflist(res,"e1")
+					this.conflist(res, "e1")
 				}
 			},
-			conflist(res,eindex){
+			conflist(res, eindex) {
 				var xtitle = []
 				var linearr = []
 				for (var i = 0; i < res.data.length; i++) {
 					var times = new Date(res.data[i].time * 1000)
-					xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
+					xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times
+						.getMinutes())
 				}
 				var obj = {}
 				obj.name = res.conf[eindex]
 				var arr = []
-					for (var i = 0; i < res.data.length; i++) {
-						if (parseFloat(res.data[i].dat[eindex]) != -99.99) {
-							arr.push(parseFloat(res.data[0].dat[eindex]))
-						}
+				for (var i = 0; i < res.data.length; i++) {
+					if (parseFloat(res.data[i].dat[eindex]) != -99.99) {
+						arr.push(parseFloat(res.data[0].dat[eindex]))
 					}
+				}
 				obj.data = arr
 				if (obj.name) {
-						linearr.push(obj)
-					}
+					linearr.push(obj)
+				}
 				this.canvastishiTF = linearr.some((item) => {
 					return item.data.length != 0;
 				})
 				console.log(this.canvastishiTF)
 				this.showColumn("canvasColumnA", xtitle, linearr)
 			},
-			confirmFun(index){
+			confirmFun(index) {
 				console.log(index)
 				this.indexone = index[0]
-				var str = 'e'+(index[0]+1)
+				var str = 'e' + (index[0] + 1)
 				console.log(str)
-				this.conflist(this.chartdata,str)
+				this.conflist(this.chartdata, str)
 			},
-			pickone(e) { //开始时间
-				this.begintime = +new Date(e.year, e.month - 1, e.day, e.hour, e.minute) / 1000
-				if (this.newtime < this.oldtime) {
-					this.tishiTF = true
-				} else {
-					this.tishiTF = false
-				}
-			},
-			picktwo(e) { //结束时间
-				this.end = +new Date(e.year, e.month - 1, e.day, e.hour, e.minute) / 1000
-				if (this.newtime < this.oldtime) {
-					this.tishiTF = true
-				} else {
-					this.tishiTF = false
-				}
-			},
-			serter() {
-				if (this.tishiTF == false) {
-					this.historydata(this.id)
-					this.listhistorydata(this.id)
-					uni.showToast({
-						title: '搜索成功',
-						duration: 2000
-					});
-				}
-				
+			tiemchange(e){
+				console.log(e)
+				this.begintime = +new Date(e.startDate)/1000
+				this.end = +new Date(e.endDate)/1000+16*60*60
+				this.historydata(this.id)
+				this.listhistorydata(this.id)
 			},
 			prev() { //上一页
 				if (this.page > 1) {
@@ -250,6 +218,14 @@
 					delta: 1
 				})
 			},
+			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
+			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
 				canvasColumnA = new uCharts({
@@ -329,8 +305,9 @@
 			position: relative;
 			box-shadow: 0 0 10rpx #bcb9ca;
 			padding-top: 20px;
-			.charts{
-			}
+
+			.charts {}
+
 			.canvastishi {
 				font-size: 32rpx;
 				position: absolute;
@@ -338,20 +315,40 @@
 				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;
+					}
+				}
 			}
+
 			.schedule {
 				display: flex;
 				width: 280rpx;
 				height: 50rpx;
 				border: 2rpx solid #F0F0F0;
 				margin-right: 40rpx;
+
 				.schedule_value {
 					width: 70%;
 					text-align: center;
 					line-height: 50rpx;
 					font-size: 24rpx;
 				}
-			
+
 				.schedule_icon {
 					width: 30%;
 					background-color: #F2F2F2;
@@ -401,52 +398,24 @@
 		width: 100%;
 		box-shadow: 0 0 10rpx #bcb9ca;
 		margin-top: 20rpx;
-
-		.tishi {
-			width: 90%;
-			margin: 0 auto;
-			color: #f00000;
-			text-align: center;
-			font-size: 24rpx;
-		}
-
-		.btnser {
-			width: 90%;
-			margin: 10rpx auto;
-			color: #FFFFFF;
-			text-align: center;
-			font-size: 28rpx;
-			background-color: #58BD4D;
-			border-radius: 20rpx;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-
-		.newtimes {
-			width: 100%;
-			padding: 20rpx 20rpx;
-			box-sizing: border-box;
-
-			.newtimes_state,
-			.newtimes_end {
-				display: flex;
-				justify-content: space-between;
-				margin-bottom: 20rpx;
-
-				.oldtimes_left {
-					position: relative;
-					padding-left: 36rpx;
-					font-size: 28rpx;
-
-					image {
-						width: 30rpx;
-						height: 30rpx;
-						vertical-align: top;
-						position: absolute;
-						top: 7rpx;
-						left: 0;
-					}
-				}
+		padding: 10rpx 20rpx;
+		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;
+	
 			}
 		}
 	}
@@ -461,12 +430,15 @@
 		.scroll-X {
 			width: 95%;
 			margin: 20rpx auto;
-			.table{
+
+			.table {
 				// width: 10420px;
 			}
+
 			.tr {
 				display: flex;
 				overflow: hidden;
+
 				.th,
 				.td {
 					display: inline-block;
@@ -508,4 +480,12 @@
 			}
 		}
 	}
+	/deep/.u-calendar__action {
+		display: flex;
+		justify-content: space-around;
+	
+		.u-calendar__action__text {
+			line-height: 25px;
+		}
+	}
 </style>

+ 156 - 19
pages/environment/index.vue

@@ -8,28 +8,52 @@
 					<view class="bases_search">
 						<view class="bases_search_text" @click="clickRight">
 							<u-icon name="search" class="search" @click="search"></u-icon>
-							<input type="text" v-model="data.search" placeholder="设备ID搜索" @input="searchinput" disabled/>
+							<input type="text" v-model="data.search" placeholder="设备ID搜索" disabled/>
 						</view>
 					</view>
 				 </uni-nav-bar>
 			</view>
 			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/1.png'" mode="" class="image"></image>
+			<view class="loading" v-if="loadingtf">
+				<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
+			</view>
+			<view class="tab-box">
+				<view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf" @click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
+					<text>{{item.name}}</text>
+					<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)">
-					<image :src="item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'" mode=""
-					 class="prevents_item_img"></image>
-					<view class="prevents_item_top">
-						<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
-						<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
+					<view class="" v-if="side_type == 5">
+						<image
+							:src="item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
+							mode="" class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
+							<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
+						</view>
+						<view class="prevents_item_bot">
+							<p>设备 ID:{{item.equip_id || item.device_id}}</p>
+							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+						</view>
 					</view>
-					<view class="prevents_item_bot">
-						<p>设备 ID:{{item.equip_id}}</p>
-						<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+					<view class="" v-if="side_type == 15">
+						<image
+							src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png"
+							mode="" class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
+						</view>
+						<view class="prevents_item_bot">
+							<p>设备 ID:{{item.device_id}}</p>
+							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<view class="top">
+		<view class="top" v-if="side_type==5">
 			<view class="backtop" @click="top" v-if="isTop">
 				<image src="../../static/images/1.png" mode="" class="img0"></image>
 			</view>
@@ -60,24 +84,58 @@
 				eqlistdata: [],
 				isTop:false,
 				filtrateTF:false,
-				device_status:""
+				device_status:"",
+				loadingtf:false,//加载提示
+				equipArr: [{
+						name: '环境监测',
+						type: 5, //5 环境监测 15 管式墒情
+						list: [],
+						pageIndex: 1,
+						tf:false,
+					}, {
+						name: '管式墒情',
+						type: 15, //5 环境监测 15 管式墒情
+						list: [],
+						pageIndex: 1,
+						tf:false,
+					}
+				],
+				active:0,//tab选中的下标
+				side_type:5,//当前选中的设备类型
 			}
 		},
 		methods: {
 			async eqlist() { //设备列表
+				this.loadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=weather.weather.qxz_page',
 					data: {
 						page: this.page,
-						device_status:this.device_status
+						device_status:this.device_status,
+						page_size: 10,
 					}
 				})
+				this.loadingtf = false
+				this.eqlistdata = this.eqlistdata.concat(res.ids)
+				console.log(res.ids)
+			},
+			async tubulareqlist() { //设备列表 环境监测
+				this.loadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.nd_qxz_page',
+					data: {
+						page: this.page,
+						device_status: this.device_status,
+						page_size: 10,
+					}
+				})
+				this.loadingtf = false
 				this.eqlistdata = this.eqlistdata.concat(res.ids)
 				console.log(res.ids)
 			},
 			clickRight() {
 				uni.navigateTo({
-					url: "./search"
+					url: "./search?type="+this.side_type
 				})
 			},
 			clickLeft() {
@@ -86,9 +144,15 @@
 				})
 			},
 			eqdetails(data) {
-				uni.navigateTo({
-					url: "./equipment?shebei=" + JSON.stringify(data)
-				})
+				if(this.side_type == 5){
+					uni.navigateTo({
+						url: "./equipment?shebei=" + JSON.stringify(data)
+					})
+				}else if(this.side_type == 15){
+					uni.navigateTo({
+						url: "./gsequipment?shebei=" + JSON.stringify(data)
+					})
+				}
 			},
 			filtrate(){
 				this.filtrateTF = !this.filtrateTF
@@ -119,10 +183,42 @@
 				this.device_status = ""
 				this.eqlist()
 				this.filtrateTF = !this.filtrateTF
+			},
+			tabClick(index,type){
+				this.active = index
+				this.side_type = type
+				this.page = 1
+				if(type == 5){
+					this.eqlistdata = []
+					this.eqlist()
+				}else if(type == 15){
+					this.eqlistdata = []
+					this.tubulareqlist()
+				}
 			}
 		},
 		onLoad() {
 			this.eqlist()
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "环境监测系统"
+					})
+					var itemarr = items[0].children
+					console.log(itemarr)
+					for(var i =0;i<itemarr.length;i++){
+						switch (itemarr[i].purview_name){
+							case "环境监测":
+								this.equipArr[0].tf = true
+								break
+							case "管式墒情":
+								this.equipArr[1].tf = true
+								break
+						}
+					}
+				}
+			})
 		},
 		onReachBottom() {
 			this.page++
@@ -142,7 +238,9 @@
 	/deep/.uni-icons {
 		font-size: 40rpx !important;
 	}
-
+	page{
+		background: $uni-bg-color-grey;
+	}
 	.image {
 		position: fixed;
 		top: 80px;
@@ -150,6 +248,17 @@
 		height: 160rpx;
 		z-index: 555;
 	}
+	.loading{
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+		.img{
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
 	.bases_search {
 		width: 60%;
 		background-color: #FFFFFF;
@@ -177,10 +286,38 @@
 			}
 		}
 	}
+	.tab-box {
+		position: fixed;
+		top: 159px;
+		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: 140px;
+		top: 170px;
 
 		.prevents_item {
 			width: 95%;
@@ -190,7 +327,7 @@
 			padding: 20rpx 40rpx 20rpx 80rpx;
 			box-sizing: border-box;
 			position: relative;
-
+			background-color: #fff;
 			.prevents_item_img {
 				width: 30rpx;
 				height: 50rpx;

+ 58 - 37
pages/environment/search.vue

@@ -11,15 +11,30 @@
 			</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>
-					<view class="prevents_item_top">
-						<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
-						<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
+					<view class="" v-if="side_type == 5">
+						<image
+							:src="item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
+							mode="" class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
+							<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
+						</view>
+						<view class="prevents_item_bot">
+							<p>设备 ID:{{item.equip_id || item.device_id}}</p>
+							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+						</view>
 					</view>
-					<view class="prevents_item_bot">
-						<p>设备 ID:{{item.equip_id}}</p>
-						<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+					<view class="" v-if="side_type == 15">
+						<image
+							src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png"
+							mode="" class="prevents_item_img"></image>
+						<view class="prevents_item_top">
+							<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
+						</view>
+						<view class="prevents_item_bot">
+							<p>设备 ID:{{item.device_id}}</p>
+							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -39,25 +54,8 @@
 				eqlistdata: [],
 				page: 1,
 				size: 10,
-				show: false,
 				value: '',
-				options1: [{
-						text: "杀虫灯",
-						id: 2
-					},
-					{
-						text: "虫情测报",
-						id: 3
-					},
-					{
-						text: "孢子仪",
-						id: 7
-					},
-					{
-						text: "性诱设备",
-						id: 4
-					},
-				]
+				side_type: 5
 			}
 		},
 		methods: {
@@ -75,6 +73,20 @@
 				this.eqlistdata = this.eqlistdata.concat(res.ids)
 				console.log(this.eqlistdata)
 			},
+			async tubulareqlist() { //设备列表 环境监测
+				this.loadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.nd_qxz_page',
+					data: {
+						page: this.page,
+						page_size: 10,
+						device_id: this.imports
+					}
+				})
+				this.loadingtf = false
+				this.eqlistdata = this.eqlistdata.concat(res.ids)
+				console.log(res.ids)
+			},
 			clickLeft() {
 				uni.navigateBack({
 					delta: 1
@@ -82,23 +94,32 @@
 			},
 			search() {
 				this.eqlistdata = []
-				this.eqlist()
+				if(this.side_type==5){
+					this.eqlist()
+				}else if(this.side_type == 15){
+					this.tubulareqlist()
+				}
 			},
 			searchinp() {
 				Debounce(() => {
-					this.eqlistdata = []
-					this.eqlist()
+					this.search()
 				}, 1000)()
 			},
-			actionSheetCallback(index) { //选择框
-				this.value = this.options1[index].text;
-				// this.id = this.options1[index].id
-			},
 			eqdetails(data) {
-				uni.navigateTo({
-					url: "./equipment?shebei=" + JSON.stringify(data)
-				})
+				if(this.side_type == 5){
+					uni.navigateTo({
+						url: "./equipment?shebei=" + JSON.stringify(data)
+					})
+				}else if(this.side_type == 15){
+					uni.navigateTo({
+						url: "./gsequipment?shebei=" + JSON.stringify(data)
+					})
+				}
 			}
+		},
+		onLoad(option) {
+			this.side_type = option.type
+			console.log(this.side_type)
 		}
 	}
 </script>
@@ -132,7 +153,7 @@
 	.prevents {
 		width: 100%;
 		position: absolute;
-		top: 84px;
+		top: 94px;
 
 		.prevents_item {
 			width: 95%;

+ 27 - 97
pages/equipList/index.vue

@@ -14,7 +14,8 @@
 			<view class="list_item" v-for="(item,index) in eqlistdata" :key="index" @click="historys(item)">
 				<view class="list_item_top">
 					<p class="p1">
-						<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+imgpath[0].path" mode=""></image>
+						<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/fourMoodBase/'+type_id+'.png'"
+							mode=""></image>
 						{{item.device_name==''?"--":item.device_name}}
 					</p>
 					<p :class="[item.is_online?'p2':'p_out']">{{item.is_online?"在线":"离线"}}</p>
@@ -47,41 +48,8 @@
 			return {
 				list: [],
 				current: 0,
-				currents:0,
 				page: 1,
 				size: 10,
-				images: [{
-						name: "杀虫灯",
-						path: "/image/fourMoodBase/3.png", //
-						id: 2
-					},
-					{
-						name: "测报灯",
-						path: "/image/fourMoodBase/1.png",
-						id: 3
-					}, {
-						name: "性诱测报",
-						path: "/image/fourMoodBase/6.png",
-						id: 4
-					}, {
-						name: "环境监测",
-						path: "/image/fourMoodBase/5.png",
-						id: 5
-					}, {
-						name: "监控设备",
-						path: "/image/fourMoodBase/2.png",
-						id: 6
-					}, {
-						name: "孢子仪",
-						path: "/image/fourMoodBase/4.png",
-						id: 7
-					},
-					{
-						name: "性诱2.0",
-						path: "/image/fourMoodBase/10.png",
-						id: 10
-					}
-				],
 				eqlistdata: [],
 				isTop: false,
 				infoalter: false, // 权限设置,
@@ -91,6 +59,28 @@
 			}
 		},
 		methods: {
+			async usereqlisttype() { //用户已有的设备类型
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.user_device_type',
+				})
+				console.log(res)
+				for (var i = 0; i < res.length; i++) {
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id
+					}
+					this.list.push(obj)
+				}
+				if (res.length) {
+					console.log(this.list)
+					this.type_id = this.list[0].id
+					if (this.list[0].id == 10) {
+						this.xyeqlist()
+					} else {
+						this.eqlist()
+					}
+				}
+			},
 			async eqlist(tf) { //设备列表
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
@@ -147,18 +137,9 @@
 			},
 			change(index) { //头部导航栏的点击
 				this.current = index
-				this.currents = index
 				this.page = 1
 				this.eqlistdata = []
-				console.log(index)
-				for (var i = 0; i < this.images.length; i++) {
-					if (this.list[index].name == this.images[i].name) {
-						this.type_id = this.images[i].id
-					}
-				}
-				this.imgpath = this.images.filter((item)=>{
-					return item.id == this.type_id
-				})
+				this.type_id = this.list[index].id
 				if (this.type_id == 10) {
 					this.xyeqlist()
 				} else {
@@ -244,10 +225,10 @@
 			}
 		},
 		onShow() {
-			this.list=[]
+			// this.list=[]
 			this.camera()
 			this.current=0
-			this.currents=0
+			this.usereqlisttype()
 			// console.log(this.current)
 			uni.getStorage({
 				key: "jurisdiction",
@@ -263,57 +244,6 @@
 					this.infoalter = items2[0].children.some((item) => {
 						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
 					})
-					console.log(this.infoalter)
-					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.images.length; i++) {
-						if (this.list[this.current].name == this.images[i].name) {
-							this.type_id = this.images[i].id
-						}
-					}
-					this.imgpath = this.images.filter((item)=>{
-						return item.id == this.type_id
-					})
-					if (this.type_id == 10) {
-						this.xyeqlist(false)
-					} else {
-						this.eqlist(false)
-					}
 				},
 			})
 		},

+ 92 - 56
pages/equipMange/index/assignment.vue

@@ -11,17 +11,23 @@
 					 bar-width="60" active-color="#42b983"></u-tabs>
 				</view>
 			</view>
+			<view class="bases_search">
+				<view class="bases_search_text">
+					<u-icon name="search" class="search" @click="searchs"></u-icon>
+					<input type="text" v-model="inputdata" placeholder="请输入设备ID"  @input="searchinp"/>
+				</view>
+			</view>
 			<view class="ass_list">
 				<checkbox-group class="che_group" @change="checkboxchange">
 					<label class="equipment" v-for="(items,index) in assignment" :key="index">
 						<view class="equipment_top">
-							<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+items.src" mode="" class="equipment_top_img"></image>
-							<span class="equipment_top_name">{{list[items.device_type_id-1].name}}</span>
+							<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/fourMoodBase/'+items.device_type_id+'.png'" mode="" class="equipment_top_img"></image>
+							<span class="equipment_top_name">{{items.device_type_id_name}}</span>
 							<checkbox :value="String(items.d_id)" :checked="items.device_user==user_info.uid" class="ucheckbox" color="#42b983" />
 						</view>
 						<view class="equipment_bot">
 							<p class="equipment_bot_id">设备ID:{{items.device_id}}</p>
-							<p class="equipment_bot_name">设备名称:{{items.device_name}}</p>
+							<p class="equipment_bot_name">设备名称:{{items.device_name||"无"}}</p>
 							<view class="equipment_state">在线</view>
 						</view>
 					</label>
@@ -38,31 +44,15 @@
 	</view>
 </template>
 <script>
+	import {
+		Debounce,
+		Throttle
+	} from "../../../util/anitthro.js"
 	export default {
 		data() {
 			return {
 				user_info: {},
-				list: [{
-					name: "全部"
-				}, {
-					name: "杀虫灯"
-				}, {
-					name: "测报灯"
-				}, {
-					name: "智能性诱"
-				}, {
-					name: "环境检测"
-				}, {
-					name: "监控设备"
-				}, {
-					name: "孢子仪"
-				}, {
-					name: "性诱设备"
-				}, {
-					name: "糖醋测报"
-				}, {
-					name: "性诱2.0"
-				}],
+				list: [],
 				current: 0,
 				assignment: [],
 				data: {
@@ -70,40 +60,35 @@
 					pagesize: 10,
 					page: 1
 				},
-				images: [{
-						path: "/image/fourMoodBase/scd.png",
-						id: 2
-					},
-					{
-						path: "/image/fourMoodBase/cbd.png",
-						id: 3
-					}, {
-						path: "/image/fourMoodBase/xycb.png",
-						id: 4
-					}, {
-						path: "/image/fourMoodBase/qxz.png",
-						id: 5
-					}, {
-						path: "/image/fourMoodBase/jk.png",
-						id: 6
-					}, {
-						path: "/image/fourMoodBase/bzy.png",
-						id: 7
-					},
-					{
-						path: "/image/fourMoodBase/10.png",
-						id: 10
-					}
-				],
 				allocationvalues: [], //原始数据
 				allocationvalues2: [], //选项框更改后的数据
 				allocationvalues3: [], //头部导航栏点击后的数据
 				allocationvaluesTF: false, //判断选项框是否变动
 				topbarTF: false ,//判断头部导航栏是否变更
-				isTop:false
+				isTop:false,
+				type_id:0,
+				inputdata:"",//设备搜索
 			}
 		},
 		methods: {
+			async usereqlisttype() { //用户已有的设备类型
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.user_device_type',
+				})
+				this.list=[
+					{
+						name:"全部",
+						id:0
+					}
+				]
+				for (var i = 0; i < res.length; i++) {
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id
+					}
+					this.list.push(obj)
+				}
+			},
 			deweight(arr) {
 				var newArr = []
 				for (var i = 0; i < arr.length; i++) {
@@ -125,6 +110,7 @@
 				this.current = index
 				this.data.page = 1
 				this.data.devicetypeid = ''
+				this.type_id = this.list[index].id
 				uni.pageScrollTo({
 					scrollTop: 0
 				});
@@ -133,7 +119,7 @@
 					this.getAssign(this.data)
 				} else {
 					this.assignment = []
-					this.data.devicetypeid = index + 1
+					this.data.devicetypeid = this.type_id
 					this.getAssign(this.data)
 				}
 
@@ -145,7 +131,8 @@
 						owner_uid: this.user_info.uid,
 						device_type_id: data.devicetypeid,
 						page_size: data.pagesize,
-						page: data.page
+						page: data.page,
+						device_id: this.inputdata
 					}
 				})
 				this.assignment = this.assignment.concat(res.data)
@@ -153,9 +140,9 @@
 					if (this.assignment[i].device_user != 0) {
 						this.allocationvalues.push(this.assignment[i].d_id)
 					}
-					for (var j = 0; j < this.images.length; j++) {
-						if (this.assignment[i].device_type_id == this.images[j].id) {
-							this.assignment[i].src = this.images[j].path
+					for (var j = 0; j < this.list.length; j++) {
+						if (this.assignment[i].device_type_id == this.list[j].id) {
+							this.assignment[i].device_type_id_name = this.list[j].name
 						}
 					}
 				}
@@ -206,9 +193,30 @@
 					scrollTop: 0,
 					duration: 500
 				})
+			},
+			searchs(){
+				var data = {
+					pagesize:10,
+					page:1,
+					devicetypeid:""
+				}
+				if (this.type_id==0) {
+					this.assignment = []
+					this.getAssign(data)
+				} else {
+					data.devicetypeid = this.type_id
+					this.assignment = []
+					this.getAssign(this.data)
+				}
+			},
+			searchinp(){
+				Debounce(() => {
+					this.searchs()
+				}, 1000)()
 			}
 		},
 		onLoad(option) {
+			this.usereqlisttype()
 			this.user_info = JSON.parse(option.item)
 			this.getAssign(this.data)
 		},
@@ -235,7 +243,7 @@
 	}
 
 	.ass_list {
-		margin: 190rpx 0 0;
+		margin: 220rpx 0 0;
 
 		.che_group {
 			display: flex;
@@ -300,6 +308,34 @@
 			}
 		}
 	}
+	.bases_search {
+		width: 100%;
+		position: fixed;
+		top: 120px;
+		z-index: 100;
+		background-color: #FFFFFF;
+	
+		.bases_search_text {
+			width: 90%;
+			margin: 0 auto;
+			background-color: #F8F8F8;
+			height: 60rpx;
+			border-radius: 30rpx;
+			display: flex;
+			line-height: 60rpx;
+	
+			.search {
+				padding: 0 20rpx;
+				font-size: 34rpx;
+			}
+	
+			input {
+				width: 80%;
+				margin-top: 10rpx;
+				font-size: 28rpx;
+			}
+		}
+	}
 	.allocbtn {
 		width: 100%;
 		position: fixed;

+ 82 - 25
pages/equipMange/index/index.vue

@@ -7,24 +7,30 @@
 			</view>
 			<view class="uinput-box">
 				<view class="uinputs">
-					<u-input v-model="argument.username" :type="type" :border="border" placeholder="请输入用户名称" input-align="center"
-					 :clearable="border" :custom-style="uinputstyle" @input="searchinput" />
+					<u-input v-model="argument.username" :type="type" :border="border" placeholder="请输入用户名称"
+						input-align="center" :clearable="border" :custom-style="uinputstyle" @input="searchinput" />
 					<u-icon name="search" class="search" size="30" @click="search"></u-icon>
 				</view>
 			</view>
 			<view class="userlists">
-				<view class="userlist-li" v-for="(item,index) in userlists" :kex="index" @click="userOperation(userlists[index])">
-					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/fourMoodBase/touxiang.png'" mode=""></image>
+				<view class="userlist-li" v-for="(item,index) in userlists" :kex="index">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/fourMoodBase/touxiang.png'" mode="">
+					</image>
 					<p class="userlist-li-city">{{item.username}}</p>
 					<p class="userlist-li-eamil">{{item.mobile}}</p>
+					<view class="loginbox">
+						<p class="loginp" @click="userloginbtn(item)">一键登录</p>
+						<p class="logininfo" @click="userOperation(item)">查看详情</p>
+					</view>
 				</view>
 			</view>
-		</view> 
+		</view>
 		<view class="addindent" @click="clickRight">
 			新 增 用 户
 		</view>
 		<view class="top" v-if="isTop" @click="top">
-			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode=""></image>
+			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'"
+				mode=""></image>
 		</view>
 	</view>
 </template>
@@ -51,8 +57,8 @@
 					page_size: 10,
 					username: ''
 				},
-				isTop:false,
-				addtf:false
+				isTop: false,
+				addtf: false
 			}
 		},
 		methods: {
@@ -67,21 +73,43 @@
 				})
 				this.userlists = this.userlists.concat(res.data)
 			},
+			async userlogin(uid) {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=user.login.auto_login',
+					data: {
+						uid
+					}
+				})
+				let session_key = res.session_key
+				uni.setStorage({
+					key: 'session_key',
+					data: session_key,
+					success: () => {
+						uni.switchTab({
+							url: "../../index/index"
+						})
+						uni.showToast({
+							title: "登录成功!",
+							icon: "none"
+						})
+					}
+				})
+			},
 			clickRight() { //跳转增加用户页面
-				if(this.addtf){
+				if (this.addtf) {
 					uni.navigateTo({
 						url: './addusers',
 					})
-				}else{
+				} else {
 					uni.showToast({
 						title: "您暂无权限进行此操作,如有需要,请联系管理员",
 						icon: "none"
 					})
 				}
 			},
-			clickLeft(){
+			clickLeft() {
 				uni.switchTab({
-					url:"../../index/index"
+					url: "../../index/index"
 				})
 			},
 			userOperation(item) { //跳转用户信息页面
@@ -90,12 +118,15 @@
 					url: './useroperation?item=' + item,
 				})
 			},
+			userloginbtn(item){
+				this.userlogin(item.uid)
+			},
 			search() { //搜索用户
 				this.userlists = []
 				this.getState(this.argument)
 			},
 			searchinput() {
-				this.argument.page=1
+				this.argument.page = 1
 				Debounce(() => {
 					this.userlists = []
 					this.getState(this.argument)
@@ -111,19 +142,19 @@
 		onLoad() {
 			this.getState(this.argument)
 			uni.getStorage({
-				key:"jurisdiction",
-				success:(res)=>{
+				key: "jurisdiction",
+				success: (res) => {
 					console.log(JSON.parse(res.data))
-					let items = JSON.parse(res.data).filter((item)=>{
+					let items = JSON.parse(res.data).filter((item) => {
 						return item.purview_name == "系统管理"
 					})
-					let items2 = items[0].children.filter((item)=>{
+					let items2 = items[0].children.filter((item) => {
 						return item.purview_name == "用户管理"
 					})
 					var arr = items2[0].children
 					console.log(arr)
-					for(var i =0;i<arr.length;i++){
-						switch (arr[i].purview_name){
+					for (var i = 0; i < arr.length; i++) {
+						switch (arr[i].purview_name) {
 							case "添加用户":
 								this.addtf = true
 								break
@@ -160,9 +191,10 @@
 </script>
 1
 <style lang="scss">
-	/deep/.uni-icons{
-			font-size: 40rpx !important;
-		}
+	/deep/.uni-icons {
+		font-size: 40rpx !important;
+	}
+
 	.uinput-box {
 		position: fixed;
 		top: 84px;
@@ -189,9 +221,10 @@
 		width: 100%;
 		position: relative;
 		top: 180rpx;
+
 		.userlist-li {
 			width: 46%;
-			height: 270rpx;
+			height: 300rpx;
 			margin: 20rpx 0 0 20rpx;
 			float: left;
 			box-shadow: 0 0 10rpx #bcb9ca;
@@ -202,9 +235,31 @@
 				height: 80rpx;
 				margin: 40rpx 0 20rpx;
 			}
+			.loginbox{
+				display: flex;
+			}
+			.loginp {
+				width: 130rpx;
+				padding: 6rpx;
+				font-size: 25rpx;
+				background-color: #18B566;
+				color: #FFF;
+				margin: 20rpx auto;
+				border-radius: 31rpx;
+			}
+			.logininfo{
+				width: 130rpx;
+				padding: 6rpx;
+				font-size: 25rpx;
+				background-color: #fbb309;
+				color: #FFF;
+				margin: 20rpx auto;
+				border-radius: 31rpx;
+			}
 		}
 	}
-	.addindent{
+
+	.addindent {
 		width: 100%;
 		position: fixed;
 		bottom: 0;
@@ -216,12 +271,14 @@
 		color: #ffffff;
 		font-size: 16px;
 	}
+
 	.top {
 		position: fixed;
 		right: 30px;
 		bottom: 100px;
 		z-index: 100;
-		image{
+
+		image {
 			width: 100rpx;
 			height: 100rpx;
 		}

+ 55 - 33
pages/fourBase/allocation.vue

@@ -7,24 +7,30 @@
 			</view>
 			<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="bases_search">
 				<view class="bases_search_text">
 					<u-icon name="search" class="search" @click="searchs"></u-icon>
-					<input type="text" v-model="inputdata" placeholder="请输入设备ID"/>
+					<input type="text" v-model="inputdata" placeholder="请输入设备ID" />
 				</view>
 			</view>
+			<view class="loading" v-if="nonetf">
+				暂无可分配设备
+			</view>
 			<view class="ass_list">
 				<checkbox-group class="che_group" @change="checkboxchange">
-					<label  v-for="(items,indexs) in assignments.children" :key="items.id" >
+					<label v-for="(items,indexs) in assignments.children" :key="items.id">
 						<view class="" v-if="items.type_name.search(inputdata)+1" class="equipment">
 							<view class="equipment_top">
-								<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+assignments.src" mode="" class="equipment_top_img"></image>
+								<image
+									:src="'http://www.hnyfwlw.com:8006/bigdata_app/image/fourMoodBase/'+assignments.id+'.png'"
+									mode="" class="equipment_top_img"></image>
 								<span class="equipment_top_name">{{assignments.type_name}}</span>
-								<checkbox :value="String(items.type_name)" :checked="items.check" class="ucheckbox" color="#42b983" />
+								<checkbox :value="String(items.type_name)" :checked="items.check" class="ucheckbox"
+									color="#42b983" />
 							</view>
 							<view class="equipment_bot">
 								<p class="equipment_bot_id">设备ID:{{items.id}}</p>
@@ -41,7 +47,8 @@
 			</view>
 		</view>
 		<view class="top" v-if="isTop" @click="top">
-			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode=""></image>
+			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'"
+				mode=""></image>
 		</view>
 	</view>
 </template>
@@ -80,7 +87,8 @@
 				isTop: false,
 				base_id: "",
 				baseidarr: "",
-				inputdata:""
+				inputdata: "",
+				nonetf: false, //设备列表为空判断
 			}
 		},
 		methods: {
@@ -94,18 +102,18 @@
 				this.baseidarr = res
 				console.log(res)
 				var arr = []
-				for(var i=0;i<res.length;i++){
+				for (var i = 0; i < res.length; i++) {
 					if (arr.indexOf(res[i].type_name) === -1) {
-					     arr.push(res[i].type_name)
+						arr.push(res[i].type_name)
 					}
 				}
 				var obj = {}
-				for(var i=0;i<arr.length;i++){
-					obj[arr[i]]=[]
+				for (var i = 0; i < arr.length; i++) {
+					obj[arr[i]] = []
 				}
-				for(var i=0;i<res.length;i++){
-					for(var key in obj){
-						if(res[i].type_name==key){
+				for (var i = 0; i < res.length; i++) {
+					for (var key in obj) {
+						if (res[i].type_name == key) {
 							obj[key].push(res[i].device_id)
 						}
 					}
@@ -123,11 +131,12 @@
 					let obj = {}
 					obj.name = this.assignment[i].type_name
 					this.list.push(obj)
-					for (var j = 0; j < this.images.length; j++) {
-						if (this.assignment[i].id == this.images[j].id) {
-							this.assignment[i].src = this.images[j].path
-						}
-					}
+				}
+				if (this.list.length == 0) {
+					let obj = {}
+					obj.name = "全部"
+					this.list.push(obj)
+					this.nonetf = true
 				}
 				this.assignments = this.assignment[this.current]
 				for (let i = 0; i < this.assignments.children.length; i++) {
@@ -144,9 +153,9 @@
 				for (let i = 0; i < this.assignments.children.length; i++) {
 					this.assignments.children[i].check = false
 					for (let key in obj) {
-						if(key==this.list[this.current].name){
-							for(let j = 0; j < obj[key].length; j++){
-								if(this.assignments.children[i].type_name == obj[key][j]){
+						if (key == this.list[this.current].name) {
+							for (let j = 0; j < obj[key].length; j++) {
+								if (this.assignments.children[i].type_name == obj[key][j]) {
 									this.assignments.children[i].check = true
 								}
 							}
@@ -174,11 +183,11 @@
 			},
 			canfirm() {
 				uni.setStorage({
-					key:"typeid",
-					data:JSON.stringify(this.obj),
-					success:()=>{
+					key: "typeid",
+					data: JSON.stringify(this.obj),
+					success: () => {
 						uni.navigateBack({
-							delta:1
+							delta: 1
 						})
 					}
 				})
@@ -189,15 +198,15 @@
 					duration: 500
 				})
 			},
-			searchs(){
+			searchs() {
 				console.log(this.inputdata.search("好"))
 			},
 		},
 		onLoad(option) {
 			this.base_id = option.base_id
-			if(this.base_id){
+			if (this.base_id) {
 				this.ybase()
-			}else{
+			} else {
 				this.getFourbase()
 			}
 		},
@@ -225,7 +234,7 @@
 		top: 120px;
 		z-index: 100;
 		background-color: #FFFFFF;
-	
+
 		.bases_search_text {
 			width: 90%;
 			margin: 0 auto;
@@ -234,12 +243,12 @@
 			border-radius: 30rpx;
 			display: flex;
 			line-height: 60rpx;
-	
+
 			.search {
 				padding: 0 20rpx;
 				font-size: 34rpx;
 			}
-	
+
 			input {
 				width: 80%;
 				margin-top: 10rpx;
@@ -248,6 +257,19 @@
 		}
 	}
 
+	.loading {
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+
+		.img {
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
+
 	.ass_list {
 		position: absolute;
 		top: 115px;

+ 2 - 2
pages/fourBase/modification.vue

@@ -19,7 +19,7 @@
 					<input type="text" v-model="baseinfo.base_name" placeholder="请输入基地名称" />
 				</view>
 				<view class="base_text_item1">
-					<u-icon name="ren1" custom-prefix="custom-icon" class="icon"></u-icon>
+					<u-icon name="jidiguanli" custom-prefix="custom-icon" class="icon"></u-icon>
 					<span><span style="color: #ff0000;margin: 0;">*</span>负责人</span>
 					<input type="text" v-model="baseinfo.base_charge " placeholder="请输入基地负责人" />
 				</view>
@@ -39,7 +39,7 @@
 					<textarea v-model="baseinfo.base_describe " maxlength="80" auto-height class="textarea" placeholder="请输入基地描述(不能大于80字)" />
 					</view>
 			<view class="base_text_item1" @click="map">
-				<u-icon name="Frame1" custom-prefix="custom-icon" class="icon"></u-icon>
+				<u-icon name="dingwei" custom-prefix="custom-icon" class="icon"></u-icon>
 				<span><span style="color: #ff0000;margin: 0;">*</span>基地定位</span>
 				<input type="text" v-model="city" placeholder="请选择地址" disabled style="position: absolute;right: 60rpx;width: 60%;"/>
 				<u-icon name="arrow-right" class="iconright"></u-icon>

+ 119 - 97
pages/index/index.vue

@@ -10,16 +10,18 @@
 		<view class="equipment">
 			<p class="equipment_p">系统设备</p>
 			<view class="equipment_item">
-				<view class="equipment_item_img" v-for="(item,index) in equipmentimg" :key="index" @click="tabequipment(index)">
+				<view class="equipment_item_img" v-for="(item,index) in equipmentimg" :key="index"
+					@click="tabequipment(index)">
 					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.src" mode=""></image>
 				</view>
 			</view>
 		</view>
-		<u-modal v-model="show" :mask-close-able="true" :show-cancel-button="true" confirm-text="拍病害" cancel-text="拍虫害" cancel-color="#4BB85F"
-		 content="拍照识别病虫害" @confirm="confirm" @cancel="cancel"></u-modal>
-		<kps-image-cutter @ok="onok" @cancel="oncancle" :url="url" :fixed="false" :blob="true" :maxWidth="500" :maxHeight="380" :height="380"></kps-image-cutter>
+		<u-modal v-model="show" :mask-close-able="true" :show-cancel-button="true" confirm-text="拍病害" cancel-text="拍虫害"
+			cancel-color="#4BB85F" content="拍照识别病虫害" @confirm="confirm" @cancel="cancel"></u-modal>
+		<kps-image-cutter @ok="onok" @cancel="oncancle" :url="url" :fixed="false" :blob="true" :maxWidth="500"
+			:maxHeight="380" :height="380"></kps-image-cutter>
 		<view class="loading" v-if="loadTF">
-			<u-loading  mode="flower" size="100" :show="true" ></u-loading>
+			<u-loading mode="flower" size="100" :show="true"></u-loading>
 		</view>
 	</view>
 </template>
@@ -31,7 +33,7 @@
 		},
 		data() {
 			return {
-				loadTF:false,
+				loadTF: false,
 				currentPage: 'tabBar1',
 				list: [{
 					image: 'http://www.hnyfwlw.com:8006/bigdata_app/image/index/11.png'
@@ -53,45 +55,28 @@
 						text: "售后服务"
 					}
 				],
-				equipmentimg: [{
-						src: "/image/index/5.png"
-					},
-					{
-						src: "/image/index/6.png"
-					},
-					{
-						src: "/image/index/7.png"
-					},
-					{
-						src: "/image/index/8.png"
-					},
-					{
-						src: "/image/index/9.png"
-					},
-					{
-						src: "/image/index/10.png"
-					}
-				],
+				equipmentimg: [],
 				url: '',
 				path: '',
 				flag: 1,
 				show: false,
-				jurisdiction:{
-					cbtf:false,
-					jktf:false,
-					hjtf:false,
-					fztf:false,
-					sytf:false,
-					sbtf:false,
-					sqtf:false,
-					zjtf:false
-				}
+				jurisdiction: {
+					cbtf: false,
+					jktf: false,
+					hjtf: false,
+					fztf: false,
+					sytf: false,
+					sbtf: false,
+					sqtf: false,
+					zjtf: false
+				},
+				ceshiflag: 1
 			}
 		},
 		onLoad() {
 			this.getUserlogin()
-		}, 
-		onShow(){
+		},
+		onShow() {
 			this.loadTF = false
 			this.getUserlogin()
 		},
@@ -108,53 +93,85 @@
 					key: 'myuser_type',
 					data: JSON.stringify(res.myuser_type),
 				})
+				if (res.myuser_type == 1) {
+					this.equipmentimg = [{
+							src: "/image/index/5.png"
+						},
+						{
+							src: "/image/index/6.png"
+						},
+						{
+							src: "/image/index/7.png"
+						},
+						{
+							src: "/image/index/8.png"
+						},
+						{
+							src: "/image/index/9.png"
+						}
+					]
+				} else {
+					this.equipmentimg = [{
+							src: "/image/index/5.png"
+						},
+						{
+							src: "/image/index/6.png"
+						},
+						{
+							src: "/image/index/7.png"
+						},
+						{
+							src: "/image/index/8.png"
+						}
+					]
+				}
 				console.log(res.children)
-				this.jurisdiction={
-						cbtf:false,
-						jktf:false,
-						hjtf:false,
-						fztf:false,
-						sytf:false,
-						sbtf:false,
-						sqtf:false,
-						zjtf:false
-					}
-				for(var i=0;i<res.children.length;i++){
-					switch (res.children[i].purview_name){
+				this.jurisdiction = {
+					cbtf: false,
+					jktf: false,
+					hjtf: false,
+					fztf: false,
+					sytf: false,
+					sbtf: false,
+					sqtf: false,
+					zjtf: false
+				}
+				for (var i = 0; i < res.children.length; i++) {
+					switch (res.children[i].purview_name) {
 						case "测报系统":
-									this.jurisdiction.cbtf = true
-									break;
+							this.jurisdiction.cbtf = true
+							break;
 						case "可视农业":
-									this.jurisdiction.jktf = true
-									break;
+							this.jurisdiction.jktf = true
+							break;
 						case "环境监测系统":
-									this.jurisdiction.hjtf = true
-									break;
+							this.jurisdiction.hjtf = true
+							break;
 						case "防治系统":
-									this.jurisdiction.fztf = true
-									break;
+							this.jurisdiction.fztf = true
+							break;
 						case "溯源系统":
-									this.jurisdiction.sytf = true
-									break;
+							this.jurisdiction.sytf = true
+							break;
 						case "系统管理":
-									this.jurisdiction.sbtf = true
-									break;
+							this.jurisdiction.sbtf = true
+							break;
 						case "四情基地":
-									this.jurisdiction.sqtf = true
-									break;
+							this.jurisdiction.sqtf = true
+							break;
 						case "专家诊断":
-									this.jurisdiction.zjtf = true
-									break;
+							this.jurisdiction.zjtf = true
+							break;
 					}
 				}
 			},
 			tabfunction(index) {
 				if (index == 0) {
-					if(this.jurisdiction.sqtf){
+					if (this.jurisdiction.sqtf) {
 						uni.navigateTo({
 							url: "../fourBase/index"
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
@@ -164,12 +181,12 @@
 					var that = this
 					this.show = true
 				} else if (index == 2) {
-					if(this.jurisdiction.zjtf){
+					if (this.jurisdiction.zjtf) {
 						uni.navigateTo({
 							url: "../expertDiagnosis/index",
-							 
+
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
@@ -183,22 +200,22 @@
 			},
 			tabequipment(index) {
 				if (index == 0) {
-					if(this.jurisdiction.cbtf){
+					if (this.jurisdiction.cbtf) {
 						uni.navigateTo({
 							url: "../cb/index/index"
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
 						})
 					}
 				} else if (index == 1) {
-					if(this.jurisdiction.fztf){
+					if (this.jurisdiction.fztf) {
 						uni.navigateTo({
 							url: "../prevention/index"
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
@@ -206,22 +223,22 @@
 					}
 				} else if (index == 2) {
 					console.log(this.jurisdiction.jktf)
-					if(this.jurisdiction.jktf){
+					if (this.jurisdiction.jktf) {
 						uni.navigateTo({
 							url: "/pages/monitor/index"
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
 						})
 					}
 				} else if (index == 3) {
-					if(this.jurisdiction.hjtf){
+					if (this.jurisdiction.hjtf) {
 						uni.navigateTo({
 							url: "../environment/index"
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
@@ -229,11 +246,11 @@
 					}
 				} else if (index == 4) {
 					console.log(this.jurisdiction.sbtf)
-					if(this.jurisdiction.sbtf){
+					if (this.jurisdiction.sbtf) {
 						uni.navigateTo({
 							url: "../equipMange/index/index"
 						})
-					}else{
+					} else {
 						uni.showToast({
 							title: "此账号未开启此模块,如有需要,请联系管理员",
 							icon: "none"
@@ -241,9 +258,9 @@
 					}
 				} else if (index == 5) {
 					uni.showToast({
-					    title: '此功能暂未开放',
-					    duration: 2000,
-						icon:"none"
+						title: '此功能暂未开放',
+						duration: 2000,
+						icon: "none"
 					});
 				}
 			},
@@ -252,16 +269,16 @@
 				console.log(ev)
 				this.loadTF = true
 				uni.showLoading({
-					mask:true,
-					success:function(){
+					mask: true,
+					success: function() {
 						console.log(999)
 					}
 				});
-				if(this.flag == 2){
+				if (this.flag == 2) {
 					console.log('111')
 					// pest.pests.insect_discern 虫害
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 						url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
@@ -271,17 +288,18 @@
 						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
 							})
 						}
 					});
-				}else if(this.flag == 1){
+				} else if (this.flag == 1) {
 					//pest.pests.insect_discern病害识别
 					uni.showLoading({
-					    title: '加载中'
+						title: '加载中'
 					});
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 						url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
@@ -291,7 +309,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
 							})
 						}
 					});
@@ -307,7 +326,7 @@
 				uni.chooseImage({
 					count: 1, //默认9
 					// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['camera','album'], //从相册选择
+					sourceType: ['camera', 'album'], //从相册选择
 					success: (res) => {
 						this.url = res.tempFilePaths[0]
 					}
@@ -319,7 +338,7 @@
 				uni.chooseImage({
 					count: 1, //默认9
 					// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['camera','album'], //从相册选择
+					sourceType: ['camera', 'album'], //从相册选择
 					success: (res) => {
 						console.log(1)
 						this.url = res.tempFilePaths[0]
@@ -335,18 +354,20 @@
 		margin: 0 auto;
 		border-radius: 20rpx !important;
 	}
-	.loading{
+
+	.loading {
 		position: absolute;
 		top: 0;
 		left: 0;
 		z-index: 100;
-		width:100%;
+		width: 100%;
 		height: 100vh;
-		background-color: rgba(0,0,0,0.5);
+		background-color: rgba(0, 0, 0, 0.5);
 		display: flex;
 		justify-content: center;
 		align-items: center;
 	}
+
 	.function {
 		width: 95%;
 		margin: 20rpx auto;
@@ -388,6 +409,7 @@
 			.equipment_item_img {
 				width: 49%;
 				margin-top: 20rpx;
+
 				image {
 					width: 100%;
 					height: 190rpx;

+ 1 - 1
pages/login/login.vue

@@ -73,7 +73,7 @@
 				setbgtf: false,
 				setTF: false,
 				value: "http://8.136.98.49:8002",
-				httparr: ["http://8.136.98.49:8002", "http://182.92.193.64:8002"],
+				httparr: ["http://8.136.98.49:8002", "http://114.115.147.140:8002"],
 				arrowtf: false,
 				showA: false, //
 				contentA: '',

+ 9 - 2
pages/monitor/index.vue

@@ -24,7 +24,7 @@
 							</view>
 						</view>
 						<view class="type-name">
-							<view class="iconfont icon-jiankong"></view>
+							<u-icon name="jiankong" custom-prefix="custom-icon" :class="item.is_online?'icon':'noicon'"></u-icon>
 							<text>
 								监控
 							</text>
@@ -156,7 +156,14 @@
 		display: flex;
 		justify-content: flex-start;
 		font-size: 12px;
-
+		.icon{
+			font-size: 32rpx;
+			color: #18B566;
+		}
+		.noicon{
+			font-size: 32rpx;
+			color: #f00;
+		}
 		text {
 			margin-left: 10px;
 		}

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

@@ -119,7 +119,7 @@
 			// },
 			// upgrade() {
 			// 	console.log(this.appName)
-			// 	var url = "http://182.92.193.64:8002/app_file/" + this.appName
+			// 	var url = "http://114.115.147.140:8002/app_file/" + this.appName
 			// 	console.log(url)
 			// 	const downloadTask = uni.downloadFile({
 			// 		url: url, //仅为示例,并非真实的资源

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

@@ -18,14 +18,14 @@
 			</view>
 			<view style="background-color: #FFFFFF;margin: 20rpx auto 0;">
 				<view class="AboutUs" @click="about">
-					<u-icon name="moban" custom-prefix="custom-icon" class="icon_left"></u-icon>
+					<u-icon name="pingtai" custom-prefix="custom-icon" class="icon_left"></u-icon>
 					关于我们
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 				</view>
 			</view>
 			<view style="background-color: #FFFFFF;">
 				<view class="quit" @click="outto">
-					<u-icon name="tuichu" custom-prefix="custom-icon" class="icon_left"></u-icon>
+					<u-icon name="tuichudenglu" custom-prefix="custom-icon" class="icon_left"></u-icon>
 					退出登录
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 				</view>

+ 1 - 1
pages/my/user-info/user-info.vue

@@ -60,7 +60,7 @@
 						sourceType: ['album', 'camera'], //从相册选择
 						success: (res) => {
 							uni.uploadFile({
-								url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+								url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 								filePath: res.tempFilePaths[0],
 								name: 'img_file',
 								formData: {

+ 56 - 24
pages/prevention/equipmentdetails.vue

@@ -7,10 +7,13 @@
 			</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>
-					<p style="font-size: 32rpx;" @click="copy(eqinfo.item.imei)">设备 ID:{{eqinfo.item.imei}}
-					<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi"></image>
+					<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>
+					<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?eqinfo.item.device_name:"无"}}</p>
 					<p>设备型号:{{eqinfo.item.dtype}}</p>
@@ -38,7 +41,7 @@
 			</view>
 			<view class="realtime">
 				<p class="realtime_title">实时数据</p>
-				<view class="realtime_text" v-if="newdatesTF">
+				<view class="realtime_text">
 					<view class="realtime_text_item">
 						<view class="realtime_text_item_info" v-for="item,index in olddatas" :key="index">
 							<view class="item_info_img">
@@ -51,9 +54,12 @@
 						</view>
 					</view>
 				</view>
-				<view class="realtime_tishi" v-else>
+				<view class="realtime_tishi" v-if="!newdatesTF && !dataloadingtf">
 					暂无数据
 				</view>
+				<view class="realtime_tishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -63,13 +69,14 @@
 		data() {
 			return {
 				eqinfo: {
-					item:{
-						
+					item: {
+
 					}
 				},
 				olddata: {},
 				olddatas: [],
-				newdatesTF: false,
+				newdatesTF: false, //暂无数据提示
+				dataloadingtf: false, //加载中提示
 				work: "",
 				shujutf: false,
 				kongtf: false,
@@ -100,11 +107,11 @@
 					}, {
 						icon: '/image/cb/icon08.png',
 						txt: '环境温度(℃)',
-						value: this.olddata.new_tem==""?"--":this.olddata.new_tem
+						value: this.olddata.new_tem == "" ? "--" : this.olddata.new_tem
 					}, {
 						icon: '/image/cb/icon07.png',
 						txt: '环境湿度(%)',
-						value: this.olddata.new_hum==""?"--":this.olddata.new_hum
+						value: this.olddata.new_hum == "" ? "--" : this.olddata.new_hum
 					}, {
 						icon: '/image/prevention/icon16.png',
 						txt: '信号强度',
@@ -135,13 +142,19 @@
 				]
 			},
 			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=forecast.worm_lamp.device_history_data',
 					data: {
 						device_type_id: 2,
-						device_id: this.eqinfo.item.imei
+						device_id: this.eqinfo.item.imei,
+						start_time: parseInt(oldtime),
+						end_time: parseInt(newtime)
 					}
 				})
+				this.dataloadingtf = false
 				if (res.data.length != 0) {
 					this.olddata = res.data[0].d_h_t
 					this.newdatesTF = true
@@ -166,7 +179,7 @@
 					}
 				})
 				this.eqinfo.item = res.data[0]
-				console.log(res.data[0])
+				this.dataloadingtf = true
 				this.history()
 			},
 			clickLeft() {
@@ -180,11 +193,11 @@
 					url: "./sim?id=" + this.eqinfo.item.d_id
 				})
 			},
-			repairs(){
+			repairs() {
 				console.log(this.eqinfo.item)
-				var device_id = this.eqinfo.item.equip_id||this.eqinfo.item.device_id
+				var device_id = this.eqinfo.item.equip_id || this.eqinfo.item.device_id
 				uni.navigateTo({
-					url: "../afterSale/addafter?device_id="+ device_id +"&device_type="+ 2
+					url: "../afterSale/addafter?device_id=" + device_id + "&device_type=" + 2
 				})
 			},
 			control() { //设备控制
@@ -197,15 +210,15 @@
 					url: "./ucharts?d_id=" + this.eqinfo.item.d_id + "&imei=" + this.eqinfo.item.imei
 				})
 			},
-			copy(item){
+			copy(item) {
 				uni.setClipboardData({
-				    data: item , 
-				    success: function () {
-				        console.log('success');
-				    }
+					data: item,
+					success: function() {
+						console.log('success');
+					}
 				});
 			},
-			selectaddress(lat,lng) { //获取分布位置
+			selectaddress(lat, lng) { //获取分布位置
 				uni.request({
 					type: "GET",
 					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
@@ -223,7 +236,7 @@
 			this.eqinfo.item = JSON.parse(option.shebei)
 			console.log(JSON.parse(option.shebei))
 			this.eqlist(JSON.parse(option.shebei).device_id || JSON.parse(option.shebei).imei)
-			this.selectaddress(this.eqinfo.item.lat,this.eqinfo.item.lng)
+			this.selectaddress(this.eqinfo.item.lat, this.eqinfo.item.lng)
 			uni.getStorage({
 				key: "jurisdiction",
 				success: (res) => {
@@ -288,7 +301,8 @@
 				font-size: 24rpx;
 				color: #FFFFFF;
 				margin-bottom: 10rpx;
-				.tishi{
+
+				.tishi {
 					width: 30rpx;
 					height: 30rpx;
 					margin: 0rpx 0 0 20rpx;
@@ -340,6 +354,24 @@
 			text-align: center;
 			font-size: 32rpx;
 			padding-top: 40rpx;
+
+			.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_text {

+ 18 - 2
pages/prevention/index.vue

@@ -14,6 +14,9 @@
 				 </uni-nav-bar>
 			</view>
 			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/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'"
@@ -60,11 +63,13 @@
 				eqlistdata: [],
 				isTop:false,
 				filtrateTF:false,
-				device_status:""
+				device_status:"",
+				loadingtf:false,//loading
 			}
 		},
 		methods: {
 			async eqlist() { //设备列表
+				this.loadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
 					data: {
@@ -74,6 +79,7 @@
 						device_status:this.device_status
 					}
 				})
+				this.loadingtf = false
 				this.eqlistdata = this.eqlistdata.concat(res.data)
 				console.log(this.eqlistdata)
 			},
@@ -152,7 +158,17 @@
 		height: 160rpx;
 		z-index: 555;
 	}
-	
+	.loading{
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+		.img{
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
 	.bases_search {
 		width: 60%;
 		background-color: #FFFFFF;

+ 147 - 116
pages/prevention/ucharts.vue

@@ -5,53 +5,47 @@
 			<view style="position: fixed;z-index: 100;width: 100%;color: #FFFFFF;">
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="历史数据"></uni-nav-bar>
 			</view>
+			<view class="selecttimes" @click="pickshow = !pickshow">
+				<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="pickshow" mode="range" @change="tiemchange"></u-calendar>
+			</view>
 			<view class="shuju_one" v-show="!pickshow&&!picktwoshow">
 				<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)">
+					<view :class="titleidnex==index?'title_text_color':'tltle_text'" v-for="(item,index) in titletext"
+						:key="index" @click="changeindex(index)">
 						{{item}}
 					</view>
 				</view>
-				<view class="canvastishi" v-if="!canvastishiTF">
+				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
 					暂无数据
 				</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 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="shuju_two" v-show="!pickshow&&!picktwoshow">
-				<view class="canvastishi" v-if="!canvastishiTF">
+				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
 					暂无数据
 				</view>
-				<canvas v-if="canvastishiTF" canvas-id="canvasColumnB" id="canvasColumnB" class="charts" @touchstart="touchLineBb($event)" @touchmove="moveLineBb($event)"
-				 @touchend="touchEndLineBb($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="selecttimes">
-				<view class="newtimes">
-					<view class="newtimes_state" @click="pickshow = !pickshow">
-						<view class="oldtimes_left"> 
-							<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/841f87bfd8abb1b09610fa0789f9d8e.png'" mode=""></image>
-							开始时间:{{this.oldtime|timeFormat()}}
-						</view>
-						<view class="oldtimes_left">
-							<u-icon name="arrow-down"></u-icon>
-						</view>
-						<u-picker mode="time" v-model="pickshow" :params="params" @confirm="pickone"></u-picker>
-					</view>
-					<view class="newtimes_end" @click="picktwoshow = !picktwoshow">
-						<view class="oldtimes_left">
-							<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'" mode=""></image>
-							结束时间:{{this.newtime|timeFormat()}}
-						</view>
-						<view class="oldtimes_left">
-							<u-icon name="arrow-down"></u-icon>
-						</view>
-						<u-picker mode="time" v-model="picktwoshow" :params="params" @confirm="picktwo"></u-picker>
-					</view>
-					<p class="tishi" v-if="tishiTF">请选择正确的结束时间</p>
-					<view class="btnser" @click="serter">
-						搜 索
-					</view>
+				<view class="canvastishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
 				</view>
+				<canvas v-if="canvastishiTF" canvas-id="canvasColumnB" id="canvasColumnB" class="charts"
+					@touchstart="touchLineBb($event)" @touchmove="moveLineBb($event)" @touchend="touchEndLineBb($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">
 				刷 新
@@ -107,7 +101,8 @@
 	export default {
 		data() {
 			return {
-				thdata: ["上报时间","设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)", "充电电压(v)", "电池电压(v)",	
+				thdata: ["上报时间", "设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)", "充电电压(v)",
+					"电池电压(v)",
 				],
 				eqlistdata: [],
 				cWidth: '400',
@@ -136,8 +131,9 @@
 					end_time: null,
 					device_id: null
 				},
-				canvastishiTF:false,
-				pagesum:1
+				canvastishiTF: false, //暂无数据提示
+				dataloadingtf: true, //加载中提示
+				pagesum: 1
 			}
 		},
 		// 页面加载执行的函数
@@ -147,19 +143,22 @@
 			this.cWidth = uni.upx2px(650);
 			this.cHeight = uni.upx2px(500);
 		},
-		onShow(){
+		onShow() {
 			presenttime = +new Date();
 			this.oldtime = parseInt((presenttime - 24 * 60 * 60 * 1000) / 1000)
 			this.newtime = parseInt(presenttime / 1000)
-			setTimeout(()=>{
-				this.getServerData(parseInt(presenttime / 1000), parseInt((presenttime - 24 * 60 * 60 * 1000) / 1000))
-				this.historydata(parseInt(presenttime / 1000), parseInt((presenttime - 24 * 60 * 60 * 1000) / 1000))
-			},1000)
+			setTimeout(() => {
+				this.getServerData(parseInt(presenttime / 1000), parseInt((presenttime - 24 * 60 * 60 * 1000) /
+					1000))
+				this.historydata(parseInt(presenttime / 1000), parseInt((presenttime - 24 * 60 * 60 * 1000) /
+					1000))
+			}, 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=forecast.worm_lamp.device_polyline_data',
 					data: {
@@ -169,9 +168,10 @@
 						start_time: oldtimes
 					}
 				})
-				if(res.length == 0){
+				this.dataloadingtf = false
+				if (res.length == 0) {
 					this.canvastishiTF = false
-				}else{
+				} else {
 					this.canvastishiTF = true
 					var xtitle = []
 					var arr = []
@@ -182,38 +182,39 @@
 					var arr5 = []
 					for (var i = 0; i < res.length; i++) {
 						var times = new Date(res[i].addtime * 1000)
-						xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
+						xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" +
+							times.getMinutes())
 						arr1.unshift(res[i].temperature)
 						arr2.unshift(res[i].humidity)
 						arr3.unshift(Number(res[i].others.bv))
 						arr4.unshift(Number(res[i].others.cv))
 						arr5.unshift(res[i].others.ct)
 					}
-					arr.unshift(arr1,arr2,arr3,arr4)
+					arr.unshift(arr1, arr2, arr3, arr4)
 					var obj = [{
 						name: '温度',
 						data: arr[0],
 						color: '#F97000'
 					}, {
 						name: '湿度',
-						data:  arr[1],
+						data: arr[1],
 						color: '#00E29D'
 					}, {
 						name: '电池电压',
-						data:  arr[2],
+						data: arr[2],
 						color: '#FF3F3F'
 					}, {
 						name: '充电电压',
-						data:  arr[3],
+						data: arr[3],
 						color: '#6CBBFF'
 					}]
-					var obj2 =[{
+					var obj2 = [{
 						name: '击虫次数',
 						data: arr5,
 						color: '#00E29D'
 					}]
-					this.showColumn("canvasColumnA",xtitle, obj)
-					this.showColumnb("canvasColumnB",xtitle, obj2)
+					this.showColumn("canvasColumnA", xtitle, obj)
+					this.showColumnb("canvasColumnB", xtitle, obj2)
 				}
 			},
 			changeindex(index) { //选择日期
@@ -262,7 +263,7 @@
 					}
 				})
 				console.log(res.data)
-				this.pagesum = Math.ceil(res.counts/10)+1
+				this.pagesum = Math.ceil(res.counts / 10) || 1
 				this.eqlistdata = res.data
 				if (res.data.length == 0) {
 					this.forbidden = false
@@ -273,13 +274,30 @@
 			prev() { //上一页
 				if (this.page != 1) {
 					this.page--
+					this.historydata(this.newtime, this.oldtime)
 				}
-				this.historydata(this.newtime, this.oldtime)
 			},
 			next() { //下一页
-				this.page++
+				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
+			},
 			pickone(e) {
 				this.oldtime = +new Date(e.year, e.month - 1, e.day, e.hour, e.minute) / 1000
 				if (this.newtime < this.oldtime) {
@@ -305,27 +323,27 @@
 						duration: 2000
 					});
 				}
-				
+
 			},
 			clickLeft() {
 				uni.navigateBack({
 					delta: 1
 				})
 			},
-			showColumn(id,xtitle,xinfo) {
+			showColumn(id, xtitle, xinfo) {
 				var _self = this
 				canvaColumnA = new uCharts({
 					canvasId: id,
 					type: 'line',
 					legend: {
-						position:"top"
+						position: "top"
 					},
 					fontSize: 11,
 					background: '#FFFFFF',
 					pixelRatio: 1,
 					animation: true,
 					dataLabel: false,
-					categories:xtitle, 
+					categories: xtitle,
 					series: xinfo,
 					enableScroll: true, //开启图表拖拽功能
 					xAxis: {
@@ -348,20 +366,20 @@
 					}
 				});
 			},
-			showColumnb(id,xtitle,xinfo) {
+			showColumnb(id, xtitle, xinfo) {
 				var _self = this
 				canvaColumnB = new uCharts({
 					canvasId: id,
 					type: 'line',
 					legend: {
-						position:"top"
+						position: "top"
 					},
 					fontSize: 11,
 					background: '#FFFFFF',
 					pixelRatio: 1,
 					animation: true,
 					dataLabel: false,
-					categories: xtitle, 
+					categories: xtitle,
 					series: xinfo,
 					enableScroll: true, //开启图表拖拽功能
 					xAxis: {
@@ -425,7 +443,7 @@
 						control_type: "data"
 					}
 				})
-				if(res){
+				if (res) {
 					uni.showToast({
 						title: '刷新成功',
 						duration: 2000,
@@ -434,7 +452,7 @@
 					uni.navigateBack({
 						delta: 1
 					})
-				}else{
+				} else {
 					uni.showToast({
 						title: '刷新失败',
 						duration: 2000,
@@ -454,21 +472,40 @@
 	.shuju_one,
 	.shuju_two {
 		position: absolute;
-		top: 54px;
+		top: 190rpx;
 		width: 90%;
 		left: 5%;
 		box-shadow: 0 0 10rpx #bcb9ca;
 		padding-top: 20rpx;
 		height: 550rpx;
 
-		.canvastishi{
+		.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;
@@ -511,67 +548,40 @@
 	}
 
 	.shuju_two {
-		top: 700rpx;
+		top: 790rpx;
 	}
 
 	.selecttimes {
 		position: absolute;
-		top: 1290rpx;
+		top: 54px;
 		width: 90%;
 		box-shadow: 0 0 10rpx #bcb9ca;
 		left: 5%;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
 
-		.tishi {
-			width: 90%;
-			margin: 0 auto;
-			color: #f00000;
-			text-align: center;
-			font-size: 24rpx;
-		}
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
 
-		.btnser {
-			width: 90%;
-			margin: 10rpx auto;
-			color: #FFFFFF;
-			text-align: center;
-			font-size: 28rpx;
-			background-color: #58BD4D;
-			border-radius: 20rpx;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
 
-		.newtimes {
-			width: 100%;
-			padding: 20rpx 20rpx;
-			box-sizing: border-box;
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
 
-			.newtimes_state,
-			.newtimes_end {
-				display: flex;
-				justify-content: space-between;
-				margin-bottom: 20rpx;
-
-				.oldtimes_left {
-					position: relative;
-					padding-left: 36rpx;
-					font-size: 28rpx;
-
-					image {
-						width: 30rpx;
-						height: 30rpx;
-						vertical-align: top;
-						position: absolute;
-						top: 7rpx;
-						left: 0;
-					}
-				}
 			}
 		}
 	}
-	.refresh{
+
+	.refresh {
 		position: absolute;
-		top: 1530rpx;
+		top: 1380rpx;
 		left: 5%;
 		width: 160rpx;
 		height: 50rpx;
@@ -580,9 +590,10 @@
 		line-height: 50rpx;
 		text-align: center;
 	}
+
 	.condition {
 		position: absolute;
-		top: 1600rpx;
+		top: 1450rpx;
 		display: flex;
 		flex-wrap: wrap;
 		width: 90%;
@@ -593,9 +604,11 @@
 		.scroll-X {
 			width: 95%;
 			margin: 20rpx auto;
-			.table{
+
+			.table {
 				width: 1056px;
 			}
+
 			.tr {
 				display: flex;
 				overflow: hidden;
@@ -608,7 +621,7 @@
 					text-align: center;
 					height: 52rpx;
 					line-height: 52rpx;
-					border: 2rpx solid #F1F1F1;
+					// border: 2rpx solid #F1F1F1;
 				}
 
 				.th:first-child,
@@ -623,6 +636,15 @@
 					width: 200rpx;
 				}
 			}
+
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
+
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
 		}
 
 		.pagenumber {
@@ -648,4 +670,13 @@
 			}
 		}
 	}
+
+	/deep/.u-calendar__action {
+		display: flex;
+		justify-content: space-around;
+
+		.u-calendar__action__text {
+			line-height: 25px;
+		}
+	}
 </style>

BIN
static/images/ajax-loader.gif


+ 0 - 539
style/font/demo.css

@@ -1,539 +0,0 @@
-/* Logo 字体 */
-@font-face {
-  font-family: "iconfont logo";
-  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
-  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
-    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
-    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
-    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
-}
-
-.logo {
-  font-family: "iconfont logo";
-  font-size: 160px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-/* tabs */
-.nav-tabs {
-  position: relative;
-}
-
-.nav-tabs .nav-more {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  height: 42px;
-  line-height: 42px;
-  color: #666;
-}
-
-#tabs {
-  border-bottom: 1px solid #eee;
-}
-
-#tabs li {
-  cursor: pointer;
-  width: 100px;
-  height: 40px;
-  line-height: 40px;
-  text-align: center;
-  font-size: 16px;
-  border-bottom: 2px solid transparent;
-  position: relative;
-  z-index: 1;
-  margin-bottom: -1px;
-  color: #666;
-}
-
-
-#tabs .active {
-  border-bottom-color: #f00;
-  color: #222;
-}
-
-.tab-container .content {
-  display: none;
-}
-
-/* 页面布局 */
-.main {
-  padding: 30px 100px;
-  width: 960px;
-  margin: 0 auto;
-}
-
-.main .logo {
-  color: #333;
-  text-align: left;
-  margin-bottom: 30px;
-  line-height: 1;
-  height: 110px;
-  margin-top: -50px;
-  overflow: hidden;
-  *zoom: 1;
-}
-
-.main .logo a {
-  font-size: 160px;
-  color: #333;
-}
-
-.helps {
-  margin-top: 40px;
-}
-
-.helps pre {
-  padding: 20px;
-  margin: 10px 0;
-  border: solid 1px #e7e1cd;
-  background-color: #fffdef;
-  overflow: auto;
-}
-
-.icon_lists {
-  width: 100% !important;
-  overflow: hidden;
-  *zoom: 1;
-}
-
-.icon_lists li {
-  width: 100px;
-  margin-bottom: 10px;
-  margin-right: 20px;
-  text-align: center;
-  list-style: none !important;
-  cursor: default;
-}
-
-.icon_lists li .code-name {
-  line-height: 1.2;
-}
-
-.icon_lists .icon {
-  display: block;
-  height: 100px;
-  line-height: 100px;
-  font-size: 42px;
-  margin: 10px auto;
-  color: #333;
-  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
-  -moz-transition: font-size 0.25s linear, width 0.25s linear;
-  transition: font-size 0.25s linear, width 0.25s linear;
-}
-
-.icon_lists .icon:hover {
-  font-size: 100px;
-}
-
-.icon_lists .svg-icon {
-  /* 通过设置 font-size 来改变图标大小 */
-  width: 1em;
-  /* 图标和文字相邻时,垂直对齐 */
-  vertical-align: -0.15em;
-  /* 通过设置 color 来改变 SVG 的颜色/fill */
-  fill: currentColor;
-  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
-      normalize.css 中也包含这行 */
-  overflow: hidden;
-}
-
-.icon_lists li .name,
-.icon_lists li .code-name {
-  color: #666;
-}
-
-/* markdown 样式 */
-.markdown {
-  color: #666;
-  font-size: 14px;
-  line-height: 1.8;
-}
-
-.highlight {
-  line-height: 1.5;
-}
-
-.markdown img {
-  vertical-align: middle;
-  max-width: 100%;
-}
-
-.markdown h1 {
-  color: #404040;
-  font-weight: 500;
-  line-height: 40px;
-  margin-bottom: 24px;
-}
-
-.markdown h2,
-.markdown h3,
-.markdown h4,
-.markdown h5,
-.markdown h6 {
-  color: #404040;
-  margin: 1.6em 0 0.6em 0;
-  font-weight: 500;
-  clear: both;
-}
-
-.markdown h1 {
-  font-size: 28px;
-}
-
-.markdown h2 {
-  font-size: 22px;
-}
-
-.markdown h3 {
-  font-size: 16px;
-}
-
-.markdown h4 {
-  font-size: 14px;
-}
-
-.markdown h5 {
-  font-size: 12px;
-}
-
-.markdown h6 {
-  font-size: 12px;
-}
-
-.markdown hr {
-  height: 1px;
-  border: 0;
-  background: #e9e9e9;
-  margin: 16px 0;
-  clear: both;
-}
-
-.markdown p {
-  margin: 1em 0;
-}
-
-.markdown>p,
-.markdown>blockquote,
-.markdown>.highlight,
-.markdown>ol,
-.markdown>ul {
-  width: 80%;
-}
-
-.markdown ul>li {
-  list-style: circle;
-}
-
-.markdown>ul li,
-.markdown blockquote ul>li {
-  margin-left: 20px;
-  padding-left: 4px;
-}
-
-.markdown>ul li p,
-.markdown>ol li p {
-  margin: 0.6em 0;
-}
-
-.markdown ol>li {
-  list-style: decimal;
-}
-
-.markdown>ol li,
-.markdown blockquote ol>li {
-  margin-left: 20px;
-  padding-left: 4px;
-}
-
-.markdown code {
-  margin: 0 3px;
-  padding: 0 5px;
-  background: #eee;
-  border-radius: 3px;
-}
-
-.markdown strong,
-.markdown b {
-  font-weight: 600;
-}
-
-.markdown>table {
-  border-collapse: collapse;
-  border-spacing: 0px;
-  empty-cells: show;
-  border: 1px solid #e9e9e9;
-  width: 95%;
-  margin-bottom: 24px;
-}
-
-.markdown>table th {
-  white-space: nowrap;
-  color: #333;
-  font-weight: 600;
-}
-
-.markdown>table th,
-.markdown>table td {
-  border: 1px solid #e9e9e9;
-  padding: 8px 16px;
-  text-align: left;
-}
-
-.markdown>table th {
-  background: #F7F7F7;
-}
-
-.markdown blockquote {
-  font-size: 90%;
-  color: #999;
-  border-left: 4px solid #e9e9e9;
-  padding-left: 0.8em;
-  margin: 1em 0;
-}
-
-.markdown blockquote p {
-  margin: 0;
-}
-
-.markdown .anchor {
-  opacity: 0;
-  transition: opacity 0.3s ease;
-  margin-left: 8px;
-}
-
-.markdown .waiting {
-  color: #ccc;
-}
-
-.markdown h1:hover .anchor,
-.markdown h2:hover .anchor,
-.markdown h3:hover .anchor,
-.markdown h4:hover .anchor,
-.markdown h5:hover .anchor,
-.markdown h6:hover .anchor {
-  opacity: 1;
-  display: inline-block;
-}
-
-.markdown>br,
-.markdown>p>br {
-  clear: both;
-}
-
-
-.hljs {
-  display: block;
-  background: white;
-  padding: 0.5em;
-  color: #333333;
-  overflow-x: auto;
-}
-
-.hljs-comment,
-.hljs-meta {
-  color: #969896;
-}
-
-.hljs-string,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-strong,
-.hljs-emphasis,
-.hljs-quote {
-  color: #df5000;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-type {
-  color: #a71d5d;
-}
-
-.hljs-literal,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-attribute {
-  color: #0086b3;
-}
-
-.hljs-section,
-.hljs-name {
-  color: #63a35c;
-}
-
-.hljs-tag {
-  color: #333333;
-}
-
-.hljs-title,
-.hljs-attr,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
-  color: #795da3;
-}
-
-.hljs-addition {
-  color: #55a532;
-  background-color: #eaffea;
-}
-
-.hljs-deletion {
-  color: #bd2c00;
-  background-color: #ffecec;
-}
-
-.hljs-link {
-  text-decoration: underline;
-}
-
-/* 代码高亮 */
-/* PrismJS 1.15.0
-https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
-/**
- * prism.js default theme for JavaScript, CSS and HTML
- * Based on dabblet (http://dabblet.com)
- * @author Lea Verou
- */
-code[class*="language-"],
-pre[class*="language-"] {
-  color: black;
-  background: none;
-  text-shadow: 0 1px white;
-  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
-  text-align: left;
-  white-space: pre;
-  word-spacing: normal;
-  word-break: normal;
-  word-wrap: normal;
-  line-height: 1.5;
-
-  -moz-tab-size: 4;
-  -o-tab-size: 4;
-  tab-size: 4;
-
-  -webkit-hyphens: none;
-  -moz-hyphens: none;
-  -ms-hyphens: none;
-  hyphens: none;
-}
-
-pre[class*="language-"]::-moz-selection,
-pre[class*="language-"] ::-moz-selection,
-code[class*="language-"]::-moz-selection,
-code[class*="language-"] ::-moz-selection {
-  text-shadow: none;
-  background: #b3d4fc;
-}
-
-pre[class*="language-"]::selection,
-pre[class*="language-"] ::selection,
-code[class*="language-"]::selection,
-code[class*="language-"] ::selection {
-  text-shadow: none;
-  background: #b3d4fc;
-}
-
-@media print {
-
-  code[class*="language-"],
-  pre[class*="language-"] {
-    text-shadow: none;
-  }
-}
-
-/* Code blocks */
-pre[class*="language-"] {
-  padding: 1em;
-  margin: .5em 0;
-  overflow: auto;
-}
-
-:not(pre)>code[class*="language-"],
-pre[class*="language-"] {
-  background: #f5f2f0;
-}
-
-/* Inline code */
-:not(pre)>code[class*="language-"] {
-  padding: .1em;
-  border-radius: .3em;
-  white-space: normal;
-}
-
-.token.comment,
-.token.prolog,
-.token.doctype,
-.token.cdata {
-  color: slategray;
-}
-
-.token.punctuation {
-  color: #999;
-}
-
-.namespace {
-  opacity: .7;
-}
-
-.token.property,
-.token.tag,
-.token.boolean,
-.token.number,
-.token.constant,
-.token.symbol,
-.token.deleted {
-  color: #905;
-}
-
-.token.selector,
-.token.attr-name,
-.token.string,
-.token.char,
-.token.builtin,
-.token.inserted {
-  color: #690;
-}
-
-.token.operator,
-.token.entity,
-.token.url,
-.language-css .token.string,
-.style .token.string {
-  color: #9a6e3a;
-  background: hsla(0, 0%, 100%, .5);
-}
-
-.token.atrule,
-.token.attr-value,
-.token.keyword {
-  color: #07a;
-}
-
-.token.function,
-.token.class-name {
-  color: #DD4A68;
-}
-
-.token.regex,
-.token.important,
-.token.variable {
-  color: #e90;
-}
-
-.token.important,
-.token.bold {
-  font-weight: bold;
-}
-
-.token.italic {
-  font-style: italic;
-}
-
-.token.entity {
-  cursor: help;
-}

File diff suppressed because it is too large
+ 0 - 1850
style/font/demo_index.html


File diff suppressed because it is too large
+ 290 - 148
style/font/iconfont.css


BIN
style/font/iconfont.eot


File diff suppressed because it is too large
+ 0 - 1
style/font/iconfont.js


+ 0 - 520
style/font/iconfont.json

@@ -1,520 +0,0 @@
-{
-  "id": "1738837",
-  "name": "农业大数据",
-  "font_family": "iconfont",
-  "css_prefix_text": "icon-",
-  "description": "",
-  "glyphs": [
-    {
-      "icon_id": "5064096",
-      "name": "统计",
-      "font_class": "tongji2",
-      "unicode": "e646",
-      "unicode_decimal": 58950
-    },
-    {
-      "icon_id": "9241144",
-      "name": "手写签批",
-      "font_class": "iconzhengli_shouxieqianpi",
-      "unicode": "e648",
-      "unicode_decimal": 58952
-    },
-    {
-      "icon_id": "13173807",
-      "name": "识别",
-      "font_class": "shibie",
-      "unicode": "e603",
-      "unicode_decimal": 58883
-    },
-    {
-      "icon_id": "15726936",
-      "name": "统计",
-      "font_class": "tongji1",
-      "unicode": "e642",
-      "unicode_decimal": 58946
-    },
-    {
-      "icon_id": "20082758",
-      "name": "可视化大屏",
-      "font_class": "keshihuadaping",
-      "unicode": "e61c",
-      "unicode_decimal": 58908
-    },
-    {
-      "icon_id": "20082759",
-      "name": "退出关闭",
-      "font_class": "tuichuguanbi",
-      "unicode": "e61d",
-      "unicode_decimal": 58909
-    },
-    {
-      "icon_id": "20082258",
-      "name": "照片查看",
-      "font_class": "zhaopianchakan",
-      "unicode": "e61b",
-      "unicode_decimal": 58907
-    },
-    {
-      "icon_id": "20081037",
-      "name": "图标任务",
-      "font_class": "tubiaorenwu",
-      "unicode": "e61a",
-      "unicode_decimal": 58906
-    },
-    {
-      "icon_id": "19799572",
-      "name": "定位",
-      "font_class": "dingwei1",
-      "unicode": "e619",
-      "unicode_decimal": 58905
-    },
-    {
-      "icon_id": "19798147",
-      "name": "基地管理",
-      "font_class": "jidiguanli",
-      "unicode": "e618",
-      "unicode_decimal": 58904
-    },
-    {
-      "icon_id": "19798145",
-      "name": "基地面积",
-      "font_class": "jidimianji",
-      "unicode": "e617",
-      "unicode_decimal": 58903
-    },
-    {
-      "icon_id": "19798140",
-      "name": "建立时间",
-      "font_class": "jianlishijian",
-      "unicode": "e60d",
-      "unicode_decimal": 58893
-    },
-    {
-      "icon_id": "17654821",
-      "name": "录像",
-      "font_class": "luxiang",
-      "unicode": "e637",
-      "unicode_decimal": 58935
-    },
-    {
-      "icon_id": "774444",
-      "name": "扳手",
-      "font_class": "banshou",
-      "unicode": "e65c",
-      "unicode_decimal": 58972
-    },
-    {
-      "icon_id": "7335485",
-      "name": "地块",
-      "font_class": "chandi",
-      "unicode": "eb24",
-      "unicode_decimal": 60196
-    },
-    {
-      "icon_id": "7335489",
-      "name": "基础",
-      "font_class": "jichu",
-      "unicode": "eb25",
-      "unicode_decimal": 60197
-    },
-    {
-      "icon_id": "7335622",
-      "name": "迟到",
-      "font_class": "chidao",
-      "unicode": "eb44",
-      "unicode_decimal": 60228
-    },
-    {
-      "icon_id": "1391282",
-      "name": "日历",
-      "font_class": "rili",
-      "unicode": "e609",
-      "unicode_decimal": 58889
-    },
-    {
-      "icon_id": "5204808",
-      "name": "分类",
-      "font_class": "fenlei",
-      "unicode": "e616",
-      "unicode_decimal": 58902
-    },
-    {
-      "icon_id": "2678622",
-      "name": "全屏",
-      "font_class": "quanping",
-      "unicode": "e656",
-      "unicode_decimal": 58966
-    },
-    {
-      "icon_id": "772252",
-      "name": "扫描 识别 380%",
-      "font_class": "saomiaoshibie380",
-      "unicode": "e686",
-      "unicode_decimal": 59014
-    },
-    {
-      "icon_id": "11893490",
-      "name": "添加",
-      "font_class": "tianjia",
-      "unicode": "e615",
-      "unicode_decimal": 58901
-    },
-    {
-      "icon_id": "16364328",
-      "name": "统计",
-      "font_class": "tongji",
-      "unicode": "e636",
-      "unicode_decimal": 58934
-    },
-    {
-      "icon_id": "17709313",
-      "name": "未命名 -34",
-      "font_class": "weimingming-34",
-      "unicode": "e60b",
-      "unicode_decimal": 58891
-    },
-    {
-      "icon_id": "5327411",
-      "name": "臭虫bug",
-      "font_class": "chouchongbug",
-      "unicode": "e6e1",
-      "unicode_decimal": 59105
-    },
-    {
-      "icon_id": "802969",
-      "name": "楼房",
-      "font_class": "loufang",
-      "unicode": "e64f",
-      "unicode_decimal": 58959
-    },
-    {
-      "icon_id": "4348068",
-      "name": "电脑",
-      "font_class": "diannao1",
-      "unicode": "e623",
-      "unicode_decimal": 58915
-    },
-    {
-      "icon_id": "8835594",
-      "name": "图片",
-      "font_class": "tupian-xianxing",
-      "unicode": "e635",
-      "unicode_decimal": 58933
-    },
-    {
-      "icon_id": "10392628",
-      "name": "详情-",
-      "font_class": "xiangqing-",
-      "unicode": "e608",
-      "unicode_decimal": 58888
-    },
-    {
-      "icon_id": "36107",
-      "name": "面积",
-      "font_class": "mianji",
-      "unicode": "e602",
-      "unicode_decimal": 58882
-    },
-    {
-      "icon_id": "883904",
-      "name": "电话 (2)",
-      "font_class": "dianhua2",
-      "unicode": "e611",
-      "unicode_decimal": 58897
-    },
-    {
-      "icon_id": "1183130",
-      "name": "定位",
-      "font_class": "dingwei",
-      "unicode": "e675",
-      "unicode_decimal": 58997
-    },
-    {
-      "icon_id": "6129144",
-      "name": "102绑定",
-      "font_class": "bangding",
-      "unicode": "e784",
-      "unicode_decimal": 59268
-    },
-    {
-      "icon_id": "6970030",
-      "name": "用户",
-      "font_class": "yonghu11",
-      "unicode": "e705",
-      "unicode_decimal": 59141
-    },
-    {
-      "icon_id": "1106935",
-      "name": "雨",
-      "font_class": "yu",
-      "unicode": "e63a",
-      "unicode_decimal": 58938
-    },
-    {
-      "icon_id": "2155826",
-      "name": "温度",
-      "font_class": "thermometer_icon",
-      "unicode": "e67a",
-      "unicode_decimal": 59002
-    },
-    {
-      "icon_id": "4236632",
-      "name": "湿度",
-      "font_class": "shidu",
-      "unicode": "e60a",
-      "unicode_decimal": 58890
-    },
-    {
-      "icon_id": "7983631",
-      "name": "摄像头",
-      "font_class": "xingzhuang",
-      "unicode": "e614",
-      "unicode_decimal": 58900
-    },
-    {
-      "icon_id": "13638685",
-      "name": "电",
-      "font_class": "dian",
-      "unicode": "e655",
-      "unicode_decimal": 58965
-    },
-    {
-      "icon_id": "13638743",
-      "name": "温度",
-      "font_class": "wendu",
-      "unicode": "e660",
-      "unicode_decimal": 58976
-    },
-    {
-      "icon_id": "14095260",
-      "name": "定时",
-      "font_class": "dingshi",
-      "unicode": "e77e",
-      "unicode_decimal": 59262
-    },
-    {
-      "icon_id": "397065",
-      "name": "诱虫灯",
-      "font_class": "fangzhi",
-      "unicode": "e75c",
-      "unicode_decimal": 59228
-    },
-    {
-      "icon_id": "519489",
-      "name": "首页",
-      "font_class": "shouye",
-      "unicode": "e61e",
-      "unicode_decimal": 58910
-    },
-    {
-      "icon_id": "552767",
-      "name": "农药化肥",
-      "font_class": "nongchangguanli",
-      "unicode": "e62c",
-      "unicode_decimal": 58924
-    },
-    {
-      "icon_id": "689284",
-      "name": "设置 设定 配置 扳手",
-      "font_class": "shouhou",
-      "unicode": "e80e",
-      "unicode_decimal": 59406
-    },
-    {
-      "icon_id": "1119123",
-      "name": "系统",
-      "font_class": "xitong",
-      "unicode": "e60f",
-      "unicode_decimal": 58895
-    },
-    {
-      "icon_id": "1320048",
-      "name": "数据统计",
-      "font_class": "shujuzhanshi",
-      "unicode": "e621",
-      "unicode_decimal": 58913
-    },
-    {
-      "icon_id": "3483768",
-      "name": "地址",
-      "font_class": "jidi",
-      "unicode": "e672",
-      "unicode_decimal": 58994
-    },
-    {
-      "icon_id": "6756289",
-      "name": "专家",
-      "font_class": "zhuanjia",
-      "unicode": "e607",
-      "unicode_decimal": 58887
-    },
-    {
-      "icon_id": "7562834",
-      "name": "农事行为",
-      "font_class": "nongshiguanli",
-      "unicode": "e60c",
-      "unicode_decimal": 58892
-    },
-    {
-      "icon_id": "10544904",
-      "name": "多云转晴",
-      "font_class": "huanjingjiance",
-      "unicode": "e610",
-      "unicode_decimal": 58896
-    },
-    {
-      "icon_id": "13190141",
-      "name": "设备",
-      "font_class": "shebei",
-      "unicode": "e622",
-      "unicode_decimal": 58914
-    },
-    {
-      "icon_id": "13837385",
-      "name": "虫情监测 - 简",
-      "font_class": "cebaoguanli",
-      "unicode": "e776",
-      "unicode_decimal": 59254
-    },
-    {
-      "icon_id": "15282842",
-      "name": "树苗",
-      "font_class": "suyuan",
-      "unicode": "e6e8",
-      "unicode_decimal": 59112
-    },
-    {
-      "icon_id": "15631425",
-      "name": "监控",
-      "font_class": "jiankong",
-      "unicode": "e629",
-      "unicode_decimal": 58921
-    },
-    {
-      "icon_id": "992522",
-      "name": "信息",
-      "font_class": "xinxi1",
-      "unicode": "e64b",
-      "unicode_decimal": 58955
-    },
-    {
-      "icon_id": "1135940",
-      "name": "用户",
-      "font_class": "yonghu1",
-      "unicode": "e612",
-      "unicode_decimal": 58898
-    },
-    {
-      "icon_id": "7501066",
-      "name": "密码",
-      "font_class": "mima1",
-      "unicode": "e620",
-      "unicode_decimal": 58912
-    },
-    {
-      "icon_id": "715831",
-      "name": "电脑",
-      "font_class": "diannao",
-      "unicode": "e605",
-      "unicode_decimal": 58885
-    },
-    {
-      "icon_id": "4186778",
-      "name": "标签",
-      "font_class": "biaoqian",
-      "unicode": "e634",
-      "unicode_decimal": 58932
-    },
-    {
-      "icon_id": "6682541",
-      "name": "地址",
-      "font_class": "dizhi",
-      "unicode": "e606",
-      "unicode_decimal": 58886
-    },
-    {
-      "icon_id": "7404314",
-      "name": "时间",
-      "font_class": "shijian",
-      "unicode": "e77c",
-      "unicode_decimal": 59260
-    },
-    {
-      "icon_id": "8094230",
-      "name": "页面操作",
-      "font_class": "yemiancaozuo",
-      "unicode": "e64e",
-      "unicode_decimal": 58958
-    },
-    {
-      "icon_id": "10995780",
-      "name": "用户",
-      "font_class": "yonghu",
-      "unicode": "e60e",
-      "unicode_decimal": 58894
-    },
-    {
-      "icon_id": "354570",
-      "name": "编辑",
-      "font_class": "iconfontedit",
-      "unicode": "e61f",
-      "unicode_decimal": 58911
-    },
-    {
-      "icon_id": "813727",
-      "name": "充值",
-      "font_class": "chongzhi",
-      "unicode": "e633",
-      "unicode_decimal": 58931
-    },
-    {
-      "icon_id": "1761485",
-      "name": "禁用",
-      "font_class": "jinyong",
-      "unicode": "e641",
-      "unicode_decimal": 58945
-    },
-    {
-      "icon_id": "11391516",
-      "name": "密码",
-      "font_class": "mima",
-      "unicode": "e638",
-      "unicode_decimal": 58936
-    },
-    {
-      "icon_id": "9783463",
-      "name": "文档",
-      "font_class": "wendang",
-      "unicode": "e613",
-      "unicode_decimal": 58899
-    },
-    {
-      "icon_id": "4641118",
-      "name": "删除",
-      "font_class": "shanchu",
-      "unicode": "e625",
-      "unicode_decimal": 58917
-    },
-    {
-      "icon_id": "12685010",
-      "name": "铃",
-      "font_class": "icon_huabanfuben",
-      "unicode": "e62b",
-      "unicode_decimal": 58923
-    },
-    {
-      "icon_id": "2512619",
-      "name": "BAI-屋子",
-      "font_class": "BAI-wuzi",
-      "unicode": "e69c",
-      "unicode_decimal": 59036
-    },
-    {
-      "icon_id": "5387843",
-      "name": "主题_调色盘_o",
-      "font_class": "zhuti_tiaosepan_o",
-      "unicode": "eb6e",
-      "unicode_decimal": 60270
-    }
-  ]
-}

File diff suppressed because it is too large
+ 0 - 245
style/font/iconfont.svg


BIN
style/font/iconfont.ttf


BIN
style/font/iconfont.woff


BIN
style/font/iconfont.woff2


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/historyfile.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/xyhistoryile.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map


+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequiment.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["uni-app:///main.js"],"names":["createPage","Page"],"mappings":";;;;wEAAA,qBACA,sBACA,qD,mDACAA,EAAWC,a","file":"pages/environment/gsequiment.js","sourcesContent":["import 'uni-pages';\nimport Vue from 'vue'\nimport Page from './pages/environment/gsequiment.vue'\ncreatePage(Page)"],"sourceRoot":""}

File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequipment.js.map


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gshistory.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/history.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/allocation.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/modification.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/monitor/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/about/about.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/user-info/user-info.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/equipmentdetails.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/ucharts.js.map


+ 3 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -64,7 +64,9 @@
     "pages/cb/cbd/equip-set/results",
     "pages/cb/cbd/equip-set/manualinput",
     "pages/environment/sim",
-    "pages/monitor/sim"
+    "pages/monitor/sim",
+    "pages/environment/gshistory",
+    "pages/environment/gsequipment"
   ],
   "subPackages": [],
   "window": {

File diff suppressed because it is too large
+ 266 - 159
unpackage/dist/dev/mp-weixin/common/main.wxss


File diff suppressed because it is too large
+ 11 - 11
unpackage/dist/dev/mp-weixin/common/vendor.js


File diff suppressed because it is too large
+ 8 - 8
unpackage/dist/dev/mp-weixin/components/bazaar-city_list/index.js


+ 2 - 2
unpackage/dist/dev/mp-weixin/components/bazaar-city_list/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

File diff suppressed because it is too large
+ 8 - 8
unpackage/dist/dev/mp-weixin/components/equip-item/equip-item.js


File diff suppressed because it is too large
+ 8 - 8
unpackage/dist/dev/mp-weixin/components/ksp-image-cutter/ksp-image-cutter.js


File diff suppressed because it is too large
+ 8 - 8
unpackage/dist/dev/mp-weixin/components/uni-icons/uni-icons.js


File diff suppressed because it is too large
+ 8 - 8
unpackage/dist/dev/mp-weixin/components/uni-nav-bar/uni-nav-bar.js


File diff suppressed because it is too large
+ 8 - 8
unpackage/dist/dev/mp-weixin/components/uni-status-bar/uni-status-bar.js


File diff suppressed because it is too large
+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/afterSale/addafter.js


File diff suppressed because it is too large
+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/afterSale/index.js


File diff suppressed because it is too large
+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/afterSale/search.js


File diff suppressed because it is too large
+ 5 - 5
unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.wxml


+ 33 - 4
unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.wxss

@@ -43,6 +43,31 @@
   margin-left: -64rpx;
   margin-top: -21rpx;
 }
+.shuju_one .canvastishi .dataloading:after,
+.shuju_two .canvastishi .dataloading:after {
+  overflow: hidden;
+  display: inline-block;
+  vertical-align: bottom;
+  -webkit-animation: ellipsis 2s infinite;
+          animation: ellipsis 2s infinite;
+  content: "\2026";
+}
+@-webkit-keyframes ellipsis {
+from {
+    width: 2px;
+}
+to {
+    width: 15px;
+}
+}
+@keyframes ellipsis {
+from {
+    width: 2px;
+}
+to {
+    width: 15px;
+}
+}
 .shuju_one .shuju_one_title,
 .shuju_two .shuju_one_title {
   width: 70%;
@@ -112,19 +137,23 @@
 .condition .scroll-X .tr .td {
   display: inline-block;
   padding: 5rpx;
-  width: 240rpx;
+  width: 300rpx;
   text-align: center;
   height: 52rpx;
   line-height: 52rpx;
   border: 2rpx solid #F1F1F1;
 }
-.condition .scroll-X .tr .th {
-  height: 100rpx;
-}
 .condition .scroll-X .tr .th:first-child,
 .condition .scroll-X .tr .td:first-child {
   width: 300rpx;
 }
+.condition .scroll-X .tr:nth-child(2n-1) {
+  background-color: #f5fff8;
+}
+.condition .scroll-X .tr:first-child {
+  background-color: #57c878;
+  color: #fff;
+}
 .condition .pagenumber {
   display: -webkit-box;
   display: -webkit-flex;

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/bzy/equip-set/equip-set.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/addimg.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/equip-set.js


File diff suppressed because it is too large
+ 5 - 5
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/historyfile.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/historyfile.wxml


+ 32 - 0
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/historyfile.wxss

@@ -43,6 +43,31 @@
   margin-left: -64rpx;
   margin-top: -21rpx;
 }
+.shuju_one .canvastishi .dataloading:after,
+.shuju_two .canvastishi .dataloading:after {
+  overflow: hidden;
+  display: inline-block;
+  vertical-align: bottom;
+  -webkit-animation: ellipsis 2s infinite;
+          animation: ellipsis 2s infinite;
+  content: "\2026";
+}
+@-webkit-keyframes ellipsis {
+from {
+    width: 2px;
+}
+to {
+    width: 15px;
+}
+}
+@keyframes ellipsis {
+from {
+    width: 2px;
+}
+to {
+    width: 15px;
+}
+}
 .shuju_one .shuju_one_title,
 .shuju_two .shuju_one_title {
   width: 70%;
@@ -122,6 +147,13 @@
 .condition .scroll-X .tr .td:first-child {
   width: 300rpx;
 }
+.condition .scroll-X .tr:nth-child(2n-1) {
+  background-color: #f5fff8;
+}
+.condition .scroll-X .tr:first-child {
+  background-color: #57c878;
+  color: #fff;
+}
 .condition .pagenumber {
   display: -webkit-box;
   display: -webkit-flex;

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/imgpage.js


+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/cb/cbd/equip-set/manualinput.js


Some files were not shown because too many files changed in this diff