zhangyun пре 3 година
родитељ
комит
5ecef6c595
100 измењених фајлова са 2815 додато и 725 уклоњено
  1. 9 1
      manifest.json
  2. 14 32
      pages.json
  3. 1 1
      pages/afterSale/search.vue
  4. 66 30
      pages/cb/cbd/equip-set/imgpage.vue
  5. 12 4
      pages/cb/cbd/equip-set/results.vue
  6. 7 7
      pages/cb/equip-detail/equip-detail.vue
  7. 47 1
      pages/cb/index/index.vue
  8. 103 128
      pages/distribution/index.vue
  9. 55 1
      pages/environment/index.vue
  10. 271 108
      pages/equipList/index.vue
  11. 8 0
      pages/equipMange/index/assignment.vue
  12. 3 3
      pages/expertDiagnosis/index.vue
  13. 5 2
      pages/expertDiagnosis/introduce.vue
  14. 2 2
      pages/expertDiagnosis/wormcase.vue
  15. 609 212
      pages/index/index.vue
  16. 104 131
      pages/login/login.vue
  17. 57 8
      pages/my/user-info/user-info.vue
  18. 56 1
      pages/prevention/index.vue
  19. 1 1
      pages/prevention/ucharts.vue
  20. BIN
      static/images/12.png
  21. BIN
      static/images/13.png
  22. BIN
      static/images/14.png
  23. BIN
      static/images/15.png
  24. BIN
      static/images/16.png
  25. BIN
      static/images/17.png
  26. BIN
      static/images/18.png
  27. BIN
      static/images/19.png
  28. BIN
      static/images/distribution/0b551e50be351dbc14f0dd6470e3443.png
  29. BIN
      static/images/distribution/1bd535eb7dbb0809940030d40c64b4c.png
  30. BIN
      static/images/distribution/2eb9e550709430a1bd8178568c14785.png
  31. BIN
      static/images/distribution/515ea6143e0aaff4a823270c7aa00a6.png
  32. BIN
      static/images/distribution/54a96e2b0ad4efeecbd4a7b5e6deda3.png
  33. BIN
      static/images/distribution/7610e3983eb33ed5b9ad72ebdfc8ed2.png
  34. BIN
      static/images/distribution/8325b1b6079456ce43f952ce13d2919.png
  35. BIN
      static/images/distribution/be5c1cfed22713a9544f020cf41c25f.png
  36. BIN
      static/images/irrigate/yinxingqia.png
  37. BIN
      static/images/login/bg.png
  38. BIN
      static/images/tabBar/gerenzhongxin.png
  39. BIN
      static/images/tabBar/gerenzhongxinsel.png
  40. BIN
      static/images/tabBar/shebeifenbu.png
  41. BIN
      static/images/tabBar/shebeifenbusel.png
  42. BIN
      static/images/tabBar/shebeiliebiao.png
  43. BIN
      static/images/tabBar/shebeiliebiaosel.png
  44. BIN
      static/images/tabBar/shouye.png
  45. BIN
      static/images/tabBar/shouyesel.png
  46. 1334 0
      static/json/eleList.json
  47. BIN
      static/logo.png
  48. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  49. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  50. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  51. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/bazaar-city_list/index.js.map
  52. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/equip-item/equip-item.js.map
  53. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/ksp-image-cutter/ksp-image-cutter.js.map
  54. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-icons/uni-icons.js.map
  55. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-nav-bar/uni-nav-bar.js.map
  56. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-status-bar/uni-status-bar.js.map
  57. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/addafter.js.map
  58. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map
  59. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map
  60. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js.map
  61. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/equip-set.js.map
  62. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/addimg.js.map
  63. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/equip-set.js.map
  64. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/historyfile.js.map
  65. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/imgpage.js.map
  66. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/manualinput.js.map
  67. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/note.js.map
  68. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/results.js.map
  69. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map
  70. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map
  71. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map
  72. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/search.js.map
  73. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/sim/sim.js.map
  74. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/equip-set.js.map
  75. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/xyhistoryile.js.map
  76. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map
  77. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/particulars.js.map
  78. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map
  79. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/distribution/index.js.map
  80. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/contros.js.map
  81. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map
  82. 0 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequiment.js.map
  83. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequipment.js.map
  84. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gshistory.js.map
  85. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/history.js.map
  86. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map
  87. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/onedaythedata.js.map
  88. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map
  89. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/sim.js.map
  90. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map
  91. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/modification.js.map
  92. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/search.js.map
  93. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/addusers.js.map
  94. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map
  95. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/changepasswold.js.map
  96. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/index.js.map
  97. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/useroperation.js.map
  98. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/exchangeShare.js.map
  99. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/index.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/introduce.js.map

+ 9 - 1
manifest.json

@@ -69,6 +69,9 @@
                         "__platform__" : [ "android" ],
                         "appkey_ios" : "0ff73cb4d88262325eea8c8dad1a6609",
                         "appkey_android" : "0ff73cb4d88262325eea8c8dad1a6609"
+                    },
+                    "system" : {
+                        "__platform__" : [ "ios", "android" ]
                     }
                 },
                 "maps" : {
@@ -124,7 +127,12 @@
             "postcss" : false,
             "es6" : true
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "你的位置信息将用于小程序位置接口展示天气信息"
+            }
+        }
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 14 - 32
pages.json

@@ -7,14 +7,14 @@
 			"path": "pages/login/login",
 			"style": {
 				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false,
 				"navigationStyle": "custom"
 			}
 		},
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "首页"
+				"navigationBarTitleText": "首页",
+				"navigationBarBackgroundColor":"#00B075"
 			}
 		}, {
 			"path": "pages/cb/index/index",
@@ -182,14 +182,16 @@
 			"path": "pages/my/index/index",
 			"style": {
 				"navigationBarTitleText": "个人中心",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor":"#00B075"
 			}
 
 		}, {
 			"path": "pages/equipList/index",
 			"style": {
 				"navigationBarTitleText": "设备列表",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor":"#00B075"
 			}
 
 		}, {
@@ -520,26 +522,6 @@
             }
             
         }
-        ,{
-            "path" : "pages/environment/gshistory",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "管式墒情历史记录",
-                "enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-            }
-            
-        }
-        ,{
-            "path" : "pages/environment/gsequipment",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "管式墒情设备详情",
-                "enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-            }
-            
-        }
     ],
 	"condition": { //模式配置,仅开发期间生效
 		"current": 3, //当前激活的模式(list 的索引项)
@@ -569,26 +551,26 @@
 		"borderStyle": "white",
 		"list": [{
 				"pagePath": "pages/index/index",
-				"iconPath": "static/images/13.png",
-				"selectedIconPath": "static/images/12.png",
+				"iconPath": "static/images/tabBar/shouye.png",
+				"selectedIconPath": "static/images/tabBar/shouyesel.png",
 				"text": "首页"
 			},
 			{
 				"pagePath": "pages/equipList/index",
-				"iconPath": "static/images/14.png",
-				"selectedIconPath": "static/images/15.png",
+				"iconPath": "static/images/tabBar/shebeiliebiao.png",
+				"selectedIconPath": "static/images/tabBar/shebeiliebiaosel.png",
 				"text": "设备列表"
 			},
 			{
 				"pagePath": "pages/distribution/index",
-				"iconPath": "static/images/16.png",
-				"selectedIconPath": "static/images/17.png",
+				"iconPath": "static/images/tabBar/shebeifenbu.png",
+				"selectedIconPath": "static/images/tabBar/shebeifenbusel.png",
 				"text": "设备分布"
 			},
 			{
 				"pagePath": "pages/my/index/index",
-				"iconPath": "static/images/18.png",
-				"selectedIconPath": "static/images/19.png",
+				"iconPath": "static/images/tabBar/gerenzhongxin.png",
+				"selectedIconPath": "static/images/tabBar/gerenzhongxinsel.png",
 				"text": "个人中心"
 			}
 		]

+ 1 - 1
pages/afterSale/search.vue

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

+ 66 - 30
pages/cb/cbd/equip-set/imgpage.vue

@@ -7,11 +7,17 @@
 			</view>
 			<p class="tishi" v-if="tishi">暂无图片</p>
 			<view class="timeshow">
-				<view class="shuju_one_title">
-					<view :class="titleidnex==index?'title_text_color':'tltle_text'" v-for="(item,index) in titletext" :key="index"
-					 @click="changeindex(index)">
-						{{item}}
+				<view class="selecttimes" @click="tiemshow=!tiemshow">
+					<view class="timesbox">
+						<image
+							:src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+							mode=""></image>
+						<p>{{timetab(timestate)}}</p>
+						<p class="or">~</p>
+						<p>{{timetab(timeend)}}</p>
+						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
 				</view>
 				<view class="paizhao" @click="clickRight">
 					<u-icon name="camera" color="#000" size="45"></u-icon>
@@ -27,7 +33,7 @@
 						<view class="icon_box" @click="delimg(item.id)">
 							<p class="iconfont icon-shanchu">删除</p>
 						</view>
-						<view class="icon_box" @click="shibie(item.id)">
+						<view class="icon_box" @click="shibie(item.id,item.addr)">
 							<p class="iconfont icon-shibie">识别</p>
 						</view>
 						<view class="icon_box" @click="tongji(item)">
@@ -70,8 +76,8 @@
 				self:true,
 				isTop:false,
 				resultdata:{},
-				titletext: ["24小时","近一个月", "近半年", "近一年"],
-				titleidnex:0
+				titleidnex:0,
+				tiemshow:false
 			}
 		},
 		methods: {
@@ -166,10 +172,10 @@
 					}
 				});
 			},
-			shibie(id) { //识别
+			shibie(id,addr) { //识别
 				// this.discern(id)
 				uni.navigateTo({
-					url: "./results?id="+id
+					url: "./results?id="+id+"&addr="+addr
 				})
 			},
 			tongji(item) { //统计
@@ -202,26 +208,22 @@
 					duration: 500
 				})
 			},
