Kaynağa Gözat

Merge branch 'elsa-develop'

allen 13 saat önce
ebeveyn
işleme
56d7052c0f

+ 25 - 59
App.vue

@@ -1,65 +1,31 @@
 <script>
-	// export default {
-	// 	onShow: function() {
-	// 		console.log('App Show app页面')
-	// 	},
-	// 	onHide: function() {
-	// 		console.log('App Hide')
-	// 	},
-	// 	  // 分享给朋友
-	// 	  onShareAppMessage() {
-	// 	    return {
-	// 	      title: '云飞智控', // 分享标题
-	// 	      path: 'pages/index/index', // 分享路径,通常包含页面参数
-	// 	      imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg', // 分享图片,可选
-	// 	      success: (res) => {
-	// 	        // 分享成功回调
-	// 	        uni.showToast({
-	// 	          title: '分享成功',
-	// 	          icon: 'success'
-	// 	        })
-	// 	      },
-	// 	      fail: (err) => {
-	// 	        // 分享失败回调
-	// 	        console.log('分享失败', err)
-	// 	      }
-	// 	    }
-	// 	  },
-	// 	  // 分享到朋友圈(基础库2.11.3+)
-	// 	  onShareTimeline() {
-	// 	    return {
-	// 	      title:  '云飞智控', // 分享标题
-	// 	      query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
-	// 	      imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
-	// 	    }
-	// 	  }
-	// }
+
 	// App.vue
-	export default {
+	// export default {
 		
-	  onLaunch() {
-	    // 监听分享到朋友圈
-		uni.showShareMenu({
-		  withShareTicket: true,
-		  menus: ['shareAppMessage', 'shareTimeline']
-		})
-	  },
-	  onShareTimeline() {
-	    return {
-	      title:  '云飞智控', // 分享标题
-	      query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
-	      imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
-	    }
-	  },
-	  // 全局分享给朋友
-	  onShareAppMessage() {
-	    return {
-	      title: '分享标题',
-	      path: '/pages/index/index',
-	      imageUrl: '/static/logo.png'
-	    }
-	  }
-	}
+	//   onLaunch() {
+	//     // 监听分享到朋友圈
+	// 	uni.showShareMenu({
+	// 	  withShareTicket: true,
+	// 	  menus: ['shareAppMessage', 'shareTimeline']
+	// 	})
+	//   },
+	//   onShareTimeline() {
+	//     return {
+	//       title:  '云飞智控', // 分享标题
+	//       query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
+	//       imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
+	//     }
+	//   },
+	//   // 全局分享给朋友
+	//   onShareAppMessage() {
+	//     return {
+	//       title: '分享标题',
+	//       path: '/pages/index/index',
+	//       imageUrl: '/static/logo.png'
+	//     }
+	//   }
+	// }
 </script>
 <style lang="scss">
 	@import "style/font/iconfont.css";

+ 15 - 0
main.js

@@ -51,6 +51,21 @@ Vue.filter('timeFormat', function (time,fmt = 'yyyy-MM-dd hh:mm:ss') {
   return fmt;
 });
 
+Vue.filter('yfEllipsis', (content, length = 10) => {
+  if (!content) return '';
+  if (content.length > length) {
+    return content.slice(0, length) + '...';
+  }
+  return content;
+});
+Vue.prototype.yfEllipsis = function (content, length = 10) {
+  if (!content) return '';
+  if (content.length > length) {
+    return content.slice(0, length) + '...';
+  }
+  return content;
+};
+
 Vue.prototype.formatTime = function (thistime, fmt = 'yyyy-MM-dd hh:mm:ss') {
   let $this = new Date(thistime);
   let o = {

+ 35 - 15
pages.json

@@ -6,7 +6,8 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "首页",
-				"navigationBarBackgroundColor": "#00B075"
+				"navigationBarBackgroundColor": "#0BBC58",
+				"navigationStyle": "custom"
 			}
 		},
 		{
@@ -16,18 +17,14 @@
 				"enablePullDownRefresh": false
 			}
 		},
-		// {
-		// 	"path": "pages/webview",
-		// 	"style": {
-		// 		"navigationBarTitleText": "监控列表"
-		// 	}
-		// },
+
 		{
 			"path": "pages/equipList/index",
 			"style": {
-				"navigationBarTitleText": "设备列表",
+				"navigationBarTitleText": "",
 				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#00B075"
+				"navigationBarBackgroundColor": "#0BBC58",
+				"navigationStyle": "custom"
 			}
 		},
 		{
@@ -57,6 +54,18 @@
 				}
 			]
 		},
+    {
+			"root": "pages/fmSys",
+			"pages": [{
+					"path": "details",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom"
+					}
+				}
+			]
+		},
 		{
 			"root": "pages/cb/shuifeizs",
 			"pages": [{
@@ -167,6 +176,15 @@
 			}]
 		},
 		{
+			"root": "pages/webviewdgp",
+			"pages": [{
+				"path": "webview",
+				"style": {
+					"navigationBarTitleText": "监控列表"
+				}
+			}]
+		},
+		{
 			"root": "pages/disandpests",
 			"pages": [{
 				"path": "index",
@@ -286,7 +304,6 @@
 					"path": "xctset",
 					"style": {
 						"navigationBarTitleText": "设备控制"
-						// "navigationStyle": "custom"
 					}
 				}
 			]
@@ -832,7 +849,6 @@
 					"style": {
 						"navigationBarTitleText": "sim卡详情",
 						"enablePullDownRefresh": false
-						// "navigationStyle": "custom"
 					}
 				},
 				{
@@ -968,6 +984,13 @@
 						"navigationBarTitleText": "",
 						"enablePullDownRefresh": false
 					}
+				},
+				{
+					"path": "dgpImagelist",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
 				}
 			]
 		},
@@ -998,7 +1021,6 @@
 					"path": "mls/forecastResult",
 					"style": {
 						"navigationBarTitleText": "防控决策"
-						// "navigationStyle": "custom"
 					}
 				}
 			]
