yf_elsa.cui пре 12 часа
родитељ
комит
a588275ebe

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

+ 6 - 9
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"
 			}
 		},
 		{

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

+ 911 - 0
pages/equipList - 副本/index.vue

@@ -0,0 +1,911 @@
+<template>
+  <view>
+    <!-- <view class="status_bar"></view>
+		<view style="position: fixed;top:44px;z-index: 100;width: 100%;">
+			<uni-nav-bar right-icon="search" title="设备列表" @clickRight="clickRight"></uni-nav-bar>
+			
+		</view> -->
+    <view class="textbox">
+      <view class="inputs">
+        <!-- <u-input v-model="imports" type="text" :border="true" /> -->
+        <u-search
+          placeholder="请输入设备ID"
+          v-model="imports"
+          placeholder-color="#909696"
+          :show-action="false"
+          search-icon-color="#909696"
+          @input="searchinput"
+        >
+        </u-search>
+        <!-- <input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinput"
+					class="inputbox" :clearable="false" />
+				<u-icon name="search" size="40" class="icon" @click="search"></u-icon> -->
+      </view>
+      <view class="listbox">
+        <view class="listbox_left">
+          <view
+            :class="
+              currents == index
+                ? 'listbox_left_item_act listbox_left_item'
+                : 'listbox_left_item'
+            "
+            v-for="(item, index) in list"
+            :key="index"
+            @click="change(index)"
+          >
+            {{ item.name }}
+          </view>
+        </view>
+        <!-- <view class="list" @scroll='showOut' ref="sollo" id="list"> -->
+        <scroll-view
+          :scroll-top="0"
+          :scroll-y="true"
+          class="list scroll-Y"
+          @scrolltoupper="upper"
+          @scrolltolower="lower"
+          @scroll="scroll"
+        >
+          <view
+            class="list_item"
+            v-for="(item, index) in eqlistdata"
+            :key="index"
+            @click="historys(item)"
+          >
+            <view class="list_item_top">
+              <p class="p1">
+                <image
+                  :src="
+                    $imageURL+'/bigdata_app/image/fourMoodBase/' +
+                    type_id +
+                    '.png'
+                  "
+                  mode=""
+                ></image>
+                <view>{{
+                  item.device_name == '' ? '--' : item.device_name
+                }}</view>
+              </p>
+              <p
+                v-if="![11, 19, 20].includes(type_id)"
+                :class="[item.is_online ? 'p2' : 'p_out']"
+              >
+                {{ item.is_online ? '在线' : '离线' }}
+              </p>
+            </view>
+            <view class="list_item_text">
+              <p>设备ID:{{ item.only_for_show || item.device_id }}</p>
+              <p>
+                适配用户:{{ item.real_name == '' ? '无' : item.real_name }}
+              </p>
+
+              <p v-if="type_id == 40 || type_id == 42">
+                最新上报时间:{{ item.uptime }}
+              </p>
+              <p v-else>最新上报时间:{{ item.uptime | timeFormat() }}</p>
+              <p v-if="type_id == 40 || type_id == 42">
+                添加设备时间:{{ item.addtime }}
+              </p>
+              <span v-else>
+                <p v-if="item.addtime === 0">添加设备时间:- -</p>
+                <p v-else>添加设备时间:{{ item.addtime | timeFormat() }}</p>
+              </span>
+              <p>设备已运行:{{ item.days }}天</p>
+            </view>
+            <view
+              class="list_item_btn"
+              v-if="
+                $QueryPermission(108) &&
+                ![13, 17, 18, 11, 19, 20, 14, 22, 25].includes(type_id)
+              "
+              @click.stop="modification(item)"
+            >
+              信息修改
+            </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
+    };
+  },
+  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 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-color: #00b075;
+}
+
+/deep/.uni-icons {
+  font-size: 40rpx !important;
+}
+
+.textbox {
+  width: 100%;
+  height: calc(100vh - 30rpx);
+  padding: 20rpx 6rpx;
+  box-sizing: border-box;
+  border-top-left-radius: 80rpx;
+  border-top-right-radius: 80rpx;
+  margin-top: 30rpx;
+  background-color: #f9f9f9;
+  box-sizing: border-box;
+}
+
+.inputs {
+  width: 95%;
+  margin: 0 auto;
+  /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 {
+  display: flex;
+  justify-content: space-around;
+  height: calc(100vh - 150rpx);
+  margin-top: 20rpx;
+
+  .listbox_left {
+    background-color: #fff;
+    padding: 20rpx 10rpx 20rpx 0;
+    width: 240rpx;
+    overflow: auto;
+
+    .listbox_left_item {
+      height: 50rpx;
+      width: 100%;
+      margin-bottom: 20rpx;
+      text-align: center;
+      border-radius: 10rpx;
+      line-height: 50rpx;
+      overflow: hidden; //溢出隐藏
+      white-space: nowrap; //禁止换行
+      text-overflow: ellipsis; //...
+    }
+
+    .listbox_left_item_act {
+      background-color: rgba(0, 176, 117, 0.2);
+      color: #00b075;
+    }
+  }
+}
+
+.list {
+  width: calc(100vw - 300rpx);
+  background-color: #fdfdfd;
+  // margin-bottom: 100rpx;
+  overflow-y: auto;
+
+  .list_item {
+    width: 100%;
+    margin: 0 auto 20rpx;
+    padding: 20rpx 20rpx;
+    box-sizing: border-box;
+    position: relative;
+    background-color: #ffffff;
+    box-shadow: 0 0 10rpx #bcb9ca;
+
+    .list_item_top {
+      display: flex;
+      justify-content: space-between;
+
+      .p1 {
+        width: 86%;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        height: 60rpx;
+        line-height: 60rpx;
+        font-size: 28rpx;
+        overflow: hidden;
+
+        image {
+          width: 40rpx;
+          height: 40rpx;
+          vertical-align: text-top;
+          margin-right: 20rpx;
+        }
+
+        view {
+          width: calc(100% - 40rpx);
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+      }
+
+      .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;
+        word-break: break-all;
+      }
+
+      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;
+      bottom: 15rpx;
+      right: 20rpx;
+    }
+  }
+}
+
+.top {
+  position: fixed;
+  right: 30px;
+  bottom: 100px;
+  z-index: 100;
+
+  image {
+    width: 100rpx;
+    height: 100rpx;
+  }
+}
+</style>

+ 241 - 0
pages/equipList - 副本/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/equipList - 副本/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/equipList - 副本/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>

+ 507 - 0
pages/equipList - 副本/search.vue

@@ -0,0 +1,507 @@
+<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 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>

Разлика између датотеке није приказан због своје велике величине
+ 945 - 895
pages/equipList/index.vue


+ 832 - 0
pages/index/index - 副本.vue

@@ -0,0 +1,832 @@
+<template>
+	<view>
+		<view class="weather">
+			<image :src="
+          'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +
+          weatherinfo.wea +
+          '.png'
+        " mode="" class="weaimg"></image>
+			<view class="weatext">
+				<view class="weatext_title">
+					{{ hello }}
+				</view>
+				<view class=""> 欢迎登录云飞智控 </view>
+			</view>
+		</view>
+		<view class="weatherinfo">
+			<view class="weatherinfo_item">
+				<image :src="$imageURL+'/bigdata_app/newindex/weizhi.png'" mode="" class="weaimg">
+				</image>
+				<view class="textbox">
+					{{ weatherinfo.district || '-' }}
+				</view>
+			</view>
+			<view class="weatherinfo_item">
+				<image :src="$imageURL+'/bigdata_app/newindex/wendu.png'" mode="" class="weaimg"></image>
+				<view class="textbox"> {{ weatherinfo.at || '-' }}℃ </view>
+			</view>
+			<view class="weatherinfo_item">
+				<image :src="$imageURL+'/bigdata_app/newindex/shidu.png'" mode="" class="weaimg"></image>
+				<view class="textbox"> {{ weatherinfo.ah || '-' }} </view>
+			</view>
+			<view class="weatherinfo_item">
+				<view class="first_item"> PM2.5 </view>
+				<view class="textbox">
+					{{ weatherinfo.air_pm25 || '-' }}
+				</view>
+			</view>
+		</view>
+		<view class="functionbox">
+			<view class="functionbox_title"> 功能应用 </view>
+			<view class="functionbox_text">
+				<view class="functionbox_text_item" v-if="jurisdiction.sqtf" @click="tabfunction(0)">
+					<image :src="$imageURL+'/bigdata_app/newindex/base.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 四情基地 </view>
+				</view>
+				<view class="functionbox_text_item" @click="tabfunction(1)">
+					<image :src="$imageURL+'/bigdata_app/newindex/worm.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 田间随识 </view>
+				</view>
+				<view class="functionbox_text_item" v-if="jurisdiction.zjtf" @click="tabfunction(2)">
+					<image :src="$imageURL+'/bigdata_app/newindex/knowledge.png'" mode=""
+						class="itemimg"></image>
+					<view class=""> 知识百科 </view>
+				</view>
+				<view class="functionbox_text_item" @click="tabfunction(3)">
+					<image :src="$imageURL+'/bigdata_app/newindex/aftersale.png'" mode=""
+						class="itemimg"></image>
+					<view class=""> 售后服务 </view>
+				</view>
+			</view>
+		</view>
+		<view class="facilitybox">
+			<view class="facilitybox_title"> 系统设备 </view>
+			<view class="facilitybox_itembox">
+				<view class="facilitybox_item" v-if="jurisdiction.cbtf" @click="tabequipment('../cb/index/index')">
+					<image :src="$imageURL+'/bigdata_app/newindex/cb.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 测报系统 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.cbyj" @click="tabequipment('../cbqxyj/cbwarn')">
+					<image :src="$imageURL+'/bigdata_app/newindex/cbyj.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 测报预警 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.fztf" @click="tabequipment('../prevention/index')">
+					<image :src="$imageURL+'/bigdata_app/newindex/fz.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 防治系统 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../monitor/index')">
+					<image :src="$imageURL+'/bigdata_app/newindex/jk.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 监控系统 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.hjtf" @click="tabequipment('../environment/index')">
+					<image :src="$imageURL+'/bigdata_app/newindex/hj.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 环境监测 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.qxz" @click="tabequipment('../qxzyj/cbwarn', 5)">
+					<image :src="$imageURL+'/bigdata_app/newindex/qxyj.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 气象预警 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.sq" @click="tabequipment('../qxzyj/cbwarn', '15')">
+					<image :src="$imageURL+'/bigdata_app/newindex/sqyj.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 墒情预警 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.ggtf" @click="tabequipment('../irrigate/index')">
+					<image :src="$imageURL+'/bigdata_app/newindex/guangai.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 智能灌溉 </view>
+				</view>
+				<view class="facilitybox_item" v-if="jurisdiction.sbtf"
+					@click="tabequipment('../equipMange/index/index')">
+					<image :src="$imageURL+'/bigdata_app/newindex/user.png'" mode="" class="itemimg">
+					</image>
+					<view class=""> 用户管理 </view>
+				</view>
+			</view>
+		</view>
+		<view class="insectattack">
+			<view class="insectattack_title" @click="worm">
+				<view class=""> 虫情百科 </view>
+				<view class="iconbox">
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+			</view>
+			
+		</view>
+		<view class="insectattack">
+			<view class="insectattack_title" @click="virus">
+				<view class=""> 病害百科 </view>
+				<view class="iconbox">
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		// // 分享给朋友
+		// 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' // 分享图片,可选
+		//   }
+		// },
+		data() {
+			return {
+				weatherinfo: {
+					wea: '晴',
+				},
+				hello: '',
+				jurisdiction: {
+					cbtf: false,
+					jktf: false,
+					hjtf: false,
+					fztf: false,
+					sytf: false,
+					sbtf: false,
+					sqtf: false,
+					zjtf: false,
+					ggtf: false,
+					qxz: false,
+					sq: false,
+					cbyj: false,
+				},
+				show: false,
+				url: '',
+				loadTF: false
+			};
+		},
+		watch: {
+			url(news) {
+				if (news != '') {
+					uni.pageScrollTo({
+						scrollTop: 0,
+						duration: 500,
+					});
+				}
+			},
+		},
+		methods: {
+			moveHandle() {
+				return;
+			},
+			async getcity(lng, lat) {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=device.device_manage.weathers',
+					data: {
+						lng: lng,
+						lat: lat,
+					},
+				});
+				// uni.showToast({
+				// 	title: JSON.stringify(res[0]),
+				// 	duration: 20000,
+				// 	icon:'none'
+				// });
+				//    console.log(res);
+				this.weatherinfo = res[0];
+			},
+			async getUserlogin() {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=user.login.user_login_info',
+				});
+				// this.jurisdiction = {
+				// 	cbtf: false,
+				// 	jktf: false,
+				// 	hjtf: false,
+				// 	fztf: false,
+				// 	sytf: false,
+				// 	sbtf: false,
+				// 	sqtf: false,
+				// 	zjtf: false,
+				// }
+				uni.setStorage({
+					key: 'jurisdiction',
+					data: JSON.stringify(res.children),
+				});
+				uni.setStorage({
+					key: 'myuser_type',
+					data: JSON.stringify(res.myuser_type),
+				});
+				uni.setStorage({
+					key: 'myuid',
+					data: JSON.stringify(res.myuid),
+				});
+				let QueryPermission = (id) => {
+					let list = res.children;
+					for (var i = 0; i < list.length; i++) {
+						if (list[i].children) {
+							var data = list[i].children;
+							for (var j = 0; j < data.length; j++) {
+								if (data[j].children) {
+									var item = data[j].children;
+									for (var k = 0; k < item.length; k++) {
+										if (item[k].pur_id == id) {
+											return true;
+										}
+									}
+								}
+							}
+						}
+					}
+					return false;
+				};
+				this.jurisdiction = {
+					cbtf: false,
+					jktf: false,
+					hjtf: false,
+					fztf: false,
+					sytf: false,
+					sbtf: false,
+					sqtf: false,
+					zjtf: false,
+					qxz: QueryPermission(242),
+					sq: QueryPermission(284),
+					cbyj: QueryPermission(243),
+				};
+				console.log(res.children);
+				for (var i = 0; i < res.children.length; i++) {
+					switch (res.children[i].pur_id) {
+						case 36:
+							this.jurisdiction.cbtf = true; //"测报系统"
+							break;
+						case 42:
+							this.jurisdiction.jktf = true; //"可视农业"
+							break;
+						case 40:
+							this.jurisdiction.hjtf = true; //"环境监测系统"
+							break;
+						case 44:
+							this.jurisdiction.fztf = true; //"防治系统"
+							break;
+						case 58:
+							this.jurisdiction.sytf = true; //"溯源系统"
+							break;
+						case 28:
+							this.jurisdiction.sbtf = true; //"系统管理"
+							break;
+						case 25:
+							this.jurisdiction.sqtf = true; //"四情基地"
+							break;
+						case 124:
+							this.jurisdiction.zjtf = true; //"专家诊断"
+							break;
+							// case "灌溉控制系统":
+							// 	this.jurisdiction.sftf = true
+							// 	break;
+						case 202:
+							this.jurisdiction.ggtf = true; //"灌溉控制系统"
+							break;
+					}
+				}
+			},
+			tabfunction(index) {
+				if (index == 0) {
+					uni.navigateTo({
+						url: '../fourBase/index',
+					});
+				} else if (index == 1) {
+					// var that = this
+					// this.show = true
+					uni.navigateTo({
+						url: '/pages/identifyPest/identifyPest',
+					});
+				} else if (index == 2) {
+					uni.navigateTo({
+						url: '../expertDiagnosis/index',
+					});
+				} else if (index == 3) {
+					uni.navigateTo({
+						url: '../afterSale/index',
+					});
+				}
+			},
+			tabequipment(url, type) {
+				console.log(url);
+				uni.navigateTo({
+					url: `${url}${type ? `?typeId=${type}` : ''}`,
+				});
+			},
+			// onok(ev) {
+			//   this.path = this.url;
+			//   console.log(ev);
+			//   this.loadTF = true;
+			//   uni.showLoading({
+			//     mask: true,
+			//     success: function () {
+			//       console.log(999);
+			//     },
+			//   });
+			//   var publiukey = `-----BEGIN PUBLIC KEY-----
+			// MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6m92fXUrccS4SoLg4W4jPRNua
+			// 4BcRk4ldLcqPuQpD2Mds2+hw+Gi+0MUnshF/r/DTcCJgkt7rtoY9EB6/XJ6MFw14
+			// whhESFie/lZUWRsk8M89Rkr8m5rwmBl+uLAd5LopyshFqKTBXeT2ytHP1JCQLPBO
+			// 34Fy4/yEz4qEzkzBuwIDAQAB
+			// -----END PUBLIC KEY-----`;
+			//   var time = +new Date();
+			//   var str2 = 'YuNfEi' + time + 'YuNfEi';
+			//   var pubblicData = jsencrypt.setEncrypt(publiukey, str2);
+			//   if (this.flag == 2) {
+			//     console.log('111');
+			//     // pest.pests.insect_discern 虫害
+			//     uni.uploadFile({
+			//       // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+			//       url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
+			//       filePath: ev.path,
+			//       name: 'img_file',
+			//       formData: {
+			//         user: 'test',
+			//         sign: pubblicData,
+			//       },
+			//       success: (uploadFileRes) => {
+			//         this.loadTF = false;
+			//         console.log(JSON.parse(uploadFileRes.data));
+			//         uni.navigateTo({
+			//           url:
+			//             '../disandpests/index?datas=' +
+			//             uploadFileRes.data +
+			//             '&path=' +
+			//             ev.path,
+			//         });
+			//       },
+			//       fail(res) {
+			//         console.log(res);
+			//       },
+			//     });
+			//   } else if (this.flag == 1) {
+			//     //pest.pests.insect_discern病害识别
+			//     // uni.showLoading({
+			//     // 	title: '加载中'
+			//     // });
+			//     uni.uploadFile({
+			//       // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+			//       url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
+			//       filePath: ev.path,
+			//       name: 'img_file',
+			//       formData: {
+			//         user: 'test',
+			//         sign: pubblicData,
+			//       },
+			//       success: (uploadFileRes) => {
+			//         this.loadTF = false;
+			//         console.log(JSON.parse(uploadFileRes.data));
+			//         uni.navigateTo({
+			//           url:
+			//             '../disandpests/index?datas=' +
+			//             uploadFileRes.data +
+			//             '&path=' +
+			//             ev.path,
+			//         });
+			//       },
+			//     });
+			//   }
+			//   this.url = '';
+			// },
+			// oncancle() {
+			//   // url设置为空,隐藏控件
+			//   this.url = '';
+			// },
+			// confirm() {
+			//   this.flag = 1;
+			//   uni.chooseImage({
+			//     count: 1, //默认9
+			//     // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+			//     sourceType: ['camera', 'album'], //从相册选择
+			//     success: (res) => {
+			//       this.url = res.tempFilePaths[0];
+			//     },
+			//   });
+			//   console.log(1);
+			// },
+			// cancel() {
+			//   this.flag = 2;
+			//   uni.chooseImage({
+			//     count: 1, //默认9
+			//     // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+			//     sourceType: ['camera', 'album'], //从相册选择
+			//     success: (res) => {
+			//       console.log(1);
+			//       this.url = res.tempFilePaths[0];
+			//     },
+			//   });
+			// },
+			worm() {
+				uni.navigateTo({
+					url: '../expertDiagnosis/wormcase?name=虫情百科',
+				});
+			},
+			virus() {
+				uni.navigateTo({
+					url: '../expertDiagnosis/wormcase?name=病害百科',
+				});
+			},
+			introduce(id, title) {
+				uni.navigateTo({
+					url: '../expertDiagnosis/introduce?id=' + id + '&title=' + title,
+				});
+			},
+			checkLocationPermission(isTest) {
+				let session_key = uni.getStorageSync('session_key');
+				let _this = this;
+				// 当用户登录之后再弹位置权限框
+				if (session_key) {
+					uni.getSetting({
+						success(res) {
+							console.log(res);
+							if (res.authSetting['scope.userLocation']) {
+								uni.getLocation({
+									type: 'wgs84 ',
+									success: (res) => {
+										// console.log(res, 'loacation');
+										// uni.showToast({
+										// 	title: `${res.longitude}, ${res.longitude}`,
+										// 	duration: 20000,
+										// 	icon:'none'
+										// });
+										_this.getcity(res.longitude, res.latitude);
+									},
+									fail(e) {
+										// uni.showModal({
+										// 	title: '提示',
+										// 	content: JSON.stringify(e),
+										// 	success: function (res) {
+										// 		if (res.confirm) {
+										// 			console.log('用户点击确定');
+										// 		} else if (res.cancel) {
+										// 			console.log('用户点击取消');
+										// 		}
+										// 	}
+										// });
+										uni.showToast({
+											title: '系统未开启定位或未授权微信定位',
+											duration: 5000,
+											icon: 'none'
+										});
+									}
+								});
+							} else {
+								uni.authorize({
+									scope: 'scope.userLocation',
+									success: () => {
+										// 用户已授权
+										uni.getLocation({
+											type: 'wgs84 ',
+											success: (res) => {
+												console.log(res, 'loacation');
+												_this.getcity(res.longitude, res.latitude);
+											},
+										});
+									},
+									fail: () => {
+										// 用户拒绝授权,可引导用户至设置页手动开启
+										if (isTest) {
+											uni.showModal({
+												title: '需要授权',
+												content: '天气功能需要获取您的地理位置,请在设置中打开位置权限',
+												success: (modalRes) => {
+													if (modalRes.confirm) {
+														uni.openSetting()
+													} else {
+														uni.showToast({
+															title: '您拒绝了授权,将无法查看天气信息',
+															duration: 2000,
+															icon: 'none'
+														});
+													}
+												},
+											})
+										}
+									},
+								})
+							}
+						}
+					})
+				}
+			}
+		},
+		onLoad() {
+		
+			console.log(this.$imageURL)
+			var time = new Date();
+			var hours = time.getHours();
+			if (hours < 12) {
+				this.hello = '上午好!';
+			} else {
+				this.hello = '下午好!';
+			}
+			this.getUserlogin();
+			this.checkLocationPermission(true); // 首次加载弹框提醒
+		},
+		onShow() {
+			this.loadTF = false;
+			this.getUserlogin();
+			this.checkLocationPermission();
+		},
+	};
+</script>
+
+<style lang="less">
+	page {
+		background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/bg.png);
+		background-size: 100%;
+		background-repeat: no-repeat;
+		background-color: #f9f9f9;
+	}
+
+	.weather {
+		display: flex;
+		width: 85%;
+		margin: 0 auto;
+		padding-top: 40rpx;
+
+		.weaimg {
+			width: 296rpx;
+			height: 296rpx;
+		}
+
+		.weatext {
+			width: 300rpx;
+			text-align: center;
+			font-size: 36rpx;
+			color: #fff;
+			padding-top: 60rpx;
+			margin-left: 60rpx;
+
+			.weatext_title {
+				font-size: 80rpx;
+				margin-bottom: 30rpx;
+			}
+		}
+	}
+
+	.weatherinfo {
+		display: flex;
+		background-color: rgba(255, 255, 255, 0.2);
+		width: 85%;
+		margin: 60rpx auto;
+		padding: 30rpx;
+		justify-content: space-around;
+		border-radius: 170rpx;
+
+		.weatherinfo_item {
+			text-align: center;
+
+			.first_item {
+				height: 50rpx;
+				margin-bottom: 10rpx;
+				color: #fff;
+				line-height: 50rpx;
+			}
+
+			.weaimg {
+				width: 50rpx;
+				height: 50rpx;
+			}
+
+			.textbox {
+				text-align: center;
+				color: #fff;
+			}
+		}
+	}
+
+	.functionbox {
+		width: 85%;
+		margin: 0 auto;
+		padding: 30rpx;
+		// box-sizing: border-box;
+		background-color: #fff;
+		border-radius: 30rpx;
+
+		.functionbox_title {
+			padding-left: 20rpx;
+			font-size: 34rpx;
+		}
+
+		.functionbox_text {
+			display: flex;
+			justify-content: space-around;
+			margin-top: 30rpx;
+
+			.functionbox_text_item {
+				text-align: center;
+				color: #616666;
+
+				.itemimg {
+					width: 60rpx;
+					height: 60rpx;
+					margin-bottom: 20rpx;
+				}
+			}
+		}
+	}
+
+	.facilitybox {
+		width: 90%;
+		margin: 0 auto;
+		padding: 30rpx;
+
+		.facilitybox_title {
+			font-size: 34rpx;
+			// padding-left: 20rpx;
+		}
+
+		.facilitybox_itembox {
+			display: flex;
+			// justify-content: space-around;
+			flex-wrap: wrap;
+			margin-top: 30rpx;
+
+			.facilitybox_item {
+				width: 25%;
+				text-align: center;
+				color: #616666;
+				margin-bottom: 20rpx;
+
+				.itemimg {
+					width: 100rpx;
+					height: 100rpx;
+					margin-bottom: 20rpx;
+				}
+			}
+		}
+	}
+
+	.insectattack {
+		width: 90%;
+		margin: 0 auto;
+		padding: 30rpx;
+
+		.insectattack_title {
+			font-size: 34rpx;
+			// padding-left: 20rpx;
+			display: flex;
+			justify-content: space-between;
+
+			.iconbox {
+				width: 40rpx;
+				height: 40rpx;
+				background-color: #cfd6d6;
+				color: #909696;
+				border-radius: 40rpx;
+				line-height: 40rpx;
+				text-align: center;
+				font-size: 20rpx;
+			}
+		}
+
+		.insectattack_listbox {
+			// padding: 0 20rpx;
+			overflow-x: auto;
+
+			.insectattack_list {
+				width: 1104rpx;
+				display: flex;
+				margin-top: 30rpx;
+
+				flex-wrap: wrap;
+
+				.list_box {
+					// background-color: #f00;
+					background-size: 100% 100%;
+					width: 246rpx;
+					height: 324rpx;
+					margin-right: 30rpx;
+					border-radius: 20rpx;
+					position: relative;
+
+					.list_boxbg {
+						width: 100%;
+						height: 100%;
+						position: absolute;
+						top: 0;
+						left: 0;
+						z-index: -1;
+
+						.list_boxbg_img {
+							width: 100%;
+							height: 100%;
+						}
+					}
+
+					.list_box_xiang {
+						width: 95%;
+						margin-top: 0rpx auto;
+						display: flex;
+						justify-content: flex-end;
+						padding-top: 20rpx;
+
+						.list_box_xiang_click {
+							padding: 8rpx 15rpx;
+							background-color: rgba(0, 0, 0, 0.2);
+							color: #fff;
+							font-size: 20rpx;
+							border-radius: 52rpx;
+						}
+					}
+
+					.list_box_info {
+						width: 90%;
+						margin: 130rpx auto 0;
+						height: 120rpx;
+						border-radius: 10rpx;
+						background-image: linear-gradient(to right,
+								#ffffff,
+								rgba(255, 255, 255, 0.44));
+						padding: 10rpx;
+						box-sizing: border-box;
+
+						.list_box_info_name {
+							font-weight: 700;
+						}
+
+						.list_box_info_text {
+							font-size: 18rpx;
+							overflow: hidden;
+							text-overflow: ellipsis;
+							display: -webkit-box;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 2;
+						}
+					}
+				}
+
+				// .list_box1 {
+				// 	background-image: url(../../static/images/newindex/cao.png);
+				// }
+
+				// .list_box2 {
+				// 	background-image: url(../../static/images/newindex/yee.jpg);
+				// }
+
+				// .list_box3 {
+				// 	background-image: url(../../static/images/newindex/lingc.jpg);
+				// }
+
+				// .list_box4 {
+				// 	background-image: url(../../static/images/newindex/ming.png);
+				// }
+
+				// .list_box5 {
+				// 	background-image: url(../../static/images/newindex/mai.png);
+				// }
+
+				// .list_box6 {
+				// 	background-image: url(../../static/images/newindex/dadou.jpg)
+				// }
+
+				// .list_box7 {
+				// 	background-image: url(../../static/images/newindex/yumi.png);
+				// }
+
+				// .list_box8 {
+				// 	background-image: url(../../static/images/newindex/dao.png);
+				// }
+			}
+		}
+	}
+
+	.loading {
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 100;
+		width: 100%;
+		height: 100vh;
+		background-color: rgba(0, 0, 0, 0.5);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+</style>

+ 437 - 150
pages/index/index.vue

@@ -1,125 +1,183 @@
 <template>
-	<view>
-		<view class="weather">
-			<image :src="
+	<view class="home">
+		<view class="welcom">欢迎登录</view>
+		<view class="weather-bg">
+			<view class="weather-box">
+
+
+				<view class="weather">
+					<view class="weatext">
+						<view>今天<span class="text-span">{{weatherinfo.air_level}}</span></view>
+						<view class="text-value">{{weatherinfo.at}}℃</view>
+					</view>
+					<view class="weatext">
+
+
+						<image :src="
           'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +
           weatherinfo.wea +
           '.png'
         " mode="" class="weaimg"></image>
-			<view class="weatext">
-				<view class="weatext_title">
-					{{ hello }}
+
+						<view class="weatext_title">
+							{{ weatherinfo.wea }}
+						</view>
+
+					</view>
 				</view>
-				<view class=""> 欢迎登录云飞智控 </view>
-			</view>
-		</view>
-		<view class="weatherinfo">
-			<view class="weatherinfo_item">
-				<image :src="$imageURL+'/bigdata_app/newindex/weizhi.png'" mode="" class="weaimg">
-				</image>
-				<view class="textbox">
-					{{ weatherinfo.district || '-' }}
+				<view class="weather">
+					<view class="weatext">
+						<view>湿度<span class="text-span">{{weatherinfo.air_level}}</span></view>
+						<view class="text-value">{{weatherinfo.ah}}%</view>
+					</view>
+					<view class="weatext">
+						<view>PM2.5</view>
+						<view class="textbox">
+							{{ weatherinfo.air_pm25 }}
+						</view>
+
+					</view>
 				</view>
+
 			</view>
-			<view class="weatherinfo_item">
-				<image :src="$imageURL+'/bigdata_app/newindex/wendu.png'" mode="" class="weaimg"></image>
-				<view class="textbox"> {{ weatherinfo.at || '-' }}℃ </view>
-			</view>
-			<view class="weatherinfo_item">
-				<image :src="$imageURL+'/bigdata_app/newindex/shidu.png'" mode="" class="weaimg"></image>
-				<view class="textbox"> {{ weatherinfo.ah || '-' }} </view>
+			<view class="weather-warning">
+				<image class="weather-alert" :src="$imageURL+'/bigdata_app/newImg/home/weather-alert.png'" mode=""></image>
+			{{weatherinfo.alarm_content}}
 			</view>
-			<view class="weatherinfo_item">
-				<view class="first_item"> PM2.5 </view>
-				<view class="textbox">
-					{{ weatherinfo.air_pm25 || '-' }}
+
+		</view>
+		<view class="ai-box">
+			<view class="ai-content">
+				<image :src="$imageURL+'/bigdata_app/newImg/home/ai-bot.png'" class="float-left" mode=""></image>
+				<view class="ai-text">
+					<view class="ai-text-title">我是千耘农业种植大模型</view>
+					<view class="ai-text-subtitle">耕耘千百变,智慧一点通</view>
+				</view>
+				<view class="float-right">
+					问一问
 				</view>
 			</view>
 		</view>
 		<view class="functionbox">
-			<view class="functionbox_title"> 功能应用 </view>
+			
 			<view class="functionbox_text">
 				<view class="functionbox_text_item" v-if="jurisdiction.sqtf" @click="tabfunction(0)">
-					<image :src="$imageURL+'/bigdata_app/newindex/base.png'" mode="" class="itemimg">
+					<image :src="$imageURL+'/bigdata_app/newImg/home/sqjd.png'" mode="" class="itemimg">
 					</image>
 					<view class=""> 四情基地 </view>
 				</view>
 				<view class="functionbox_text_item" @click="tabfunction(1)">
-					<image :src="$imageURL+'/bigdata_app/newindex/worm.png'" mode="" class="itemimg">
+					<image :src="$imageURL+'/bigdata_app/newImg/home/zngg.png'" mode="" class="itemimg">
 					</image>
-					<view class=""> 田间随识 </view>
+					<view class=""> 智能灌溉 </view>
 				</view>
 				<view class="functionbox_text_item" v-if="jurisdiction.zjtf" @click="tabfunction(2)">
-					<image :src="$imageURL+'/bigdata_app/newindex/knowledge.png'" mode=""
-						class="itemimg"></image>
-					<view class=""> 知识百科 </view>
+					<image :src="$imageURL+'/bigdata_app/newImg/home/yhgl.png'" mode="" class="itemimg"></image>
+					<view class=""> 用户管理 </view>
 				</view>
 				<view class="functionbox_text_item" @click="tabfunction(3)">
-					<image :src="$imageURL+'/bigdata_app/newindex/aftersale.png'" mode=""
-						class="itemimg"></image>
+					<image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
 					<view class=""> 售后服务 </view>
 				</view>
-			</view>
-		</view>
-		<view class="facilitybox">
-			<view class="facilitybox_title"> 系统设备 </view>
-			<view class="facilitybox_itembox">
-				<view class="facilitybox_item" v-if="jurisdiction.cbtf" @click="tabequipment('../cb/index/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/cb.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 测报系统 </view>
-				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.cbyj" @click="tabequipment('../cbqxyj/cbwarn')">
-					<image :src="$imageURL+'/bigdata_app/newindex/cbyj.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 测报预警 </view>
-				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.fztf" @click="tabequipment('../prevention/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/fz.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 防治系统 </view>
+				<view class="functionbox_text_item" @click="tabfunction(3)">
+					<image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
+					<view class=""> 售后服务 </view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../monitor/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/jk.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 监控系统 </view>
+				<view class="functionbox_text_item" @click="tabfunction(3)">
+					<image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
+					<view class=""> 售后服务 </view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.hjtf" @click="tabequipment('../environment/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/hj.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 环境监测 </view>
+				<view class="functionbox_text_item" @click="tabfunction(3)">
+					<image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
+					<view class=""> 售后服务 </view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.qxz" @click="tabequipment('../qxzyj/cbwarn', 5)">
-					<image :src="$imageURL+'/bigdata_app/newindex/qxyj.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 气象预警 </view>
+			</view>
+<!-- 			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
+				:duration="duration">
+				<swiper-item>
+
+
+				</swiper-item>
+				<swiper-item>
+					<view class="swiper-item uni-bg-green">B</view>
+				</swiper-item>
+
+			</swiper> -->
+		</view>
+		<view class="facilitybox">
+			<view class="facilitybox-content">
+				<view class="facilitybox_title"> 智慧助手 </view>
+				<view style="display: flex;gap:24rpx;flex-direction: column;">
+					<view class="facilitybox_itembox">
+						<view class="facilitybox_item facilitybox-zhuanjia" v-if="jurisdiction.zjtf"
+							@click="tabfunction(2)">
+							<image :src="$imageURL+'/bigdata_app/newImg/home/zjhk.png'" mode="" class="itemimg">
+							</image>
+							<view class="facilitybox_span">
+								<text> 专家库 </text>
+
+								<view class="text">农业相关博士、教授、研究员</view>
+							</view>
+						</view>
+						<view class="facilitybox_item" style="display: flex; flex-direction: column;gap: 24rpx;">
+							<view class="facilitybox-suishi"
+								@click="tabfunction(1)">
+
+								<image style="width: 72rpx;height:72rpx;margin-right: 10rpx;"
+									:src="$imageURL+'/bigdata_app/newImg/home/tjss.png'" mode=""
+									class="itemimg float-right">
+								</image>
+								<view class="facilitybox_span"> 田间随识 </view>
+							</view>
+							<view class="facilitybox-bchk"
+								@click="worm">
+								<image :src="$imageURL+'/bigdata_app/newImg/home/cshk.png'" mode="" class="itemimg">
+								</image>
+								<view style="width: 69%;" class="facilitybox_span"> 病虫草鼠害库 </view>
+							</view>
+						</view>
+
+					</view>
+					<view class="facilitybox_itembox">
+						<view class="facilitybox_item facilitybox-jwjy" v-if="jurisdiction.fztf"
+							@click="tabequipment('../prevention/index')">
+							<image :src="$imageURL+'/bigdata_app/newImg/home/jwjy.png'" mode="" class="itemimg">
+							</image>
+							<view class="facilitybox_span"> 积温积雨 </view>
+						</view>
+						<view class="facilitybox_item facilitybox-jgqs" v-if="jurisdiction.jktf"
+							@click="tabequipment('../monitor/index')">
+							<image :src="$imageURL+'/bigdata_app/newImg/home/jgqs.png'" mode="" class="itemimg">
+							</image>
+							<view class="facilitybox_span"> 价格趋势 </view>
+						</view>
+
+					</view>
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.sq" @click="tabequipment('../qxzyj/cbwarn', '15')">
-					<image :src="$imageURL+'/bigdata_app/newindex/sqyj.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 墒情预警 </view>
+			</view>
+			<view class="banner-ad">
+			<view class="ad-text">
+				<view class="title">
+					松墨天牛拍照性诱智能监测
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.ggtf" @click="tabequipment('../irrigate/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/guangai.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 智能灌溉 </view>
+				<view class="sub-title">
+					AI慧眼识天牛    智守青山护松林
 				</view>
-				<view class="facilitybox_item" v-if="jurisdiction.sbtf"
-					@click="tabequipment('../equipMange/index/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/user.png'" mode="" class="itemimg">
-					</image>
-					<view class=""> 用户管理 </view>
+				<view class="btn">
+					查看详情
 				</view>
 			</view>
+			</view>
 		</view>
-		<view class="insectattack">
+
+		<!-- 	<view class="insectattack">
 			<view class="insectattack_title" @click="worm">
 				<view class=""> 虫情百科 </view>
 				<view class="iconbox">
 					<u-icon name="arrow-right"></u-icon>
 				</view>
 			</view>
-			
+
 		</view>
 		<view class="insectattack">
 			<view class="insectattack_title" @click="virus">
@@ -128,8 +186,8 @@
 					<u-icon name="arrow-right"></u-icon>
 				</view>
 			</view>
-			
-		</view>
+
+		</view> -->
 	</view>
 </template>
 
@@ -164,8 +222,17 @@
 		// },
 		data() {
 			return {
+				indicatorDots: true,
+				autoplay: false,
+				interval: 2000,
+				duration: 500,
 				weatherinfo: {
 					wea: '晴',
+					air_level: '优',
+					at: '23',
+					air_pm25: '3',
+					ah: '56',
+					alarm_content: '天气警告'
 				},
 				hello: '',
 				jurisdiction: {
@@ -209,12 +276,7 @@
 						lat: lat,
 					},
 				});
-				// uni.showToast({
-				// 	title: JSON.stringify(res[0]),
-				// 	duration: 20000,
-				// 	icon:'none'
-				// });
-				//    console.log(res);
+
 				this.weatherinfo = res[0];
 			},
 			async getUserlogin() {
@@ -536,7 +598,7 @@
 			}
 		},
 		onLoad() {
-		
+
 			console.log(this.$imageURL)
 			var time = new Date();
 			var hours = time.getHours();
@@ -558,76 +620,167 @@
 
 <style lang="less">
 	page {
-		background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/bg.png);
+		background: linear-gradient(180deg, #1FC676 11.72%, #1FC676 11.52%, #D5F9E7 29.83%, #F5F6FA 36.96%), #FFF;
+		// background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/bg.png);
+		// background: linear-gradient(180deg, #1FC676 8.72%, #1FC676 18.52%, #D5F9E7 21.83%, #F5F6FA 25.96%), #FFF;
 		background-size: 100%;
 		background-repeat: no-repeat;
 		background-color: #f9f9f9;
 	}
 
+	.home {
+		// background: linear-gradient(180deg, #1FC676 8.72%, #1FC676 18.52%, #D5F9E7 21.83%, #F5F6FA 25.96%), #FFF;
+		width: 100%;
+		height: 100%;
+		padding-top: 94rpx;
+		box-sizing: border-box;
+	}
+
+	.welcom {
+		height: 64rpx;
+		line-height: 64rpx;
+		padding-left: 16rpx;
+		font-size: 40rpx;
+		color: #fff;
+	}
+
+	.weather-bg {
+		width: 100%;
+		height: 212rpx;
+		background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner-bg.png);
+		background-size: 100% 100%;
+		background-repeat: no-repeat;
+	}
+
+	.weather-box {
+		display: flex;
+		margin: 24rpx 0 16rpx 0;
+	}
+
+	.weather:nth-child(1) {
+
+		border-right: 1px solid rgba(255, 255, 255, 0.6);
+	}
+
 	.weather {
+		flex: 1;
 		display: flex;
-		width: 85%;
-		margin: 0 auto;
-		padding-top: 40rpx;
+
 
 		.weaimg {
-			width: 296rpx;
-			height: 296rpx;
+			width: 42rpx;
+			height: 42rpx;
 		}
 
 		.weatext {
-			width: 300rpx;
-			text-align: center;
-			font-size: 36rpx;
+			gap: 8rpx;
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			font-size: 24rpx;
+			color: rgba(255, 255, 255, 0.8);
+		}
+
+		.weatext_title {
+			font-size: 24rpx;
 			color: #fff;
-			padding-top: 60rpx;
-			margin-left: 60rpx;
+		}
 
-			.weatext_title {
-				font-size: 80rpx;
-				margin-bottom: 30rpx;
-			}
+		.text-span {
+			color: #0BBC58;
+			margin-left: 16rpx;
+			padding: 0 2px;
+			border-radius: 4px;
+			background: rgba(255, 255, 255, 0.6);
+		}
+
+		.text-value {
+			font-size: 48rpx;
+			color: #fff;
 		}
 	}
 
-	.weatherinfo {
-		display: flex;
-		background-color: rgba(255, 255, 255, 0.2);
-		width: 85%;
-		margin: 60rpx auto;
-		padding: 30rpx;
-		justify-content: space-around;
-		border-radius: 170rpx;
+	.weather-warning {
+		margin: 20rpx 0;
+		padding: 0 40rpx;
+		color: #fff;
+		.weather-alert{
+			width:30rpx;
+			height: 30rpx;
+			margin-right: 10rpx;
+		}
+	}
 
-		.weatherinfo_item {
-			text-align: center;
+	.ai-box {
+		width: 100%;
+		padding: 0 40rpx;
+		box-sizing: border-box;
+		height: 128rpx;
+		margin-bottom: 12rpx;
+		position: relative;
+		top: -20rpx;
+
+		.ai-content {
+			box-sizing: border-box;
+			height: 100%;
+			border-radius: 8px;
+			border: 1.5px solid #FFF;
+			background: linear-gradient(180deg, #ffffffa3 0%, #FFF 100%);
+			padding: 24rpx;
 
-			.first_item {
-				height: 50rpx;
-				margin-bottom: 10rpx;
+			image {
+				width: 80rpx;
+				height: 80rpx;
+				float: left;
+				margin-right: 16rpx;
+			}
+
+			.float-right {
+				float: right;
+				padding: 4px 12px;
 				color: #fff;
-				line-height: 50rpx;
+				border-radius: 28px;
+				background: #0BBC58;
+				margin: 12rpx 0;
 			}
 
-			.weaimg {
-				width: 50rpx;
-				height: 50rpx;
+			.ai-text {
+
+				float: left;
 			}
 
-			.textbox {
-				text-align: center;
-				color: #fff;
+			.ai-text-title {
+				color: #333834;
+				line-height: 40rpx;
+				font-size: 28rpx;
+
+				font-weight: 700;
+			}
+
+			.ai-text-subtitle {
+				color: #7b9783;
+				line-height: 40rpx;
+				font-size: 20rpx;
+
+				font-weight: 400;
+
 			}
 		}
+
+
 	}
 
+
 	.functionbox {
-		width: 85%;
-		margin: 0 auto;
-		padding: 30rpx;
-		// box-sizing: border-box;
-		background-color: #fff;
-		border-radius: 30rpx;
+		width: 100%;
+		// height: 240rpx;
+		padding: 0rpx 32rpx 0 32rpx;
+		box-sizing: border-box;
+		margin-bottom: 16rpx;
+		.swiper {
+			height: 208rpx;
+		}
 
 		.functionbox_title {
 			padding-left: 20rpx;
@@ -636,50 +789,184 @@
 
 		.functionbox_text {
 			display: flex;
-			justify-content: space-around;
+			flex-wrap: wrap;
+			// justify-content: space-around;
 			margin-top: 30rpx;
-
+			
 			.functionbox_text_item {
+				width:20%;
 				text-align: center;
 				color: #616666;
-
+				font-size: 24rpx;
+				margin-bottom: 32rpx;
 				.itemimg {
-					width: 60rpx;
-					height: 60rpx;
-					margin-bottom: 20rpx;
+					width: 80rpx;
+					height: 80rpx;
+					margin-bottom: 16rpx;
 				}
 			}
 		}
 	}
 
 	.facilitybox {
-		width: 90%;
-		margin: 0 auto;
-		padding: 30rpx;
+		width: 100%;
+		padding: 0 32rpx;
+		box-sizing: border-box;
+		background: #F5F6FA;
+
+		.facilitybox-content {
+			border-radius: 16rpx;
+			background: #FFF;
+			padding: 32rpx;
+		}
 
 		.facilitybox_title {
-			font-size: 34rpx;
+			font-size: 30rpx;
+			color: #333;
+			margin-bottom: 24rpx;
 			// padding-left: 20rpx;
 		}
 
 		.facilitybox_itembox {
+
 			display: flex;
-			// justify-content: space-around;
-			flex-wrap: wrap;
-			margin-top: 30rpx;
+			gap: 32rpx;
 
 			.facilitybox_item {
-				width: 25%;
-				text-align: center;
+				flex: 1;
+
 				color: #616666;
-				margin-bottom: 20rpx;
+
+				.facilitybox_span {
+					padding: 16rpx 24rpx;
+					width: 50%;
+					color: #0B3F5D;
+					font-weight: 500;
+					font-size: 28rpx;
+
+					.text {
+						font-size: 20rpx;
+						color: #4E916E;
+						font-weight: 400;
+						margin-top: 9rpx;
+					}
+				}
 
 				.itemimg {
-					width: 100rpx;
-					height: 100rpx;
-					margin-bottom: 20rpx;
+					width: 90rpx;
+					height: 90rpx;
+					float: right;
+					margin: 7rpx 0;
+				}
+			}
+
+			.facilitybox-zhuanjia {
+				border-radius: 8px;
+				background: linear-gradient(180deg, #D3FBE6 0%, #F5F7FA 100%);
+				position: relative;
+
+				.itemimg {
+					width: 112rpx;
+					height: 146rpx;
+					position: absolute;
+					bottom: 0;
+					right: 16rpx;
+				}
+
+				text {
+					color: #003318;
+					font-weight: 500;
+					font-size: 28rpx;
+
+				}
+			}
+
+			.facilitybox-suishi {
+				border-radius: 8px;
+				background: linear-gradient(180deg, #CAECFF 0%, #F5F7FA 99.89%);
+				padding: 9rpx 0;
+
+				.facilitybox_span {
+					color: #0B3F5D;
 				}
 			}
+
+			.facilitybox-bchk {
+				border-radius: 8px;
+				background: linear-gradient(180deg, #EEE5F6 0%, #F5F7FA 95.65%);
+				// height: 102rpx;
+				padding: 10rpx 0;
+
+				.facilitybox_span {
+					color: #3E2B50;
+				}
+
+				.itemimg {
+					width: 78rpx;
+					height: 72rpx;
+					margin-right: 10rpx;
+				}
+			}
+
+			.facilitybox-jgqs {
+				border-radius: 8px;
+				background: linear-gradient(180deg, #D2E5FF 0%, #F5F7FA 95.65%);
+
+				.facilitybox_span {
+					color: #0D2E5B;
+				}
+			}
+
+			.facilitybox-jwjy {
+				border-radius: 8px;
+				background: linear-gradient(180deg, #FFF4D2 0%, #F5F7FA 95.65%);
+
+				.facilitybox_span {
+					color: #3D4012;
+				}
+			}
+		}
+	}
+
+
+	.banner-ad {
+		margin: 32rpx 0;
+		height: 224rpx;
+		border-radius: 8px;
+		background-size: 100% 100%;
+		background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/ad-banner.png);
+		.ad-text{
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-around;
+			padding: 40rpx;
+			box-sizing: border-box;
+			.title{
+				 color: #333333;
+				 
+				 font-size: 28rpx;
+				 font-style: normal;
+				 font-weight: 700;
+				 line-height: normal;
+			}
+			.sub-title{
+				 color: #666666;
+				
+				 font-size: 20rpx;
+				 font-style: normal;
+				 font-weight: 500;
+				 line-height: normal;
+			}
+			.btn{
+				text-align: center;
+				width: 112rpx;
+				color:#fff;
+				padding: 4px 0px;
+				font-size: 20rpx;
+				border-radius: 4px;
+				background: linear-gradient(106deg, #0BBC58 2.6%, #7CE6FB 86.51%);
+			}
 		}
 	}