-			changeindex(index){
+			tiemchange(e){
 				this.imglists=[]
 				this.page =1
-				this.titleidnex = index
-				var newtime = new Date()
-				this.timeend = +new Date(newtime)/1000
-				if(index == 0){
-					this.timestate = (newtime - 60 * 60 * 24*1000)/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}else if(index == 1){
-					this.timestate = (newtime.setMonth(newtime.getMonth() - 1))/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}else if(index == 2){
-					this.timestate = (newtime.setMonth(newtime.getMonth() - 6))/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}else if(index == 3){
-					this.timestate = (newtime.setFullYear(newtime.getFullYear() - 1))/1000
-					this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-				}
-			}
+				console.log(e)
+				this.timestate = +new Date(e.startDate) / 1000
+				this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60
+				this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
+			},
+			timetab(e) {
+				e = new Date(e * 1000)
+				var year = e.getFullYear()
+				var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
+				var time = year + "/" + month + "/" + day
+				return time
+			},
 		},
 		onLoad(option) {
 			console.log(option)
@@ -259,15 +261,49 @@
 	}
 
 	.timeshow {
-		width: 96%;
-		height: 50rpx;
+		width: 100%;
+		height: 80rpx;
 		background-color: #FFFFFF;
 		position: fixed;
 		top: 84px;
-		left: 2.5%;
+		left: 0;
 		display: flex;
 		z-index: 100;
 		padding-top: 10px;
+		.selecttimes {
+			width: 85%;
+			z-index: 100;
+			background-color: #fff;
+			.timesbox {
+				display: flex;
+				width: 95%;
+				margin: 0 auto;
+				justify-content: space-around;
+				box-shadow: 0 0 10rpx #bcb9ca;
+				padding: 10rpx 20rpx;
+				box-sizing: border-box;
+				image {
+					width: 30rpx;
+					height: 30rpx;
+					margin-top: 6rpx;
+				}
+		
+				.icon {
+					color: #949494;
+					text-align: right;
+					margin-left: 30rpx;
+		
+				}
+			}
+			/deep/.u-calendar__action {
+				display: flex;
+				justify-content: space-around;
+			
+				.u-calendar__action__text {
+					line-height: 25px;
+				}
+			}
+		}
 		.paizhao{
 			position: absolute;
 			top: 28rpx;

+ 12 - 4
pages/cb/cbd/equip-set/results.vue

@@ -27,9 +27,12 @@
 	export default {
 		data() {
 			return {
-				resuils:{},
+				resuils:{
+					image:""
+				},
 				id:"",
 				imgbg:false,
+				addr:""
 			}
 		},
 		methods: {
@@ -39,7 +42,9 @@
 					url: '/api/api_gateway?method=forecast.forecast_system.equip_photo_discern',
 					data: {
 						img_id: this.id,
-						ret: ret
+						ret: ret,
+						device_type: "cbd",
+						identify_model: "A"
 					}
 				})
 				console.log(res)
@@ -51,12 +56,14 @@
 					this.resuils = res
 					this.imgbg =false
 				}else{
+					this.resuils.image = this.addr
+					console.log(this.resuils)
+					this.imgbg = false
 					uni.showToast({
-						title: '识别失败!',
+						title: '识别无结果!',
 						duration: 2000,
 						icon:"none"
 					});
-					this.imgbg =false
 				}
 			},
 			anew(){
@@ -75,6 +82,7 @@
 		},
 		onLoad(option) {
 			this.id = option.id
+			this.addr = option.addr
 			this.discern("see")
 		}
 	}

+ 7 - 7
pages/cb/equip-detail/equip-detail.vue

@@ -78,12 +78,12 @@
 			<p>实时数据</p>
 			<p class="span" @click="partClicks" v-if="equipInfo.type!=4">历史数据>>></p>
 		</view>
-		<view class="newtishi" v-if="!newtishitf && !dataloadingtf">
-			暂无数据
-		</view>
 		<view class="newtishi" v-if="dataloadingtf">
 			<p class="dataloading">加载中</p>
 		</view>
+		<view class="newtishi" v-else-if="newtishitf">
+			暂无数据
+		</view>
 		<view class="newState" v-else>
 			<view class="item" v-for="item in curState">
 				<view class="item_info_img">
@@ -556,16 +556,16 @@
 						device_id: this.equipInfo.imei || this.equipInfo.device_id,
 						page: 1,
 						page_size: 1,
+						start_time: Math.floor((+new Date()-24*60*60*1000)/1000),
+						end_time: Math.floor((+new Date())/1000)
 					}
 				})
 				this.dataloadingtf = false
-				console.log(res)
-				console.log(1222)
 				if (res.counts != 0) {
 					this.newState = res.data[0].d_h_t
-					this.newtishitf = true
-				} else {
 					this.newtishitf = false
+				} else {
+					this.newtishitf = true
 				}
 			},
 			partClick(path) {

+ 47 - 1
pages/cb/index/index.vue

@@ -31,12 +31,24 @@
 							<view class="date">
 								<p>设备ID:{{item.imei||item.device_id}}</p>
 								<p>最新上报时间:{{item.addtime|timeFormat}}</p>
+								<view class="" style="display: flex;justify-content: space-between;" v-if="device_type == 3 || device_type==7">
+									<p>设备到期情况:<span
+											:class="'prevents_item_bot_sapn'+item.device_expire">{{item.device_expiretext}}</span>
+									</p>
+									<!-- v-if="item.device_expire!=0" -->
+									<p style="color: #3C84FE;" v-if="item.device_expire!=0"  @click.stop="examine(item)">查看详情</p>
+								</view>
 							</view>
 						</equipItem>
 					</template>
 				</view>
 			</view>
 		</view>
+		<u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{'text-align':'left','padding-left':'10px','font-weight':700}" :mask-close-able="true">
+			<view class="slot-content">
+				<rich-text :nodes="content"></rich-text>
+			</view>
+		</u-modal>
 		<view class="top">
 			<view class="backtop" @click="top" v-if="isTop">
 				<image src="../../../static/images/1.png" mode="" class="img0"></image>
@@ -98,6 +110,10 @@
 				filtrateTF:false,
 				device_status:"",
 				loadingtf:false,//设备列表加载中
+				device_type:"3",
+				show: false,
+				title: "",
+				content: "",
 			}
 		},
 		onLoad() {
@@ -193,6 +209,15 @@
 				this.loadingtf =false
 				console.log(res)
 				this.equipArr[act].list = [...this.equipArr[act].list, ...res.data]
+				for (var i = 0; i < this.equipArr[act].list.length; i++) {
+					if (this.equipArr[act].list[i].device_expire == 0) {
+						this.equipArr[act].list[i]['device_expiretext'] = "未到期"
+					} else if (this.equipArr[act].list[i].device_expire == 1) {
+						this.equipArr[act].list[i]['device_expiretext'] = "已到期"
+					} else if (this.equipArr[act].list[i].device_expire == 2) {
+						this.equipArr[act].list[i]['device_expiretext'] = "即将到期"
+					}
+				}
 				console.log(this.equipArr[act].list)
 			},
 			async getxyEquipList(act) {
@@ -214,6 +239,7 @@
 			tabClick(index) {
 				this.active = index;
 				this.device_id = this.equipArr[index].type
+				this.device_type = this.equipArr[index].type
 			},
 			clickRight() {
 				uni.navigateTo({
@@ -279,7 +305,27 @@
 					this.getEquipList(this.active)
 				}
 				this.filtrateTF = !this.filtrateTF
-			}
+			},
+			examine(e) {
+				// console.log(this)
+				this.show = true
+				this.title = e.device_expiretext
+				this.content = `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间  ${this.timezhuan(e.device_expire_time)}
+				</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`
+			},
+			timezhuan(time) {
+				function fun(a) {
+					return String(a).length == 1 ? '0' + a : a
+				}
+				let date = new Date(time * 1000)
+				let y = date.getFullYear()
+				let m = date.getMonth() + 1
+				let d = date.getDate()
+				let h = date.getHours()
+				let min = date.getMinutes()
+				let sec = date.getSeconds()
+				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
+			},
 		},
 		components: {
 			equipItem,

+ 103 - 128
pages/distribution/index.vue

@@ -3,8 +3,8 @@
 		<view class="page-body">
 			<view class="utabs">
 				<view style="width: 95%;margin: 0 auto;">
-					<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" item-width="140" font-size="24" gutter="20"
-					 bar-width="60" active-color="#42b983"></u-tabs>
+					<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" item-width="140"
+						font-size="24" gutter="20" bar-width="60" active-color="#42b983"></u-tabs>
 				</view>
 			</view>
 			<view class="LocationAndDetails">
@@ -14,8 +14,16 @@
 				</view>
 			</view>
 			<view class="page-section page-section-gap">
-				<map class="map" scale="3" :markers="covers" :enable-zoom="true"
-				 @markertap="markertap" >
+				<map class="map" :markers="covers" scale="3" @markertap="markertap">
+					<cover-view slot="callout">
+						<block v-for="(item,index) in covers" :key="index">
+							<cover-view class="customCallout" :marker-id="item.id">
+								<cover-view class="content">
+									{{item.title}}
+								</cover-view>
+							</cover-view>
+						</block>
+					</cover-view>
 				</map>
 			</view>
 		</view>
@@ -28,15 +36,14 @@
 				id: 0, // 使用 marker点击事件 需要填写id
 				title: 'map',
 				covers: [],
-				list: [{
-					name: "全部"
-				}],
+				list: [],
 				current: 0,
-				icon: [{
-						id: '', //全部
-						url: "../../static/images/distribution/7610e3983eb33ed5b9ad72ebdfc8ed2.png",
-						name: "全部"
-					},
+				icon: [
+					// {
+					// 	id: '', //全部
+					// 	url: "../../static/images/distribution/7610e3983eb33ed5b9ad72ebdfc8ed2.png",
+					// 	name: "全部"
+					// },
 					{
 						id: 2, //杀虫灯
 						url: "../../static/images/distribution/1bd535eb7dbb0809940030d40c64b4c.png",
@@ -55,7 +62,7 @@
 					{
 						id: 5, //环境检测
 						url: "../../static/images/distribution/8325b1b6079456ce43f952ce13d2919.png",
-						name: "环境测"
+						name: "环境测"
 					},
 					{
 						id: 6, //监控设备
@@ -73,7 +80,7 @@
 						name: "性诱2.0"
 					},
 				],
-				type: '', //设备类型
+				type: '5', //设备类型
 				typeindex: null, //设备选择
 				device_id: '', //设备号
 				serTF: false, //设备搜索显示隐藏
@@ -81,68 +88,17 @@
 				punctuation_id: "", //点击标点的id
 				punctuation_did: '',
 				punctuation_type: '',
-				listindex:1,//以选择设备名称
-				disstyle:{
-					position:"absolute",
-					bottom:"0rpx"
+				listindex: 1, //以选择设备名称
+				disstyle: {
+					position: "absolute",
+					bottom: "0rpx"
 				},
-				facilitydatas:[],
+				facilitydatas: [],
 			}
 		},
 		onLoad() {
 			this.device_id = ""
-			this.list = [{
-					name: "全部"
-				}]
-			uni.getStorage({
-				key: "jurisdiction",
-				success: (res) => {
-					console.log(JSON.parse(res.data))
-					var res = JSON.parse(res.data)
-					for (var i = 0; i < res.length; i++) {
-						switch (res[i].purview_name) {
-							case "测报系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name=="虫情测报灯"?"测报灯":res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-							case "监控系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-							case "环境监测系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-							case "防治系统":
-								for (var j = 0; j < res[i].children.length; j++) {
-									var obj = {
-										name: res[i].children[j].purview_name
-									}
-									this.list.push(obj)
-								}
-								break;
-						}
-					}
-					for (var i = 0; i < this.icon.length; i++) {
-						if (this.list[0].name == this.icon[i].name) {
-							this.type = this.icon[i].id
-						}
-					}
-					this.history()
-				},
-			})
+			this.usertype()
 		},
 		methods: {
 			async history() { //获取分布位置
@@ -155,23 +111,31 @@
 				})
 				console.log(res)
 				this.covers = []
+				var arr = []
 				for (var i = 0; i < res.length; i++) {
-					var obj = {}
-					obj.latitude = Number(res[i].lat)
-					obj.longitude = Number(res[i].lng)
-					obj.id = parseInt(i)
-					obj.title = res[i].device_name || res[i].device_id
-					obj.width = 30
-					obj.height = 30
-					for (var j = 0; j < this.icon.length; j++) {
-						if (res[i].device_type_id == this.icon[j].id) {
-							obj.iconPath = this.icon[j].url
-						}
+					if (res[i].lat !== "" && res[i].lng !== "") {
+						// if (i < 2000) {
+							var obj = {}
+							obj.latitude = Number(res[i].lat)
+							obj.longitude = Number(res[i].lng)
+							obj.id = parseInt(i)
+							obj.title = res[i].device_name || res[i].device_id
+							obj.width = 30
+							obj.height = 30
+							obj.joinCluster = true
+							// for (var j = 0; j < this.icon.length; j++) {
+							// 	if (res[i].device_type_id == this.icon[j].id) {
+							// 		obj.iconPath = this.icon[j].url
+							// 	}
+							// }
+							// this.covers.push(obj)
+							arr.push(obj)
+						// }
 					}
-					this.covers.push(obj)
 				}
+				this.covers = arr
 				this.facilitydatas = res
-				if(res.length == 0){
+				if (res.length == 0) {
 					uni.showToast({
 						title: '未查询到设备',
 						duration: 2000,
@@ -179,17 +143,38 @@
 					});
 				}
 			},
+			async usertype() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.user_device_type',
+				})
+
+				for (var i = 0; i < res.length; i++) {
+					if (res[i].type_name == "性诱3.0" ||
+						res[i].type_name == "吸虫塔" ||
+						res[i].type_name == "病虫害可视监测" ||
+						res[i].type_name == "小麦赤霉病" ||
+						res[i].type_name == "温室大棚"
+					) {
+						continue;
+					}
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id
+					}
+					this.list.push(obj)
+				}
+				this.type = this.list[0].id
+				this.history(this.device_id)
+				// console.log(this.list)
+			},
 			change(index) {
 				console.log(index)
+				this.device_id = ""
 				this.current = index
-				if (index == 0) {
-					this.type = ''
-				}else{
-					for (var i = 0; i < this.icon.length; i++) {
-						if (this.list[index].name == this.icon[i].name) {
-							console.log(this.icon[i].id)
-							this.type = this.icon[i].id
-						}
+				for (var i = 0; i < this.icon.length; i++) {
+					if (this.list[index].name == this.icon[i].name) {
+						console.log(this.icon[i].id)
+						this.type = this.icon[i].id
 					}
 				}
 				this.history()
@@ -201,17 +186,17 @@
 				this.punctuation_did = this.facilitydatas[e.detail.markerId].d_id
 				this.punctuation_type = this.facilitydatas[e.detail.markerId].device_type_id
 				uni.showModal({
-				    title: '设备详情查询',
-				    content: "设备id:"+this.device_id,
-					cancelText:"取消",
-					confirmText:"设备详情",
-				    success:(res)=> {
-				        if (res.confirm) {
+					title: '设备详情查询',
+					content: "设备id:" + this.device_id,
+					cancelText: "取消",
+					confirmText: "设备详情",
+					success: (res) => {
+						if (res.confirm) {
 							this.eqinfo(this.facilitydatas[e.detail.markerId])
-				        } else if (res.cancel) {
+						} else if (res.cancel) {
 							// this.serTFs()
-				        }
-				    }
+						}
+					}
 				});
 			},
 			serTFs() {
@@ -231,36 +216,19 @@
 								url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item)
 							})
 							break;