@@ -1018,7 +1040,6 @@
 					"style": {
 						"navigationBarTitleText": "设备位置",
 						"enablePullDownRefresh": false
-						// "navigationStyle": "custom"
 					}
 				},
 				{
@@ -1225,8 +1246,7 @@
 		}
 	],
 	"condition": {
-		//模式配置,仅开发期间生效
-		"current": 3, //当前激活的模式(list 的索引项)
+		"current": 3,
 		"list": [{
 				"name": "about",
 				"path": "pages/my/about/about"

+ 1 - 1
pages/cb/cbd/equip-set/imgpage.vue

@@ -126,7 +126,7 @@
 						device_id: this.device_id,
 						page: this.page,
 						status: "no",
-						page_number: 12,
+						page_size: 12,
 						identify_model: this.modelList[this.identify_model].value,
 						time_begin: time_begin, //开始时间
 						time_end: time_end, //结束时间

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

@@ -65,6 +65,7 @@
 					res.image = this.addr
 					if (ret == "see") {
 						this.resuils = res
+						
 					} else if (ret == "again") {
 						// this.resuils.result
 						// console.log(insect_dict)

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

@@ -19,7 +19,7 @@
 						<text>{{item.type_name}}</text>
 						<text class="bottom-line"></text>
 					</view>
-					<!-- <u-tabs :list="equipArr"  :current="active" active-color="#14A478" @change="tabClick"></u-tabs> -->
+					
 				</view>
 			</view>
 			<view class="loading" v-if="loadingtf">
@@ -458,17 +458,8 @@
 			}
 		}
 	}
-	// .tab-box {
-	// 	font-size: 30rpx;
-	// 	line-height: 80rpx;
-	// 	background-color: #ffffff;
-	// 	width: 100vw;
-	// 	z-index: 2;
-	// 	margin-top: -10rpx;		
-	// }
+
 	.tab-box {
-		// position: fixed;
-		// top: 170px;
 		font-size: 30rpx;
 		line-height: 80rpx;
 		background-color: #ffffff;

+ 10 - 5
pages/environment/history-new.vue

@@ -40,10 +40,10 @@
 					</view>
 					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
 				</view>
-				<view class="condition" v-if="scrollTF">
+				<view class="condition" >
 					<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
 						<!-- @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" -->
-						<table class="table" :style="{width:300+240*datalength+'rpx'}">
+						<table class="table" :style="{width:twidth}">
 							<tr class="tr">
 								
 								<th class="th" v-for="(item,index) in thdata" :key="index">
@@ -54,7 +54,7 @@
 							
 							</tr>
 							<tr class="tr" v-if="forbidden">
-								<td class="td" v-for="item in thdata.length">暂无数据</td>
+								<td class="td" v-for="item in Object.keys(thdata).length">暂无数据</td>
 							</tr>
 						</table>
 					</scroll-view>
@@ -79,6 +79,11 @@
 	var canvasColumnA = null;
 	var presenttime = +new Date();
 	export default {
+		computed:{
+			twidth(){
+				return 240 * Object.keys(this.thdata).length +'rpx' || 300 + 'rpx'
+			}
+		},
 		data() {
 			return {
 				cWidth: '400',
@@ -94,7 +99,7 @@
 				tiemshow: false, //选择时间
 				tishiTF: false, //提示
 				historydatas: [],
-				thdata:[],
+				thdata:{},
 				tableData:[],
 				page: 1,
 				forbidden: false,
@@ -122,7 +127,7 @@
 				this.thdata = res.title
 				console.log(res)
 
-				if (this.thdata == 0) {
+				if (this.tableData.length == 0) {
 					this.scrollTF = false
 				} else {
 					this.scrollTF = true

+ 12 - 0
pages/equipList/index.vue

@@ -524,6 +524,18 @@ export default {
             url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
           });
           break;
+        case 43:
+          uni.navigateTo({
+            url: "/pages/fmSys/details?info=" + JSON.stringify(item)
+          })
+        break;
+        case 44:
+          uni.navigateTo({
+            url: "/pages/webviewdgp/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken || uni
+              .getStorageSync('session_key') +
+              '&type=dgp'
+          })
+        break;
         case 11:
           var obj = {};
           obj.d_id = item.d_id;

+ 12 - 0
pages/equipList/search.vue

@@ -261,6 +261,18 @@
 							url: "../cb/shuifeiL/shuifeiL?detail=" + JSON.stringify(obj),
 						});
 						break;
+          case 43:
+            uni.navigateTo({
+              url: "/pages/fmSys/details?info=" + JSON.stringify(item)
+            })
+          break;
+          case 44:
+            uni.navigateTo({
+              url: "/pages/webviewdgp/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken || uni
+                .getStorageSync('session_key') +
+                '&type=dgp'
+            })
+          break;
 					case 11:
 						var obj = {};
 						obj.d_id = item.d_id;

+ 995 - 0
pages/equipList2/index.vue

@@ -0,0 +1,995 @@
+<template>
+	<view>
+
+
+		<view class="textbox">
+			<view class="inputs">
+
+				<u-search placeholder="请输入设备ID" v-model="imports" placeholder-color="#909696" :show-action="false"
+					search-icon-color="#909696" @input="searchinput">
+				</u-search>
+
+			</view>
+			
+				<view class="tab">
+					<view class="tab-content">
+						<view class="tab-box">
+							<view v-for="(item,index) in menuList" :key="index" @click="change(index)"
+								:class="['tab-item',currents==index?'active':'']">
+								<image class="img-icon" :src="$imageURL+item.icon" mode=""></image>
+								<view class="text">{{item.name}}</view>
+							</view>
+
+						</view>
+					</view>
+				</view>
+				<view class="listbox">
+				<view class="second-tab">
+					<view class="tab-box">
+						<view v-for="(item,index) in list" :key="index" @click="change(index)"
+							:class="['tab-item',currents==index?'active':'']">
+							<text>{{item.name}}</text>
+
+						</view>
+
+					</view>
+				</view>
+				<view class="third-tab">
+					<view class="third-tab-item">总计</view>
+					<view class="third-tab-item">在线</view>
+					<view class="third-tab-item">离线</view>
+				</view>
+				<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"> <span class="title">{{ (item.device_name || '--' )| yfEllipsis(7)}}</span><span class="sub-title">{{ item.only_for_show || item.device_id }}</span></p>
+							
+							<p v-if="![11, 19, 20].includes(type_id)"  class="online-status">
+								<!-- {{ item.is_online ? '在线' : '离线' }} -->
+								<image v-if="item.is_online" :src="$imageURL+'/bigdata_app/newImg/home/online.png'" mode=""></image>
+								<image v-else :src="$imageURL+'/bigdata_app/newImg/home/outline.png'" mode=""></image>
+							</p>
+						</view>
+						<view class="list_item_text">
+							
+							<p v-if="type_id == 40 || type_id == 42">
+								<span class="label">上报时间</span> {{ item.uptime }}
+							</p>
+							<p v-else><span class="label">上报时间</span>{{ item.uptime | timeFormat() }}</p>
+							<p>
+								<span class="label">设备位置</span>{{ (item.address|| '无') | yfEllipsis(16)}}
+							</p>
+						</view>
+					</view>
+				</scroll-view>
+
+				<!-- </view> -->
+			</view>
+		</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="
+          $imageURL+'/bigdata_app' +
+          '/image/6209a98f0cb3b5086f2ca36152c9269.png'
+        " mode=""></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from '../../util/anitthro.js';
+	export default {
+		data() {
+			return {
+				list: [],
+				current: 0,
+				currents: 0,
+				page: 1,
+				size: 10,
+				eqlistdata: [],
+				isTop: false,
+				device_model: 0,
+				infoalter: false, // 权限设置,
+				type_id: 0, //设备类型,
+				imgpath: [],
+				loadingtf: false,
+				width: 0, //顶部搜索栏宽度
+				imports: '', //搜索设备ID
+				menuList: [{
+					icon: '/bigdata_app/newImg/home/sqjd.png',
+					name: '四情基地',
+
+				}, {
+					icon: '/bigdata_app/newImg/home/zngg.png',
+					name: '智能灌溉',
+
+				}, {
+					icon: '/bigdata_app/newImg/home/yhgl.png',
+					name: '用户管理',
+				}, {
+					icon: '/bigdata_app/newImg/home/shfw.png',
+					name: '售后服务',
+
+				}, {
+					icon: '/bigdata_app/newImg/home/more.png',
+					name: '更多功能'
+				}, {
+					icon: '/bigdata_app/newImg/home/more.png',
+					name: '更多功能'
+				}]
+			};
+		},
+		methods: {
+			// 大棚
+			async getDpDeviceList(tf) {
+				const res = await this.$myRequest({
+					url: '/api/v2/iot/mobile/device/dpkzg/yf/list/',
+					method: 'post',
+					data: {
+						pageSize: this.size,
+						pageNum: this.page,
+					},
+				});
+				this.loadingtf = false;
+				const eqlistdata = res || [];
+				eqlistdata.forEach((item) => {
+					const newtime = +new Date() / 1000;
+					const days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+					item.device_id = item.devCode;
+					item.uptime = item.devUpdateddate;
+					item.addtime = item.devCreateddate;
+					item.device_name = item.devName;
+					item.real_name = item.realName;
+					item.is_online = item.devStatus == 1 ? true : false;
+				});
+				this.eqlistdata = eqlistdata;
+			},
+			// 水肥
+			async getDeviceList(tf) {
+				const res = await this.$myRequest({
+					url: '/api/v2/iot/mobile/device/sf/zsrf/list/',
+					method: 'post',
+					data: {
+						pageSize: this.size,
+						pageNum: this.page,
+					},
+				});
+				this.loadingtf = false;
+				const eqlistdata = res || [];
+				eqlistdata.forEach((item) => {
+					const newtime = +new Date() / 1000;
+					const days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+					item.device_id = item.devCode;
+					item.uptime = item.devUpdateddate;
+					item.addtime = item.devCreateddate;
+					item.device_name = item.devName;
+					item.real_name = item.realName;
+					item.is_online = item.devStatus == 1 ? true : false;
+				});
+				this.eqlistdata = eqlistdata;
+			},
+			async eqlist(tf) {
+				//设备列表
+				this.loadingtf = true;
+				console.log(this.type_id, 'type_idtype_id');
+				if (this.type_id == 42) {
+					this.getDpDeviceList(tf);
+					return;
+				}
+				if (this.type_id == 40) {
+					this.getDeviceList(tf);
+					return;
+				}
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: this.type_id,
+						page: this.page,
+						page_size: this.size,
+						device_id: this.imports,
+						device_model: this.device_model,
+					},
+				});
+				this.loadingtf = false;
+				if ([11, 19, 20].includes(Number(this.type_id))) {
+					var newtime = +new Date() / 1000;
+				} else {
+					var newtime = +new Date() / 1000;
+				}
+				res.data.forEach((item) => {
+					let {
+						uptime,
+						addtime
+					} = item;
+					item.uptime = addtime;
+					item.addtime = uptime;
+					var days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+				});
+				if (tf) {
+					this.eqlistdata = this.eqlistdata.concat(res.data);
+				} else {
+					this.eqlistdata = res.data;
+				}
+				console.log(this.eqlistdata);
+				// for (var i = 0; i < this.eqlistdata.length; i++) {
+				//   var days = (newtime - this.eqlistdata[i].addtime) / 60 / 60 / 24;
+				//   this.eqlistdata[i].days = Math.round(days);
+				// }
+			},
+			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: {
+						device_type_id: this.type_id,
+						page: this.page,
+						page_size: this.size,
+						device_id: this.imports,
+					},
+				});
+				this.loadingtf = false;
+				var newtime = +new Date() / 1000;
+				if (tf) {
+					this.eqlistdata = this.eqlistdata.concat(res.data);
+				} else {
+					this.eqlistdata = res.data;
+				}
+				for (var i = 0; i < this.eqlistdata.length; i++) {
+					var days = (newtime - this.eqlistdata[i].addtime) / 60 / 60 / 24;
+					this.eqlistdata[i].days = Math.round(days);
+				}
+				console.log(res);
+			},
+			//camera.camera_manage.list_camera
+			async camera() {
+				//监控
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=camera.camera_manage.list_camera',
+					data: {
+						page_size: 1,
+					},
+				});
+				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 == '温室大棚') {
+						continue;
+					}
+					var obj = {
+						name: res[i].type_name,
+						id: res[i].id,
+						device_model: res[i].device_model,
+						pur_id: res[i].pur_id,
+					};
+					this.list.push(obj);
+				}
+				console.log('设备列表11111111111111', this.list);
+				if (res.length) {
+					this.type_id = this.list[0].id;
+					this.device_model = this.list[0].device_model;
+					if (this.list[0].id == 10) {
+						this.xyeqlist();
+					} else {
+						this.eqlist();
+					}
+				}
+			},
+			change(index) {
+				console.log(index);
+				//头部导航栏的点击
+				this.imports = '';
+				this.current = index;
+				this.currents = index;
+				this.page = 1;
+				this.eqlistdata = [];
+				this.type_id = this.list[index].id;
+				this.device_model = this.list[index].device_model;
+				console.log(this.type_id);
+				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,
+				});
+			},
+			top() {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 500,
+				});
+			},
+			historys(itemOld) {
+				let item = JSON.parse(JSON.stringify(itemOld));
+				console.log('item', item, this.type_id);
+				item.pur_id = this.list[this.current].pur_id;
+				switch (this.type_id) {
+					// 水肥新设备
+					case 22:
+						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.uptime;
+						uni.navigateTo({
+							url: '../waterandfernew/details?shebei=' + JSON.stringify(obj),
+						});
+						break;
+						// 病虫害可视监测
+					case 14:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../cb/sy/detail?detail=' + JSON.stringify(item),
+						});
+						break;
+					case 2:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../prevention/equipmentdetails?shebei=' + JSON.stringify(item),
+						});
+						break;
+					case 38:
+						// console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.equip_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.uptime;
+						uni.navigateTo({
+							url: '../environment/equipment-new?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 5:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.equip_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.uptime;
+						uni.navigateTo({
+							url: '../environment/equipment?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 6:
+						uni.navigateTo({
+							url: '/pages/webview/webview?device_id=' +
+								item.imei +
+								'&accessToken=' +
+								this.accessToken,
+						});
+						break;
+					case 3:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 28:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/smallPest/smallPest?info=' + JSON.stringify(item),
+						});
+						break;
+					case 4:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 32:
+					case 33:
+					case 34:
+					case 35:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail-new?info=' +
+								JSON.stringify(item),
+						});
+						break;
+					case 7:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/equip-detail/equip-detail?info=' + JSON.stringify(item),
+						});
+						break;
+					case 8:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/thxydetail/thxydetail?imei=' + item.imei,
+						});
+						break;
+					case 29:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: `../cb/nlNewXy/nlNewXy?imei=${item.imei}&showId=${item.only_for_show}`,
+						});
+						break;
+					case 24:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/zjxydetail/thxydetail?imei=' + item.imei,
+						});
+						break;
+					case 12:
+						console.log(item);
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../cb/xctdetail/xctdetail?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.uptime;
+						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.uptime;
+						uni.navigateTo({
+							url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 17:
+						break;
+					case 18:
+						var obj = {};
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						uni.navigateTo({
+							url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
+						});
+						break;
+          case 43:
+            uni.navigateTo({
+              url: "/pages/fmSys/details?info=" + JSON.stringify(item)
+            })
+          break;
+          case 44:
+            uni.navigateTo({
+              url: "/pages/webviewdgp/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken || uni
+                .getStorageSync('session_key') +
+                '&type=dgp'
+            })
+          break;
+					case 11:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 11;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 19:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 19;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 20:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 20;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 21:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 21;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 26:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 26;
+						uni.navigateTo({
+							url: '../disease/cmb?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 27:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 26;
+						uni.navigateTo({
+							url: '../disease/mls/mls?shebei=' + JSON.stringify(obj),
+						});
+						break;
+					case 25:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: '../cb/xylps/detail?detail=' + JSON.stringify(item),
+						});
+						break;
+					default:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: '../cb/xy2.0/particulars?info=' + JSON.stringify(item),
+						});
+						break;
+					case 40:
+						item.addtime = item.uptime;
+						console.log(item, 'itemmtiemtiemtiemtie');
+						uni.navigateTo({
+							url: `../cb/shuifeizs/shuifeizs?devBid=${item.devBid}&devName=${item.devName}&devStatus=${item.devStatus}`,
+						});
+						break;
+					case 42:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: `../cb/wenshizs/wenshizs?devBid=${item.devBid}&devName=${item.device_name}&devStatus=${item.devStatus}`,
+						});
+						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() {
+				this.page++;
+				if (this.type_id == 10) {
+					this.xyeqlist(true);
+				} else {
+					this.eqlist(true);
+				}
+			},
+			scroll() {},
+		},
+		onLoad() {
+			// this.list = [];
+			// this.camera();
+			// this.current = 0;
+			// this.currents = 0;
+			// this.page = 1;
+			// this.usertype();
+			// this.width = 0;
+		},
+		onTabItemTap(e) {
+			// console.log(e);
+			this.eqlistdata = [];
+			this.list = [];
+			this.camera();
+			this.current = 0;
+			this.currents = 0;
+			this.page = 1;
+			this.usertype();
+			this.width = 0;
+		},
+		onReachBottom() {
+			this.page++;
+			if (this.type_id == 10) {
+				this.xyeqlist(true);
+			} else {
+				this.eqlist(true);
+			}
+		},
+		onPageScroll(e) {
+			//nvue暂不支持滚动监听,可用bindingx代替
+			if (e.scrollTop > 200) {
+				//距离大于200时显示
+				this.isTop = true;
+			} else {
+				//距离小于200时隐藏
+				this.isTop = false;
+			}
+		},
+	};
+</script>
+<style lang="scss">
+	page {
+		background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
+	}
+
+	/deep/.uni-icons {
+		font-size: 40rpx !important;
+	}
+
+	.textbox {
+		width: 100%;
+		height: 100vh;
+		padding-top: 112rpx;
+		box-sizing: border-box;
+
+	}
+
+	.inputs {
+		width: 55%;
+		margin-left: 12rpx;
+
+		/deep/.u-content {
+			background-color: #fff !important;
+		}
+
+		/deep/.uni-input-wrapper {
+			background-color: #fff !important;
+		}
+
+	}
+
+	.utabs_box {
+		width: 100%;
+		position: fixed;
+		top: 88px;
+		background-color: #ffffff;
+		z-index: 100;
+
+		.utabs {
+			width: 95%;
+			margin: 0 auto;
+		}
+	}
+
+	.loading {
+		position: fixed;
+		top: 440px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+
+		.img {
+			width: 300rpx;
+			height: 40rpx;
+		}
+	}
+
+
+	.listbox{
+		// background: #F1F4F8;
+	}
+
+
+	.tab-box {
+		font-size: 30rpx;
+		// padding: 32rpx;
+		box-sizing: border-box;
+		width: 100%;
+		height: 100%;
+		overflow-y: hidden;
+		overflow-x: auto;
+		white-space: nowrap;
+
+		.tab-item {
+			cursor: pointer;
+			position: relative;
+			text-align: center;
+			display: inline-block;
+			padding: 16rpx 24rpx;
+			box-sizing: border-box;
+
+			span {
+				display: inline-block;
+			}
+		}
+	}
+
+	.tab {
+		// background-color: #0BBC58;
+		margin-top: 42rpx;
+		margin-bottom: 38rpx;
+		padding: 0 32rpx;
+		
+		.img-icon {
+			width: 80rpx;
+			height: 80rpx;
+			margin-bottom: 12rpx;
+		}
+		
+		.text {
+			color: #303133;
+			font-size: 24rpx;
+		}
+		.tab-content {
+			width: 100%;
+		
+			height: 162rpx;
+		
+		}
+
+		.tab-item.active {
+
+			border-radius: 24rpx;
+		
+			background: linear-gradient(0deg, #0bbc580f 0%, #0bbc580f 100%), #00000005;
+
+		}
+		
+	}
+
+	.second-tab {
+		height: 80rpx;
+		.tab-item{
+			font-size: 28rpx;
+			color: #999999;
+		}
+		.tab-item.active {
+			color: #303133;
+			font-weight: 700;
+			
+		}
+		.tab-item.active::after {
+		  content: '';
+		  position: absolute;
+		  bottom: 0;
+		  left: 50%;
+		  transform: translateX(-50%);
+		  width: 18px; /* 比文字略宽 */
+		  height: 18px;
+		  border: 3px solid #0BBC58;
+		  border-radius: 50%;
+			border-color: transparent; /* 隐藏其他部分 */
+
+		    border-bottom-color: #0BBC58; /* 组合成45度角 */
+		    // transform: rotate(0deg); /* 调整角度 */
+		}
+	}
+
+	.third-tab {
+		margin: 8rpx 0;
+		height: 64rpx;
+		line-height: 64rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.third-tab-item {
+			flex: 1;
+			text-align: center;
+		}
+	}
+
+	.list {
+		width: 100%;
+		background-color: #F5F6FA;
+		// margin-bottom: 100rpx;
+		overflow-y: auto;
+		padding: 0 32rpx;
+		box-sizing: border-box;
+
+		.list_item {
+			width: 100%;
+			margin: 0 auto 24rpx;
+			padding: 32rpx;
+			box-sizing: border-box;
+			position: relative;
+			background-color: #ffffff;
+			border-radius: 16rpx;
+
+			.list_item_top {
+		
+
+				.p1 {
+					width: 86%;
+
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					overflow: hidden;
+
+				
+
+					.title{
+						 color: #333333;
+						 
+						 font-size: 28rpx;
+						
+						 font-weight: 700;
+						margin-right: 8rpx;
+					}
+					
+					.sub-title{
+						 color: #666666;
+						 
+						 font-size: 28rpx;
+						
+						 font-weight: 400;
+						
+					}
+				}
+
+				
+			}
+			.online-status{
+				font-size: 28rpx;
+				position: absolute;
+				top:0rpx;
+				text-align: center;
+				right: 0rpx;
+				width: 76px;
+				height: 28px;
+				// line-height: 28px;
+				// border-radius: 0px 0px 0px 26px;
+				
+				// border: 1px solid #ffffff;
+				image{
+					width: 152rpx;
+					height: 56rpx;
+				}
+	
+			}
+			// .p2 {
+					
+			// 	color: #0BBC58;
+			// 	background: #0bbc581a;
+			// }
+			
+			// .p_out {
+					
+			// 	color: #FB4E52;
+			// 	background: #fb4e521a;
+			// }
+			.list_item_text {
+				margin-top: 20rpx;
+				
+				p {
+					font-size: 24rpx;
+					color: #303133;
+					margin-top: 10rpx;
+					word-break: break-all;
+				}
+				
+
+				.label{
+					 color: #999999;
+					 text-align: right;
+					margin-right: 32rpx;
+					 font-size: 24rpx;
+				}
+			}
+
+			.list_item_btn {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				bottom: 15rpx;
+				right: 20rpx;
+			}
+		}
+	}
+
+	.top {
+		position: fixed;
+		right: 30px;
+		bottom: 100px;
+		z-index: 100;
+
+		image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+	}
+</style>

+ 241 - 0
pages/equipList2/modification.vue

@@ -0,0 +1,241 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 64px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
+			</view>
+			<view class="mod">
+				<view class="mod_name">
+					<p><span style="color: #ff0000;" v-if="quanxian.namealter">*</span>设备名称</p>
+					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" :disabled="!quanxian.namealter"/>
+				</view>
+				<view class="mod_id">
+					<p>设备ID</p>
+					<input type="text" :value="moddata.imei||moddata.device_id" disabled />
+				</view>
+				<view class="mod_user">
+					<p>适配用户</p>
+					<input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
+				</view>
+				<view class="mod_city" @click="amendcity" v-if="$QueryPermission(109)">
+					<p><span style="color: #ff0000;" v-if="quanxian.cityalter">*</span>设备位置</p>
+					<view style="display: flex;">
+						<input type="text" :value="city" disabled style="width: 400rpx;" />
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+				<view class="mod_time">
+					<p>设备添加时间</p>
+					<input type="text" :value="moddata.addtime|timeFormat()" disabled />
+				</view>
+				<p style="width: 90%;margin: 0 auto;text-align: right;color: #06B535;"><span style="color: #ff0000;">*</span>为可修改</p>
+				<view class="sub" v-if="quanxian.infoalter" @click="btn">
+					提 交
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				moddata: [],
+				city: "",
+				selectcityTF: false,
+				quanxian:{
+					namealter:false,
+					cityalter:false,
+					infoalter:false
+				}
+			}
+		},
+		methods: {
+			async eqlistcity(lat, lng) { //修改设备定位
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device_lnglat',
+					data: {
+						device_id: this.moddata.imei,
+						lat: lat,
+						lng: lng
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showModal({
+						title: "修改地址失败",
+						icon: "none"
+					})
+				}
+			},
+			async eqlistname() { //修改设备名称
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei,
+						device_name: this.moddata.device_name,
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showModal({
+						title: "修改名称失败",
+						icon: "none"
+					})
+				}
+			},
+			async eqlistuser(id, imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: id,
+						device_id: imei,
+					}
+				})
+				this.moddata = res.data[0]
+				console.log(res)
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			async xyeqlistuser(imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
+					data: {
+						device_id: imei,
+					}
+				})
+				console.log(res)
+				this.moddata = res.data[0]
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			btn() {
+				this.eqlistcity(this.moddata.lat, this.moddata.lng)
+				this.eqlistname()
+				uni.removeStorage({
+					key: "location"
+				})
+				this.clickLeft()
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			amendcity() { //修改设备地址
+				if(this.quanxian.cityalter){
+					this.selectcityTF = true
+					uni.navigateTo({
+						url: "../fourBase/city"
+					})
+				}else{
+					uni.showToast({
+						title: "您暂无权限进行此操作,如有需要,请联系管理员",
+						icon: "none"
+					})
+				}
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			console.log(option)
+			if(option.id==10){
+				this.xyeqlistuser(JSON.parse(option.data).device_id)
+			}else{
+				this.eqlistuser(option.id, JSON.parse(option.data).imei)
+			}
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.quanxian.namealter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称"
+					})
+					this.quanxian.cityalter = items2[0].children.some((item)=>{
+						return item.purview_name == "添加位置"
+					})
+					this.quanxian.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					// console.log(res);
+					this.moddata.lat = res.data[1]
+					this.moddata.lng = res.data[0]
+					this.selectaddress(this.moddata.lng, this.moddata.lat)
+				}
+			})
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FAFAFA;
+	}
+	.mod {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+		.mod_name,
+		.mod_id,
+		.mod_user,
+		.mod_time,
+		.mod_city {
+			width: 90%;
+			margin: 30rpx auto;
+			display: flex;
+			justify-content: space-between;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				text-align: right;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+	}
+
+	.sub {
+		width: 90%;
+		margin: 30rpx auto;
+		text-align: center;
+		height: 70rpx;
+		line-height: 70rpx;
+		background-color: #57C77A;
+		border-radius: 35rpx;
+		color: #FFFFFF;
+	}
+</style>

+ 268 - 0
pages/equipList2/seabox/modification.vue

@@ -0,0 +1,268 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 40px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
+			</view>
+			<view class="mod">
+				<view class="mod_name">
+					<p><span style="color: #ff0000;" v-if="quanxian.namealter">*</span>设备名称</p>
+					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" :disabled="!quanxian.namealter"/>
+				</view>
+				<view class="mod_id">
+					<p>设备ID</p>
+					<input type="text" :value="moddata.imei || moddata.device_id" disabled />
+				</view>
+				<view class="mod_user">
+					<p>适配用户</p>
+					<input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
+				</view>
+				<view class="mod_city" @click="amendcity">
+					<view style="width: 90%;">
+						<p><span style="color: #ff0000;" v-if="quanxian.cityalter">*</span>设备位置</p>
+						<input type="text" :value="city" disabled />
+					</view>
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+				<view class="mod_time">
+					<p>设备添加时间</p>
+					<input type="text" :value="moddata.addtime|timeFormat()" disabled />
+				</view>
+				<p style="width: 90%;margin: 0 auto;text-align: right;color: #06B535;"><span style="color: #ff0000;">*</span>为可修改</p>
+				<view class="sub" v-if="quanxian.infoalter" @click="btn">
+					提 交
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				moddata: [],
+				city: "",
+				selectcityTF: false,
+				quanxian:{
+					namealter:false,
+					cityalter:false,
+					infoalter:false
+				}
+			}
+		},
+		methods: {
+			async eqlistcity(lat, lng) { //修改设备定位
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei,
+						lat: lat,
+						lng: lng
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showToast({
+						title: '修改地址失败!',
+						icon: "none"
+					});
+				}else{
+					uni.showToast({
+						title: '修改地址成功!',
+						icon: "none"
+					});
+				}
+			},
+			async eqlistname() { //修改设备名称
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei,
+						device_name: this.moddata.device_name,
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showToast({
+						title: '修改名称失败!',
+						icon: "none"
+					});
+				}else{
+					uni.showToast({
+						title: '修改名称成功!',
+						icon: "none"
+					});
+					uni.removeStorage({
+						key: "location"
+					})
+					this.clickLeft()
+				}
+			},
+			async eqlistuser(id, imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: id,
+						device_id: imei,
+					}
+				})
+				this.moddata = res.data[0]
+				console.log(res)
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			async xyeqlistuser(imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
+					data: {
+						device_id: imei,
+					}
+				})
+				console.log(res)
+				this.moddata = res.data[0]
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			btn() {
+				this.eqlistcity(this.moddata.lat, this.moddata.lng)
+				this.eqlistname()
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			amendcity() { //修改设备地址
+				if(this.quanxian.cityalter){
+					this.selectcityTF = true
+					uni.navigateTo({
+						url: "../fourBase/city"
+					})
+				}else{
+					uni.showToast({
+						title: "您暂无权限进行此操作,如有需要,请联系管理员",
+						icon: "none"
+					})
+				}
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			console.log(option)
+			if(option.id==10){
+				this.xyeqlistuser(JSON.parse(option.data).device_id)
+			}else{
+				this.eqlistuser(option.id, JSON.parse(option.data).imei)
+			}
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.quanxian.namealter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称"
+					})
+					this.quanxian.cityalter = items2[0].children.some((item)=>{
+						return item.purview_name == "添加位置"
+					})
+					this.quanxian.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					// console.log(res);
+					this.moddata.lat = res.data[1]
+					this.moddata.lng = res.data[0]
+					this.selectaddress(this.moddata.lng, this.moddata.lat)
+				}
+			})
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FAFAFA;
+	}
+	.mod {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+		.mod_name,
+		.mod_id,
+		.mod_user,
+		.mod_time {
+			width: 90%;
+			margin: 30rpx auto;
+			display: flex;
+			justify-content: space-between;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				text-align: right;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+		.mod_city{
+			width: 90%;
+			margin: 30rpx auto;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			display: flex;
+			justify-content: space-between;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				width: 90%;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+	}
+
+	.sub {
+		width: 90%;
+		margin: 30rpx auto;
+		text-align: center;
+		height: 70rpx;
+		line-height: 70rpx;
+		background-color: #57C77A;
+		border-radius: 35rpx;
+		color: #FFFFFF;
+	}
+</style>

+ 343 - 0
pages/equipList2/seabox/search.vue

@@ -0,0 +1,343 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view style="position: fixed;z-index: 100;background-color: #FFFFFF;height: 80px;top: 40px;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备搜索"></uni-nav-bar>
+			<view class="search_top_input">
+				<input type="text" value="" placeholder="请输入设备ID" v-model="imports" />
+				<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+			</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="$imageURL+'/bigdata_app'+ imgpath[0].path" 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}}</p>
+					<p>适配用户:{{item.device_user==''?"无":item.device_user}}</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>
+			<view class="none" v-if="eqlistdatatf">
+				暂无数据
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from "../../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				imports: '',
+				eqlistdata: [],
+				images: [{
+						name: "杀虫灯",
+						path: "/image/fourMoodBase/3.png", //
+						id: 2
+					},
+					{
+						name: "测报灯",
+						path: "/image/fourMoodBase/1.png",
+						id: 3
+					}, {
+						name: "性诱测报",
+						path: "/image/fourMoodBase/6.png",
+						id: 4
+					}, {
+						name: "环境监测",
+						path: "/image/fourMoodBase/5.png",
+						id: 5
+					}, {
+						name: "监控设备",
+						path: "/image/fourMoodBase/2.png",
+						id: 6
+					}, {
+						name: "孢子仪",
+						path: "/image/fourMoodBase/4.png",
+						id: 7
+					},
+					{
+						name: "性诱2.0",
+						path: "/image/fourMoodBase/10.png",
+						id: 10
+					}
+				],
+				eqlistdatatf: false, //暂无数据
+				indexs: 2, //设备id
+				page: 1,
+				size: 10,
+				infoalter:false,
+				imgpath:[]
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: this.indexs,
+						device_id: this.imports,
+						page: this.page,
+						page_size: this.size,
+					}
+				})
+				this.eqlistdata = this.eqlistdata.concat(res.data)
+				var newtime = +new Date()/1000
+				for(var i=0;i<this.eqlistdata.length;i++){
+					var days = (newtime-this.eqlistdata[i].uptime)/60/60/24
+					this.eqlistdata[i].days = Math.round(days)
+				} 
+				console.log(this.eqlistdata)
+				if (this.eqlistdata.length == 0) {
+					this.eqlistdatatf = true
+				} else {
+					this.eqlistdatatf = false
+				}
+			},
+			clickLeft() { //返回
+				uni.switchTab({
+					url: "./index"
+				})
+			},
+			search() { //搜索
+				// this.eqlistdata = []
+				// this.page = 1
+				// this.eqlist()
+				// console.log(1)
+				this.system(this.imports)
+			},
+			system(str){
+				var arr = str.split(",")
+				console.log(arr)
+			},
+			searchinput() {
+				Debounce(() => {
+					this.eqlistdata = []
+					this.page = 1
+					this.eqlist()
+				}, 1000)()
+			},
+			modification(item) {
+				uni.navigateTo({
+					url: "./modification?data=" + JSON.stringify(item) + "&id=" + (this.indexs)
+				})
+			},
+			historys(item) {
+				switch (Number(this.indexs)) {
+					case 2:
+						uni.navigateTo({
+							url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item)
+						})
+						break;
+					case 5:
+						console.log(item)
+						var obj = {}
+						obj.d_id = item.d_id
+						obj.equip_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/equipment?shebei=" + JSON.stringify(obj)
+						})
+						break;
+					case 6:
+						uni.navigateTo({
+							url: "/pages/webview/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken
+						})
+						break;
+					default:
+						item.type = this.indexs
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
+						})
+						break;
+				}
+			}
+		},
+		onLoad(option) {
+			this.indexs = option.id
+			this.imgpath = this.images.filter((item)=>{
+				return item.id == option.id
+			})
+			console.log(this.imgpath)
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onReachBottom() {
+			this.page++
+			this.eqlist()
+		},
+		onBackPress(options) {
+			if (options.from === 'navigateBack') {
+				return false;
+			}
+			this.clickLeft();
+			return true;
+		},
+	}
+</script>
+<style lang="scss">
+	.search_top_input {
+		width: 90%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 100rpx;
+		right: 5%;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+		input {
+			width: 80%;
+			// text-indent: 1rem;
+			font-size: 26rpx;
+			padding-left: 20px;
+		}
+		.icon{
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	.search_bot_input {
+		width: 80%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 18px;
+		right: 18rpx;
+		box-sizing: border-box;
+		padding-top: 8rpx;
+
+		input {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	.list {
+		width: 100%;
+		background-color: #FDFDFD;
+		position: absolute;
+		top: 120px;
+
+		.list_item {
+			width: 90%;
+			margin: 20rpx auto;
+			padding: 10rpx 20rpx;
+			position: relative;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			box-shadow: 0 0 10rpx #bcb9ca;
+
+			.list_item_top {
+				display: flex;
+				justify-content: space-between;
+
+				.p1 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+
+					image {
+						width: 40rpx;
+						height: 40rpx;
+						vertical-align: text-top;
+						margin-right: 20rpx;
+					}
+				}
+
+				.p2 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: #42b983;
+				}
+
+				.p_out {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: red;
+				}
+			}
+
+			.list_item_text {
+				margin-top: 20rpx;
+
+				p {
+					font-size: 24rpx;
+					color: #636363;
+					margin-top: 10rpx;
+				}
+
+				p:first-child {
+					font-size: 28rpx;
+					font-weight: 700;
+				}
+			}
+
+			.list_item_btn {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				top: 136rpx;
+				right: 20rpx;
+			}
+		}
+
+		.none {
+			width: 100%;
+			height: 100rpx;
+			line-height: 100rpx;
+			font-size: 32rpx;
+			text-align: center;
+		}
+	}
+</style>

+ 519 - 0
pages/equipList2/search.vue

@@ -0,0 +1,519 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view
+			style="position: fixed;top: 44px; z-index: 100;height: 80rpx;background-color: #FFFFFF;padding-top: 10px;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"></uni-nav-bar>
+			<view class="search_bot_input">
+				<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinput" />
+				<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
+			</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://static.yfpyx.com/bigdata_app'+images[indexs-2].path" 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}}</p>
+					<p>适配用户:{{item.device_user==''?"无":item.device_user}}</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>
+			<view class="none" v-if="eqlistdatatf">
+				暂无数据
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from "../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				imports: '',
+				eqlistdata: [],
+				images: [{
+						path: "/image/fourMoodBase/scd.png",
+						id: 2
+					},
+					{
+						path: "/image/fourMoodBase/cbd.png",
+						id: 3
+					}, {
+						path: "/image/fourMoodBase/xycb.png",
+						id: 4
+					}, {
+						path: "/image/fourMoodBase/qxz.png",
+						id: 5
+					}, {
+						path: "/image/fourMoodBase/jk.png",
+						id: 6
+					}, {
+						path: "/image/fourMoodBase/bzy.png",
+						id: 7
+					}
+				],
+				eqlistdatatf: false, //暂无数据
+				indexs: 2, //设备id
+				page: 1,
+				size: 10,
+				infoalter: false
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: this.indexs,
+						device_id: this.imports,
+						page: this.page,
+						page_size: this.size,
+					}
+				})
+				var newtime = +new Date() / 1000
+				res.data.forEach(item => {
+					let {
+						uptime,
+						addtime
+					} = item;
+					item.uptime = addtime;
+					item.addtime = uptime;
+					var days = (newtime - item.addtime) / 60 / 60 / 24;
+					item.days = Math.round(days);
+				})
+				this.eqlistdata = this.eqlistdata.concat(res.data)
+				// for(var i=0;i<this.eqlistdata.length;i++){
+				// 	var days = (newtime-this.eqlistdata[i].uptime)/60/60/24
+				// 	this.eqlistdata[i].days = Math.round(days)
+				// } 
+				console.log(this.eqlistdata)
+				if (this.eqlistdata.length == 0) {
+					this.eqlistdatatf = true
+				} else {
+					this.eqlistdatatf = false
+				}
+			},
+			clickLeft() { //返回
+				uni.switchTab({
+					url: "./index"
+				})
+			},
+			search() { //搜索
+				this.eqlistdata = []
+				this.page = 1
+				this.eqlist()
+			},
+			searchinput() {
+				Debounce(() => {
+					this.eqlistdata = []
+					this.page = 1
+					this.eqlist()
+				}, 1000)()
+			},
+			modification(item) {
+				uni.navigateTo({
+					url: "./modification?data=" + JSON.stringify(item) + "&id=" + (this.indexs)
+				})
+			},
+			historys(itemOld) {
+				let item = JSON.parse(JSON.stringify(itemOld))
+				console.log("item", item);
+				switch (this.type_id) {
+					// 水肥新设备
+					case 22:
+						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.uptime;
+						uni.navigateTo({
+							url: "../waterandfernew/details?shebei=" + JSON.stringify(obj),
+						});
+						break
+						// 病虫害可视监测
+					case 14:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../cb/sy/detail?detail=" + JSON.stringify(item),
+						});
+						break
+					case 2:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item),
+						});
+						break;
+					case 5:
+						console.log(item);
+						var obj = {};
+						obj.d_id = item.d_id;
+						obj.equip_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.uptime;
+						uni.navigateTo({
+							url: "../environment/equipment?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 6:
+						uni.navigateTo({
+							url: "/pages/webview/webview?device_id=" +
+								item.imei +
+								"&accessToken=" +
+								this.accessToken,
+						});
+						break;
+					case 3:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 4:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 7:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
+						});
+						break;
+					case 8:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/thxydetail/thxydetail?imei=" + item.imei
+						});
+						break;
+					case 24:
+						// item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/zjxydetail/thxydetail?imei=" + item.imei
+						});
+						break;
+					case 12:
+						console.log(item);
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../cb/xctdetail/xctdetail?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.uptime;
+						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.uptime;
+						uni.navigateTo({
+							url: "../environment/gsequipment?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 17:
+						break;
+					case 18:
+						var obj = {};
+						obj.device_id = item.imei;
+						obj.is_online = item.is_online;
+						uni.navigateTo({
+							url: "../cb/shuifeiL/shuifeiL?detail=" + JSON.stringify(obj),
+						});
+						break;
+          case 43:
+            uni.navigateTo({
+              url: "/pages/fmSys/details?info=" + JSON.stringify(item)
+            })
+          break;
+          case 44:
+            uni.navigateTo({
+              url: "/pages/webviewdgp/webview?device_id=" + item.imei + "&accessToken=" + this.accessToken || uni
+                .getStorageSync('session_key') +
+                '&type=dgp'
+            })
+          break;
+					case 11:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 11;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 19:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 19;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 20:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 20;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 21:
+						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.uptime;
+						obj.location = item.address;
+						obj.type = 20;
+						uni.navigateTo({
+							url: "../disease/cmb?shebei=" + JSON.stringify(obj),
+						});
+						break;
+					case 25:
+						item.addtime = item.uptime;
+						uni.navigateTo({
+							url: "../cb/xylps/detail/detail?detail=" + JSON.stringify(item),
+						});
+						break;
+					default:
+						item.addtime = item.uptime;
+						item.type = this.type_id;
+						uni.navigateTo({
+							url: "../cb/xy2.0/particulars?info=" + JSON.stringify(item),
+						});
+						break;
+				}
+			},
+		},
+		onLoad(option) {
+			this.indexs = option.id
+			console.log(this.indexs)
+			uni.getStorage({
+				key: "jurisdiction",
+				success: (res) => {
+					console.log(JSON.parse(res.data))
+					let items = JSON.parse(res.data).filter((item) => {
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item) => {
+						return item.purview_name == "分配设备"
+					})
+					this.infoalter = items2[0].children.some((item) => {
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onReachBottom() {
+			this.page++
+			this.eqlist()
+		},
+		onBackPress(options) {
+			if (options.from === 'navigateBack') {
+				return false;
+			}
+			this.clickLeft();
+			return true;
+		},
+	}
+</script>
+<style lang="scss">
+	.search_top_input {
+		width: 80%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 18rpx;
+		right: 18rpx;
+		padding-top: 8rpx;
+		box-sizing: border-box;
+
+		input {
+			width: 85%;
+			text-indent: 1rem;
+			font-size: 26rpx;
+		}
+
+		.icon {
+			position: absolute;
+			top: 18rpx;
+			right: 32rpx;
+		}
+	}
+
+	.search_bot_input {
+		width: 80%;
+		height: 54rpx;
+		background-color: #E4E4E4;
+		border-radius: 27rpx;
+		position: absolute;
+		top: 18px;
+		right: 18rpx;
+		box-sizing: border-box;
+		padding-top: 8rpx;
+
+		input {
+			width: 85%;
+			// text-indent: 1rem;
+			font-size: 26rpx;
+			padding-left: 20px;
+		}
+
+		.icon {
+			position: absolute;
+			top: 8rpx;
+			right: 26rpx;
+		}
+	}
+
+	.list {
+		width: 100%;
+		background-color: #FDFDFD;
+		position: absolute;
+		top: 100px;
+
+		.list_item {
+			width: 95%;
+			margin: 20rpx auto;
+			padding: 10rpx 20rpx;
+			position: relative;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			box-shadow: 0 0 10rpx #bcb9ca;
+
+			.list_item_top {
+				display: flex;
+				justify-content: space-between;
+
+				.p1 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+
+					image {
+						width: 40rpx;
+						height: 40rpx;
+						vertical-align: text-top;
+						margin-right: 20rpx;
+					}
+				}
+
+				.p2 {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: #42b983;
+				}
+
+				.p_out {
+					height: 60rpx;
+					line-height: 60rpx;
+					font-size: 28rpx;
+					color: red;
+				}
+			}
+
+			.list_item_text {
+				margin-top: 20rpx;
+
+				p {
+					font-size: 24rpx;
+					color: #636363;
+					margin-top: 10rpx;
+				}
+
+				p:first-child {
+					font-size: 28rpx;
+					font-weight: 700;
+				}
+			}
+
+			.list_item_btn {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				top: 136rpx;
+				right: 20rpx;
+			}
+		}
+
+		.none {
+			width: 100%;
+			height: 100rpx;
+			line-height: 100rpx;
+			font-size: 32rpx;
+			text-align: center;
+		}
+	}
+</style>

+ 864 - 0
pages/fmSys/details.vue

@@ -0,0 +1,864 @@
+<template>
+	<view class="fm-page">
+		<!-- <view class="status_bar"></view> -->
+		<uni-nav-bar left-icon="back" background-color='rgba(0,0,0,0)' title="闸门" @clickLeft="clickLeft">
+			<!-- 	<view class="self-title">标题栏</view>
+			<template v-slot:left><view class="self-back"><uni-icons type="arrowleft" size="24"></uni-icons></view></template>
+		 -->
+		</uni-nav-bar>
+		<view class="fm-content">
+
+
+			<view class="info">
+				<view class="device-id" @click="copy(equipInfo)">
+					<image class="logo"
+						:src="`${$imageURL}/bigdata_pc/equipdistribute/${equipInfo.type}.png`" mode="">
+					</image>
+					{{equipInfo.imei||equipInfo.device_id}}
+					<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode=""
+						class="tishi">
+					</image>
+					<view
+						:class="['float-right','yficonfont',equipInfo.is_online==1?'on icon-zaixian':'off icon-lixian']">
+						{{equipInfo.is_online==1?'在线':'离线'}}
+					</view>
+				</view>
+				<view class="info-list">
+					<span class="float-left">设备名称:</span> <span class="float-right">{{equipInfo.device_name}}</span>
+				</view>
+				<view class="info-list">
+					<span class="float-left">上报时间:</span> <span
+						class="float-right">{{equipInfo.addtime||equipInfo.uptime | timeFormat}}</span>
+				</view>
+				<view class="info-list">
+					<span class="float-left">设备地址:</span> <span
+						class="float-right">{{equipInfo.address?equipInfo.address:"--"}}</span>
+				</view>
+
+
+				<u-calendar v-model="calendar_show" mode="date" :max-date="date" @change="timeChange($event)">
+				</u-calendar>
+				<u-toast ref="toast" />
+			</view>
+			<view class="title"></view>
+			<view class="newState">
+				<view class="top">
+					<view class="left">
+						<image class="img" 
+						:src="$imageURL+'/bigdata_app/image/irrigate/fm.png'"
+						></image>
+						<view>
+							<p> <span class="num">{{deviceData.nowHeight}}</span> mm</p>
+							<p>{{deviceData.deviceStatus}}</p>
+						</view>
+
+					</view>
+					<view class="btn" style="width:170rpx">
+						<u-button text="设置开度" size="mini" @click="kdShow = true">设置开度</u-button>
+					</view>
+					<view class="right btn">
+						<u-button text="刷新" size="mini" @click="zfControl('refresh')">刷新</u-button>
+					</view>
+				</view>
+				<view class="up-down">
+					<view class="bottom">
+						<view class="opt">
+							<image 
+							:src="$imageURL+'/bigdata_app/image/irrigate/fm-up.png'"
+							></image>
+							<!-- <p class="num">到位</p>
+						<p>顶到位</p> -->
+						</view>
+						<view class="btn">
+							<u-button text="上升" size="mini" @click="zfControl('up')">上升</u-button>
+						</view>
+					</view>
+					<view class="bottom">
+						<view class="opt">
+							<image :src="$imageURL+'/bigdata_app/image/irrigate/fm-down.png'"
+							></image>
+							<!-- <p class="num">未到位</p>
+						<p>底到位</p> -->
+						</view>
+						<view class="btn">
+							<u-button class="active" text="下降" size="mini" @click="zfControl('down')">下降</u-button>
+						</view>
+					</view>
+				</view>
+				<view class="btn">
+					<button text="停止" @click="zfControl('stop')">停止</button>
+				</view>
+			</view>
+
+			<!-- 操作记录 -->
+			<view class="consoleList">
+				<view class="title">操作记录</view>
+				<view class="histimeBox">
+					<u-icon name="calendar" color="#C1C1C1" size="24"></u-icon>
+					<view class="time" @click="consoleshow = true">
+						{{consoleTime.startDate ? consoleTime.startDate : '开始'}}
+					</view>
+					<view class="">至</view>
+					<view class="time" @click="consoleshow = true">{{consoleTime.endDate ? consoleTime.endDate : '结束'}}
+					</view>
+					<u-icon name="close-circle" color="#C1C1C1" size="28" @click="clearContime"
+						v-if="consoleTime.startDate"></u-icon>
+				</view>
+				<u-calendar  @maxDate="maxDate" v-model="consoleshow" mode="range" @change="changeConsoleDate"></u-calendar>
+				<view class="tableList tableTitle">
+
+					<view>时间</view>
+					<view>操作内容</view>
+					<view>操作结果</view>
+					<view>操作人</view>
+				</view>
+				<view class="tableList" v-for="(item, index) in tableData" :key="item.addtime + index">
+					<view>{{item.addtime}}</view>
+					<view :class="item.status=='成功' ? 'success' : 'error'">{{item.order}}</view>
+					<view>{{item.status}}</view>
+					<view>{{item.user}}</view>
+				</view>
+				<u-loadmore style="margin-top: 16rpx;" :status="status" />
+			</view>
+			<u-popup v-model="kdShow" mode="center" width="600rpx">
+				<view style="padding: 40rpx;">
+					<slider style="margin-top: 20rpx;" :value="kdValue" show-value="true" :min="0" :max="1000"
+						block-color="#57C878" activeColor="#57C878" step="1" />
+					<view class="btn-box">
+						<u-button @click="kdSubmit" size="mini" type="success">确定</u-button>
+					</view>
+				</view>
+
+			</u-popup>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		QueryPermission,
+		getPermissionById,
+		getUserPermission
+	} from "@/util/QueryPermission.js"
+	export default {
+		data() {
+			return {
+				      maxDate: '2050-12-31',
+				city: "",
+				type: null, //设备类型
+				device_status: null,
+				equipInfo: {},
+				cbd: [
+
+				],
+				newState: {}, //设备最新状态
+				setTimeShow: false,
+				calendar_show: false,
+				culErr: '',
+
+				decoy: '',
+				newtishitf: false, //暂无数据提示
+				dataloadingtf: true, //加载中提示
+				date: "", //日历最大可选日期
+				operateType: '',
+				status: '', //是否加载更多
+				page: 1,
+				tableData: [],
+				deviceData: {},
+				consoleshow: false,
+				consoleTime: {},
+				kdValue: 0,
+				kdShow: false
+			}
+		},
+		computed: {
+
+
+
+		},
+		filters: {
+			equipType(type) {
+				switch (type) {
+					case 3:
+						return "虫情测报灯";
+					case 7:
+						return "孢子仪";
+					case 4:
+						return "性诱测报"
+
+				}
+			},
+			formatValue(val, a1, a2) {
+				if (a2 == 4 && a1 == "电池状态") {
+					switch (Number(val)) {
+						case 0:
+							return '正常';
+							break;
+						case 1:
+							return '欠压';
+							break;
+						case 2:
+							return '过压';
+							break;
+					}
+				} else {
+
+					return val ? val : '无'
+				}
+			}
+		},
+		onReachBottom() {
+			if (this.status == 'loadmore') {
+				this.page++;
+				this.getEquipcontroldata()
+			}
+		},
+		onLoad(option) {
+
+			this.equipInfo = JSON.parse(option.info)
+			console.log(this.equipInfo,'equipInfoequipInfo')
+			this.getEquipcontroldata()
+			this.getDeviceList()
+			// 		this.getDeviceStatus()
+			// 		this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type) || Number(this.equipInfo
+			// 			.device_type_id)
+			// 		this.equipInfo.type = this.type
+
+
+			// 		this.getState()
+
+			// 		// this.selectaddress(Number(this.equipInfo.lat), Number(this.equipInfo.lng))
+			// 		var times = new Date()
+			// 		this.date = times.getFullYear() + 1 + "-" + Number(times.getMonth() + 1) + "-" + times.getDate()
+		},
+		methods: {
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			kdSubmit() {
+				this.kdShow = false
+				this.zfControl('value')
+			},
+			// 指令下发
+			zfControl(cmd) {
+
+				this.$myRequest({
+					method: 'POST',
+					url: '/api/api_gateway?method=hran.view.hran_order',
+					data: {
+						d_id: this.equipInfo.d_id,
+						order: cmd,
+						controlValue: this.kdValue
+					}
+				}).then((res) => {
+					console.log('指令', res)
+					if (res == true) {
+						uni.showToast({
+							title: '指令下发成功!',
+							duration: 2000,
+						});
+						setTimeout(() => {
+							this.tableData = [];
+							this.page = 1;
+							this.getEquipcontroldata()
+						}, 2000)
+					} else {
+						uni.showToast({
+							title: '指令下发失败!',
+							duration: 2000,
+						});
+					}
+				})
+			},
+			changeConsoleDate(e) {
+				console.log(e)
+				this.consoleTime = e;
+				this.tableData = [];
+				this.page = 1;
+				this.getEquipcontroldata();
+			},
+			clearContime() {
+				this.consoleTime = {};
+				this.tableData = [];
+				this.page = 1;
+				this.getEquipcontroldata();
+			},
+			//操作记录
+			async getEquipcontroldata() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				const {
+					consoleTime
+				} = this;
+				let begin = consoleTime.startDate ? new Date(consoleTime.startDate+ ' 00:00:00').getTime() / 1000 : '';
+				let end = consoleTime.endDate ? new Date(consoleTime.endDate+ ' 23:59:59').getTime() / 1000 : '';
+				//操作记录
+				let res = await this.$myRequest({
+					method: "POST",
+					url: "/api/api_gateway?method=hran.view.hran_order_list",
+					data: {
+						d_id: this.equipInfo.d_id,
+						page: this.page,
+						page_size: 15,
+						start: begin,
+						end: end
+					},
+				})
+				console.log(res)
+				uni.hideLoading();
+				// this.tableData = [];
+				const record = res.data;
+				this.tableData = [...this.tableData, ...record];
+				this.total = res.total;
+				if (this.page * 15 > this.total) {
+					this.status = 'nomore'
+				} else {
+					this.status = 'loadmore'
+				}
+				// console.log(this.tableData);
+			},
+			// 获取设备数据
+			getDeviceList() {
+				this.devicetf = true
+				const {
+					consoleTime
+				} = this;
+				let begin = consoleTime.startDate ? new Date(consoleTime.startDate+ ' 00:00:00').getTime() / 1000 : '';
+				let end = consoleTime.endDate ? new Date(consoleTime.endDate+ ' 23:59:59').getTime() / 1000 : '';
+				try {
+					this.$myRequest({
+						method: 'POST',
+						url: '/api/api_gateway?method=hran.view.hran_data',
+						data: {
+							d_id: this.equipInfo.d_id,
+							start: begin,
+							end: end,
+							page: 1,
+							page_size: 1
+						}
+					}).then((res) => {
+						this.devicetf = false
+						console.log('设备数据', res)
+
+						if (res.data.length > 0) {
+							const {
+								data,
+								title
+							} = res
+							// console.log(data, title, total)
+							this.deviceData = data[0]
+							// this.deviceTitle = title
+						} else {
+							this.deviceData = {}
+						}
+
+					})
+				} catch (error) {
+					console.log('+++++', error)
+				}
+			},
+			async getDeviceStatus() {
+
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=new_gateway.device_info.devices_list',
+					data: {
+						device_type_id: this.equipInfo.type,
+						id: this.equipInfo.imei || this.equipInfo.device_id,
+						page: 1,
+						size: 999
+					}
+				})
+				let newRes = res.device[0]
+				this.equipInfo = {
+					...this.equipInfo,
+					...newRes
+				}
+				console.log('响应', this.equipInfo)
+			},
+			async getState() {
+				this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=new_gateway.device_info.device_status',
+					data: {
+						device_type_id: this.equipInfo.type,
+						id: this.equipInfo.d_id
+					}
+				})
+				this.newState = res
+				this.dataloadingtf = false
+				console.log('res', res)
+			},
+
+			partClick(path) {
+				console.log(path)
+				var device_id = this.equipInfo.device_id || this.equipInfo.imei
+				uni.navigateTo({
+					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this
+						.type
+				});
+			},
+
+
+			operate(type) {
+				this.calendar_show = true
+				this.operateType = type
+			},
+			timeChange(e, filed) {
+				// // 根据type_id,执行相应的操作
+
+				// let typeId = this.equipInfo.type
+				// let postData = {}
+				// if(typeId===32){
+				// 	// 添加诱芯
+				// }else if(typeId === 33){
+				// 	// 添加诱芯,更换色板
+				// 	this.sbSubmit(e.result)
+				// }else if(typeId === 34){
+				// 	// 添加诱芯,更换卷带
+				// 	this.jdSubmit(e.result)
+				// }
+				this.yxSubmit(e.result)
+			},
+
+			async yxSubmit(time) {
+				let {
+					title,
+					url,
+					field
+				} = this.operateOptions[this.operateType]
+				if (!time) {
+					this.$refs.toast.show({
+						title: '请填写' + title + '到期时间!',
+						type: 'warning',
+					})
+					return false
+				}
+				let postData = {
+					device_type_id: this.equipInfo.type,
+					id: this.equipInfo.device_id
+				}
+				postData[field] = +new Date(time) / 1000
+				const res = await this.$myRequest({
+					url: url,
+					data: postData
+				})
+				if (res) {
+					this.$refs.toast.show({
+						title: title + '时间设置成功!',
+						type: 'success',
+					})
+					this.getDeviceStatus()
+
+				}
+			},
+			// 色板
+			async sbSubmit(time) {
+				if (!time) {
+					this.$refs.toast.show({
+						title: '请填写色板到期时间!',
+						type: 'warning',
+					})
+					return false
+				}
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=new_gateway.device_info.sban',
+					data: {
+						device_type_id: this.equipInfo.type,
+						id: this.equipInfo.device_id,
+						sban_expire_time: +new Date(time) / 1000
+					}
+				})
+				if (res) {
+					this.$refs.toast.show({
+						title: '设置成功!',
+						type: 'success',
+					})
+					this.getDeviceStatus()
+
+				}
+			},
+			async jdSubmit(time) {
+				if (!time) {
+					this.$refs.toast.show({
+						title: '请填写卷带到期时间!',
+						type: 'warning',
+					})
+					return false
+				}
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=new_gateway.device_info.syone_jd',
+					data: {
+						device_type_id: this.equipInfo.type,
+						id: this.equipInfo.device_id,
+						jd_expire_time: +new Date(time) / 1000
+					}
+				})
+				if (res) {
+					this.$refs.toast.show({
+						title: '设置成功!',
+						type: 'success',
+					})
+					this.getDeviceStatus()
+
+				}
+			},
+			selectaddress(lat, lng) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: res => {
+						console.log(res)
+						this.city = res.data.regeocode.formatted_address
+					}
+				});
+			},
+			copy(item) {
+				console.log(item)
+				uni.setClipboardData({
+					data: item.imei || item.device_id,
+					success: function() {
+						console.log('success');
+					}
+				});
+			}
+		},
+	}
+</script>
+
+<style lang='scss'>
+	page {
+		height: 100%;
+
+		.fm-page {
+			width: 100%;
+			min-height: 100%;
+			background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
+			padding-top: 88rpx;
+		}
+
+		.fm-content {
+			padding: 0rpx 32rpx;
+			box-sizing: border-box;
+		}
+
+		.title {
+			color: #999999;
+			margin: 32rpx 0;
+		}
+
+		.logo {
+			width: 36rpx;
+			height: 36rpx;
+			margin-right: 12rpx;
+			position: relative;
+			top: 8rpx;
+		}
+
+		.device-id {
+			height: 60rpx;
+			line-height: 60rpx;
+			margin-bottom: 18rpx;
+			color: #5C5C5C;
+
+			.float-right {
+				float: right;
+				width: 88px;
+				height: 30px;
+				text-align: center;
+				position: absolute;
+				top: 0;
+				right: 0;
+				border-top-right-radius: 24rpx;
+			}
+		}
+
+		.on {
+			background-image: url('/static/images/cb/online.png');
+			color: #fff;
+		}
+
+		.off {
+			background-image: url('/static/images/cb/outline.png');
+			color: #999999;
+		}
+
+		.info {
+			position: relative;
+			padding: 8rpx 32rpx 32rpx 32rpx;
+
+			line-height: 50rpx;
+			font-size: 26rpx;
+			border-radius: 24rpx;
+
+			background-color: #fff;
+
+			box-sizing: border-box;
+			width: 100%;
+
+			.info-list {
+				overflow: hidden;
+				font-size: 12px;
+
+				.float-right {
+					float: right;
+					color: #666;
+
+					.arrow {
+						margin-left: 10rpx;
+					}
+				}
+
+				.float-left {
+					float: left;
+					color: #999;
+				}
+
+			}
+
+			.tishi {
+				width: 28rpx;
+				height: 28rpx;
+				margin: 0rpx 0 0 12rpx;
+				position: relative;
+				top: 6rpx;
+			}
+		}
+
+		.tit {
+			font-weight: 800;
+			height: 50rpx;
+			font-size: 30rpx;
+			margin-bottom: 20rpx;
+			display: flex;
+			justify-content: space-between;
+
+			.span {
+				color: #6e6c76;
+				font-size: 24rpx;
+				display: flex;
+				justify-content: space-between;
+				/* margin-top: 12rpx; */
+			}
+		}
+
+
+		.newState {
+			padding: 32rpx;
+			border-radius: 16rpx;
+			background: #FFF;
+
+			.top {
+				height: 112rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.left {
+					width: 40%;
+					display: flex;
+					align-items: center;
+				}
+
+				.right {
+					width: 160rpx;
+				}
+
+				.img {
+					float: left;
+					width: 110rpx;
+					height: 110rpx;
+					margin-right: 32rpx;
+				}
+
+				p:nth-child(2) {
+					color: #687A74;
+				}
+
+				.num {
+					font-size: 40rpx;
+					font-weight: 700;
+					color: #042118;
+				}
+			}
+
+			.up-down {
+				height: 222rpx;
+				margin: 32rpx 0;
+				display: flex;
+				gap: 18rpx;
+				justify-content: space-between;
+			}
+
+			.bottom {
+				box-sizing: border-box;
+				height: 100%;
+				display: flex;
+				padding: 32rpx 0;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				gap: 30rpx;
+				flex: 1 0 0;
+				border-radius: 16rpx;
+				background: linear-gradient(180deg, #14a4781a 0%, #14a47800 100%), #FFF;
+
+				.opt {
+					width: 70rpx;
+					height: 70rpx;
+					font-size: 24rpx;
+					color: #687A74;
+
+					image {
+						width: 64rpx;
+						height: 64rpx;
+						float: left;
+						margin-right: 16rpx;
+					}
+
+					.num {
+						color: #042118;
+						font-weight: 700;
+						font-size: 28rpx;
+					}
+				}
+			}
+
+			.btn {
+				button {
+					font-size: 28rpx;
+					width: 100%;
+					background: #EEF0F8;
+					height: 63rpx;
+					line-height: 63rpx;
+					border: none;
+					outline: none;
+					border-radius: 16rpx;
+
+					&:after {
+						border: none;
+					}
+
+					&.active {
+						color: #fff;
+						background: #14A478;
+					}
+				}
+			}
+
+		}
+
+
+	}
+
+	/deep/.u-calendar__action {
+		display: flex;
+		justify-content: space-around;
+
+		.u-calendar__action__text {
+			line-height: 25px;
+		}
+	}
+
+	.red {
+		color: rgb(235, 103, 101);
+	}
+
+	.consoleList {
+		padding: 32rpx;
+		background: #fff;
+		border-radius: 16rpx;
+		margin-top: 32rpx;
+		min-height: calc(100vh - 1020rpx);
+
+		.title {
+			margin: 0;
+			margin-bottom: 16rpx;
+			color: #042118;
+			font-weight: 600;
+		}
+
+		.histimeBox {
+			margin: 32rpx 0;
+		}
+
+
+
+		.tableList {
+			font-size: 28rpx;
+			height: 93rpx;
+			color: #042118;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			border-bottom: 2rpx solid var(--neutral-color-border-base, #DCE6E3);
+
+			view {
+				text-align: center;
+			}
+
+			.success {
+				color: #14A478;
+			}
+
+			.error {
+				color: #FF5951;
+			}
+
+			view:nth-child(1) {
+				width: 160rpx;
+				text-align: left;
+			}
+
+			view:nth-child(2) {
+				width: 170rpx;
+			}
+
+			view:nth-child(3) {
+				width: 120rpx;
+			}
+		}
+
+		.tableTitle {
+			/* background: #E8F3F0; */
+			color: #042118;
+			font-weight: 500;
+			height: 78rpx;
+		}
+	}
+
+	.histimeBox {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		height: 56rpx;
+		padding: 6rpx 24rpx;
+		box-sizing: border-box;
+		border-radius: 8rpx;
+		margin-top: 54rpx;
+		border: 2rpx solid var(--neutral-color-border-light, #e4edea);
+
+		.u-icon {
+			z-index: 10;
+		}
+
+		.time {
+			width: 280rpx;
+			color: #c1c1c1;
+		}
+
+		view {
+			color: #333333;
+			text-align: center;
+		}
+
+	}
+
+	.btn-box {
+		text-align: center;
+	}
+</style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1137 - 0
pages/index/index2.vue


+ 457 - 0
pages/monitor/dgpImagelist.vue

@@ -0,0 +1,457 @@
+<template>
+  <view>
+    <view class="" style="position: relative; top: 5px">
+      <!-- <view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="查看图片"></uni-nav-bar>
+			</view> -->
+      <p class="tishi" v-if="tishi">暂无数据</p>
+	<view style="position: fixed; z-index: 100;">
+		
+	
+	  <view class="tab-box">
+	  	<u-tabs :list="equipArr"  :current="active" active-color="#14A478" @change="tabClick"></u-tabs>
+	  </view>
+	  <view class="selecttimes" @click="tiemshow = !tiemshow">
+	    <view class="timesbox">
+	      <image
+	        :src="
+	          $imageURL+ '/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>
+      <view class="imglist">
+        <view
+          class="imglist_box"
+          v-for="(item, index) in imglists"
+          :key="index"
+        >
+          <view class="imglist_left">
+            <image
+              :src="
+                $imageURL+ '/bigdata_app' +
+                '/image/cb/jiazai.ui.gif'
+              "
+              mode=""
+            >
+            </image>
+            <image :src="item.photo" mode="" @click="examine(item.photo)"></image>
+          </view>
+          <view class="imglist_right">
+            <view class="icon_box" @click="delimg(item.photo_id)">
+              <i class="yficonfont icon-shanchu"></i>
+            </view>
+			<p>设备名称:{{ item.device_name  }}</p>
+			<p>所属场景:{{ item.index_name  }}</p>
+			<p>类型:{{ item.index_type  }}</p>
+			<p>指数:{{ item.index_value  }}</p>
+            <p >{{ item.addtime | timeFormat() }}</p>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="top" v-if="isTop" @click="top">
+      <image
+        :src="
+          $imageURL+ '/bigdata_app' +
+          '/image/6209a98f0cb3b5086f2ca36152c9269.png'
+        "
+        mode=""
+      ></image>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      page: 1,
+      imglists: [],
+      tishi: true,
+      d_id: '',
+      timeend: '', //当前时间 也是搜索的结束时间
+      timestate: '',
+      timeshow: false,
+      params: {
+        year: true,
+        month: true,
+        day: true,
+        hour: true,
+        minute: true,
+        second: false,
+      },
+      flag: 1,
+      self: true,
+      isTop: false,
+      resultdata: {},
+      titletext: ['24小时', '近一个月', '近半年', '近一年'],
+      titleidnex: 0,
+      tiemshow: false, //时间选择器
+      disable: '',
+      device_type: '',
+      myuid: '',
+	  active:0,
+	  equipArr:[
+		          { name: '全部', value: '全部' },
+		        { name: 'NDVI(归一化差值植被指数)', value: 'NDVI' },
+		             { name: 'GNDVI(绿度归一化差值植被指数)', value: 'GNDVI' },
+		             { name: 'OSAVI(优化土壤调节植被指数)', value: 'OSAVI' },
+		             { name: 'LCI(叶叶绿素指数)', value: 'LCI' },
+		             { name: 'NDRE(红边归一化差值植被指数)', value: 'NDRE' }
+	  ],
+	  device_type:''
+    };
+  },
+  methods: {
+	  examine(url) {
+	  				var imgarr =[]
+	  				imgarr.push(url)
+	  				console.log(imgarr)
+	  				uni.previewImage({
+	  					urls: imgarr
+	  				});
+	  			},
+    	tabClick(index) {
+			this.page = 1
+    				this.imglists = []
+    				this.active = index;
+    				this.device_type = this.equipArr[index].value
+
+    				    if (this.timestate != '') {
+    				      this.timestate = parseInt(this.timestate);
+    				    }
+    				    if (this.timeend != '') {
+    				      this.timeend = parseInt(this.timeend);
+    				    }
+    				    this.imglistdata(this.timestate, this.timeend);
+    			},
+    async imglistdata(time_begin, time_end) {
+      //获取图片列表
+      const res = await this.$myRequest({
+        url: '/api/api_gateway?method=camera.camera_manage.multi_camera_photo',
+        data: {
+          device_id: this.device_id,
+          page: this.page,
+          page_size: 8,
+          start: time_begin, //开始时间
+          end: time_end, //结束时间
+		  index_type: this.device_type === '全部' ? '' : this.device_type
+        },
+      });
+      this.imglists = this.imglists.concat(res.data);
+      console.log(this.imglists);
+      if (this.imglists.length == 0) {
+        this.tishi = true;
+      } else {
+        this.tishi = false;
+      }
+    },
+    //forecast.forecast_system.equip_photo_del
+    async del(id) {
+      //删除图片
+      const res = await this.$myRequest({
+        url: '/api/api_gateway?method=camera.camera_manage.multi_camera_photo_delete',
+        data: {
+          // device_id: this.device_id,
+          photo_id: id,
+        },
+      });
+      if (res) {
+        uni.showToast({
+          title: '删除成功!',
+          duration: 2000,
+        });
+        this.page = 1;
+        this.imglists = [];
+        if (this.timestate != '') {
+          this.timestate = parseInt(this.timestate);
+        }
+        if (this.timeend != '') {
+          this.timeend = parseInt(this.timeend);
+        }
+        this.imglistdata(this.timestate, this.timeend);
+      } else {
+        uni.showToast({
+          title: '删除失败!',
+          duration: 2000,
+          icon: 'none',
+        });
+      }
+    },
+    //forecast.forecast_system.equip_photo_species  pest_list
+    //forecast.forecast_system.equip_photo_species统计
+
+    //forecast.send_control.admin_device_control 拍照
+    clickLeft() {
+      uni.navigateBack({
+        delta: 1,
+      });
+    },
+    delimg(id) {
+      //删除图片
+      uni.showModal({
+        title: '提示',
+        content: '是否删除此图片?',
+        success: (res) => {
+          if (res.confirm) {
+            this.del(id);
+            console.log('用户点击确定');
+          } else if (res.cancel) {
+            console.log('用户点击取消');
+          }
+        },
+      });
+    },
+    top() {
+      uni.pageScrollTo({
+        scrollTop: 0,
+        duration: 500,
+      });
+    },
+    tiemchange(e) {
+      this.imglists = [];
+      this.page = 1;
+      console.log(e);
+      this.timestate = +new Date(e.startDate) / 1000 - 8 * 60 * 60;
+      this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60;
+      this.imglistdata(parseInt(this.timestate), parseInt(this.timeend));
+    },
+    timetab(e) {
+      if (!e) return '请选择';
+      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) {
+    uni.getStorage({
+      key: 'myuid',
+      success: (res) => {
+        this.myuid = res.data;
+        console.log(this.myuid);
+      },
+    });
+    // this.timeend = +new Date() / 1000
+    // this.timestate = this.timeend - 60 * 60 * 24
+    console.log(option);
+    this.device_id = option.id;
+    console.log(this.timestate);
+    this.imglistdata('', '');
+  },
+  onShow() {},
+  onReachBottom() {
+    this.page++;
+    console.log(this.timestate);
+    if (this.timestate != '') {
+      this.timestate = parseInt(this.timestate);
+    }
+    if (this.timeend != '') {
+      this.timeend = parseInt(this.timeend);
+    }
+    this.imglistdata(this.timestate, this.timeend);
+  },
+  onPageScroll(e) {
+    //nvue暂不支持滚动监听,可用bindingx代替
+    if (e.scrollTop > 200) {
+      //距离大于200时显示
+      this.isTop = true;
+    } else {
+      //距离小于200时隐藏
+      this.isTop = false;
+    }
+  },
+};
+</script>
+
+<style lang="scss">
+.tishi {
+  position: absolute;
+  top: 45%;
+  width: 95%;
+  left: 2.5%;
+  text-align: center;
+  font-size: 40rpx;
+}
+
+.selecttimes {
+  width: 100%;
+  // position: fixed;
+  // top: 0;
+  // left: 0;
+  z-index: 100;
+  background-color: #fff;
+  padding: 10rpx 20rpx;
+ box-sizing: border-box;
+  .timesbox {
+    display: flex;
+    width:100%;
+    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;
+    }
+  }
+
+  ::v-deep .u-calendar__action {
+    display: flex;
+    justify-content: space-around;
+
+    .u-calendar__action__text {
+      line-height: 25px;
+    }
+  }
+}
+
+.timeshow {
+  width: 96%;
+  height: 50rpx;
+  background-color: #ffffff;
+  position: fixed;
+  top: 10px;
+  left: 2.5%;
+  display: flex;
+  z-index: 100;
+  padding-top: 10px;
+
+  .shuju_one_title {
+    width: 70%;
+    margin: 0 auto;
+    display: flex;
+
+    .tltle_text {
+      width: 25%;
+      border: 2rpx solid #b2b2b2;
+      color: #b2b2b2;
+      text-align: center;
+      font-size: 24rpx;
+      height: 50rpx;
+      line-height: 50rpx;
+    }
+
+    .title_text_color {
+      width: 25%;
+      border: 2rpx solid #28ae4f;
+      color: #28ae4f;
+      text-align: center;
+      font-size: 24rpx;
+      height: 50rpx;
+      line-height: 50rpx;
+    }
+  }
+
+  .timeshow_tate,
+  .timeshow_end {
+    height: 50rpx;
+    width: 45%;
+    line-height: 50rpx;
+    text-align: center;
+    margin-right: 10rpx;
+    background-color: #56c877;
+    color: #ffffff;
+  }
+}
+
+.imglist {
+  position: absolute;
+  top: 95px;
+	width: 100%;
+	padding: 0 20rpx;
+	
+	box-sizing: border-box;
+  .imglist_box {
+    display: flex;
+    box-shadow: 0 0 10rpx #bcb9ca;
+    padding: 20rpx;
+    margin-bottom: 20rpx;
+    height: 140px;
+  }
+
+  .imglist_left {
+    width: 50%;
+    position: relative;
+
+    image {
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+    }
+  }
+
+  .imglist_right {
+    margin-left: 40rpx;
+    padding-top: 26rpx;
+	position: relative;
+	p{
+		line-height: 24px;
+	}
+    .icon_box {
+		position: absolute;
+		top: -12rpx;
+		right: -42rpx;
+      // margin-bottom: 12rpx;
+		font-size: 24rpx;
+
+      .yficonfont {
+        margin-right: 20rpx;
+        color: #ff5951;
+        font-size: 32rpx;
+      }
+    }
+
+    p:last-child {
+      margin-bottom: 0;
+    }
+  }
+}
+
+.top {
+  position: fixed;
+  right: 30px;
+  bottom: 100px;
+  z-index: 100;
+
+  image {
+    width: 100rpx;
+    height: 100rpx;
+  }
+}
+	.tab-box {
+		font-size: 30rpx;
+		line-height: 80rpx;
+		background-color: #ffffff;
+		width: 100vw;
+		z-index: 2;
+		margin-top: -10rpx;		
+	}
+</style>

+ 66 - 0
pages/webviewdgp/webview.vue

@@ -0,0 +1,66 @@
+<template>
+  <view class="webview-container">
+    <view class="webview">
+      <web-view :src="url" id="webcon" cache-control="no-cache">
+      </web-view>
+    </view>
+  </view>
+</template>
+
+<script>
+
+	export default {
+		data() {
+			return {
+				url: '',
+				device_id: '',
+				accessToken: ''
+			}
+		},
+		onLoad(options) {
+			this.device_id = options.device_id
+			this.accessToken = uni.getStorageSync('session_key')
+      console.log(this.accessToken,'accessTokenaccessToken')
+			// 使用修改后的h52.html,支持dgp播放
+			this.url = "https://wx.hnyfwlw.com/wexin/h52.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken + "&videoType=dgp"
+			// this.url = "https://demo.nyzhwlw.com/wechat?device_id=" + this.device_id + "&accessToken=" + this.accessToken
+			//设置 webview 界面的状态栏的 title
+			uni.setNavigationBarTitle({
+				title: '监控详情'
+			});
+			
+			// 监听来自webview的消息
+			window.addEventListener('message', (event) => {
+				console.log('收到webview消息:', event.data);
+				if (event.data && event.data.type === 'navigate') {
+					uni.navigateTo({
+						url: event.data.url
+					});
+				}
+			});
+		},
+		methods: {
+      nativeTo(){
+        uni.navigateTo({
+					url: '/pages/monitor/imagelist?id=' + this.device_id
+				})
+      },
+      nativeToLanch(){
+				uni.navigateTo({
+					url: '/pages/monitor/dgpImagelist?id=' + this.device_id
+				})
+      },
+		}
+	}
+</script>
+
+<style>
+.webview-container{
+  height: 100vh;
+}
+.webview {
+  width: 100vw;
+  height: 90vh;
+}
+
+</style>