-						// case 3:
-							
-						// case 4:
-						// 	uni.navigateTo({
-						// 		url: "../cb/xy/equip-set/xyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
-						// 	})
-						// 	break;
 						case 5:
 							uni.navigateTo({
-								url: "../environment/equipment?shebei=" +JSON.stringify(item)
+								url: "../environment/equipment?shebei=" + JSON.stringify(item)
 							})
 							break;
-						// case 6:
-						// 	// uni.navigateTo({
-						// 	// 	url: "../prevention/ucharts?d_id=" + this.punctuation_did + "&device_id=" + this.punctuation_id
-						// 	// })
-						// 	break;
-						// case 7:
-						// 	uni.navigateTo({
-						// 		url: "../cb/bzy/equip-set/bzyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
-						// 	})
-						// 	break;
 						case 10:
 							uni.navigateTo({
-								url:"../cb/xy2.0/particulars?info=" +  JSON.stringify(item)
+								url: "../cb/xy2.0/particulars?info=" + JSON.stringify(item)
 							})
 							break;
 						default:
 							uni.navigateTo({
-								url: "../cb/equip-detail/equip-detail?info=" +  JSON.stringify(item)
+								url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
 							})
 							break;
 					}
@@ -279,11 +247,13 @@
 		z-index: 100;
 		background-color: #FFFFFF;
 	}
-	.LocationAndDetails{
+
+	.LocationAndDetails {
 		width: 100%;
 		height: 60rpx;
 		position: fixed;
 		top: 54px;
+
 		.search_bot_input {
 			width: 90%;
 			height: 54rpx;
@@ -293,6 +263,7 @@
 			box-sizing: border-box;
 			padding-top: 8rpx;
 			margin: 0 auto;
+
 			input {
 				width: 85%;
 				// text-indent: 1rem;
@@ -300,13 +271,14 @@
 				padding-left: 40rpx;
 				box-sizing: border-box;
 			}
-		
+
 			.icon {
 				position: absolute;
 				top: 8rpx;
 				right: 26rpx;
 			}
 		}
+
 		// .Location{
 		// 	display: flex;
 		// 	margin-top: 20rpx;
@@ -332,21 +304,25 @@
 		// 	}
 		// }
 	}
+
 	.page-section {
 		margin-top: 100px;
 		height: 80vh;
+
 		// position: fixed;
 		// top: 144px;
-		.map{
+		.map {
 			width: 100%;
 			height: 100%;
 		}
 	}
+
 	.particulars {
 		width: 100%;
 		height: 160rpx;
 		position: absolute;
 		bottom: 0;
+
 		.search_btn_top {
 			width: 100%;
 			height: 80rpx;
@@ -355,11 +331,12 @@
 			padding-left: 30rpx;
 			box-sizing: border-box;
 		}
+
 		.search_btn_bot {
 			width: 100%;
 			display: flex;
 		}
-		
+
 	}
 
 	.distri_ser {
@@ -369,6 +346,7 @@
 		width: 100%;
 		height: 440rpx;
 		background-color: #FFFFFF;
+
 		.distri_ser_input {
 			width: 90%;
 			margin: 20rpx auto;
@@ -449,6 +427,3 @@
 		}
 	}
 </style>
-
-
-

+ 55 - 1
pages/environment/index.vue

@@ -36,6 +36,12 @@
 						<view class="prevents_item_bot">
 							<p>设备 ID:{{item.equip_id || item.device_id}}</p>
 							<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
+							<view class="" style="display: flex;justify-content: space-between;">
+								<p>设备到期情况:<span
+										:class="'prevents_item_bot_sapn'+item.device_expire">{{item.device_expiretext}}</span>
+								</p>
+								<p style="color: #3C84FE;" v-if="item.device_expire!=0" @click.stop="examine(item)">查看详情</p>
+							</view>
 						</view>
 					</view>
 					<view class="" v-if="side_type == 15">
@@ -53,6 +59,11 @@
 				</view>
 			</view>
 		</view>
+		<u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{'text-align':'left','padding-left':'10px','font-weight':700}" :mask-close-able="true">
+			<view class="slot-content">
+				<rich-text :nodes="content"></rich-text>
+			</view>
+		</u-modal>
 		<view class="top" v-if="side_type==5">
 			<view class="backtop" @click="top" v-if="isTop">
 				<image src="../../static/images/1.png" mode="" class="img0"></image>
@@ -102,6 +113,9 @@
 				],
 				active:0,//tab选中的下标
 				side_type:5,//当前选中的设备类型
+				show: false,
+				title: "",
+				content: ""
 			}
 		},
 		methods: {
@@ -131,6 +145,15 @@
 				})
 				this.loadingtf = false
 				this.eqlistdata = this.eqlistdata.concat(res.ids)
+				for (var i = 0; i < this.eqlistdata.length; i++) {
+					if (this.eqlistdata[i].device_expire == 0) {
+						this.eqlistdata[i]['device_expiretext'] = "未到期"
+					} else if (this.eqlistdata[i].device_expire == 1) {
+						this.eqlistdata[i]['device_expiretext'] = "已到期"
+					} else if (this.eqlistdata[i].device_expire == 2) {
+						this.eqlistdata[i]['device_expiretext'] = "即将到期"
+					}
+				}
 				console.log(res.ids)
 			},
 			clickRight() {
@@ -195,7 +218,27 @@
 					this.eqlistdata = []
 					this.tubulareqlist()
 				}
-			}
+			},
+			examine(e) {
+				// console.log(this)
+				this.show = true
+				this.title = e.device_expiretext
+				this.content = `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间  ${this.timezhuan(e.device_expire_time)}
+				</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`
+			},
+			timezhuan(time) {
+				function fun(a) {
+					return String(a).length == 1 ? '0' + a : a
+				}
+				let date = new Date(time * 1000)
+				let y = date.getFullYear()
+				let m = date.getMonth() + 1
+				let d = date.getDate()
+				let h = date.getHours()
+				let min = date.getMinutes()
+				let sec = date.getSeconds()
+				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
+			},
 		},
 		onLoad() {
 			this.eqlist()
@@ -357,6 +400,17 @@
 				margin-top: 20rpx;
 				font-size: 26rpx;
 				color: #BDBDBD;
+				.prevents_item_bot_sapn0 {
+					color: #00B075;
+				}
+				
+				.prevents_item_bot_sapn1 {
+					color: #FF4747;
+				}
+				
+				.prevents_item_bot_sapn2 {
+					color: #FFAB00;
+				}
 			}
 		}
 	}

+ 271 - 108
pages/equipList/index.vue

@@ -1,39 +1,69 @@
 <template>
 	<view>
-		<view class="utabs_box" >
-			<view class="search_bot_input">
-				<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinput"/>
-				<u-icon name="search" size="36" class="icon" @click="search" color="#949494"></u-icon>
+		<!-- <view class="status_bar"></view>
+		<view style="position: fixed;top:44px;z-index: 100;width: 100%;">
+			<uni-nav-bar right-icon="search" title="设备列表" @clickRight="clickRight"></uni-nav-bar>
+			
+		</view> -->
+		<view class="textbox">
+			<view class="inputs">
+				<!-- <u-input v-model="imports" type="text" :border="true" /> -->
+				<u-search placeholder="请输入设备ID" v-model="imports" placeholder-color="#909696" :show-action="false"
+					search-icon-color="#909696">
+				</u-search>
+				<!-- <input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinput"
+					class="inputbox" :clearable="false" />
+				<u-icon name="search" size="40" class="icon" @click="search"></u-icon> -->
 			</view>
-			<view class="utabs">
-				<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 class="listbox">
+				<view class="listbox_left">
+					<view :class="currents==index?'listbox_left_item_act listbox_left_item':'listbox_left_item'"
+						v-for="item,index in list" :key="index" @click="change(index)">
+						{{item.name}}
+					</view>
+				</view>
+				<!-- <view class="list" @scroll='showOut' ref="sollo" id="list"> -->
+					<scroll-view  :scroll-top="0" :scroll-y="true" class="list scroll-Y" @scrolltoupper="upper"
+						@scrolltolower="lower" @scroll="scroll">
+						<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/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>
+							</view>
+							<view class="list_item_text">
+								<p>设备ID:{{item.imei || item.device_id}}</p>
+								<p>适配用户:{{item.real_name==''?"无":item.real_name}}</p>
+								<p>最新上报时间:{{item.addtime|timeFormat()}}</p>
+								<p>添加设备时间:{{item.uptime|timeFormat()}}</p>
+								<p>设备已运行:{{item.days}}天</p>
+							</view>
+							<view class="list_item_btn" v-if="infoalter" @click.stop="modification(item)">
+								信息修改
+							</view>
+						</view>
+					</scroll-view>
+					
+				<!-- </view> -->
 			</view>
 		</view>
-		<view class="list">
-			<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/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>
-				</view>
-				<view class="list_item_text">
-					<p>设备ID:{{item.imei||item.device_id}}</p>
-					<p>适配用户:{{item.real_name==''?"无":item.real_name}}</p>
-					<p>最新上报时间:{{item.addtime|timeFormat()}}</p>	
-					<p>添加设备时间:{{item.uptime|timeFormat()}}</p>
-					<p>设备已运行:{{item.days}}天</p>
-				</view>
-				<view class="list_item_btn" v-if="infoalter" @click.stop="modification(item)">
-					信息修改
-				</view>
+
+		<!-- <view class="utabs_box">
+			<view class="utabs">
+				<u-tabs :list="list" :is-scroll="true" :current="currents" @change="change" item-width="140"
+					font-size="24" gutter="20" bar-width="60" active-color="#42b983" v-if="list.length"></u-tabs>
 			</view>
+		</view> -->
+		<view class="loading" v-if="loadingtf">
+			<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
 		</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>
@@ -48,40 +78,22 @@
 			return {
 				list: [],
 				current: 0,
+				currents: 0,
 				page: 1,
 				size: 10,
 				eqlistdata: [],
 				isTop: false,
 				infoalter: false, // 权限设置,
 				type_id: 0, //设备类型,
-				imgpath:[],
-				imports:""
+				imgpath: [],
+				loadingtf: false,
+				width: 0, //顶部搜索栏宽度
+				imports: "" //搜索设备ID
 			}
 		},
 		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) { //设备列表
+				this.loadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
 					data: {
@@ -91,10 +103,11 @@
 						device_id: this.imports,
 					}
 				})
+				this.loadingtf = false
 				var newtime = +new Date() / 1000
-				if(tf){
+				if (tf) {
 					this.eqlistdata = this.eqlistdata.concat(res.data)
-				}else{
+				} else {
 					this.eqlistdata = res.data
 				}
 				for (var i = 0; i < this.eqlistdata.length; i++) {
@@ -104,6 +117,7 @@
 				console.log(res)
 			},
 			async xyeqlist(tf) { //设备列表
+				this.loadingtf = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
 					data: {
@@ -113,10 +127,11 @@
 						device_id: this.imports,
 					}
 				})
+				this.loadingtf = false
 				var newtime = +new Date() / 1000
-				if(tf){
+				if (tf) {
 					this.eqlistdata = this.eqlistdata.concat(res.data)
-				}else{
+				} else {
 					this.eqlistdata = res.data
 				}
 				for (var i = 0; i < this.eqlistdata.length; i++) {
@@ -126,7 +141,7 @@
 				console.log(res)
 			},
 			//camera.camera_manage.list_camera
-			async camera() { //设备列表
+			async camera() { //监控
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=camera.camera_manage.list_camera',
 					data: {
@@ -135,17 +150,53 @@
 				})
 				this.accessToken = res.accessToken
 			},
+			// homes.user_device_type
+			async usertype() { //设备列表
+				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++) {
+					if(res[i].type_name == "性诱3.0" ||
+					   res[i].type_name == "吸虫塔" ||
+					   res[i].type_name == "病虫害可视监测" ||
+					   res[i].type_name == "小麦赤霉病" ||
+					   res[i].type_name == "温室大棚" 
+					   ){
+						continue;
+					}
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id
+					}
+					this.list.push(obj)
+				}
+				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()
+					}
+				}
+			},
 			change(index) { //头部导航栏的点击
+				this.imports = ""
 				this.current = index
+				this.currents = index
 				this.page = 1
 				this.eqlistdata = []
 				this.type_id = this.list[index].id
-				if (this.type_id == 10) {
+				if (this.list[index].id == 10) {
 					this.xyeqlist()
 				} else {
 					this.eqlist()
 				}
 			},
+			clickRight() { //搜索
+				this.width = '90%'
+			},
 			modification(item) {
 				uni.navigateTo({
 					url: "./modification?data=" + JSON.stringify(item) + "&id=" + this.type_id,
@@ -157,26 +208,6 @@
 					duration: 500
 				})
 			},
-			searchinput(){
-				Debounce(() => {
-					this.eqlistdata = []
-					this.page = 1
-					if (this.type_id == 10) {
-						this.xyeqlist()
-					} else {
-						this.eqlist()
-					}
-				}, 1000)()
-			},
-			search(){
-				this.eqlistdata = []
-				this.page = 1
-				if (this.type_id == 10) {
-					this.xyeqlist()
-				} else {
-					this.eqlist()
-				}
-			},
 			historys(item) {
 				switch (this.type_id) {
 					case 2:
@@ -215,6 +246,44 @@
 							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
 						})
 						break;
+					case 7:
+						item.type = this.type_id
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
+						})
+						break;
+					case 13:
+						console.log(item)
+						var obj = {}
+						obj.d_id = item.d_id
+						obj.device_id = item.imei
+						obj.is_online = item.is_online
+						obj.lat = item.lat
+						obj.lng = item.lng
+						obj.equip_name = item.device_name
+						obj.uptime = item.addtime
+						uni.navigateTo({
+							url: "../waterandfer/datails?shebei=" + JSON.stringify(obj)
+						})
+						break;
+					case 15:
+						console.log(item)
+						var obj = {}
+						obj.d_id = item.d_id
+						obj.device_id = item.imei
+						obj.is_online = item.is_online
+						obj.lat = item.lat
+						obj.lng = item.lng
+						obj.equip_name = item.device_name
+						obj.uptime = item.addtime
+						uni.navigateTo({
+							url: "../environment/gsequipment?shebei=" + JSON.stringify(obj)
+						})
+						break;
+					case 17:
+						break;
+					case 18:
+						break;
 					default:
 						item.type = this.type_id
 						uni.navigateTo({
@@ -222,14 +291,54 @@
 						})
 						break;
 				}
-			}
+			},
+			search() { //搜索
+				this.eqlistdata = []
+				this.page = 1
+				if (this.list[this.currents].id == 10) {
+					this.xyeqlist()
+				} else {
+					this.eqlist()
+				}
+			},
+			searchinput() {
+				Debounce(() => {
+					this.eqlistdata = []
+					this.page = 1
+					if (this.list[this.currents].id == 10) {
+						this.xyeqlist()
+					} else {
+						this.eqlist()
+					}
+				}, 1000)()
+			},
+			scrollTop(e) {
+				console.log(e)
+			},
+			upper(){
+				
+			},
+			lower(){
+				console.log(11)
+				this.page++
+				if (this.type_id == 10) {
+					this.xyeqlist(true)
+				} else {
+					this.eqlist(true)
+				}
+			},
+			scroll(){
+				
+			},
 		},
 		onShow() {
-			// this.list=[]
+			this.list = []
 			this.camera()
-			this.current=0
-			this.usereqlisttype()
-			// console.log(this.current)
+			this.current = 0
+			this.currents = 0
+			this.page = 1
+			this.usertype()
+			this.width = 0
 			uni.getStorage({
 				key: "jurisdiction",
 				success: (res) => {
@@ -244,6 +353,7 @@
 					this.infoalter = items2[0].children.some((item) => {
 						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
 					})
+					console.log(this.infoalter)
 				},
 			})
 		},
@@ -265,50 +375,103 @@
 	}
 </script>
 <style lang="scss">
+	page {
+		background-color: #00B075;
+	}
+
 	/deep/.uni-icons {
 		font-size: 40rpx !important;
 	}