+ 539 - 0
static/font/demo.css

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3938 - 0
static/font/demo_index.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 668 - 0
static/font/iconfont.css


BIN
static/font/iconfont.eot


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
static/font/iconfont.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1150 - 0
static/font/iconfont.json


Dosya farkı çok büyük olduğundan ihmal edildi
+ 245 - 0
static/font/iconfont.svg


BIN
static/font/iconfont.ttf


BIN
static/font/iconfont.woff


BIN
static/font/iconfont.woff2


+ 549 - 0
static/h52dgp.html

@@ -0,0 +1,549 @@
+<!DOCTYPE html>
+<html lang=zh-CN>
+	<head>
+		<meta charset="utf-8" />
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<title>监控详情页</title>
+		<link href="https://unpkg.com/video.js@7.10.2/dist/video-js.min.css" rel="stylesheet" />
+		<link rel="stylesheet" href="./font/iconfont.css" />
+		<style type="text/css">
+			body {
+				margin: 0;
+				background-color: #f3f3f3;
+			}
+
+			span.vjs-control-text {
+				display: none;
+			}
+
+			/* iframe {
+				width: 375px;
+				height: 667px;
+				background-color: #fff;
+				box-sizing: content-box;
+				border: none;
+			} */
+			.btn-box {
+				margin-top: 20px;
+				display: flex;
+				flex-direction: row;
+				justify-content: space-around;
+				align-items: center;
+			}
+
+			.btn-container {
+				position: relative;
+			}
+
+			.videoBtnPlay {
+				position: absolute;
+				height: 100px;
+				width: 100px;
+				top: 50%;
+				left: 50%;
+				transform: translate(-50%, -50%);
+			}
+
+			.more,
+			.less {
+				flex: 1
+			}
+
+			img {
+				width: 100%;
+			}
+
+			.direc {
+				width: 150px;
+				height: 150px;
+				background: url('https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/monitor/1.png');
+				background-size: 100% auto;
+				background-repeat: no-repeat;
+				position: relative;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.direc div {
+				width: 50px;
+				height: 50px;
+				position: absolute;
+			}
+
+			.photo {
+				font-size: 30px;
+				color: #4ec467;
+				padding: 16px;
+			}
+
+			.top {
+				top: 0;
+				left: 50px
+			}
+
+			.bottom {
+				bottom: 0;
+				left: 50px
+			}
+
+			.left {
+				left: 0;
+				top: 50px
+			}
+
+			.right {
+				right: 0;
+				top: 50px
+			}
+
+			#box {
+				height: 300px;
+				width: 100%;
+				background: #000;
+				overflow: hidden;
+			}
+
+			#dialog {
+				display: none;
+				min-width: 200px;
+				line-height: 80px;
+				background: rgba(0, 0, 0, .8);
+				color: #fff;
+				text-align: center;
+				position: absolute;
+				left: 50%;
+				margin-left: -100px;
+				border-radius: 4px;
+				z-index: 999;
+				top: 50%;
+				margin-top: -40px;
+			}
+
+			.imgBtn {
+				position: absolute;
+				width: 100%;
+				padding: 10px;
+				bottom: 0;
+				left: 0;
+				text-align: center;
+				color: #338cd9;
+				font-size: 16px;
+				box-sizing: border-box;
+				display: flex;
+				justify-content: center;
+				gap: 16px;
+			}
+
+			.imgBtn div {
+				/* padding: 0 16px; */
+			}
+
+			.imgBtn img {
+				display: inline-block;
+				width: 20px;
+				height: 20px;
+				vertical-align: middle;
+				margin-right: 2px;
+				margin-bottom: 3px;
+			}
+
+			.imgBtnDgp {
+				display: none;
+			}
+			#myCanvas{
+				display: none;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="btn-container">
+			<div id="box">
+				
+			</div>
+			<div class="videoBtnPlay">
+				<img src="https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/wxplayer.png" />
+			</div>
+		</div>
+		<div id="dialog">
+
+		</div>
+		<canvas id="myCanvas" width="400" height="300"></canvas>
+		<div class="btn-box">
+			<div class="more" ontouchstart="_configCamera('move', 8)" ontouchend="_stopConfigCamera()">
+				<image src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/monitor/3.png" mode="widthFix">
+				</image>
+			</div>
+			<div class="direc">
+				<div class="top" ontouchstart="_configCamera('move', 0)" ontouchend="_stopConfigCamera()">
+
+				</div>
+				<div class="bottom" ontouchstart="_configCamera('move', 1)" ontouchend="_stopConfigCamera()">
+
+				</div>
+				<p class="photo yficonfont icon-paizhao-xianxing" ontouchstart="_configCamera('takephoto', '')">
+
+				</p>
+				<div class="left" ontouchstart="_configCamera('move', 2)" ontouchend="_stopConfigCamera()">
+
+				</div>
+				<div class="right" ontouchstart="_configCamera('move', 3)" ontouchend="_stopConfigCamera()">
+
+				</div>
+			</div>
+			<div class="less" ontouchstart="_configCamera('move', 9)" ontouchend="_stopConfigCamera()">
+				<image src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/monitor/2.png" mode="widthFix">
+				</image>
+			</div>
+		</div>
+		<div class="imgBtn">
+			<div class="imgBtnCamrea"> <img
+					src="https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/img_icon.png" />查看图片</div>
+			<div class="imgBtnDgp"><img
+					src="https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/img_icon.png" />查看光谱图片</div>
+
+		</div>
+	</body>
+	<!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script> -->
+	<!-- 微信 JS-SDK 如果不需要兼容小程序,则无需引用此 JS 文件。 -->
+	<!-- <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> -->
+	<!-- uni 的 SDK -->
+	<!-- <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script> -->
+
+	<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+	<!-- <script src="https://unpkg.com/video.js@7.10.2/dist/video.min.js"></script> -->
+<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> 
+	<!-- uni 的 SDK -->
+	<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
+<script src="https://unpkg.com/video.js@7.10.2/dist/video.min.js"></script>
+	<!-- <script src="./js/flv.min.js"></script> -->
+	<script >
+		// import Player from './videoPlayer/videoPlay-js.js'
+		// const domin = 'https://wx.hnyfwlw.com'
+		const domin = 'http://218.28.198.186:10508'
+		
+		let player = null
+		let stopTimer = 0
+		//上下左右和拍照
+		var str = window.location.search.substr(1)
+		var arr = str.split('&')
+		console.log(str, arr, '参数');
+		var device_id = arr[0].split('=')[1]
+		var accessToken = arr[1].slice(12)
+		var videoType = arr[2]?.split('=')[1]
+		var token = accessToken
+
+		window._configCamera = configCamera;
+		window._stopConfigCamera = stopConfigCamera;
+		window._postPic = postPic;
+		if (videoType == 'dgp') {
+			$('.imgBtnDgp').show()
+		} else {
+			$('.imgBtnDgp').hide()
+		}
+		function captureFrame() {
+		  const video = document.getElementById('myPlayer_html5_api');
+		  const canvas = document.getElementById('myCanvas');
+		  const ctx = canvas.getContext('2d');
+		  
+		  // 设置 canvas 尺寸与视频一致
+		  canvas.width = video.videoWidth;
+		  canvas.height = video.videoHeight;
+		  console.log(ctx,'---')
+		  // 绘制当前帧到 canvas
+		  ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
+		  
+		  // 获取图片数据
+		  const imageData = canvas.toDataURL('image/jpg');
+		  canvas.toBlob((blob)=>{
+			  
+			  postPic(blob)
+		  }, 'image/jpg', 0.92);
+		  // postPic(imageData)
+		  // // 可以创建图片显示或下载
+		  // const img = new Image();
+		  // img.src = imageData;
+		  // document.body.appendChild(img);
+		  
+		  // // 或者下载图片
+		  // downloadImage(imageData, 'captured-frame.png');
+		}
+		function initFlvPlayer(hlsHdSrc) {
+			var playHtml =
+				`<video width="100%" height="300px" id="huifangPlayer" controls autoplay muted></video>`;
+			$("#box").html(playHtml)
+			const container = document.getElementById('huifangPlayer')
+
+			if (flvjs.isSupported()) {
+				// console.log(videoElement);
+				// let hlsHdSrc =
+				// 	'https://cmgw-vpc.lechange.com:8890/flv/LCO/BE049D6PAJ704F1/0/1/20251126103056/openhze749205130814fecba32ac68f5d30fe0.flv?proto=https&source=open';
+				// 创建 FLV 播放器实例
+				player = flvjs.createPlayer({
+					type: 'flv', // 设置视频类型为 FLV
+					isLive: true, // 指定这是点播
+					hasAudio: false, // 指定视频流中没有音频
+					url: hlsHdSrc
+				})
+
+				// 将播放器绑定到 HTML 视频元素
+				player.attachMediaElement(container)
+				// 加载视频流
+				player.load()
+				// 播放视频
+				player.play()
+
+			}
+		}
+
+		function destroyPlayer() {
+			if (player) {
+				const container = document.getElementById('huifangPlayer')
+				player.pause()
+				player.unload()
+				player.detachMediaElement()
+				player.destroy()
+				player = null
+				player = ''
+			}
+		}
+
+		function configCamera(ctrl, movenum) {
+			if (ctrl == "takephoto") {
+				if (player) {
+					// 云联的拍照特殊处理
+					// player.screenshot('yunlianPlayer')
+					$('#dialog').html('拍照指令正在下发,请等待...').stop().show(50)
+					captureFrame()
+				} else {
+
+					$('#dialog').html('拍照指令正在下发,请等待...').stop().show(50)
+					let url = domin+"/api/api_gateway?method=camera.camera_manage.camera_takephoto"
+					if (videoType == 'dgp') {
+						url = domin+"/api/api_gateway?method=camera.camera_manage.multi_camera_takephoto"
+					}
+					$.ajax({
+						type: "POST",
+						url: url,
+						data: {
+							device_id: device_id,
+							token
+						}
+					}).then((res) => {
+
+						if (res.message == '') {
+							$('#dialog').html('拍照成功').stop().show(500).delay(1000).hide(500)
+						} else {
+							$('#dialog').html(res.message).stop().show(500).delay(1000).hide(500)
+						}
+					});
+				}
+
+			} else {
+				let url = domin+"/api/api_gateway?method=camera.camera_manage.ctrl_camera"
+				let postData = {
+					device_id: device_id,
+					token
+				}
+				if (videoType == 'dgp') {
+					url = domin+"/api/api_gateway?method=camera.camera_manage.multi_ctrl_camera"
+					postData.ctrl = movenum
+				} else {
+					postData.ctrl = ctrl
+					postData.movenum = movenum
+				}
+				//上下左右、放大、缩小
+				$.ajax({
+					type: "POST",
+					url: url,
+					data: postData
+				}).then((res) => {
+					$('#dialog').html('指令下发成功,请等待...').stop().show(500).delay(3000).hide(500)
+				})
+			}
+		}
+
+		function stopConfigCamera() {
+			if (player) {
+				// 云联不需要停止
+				return
+			}
+			if (videoType == 'dgp') {
+				if (stopTimer) clearTimeout(stopTimer)
+				stopTimer = setTimeout(() => {
+					$.ajax({
+						type: "POST",
+						url: domin+"/api/api_gateway?method=camera.camera_manage.mulit_stop_move",
+						data: {
+							device_id: device_id,
+							token
+						},
+					});
+				}, 3000)
+
+			} else {
+				$.ajax({
+					type: "POST",
+					url: domin+"/api/api_gateway?method=camera.camera_manage.ctrl_camera",
+					data: {
+						device_id: device_id,
+						ctrl: "stop",
+						token
+					},
+				});
+			}
+		}
+
+		function postPic(file) {
+			let form = new FormData()
+			form.append('img_file', file)
+			form.append('device_id', device_id)
+			form.append('token', token)
+			$.ajax({
+				type: "POST",
+				url: domin+"/api/api_gateway?method=camera.camera_manage.save_camera_photo",
+				contentType: false,
+				processData: false,
+				data: form
+			}).then((res) => {
+
+				if (res.message == '') {
+					$('#dialog').html('拍照成功').stop().show(500).delay(1500).hide(500)
+				} else {
+					$('#dialog').html(res.message).stop().show(500).delay(1500).hide(500)
+				}
+			});
+
+		}
+
+		$('.videoBtnPlay').click(function() {
+			$('.videoBtnPlay').hide()
+			if (videoType == 'dgp') {
+				$.ajax({
+					type: "POST",
+					url: domin+"/api/api_gateway?method=camera.camera_manage.multi_addr_camera",
+					data: {
+						device_id: device_id,
+						token
+					}
+				}).then((res) => {
+					// console.log(JSON.stringify(res))
+					if (res.message == '') {
+						var data = null
+						if (typeof res.data == 'string') {
+							data = eval('(' + res.data + ')');
+						} else {
+							data = res.data;
+						}
+						console.log(data, 'data');
+
+						let hlsHdSrc = data.rtmp;
+						var playHtml =
+							`<video id="myPlayer"   poster='' controls playsInline  webkit-playsinline src=${hlsHdSrc}  style="width:100%; height:100%;"></video>`;
+						$("#box").html(playHtml)
+						var myVideo = videojs(`myPlayer`, {
+							controls: true,
+							autoplay: 'play',
+							url: hlsHdSrc,
+							sources: [{
+								type: 'application/x-mpegURL',
+								src: hlsHdSrc,
+							}],
+						}, function onPlayerReady() {
+							myVideo.play()
+							console.log('准备好了')
+						});
+						myVideo.on('play', function() {
+							console.log('开始播放')
+						})
+
+
+					} else {
+						alert(res.message)
+					}
+
+				})
+
+			} else {
+				$.ajax({
+					type: "POST",
+					url: domin+"/api/api_gateway?method=camera.camera_manage.addr_camera",
+					// url: "http://192.168.0.117:8003/api/api_gateway?method=camera.camera_manage.addr_camera",
+					data: {
+						device_id: device_id,
+						is_dahua_app:'1',
+						token
+						// device_id: 'FA8690323-1',
+						// token: localStorage.getItem('session_key')
+					}
+				}).then((res) => {
+					if (res.message == '') {
+						var data = null
+						if (typeof res.data == 'string') {
+							data = eval('(' + res.data + ')');
+						} else {
+							data = res.data;
+						}
+						var hlsHdSrc = ""
+						if (data.type_id == 2) {
+							// 大华云联
+							// initFlvPlayer(data.rtsp)
+				
+							player = 1
+							hlsHdSrc = data.rtsp;
+						} else {
+							hlsHdSrc = data.type_id == 0 ? data.hls : data.hlsHd;
+						}
+						var playHtml =
+							`<video id="myPlayer"   poster='' controls playsInline  webkit-playsinline src=${hlsHdSrc}  style="width:100%; height:100%;"></video>`;
+						$("#box").html(playHtml)
+						var myVideo = videojs(`myPlayer`, {
+							controls: true,
+							autoplay: 'play',
+							url: hlsHdSrc,
+							sources: [{
+								type: 'application/x-mpegURL',
+								src: hlsHdSrc,
+							}],
+						}, function onPlayerReady() {
+							myVideo.play()
+							console.log('准备好了')
+						});
+						myVideo.on('play', function() {
+							console.log('开始播放')
+						})
+					} else {
+						alert(res.message)
+					}
+
+				})
+
+			}
+
+		})
+		document.addEventListener('UniAppJSBridgeReady', function() {
+
+			$('.imgBtnCamrea').click(function() {
+				// if (player) {
+				// 	player.close('yunlianPlayer')
+				// 	player = null
+				// }
+
+				uni.navigateTo({
+					url: '/pages/monitor/imagelist?id=' + device_id
+				})
+			})
+			$('.imgBtnDgp').click(function() {
+				// if (player) {
+				// 	player.close('yunlianPlayer')
+				// 	player = null
+				// }
+
+				uni.navigateTo({
+					url: '/pages/monitor/dgpImagelist?id=' + device_id
+				})
+			})
+		});
+	</script>
+</html>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
static/videoPlayer/playerWasm/PlaySDKInterface.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1023 - 0
static/videoPlayer/playerWasm/public.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1147 - 0
static/videoPlayer/videoPlay-js.js