+
+	.textbox {
+		width: 100%;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+		border-top-left-radius: 80rpx;
+		border-top-right-radius: 80rpx;
+		margin-top: 30rpx;
+		background-color: #F9F9F9;
+	}
+
+	.inputs {
+		/deep/.u-content {
+			background-color: #fff !important;
+		}
+
+		/deep/.uni-input-wrapper {
+			background-color: #fff !important;
+		}
+			
+		/deep/.u-input{
+			background-color: #fff !important;
+		}
+	}
+
 	.utabs_box {
 		width: 100%;
 		position: fixed;
-		top: 0px;
+		top: 88px;
 		background-color: #FFFFFF;
 		z-index: 100;
+
 		.utabs {
 			width: 95%;
-			// margin: 64rpx auto;
-		}
-		.search_bot_input {
-			width: 90%;
-			height: 54rpx;
-			background-color: #ebebeb;
-			border-radius: 27rpx;
-			box-sizing: border-box;
-			padding-top: 4rpx;
 			margin: 0 auto;
-			position: relative;
-			input {
+		}
+	}
+
+	.loading {
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+
+		.img {
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
+
+	.listbox {
+		display: flex;
+		justify-content: space-around;
+		height: calc(100vh - 77px);
+		margin-top: 20rpx;
+
+		.listbox_left {
+			background-color: #fff;
+			padding: 20rpx;
+			width: 140rpx;
+			overflow-x: auto;
+			.listbox_left_item {
+				height: 50rpx;
 				width: 100%;
-				// text-indent: 1rem;
-				font-size: 26rpx;
-				padding-left: 40px;
+				margin-bottom: 20rpx;
+				text-align: center;
+				border-radius: 10rpx;
+				line-height: 50rpx;
+				overflow: hidden;//溢出隐藏
+				white-space: nowrap;//禁止换行
+				text-overflow: ellipsis;//...
 			}
-			.icon {
-				position: absolute;
-				top: 8rpx;
-				left: 36rpx;
+
+			.listbox_left_item_act {
+				background-color: rgba(0, 176, 117, 0.2);
+				color: #00B075;
 			}
 		}
 	}
 
 	.list {
-		width: 100%;
+		width: 70%;
 		background-color: #FDFDFD;
-		margin-top: 160rpx;
-		margin-bottom: 100rpx;
+		// margin-bottom: 100rpx;
+		overflow-y: auto;
+
 		.list_item {
-			width: 90%;
-			margin: 20rpx auto;
+			width: 100%;
+			margin: 0 auto 20rpx;
 			padding: 20rpx 20rpx;
 			box-sizing: border-box;
 			position: relative;
@@ -372,7 +535,7 @@
 				font-size: 24rpx;
 				line-height: 35rpx;
 				position: absolute;
-				top: 136rpx;
+				bottom: 15rpx;
 				right: 20rpx;
 			}
 		}

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

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

+ 3 - 3
pages/expertDiagnosis/index.vue

@@ -7,14 +7,14 @@
 			</view>
 			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/expertDiagnosis/05571341dbb0771b23d0b271764ac2e.png'" class="expertimages"></image>
 			<view class="expert_details">
-				<view class="details_item" @click="worm">
+				<!-- <view class="details_item" @click="worm">
 					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/expertDiagnosis/6612b1293fd1f45dd7ce6269a954999.png'"></image>
 					<p>虫情百科</p>
 				</view>
 				<view class="details_item" @click="virus">
 					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/expertDiagnosis/7f34f4eeba4d00819369cfa1b5ecce8.png'"></image>
 					<p>病害百科</p>
-				</view>
+				</view> -->
 				<view class="details_item" @click="exchange">
 					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/expertDiagnosis/aa6a168b9fb72b62b687a2debc04a9f.png'"></image>
 					<p>交流圈</p>
@@ -145,7 +145,7 @@
 		width: 100%;
 		height: 120rpx;
 		display: flex;
-		justify-content: space-around;
+		// justify-content: space-around;
 		margin: 20rpx 0 30rpx;
 
 		.details_item {

+ 5 - 2
pages/expertDiagnosis/introduce.vue

@@ -63,8 +63,11 @@
 				this.regexptitle = arr
 			},
 			clickLeft() {
-				uni.navigateTo({
-					url: "./wormcase?name=" + this.unititle
+				// uni.navigateTo({
+				// 	url: "./wormcase?name=" + this.unititle
+				// })
+				uni.navigateBack({
+					delta:1
 				})
 			},
 			examine(url) {

+ 2 - 2
pages/expertDiagnosis/wormcase.vue

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

+ 609 - 212
pages/index/index.vue

@@ -1,30 +1,301 @@
 <template>
-	<view class="content">
-		<u-swiper :list="list" mode="dot" class="index_uswiper" height='300'></u-swiper>
-		<view class="function">
-			<view class="function_item" v-for="(item,index) in functionimg" :key="index" @click="tabfunction(index)">
-				<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.src" mode=""></image>
-				<p>{{item.text}}</p>
+	<view>
+		<view class="weather">
+			<image :src="'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/'+weatherinfo.wea+'.png'" mode=""
+				class="weaimg"></image>
+			<view class="weatext">
+				<view class="weatext_title">
+					{{hello}}
+				</view>
+				<view class="">
+					欢迎登陆云飞智控
+				</view>
 			</view>
 		</view>
-		<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)">
-					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.src" mode=""></image>
+		<view class="weatherinfo">
+			<view class="weatherinfo_item">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/weizhi.png" mode="" class="weaimg"></image>
+				<view class="textbox">
+					{{weatherinfo.district}}
+				</view>
+			</view>
+			<view class="weatherinfo_item">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/wendu.png" mode="" class="weaimg"></image>
+				<view class="textbox">
+					{{weatherinfo.at}}℃
+				</view>
+			</view>
+			<view class="weatherinfo_item">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/shidu.png" mode="" class="weaimg"></image>
+				<view class="textbox">
+					{{weatherinfo.ah}}%RH
+				</view>
+			</view>
+			<view class="weatherinfo_item">
+				<view class="first_item">
+					PM2.5
+				</view>
+				<view class="textbox">
+					{{weatherinfo.air_pm25}}
 				</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>
+		<view class="functionbox">
+			<view class="functionbox_title">
+				功能应用
+			</view>
+			<view class="functionbox_text">
+				<view class="functionbox_text_item" v-if="jurisdiction.sqtf" @click="tabfunction(0)">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/base.png" mode="" class="itemimg"></image>
+					<view class="">
+						四情基地
+					</view>
+				</view>
+				<view class="functionbox_text_item" @click="tabfunction(1)">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/worm.png" mode="" class="itemimg"></image>
+					<view class="">
+						病虫识别
+					</view>
+				</view>
+				<view class="functionbox_text_item" v-if="jurisdiction.zjtf" @click="tabfunction(2)">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/knowledge.png" mode="" class="itemimg"></image>
+					<view class="">
+						知识百科
+					</view>
+				</view>
+				<view class="functionbox_text_item" @click="tabfunction(3)">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/aftersale.png" mode="" class="itemimg"></image>
+					<view class="">
+						售后服务
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="facilitybox">
+			<view class="facilitybox_title">
+				系统设备
+			</view>
+			<view class="facilitybox_itembox">
+				<view class="facilitybox_item" v-if="jurisdiction.cbtf" @click="tabequipment('../cb/index/index')">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/cb.png" mode="" class="itemimg"></image>
+					<view class="">
+						测报系统
+					</view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.fztf" @click="tabequipment('../prevention/index')">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/fz.png" mode="" class="itemimg"></image>
+					<view class="">
+						防治系统
+					</view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../pages/monitor/index')">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/jk.png" mode="" class="itemimg"></image>
+					<view class="">
+						监控系统
+					</view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.hjtf" @click="tabequipment('../environment/index')">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/hj.png" mode="" class="itemimg"></image>
+					<view class="">
+						环境监测
+					</view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.ggtf" @click="tabequipment('../irrigate/index')">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/guangai.png" mode="" class="itemimg"></image>
+					<view class="">
+						智能灌溉
+					</view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.sbtf" @click="tabequipment('../equipMange/index/index')">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/user.png" mode="" class="itemimg"></image>
+					<view class="">
+						用户管理
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="insectattack">
+			<view class="insectattack_title" @click="worm">
+				<view class="">
+					虫情百科
+				</view>
+				<view class="iconbox">
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+			</view>
+			<view class="insectattack_listbox">
+				<view class="insectattack_list">
+					<view class="list_box list_box1" @click="introduce(79,'虫情百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/cao.png" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								小地老虎
+							</view>
+							<view class="list_box_info_text">
+								该虫能危害百余种植物,是对农、林木幼苗危害很大的地下害虫, 在东北主要危害落叶松、红松、水曲柳、核桃楸等苗木
+							</view>
+						</view>
+					</view>
+					<view class="list_box list_box2" @click="introduce(369,'虫情百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/yee.jpg" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								草地贪夜蛾
+							</view>
+							<view class="list_box_info_text">
+								草地贪夜蛾被认为是世界上最具破坏性的害虫之一,其巨大的破坏性主要源于其“贪”的本性——贪吃、贪育、贪婪、广适、耐药。
+							</view>
+						</view>
+					</view>
+					<view class="list_box list_box3" @click="introduce(6,'虫情百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/lingc.jpg" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								棉铃虫
+							</view>
+							<view class="list_box_info_text">
+								棉铃虫具有高度多食性,可以为害20余科200多种植物,但比较喜食禾本科、锦葵科、茄科和豆科植物的花蕾和果实等繁殖器官。
+							</view>
+						</view>
+					</view>
+					<view class="list_box list_box4" @click="introduce(67,'虫情百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/ming.png" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								稻纵卷叶螟
+							</view>
+							<view class="list_box_info_text">
+								生命潜能强,寿命长,产卵期长,产卵量也多。各代雌、雄蛾比例几乎各占半数。蛾子有强烈的趋荫蔽栖息习性
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="insectattack">
+			<view class="insectattack_title" @click="virus">
+				<view class="">
+					病害百科
+				</view>
+				<view class="iconbox">
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+			</view>
+			<view class="insectattack_listbox">
+				<view class="insectattack_list">
+					<view class="list_box list_box5" @click="introduce(267,'病害百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/mai.png" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								小麦赤霉病
+							</view>
+							<view class="list_box_info_text">
+								小麦赤霉病从苗期到穗期均可发生,引起苗腐、茎基腐、秆腐和穗腐,以穗腐危害最大。湿度大时,病部均可见粉红色霉层。
+							</view>
+						</view>
+					</view>
+					<view class="list_box list_box6" @click="introduce(320,'病害百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/dadou.jpg" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								大豆根腐病
+							</view>
+							<view class="list_box_info_text">
+								初期茎基部或胚根表皮出现淡红褐色不规则的小斑,后变红褐色凹陷坏死斑,绕根茎扩展致根皮枯死
+							</view>
+						</view>
+					</view>
+					<view class="list_box list_box7" @click="introduce(292,'病害百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/yumi.png" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								玉米大斑病
+							</view>
+							<view class="list_box_info_text">
+								玉米大斑病主要为害叶片,严重时也为害叶鞘和苞叶。植株下部叶片先发病,然后向上扩展。
+							</view>
+						</view>
+					</view>
+					<view class="list_box list_box8" @click="introduce(278,'病害百科')">
+						<view class="list_boxbg">
+							<image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/dao.png" mode="" class="list_boxbg_img"></image>
+						</view>
+						<view class="list_box_xiang">
+							<view class="list_box_xiang_click">
+								详情
+							</view>
+						</view>
+						<view class="list_box_info">
+							<view class="list_box_info_name">
+								水稻稻瘟病
+							</view>
+							<view class="list_box_info_text">
+								发生于三叶前,由种子带菌所致。病苗基部灰黑,上部变褐,卷缩而死,湿度较大时病部产生大量灰黑色霉层。
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-modal v-model="show" :mask-close-able="true" title="病虫害识别" :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">
+		<view class="loading" v-if="loadTF" @touchmove.stop.prevent="moveHandle">
 			<u-loading mode="flower" size="100" :show="true"></u-loading>
 		</view>
 	</view>
 </template>
+
 <script>
 	import kpsImageCutter from "@/components/ksp-image-cutter/ksp-image-cutter.vue";
 	export default {
@@ -33,33 +304,10 @@
 		},
 		data() {
 			return {
-				loadTF: false,
-				currentPage: 'tabBar1',
-				list: [{
-					image: 'http://www.hnyfwlw.com:8006/bigdata_app/image/index/11.png'
-				}, ],
-				functionimg: [{
-						src: "/image/index/1.png",
-						text: "四情基地"
-					},
-					{
-						src: "/image/index/2.png",
-						text: "病虫识别"
-					},
-					{
-						src: "/image/index/3.png",
-						text: "专家诊断"
-					},
-					{
-						src: "/image/index/4.png",
-						text: "售后服务"
-					}
-				],
-				equipmentimg: [],
-				url: '',
-				path: '',
-				flag: 1,
-				show: false,
+				weatherinfo: {
+					wea:"晴"
+				},
+				hello: "",
 				jurisdiction: {
 					cbtf: false,
 					jktf: false,
@@ -68,19 +316,39 @@
 					sytf: false,
 					sbtf: false,
 					sqtf: false,
-					zjtf: false
+					zjtf: false,
+					ggtf:false,
 				},
-				ceshiflag: 1
+				show:false,
+				url:"",
+				loadTF:false
 			}
 		},
-		onLoad() {
-			this.getUserlogin()
-		},
-		onShow() {
-			this.loadTF = false
-			this.getUserlogin()
+		watch:{
+			url(news){
+				if(news!=""){
+					uni.pageScrollTo({
+						scrollTop: 0,
+						duration: 500
+					})
+				}
+			}
 		},
 		methods: {
+			moveHandle(){
+				return
+			},
+			async getcity(lng, lat) {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=device.device_manage.weathers',
+					data: {
+						lng: lng,
+						lat: lat
+					}
+				})
+				console.log(res)
+				this.weatherinfo = res[0]
+			},
 			async getUserlogin() {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=user.login.user_login_info',
@@ -93,39 +361,6 @@
 					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,
@@ -136,6 +371,7 @@
 					sqtf: false,
 					zjtf: false
 				}
+				console.log(res.children)
 				for (var i = 0; i < res.children.length; i++) {
 					switch (res.children[i].purview_name) {
 						case "测报系统":
@@ -162,107 +398,34 @@
 						case "专家诊断":
 							this.jurisdiction.zjtf = true
 							break;
+						case "灌溉控制系统":
+							this.jurisdiction.ggtf = true
+							break;
 					}
 				}
 			},
 			tabfunction(index) {
 				if (index == 0) {
-					if (this.jurisdiction.sqtf) {
-						uni.navigateTo({
-							url: "../fourBase/index"
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
+					uni.navigateTo({
+						url: "../fourBase/index"
+					})
 				} else if (index == 1) {
 					var that = this
 					this.show = true
 				} else if (index == 2) {
-					if (this.jurisdiction.zjtf) {
-						uni.navigateTo({
-							url: "../expertDiagnosis/index",
-
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
+					uni.navigateTo({
+						url: "../expertDiagnosis/index",
+					})
 				} else if (index == 3) {
 					uni.navigateTo({
 						url: "../afterSale/index"
 					})
 				}
 			},
-			tabequipment(index) {
-				if (index == 0) {
-					if (this.jurisdiction.cbtf) {
-						uni.navigateTo({
-							url: "../cb/index/index"
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
-				} else if (index == 1) {
-					if (this.jurisdiction.fztf) {
-						uni.navigateTo({
-							url: "../prevention/index"
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
-				} else if (index == 2) {
-					console.log(this.jurisdiction.jktf)
-					if (this.jurisdiction.jktf) {
-						uni.navigateTo({
-							url: "/pages/monitor/index"
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
-				} else if (index == 3) {
-					if (this.jurisdiction.hjtf) {
-						uni.navigateTo({
-							url: "../environment/index"
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
-				} else if (index == 4) {
-					console.log(this.jurisdiction.sbtf)
-					if (this.jurisdiction.sbtf) {
-						uni.navigateTo({
-							url: "../equipMange/index/index"
-						})
-					} else {
-						uni.showToast({
-							title: "此账号未开启此模块,如有需要,请联系管理员",
-							icon: "none"
-						})
-					}
-				} else if (index == 5) {
-					uni.showToast({
-						title: '此功能暂未开放',
-						duration: 2000,
-						icon: "none"
-					});
-				}
+			tabequipment(url) {
+				uni.navigateTo({
+					url: url
+				})
 			},
 			onok(ev) {
 				this.path = this.url
@@ -288,9 +451,11 @@
 						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
 							})
+						},
+						fail(res) {
+							console.log(res)
 						}
 					});
 				} else if (this.flag == 1) {
@@ -300,7 +465,7 @@
 					});
 					uni.uploadFile({
 						// 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', //仅为示例,非真实的接口地址
+						url: 'http://8.136.98.49:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
 						formData: {
@@ -344,77 +509,309 @@
 						this.url = res.tempFilePaths[0]
 					}
 				});
+			},
+			worm() {
+				uni.navigateTo({
+					url:"../expertDiagnosis/wormcase?name=虫情百科",
+				});
+			},
+			virus() {
+				uni.navigateTo({
+					url:"../expertDiagnosis/wormcase?name=病害百科",
+				});
+			},
+			introduce(id,title) {
+				uni.navigateTo({
+					url:"../expertDiagnosis/introduce?id=" + id + "&title=" + title
+				})
+			},
+		},
+		onLoad() {
+			console.log(this.$isneutral)
+			var time = new Date()
+			var hours = time.getHours()
+			if (hours < 12) {
+				this.hello = "上午好!"
+			} else {
+				this.hello = "下午好!"
 			}
+			uni.getLocation({
+				type: 'wgs84 ',
+				success: (res) => {
+					console.log(res)
+					this.getcity(res.longitude, res.latitude)
+				}
+			})
+			this.getUserlogin()
 		}
 	}
 </script>
-<style lang="scss">
-	.index_uswiper {
-		width: 95%;
-		margin: 0 auto;
-		border-radius: 20rpx !important;
+
+<style lang="less">
+	page {
+		background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/bg.png);
+		background-size: 100%;
+		background-repeat: no-repeat;
+		background-color: #F9F9F9;
 	}
 
-	.loading {
-		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: 100;
-		width: 100%;
-		height: 100vh;
-		background-color: rgba(0, 0, 0, 0.5);
+	.weather {
 		display: flex;
-		justify-content: center;
-		align-items: center;
+		width: 85%;
+		margin: 0 auto;
+		padding-top: 40rpx;
+
+		.weaimg {
+			width: 296rpx;
+			height: 296rpx;
+		}
+
+		.weatext {
+			width: 300rpx;
+			text-align: center;
+			font-size: 36rpx;
+			color: #fff;
+			padding-top: 60rpx;
+			margin-left: 60rpx;
+
+			.weatext_title {
+				font-size: 80rpx;
+				margin-bottom: 30rpx;
+			}
+		}
 	}
 
-	.function {
-		width: 95%;
-		margin: 20rpx auto;
+	.weatherinfo {
 		display: flex;
+		background-color: rgba(255, 255, 255, 0.2);
+		width: 85%;
+		margin: 60rpx auto;
+		padding: 30rpx;
 		justify-content: space-around;
+		border-radius: 170rpx;
 
-		.function_item {
-			width: 18%;
+		.weatherinfo_item {
 			text-align: center;
 
-			image {
-				width: 90rpx;
-				height: 90rpx;
+			.first_item {
+				height: 50rpx;
+				margin-bottom: 10rpx;
+				color: #fff;
+				line-height: 50rpx;
 			}
 
-			p {
-				font-size: 24rpx;
+			.weaimg {
+				width: 50rpx;
+				height: 50rpx;
+			}
+
+			.textbox {
+				text-align: center;
+				color: #fff;
 			}
 		}
 	}
 
-	.equipment {
-		width: 95%;
-		margin: 30rpx auto 0;
+	.functionbox {
+		width: 85%;
+		margin: 0 auto;
+		padding: 30rpx;
+		// box-sizing: border-box;
+		background-color: #fff;
+		border-radius: 30rpx;
 
-		.equipment_p {
-			width: 90%;
-			border-left: 8rpx solid #4BB85F;
-			font-weight: 700;
+		.functionbox_title {
 			padding-left: 20rpx;
-			margin-bottom: 20rpx;
+			font-size: 34rpx;
+		}
+
+		.functionbox_text {
+			display: flex;
+			justify-content: space-around;
+			margin-top: 30rpx;
+
+			.functionbox_text_item {
+				text-align: center;
+				color: #616666;
+
+				.itemimg {
+					width: 60rpx;
+					height: 60rpx;
+					margin-bottom: 20rpx;
+				}
+			}
 		}
+	}
 
-		.equipment_item {
+	.facilitybox {
+		width: 90%;
+		margin: 0 auto;
+		padding: 30rpx;
+
+		.facilitybox_title {
+			font-size: 34rpx;
+			// padding-left: 20rpx;
+		}
+
+		.facilitybox_itembox {
 			display: flex;
+			// justify-content: space-around;
 			flex-wrap: wrap;
+			margin-top: 30rpx;
+
+			.facilitybox_item {
+				width: 25%;
+				text-align: center;
+				color: #616666;
+				margin-bottom: 20rpx;
+
+				.itemimg {
+					width: 100rpx;
+					height: 100rpx;
+					margin-bottom: 20rpx;
+				}
+			}
+		}
+	}
+
+	.insectattack {
+		width: 90%;
+		margin: 0 auto;
+		padding: 30rpx;
+
+		.insectattack_title {
+			font-size: 34rpx;
+			// padding-left: 20rpx;
+			display: flex;
 			justify-content: space-between;
 
-			.equipment_item_img {
-				width: 49%;
-				margin-top: 20rpx;
+			.iconbox {
+				width: 40rpx;
+				height: 40rpx;
+				background-color: #cfd6d6;
+				color: #909696;
+				border-radius: 40rpx;
+				line-height: 40rpx;
+				text-align: center;
+				font-size: 20rpx;
+			}
+		}
+
+		.insectattack_listbox {
+			// padding: 0 20rpx;
+			overflow-x: auto;
+
+			.insectattack_list {
+				width: 1104rpx;
+				display: flex;
+				margin-top: 30rpx;
+
+				flex-wrap: wrap;
+
+				.list_box {
+					// background-color: #f00;
+					background-size: 100% 100%;
+					width: 246rpx;
+					height: 324rpx;
+					margin-right: 30rpx;
+					border-radius: 20rpx;
+					position: relative;
+					.list_boxbg{
+						width: 100%;
+						height: 100%;
+						position: absolute;
+						top: 0;
+						left: 0;
+						z-index: -1;
+						.list_boxbg_img{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.list_box_xiang {
+						width: 95%;
+						margin-top: 0rpx auto;
+						display: flex;
+						justify-content: flex-end;
+						padding-top: 20rpx;
+
+						.list_box_xiang_click {
+							padding: 8rpx 15rpx;
+							background-color: rgba(0, 0, 0, 0.2);
+							color: #fff;
+							font-size: 20rpx;
+							border-radius: 52rpx;
+						}
+					}
+
+					.list_box_info {
+						width: 90%;
+						margin: 130rpx auto 0;
+						height: 120rpx;
+						border-radius: 10rpx;
+						background-image: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.44));
+						padding: 10rpx;
+						box-sizing: border-box;
+
+						.list_box_info_name {
+							font-weight: 700;
+						}
 
-				image {
-					width: 100%;
-					height: 190rpx;
+						.list_box_info_text {
+							font-size: 18rpx;
+							overflow: hidden;
+							text-overflow: ellipsis;
+							display: -webkit-box;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 2;
+						}
+					}
 				}
+
+				// .list_box1 {
+				// 	background-image: url(../../static/images/newindex/cao.png);
+				// }
+
+				// .list_box2 {
+				// 	background-image: url(../../static/images/newindex/yee.jpg);
+				// }
+
+				// .list_box3 {
+				// 	background-image: url(../../static/images/newindex/lingc.jpg);
+				// }
+
+				// .list_box4 {
+				// 	background-image: url(../../static/images/newindex/ming.png);
+				// }
+
+				// .list_box5 {
+				// 	background-image: url(../../static/images/newindex/mai.png);
+				// }
+
+				// .list_box6 {
+				// 	background-image: url(../../static/images/newindex/dadou.jpg)
+				// }
+
+				// .list_box7 {
+				// 	background-image: url(../../static/images/newindex/yumi.png);
+				// }
+
+				// .list_box8 {
+				// 	background-image: url(../../static/images/newindex/dao.png);
+				// }
 			}
 		}
 	}
+	.loading {
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 100;
+		width: 100%;
+		height: 100vh;
+		background-color: rgba(0, 0, 0, 0.5);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 </style>

+ 104 - 131
pages/login/login.vue

@@ -1,63 +1,49 @@
 <template>
-	<view style="height: 100vh;">
-		<view class="status_bar"></view>
-		<view class="logo" >
-			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/login/8eef2e54055a5b072a5dc000919a7ae.png'" mode=""></image>
-		</view>
-		<!-- <view class="set" @click="set" v-if="setTF">
-		@longpress="logoTime"
-			<u-icon name="setting-fill" size="40" color="#72CD9C"></u-icon>
-		</view> -->
-		<form @submit="formSubmit">
-			<view class="uni-form-item uni-column">
-				<view class="username">
-					<u-icon name="account" size="36" style="margin-right:30rpx;color: #72CD9C;"></u-icon>
-					<u-input class="uni-input" name="username" v-model="formdata.username" placeholder-class="icon iconfont icon-bianji1"
-					 placeholder="请输入用户名" @blur="blur" />
-				</view>
-				<view class="passwold">
-					<u-icon name="lock" size="36" style="margin-right:30rpx;color: #72CD9C;"></u-icon>
-					<u-input v-model="formdata.passwold" type="password" :password-icon="true" :clearable="false" placeholder="请输入密码"
-					 @confirm="formSubmit" @input="passwoldddata" class="uni-input"/>
-				</view>
-				<view class="aboutpass">
-					<u-checkbox-group>
-						<u-checkbox v-model="checked" :label-disabled="false" size="28" active-color="#19be6b" icon-size="28" @change="rempass">记住密码</u-checkbox>
-					</u-checkbox-group>
-				</view>
-				<view class="uni-btn-v">
-					<button form-type="submit" @click="denglu">登 录</button>
-				</view>
-			</view>
-		</form>
+	<view>
 		<view class="bg">
-			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/login/850c9307f4ef2d7dc6db1049711ab55.jpg'" mode=""></image>
+			<image src="../../static/images/login/bg.png" mode="" class="bgimg"></image>
 		</view>
-		<!-- <view class="setbg" v-if="setbgtf">
-			<view class="mengban" @click.stop="setbgtf = !setbgtf"></view>
-			<view class="set_http">
-				<view class="set_http_top">
-					<u-icon name="close" size="40" @click="setbgtf = !setbgtf"></u-icon>
-					<p>设置服务器地址</p>
-					<u-icon name="checkbox-mark" size="40" @click="sethttp"></u-icon>
-				</view>
-				<view class="set_http_bot">
-					<p>服务器访问地址</p>
-					<view class="set_http_bot_input">
-						<input type="text" v-model="value" placeholder="请在此处输入服务器地址(http://...)" />
-						<u-icon :name="arrowtf?'arrow-up':'arrow-down'" @click="arrow"></u-icon>
+		<!-- <view class="status_bar"></view> -->
+		<view class="apptitle">
+			云飞智控
+		</view>
+		<view class="set" @click="set" v-if="setTF">
+			<u-icon name="setting-fill" size="50" color="#fff"></u-icon>
+		</view>
+		<view class="formbox">
+			<form @submit="formSubmit">
+				<view class="uni-form-item uni-column">
+					<view class="username">
+						<u-icon name="account" size="36" style="margin-right:30rpx;color: #fff;"></u-icon>
+						<u-input class="uni-input" name="username" v-model="formdata.username"
+							placeholder-class="icon iconfont icon-bianji1" placeholder="请输入用户名"
+							placeholderStyle="color:#ffffff;" color="#FFFFFF" @blur="blur" />
+					</view>
+					<view class="passwold">
+						<u-icon name="lock" size="36" style="margin-right:30rpx;color: #fff;"></u-icon>
+						<u-input v-model="formdata.passwold" type="password" :password-icon="true" :clearable="false"
+							placeholder="请输入密码" @confirm="formSubmit" @input="passwoldddata"
+							placeholderStyle="color:#fff;" suffixIconStyle="color:#fff;" color="#fff"
+							class="uni-input" />
+					</view>
+					<view class="aboutpass">
+						<u-checkbox-group>
+							<u-checkbox v-model="checked" :label-disabled="false" size="28" @change="rempass">记住密码
+							</u-checkbox>
+						</u-checkbox-group>
+					</view>
+					<view class="uni-btn-v">
+						<button form-type="submit" @click="denglu">登 录</button>
 					</view>
-					<scroll-view scroll-y="true" class="scroll-Y" v-if="arrowtf">
-						<view :id="'demo'+index" class="scroll-view-item uni-bg-red" v-for="item,index in httparr" :key="index" @click="value = item">{{item}}</view>
-					</scroll-view>
 				</view>
-			</view>
-		</view> -->
-		<!-- <u-modal title="升级中请勿随意操作" :show-confirm-button="false" v-model="showA" :content="contentA">
+			</form>
+		</view>
+		<u-modal title="升级中请勿随意操作" :show-confirm-button="false" v-model="showA" :content="contentA">
 			<view class="upgradeBox">
-				<u-line-progress v-show="isShow" active-color="#19be6b" :striped="true" :percent="percentNum" :striped-active="true"></u-line-progress>
+				<u-line-progress v-show="isShow" active-color="#19be6b" :striped="true" :percent="percentNum"
+					:striped-active="true"></u-line-progress>
 			</view>
-		</u-modal> -->
+		</u-modal>
 	</view>
 </template>
 
@@ -79,7 +65,7 @@
 				contentA: '',
 				isShow: false, //进度条
 				percentNum: 0, //在线下载进度
-				passvalue:false
+				passvalue: false
 			}
 		},
 		onLoad() {
@@ -120,67 +106,19 @@
 				})
 				console.log(res)
 				this.appName = res[0].app_name
-				// this.versions = Number(res[0].app_num.match(/\d+/g).join(""))
-				// var id = Number(plus.runtime.version.match(/\d+/g).join(""))
-				// console.log(this.versions,id)
-				// if (this.versions > id) {
-				// 	uni.showModal({
-				// 		title: '提示',
-				// 		content: '检测到有新版本,是否更新?',
-				// 		success: (res) => {
-				// 			if (res.confirm) {
-				// 				console.log('用户点击确定');
-				// 				this.showA = true
-				// 				this.isShow = true
-				// 				this.upgrade()
-				// 			} else if (res.cancel) {
-				// 				plus.runtime.quit();
-				// 				console.log('用户点击取消');
-				// 			}
-				// 		}
-				// 	})
-				// } else {
-					uni.getStorage({
-						key: 'session_key',
-						success: (res) => {
-							console.log(res)
-							if (res.data != "") {
-								uni.switchTab({
-									url: "../index/index"
-								})
-							}
-						},
-					})
+				uni.getStorage({
+					key: 'session_key',
+					success: (res) => {
+						console.log(res)
+						if (res.data != "") {
+							uni.switchTab({
+								url: "../index/index"
+							})
+						}
+					},
+				})
 				// }
 			},
-			// upgrade() {
-			// 	console.log(this.appName)
-			// 	var url = this.value + "/app_file/" + this.appName
-			// 	console.log(url)
-			// 	const downloadTask = uni.downloadFile({
-			// 		url: url, //仅为示例,并非真实的资源
-			// 		success: (res) => {
-			// 			console.log(res)
-			// 			if (res.statusCode === 200) {
-			// 				console.log('下载成功');
-			// 				console.log('安装包下载成功,即将安装:' + JSON.stringify(res, null, 4));
-			// 				plus.runtime.openFile(res.tempFilePath);
-			// 			}
-			// 		},
-			// 		fail: (err) => {
-			// 			console.log(err)
-			// 		},
-			// 		complete: (com) => {
-			// 			console.log(com)
-			// 		}
-			// 	});
-				// downloadTask.onProgressUpdate((res) => {
-				// 	this.percentNum = res.progress
-				// 	if (res.progress == 100) {
-				// 		console.log('下载完成了')
-				// 	}
-				// });
-			// },
 			async formSubmit() {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=user.login.login_user',
@@ -193,7 +131,7 @@
 				let session_key = res.session_key
 				uni.setStorage({
 					key: 'session_key',
-					
+
 					data: session_key,
 					success: () => {
 						uni.switchTab({
@@ -250,7 +188,7 @@
 			arrow() {
 				this.arrowtf = !this.arrowtf
 			},
-			denglu(){
+			denglu() {
 				if (this.passvalue) {
 					uni.setStorage({
 						key: 'user_pass',
@@ -273,6 +211,23 @@
 </script>
 
 <style lang="scss">
+	.bg{
+		width: 100%;
+		height: 100vh;
+		position: absolute;
+		top: 0;
+		left: 0;
+		.bgimg{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.apptitle{
+		font-size: 52rpx;
+		color: #fff;
+		width: 80%;
+		margin: 600rpx auto 40rpx;
+	}
 	.logo {
 		width: 100%;
 		height: 340rpx;
@@ -291,14 +246,16 @@
 	.set {
 		position: absolute;
 		right: 50rpx;
-		top: 140rpx;
+		top: 150rpx;
 	}
 
 	.bg {
 		width: 100%;
 		position: fixed;
 		bottom: 0;
+		left: 0;
 		z-index: -1;
+
 		image {
 			width: 100%;
 		}
@@ -307,7 +264,6 @@
 	/deep/.u-input__right-icon {
 		line-height: 35px !important;
 	}
-
 	.uni-form-item {
 		width: 100%;
 
@@ -317,12 +273,18 @@
 			display: flex;
 			margin-bottom: 40rpx;
 			padding-bottom: 10rpx;
-			border-bottom: 2rpx solid #C3C3C3;
-			.u-icon__icon{
+			border-bottom: 2rpx solid rgba(249,249,249,0.4);
+
+			.u-icon__icon {
 				margin-top: 17rpx;
 			}
-			.uni-input{
+
+			.uni-input {
 				width: 100%;
+				color: #fff;
+			}
+			.u-input__input{
+				color: #fff !important;
 			}
 		}
 
@@ -332,12 +294,20 @@
 			display: flex;
 			margin-bottom: 40rpx;
 			padding-bottom: 10rpx;
-			border-bottom: 2rpx solid #C3C3C3;
-			.u-icon__icon{
+			border-bottom: 2rpx solid rgba(249,249,249,0.4);
+
+			.u-icon__icon {
 				margin-top: 17rpx;
 			}
-			.uni-input{
+			/deep/.u-input__input{
+				color: #fff;
+			}
+			.uni-input {
 				width: 100%;
+				color: #fff;
+			}
+			/deep/.uicon-eye{
+				color: #fff !important;
 			}
 		}
 
@@ -348,13 +318,16 @@
 			justify-content: flex-end;
 
 			p {
-				color: #C0C0C0;
+				color: #fff;
 				font-size: 28rpx;
 			}
-
+			/deep/.uicon-checkbox-mark{
+				border-color: #FF0000;
+				// color: #f00 !important;
+			}
 			/deep/.u-checkbox__label {
 				font-size: 28rpx;
-				color: #C0C0C0;
+				color: #fff;
 				margin-right: 0;
 			}
 		}
@@ -367,12 +340,12 @@
 
 			button {
 				width: 100%;
-				height: 72rpx;
-				line-height: 75rpx;
-				background-color: #5DC18B;
+				height: 90rpx;
+				line-height: 90rpx;
 				color: #FFFFFF;
-				border-radius: 36rpx;
-				font-size: 28rpx;
+				font-size: 36rpx;
+				background-image: linear-gradient(to bottom, rgba(249,249,249,0.6), rgba(249, 249, 249, 0.1));
+				color: #5DC18B;
 			}
 		}
 	}

+ 57 - 8
pages/my/user-info/user-info.vue

@@ -30,7 +30,7 @@
 		<view class="info-item">
 			<text class="tit">我的地址</text>
 			<input type="text" v-model="location" :class="compileTF?'valinput valinput2':'valinput'"
-			 :disabled="!compileTF" />
+			 :disabled="!compileTF" @click="cutticy"/>
 		</view>
 		<view class="compile">
 			<p @click="compile" v-if="!compileTF">编辑</p>
@@ -43,7 +43,10 @@
 	export default {
 		data() {
 			return {
-				userinfos: {},
+				userinfos: {
+					image:"",
+					image2:""
+				},
 				location:'',
 				imageList: '',
 				compileTF: false,
@@ -59,16 +62,23 @@
 						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 						sourceType: ['album', 'camera'], //从相册选择
 						success: (res) => {
+							console.log(JSON.stringify(res))
+							this.userinfos.image2 = JSON.stringify(res)
 							uni.uploadFile({
-								url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+								url: 'https://wx.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 								filePath: res.tempFilePaths[0],
 								name: 'img_file',
 								formData: {
 									'user': 'test'
 								},
 								success: (uploadFileRes) => {
+									console.log(uploadFileRes)
 									this.userinfos.image = JSON.parse(uploadFileRes.data).data.src
 									this.$forceUpdate() //强制刷新视图
+								},
+								fail(res) {
+									this.userinfos.image = JSON.stringify(res)
+									console.log(55555555555)
 								}
 							});
 						}
@@ -89,6 +99,16 @@
 						email: this.userinfos.email
 					}
 				})
+				console.log(res)
+				if(!res){
+					this.compileTF = false
+					uni.removeStorage({
+						key: "location",
+					})
+					uni.navigateBack({
+						delta:1
+					})
+				}
 			},
 			compile() { //编辑按钮
 				this.compileTF = true
@@ -99,10 +119,6 @@
 					this.userinfos.city = this.location.slice(this.location.indexOf("省")+1,this.location.indexOf("市")+1)
 					this.userinfos.district = this.location.slice(this.location.indexOf("市")+1)
 					this.postusers()
-					this.compileTF = false
-					uni.redirectTo({
-						url:"../index/index"
-					})
 				}
 			},
 			verifyphone() { //手机号验证
@@ -120,7 +136,40 @@
 				} else {
 					this.emailhint = false
 				}
-			}
+			},
+			cutticy(){
+				if(this.compileTF){
+					uni.navigateTo({
+						url: "../../fourBase/city"
+					})
+				}
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=78ce288400f4fc6d9458989875c833c2&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.location = "--"
+						} else {
+							this.location = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					var lat = res.data[1]
+					var lng = res.data[0]
+					this.selectaddress(lng, lat)
+				}
+			})
 		},
 		onLoad(option) {
 			this.userinfos = JSON.parse(option.data)

+ 56 - 1
pages/prevention/index.vue

@@ -28,10 +28,22 @@
 					<view class="prevents_item_bot">
 						<p>设备 ID:{{item.imei}}</p>
 						<p>最新上报时间:{{item.addtime|timeFormat()}}</p>
+						<view class="" style="display: flex;justify-content: space-between;">
+							<p>设备到期情况:<span
+									:class="'prevents_item_bot_sapn'+item.device_expire">{{item.device_expiretext}}</span>
+							</p>
+							 <!-- v-if="item.device_expire!=0" -->
+							<p style="color: #3C84FE;" v-if="item.device_expire!=0" @click.stop="examine(item)">查看详情</p>
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
+		<u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{'text-align':'left','padding-left':'10px','font-weight':700}" :mask-close-able="true">
+			<view class="slot-content">
+				<rich-text :nodes="content"></rich-text>
+			</view>
+		</u-modal>
 		<view class="top">
 			<view class="backtop" @click="top" v-if="isTop">
 				<image src="../../static/images/1.png" mode="" class="img0"></image>
@@ -65,6 +77,9 @@
 				filtrateTF:false,
 				device_status:"",
 				loadingtf:false,//loading
+				show: false,
+				title: "",
+				content: ""
 			}
 		},
 		methods: {
@@ -81,6 +96,15 @@
 				})
 				this.loadingtf = false
 				this.eqlistdata = this.eqlistdata.concat(res.data)
+				for (var i = 0; i < this.eqlistdata.length; i++) {
+					if (this.eqlistdata[i].device_expire == 0) {
+						this.eqlistdata[i]['device_expiretext'] = "未到期"
+					} else if (this.eqlistdata[i].device_expire == 1) {
+						this.eqlistdata[i]['device_expiretext'] = "已到期"
+					} else if (this.eqlistdata[i].device_expire == 2) {
+						this.eqlistdata[i]['device_expiretext'] = "即将到期"
+					}
+				}
 				console.log(this.eqlistdata)
 			},
 			clickLeft() {
@@ -127,7 +151,27 @@
 				this.device_status = ""
 				this.eqlist()
 				this.filtrateTF = !this.filtrateTF
-			}
+			},
+			examine(e) {
+				// console.log(this)
+				this.show = true
+				this.title = e.device_expiretext
+				this.content = `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间  ${this.timezhuan(e.device_expire_time)}
+				</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`
+			},
+			timezhuan(time) {
+				function fun(a) {
+					return String(a).length == 1 ? '0' + a : a
+				}
+				let date = new Date(time * 1000)
+				let y = date.getFullYear()
+				let m = date.getMonth() + 1
+				let d = date.getDate()
+				let h = date.getHours()
+				let min = date.getMinutes()
+				let sec = date.getSeconds()
+				return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
+			},
 		},
 		onLoad() {
 			this.eqlist()
@@ -240,6 +284,17 @@
 				margin-top: 20rpx;
 				font-size: 26rpx;
 				color: #BDBDBD;
+				.prevents_item_bot_sapn0 {
+					color: #00B075;
+				}
+				
+				.prevents_item_bot_sapn1 {
+					color: #FF4747;
+				}
+				
+				.prevents_item_bot_sapn2 {
+					color: #FFAB00;
+				}
 			}
 		}
 	}

+ 1 - 1
pages/prevention/ucharts.vue

@@ -59,7 +59,7 @@
 						<tr class="tr" v-for="(items,indexs) in eqlistdata" :key="'b'+indexs" v-if="forbidden">
 							<td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
 							<td class="td">{{items.d_h_t.ds==0?"关机":"开机"}}</td>
-							<td class="td">{{items.d_h_t.ws==0?"待机":"工作"}}</td>
+							<td class="td">{{items.d_h_t.ws==0?"待机":(items.d_h_t.ws==1?"工作":"充电")}}</td>
 							<td class="td">{{items.d_h_t.rps==0?"正常":"保护"}}</td>
 							<td class="td">{{items.d_h_t.tps==0?"正常":"保护"}}</td>
 							<td class="td">{{items.d_h_t.dps==0?"正常":"保护"}}</td>

BIN
static/images/12.png


BIN
static/images/13.png


BIN
static/images/14.png


BIN
static/images/15.png


BIN
static/images/16.png


BIN
static/images/17.png


BIN
static/images/18.png


BIN
static/images/19.png


BIN
static/images/distribution/0b551e50be351dbc14f0dd6470e3443.png


BIN
static/images/distribution/1bd535eb7dbb0809940030d40c64b4c.png


BIN
static/images/distribution/2eb9e550709430a1bd8178568c14785.png


BIN
static/images/distribution/515ea6143e0aaff4a823270c7aa00a6.png


BIN
static/images/distribution/54a96e2b0ad4efeecbd4a7b5e6deda3.png


BIN
static/images/distribution/7610e3983eb33ed5b9ad72ebdfc8ed2.png


BIN
static/images/distribution/8325b1b6079456ce43f952ce13d2919.png


BIN
static/images/distribution/be5c1cfed22713a9544f020cf41c25f.png


BIN
static/images/irrigate/yinxingqia.png


BIN
static/images/login/bg.png


BIN
static/images/tabBar/gerenzhongxin.png


BIN
static/images/tabBar/gerenzhongxinsel.png


BIN
static/images/tabBar/shebeifenbu.png


BIN
static/images/tabBar/shebeifenbusel.png


BIN
static/images/tabBar/shebeiliebiao.png


BIN
static/images/tabBar/shebeiliebiaosel.png


BIN
static/images/tabBar/shouye.png


BIN
static/images/tabBar/shouyesel.png


Разлика између датотеке није приказан због своје велике величине
+ 1334 - 0
static/json/eleList.json



Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/bazaar-city_list/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/equip-item/equip-item.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/ksp-image-cutter/ksp-image-cutter.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-icons/uni-icons.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-nav-bar/uni-nav-bar.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/uni-status-bar/uni-status-bar.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/addafter.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/bzyhistoryile.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/bzy/equip-set/equip-set.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/addimg.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/equip-set.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/historyfile.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/imgpage.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/manualinput.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/note.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/results.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/search.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/sim/sim.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/equip-set.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy/equip-set/xyhistoryile.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/particulars.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/distribution/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/contros.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map


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

@@ -1 +0,0 @@
-{"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":""}

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gsequipment.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/gshistory.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/history.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/onedaythedata.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/sim.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/modification.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/search.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/addusers.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/changepasswold.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/index.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/useroperation.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/exchangeShare.js.map


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/index.js.map


+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/introduce.js.map


Неке датотеке нису приказане због велике количине промена