Просмотр исходного кода

feat: 添加水肥页面并优化多个功能模块

style(components): 调整害虫档案和图片展示样式
fix(environment): 修复设备详情地址显示问题
refactor(equipList): 统一设备在线状态字段处理
feat(server): 新增预警菜单入口和设备类型过滤
perf(weatherStation): 优化导航标题和卡片样式
fix(cbd): 修复害虫识别结果为空时的显示问题
style(zhamenFirst): 调整自动灌溉界面样式和字段
docs(pages.json): 更新页面配置和路由
allen 5 месяцев назад
Родитель
Сommit
84f8f2abf4
93 измененных файлов с 1386 добавлено и 2111 удалено
  1. 1 0
      components/customCard/cu-custom.vue
  2. 14 6
      pages.json
  3. 46 0
      pages/banner/index.vue
  4. 5 1
      pages/cb/cbd/equip-set/analyse.vue
  5. 5 1
      pages/cb/cbd/equip-set/imgpage.vue
  6. 5 1
      pages/cb/cbd/equip-set/new-analyse.vue
  7. 10 1
      pages/cb/cbd/equip-set/newhistoryfile.vue
  8. 5 1
      pages/cb/cbd/equip-set/photo.vue
  9. 5 1
      pages/cb/cbd/equip-set/photoResults.vue
  10. 4 0
      pages/cb/equip-detail/equip-detail-new.vue
  11. 12 3
      pages/cb/equip-detail/equip-detail.vue
  12. 6 2
      pages/cb/nlNewXy/nlNewXy.vue
  13. BIN
      pages/cb/shuifeizs/assets/solenoidValve.png
  14. 1 1
      pages/cb/shuifeizs/control.vue
  15. 4 0
      pages/cb/shuifeizs/history.vue
  16. BIN
      pages/cb/shuifeizsFirst/assets/solenoidValve.png
  17. 2 1
      pages/cb/shuifeizsFirst/autoSetting.vue
  18. 2 2
      pages/cb/shuifeizsFirst/control.vue
  19. 4 0
      pages/cb/shuifeizsFirst/history.vue
  20. 21 10
      pages/cb/shuifeizsFirst/shuifeizs.vue
  21. 1 1
      pages/cb/shuifeizsFirst/timingSetting.vue
  22. 4 1
      pages/cb/smallPest/analyse.vue
  23. 4 1
      pages/cb/smallPest/photolist.vue
  24. 4 1
      pages/cb/smallPest/smallPest.vue
  25. 1 1
      pages/cb/sy/detail.vue
  26. 4 1
      pages/cb/sy/history.vue
  27. 4 1
      pages/cb/sy/imgList.vue
  28. 4 1
      pages/cb/thxydetail/photolist.vue
  29. 4 1
      pages/cb/thxydetail/thxydetail.vue
  30. 4 1
      pages/cb/thxydetail/thxyhisdata.vue
  31. 4 1
      pages/cb/xctdetail/analyse.vue
  32. 4 1
      pages/cb/xctdetail/photolist.vue
  33. 4 1
      pages/cb/xctdetail/xctdetail.vue
  34. 8 2
      pages/cb/xy2.0/particulars.vue
  35. 15 3
      pages/cb/xylps/detail/detail.vue
  36. BIN
      pages/cb/zhamenFirst/assets/solenoidValve.png
  37. 5 4
      pages/cb/zhamenFirst/autoSetting.vue
  38. 2 2
      pages/cb/zhamenFirst/control.vue
  39. 4 0
      pages/cb/zhamenFirst/history.vue
  40. 1 1
      pages/cb/zhamenFirst/timingSetting.vue
  41. 2 2
      pages/cb/zhamenFirst/zhamenzs.vue
  42. 4 1
      pages/cb/zjxydetail/photolist.vue
  43. 15 12
      pages/cb/zjxydetail/thxydetail.vue
  44. 5 1
      pages/cb/zjxydetail/thxyhisdata.vue
  45. BIN
      pages/cbd/assets/cbd.png
  46. BIN
      pages/cbd/assets/editBorder.png
  47. BIN
      pages/cbd/assets/general.png
  48. BIN
      pages/cbd/assets/photoBorder.png
  49. BIN
      pages/cbd/assets/settingBorder.png
  50. BIN
      pages/cbd/assets/simBorder.png
  51. 1 1
      pages/cbd/components/DeviceCard.vue
  52. 330 35
      pages/cbd/components/deviceData.vue
  53. 219 0
      pages/cbd/components/floating-button.vue
  54. 29 9
      pages/cbd/components/pestArchive.vue
  55. 3 3
      pages/cbd/components/pestDiscern.vue
  56. 0 5
      pages/cbd/components/pestEchart.vue
  57. 12 4
      pages/cbd/components/photoImage.vue
  58. 53 11
      pages/cbd/detail.vue
  59. 7 3
      pages/cbd/devicePhoto.vue
  60. 9 1
      pages/cbqxyj/cbwarn.vue
  61. 3 1
      pages/deviceDetails/weatherStation/devControl.vue
  62. 5 1
      pages/deviceDetails/weatherStation/eleDetail.vue
  63. 10 3
      pages/deviceDetails/weatherStation/index.vue
  64. 9 6
      pages/deviceDetails/weatherStation/simDetail.vue
  65. 4 1
      pages/disease/cmb.vue
  66. 4 1
      pages/disease/mls/forecastResult.vue
  67. 4 1
      pages/disease/mls/mls.vue
  68. 2 2
      pages/environment/equipment.vue
  69. 2 2
      pages/environment/gsequipment.vue
  70. 5 1
      pages/environment/gshistory.vue
  71. 6 2
      pages/environment/history-new.vue
  72. 12 12
      pages/equipList2/index copy.vue
  73. 132 26
      pages/equipList2/index.vue
  74. 5 4
      pages/equipList2/modification.vue
  75. 25 25
      pages/equipList2/seabox/modification.vue
  76. 9 9
      pages/equipList2/search.vue
  77. 2 0
      pages/equipMange/index/index.vue
  78. 9 3
      pages/fmSys/details.vue
  79. 6 2
      pages/fourBase/basefacility.vue
  80. 1 0
      pages/fourBase/index.vue
  81. 0 952
      pages/index/index copy 2.vue
  82. 0 839
      pages/index/index copy.vue
  83. 99 38
      pages/index/index.vue
  84. 5 1
      pages/monitor/dgpImagelist.vue
  85. 4 1
      pages/monitor/imagelist.vue
  86. 1 0
      pages/my/index/index.vue
  87. 4 1
      pages/prevention/ucharts.vue
  88. 4 1
      pages/qxzyj/cbwarn.vue
  89. 38 15
      pages/server/index.vue
  90. 34 12
      pages/warning/index.vue
  91. 4 1
      pages/waterandfer/elementdata.vue
  92. 4 1
      pages/waterandfer/waterhis.vue
  93. 12 3
      pages/waterandfernew/details.vue

+ 1 - 0
components/customCard/cu-custom.vue

@@ -118,6 +118,7 @@ export default {
   .content {
     position: absolute;
     left: 50%;
+    width: 70%;
     transform: translateX(-50%);
     color: #020305;
     font-family: "Source Han Sans CN VF";

+ 14 - 6
pages.json

@@ -28,6 +28,14 @@
 			}
 		},
 		{
+			"path": "pages/banner/index",
+			"style": {
+				"navigationBarTitleText": "水肥",
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
 			"path": "pages/distribution/index",
 			"style": {
 				"navigationBarTitleText": "设备分布",
@@ -1447,12 +1455,12 @@
 				"selectedIconPath": "static/images/tabBar/devicesel.png",
 				"text": "设备列表"
 			},
-			{
-				"pagePath": "pages/distribution/index",
-				"iconPath": "static/images/tabBar/fenbu.png",
-				"selectedIconPath": "static/images/tabBar/fenbusel.png",
-				"text": "设备分布"
-			},
+			// {
+			// 	"pagePath": "pages/distribution/index",
+			// 	"iconPath": "static/images/tabBar/fenbu.png",
+			// 	"selectedIconPath": "static/images/tabBar/fenbusel.png",
+			// 	"text": "设备分布"
+			// },
 			{
 				"pagePath": "pages/my/index/index",
 				"iconPath": "static/images/tabBar/user.png",

+ 46 - 0
pages/banner/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <view class="banner-ad">
+    <view class="device-detail__header">
+      <u-icon
+        size="36"
+        class="arrow-left"
+        name="arrow-left"
+        @click="handleBack"
+      ></u-icon>
+    </view>
+    <image :src="bannerURL" mode="" class="banner-image"></image>
+  </view>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      bannerURL: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/shuifei.jpg',
+    }
+  },
+  methods: {
+    handleBack(){
+      uni.navigateBack({
+        delta: 1,
+      })
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+.banner-ad {
+  height: 320vh;
+  width: 100%;
+  .device-detail__header{
+    position: absolute;
+    top: 32rpx;
+    left: 32rpx;
+    z-index: 999;
+    color:#fff;
+  }
+  .banner-image{
+    width: 100%;
+    height: 100%;
+  }
+}
+</style>

+ 5 - 1
pages/cb/cbd/equip-set/analyse.vue

@@ -64,7 +64,11 @@
 				<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
 			</view>
 			<view class="pickerBox">
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" 
+					range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange"
 					:default-value="defaultValue"></u-select>
 			</view>

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

@@ -26,7 +26,11 @@
 						<p>{{timetab(timeend)}}</p>
 						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
-					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"
+						range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				</view>
 				<view class="paizhao" @click="clickRight">
 					<u-icon name="camera" color="#000" size="45"></u-icon>

+ 5 - 1
pages/cb/cbd/equip-set/new-analyse.vue

@@ -61,7 +61,11 @@
 					<p>{{newtime}}</p>
 					<!-- <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon> -->
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"
+					range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
 				<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange"
 					:default-value="defaultValue"></u-select>

+ 10 - 1
pages/cb/cbd/equip-set/newhistoryfile.vue

@@ -5,7 +5,16 @@
 			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="历史数据" backgroundColor="#f7f7f7"></uni-nav-bar>
 		</view>
 		<view style="padding: 0 48rpx; background-color: #f7f7f7;">
-			<u-calendar v-model="dataShow" :mode="mode" @change="tiemchange" :maxDate="maxDate"></u-calendar>
+			<u-calendar
+			 v-model="dataShow"
+			  :mode="mode"
+			  @change="tiemchange"
+				:maxDate="maxDate"
+				range-color="#999"
+				btn-type="success"
+				active-bg-color="#0BBC58"
+				range-bg-color="rgba(11,188,88,0.13)"
+			></u-calendar>
 			<view class="date" @click="dataShow = true">
 				<span>选择日期 </span>
 				<span style="color: #cccccc;">

+ 5 - 1
pages/cb/cbd/equip-set/photo.vue

@@ -16,7 +16,11 @@
 		<view style="padding: 0 48rpx;" v-if="searchObj.is_pest!='2'">
 			<u-search bg-color="#fff" height="92" shape="square"  placeholder="请输入害虫名称" v-model="searchObj.pest_name" @search="dropDownChange" :show-action='false'></u-search>
 		</view>
-		<u-calendar v-model="calendarShow" mode="range" @maxDate="maxDate" @change="change"></u-calendar>
+		<u-calendar v-model="calendarShow" mode="range" @maxDate="maxDate" @change="change"
+				range-color="#999"
+				btn-type="success"
+				active-bg-color="#0BBC58"
+				range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 		<view class="tile-item">
 			
 			<view @click="calendarShow = true" class="calendar">{{start_time}} <span style="margin: 0 40rpx;"> -</span> {{end_time}}</view>

+ 5 - 1
pages/cb/cbd/equip-set/photoResults.vue

@@ -5,7 +5,11 @@
       height: calc(100vh - 88rpx);
     ">
 		<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="识别结果" backgroundColor="#F7F7F7"></uni-nav-bar>
-		<u-calendar v-model="calendarShow" mode="range" @change="change" @maxDate="maxDate"></u-calendar>
+		<u-calendar v-model="calendarShow" mode="range" @change="change" @maxDate="maxDate"
+				range-color="#999"
+				btn-type="success"
+				active-bg-color="#0BBC58"
+				range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 		<view class="img-result">
 			<view class="tile-item">
 				<view @click="calendarShow = true" class="calendar">{{ start_time }} <span style="margin: 0 40rpx">

+ 4 - 0
pages/cb/equip-detail/equip-detail-new.vue

@@ -116,6 +116,10 @@
         mode="date"
         :max-date="date"
         @change="timeChange($event)"
+				range-color="#999"
+				btn-type="success"
+				active-bg-color="#0BBC58"
+				range-bg-color="rgba(11,188,88,0.13)"
       >
       </u-calendar>
       <u-toast ref="toast" />

+ 12 - 3
pages/cb/equip-detail/equip-detail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view :class="['info',equipInfo.is_online==1?'on':'off']">
+		<view :class="['info',equipInfo.status==1?'on':'off']">
 			<view class="" @click="copy(equipInfo)">
 				设备ID:{{equipInfo.imei||equipInfo.device_id||equipInfo.id}}
 				<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode="" class="tishi">
@@ -53,9 +53,17 @@
 				<view class="btn-box">
 					<u-button @click="setTimeSubmit" size="mini" type="success">确定</u-button>
 				</view>
-				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')">
+				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')"
+					range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)">
 				</u-calendar>
 				<u-calendar v-model="cultivate_show" mode="date" :max-date="date"
+					range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"
 					@change="timeChange($event,'cultivate')"></u-calendar>
 			</u-popup>
 			<u-popup v-model="yxShow" mode="center" width="600rpx">
@@ -507,10 +515,11 @@
 		},
 		onLoad(option) {
 			this.equipInfo = JSON.parse(option.info)
+			console.log(this.equipInfo,'equipInfoequipInfo')
 			this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type) || Number(this.equipInfo
 				.device_type_id)
 			this.equipInfo.type = this.type
-			this.device_status = this.equipInfo.is_online
+			this.device_status = this.equipInfo.status
 			this.getState()
 			console.log(this.equipInfo)
 			this.selectaddress(Number(this.equipInfo.lat), Number(this.equipInfo.lng))

+ 6 - 2
pages/cb/nlNewXy/nlNewXy.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view :class="['info',equipInfo.is_online==1?'on':'off']">
+		<view :class="['info',equipInfo.status==1?'on':'off']">
 			<view class="" @click="copy(equipInfo)">
 				设备ID:{{showId}}
 				<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode="" class="tishi">
@@ -41,7 +41,11 @@
 				<u-button @click="yxSubmit" size="mini" type="success" class="box-item">确定</u-button>
 			</view>
 		</u-popup>
-		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"></u-calendar>
+		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"
+				range-color="#999"
+				btn-type="success"
+				active-bg-color="#0BBC58"
+				range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 		<view class="caobox">
 			<view class="caobox_item" v-if="$QueryPermission(358)" @click="toset">
 				<image :src="$imageURL+'/bigdata_app/image/cb/4.png'" mode="widthFix"></image>

BIN
pages/cb/shuifeizs/assets/solenoidValve.png


+ 1 - 1
pages/cb/shuifeizs/control.vue

@@ -44,7 +44,7 @@
             <u-switch
               :value="item.value == 1 ? true : false"
               @change="changeSwitch(item)"
-              activeColor="#14A478"
+              activeColor="#0BBC58"
               size="40"
               inactiveColor="rgb(230, 230, 230)"
             ></u-switch>

+ 4 - 0
pages/cb/shuifeizs/history.vue

@@ -62,6 +62,10 @@
       v-model="show"
       mode="range"
       @change="handleConfirm"
+      range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"
     ></u-calendar>
     <!-- <wu-calendar
       ref="calendar"

BIN
pages/cb/shuifeizsFirst/assets/solenoidValve.png


+ 2 - 1
pages/cb/shuifeizsFirst/autoSetting.vue

@@ -670,7 +670,8 @@ export default {
           align-items: center;
           justify-content: space-between;
           margin-bottom: 24rpx;
-
+          padding-bottom: 24rpx;
+          border-bottom: 2rpx solid #e8e8e8;
           .group-title {
             font-size: 28rpx;
             font-weight: 500;

+ 2 - 2
pages/cb/shuifeizsFirst/control.vue

@@ -36,7 +36,7 @@
               <u-switch
                 :value="item.value == 1 ? true : false"
                 @change="()=>changeSwitch(item)"
-                activeColor="#14A478"
+                activeColor="#0BBC58"
                 size="40"
                 inactiveColor="rgb(230, 230, 230)"
               ></u-switch>
@@ -100,7 +100,7 @@ export default {
       solenoidValveStop,
       stir,
       borderRadius,
-      title: '控制面板',
+      title: '手动控制',
       leftList: [],
       deviceList: [],
       devBid: '',

+ 4 - 0
pages/cb/shuifeizsFirst/history.vue

@@ -61,6 +61,10 @@
     <u-calendar
       v-model="show"
       mode="range"
+      range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"
       @change="handleConfirm"
     ></u-calendar>
     <!-- <wu-calendar

+ 21 - 10
pages/cb/shuifeizsFirst/shuifeizs.vue

@@ -15,6 +15,7 @@
         class="facilitystate-top__item"
         v-for="(item, index) in deviceList"
         :key="index"
+        v-if="item.show"
         @click="nativeTo(item)"
       >
         <view class="item-icon-container" :class="item.className">
@@ -24,11 +25,11 @@
       </view>
     </view>
     <view class="irrMode">
-      <view class="irrMode__header">
+      <view class="irrMode__header" v-if="irrigatedAreaList.length">
         <view @click="changeMode('1')" :class="workStatus == '1' ? 'active' : ''">施肥模式</view>
         <view @click="changeMode('0')" :class="workStatus == '0' ? 'active' : ''">灌溉模式</view>
       </view>
-      <view class="irrMode__content">
+      <view class="irrMode__content" v-if="irrigatedAreaList.length">
         <view class="irrMode__content-header">
           <view class="irrMode__content-header-list">
             <view class="irrMode__content-header-title">
@@ -113,27 +114,32 @@ export default {
         {
           icon: manualControl,
           title: '手动控制',
+          show: true,
           className: 'manualControl',
           url: '/pages/cb/shuifeizsFirst/control',
         },
         {
           icon: wheelIrrigation,
           title: '自动控制',
+          show: true,
           className: 'wheelIrrigation',
           url: '/pages/cb/shuifeizsFirst/autoSetting?devBid=' + this.devBid,
         }, {
           icon: time,
-          title: '定时设置',  
+          title: '定时设置',
+          show: true,
           className: 'timedSetting',
           url: '/pages/cb/shuifeizsFirst/timingSetting?devBid=' + this.devBid,
         },{
           icon: formulaSetting,
-          title: '配方设置',  
+          title: '配方设置',
+          show: true,
           className: 'formulaSetting',
           url: '/pages/cb/shuifeizsFirst/formulaSetting?devBid=' + this.devBid,
         }, {
           icon: operatingRecord,
-          title: '操作记录',  
+          title: '操作记录',
+          show: true,
           className: 'operatingRecord',
           url: '/pages/cb/shuifeizsFirst/history?devBid=' + this.devBid,
         },
@@ -148,8 +154,8 @@ export default {
       webSockedData: {},
       reconnectCount: 0,
       isActive: '0',
-      runStatus: -1,
-      workStatus: -1,
+      runStatus: 0,
+      workStatus: 0,
       clearIrr: {},
       selectAreaList: [],
       runTitle: '--',
@@ -413,7 +419,7 @@ export default {
     },
     async init() {
       this.getdeviceSfStatus();
-      await this.getpeifangRefresh();
+      // await this.getpeifangRefresh();
       this.getsfrhinfo();
       this.initsfyunshangAutoConfigInfo();
       await this.getRunStatus();
@@ -468,6 +474,11 @@ export default {
           }
         }
       });
+      if(!this.irrigatedAreaList.length){
+        this.$set(this.deviceList[1],'show', false);
+        this.$set(this.deviceList[2],'show', false);
+        this.$set(this.deviceList[3],'show', false);
+      }
       this.runTitle = '--';
       this.timer = '--';
       if(this.runStatus == '1'){
@@ -706,8 +717,8 @@ uni-page-body {
     &__item {
       margin-bottom: 32rpx;
       .item-icon-container{
-        width: 96rpx;
-        height: 96rpx;
+        width: 80rpx;
+        height: 80rpx;
         border-radius: 26rpx;
         overflow: hidden;
         margin: 0 auto;

+ 1 - 1
pages/cb/shuifeizsFirst/timingSetting.vue

@@ -220,7 +220,7 @@ uni-page-body {
 
       .timer-title {
         font-size: 32rpx;
-        font-weight: 600;
+        font-weight: 700;
         color: #333333;
         font-family: 'Source Han Sans CN';
       }

+ 4 - 1
pages/cb/smallPest/analyse.vue

@@ -52,7 +52,10 @@
 					<p>{{newtime}}</p>
 					<!-- <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon> -->
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"  range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
 				<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange" :default-value="defaultValue"></u-select>
 			</view>

+ 4 - 1
pages/cb/smallPest/photolist.vue

@@ -17,7 +17,10 @@
 					<p>{{timetab(timeend)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">

+ 4 - 1
pages/cb/smallPest/smallPest.vue

@@ -69,7 +69,10 @@
 						{{end_time==""?'请选择结束时间':end_time}}
 					</view>
 				</view>
-				<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+				<u-calendar v-model="timeshow" :mode="mode" @change="timechange" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="shuju_one">
 				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">

+ 1 - 1
pages/cb/sy/detail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view :class="['info',equipInfo.is_online==1?'on':'off']">
+		<view :class="['info',equipInfo.status==1?'on':'off']">
 			<view class="" @click="copy(equipInfo)">
 				设备ID:{{equipInfo.imei||equipInfo.device_id ||equipInfo.id }}
 				<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode="" class="tishi">

+ 4 - 1
pages/cb/sy/history.vue

@@ -56,7 +56,10 @@
 				</view>
 			</view>
 		</view>
-		<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+		<u-calendar v-model="timeshow" :mode="mode" @change="timechange"  range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 	</view>
 </template>
 

+ 4 - 1
pages/cb/sy/imgList.vue

@@ -17,7 +17,10 @@
 					<p>{{timetab(timeend)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">

+ 4 - 1
pages/cb/thxydetail/photolist.vue

@@ -17,7 +17,10 @@
 					<p>{{timetab(timeend)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"  range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">

+ 4 - 1
pages/cb/thxydetail/thxydetail.vue

@@ -41,7 +41,10 @@
 				<u-button @click="yxSubmit" size="mini" type="success" class="box-item">确定</u-button>
 			</view>
 		</u-popup>
-		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"></u-calendar>
+		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"  range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 		<view class="caobox">
 			<view class="caobox_item" v-if="$QueryPermission(200)" @click="tophoto">
 				<image :src="$imageURL+'/bigdata_app/image/cb/1.png'" mode="widthFix"></image>

+ 4 - 1
pages/cb/thxydetail/thxyhisdata.vue

@@ -95,7 +95,10 @@
 				<button @click="next" :disabled="forbidden">下一页</button>
 			</view>
 		</view>
-		<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+		<u-calendar v-model="timeshow" :mode="mode" @change="timechange"  range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 	</view>
 </template>
 

+ 4 - 1
pages/cb/xctdetail/analyse.vue

@@ -55,7 +55,10 @@
 					<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
 			</view>
 			<view class="pickerBox">
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"  range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange" :default-value="defaultValue"></u-select>
 			</view>
 			<view class="tendency" v-show="!tiemshow && !timeshow && !pickertfone && !pickertfworm">

+ 4 - 1
pages/cb/xctdetail/photolist.vue

@@ -17,7 +17,10 @@
 					<p>{{timetab(timeend)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"  range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>	
 			</view>
 			<view class="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">

+ 4 - 1
pages/cb/xctdetail/xctdetail.vue

@@ -69,7 +69,10 @@
 						{{end_time==""?'请选择结束时间':end_time}}
 					</view>
 				</view>
-				<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+				<u-calendar v-model="timeshow" :mode="mode" @change="timechange"  range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="shuju_one">
 				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">

+ 8 - 2
pages/cb/xy2.0/particulars.vue

@@ -9,8 +9,14 @@
 				<p class="fillin" @click="addxy">测报害虫:<input type="text" v-model="newState.decoy" disabled v-if="newState.decoy"/><u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon></p>
 				<p @click="glass_show=true">诱芯更换时间:<span style="margin:0 20rpx;">{{yxchangetime}}</span><u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon></p>
 				<p @click="glass_showtwo=true">诱芯到期时间:<span style="margin:0 20rpx;">{{yxendtime}}</span><u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon></p>
-				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange"></u-calendar>
-				<u-calendar v-model="glass_showtwo" mode="date" :max-date="date" @change="timeChangetwo"></u-calendar>
+				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
+				<u-calendar v-model="glass_showtwo" mode="date" :max-date="date" @change="timeChangetwo" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="control">
 				<view class="control_item" @click="repairs">

+ 15 - 3
pages/cb/xylps/detail/detail.vue

@@ -40,7 +40,7 @@
 								</view>
 								<view class="textBox">
 									<view>
-										{{newDataObj[btn.unit]}}
+										{{newDataObj[btn.unit] || ''}}
 									</view>
 									<view class="name">{{btn.text}}</view>
 								</view>
@@ -68,7 +68,10 @@
 							<view class="text" @click="showRangeTime = true">{{photoTimeRangeText}}</view>
 							<u-icon name="arrow-right" v-if="photoTimeRangeText == '请选择日期'"></u-icon>
 							<u-icon name="close" v-else @click="clearTimeFun('chart')"></u-icon>
-							<u-calendar v-model="showRangeTime" mode="range" @change="(e) => changePhotoTime(e, 'chart')"></u-calendar>
+							<u-calendar v-model="showRangeTime" mode="range" @change="(e) => changePhotoTime(e, 'chart')" range-color="#999"
+								btn-type="success"
+								active-bg-color="#0BBC58"
+								range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 						</view>
 						<canvas v-if="showCanvas && !showRangeTime" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
 							@touchstart="touchLineA($event)" @touchmove="moveLineA($event)" @touchend="touchEndLineA($event)"
@@ -144,7 +147,16 @@
 					<view class="text" @click="showRangeTime = true">{{photoTimeRangeText}}</view>
 					<u-icon name="arrow-right" v-if="photoTimeRangeText == '请选择日期'"></u-icon>
 					<u-icon name="close" v-else @click="clearTimeFun('photo')"></u-icon>
-					<u-calendar v-if="showRangeTime" v-model="showRangeTime" mode="range" @change="e => changePhotoTime(e, 'photo')"></u-calendar>
+					<u-calendar
+						v-if="showRangeTime"
+						v-model="showRangeTime"
+						mode="range"
+						@change="e => changePhotoTime(e, 'photo')"
+						range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"
+					></u-calendar>
 				</view>
 			</view>
 			<!-- 设备控制 -->

BIN
pages/cb/zhamenFirst/assets/solenoidValve.png


+ 5 - 4
pages/cb/zhamenFirst/autoSetting.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="auto-fertilization-container">
     <custom-card>
-      <block slot="backText">自动施肥</block>
+      <block slot="backText">自动灌溉</block>
     </custom-card>
     <!-- 内容区域 -->
     <view class="content">
@@ -63,7 +63,7 @@
                   />
                   <text class="setting-row-unit">分钟</text>
                 </view>
-                <view class="setting-row">
+                <!-- <view class="setting-row">
                   <text class="setting-row-label">施肥时长</text>
                   <input
                     type="number"
@@ -75,7 +75,7 @@
                     @change="(e) => FertTimChange(e,index)"
                   />
                   <text class="setting-row-unit">分钟</text>
-                </view>
+                </view> -->
               </view>
             </view>
           </view>
@@ -481,7 +481,8 @@ export default {
           align-items: center;
           justify-content: space-between;
           margin-bottom: 24rpx;
-
+          padding-bottom: 24rpx;
+          border-bottom: 2rpx solid #e8e8e8;
           .group-title {
             font-size: 28rpx;
             font-weight: 500;

+ 2 - 2
pages/cb/zhamenFirst/control.vue

@@ -36,7 +36,7 @@
               <u-switch
                 :value="item.value == 1 ? true : false"
                 @change="()=>changeSwitch(item)"
-                activeColor="#14A478"
+                activeColor="#0BBC58"
                 size="40"
                 inactiveColor="rgb(230, 230, 230)"
               ></u-switch>
@@ -100,7 +100,7 @@ export default {
       solenoidValveStop,
       stir,
       borderRadius,
-      title: '控制面板',
+      title: '手动控制',
       leftList: [],
       deviceList: [],
       devBid: '',

+ 4 - 0
pages/cb/zhamenFirst/history.vue

@@ -61,6 +61,10 @@
     <u-calendar
       v-model="show"
       mode="range"
+      range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"
       @change="handleConfirm"
     ></u-calendar>
     <!-- <wu-calendar

+ 1 - 1
pages/cb/zhamenFirst/timingSetting.vue

@@ -220,7 +220,7 @@ uni-page-body {
 
       .timer-title {
         font-size: 32rpx;
-        font-weight: 600;
+        font-weight: 700;
         color: #333333;
         font-family: 'Source Han Sans CN';
       }

+ 2 - 2
pages/cb/zhamenFirst/zhamenzs.vue

@@ -651,8 +651,8 @@ uni-page-body {
     &__item {
       margin-bottom: 32rpx;
       .item-icon-container{
-        width: 96rpx;
-        height: 96rpx;
+        width: 80rpx;
+        height: 80rpx;
         border-radius: 26rpx;
         overflow: hidden;
         margin: 0 auto;

+ 4 - 1
pages/cb/zjxydetail/photolist.vue

@@ -17,7 +17,10 @@
 					<p>{{timetab(timeend)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">

+ 15 - 12
pages/cb/zjxydetail/thxydetail.vue

@@ -1,13 +1,13 @@
 <template>
 	<view>
-		<view :class="['info',equipInfo.is_online==1?'on':'off']">
+		<view :class="['info',equipInfo.status==1?'on':'off']">
 			<view class="" @click="copy(equipInfo)">
-				设备ID:{{equipInfo.imei||equipInfo.device_id}}
+				设备ID:{{equipInfo.imei||equipInfo.device_id||equipInfo.id}}
 				<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode="" class="tishi">
 				</image>
 			</view>
 			<view class="">
-				设备名称:{{equipInfo.device_name==""?"无":equipInfo.device_name}}
+				设备名称:{{equipInfo.device_name || equipInfo.name || '无'}}
 			</view>
 			<view class="">
 				设备类型:性诱测报L
@@ -41,7 +41,10 @@
 				<u-button @click="yxSubmit" size="mini" type="success" class="box-item">确定</u-button>
 			</view>
 		</u-popup>
-		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"></u-calendar>
+		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 		<view class="caobox">
 			<view class="caobox_item" v-if="$QueryPermission(336)" @click="tophoto">
 				<image :src="$imageURL+'/bigdata_app/image/cb/1.png'" mode="widthFix"></image>
@@ -152,31 +155,31 @@
 		methods: {
 			tosim() {
 				uni.navigateTo({
-					url: "../sim/sim?d_id=" + this.equipInfo.d_id + "&device_id=" + this.equipInfo.imei +
+					url: "../sim/sim?d_id=" + this.equipInfo.d_id + "&device_id=" + (this.equipInfo.imei || this.equipInfo.device_id || this.equipInfo.id) +
 						"&device_type=" + this.equipInfo.type + "&disable=" + this.equipInfo.disable
 				})
 			},
 			tophoto() {
 				uni.navigateTo({
-					url: "./photolist?device_id=" + this.equipInfo.imei + "&d_id=" + this.equipInfo.d_id
+					url: "./photolist?device_id=" + (this.equipInfo.imei || this.equipInfo.device_id || this.equipInfo.id) + "&d_id=" + this.equipInfo.d_id
 				})
 			},
 			toset() {
 				uni.navigateTo({
-					url: "./thxyset?device_id=" + this.equipInfo.imei + "&d_id=" + this.equipInfo.d_id +
+					url: "./thxyset?device_id=" + (this.equipInfo.imei || this.equipInfo.device_id || this.equipInfo.id) + "&d_id=" + this.equipInfo.d_id +
 						"&dtype=" + this.equipInfo.dtype +
 						"&device_name=" + this.equipInfo.device_name
 				})
 			},
 			tohis() {
 				uni.navigateTo({
-					url: "./thxyhisdata?device_id=" + this.equipInfo.imei + "&d_id=" + this.equipInfo.d_id
+					url: "./thxyhisdata?device_id=" + (this.equipInfo.imei || this.equipInfo.device_id || this.equipInfo.id) + "&d_id=" + this.equipInfo.d_id
 				})
 			},
 			copy(item) {
 				console.log(item)
 				uni.setClipboardData({
-					data: item.imei || item.device_id,
+					data: item.imei || item.device_id || item.id,
 					success: function() {
 						console.log('success');
 					}
@@ -225,7 +228,7 @@
 						d_id: this.equipInfo.d_id,
 						start_time: Math.floor(+new Date() / 1000 - 30 * 24 * 60 * 60),
 						end_time: Math.floor(+new Date() / 1000),
-						device_id: this.equipInfo.imei,
+						device_id: this.equipInfo.imei || this.equipInfo.device_id || this.equipInfo.id,
 						page: 1,
 					}
 				})
@@ -330,7 +333,7 @@
 					url: '/api/api_gateway?method=forecast.worm_lamp.set_decopy',
 					data: {
 						decoy: this.decoy,
-						device_id: this.equipInfo.imei,
+						device_id: this.equipInfo.imei || this.equipInfo.device_id || this.equipInfo.id,
 						device_type_id: "24",
 						expire_time: time,
 					}
@@ -349,7 +352,7 @@
 		onLoad(option) {
 			var times = new Date()
 			this.date = times.getFullYear() + 1 + "-" + Number(times.getMonth() + 1) + "-" + times.getDate()
-			this.baseimei = option.imei
+			this.baseimei = option.imei || option.device_id || option.id
 			// console.log(this.equipInfo)
 			this.getbaseinfo()
 		},

+ 5 - 1
pages/cb/zjxydetail/thxyhisdata.vue

@@ -95,7 +95,11 @@
 				<button @click="next" :disabled="forbidden">下一页</button>
 			</view>
 		</view>
-		<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+		<u-calendar v-model="timeshow" :mode="mode" @change="timechange"
+			range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 	</view>
 </template>
 

BIN
pages/cbd/assets/cbd.png


BIN
pages/cbd/assets/editBorder.png


BIN
pages/cbd/assets/general.png


BIN
pages/cbd/assets/photoBorder.png


BIN
pages/cbd/assets/settingBorder.png


BIN
pages/cbd/assets/simBorder.png


+ 1 - 1
pages/cbd/components/DeviceCard.vue

@@ -63,7 +63,7 @@ export default {
     display: flex;
     gap: 16px;
     .device-card__title {
-      width: 136rpx;
+      width: 120rpx;
       color: #4E5969;
       font-size: 14px;
       font-style: normal;

+ 330 - 35
pages/cbd/components/deviceData.vue

@@ -3,20 +3,20 @@
     <!-- 顶部时间戳和图标区域 -->
     <view class="device-data-wraper">
       <view class="top-bar">
-        <text class="timestamp">
+        <view class="timestamp">
           {{formatDate(deviceInfo.uptime)}}
-          <u-icon name="reload" color="#0BBC58" style="margin-left: 12rpx"></u-icon>
-        </text>
+          <u-icon name="reload" color="#0BBC58" style="margin-left: 12rpx" @click="refreshData"></u-icon>
+        </view>
         <view class="icon-group">
-          <view class="icon-item refresh-icon" @click="refreshData">
+          <!-- <view class="icon-item refresh-icon">
             <img class="copy-icon" :src="sim"/>
           </view>
           <view class="icon-item settings-icon" @click="openSettings">
             <img class="copy-icon" :src="setting"/>
-          </view>
-          <view class="icon-item info-icon">
+          </view> -->
+          <!-- <view class="icon-item info-icon">
             <img class="copy-icon" :src="edit"/>
-          </view>
+          </view> -->
         </view>
       </view>
 
@@ -54,13 +54,13 @@
             <text class="data-label">下仓门</text>
           </view>
           <view class="data-item">
-            <text class="data-value">{{ deviceStatic.tph }}</text>
+            <text class="data-value">{{ deviceStatic.tph || '' }}℃</text>
             <text class="data-label">高温限值</text>
           </view>
         </view>
         <view class="data-column-right">
           <view class="device-image-container">
-            <image class="device-image" src="../assets/cbd.png" mode="aspectFit"></image>
+            <image class="device-image" src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png" mode="aspectFit"></image>
           </view>
         </view>
       </view>
@@ -139,10 +139,10 @@
                 <text class="body-cell">{{ item.at }}</text>
                 <text class="body-cell">{{ item.ah }}</text>
                 <text class="body-cell">{{ item.hrt }}</text>
-                <text class="body-cell">{{ item.rps }}</text>
-                <text class="body-cell">{{ item.tps }}</text>
-                <text class="body-cell">{{ item.lps }}</text>
-                <text class="body-cell">{{ item.blbs }}</text>
+                <text class="body-cell">{{ getRpsDict(item) }}</text>
+                <text class="body-cell">{{ getTpsDict(item) }}</text>
+                <text class="body-cell">{{ getLpsDict(item) }}</text>
+                <text class="body-cell">{{ getStateDict(item) }}</text>
                 <text class="body-cell">{{ item.csq }}</text>
                 <text class="body-cell">{{ item.current }}</text>
                 <text class="body-cell">{{ item.vbat }}</text>
@@ -154,11 +154,84 @@
         </view>
       </view>
       <view class="pagination">
-        <text class="pagination-btn prev-btn">上一页</text>
-        <text class="pagination-info">1/6</text>
-        <text class="pagination-btn next-btn">下一页</text>
+        <text class="pagination-btn prev-btn" @click="prevPage">上一页</text>
+        <text class="pagination-info">{{currentPage}}/{{totalPages}}</text>
+        <text class="pagination-btn next-btn" @click="nextPage">下一页</text>
       </view>
     </view>
+    <u-popup v-model="show" mode="bottom" border-radius="20">
+			<view style="height:70vh">
+        <view class="tabs-container">
+          <view class="tabs-item" @click="switchTab(0)" :class="{ active: activeTab === 0 }" v-if="data_iccid">数据SIM卡流量</view>
+          <view class="tabs-item" @click="switchTab(1)" :class="{ active: activeTab === 1 }">图片SIM卡流量</view>
+        </view>
+        <view class="sim-container" v-if="activeTab === 0">
+          <view class="sim-item">
+            <text class="sim-label">ICCID:</text>
+            <text class="sim-value">{{ deviceInfoStatic.iccid }}</text>
+          </view>
+           <view class="sim-item">
+            <text class="sim-label">总流量:</text>
+            <text class="sim-value">{{ deviceInfoStatic.total }}</text>
+          </view>
+           <view class="sim-item">
+            <text class="sim-label">状态:</text>
+            <text class="sim-value">{{ deviceInfoStatic.status }}</text>
+          </view>
+           <view class="sim-item">
+            <text class="sim-label">到期时间:</text>
+            <text class="sim-value">{{ deviceInfoStatic.expire }}</text>
+          </view>
+           <view class="sim-item">
+            <text class="sim-label">厂商名称:</text>
+            <text class="sim-value">{{ deviceInfoStatic.company }}</text>
+          </view>
+          <view class="sim-item">
+            <text class="sim-label">已使用:</text>
+            <text class="sim-value"><text style="color: #0BBC58">{{ deviceInfoStatic.used }}</text>/{{ deviceInfoStatic.total }}</text>
+          </view>
+          <view class="sim-item">
+            <text class="sim-value">
+              <u-line-progress active-color="#0BBC58" :percent="deviceInfoStatic.used / deviceInfoStatic.total * 100" :show-percent="false"></u-line-progress>
+            </text>
+          </view>
+        </view>
+        <view class="sim-container" v-if="activeTab === 1">
+          <view class="sim-item" style="display:flex;align-items: center;height:80rpx;">
+            <text class="sim-label">ICCID:</text>
+            <text v-if="show1" style="margin-right: 10rpx">{{ photo_iccid }}</text>
+            <text class="sim-value" style="color: #0BBC58;" @click="changeSim" v-if="show1">
+              更换SIM卡
+            </text>
+            <view v-else class="sim-value-change">
+              <u-input v-model="data_iccidInput" placeholder="请输入ICCID" class="sim-value"></u-input>
+              <view class="sim-value-button" size="small" @click="changeSimHandler">确认</view>
+              <view class="sim-value-button" size="small" @click="show1 = true">取消</view>
+            </view>
+          </view>
+        </view>
+      </view>
+		</u-popup>
+    <floatButton>
+      <view slot="icon">
+        <view class="general-border">
+          <image :src="general" class="general-icon"></image>
+        </view>
+      </view>
+      <view slot="expanded">
+        <view class="general-images">
+          <view class="general-image edit-border" @click="editData">
+            <image :src="editBorder" class="image-icon"></image>
+          </view>
+          <view class="general-image sim-border" @click="simData">
+            <image :src="simBorder" class="image-icon"></image>
+          </view>
+          <view class="general-image setting-border" @click="openSettings">
+            <image :src="settingBorder" class="image-icon"></image>
+          </view>
+        </view>
+      </view>
+    </floatButton>
   </view>
 </template>
 
@@ -167,6 +240,12 @@ import * as echarts from 'echarts';
 import setting from '../assets/setting.png';
 import edit from '../assets/edit.png';
 import sim from '../assets/sim.png';
+import Circulation from '../../../static/js/equipState_dict.json';
+import floatButton from './floating-button.vue';
+import general from '../assets/general.png';
+import editBorder from '../assets/editBorder.png';
+import settingBorder from '../assets/settingBorder.png';
+import simBorder from '../assets/simBorder.png';
 let chartInstance = null;
 
 export default {
@@ -188,12 +267,40 @@ export default {
       type:Array,
       default:()=>[],
     },
+    totalPage:{
+      type:Number,
+      default:0
+    },
+    currentPage:{
+      type:Number,
+      default:0
+    },
+    page_size:{
+      type:Number,
+      default:10
+    },
+  },
+  components: {
+    floatButton,
+  },
+  computed:{
+    totalPages(){
+      return Math.ceil(this.totalPage / this.page_size)
+    }
   },
   data() {
     return {
       setting,
+      general,
+      editBorder,
+      settingBorder,
+      simBorder,
+      activeTab: 0,
       edit,
       sim,
+      show:false,
+      show1:true,
+      equipStateDict:{},
       chartTabs: [
         { name: '温度', id: 'new_tem' },
         { name: '湿度', id: 'new_hum' },
@@ -203,10 +310,15 @@ export default {
       yData:[],
       activeChartTab: 0,
       historyData: [],
-      currentPage: 1,
-      totalPages: 6
+      data_iccid:'',
+      data_iccidInput:'',
+      deviceInfoStatic:{},
+      photo_iccid:'',
     };
   },
+  mounted(){
+    this.equipStateDict = Circulation
+  },
   watch:{
     polylineList:{
       handler(newVal, oldVal){
@@ -221,7 +333,6 @@ export default {
     },
     deviceHistoryList:{
       handler(newVal, oldVal){
-        console.log(newVal,'newValnewVal')
         this.historyData = []
         if(newVal.length > 0){
           newVal.forEach(item=>{
@@ -231,15 +342,119 @@ export default {
       },
       deep:true,
       immediate:true,
+    },
+    show:{
+      handler(newVal, oldVal){
+        if(newVal){
+          this.getSimNew()
+        }
+      }
     }
   },
   methods: {
-    openSettings(){
-      this.$router.push({
-        path: '/pages/cbd/deviceControl',
-        query: {
-          deviceId: this.deviceId
+    editData(){
+      uni.navigateTo({
+        url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
+      })
+    },
+    prevPage(){
+      this.$emit('prevPage', this.currentPage)
+    },
+    nextPage(){
+      this.$emit('nextPage', this.currentPage)
+    },
+    changeSim(){
+      this.show1 = false
+    },
+    changeSimHandler(){
+      if(this.data_iccidInput){
+        this.changeSimAction(this.data_iccidInput);
+      }else{
+        this.$u.toast('请输入ICCID')
+      }
+    },
+    switchTab(index){
+      this.activeTab = index
+    },
+    simData(){
+      this.show = true
+    },
+    async changeSimAction(simid){
+      const res = await this.$myRequest({
+        url: '/api/api_gateway?method=forecast.send_control.device_sim_update',
+        method: 'POST',
+        data: {
+          d_id: this.deviceInfo.d_id,
+          simid,
+        },
+      });
+      if(res){
+        this.$u.toast('更换成功')
+        this.show1 = true
+        this.data_iccidInput = ''
+        this.getSimNew()
+      }
+    },
+    async getSimNew(){
+      const res = await this.$myRequest({
+        url: '/api/api_gateway?method=forecast.send_control.device_sim_new',
+        method: 'POST',
+        data: {
+          d_id: this.deviceInfo.d_id,
+        },
+      });
+      if(res){
+        const data_iccid = res.data_iccid
+        this.data_iccid = data_iccid
+        this.photo_iccid = res.photo_iccid
+        if(data_iccid){
+          this.getQueryNew(data_iccid);
+        }else{
+          this.activeTab = 1
         }
+      }
+    },
+    async getQueryNew(data_iccid){
+      const res = await this.$myRequest({
+        url: '/api/api_gateway?method=forecast.send_control.sim_query_new',
+        method: 'POST',
+        data: {
+          iccid: data_iccid,
+        },
+      });
+      this.deviceInfoStatic = res
+    },
+    async refreshData(){
+      const res = await this.$myRequest({
+        url: '/api/api_gateway?method=forecast.send_control.get_device_config',
+        method: 'POST',
+        data: {
+          device_type_id: this.deviceInfo.type,
+          d_id: this.deviceInfo.d_id,
+          control_type:'data',
+          device_model: this.deviceInfo.device_model || 0,
+        },
+      });
+      if(res){
+        // 弹出提示
+        this.$u.toast('刷新成功')
+      }
+    },
+    getStateDict(item){
+      return item.ws == 0 ? '待机' : this.equipStateDict.lamp.value[item.lamp]
+    },
+    getRpsDict(item){
+      return this.equipStateDict.rps.value[item.rps]
+    },
+    getTpsDict(item){
+      return this.equipStateDict.tps.value[item.tps]
+    },
+    getLpsDict(item){
+      return this.equipStateDict.lps.value[item.lps]
+    },
+    openSettings(){
+      uni.navigateTo({
+        url: '/pages/cbd/deviceControl?deviceId=' + this.deviceInfo.id,
       });
     },
     initChart() {
@@ -391,7 +606,6 @@ export default {
 <style lang="scss" scoped>
 .device-data-container {
   width: 100%;
-  min-height: 100vh;
 }
 .device-data-wraper{
   padding: 16rpx;
@@ -413,11 +627,10 @@ export default {
 
   .icon-group {
     display: flex;
-    gap: 24rpx;
-
+    gap: 10rpx;
     .icon-item {
-      width: 48rpx;
-      height: 48rpx;
+      width: 56rpx;
+      height: 56rpx;
       display: flex;
       align-items: center;
       justify-content: center;
@@ -441,7 +654,75 @@ export default {
     }
   }
 }
+.sim-container{
+  padding: 0 20rpx;
+  .sim-item{
+    margin-bottom: 20rpx;
+    .sim-value-change{
+      display: flex;
+      align-items: center;
+      .sim-value-button{
+        padding: 8rpx 16rpx;
+        border-radius: 8rpx;
+        font-size: 24rpx;
+        font-family: 'Source Han Sans CN VF', sans-serif;
+        font-weight: 400;
+        color: #042118;
+        background: #0BBC58;
+        color: #ffffff;
+        margin-left: 20rpx;
+      }
+    }
+  }
+}
 
+.general-border{
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transition: all 0.3s ease;
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+  .general-icon{
+    width: 50rpx;
+    height: 50rpx;
+    border-radius: 50%;
+  }
+}
+.general-images{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: relative;
+  .general-image{
+    position: absolute;
+    width: 80rpx;
+    height: 80rpx;
+    border-radius: 50%;
+    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+    display:flex;
+    align-items: center;
+    justify-content: center;
+    .image-icon{
+      width: 45rpx;
+      height: 45rpx;
+    }
+  }
+  .edit-border{
+    top: 45rpx;
+    left: -110rpx;
+  }
+  .sim-border{
+    top: -125rpx;
+    left: -110rpx;
+  }
+  .setting-border{
+    top: -40rpx;
+    left: -180rpx;
+  }
+}
 /* 主要数据面板 */
 .main-data-panel {
   display: flex;
@@ -561,7 +842,21 @@ export default {
     }
   }
 }
-
+.tabs-container{
+  display:flex;
+  align-items: center;
+  gap: 24rpx;
+  padding: 24rpx;
+  .tabs-item{
+    font-size: 28rpx;
+    font-family: 'Source Han Sans CN VF', sans-serif;
+    font-weight: 500;
+    color: #999999;
+  }
+  .tabs-item.active{
+    color: #0BBC58;
+  }
+}
 /* 图表区域 */
 .chart-section {
   background: #FFFFFF;
@@ -577,7 +872,7 @@ export default {
 
     .chart-tabs {
       display: flex;
-      gap: 32rpx;
+      gap: 48rpx;
       overflow-x: auto;
       white-space: nowrap;
 
@@ -615,7 +910,6 @@ export default {
       }
     }
   }
-
   .chart-content {
     .chart-legend {
       display: flex;
@@ -665,8 +959,8 @@ export default {
   }
 }
 .copy-icon{
-  width: 28rpx;
-  height: 28rpx;
+  width: 40rpx;
+  height: 40rpx;
 }
 /* 历史数据表格 */
 .history-section {
@@ -694,7 +988,7 @@ export default {
 
       /* 固定列 */
       .fixed-column {
-        width: 180rpx;
+        width: 240rpx;
         position: relative;
         z-index: 2;
         background: #FFFFFF;
@@ -765,6 +1059,7 @@ export default {
             overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;
+            margin-right: 10rpx;
           }
         }
 

+ 219 - 0
pages/cbd/components/floating-button.vue

@@ -0,0 +1,219 @@
+<template>
+	<view
+		class="floating-container"
+		:style="{ top: position.y + 'px', left: position.x + 'px' }"
+		@touchstart="onTouchStart"
+		@click="onClick"
+	>
+		<view class="floating-icon" :class="{ expanded: isExpanded }">
+			<view class="icon-content">
+				<slot name="icon">
+					<text class="default-icon">+</text>
+				</slot>
+			</view>
+			<view v-if="isExpanded" class="expanded-content">
+				<slot name="expanded">
+				</slot>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'FloatingButton',
+	props: {
+		// 初始位置距离右边的距离
+		right: {
+			type: Number,
+			default: 20
+		},
+		// 初始位置距离底部的距离
+		bottom: {
+			type: Number,
+			default: 100
+		},
+		// 按钮大小
+		size: {
+			type: Number,
+			default: 50
+		},
+		// 是否可拖拽
+		draggable: {
+			type: Boolean,
+			default: true
+		}
+	},
+	data() {
+		return {
+			position: {
+				x: 0,
+				y: 0
+			},
+			isDragging: false,
+			isExpanded: false,
+			startX: 0,
+			startY: 0,
+			lastX: 0,
+			lastY: 0,
+			clickStartTime: 0,
+			hasMoved: false
+		};
+	},
+	mounted() {
+		this.initPosition();
+	},
+	methods: {
+		// 初始化位置
+		initPosition() {
+			const systemInfo = uni.getSystemInfoSync();
+			const screenWidth = systemInfo.windowWidth;
+			const screenHeight = systemInfo.windowHeight;
+
+			this.position = {
+				x: screenWidth - this.right - this.size,
+				y: screenHeight - this.bottom - this.size
+			};
+		},
+
+		// 触摸开始
+		onTouchStart(e) {
+			if (!this.draggable) return;
+
+			const touch = e.touches[0];
+			this.startX = touch.clientX;
+			this.startY = touch.clientY;
+			this.lastX = this.position.x;
+			this.lastY = this.position.y;
+			this.isDragging = true;
+			this.hasMoved = false;
+			this.clickStartTime = Date.now();
+		},
+
+		// 触摸移动
+		onTouchMove(e) {
+			if (!this.draggable || !this.isDragging) return;
+
+			e.preventDefault();
+
+			const touch = e.touches[0];
+			const deltaX = touch.clientX - this.startX;
+			const deltaY = touch.clientY - this.startY;
+
+			// 如果移动超过5像素,认为是拖拽操作
+			if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
+				this.hasMoved = true;
+			}
+
+			const systemInfo = uni.getSystemInfoSync();
+			const screenWidth = systemInfo.windowWidth;
+			const screenHeight = systemInfo.windowHeight;
+
+			// 计算新位置,限制在屏幕范围内
+			let newX = this.lastX + deltaX;
+			let newY = this.lastY + deltaY;
+
+			// 边界限制
+			newX = Math.max(0, Math.min(newX, screenWidth - this.size));
+			newY = Math.max(0, Math.min(newY, screenHeight - this.size));
+
+			this.position = {
+				x: newX,
+				y: newY
+			};
+		},
+
+		// 触摸结束
+		onTouchEnd(e) {
+			if (!this.draggable) return;
+
+			this.isDragging = false;
+
+			// 自动吸附到屏幕边缘
+			this.snapToEdge();
+		},
+
+		// 吸附到屏幕左右边缘
+		snapToEdge() {
+			const systemInfo = uni.getSystemInfoSync();
+			const screenWidth = systemInfo.windowWidth;
+
+			// 判断当前在左半屏还是右半屏
+			const centerX = this.position.x + this.size / 2;
+
+			if (centerX < screenWidth / 2) {
+				// 吸附到左边
+				this.position.x = 10;
+			} else {
+				// 吸附到右边
+				this.position.x = screenWidth - this.size - 10;
+			}
+		},
+
+		// 点击事件
+		onClick(e) {
+			// 如果发生了拖拽移动,不触发点击事件
+			const clickDuration = Date.now() - this.clickStartTime;
+
+			if (this.hasMoved || clickDuration > 300) {
+				return;
+			}
+
+			// 切换展开/收起状态
+			this.isExpanded = !this.isExpanded;
+
+			// 触发父组件事件
+			this.$emit(this.isExpanded ? 'expand' : 'collapse', {
+				expanded: this.isExpanded
+			});
+		},
+
+		// 手动展开
+		expand() {
+			this.isExpanded = true;
+		},
+
+		// 手动收起
+		collapse() {
+			this.isExpanded = false;
+		}
+	}
+};
+</script>
+
+<style scoped>
+.floating-container {
+	position: fixed;
+	z-index: 9999;
+	width: 50px;
+	height: 50px;
+}
+.expanded-content{
+	position: absolute;
+}
+.floating-icon {
+	width: 100%;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	transition: all 0.3s ease;
+}
+
+.icon-content {
+	width: 100rpx;
+	height: 100rpx;
+	border-radius: 50%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	transition: all 0.3s ease;
+}
+
+.default-icon {
+	font-size: 24px;
+	color: #ffffff;
+	font-weight: bold;
+}
+
+</style>

+ 29 - 9
pages/cbd/components/pestArchive.vue

@@ -24,12 +24,25 @@
             <view class="pest-card__name">
               害虫信息
             </view>
-            <view class="pest-card__status" style="height:200rpx;overflow: auto;">
+            <view class="pest-card__status" style="height:160rpx;overflow: auto;">
               {{ pest_info.prevention || '未知' }}
             </view>
           </view>
         </view>
       </view>
+      <u-popup v-model="showDetail" mode="bottom" border-radius="32">
+        <view class="pest-card__detail">
+          <view class="pest-card__image">
+            <image :src="pest_info.img_urls" mode="aspectFill" class="pest-img"></image>
+          </view>
+          <view>
+            {{ pest_info.name || '未知' }}
+          </view>
+          <view>
+            {{ pest_info.prevention || '未知' }}
+          </view>
+        </view>
+      </u-popup>
   </view>
 </template>
 
@@ -47,10 +60,15 @@ export default {
   },
   data() {
     return {
+      showDetail: false,
     }
   },
   methods: {
+    showPestDetail(){
+      this.showDetail = true;
+    },
     handleCardClick() {
+      this.showPestDetail()
       this.$emit('click', this.pest_info)
     }
   }
@@ -75,10 +93,10 @@ export default {
 }
 
 .pest-archive__title {
-  font-size: 36rpx;
+  font-size: 32rpx;
   color: #042118;
   font-family: 'Source Han Sans CN VF';
-  font-weight: 700;
+  font-weight: 500;
 }
 
 .pest-archive__add {
@@ -98,11 +116,13 @@ export default {
     font-weight: 300;
   }
 }
-
+.pest-card__detail{
+  height: 70vh;
+  padding: 40rpx;
+}
 .pest-archive__list {
   width: 100%;
 }
-
 .pest-card {
   display: flex;
   padding: 24rpx;
@@ -144,17 +164,17 @@ export default {
 }
 
 .pest-card__name {
-  font-size: 24rpx;
+  font-size: 26rpx;
   color: #999999;
   font-family: "Source Han Sans CN VF";
   font-weight: 400;
-  width: 100rpx;
+  width: 110rpx;
 }
 
 .pest-card__status {
   width: 270rpx;
-  border-radius: 20rpx;
-  font-size: 24rpx;
+  color: #303133;
+  font-size: 26srpx;
   font-weight: 500;
 
   &.status--handled {

+ 3 - 3
pages/cbd/components/pestDiscern.vue

@@ -77,17 +77,17 @@ export default {
   border-radius: 16rpx;
 }
 .pest-discern__header {
-  padding: 20rpx 0rpx;
+  padding: 0rpx 0rpx 20rpx 0rpx;
   font-size: 32rpx;
   color: #042118;
   font-family: 'Source Han Sans CN VF';
   font-weight: 700;
 }
 .pest-discern__title {
-  font-size: 32rpx;
+  font-size: 28rpx;
   color: #042118;
   font-family: 'Source Han Sans CN VF';
-  font-weight: 700;
+  font-weight: 500;
 }
 .pest-discern__item {
   display: flex;

+ 0 - 5
pages/cbd/components/pestEchart.vue

@@ -289,13 +289,8 @@ export default {
   margin-top: 24rpx;
 }
 
-.pest-echart__header {
-  padding-top: 24rpx;
-}
-
 .tab-list {
   width: 100%;
-  padding-bottom: 24rpx;
   overflow-x: scroll;
   white-space: nowrap;
   overflow-y: hidden;

+ 12 - 4
pages/cbd/components/photoImage.vue

@@ -49,7 +49,7 @@ export default {
       default: ''
     },
     currentYear:{
-      type: String,
+      type: String || Number,
       default: ''
     },
   },
@@ -164,16 +164,17 @@ export default {
   &__item {
     position: relative;
     width: 33.33%;
-    padding: 0 10rpx;
+    padding: 0rpx;
     box-sizing: border-box;
     display: inline-block;
     margin-bottom: 24rpx;
+    overflow: hidden;
 
     &-img-container {
       width: 100%;
       padding-bottom: 100%;
       position: relative;
-      border-radius: 8rpx;
+      border-radius: 16rpx;
       overflow: hidden;
       background-color: #f5f5f5;
       border: 2rpx solid #333;
@@ -189,7 +190,14 @@ export default {
 
     &-time {
       position: absolute;
-      bottom: 10rpx;
+      bottom: 0rpx;
+      width: 100%;
+      text-align: center;
+      padding: 0;
+      border-radius: 16rpx;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
       margin-top: 12rpx;
       font-size: 22rpx;
       color: #fff;

+ 53 - 11
pages/cbd/detail.vue

@@ -7,17 +7,17 @@
         name="arrow-left"
         @click="handleBack"
       ></u-icon>
-      {{ title }}
+      {{ deviceInfo.name }}
     </view>
     <view class="device-detail__body">
       <DeviceCard
         :dataSource="deviceInfo"
         :collectTime="time"
-        :title="title"
+        :title="deviceInfo.name"
         :deviceType="deviceType"
       />
       <view class="tabs">
-        <view class="tab-container">
+        <view class="tab-container" v-if="isShowTab">
           <view class="tab-item" :class="activeTab === 'pestAnalysis'?'active':''" @click="handleTabClick('pestAnalysis')">
             害虫分析
           </view>
@@ -82,10 +82,15 @@
           :deviceInfo="deviceInfo"
           :polylineList="polylineList"
           :deviceHistoryList="deviceHistoryList"
+          :totalPage="totalPage"
+          :currentPage="page"
+          :page_size="page_size"
+          @prevPage="prevPage"
+          @nextPage="nextPage"
         />
       </view>
     </view>
-		<u-calendar v-model="show" :mode="mode" @change="handleChange" :max-date="maxDate" :min-date="minDate"></u-calendar>
+		<u-calendar v-model="show" :mode="mode" range-color="#999" btn-type="success" active-bg-color="#0BBC58" range-bg-color="rgba(11,188,88,0.13)" @change="handleChange" :max-date="maxDate" :min-date="minDate"></u-calendar>
 		<u-picker v-model="showPicker" mode="selector" :range="selectorRange" range-key="id" :default-selector="[0]" @confirm="confirmHandler"></u-picker>
   </view>
 </template>
@@ -108,7 +113,9 @@ export default {
   },
   data(){
     return {
+      isShowTab:false,
       showPicker: false,
+      totalPage:0,
       currentYear: new Date().getFullYear(),
       selectorRange: [],
       maxDate: this.formatDate(new Date()),
@@ -124,7 +131,6 @@ export default {
       pestInfo: {},
       time: '',
       activeTab: 'pestAnalysis',
-      title: '虫情测报灯详情',
       deviceType: '',
       location: '',
       total: 0,
@@ -144,6 +150,7 @@ export default {
   onLoad(options){
     this.deviceInfo = JSON.parse(options.info);
     this.getPestAnalysis();
+    this.isShow();
     const currentYear = new Date().getFullYear();
     this.selectorRange = [];
     for(let i = 0;i<50;i++){
@@ -155,6 +162,37 @@ export default {
     }
   },
   methods: {
+    isShow(){
+      // disable == 0 或者 device_model == 15 表示不可以查看
+      if(!this.deviceInfo.d_id){
+        return false;
+      }
+      let showStatus = true;
+      if(this.deviceInfo.disable == 0 || this.deviceInfo.device_model == 15 || this.deviceInfo.device_model == 12){
+        showStatus = false;
+      }
+      if(showStatus){
+        this.activeTab = 'pestAnalysis';
+      }else{
+        this.activeTab = 'deviceData';
+      }
+      this.initAction();
+      this.isShowTab = showStatus;
+    },
+    prevPage(e){
+      if(e == 1){
+        return
+      }
+      this.page = e;
+      this.getDeviceHistoryData();
+    },
+    nextPage(e){
+      if(e * this.page_size >= this.totalPage){
+        return
+      }
+      this.page = e;
+      this.getDeviceHistoryData();
+    },
     changeTab(pestList){
       let pest_names = pestList.map(item => item.pest_name);
       this.pest_names = pest_names.join(',');
@@ -287,6 +325,7 @@ export default {
         },
       });
       const data = res?.data || [];
+      this.totalPage = res.counts;
       this.deviceHistoryList = data
     },
     async getPestAnalysis(){
@@ -337,10 +376,11 @@ export default {
 .device-detail {
   display: flex;
   width: 100%;
-  height: 100vh;
+  height: calc(100vh - 112rpx);
   padding-top: 112rpx;
   flex-direction: column;
   align-items: center;
+  overflow-y: scroll;
   background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
   .device-detail__header {
     width: 100%;
@@ -412,6 +452,7 @@ export default {
     }
     .tabs-timer-container{
       display: flex;
+      align-items: center;
       width: calc(100% - 256rpx);
       height: 64rpx;
       line-height: 64rpx;
@@ -435,15 +476,16 @@ export default {
         font-weight: 400;
       }
       .calendar-icon{
-        position: absolute;
-        right: 78rpx;
-        margin-top: 4rpx;
-        top: 12rpx;
-        right: 24rpx;
+        margin-left: 24rpx;
       }
     }
     .tab-item {
       flex: 1;
+      color: #999999;
+      text-align: center;
+      font-family: "Source Han Sans CN VF";
+      font-size: 28rpx;
+      font-weight: 400;
     }
     .active{
       position: relative;

+ 7 - 3
pages/cbd/devicePhoto.vue

@@ -92,9 +92,8 @@
     </view>
 
     <!-- 识别结果 -->
-    <view class="recognition-result">
+    <view class="recognition-result" v-if="pestList.length">
       <view class="result-title">当前图片识别结果</view>
-      
       <!-- 一类害虫 -->
       <view class="pest-category" v-for="(pest,index) in pestList" :key="index">
         <view class="category-header">
@@ -110,7 +109,11 @@
         </view>
       </view>
     </view>
-		<u-calendar v-model="show" :mode="mode" @change="handleChange" :max-date="maxDate" :min-date="minDate" :defaultDate="defaultDate"></u-calendar>
+    <u-empty v-else text="暂无数据"></u-empty>
+		<u-calendar v-model="show" :mode="mode" @change="handleChange" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)" :max-date="maxDate" :min-date="minDate" :defaultDate="defaultDate"></u-calendar>
 		<u-picker v-model="showPicker" mode="selector" :range="selectorRange" range-key="id" :default-selector="[0]" @confirm="confirmHandler"></u-picker>
   </view>
 </template>
@@ -263,6 +266,7 @@ export default {
         },
       });
       this.thumbnails = res?.data || [];
+      this.currentImg = {};
       //如果和旧的id相同,就用旧的id不然就用第一个
       if(this.thumbnails.find(item => item.ids == this.imgOld_id)){
         this.img_id = this.imgOld_id

+ 9 - 1
pages/cbqxyj/cbwarn.vue

@@ -153,7 +153,15 @@
 		<view class="">
 			<u-mask :show="accServiceShow" z-index="998"></u-mask>
 			<u-select v-model="recordtypeshow" :list="recordtypelist" @confirm="confirm"></u-select>
-			<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+			<u-calendar
+				v-model="timeshow"
+				:mode="mode"
+				@change="timechange"
+				range-color="#999"
+				btn-type="success"
+				active-bg-color="#0BBC58"
+				range-bg-color="rgba(11,188,88,0.13)"
+			></u-calendar>
 			<multiple-select v-model="accServiceShow" :value="accServiceShow" :data="serviceList"
 				:default-selected="defaultSelected" @confirm="accServiceConfirm"></multiple-select>
 			<u-modal v-model="modalshow" title="短信预警详情" :content="content" @confirm="singlereadsure"></u-modal>

+ 3 - 1
pages/deviceDetails/weatherStation/devControl.vue

@@ -125,7 +125,9 @@ export default {
   padding: 0 32rpx;
   padding-top: 98rpx;
 }
-
+.nav-title{
+  text-align: center;
+}
 .control-board {
   border-radius: 16rpx;
   background: #fff;

+ 5 - 1
pages/deviceDetails/weatherStation/eleDetail.vue

@@ -15,7 +15,11 @@
       v-model="show"
       :mode="mode"
       @change="onDateChange"
-      ref="calendar"
+      ref="calendar" 
+      range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"
     ></u-calendar>
     <view class="echarts-board">
       <view class="period-tabs">

+ 10 - 3
pages/deviceDetails/weatherStation/index.vue

@@ -87,7 +87,7 @@
             ></image>
           </view>
           <view class="card-thrid">
-            <text>{{ item.alias }}</text>
+            <text>{{ item.alias || ''}}</text>
           </view>
         </view>
       </view>
@@ -158,6 +158,7 @@
             v-model="show"
             :mode="mode"
             @change="onDateChange"
+            range-color="#999" btn-type="success" active-bg-color="#0BBC58" range-bg-color="rgba(11,188,88,0.13)"
             ref="calendar"
           ></u-calendar>
           <view class="table-wrap" v-if="tableData && tableData.length > 0">
@@ -475,7 +476,12 @@ export default {
   padding: 0 32rpx;
   padding-top: 98rpx;
 }
-
+.nav-title{
+  //超出隐藏
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 /* 设备基本信息 */
 .device-info {
   background-color: #ffffff;
@@ -731,6 +737,7 @@ export default {
         top:0;
         .device-img {
           width: 150rpx;
+          height: 300rpx;
         }
       }
     }
@@ -762,7 +769,7 @@ export default {
         font-weight: 400;
         border-radius: 32rpx;
         background: #f1f4f8;
-        padding: 7rpx 24rpx;
+        padding: 16rpx 24rpx;
         .line {
           color: #656565;
           margin: 0 10rpx;

+ 9 - 6
pages/deviceDetails/weatherStation/simDetail.vue

@@ -26,7 +26,7 @@
         </view>
         <view class="sim-item">
           <text class="label">总流量:</text>
-          <span class="val">{{ simData.total }}</span>
+          <span class="val">{{ simData.total }}M</span>
         </view>
         <view class="sim-item">
           <text class="label">状态:</text>
@@ -46,19 +46,19 @@
             ><text
               :style="{
                 color:
-                  simData.used > parseInt(simData.total) ? '#f56c6c' : '#14A478',
+                  simData.used > parseInt(simData.total) ? '#f56c6c' : '#0bbc58',
               }"
               >{{ simData.used.toFixed(2) }}M</text
-            >/{{ simData.total }}
+            >/{{ simData.total }}M
           </view>
           <view class="sim-item">
             <text class="label">剩余:</text>
             <text
               class="val"
               :style="{
-                color: '#14A478',
+                color: '#0bbc58',
               }"
-              >{{ (parseInt(simData.total) - simData.used).toFixed(2) }}M</text
+              >{{ (parseInt(simData.total || 0) - simData.used).toFixed(2) }}M</text
             >
           </view>
         </view>
@@ -257,6 +257,9 @@ export default {
   color: #666;
   margin-top: 32rpx;
 }
+.nav-title{
+  text-align: center;
+}
 .sim-board {
   padding: 32rpx;
   border-radius: 16rpx;
@@ -266,7 +269,7 @@ export default {
   .title {
     color: #020305;
     font-size: 32rpx;
-    font-weight: 500;
+    font-weight: 700;
     margin-bottom: 24rpx;
   }
   .sim-item {

+ 4 - 1
pages/disease/cmb.vue

@@ -41,7 +41,10 @@
 						<p>{{ timetab(end) }}</p>
 						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
-					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				</view>
 				<view class="shuju_one">
 					<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">

+ 4 - 1
pages/disease/mls/forecastResult.vue

@@ -12,7 +12,10 @@
 						<p>{{ initTime ? '收获期' : end }}</p>
 						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
-					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				</view>
 				<view class="empty" v-if="initTime">
 					请先选择出苗期和收获期

+ 4 - 1
pages/disease/mls/mls.vue

@@ -36,7 +36,10 @@
 						<p>{{ timetab(end) }}</p>
 						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
-					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				</view>
 				<view class="shuju_one">
 					<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">

+ 2 - 2
pages/environment/equipment.vue

@@ -18,7 +18,7 @@
 					<p>设备名称:{{eqinfo.item.equip_name?eqinfo.item.equip_name:"无"}}</p>
 					<p>最近上报时间:<span v-if="eqinfo.item.uptime">{{eqinfo.item.uptime|timeFormat()}}</span><span
 							v-else>{{eqinfo.item.addtime|timeFormat()}}</span></p>
-					<p>地址:{{city==""?"--":city}}</p>
+					<p>地址:{{eqinfo.item.address?eqinfo.item.address:"无"}}</p>
 				</view>
 			</view>
 			<view class="control">
@@ -352,7 +352,7 @@
 		onLoad(option) {
 			this.$forceUpdate()
 			this.eqinfo.item = JSON.parse(option.shebei)
-			console.log(JSON.parse(option.shebei))
+			console.log(JSON.parse(option.shebei),'2222')
 			if (!this.eqinfo.item.iccid) {
 				this.getbaseinfo(this.eqinfo.item.equip_id)
 			}

+ 2 - 2
pages/environment/gsequipment.vue

@@ -12,10 +12,10 @@
 						<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode=""
 							class="tishi"></image>
 					</p>
-					<p>设备名称:{{eqinfo.device_name||"无"}}</p>
+					<p>设备名称:{{eqinfo.device_name || eqinfo.name||"无"}}</p>
 					<p>最近上报时间:<span v-if="eqinfo.uptime">{{eqinfo.uptime|timeFormat()}}</span><span
 							v-else>{{eqinfo.addtime|timeFormat()}}</span></p>
-					<p>地址:{{city}}</p>
+					<p>地址:{{eqinfo.address||"无"}}</p>
 					<p @click="setlongfun('')" v-if="$QueryPermission(250)">
 						<text space="emsp">设置步长</text>
 						<u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon>

+ 5 - 1
pages/environment/gshistory.vue

@@ -17,7 +17,11 @@
 					<p>{{timetab(end)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"
+					range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="shuju_one">
 				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">

+ 6 - 2
pages/environment/history-new.vue

@@ -38,7 +38,11 @@
 						<p>{{timetab(end)}}</p>
 						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 					</view>
-					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"
+						range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				</view>
 				<view class="condition" v-if="scrollTF">
 					<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
@@ -47,7 +51,7 @@
 							<tr class="tr">
 								
 								<th class="th" v-for="(item,index) in thdata" :key="index">
-									{{item}}</th>
+									{{item.name}}</th>
 							</tr>
 							<tr class="tr" v-for="(items,index) in tableData" :key="index" v-if="!forbidden">
 								<td class="td" v-for="(key,value) in items">{{key}}</td>

+ 12 - 12
pages/equipList2/index copy.vue

@@ -345,7 +345,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -371,7 +371,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.equip_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -384,7 +384,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.equip_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -468,7 +468,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -481,7 +481,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -495,7 +495,7 @@
 					case 18:
 						var obj = {};
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						uni.navigateTo({
 							url: '../cb/shuifeiL/shuifeiL?detail=' + JSON.stringify(obj),
 						});
@@ -516,7 +516,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -531,7 +531,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -546,7 +546,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -561,7 +561,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -576,7 +576,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -591,7 +591,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;

+ 132 - 26
pages/equipList2/index.vue

@@ -8,11 +8,12 @@
 			</view>
 				<view class="tab">
 					<view class="tab-content">
-						<view class="tab-box">
+						<view class="tab-box tab-box-top">
 							<view v-for="(item,index) in menuList" :key="index" @click="change(index,item)"
+								v-if="isShow(item)"
 								:class="['tab-item',current==index?'active':'']">
 								<image class="img-icon" :src="item.app_menu_icon" mode=""></image>
-								<view class="text">{{item.purview_name}}</view>
+								<view class="text">{{ getSlice(item.purview_name) }}</view>
 							</view>
 						</view>
 					</view>
@@ -24,7 +25,8 @@
               v-for="(item,index) in list"
               :key="index"
               @click="changeDevice(item,index)"
-							:class="['tab-item',currents==index?'active':'']"
+							v-show="!item.url"
+							:class="['tab-item',currents == index?'active':'']"
             >
 							<text>{{item.purview_name}}</text>
 						</view>
@@ -59,7 +61,7 @@
 						<view class="list_item_top">
 							<p class="p1">
                 <span class="title">{{ (item.name || '--' )}}</span>
-                <span class="sub-title">{{ item.id || item.device_id }}</span>
+                <span class="sub-title" @click.stop="modification(item)">信息修改</span>
               </p>
 							<p class="online-status">
 								<image
@@ -76,10 +78,14 @@
 						</view>
 						<view class="list_item_text">
 							<p>
-                <span class="label">上报时间</span>{{ item.uptime | timeFormat() }}
+                <span class="label">设备ID</span>{{ item.only_for_show || item.id || item.device_id }}
               </p>
 							<p>
-								<span class="label">设备位置</span>{{ (item.address|| '无') }}
+                <span class="label">上报时间</span>{{ (item.report || item.uptime) | timeFormat() }}
+              </p>
+							<p style="display:flex;align-items: center;">
+								<span class="label">设备位置</span>
+								<span class="nav-label">{{ (item.address|| '无') }}</span>
 							</p>
 						</view>
 					</view>
@@ -109,17 +115,20 @@
 			return {
 				list: [],
         pur_id: '',
+				currentPur_id:'',
         device_status: '',
         counts:0,
         online_counts:0,
         offline_counts:0,
 				current: 0,
 				currents: 0,
+				total: 0,
+				refreshData:'',
 				page: 1,
 				size: 10,
 				eqlistdata: [],
 				isTop: false,
-				device_model: 0,
+				device_model: '',
 				infoalter: false, // 权限设置,
 				type_id: 0, //设备类型,
 				imgpath: [],
@@ -129,11 +138,29 @@
 				menuList: []
 			};
 		},
+
 		methods: {
+			isShow(item){
+				return item.pur_id != 422
+			},
+			getSlice(name){
+				return name.slice(0,4)
+			},
+			modification(item) {
+				uni.navigateTo({
+					url:
+						'./seabox/modification?data=' +
+						JSON.stringify(item) +
+						'&id=' +
+						this.type_id,
+				});
+			},
       changeStatus(status){
         this.device_status = status;
-        this.page = 1;
-        this.eqlist();
+				Debounce(() => {
+					this.page = 1;
+					this.eqlist();
+				}, 500)();
       },
 			async getUserlogin() {
         this.list = [];
@@ -169,6 +196,9 @@
         this.initPage();
       },
 			async eqlist(tf) {
+				this.counts = 0;
+				this.online_counts = 0;
+				this.offline_counts = 0;
 				this.loadingtf = true;
         let data = {
           device_type_id: this.type_id,
@@ -188,6 +218,7 @@
         this.online_counts = status.online || 0;
         this.offline_counts = status.offline || 0;
         this.counts = (status.online || 0) + (status.offline || 0);
+				this.total = res.total || 0;
 				if (tf) {
 					this.eqlistdata = this.eqlistdata.concat(res.data);
 				} else {
@@ -209,10 +240,29 @@
 			},
       changeDevice(item,index){
 				this.currents = index;
+				this.currentPur_id = item.pur_id || '';
+				const name = item.menu;
+				if (name === 'cbd4') {
+					this.device_model = 11;
+				} else if(name === 'cbd1'){
+					this.device_model = 12;
+				} else if(name === 'cbd3'){
+					this.device_model = '';
+				} else if(name === 'cbd5'){
+					this.device_model = 13;
+				} else if(name === 'cbd6'){
+					this.device_model = 14;
+				}else if(name === 'gkcbd1'){
+					this.device_model = 15;
+				} else {
+					this.device_model = item.device_model || '';
+				}
 				this.page = 1;
 				this.eqlistdata = [];
 				this.type_id = item.device_type_id;
-				this.eqlist();
+				Debounce(() => {
+					this.eqlist();
+				}, 500)();
       },
 			top() {
 				uni.pageScrollTo({
@@ -224,11 +274,14 @@
         this.eqlistdata = [];
         this.currents = 0;
         this.page = 1;
-        this.eqlist(true);
+				Debounce(() => {
+					this.eqlist(true);
+				}, 500)();
         this.width = 0;
       },
 			historys(item) {
 				const type_id = item.type_id;
+				item.pur_id = this.currentPur_id;
 				switch (type_id) {
 					// 水肥新设备
 					case 22:
@@ -383,6 +436,7 @@
 						obj.lng = item.lng;
 						obj.equip_name = item.name;
 						obj.uptime = item.uptime;
+						obj.address = item.address || '无';
 						uni.navigateTo({
 							url: '../environment/gsequipment?shebei=' + JSON.stringify(obj),
 						});
@@ -525,7 +579,7 @@
 						break;
 					case 46:
 						uni.navigateTo({
-							url: `../deviceDetails/weatherStation/index?devBid=${item.d_id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
+							url: `../deviceDetails/weatherStation/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
 						});
 						break;
 					case 47:
@@ -552,8 +606,13 @@
 			scrollTop(e) {},
 			upper() {},
 			lower() {
-				this.page++;
-				this.eqlist(true);
+				if(this.eqlistdata.length >= this.total){
+					return;
+				}
+				Debounce(() => {
+					this.page++;
+					this.eqlist(true);
+				}, 500)();
 			},
 			scroll() {},
 		},
@@ -569,13 +628,39 @@
 			uni.$on('purId', (purId) => {
 				that.pur_id = purId;
 			});
+			uni.$on('refreshData', (refreshData) => {
+				this.eqlist();
+			});
 			this.getUserlogin();
 		},
+		onShow() {
+			// 监听刷新数据事件
+			const refreshData = uni.getStorageSync('refreshData');
+			if(!this.refreshData){
+				this.refreshData = refreshData;
+				// 如果发生改变,刷新数据
+				if(refreshData){
+					Debounce(() => {
+						this.getUserlogin();
+					}, 500)();
+				}
+			}else if(this.refreshData != refreshData){
+				this.refreshData = refreshData;
+				Debounce(() => {
+					this.getUserlogin();
+				}, 500)();
+			}
+		},
 		onTabItemTap(e) {
 		},
 		onReachBottom() {
-			this.page++;
-			this.eqlist(true);
+			if(this.eqlistdata.length >= this.total){
+				return;
+			}
+			Debounce(() => {
+				this.page++;
+				this.eqlist(true);
+			}, 500)();
 		},
 		onPageScroll(e) {
 			//nvue暂不支持滚动监听,可用bindingx代替
@@ -602,10 +687,9 @@
   }
 	.textbox {
 		width: 100%;
-		height: 100vh;
-		padding-top: 102rpx;
+		height: calc(100vh - 82rpx);
+		padding-top: 82rpx;
 		box-sizing: border-box;
-
 	}
 
 	.inputs {
@@ -676,6 +760,12 @@
 			}
 		}
 	}
+	.tab-box-top{
+		.tab-item {
+			width: 140rpx;
+			text-align: center;
+		}
+	}
 	.tab {
 		// background-color: #0BBC58;
 		margin-top: 42rpx;
@@ -755,21 +845,31 @@
 			.list_item_top {
 				.p1 {
 					width: 86%;
-					height: 60rpx;
-					line-height: 60rpx;
 					font-size: 28rpx;
 					overflow: hidden;
 					display: flex;
+					align-items: center;
 					.title{
+						 max-width: 75%;
 						 color: #333333;
 						 font-size: 28rpx;
 						 font-weight: 700;
 						 margin-right: 8rpx;
+						 overflow: hidden;
+						 text-overflow: ellipsis;
+						 white-space: nowrap;
 					}
 					.sub-title{
-						 color: #666666;
-						 font-size: 28rpx;
+						 border-radius: 32rpx;
+						 border:2rpx solid #0bbc58;
+						 padding: 4rpx 12rpx;
+						 font-size: 22rpx;
 						 font-weight: 400;
+						 overflow: hidden;
+						 text-overflow: ellipsis;
+						 white-space: nowrap;
+						 color:#0bbc58;
+						 margin-left: 20rpx;
 					}
 				}
 			}
@@ -811,14 +911,20 @@
 					margin-top: 10rpx;
 					word-break: break-all;
 				}
-				
-
 				.label{
 					 color: #999999;
 					 text-align: right;
-					margin-right: 32rpx;
+					 margin-right: 32rpx;
 					 font-size: 24rpx;
 				}
+				.nav-label{
+					//超出隐藏
+					display: inline-block;
+					width: 70%;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
 			}
 
 			.list_item_btn {

+ 5 - 4
pages/equipList2/modification.vue

@@ -8,11 +8,11 @@
 			<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"/>
+					<input type="text" v-model="moddata.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 />
+					<input type="text" :value="moddata.imei||moddata.device_id || moddata.id" disabled />
 				</view>
 				<view class="mod_user">
 					<p>适配用户</p>
@@ -153,11 +153,12 @@
 			},
 		},
 		onLoad(option) {
-			console.log(option)
+			console.log(option,'optionoption')
 			if(option.id==10){
 				this.xyeqlistuser(JSON.parse(option.data).device_id)
 			}else{
-				this.eqlistuser(option.id, JSON.parse(option.data).imei)
+				const data = JSON.parse(option.data)
+				this.eqlistuser(option.id, data.imei || data.device_id || data.id)
 			}
 			uni.getStorage({
 				key:"jurisdiction",

+ 25 - 25
pages/equipList2/seabox/modification.vue

@@ -7,12 +7,12 @@
 			</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"/>
+					<p>设备名称</p>
+					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" />
 				</view>
 				<view class="mod_id">
 					<p>设备ID</p>
-					<input type="text" :value="moddata.imei || moddata.device_id" disabled />
+					<input type="text" :value="moddata.imei || moddata.device_id || moddata.id" disabled />
 				</view>
 				<view class="mod_user">
 					<p>适配用户</p>
@@ -30,7 +30,7 @@
 					<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 class="sub" @click="btn">
 					提 交
 				</view>
 			</view>
@@ -57,7 +57,7 @@
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
 					data: {
-						device_id: this.moddata.imei,
+						device_id: this.moddata.imei || this.moddata.device_id || this.moddata.id,
 						lat: lat,
 						lng: lng
 					}
@@ -79,7 +79,7 @@
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
 					data: {
-						device_id: this.moddata.imei,
+						device_id: this.moddata.imei || this.moddata.device_id || this.moddata.id,
 						device_name: this.moddata.device_name,
 					}
 				})
@@ -100,16 +100,16 @@
 					this.clickLeft()
 				}
 			},
-			async eqlistuser(id, imei) { //获取设备信息
+			async eqlistuser(id, imei,device_model) { //获取设备信息
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
 					data: {
 						device_type_id: id,
 						device_id: imei,
+						device_model: device_model,
 					}
 				})
 				this.moddata = res.data[0]
-				console.log(res)
 				this.selectaddress(this.moddata.lng, this.moddata.lat)
 			},
 			async xyeqlistuser(imei) { //获取设备信息
@@ -119,7 +119,6 @@
 						device_id: imei,
 					}
 				})
-				console.log(res)
 				this.moddata = res.data[0]
 				this.selectaddress(this.moddata.lng, this.moddata.lat)
 			},
@@ -129,21 +128,18 @@
 			},
 			clickLeft() {
 				uni.navigateBack({
-					delta:1
+					delta:1,
+					success:()=>{
+						//告知上一页刷新数据
+						uni.$emit('refreshData')
+					}
 				})
 			},
 			amendcity() { //修改设备地址
-				if(this.quanxian.cityalter){
-					this.selectcityTF = true
-					uni.navigateTo({
-						url: "../fourBase/city"
-					})
-				}else{
-					uni.showToast({
-						title: "您暂无权限进行此操作,如有需要,请联系管理员",
-						icon: "none"
-					})
-				}
+				this.selectcityTF = true
+				uni.navigateTo({
+					url: "/pages/fourBase/city"
+				})
 			},
 			selectaddress(lng, lat) { //获取分布位置
 				uni.request({
@@ -163,16 +159,20 @@
 			},
 		},
 		onLoad(option) {
-			console.log(option)
 			if(option.id==10){
-				this.xyeqlistuser(JSON.parse(option.data).device_id)
+				const data = JSON.parse(option.data)
+				this.xyeqlistuser(data.device_id || data.id)
 			}else{
-				this.eqlistuser(option.id, JSON.parse(option.data).imei)
+				const data = JSON.parse(option.data)
+				this.eqlistuser(data.type_id, data.imei || data.device_id || data.id,data.device_model)
 			}
 			uni.getStorage({
 				key:"jurisdiction",
 				success:(res)=>{
-					console.log(JSON.parse(res.data))
+					console.log(res,'resresres')
+					if(!res?.data){
+						return;
+					}
 					let items = JSON.parse(res.data).filter((item)=>{
 						return item.purview_name == "设备管理"
 					})

+ 9 - 9
pages/equipList2/search.vue

@@ -139,7 +139,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -166,7 +166,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.equip_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -228,7 +228,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -242,7 +242,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -256,7 +256,7 @@
 					case 18:
 						var obj = {};
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						uni.navigateTo({
 							url: "../cb/shuifeiL/shuifeiL?detail=" + JSON.stringify(obj),
 						});
@@ -277,7 +277,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -292,7 +292,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -307,7 +307,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;
@@ -322,7 +322,7 @@
 						var obj = {};
 						obj.d_id = item.d_id;
 						obj.device_id = item.imei;
-						obj.is_online = item.is_online;
+						obj.is_online = item.is_online || item.status;
 						obj.lat = item.lat;
 						obj.lng = item.lng;
 						obj.equip_name = item.device_name;

+ 2 - 0
pages/equipMange/index/index.vue

@@ -82,6 +82,8 @@
 					key: 'session_key',
 					data: session_key,
 					success: () => {
+						// 添加全局标识,刷新数据
+						uni.setStorageSync('refreshData',	Date.now())
 						uni.switchTab({
 							url: "../../index/index"
 						})

+ 9 - 3
pages/fmSys/details.vue

@@ -17,7 +17,7 @@
 						class="tishi">
 					</image>
 					<view
-						:class="['float-right','yficonfont',equipInfo.is_online==1?'on icon-zaixian':'off icon-lixian']">
+						:class="['float-right','yficonfont',equipInfo.status==1?'on icon-zaixian':'off icon-lixian']">
 						{{equipInfo.status==1?'在线':'离线'}}
 					</view>
 				</view>
@@ -34,7 +34,10 @@
 				</view>
 
 
-				<u-calendar v-model="calendar_show" mode="date" :max-date="date" @change="timeChange($event)">
+				<u-calendar v-model="calendar_show" mode="date" :max-date="date" @change="timeChange($event)" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)">
 				</u-calendar>
 				<u-toast ref="toast" />
 			</view>
@@ -102,7 +105,10 @@
 					<u-icon name="close-circle" color="#C1C1C1" size="28" @click="clearContime"
 						v-if="consoleTime.startDate"></u-icon>
 				</view>
-				<u-calendar  @maxDate="maxDate" v-model="consoleshow" mode="range" @change="changeConsoleDate"></u-calendar>
+				<u-calendar  @maxDate="maxDate" v-model="consoleshow" mode="range" @change="changeConsoleDate" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				<view class="tableList tableTitle">
 
 					<view>时间</view>

+ 6 - 2
pages/fourBase/basefacility.vue

@@ -96,8 +96,12 @@
 				this.accessToken = res.accessToken
 			},
 			clickLeft() {
-				uni.navigateTo({
-					url:"./index"
+				// uni.navigateTo({
+				// 	url:"./index"
+				// })
+				// 返回上一页
+				uni.navigateBack({
+					delta: 1
 				})
 			},
 			top() {

+ 1 - 0
pages/fourBase/index.vue

@@ -119,6 +119,7 @@
 				// uni.switchTab({
 				// 	url: "../index/index"
 				// })
+				// 返回上一页
 				uni.navigateBack({
 					delta: 1
 				})

+ 0 - 952
pages/index/index copy 2.vue

@@ -1,952 +0,0 @@
-<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="">
-          {{ $isneutral ? '欢迎登录云飞智控' : '欢迎登录智控' }}
-        </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
-          class="facilitybox_item"
-          v-if="jurisdiction.sbtf"
-          @click="tabequipment('../warning/index')"
-        >
-          <image
-            :src="$imageURL + '/bigdata_app/newindex/cb.png'"
-            mode=""
-            class="itemimg"
-          >
-          </image>
-          <view class=""> 预警列表 </view>
-        </view>
-      </view>
-    </view>
-    <view class="insectattack">
-      <view class="insectattack_title" @click="worm">
-        <view class=""> 虫情百科 </view>
-        <view class="iconbox">
-          <u-icon name="arrow-right"></u-icon>
-        </view>
-      </view>
-      <view class="insectattack_listbox">
-        <view class="insectattack_list">
-          <view class="list_box list_box1" @click="introduce(79, '虫情百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 小地老虎 </view>
-              <view class="list_box_info_text">
-                该虫能危害百余种植物,是对农、林木幼苗危害很大的地下害虫,
-                在东北主要危害落叶松、红松、水曲柳、核桃楸等苗木
-              </view>
-            </view>
-          </view>
-          <view class="list_box list_box2" @click="introduce(369, '虫情百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 草地贪夜蛾 </view>
-              <view class="list_box_info_text">
-                草地贪夜蛾被认为是世界上最具破坏性的害虫之一,其巨大的破坏性主要源于其“贪”的本性——贪吃、贪育、贪婪、广适、耐药。
-              </view>
-            </view>
-          </view>
-          <view class="list_box list_box3" @click="introduce(6, '虫情百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 棉铃虫 </view>
-              <view class="list_box_info_text">
-                棉铃虫具有高度多食性,可以为害20余科200多种植物,但比较喜食禾本科、锦葵科、茄科和豆科植物的花蕾和果实等繁殖器官。
-              </view>
-            </view>
-          </view>
-          <view class="list_box list_box4" @click="introduce(67, '虫情百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 稻纵卷叶螟 </view>
-              <view class="list_box_info_text">
-                生命潜能强,寿命长,产卵期长,产卵量也多。各代雌、雄蛾比例几乎各占半数。蛾子有强烈的趋荫蔽栖息习性
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view class="insectattack">
-      <view class="insectattack_title" @click="virus">
-        <view class=""> 病害百科 </view>
-        <view class="iconbox">
-          <u-icon name="arrow-right"></u-icon>
-        </view>
-      </view>
-      <view class="insectattack_listbox">
-        <view class="insectattack_list">
-          <view class="list_box list_box5" @click="introduce(267, '病害百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 小麦赤霉病 </view>
-              <view class="list_box_info_text">
-                小麦赤霉病从苗期到穗期均可发生,引起苗腐、茎基腐、秆腐和穗腐,以穗腐危害最大。湿度大时,病部均可见粉红色霉层。
-              </view>
-            </view>
-          </view>
-          <view class="list_box list_box6" @click="introduce(320, '病害百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 大豆根腐病 </view>
-              <view class="list_box_info_text">
-                初期茎基部或胚根表皮出现淡红褐色不规则的小斑,后变红褐色凹陷坏死斑,绕根茎扩展致根皮枯死
-              </view>
-            </view>
-          </view>
-          <view class="list_box list_box7" @click="introduce(292, '病害百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 玉米大斑病 </view>
-              <view class="list_box_info_text">
-                玉米大斑病主要为害叶片,严重时也为害叶鞘和苞叶。植株下部叶片先发病,然后向上扩展。
-              </view>
-            </view>
-          </view>
-          <view class="list_box list_box8" @click="introduce(278, '病害百科')">
-            <view class="list_box_xiang">
-              <view class="list_box_xiang_click"> 详情 </view>
-            </view>
-            <view class="list_box_info">
-              <view class="list_box_info_name"> 水稻稻瘟病 </view>
-              <view class="list_box_info_text">
-                发生于三叶前,由种子带菌所致。病苗基部灰黑,上部变褐,卷缩而死,湿度较大时病部产生大量灰黑色霉层。
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <u-modal
-      v-model="show"
-      :mask-close-able="true"
-      title=""
-      :show-cancel-button="true"
-      confirm-text="拍病害"
-      cancel-text="拍虫害"
-      cancel-color="#4BB85F"
-      content="拍照识别病虫害"
-      @confirm="confirm"
-      @cancel="cancel"
-    ></u-modal>
-    <kps-image-cutter
-      @ok="onok"
-      @cancel="oncancle"
-      :url="url"
-      :fixed="false"
-      :blob="true"
-      :maxWidth="500"
-      :maxHeight="380"
-      :height="380"
-    ></kps-image-cutter>
-    <view class="loading" v-if="loadTF" @touchmove.stop.prevent="moveHandle">
-      <u-loading mode="flower" size="100" :show="true"></u-loading>
-    </view>
-  </view>
-</template>
-
-<script>
-import kpsImageCutter from '@/components/ksp-image-cutter/ksp-image-cutter.vue';
-import jsencrypt from '@/components/jsencrypt/jsencrypt.vue';
-export default {
-  components: {
-    kpsImageCutter,
-  },
-  data() {
-    return {
-      weatherinfo: {
-        wea: '晴',
-      },
-      hello: '',
-      jurisdiction: {
-        cbtf: false,
-        jktf: false,
-        hjtf: false,
-        fztf: false,
-        sytf: false,
-        sbtf: false,
-        sqtf: false,
-        zjtf: false,
-        sftf: 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,
-        },
-      });
-      console.log(res);
-      this.weatherinfo = res[0];
-    },
-    async getUserlogin() {
-      const res = await this.$myRequest({
-        url: '/api/api_gateway?method=user.login.user_login_info',
-      });
-      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 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;
-      } 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 encrypt = new jsencrypt();
-      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);
-      // encrypt.setPublicKey(str);
-      // var time = +new Date();
-      // var str2 = 'YuNfEi' + time + 'YuNfEi'
-      // var encrypted = encrypt.encrypt(str2);
-      console.log(pubblicData);
-      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://web.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
-          filePath: ev.path,
-          name: 'img_file',
-          formData: {
-            user: 'test',
-            sign: pubblicData,
-          },
-          success: (uploadFileRes) => {
-            console.log(JSON.parse(uploadFileRes.data));
-            this.loadTF = false;
-            uni.navigateTo({
-              url:
-                '../disandpests/index?datas=' +
-                uploadFileRes.data +
-                '&path=' +
-                ev.path,
-            });
-          },
-        });
-      } 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://web.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern',
-          filePath: ev.path,
-          name: 'img_file',
-          formData: {
-            user: 'test',
-            sign: pubblicData,
-          },
-          success: (uploadFileRes) => {
-            console.log(JSON.parse(uploadFileRes.data));
-            this.loadTF = false;
-            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,
-      });
-    },
-  },
-  onLoad() {
-    // console.log(this.$QueryPermission(242))
-
-    var time = new Date();
-    var hours = time.getHours();
-    if (hours < 12) {
-      this.hello = '上午好!';
-    } else {
-      this.hello = '下午好!';
-    }
-    uni.getLocation({
-      type: 'wgs84 ',
-      success: (res) => {
-        this.getcity(res.longitude, res.latitude);
-      },
-    });
-  },
-  onShow() {
-    this.loadTF = false;
-    this.getUserlogin();
-  },
-};
-</script>
-
-<style lang="less">
-page {
-  background-image: url(../../static/images/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;
-
-        .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(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/cao.png);
-      }
-
-      .list_box2 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/yee.jpg);
-      }
-
-      .list_box3 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/lingc.jpg);
-      }
-
-      .list_box4 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/ming.png);
-      }
-
-      .list_box5 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/mai.png);
-      }
-
-      .list_box6 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/dadou.jpg);
-      }
-
-      .list_box7 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/yumi.png);
-      }
-
-      .list_box8 {
-        background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/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>

+ 0 - 839
pages/index/index copy.vue

@@ -1,839 +0,0 @@
-<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 class="facilitybox_item" v-if="jurisdiction.sbtf"
-					@click="tabequipment('../warning/index')">
-					<image :src="$imageURL+'/bigdata_app/newindex/cb.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',
-					method: 'POST',
-				});
-				// 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>

+ 99 - 38
pages/index/index.vue

@@ -9,7 +9,9 @@
 						<view class="text-value">{{weatherinfo.at}}℃</view>
 					</view>
 					<view class="weatext">
-						<image :src="
+						<image
+						v-if="weatherinfo.wea && weatherinfo.wea != '-'"
+						:src="
 							'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +weatherinfo.wea +'.png'
 						" mode="" class="weaimg"
 						></image>
@@ -23,17 +25,15 @@
 				<view class="weather">
 					<view class="weatext">
 						<view>湿度<span class="text-span">{{weatherinfo.ah | ahFilter}}</span></view>
-						<view class="text-value">{{weatherinfo.ah}}%</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="weather-warning" v-if="weatherinfo.alarm_content">
 				<image class="weather-alert" :src="$imageURL+'/bigdata_app/newImg/home/weather-alert.png'" mode=""></image>
@@ -59,10 +59,10 @@
 				<view class="functionbox_text_item" @click="tabfunction(0,item)" v-if="index < 9" v-for="(item,index) in menuList" :key="index">
 					<image :src="item.app_menu_icon" mode="" class="itemimg">
 					</image>
-					<view class="icon_text"> {{ item.purview_name }} </view>
+					<view class="icon_text"> {{ getSlice(item.purview_name) }} </view>
 				</view>
 				<view class="functionbox_text_item" @click="tabfunction(9)" v-if="menuList.length >= 9">
-					<image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
+					<image :src="$imageURL+'/bigdata_app/newImg/home/moreIcon.png'" mode="" class="itemimg"></image>
 					<view class=""> 更多功能 </view>
 				</view>
 			</view>
@@ -77,7 +77,7 @@
 							<image :src="$imageURL+'/bigdata_app/newImg/home/zjhk.png'" mode="" class="itemimg">
 							</image>
 							<view class="facilitybox_span">
-								<text> 专家库 </text>
+								<text style="font-weight:700"> 专家库 </text>
 								<view class="text">农业相关博士、教授、研究员</view>
 							</view>
 						</view>
@@ -115,23 +115,26 @@
 				</view>
 			</view>
 			<view class="banner-ad">
-			<view class="ad-text">
-				<view class="title">
-					松墨天牛拍照性诱智能监测
-				</view>
-				<view class="sub-title">
-					AI慧眼识天牛    智守青山护松林
+				<view class="ad-text">
+					<view class="title">
+						<!-- 松墨天牛拍照性诱智能监测 -->
+					</view>
+					<view class="sub-title">
+						<!-- AI慧眼识天牛    智守青山护松林 -->
+					</view>
+					<view class="btn" @click="tabs">
+						查看详情
+					</view>
 				</view>
-				<!-- <view class="btn">
-					查看详情
-				</view> -->
-			</view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		Debounce,
+	} from '../../util/anitthro.js';
 	export default {
 		// // 分享给朋友
 		// onShareAppMessage() {
@@ -203,6 +206,14 @@
 			},
 		},
 		methods: {
+			tabs(){
+				uni.navigateTo({
+					url: '/pages/banner/index'
+				})
+			},
+			getSlice(name){
+				return name.slice(0,4)
+			},
 			async getcity(lng, lat) {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=device.device_manage.weathers',
@@ -211,9 +222,7 @@
 						lat: lat,
 					},
 				});
-
 				this.weatherinfo = res[0];
-				console.log(this.weatherinfo,'weatherinfo')
 			},
 			async getUserlogin() {
 				const res = await this.$myRequest({
@@ -228,17 +237,62 @@
             menuList.push(...item.children);
           }
         })
+				const children = [];
+				menuList.forEach(item =>{
+					if(item.children){
+						children.push(...item.children);
+					}
+				})
+				const myuser_type = res[0]?.myuser_type || ''
+				const myuid = res[0]?.myuid || ''
+				uni.setStorage({
+					key: 'jurisdiction',
+					data: JSON.stringify(children),
+				});
+				uni.setStorage({
+					key: 'myuser_type',
+					data: JSON.stringify(myuser_type),
+				});
+				uni.setStorage({
+					key: 'myuid',
+					data: JSON.stringify(myuid),
+				});
         this.menuList = menuList || [];
 			},
 			tabfunction(index,item) {
-				if (index == 0) {
+				const purId = item?.pur_id || '';
+				if (purId == 25) {
+					uni.navigateTo({
+						url: '/pages/fourBase/index'
+					})
+				} else if (purId == 125){
+					uni.navigateTo({
+						url: '/pages/expertDiagnosis/index'
+					})
+				} else if (purId == 126) {
+					uni.navigateTo({
+						url: '/pages/expertDiagnosis/wormcase?name=虫情百科'
+					})
+				} else if (purId == 29) {
+					uni.navigateTo({
+						url: '/pages/equipMange/index/index'
+					})
+				} else if (purId == 156) {
+					uni.navigateTo({
+						url: '/pages/afterSale/index'
+					})
+				} else if (purId == 422) {
+					uni.navigateTo({
+						url: '/pages/warning/index'
+					})
+				} else if (index == 0) {
 					uni.switchTab({
 						url: '/pages/equipList2/index',
-          success: () => {
-            setTimeout(() => {
-              uni.$emit('purId',item.pur_id);
-            }, 50);
-          }
+						success: () => {
+							setTimeout(() => {
+								uni.$emit('purId',item.pur_id);
+							}, 50);
+						}
 					});
 				} else if (index == 1) {
 					uni.navigateTo({
@@ -252,11 +306,11 @@
 					uni.navigateTo({
 						url: '../afterSale/index',
 					});
-				} else if(index == 4){
+				} else if (index == 4){
 					uni.navigateTo({
 						url: '/pages/index/developing',
 					});
-				}else if (index == 9) {
+				} else if (index == 9) {
 					uni.navigateTo({
 						url: '/pages/server/index',
 					});
@@ -286,7 +340,9 @@
 								uni.getLocation({
 									type: 'wgs84 ',
 									success: (res) => {
-										_this.getcity(res.longitude, res.latitude);
+										Debounce(() => {
+											_this.getcity(res.longitude, res.latitude);
+										}, 500)();
 									},
 									fail(e) {
 										uni.showToast({
@@ -305,7 +361,9 @@
 											type: 'wgs84 ',
 											success: (res) => {
 												console.log(res, 'loacation');
-												_this.getcity(res.longitude, res.latitude);
+												Debounce(() => {
+													_this.getcity(res.longitude, res.latitude);
+												}, 500)();
 											},
 										});
 									},
@@ -344,12 +402,16 @@
 			} else {
 				this.hello = '下午好!';
 			}
-			this.getUserlogin();
+			Debounce(() => {
+				this.getUserlogin();
+			}, 500)();
 			this.checkLocationPermission(true); // 首次加载弹框提醒
 		},
 		onShow() {
 			this.loadTF = false;
-			this.getUserlogin();
+			Debounce(() => {
+				this.getUserlogin();
+			}, 500)();
 			this.checkLocationPermission();
 		},
 	};
@@ -377,7 +439,6 @@
 	}
 	.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;
@@ -401,7 +462,7 @@
 			flex: 1;
 			display: flex;
 			flex-direction: column;
-			align-items: center;
+			padding-left: 44rpx;
 			font-size: 24rpx;
 			color: rgba(255, 255, 255, 0.8);
 		}
@@ -438,7 +499,6 @@
 		height: 128rpx;
 		margin-bottom: 12rpx;
 		position: relative;
-		top: -20rpx;
 		.ai-content {
 			box-sizing: border-box;
 			height: 100%;
@@ -528,6 +588,7 @@
 			font-size: 30rpx;
 			color: #333;
 			margin-bottom: 24rpx;
+			font-weight: 700;
 		}
 		.facilitybox_itembox {
 			display: flex;
@@ -539,7 +600,7 @@
 					padding: 16rpx 24rpx;
 					width: 50%;
 					color: #0B3F5D;
-					font-weight: 500;
+					font-weight: 700;
 					font-size: 28rpx;
 					.text {
 						font-size: 20rpx;
@@ -611,16 +672,16 @@
 	}
 	.banner-ad {
 		margin: 32rpx 0;
-		height: 224rpx;
+		height: 210rpx;
 		border-radius: 8px;
 		background-size: 100% 100%;
-		background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/ad-banner.png);
+		background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner1.png);
 		.ad-text{
 			height: 100%;
 			display: flex;
 			flex-direction: column;
 			justify-content: space-around;
-			padding: 40rpx;
+			padding: 20rpx 40rpx;
 			box-sizing: border-box;
 			.title{
 				 color: #333333;

+ 5 - 1
pages/monitor/dgpImagelist.vue

@@ -28,7 +28,11 @@
 	    <u-calendar
 	      v-model="tiemshow"
 	      mode="range"
-	      @change="tiemchange"
+	      @change="tiemchange" 
+        range-color="#999"
+        btn-type="success"
+        active-bg-color="#0BBC58"
+        range-bg-color="rgba(11,188,88,0.13)"
 	    ></u-calendar>
 	  </view>
 	  </view>

+ 4 - 1
pages/monitor/imagelist.vue

@@ -16,7 +16,10 @@
 					<p>{{timetab(timeend)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="imglist">
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">

+ 1 - 0
pages/my/index/index.vue

@@ -105,6 +105,7 @@ export default {
         },
       });
       console.log(res);
+      res.image = '';
       this.userinfos = res;
       this.getuserinfonew();
     }, //user.login.logout_user

+ 4 - 1
pages/prevention/ucharts.vue

@@ -15,7 +15,10 @@
 					<p>{{timetab(newtime)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="pickshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="pickshow" mode="range" @change="tiemchange" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="shuju_one" v-show="!pickshow&&!picktwoshow">
 				<view class="shuju_one_title">

+ 4 - 1
pages/qxzyj/cbwarn.vue

@@ -151,7 +151,10 @@
 		</view>
 		<view class="">
 			<u-mask :show="accServiceShow" z-index="998"></u-mask>
-			<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+			<u-calendar v-model="timeshow" :mode="mode" @change="timechange" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			<multiple-select v-model="accServiceShow" :value="accServiceShow" :data="serviceList"
 				:default-selected="defaultSelected" @confirm="accServiceConfirm"></multiple-select>
 			<u-modal v-model="modalshow" title="短信预警详情" :content="content" @confirm="singlereadsure"></u-modal>

+ 38 - 15
pages/server/index.vue

@@ -36,10 +36,11 @@
             <text class="menu-name">{{ item.purview_name }}</text>
             <view class="menu-icon-container">
               <view class="menu-icon" v-for="(child, childIndex) in item.children" :key="child.pur_id || childIndex" 
-					    @click="handleMenuClick(child)"
             >
+							<view @click.native="() => handleMenuClick(child)" class="menu-item-wraper">
                 <image :src="child.app_menu_icon || getDefaultIcon(child.icon)" mode="aspectFit" class="app_menu_icon"></image>
-                <text class="menu-icon-text">{{ child.purview_name }}</text> 
+                <text class="menu-icon-text">{{ getSlice(child.purview_name) }}</text> 
+								</view>
               </view>
             </view>
 					</view>
@@ -54,13 +55,30 @@ export default {
 	data() {
 		return {
 			loading: true,
-			menuList: []
+			menuList: [],
+			deviceTypeList:[
+				36,
+				40,
+				42,
+				44,
+				202,
+				282,
+				426,
+				427,
+				428,
+				233,
+				456,
+				458
+			],
 		}
 	},
 	onLoad() {
 		this.getMenuList()
 	},
 	methods: {
+		getSlice(name){
+			return name.slice(0,4)
+		},
 		// 获取菜单列表
 		async getMenuList() {
 			try {
@@ -117,9 +135,8 @@ export default {
 
 			// 根据不同的pur_id跳转到不同的页面
 			const purId = item.pur_id
-
 			// 虫情监测模块
-			if (purId == 36 || purId == 426 || purId == 427 || purId == 44 || purId == 282 || purId == 40 || purId == 428 || purId == 202 || purId == 233) {
+			if (this.deviceTypeList.includes(purId)) {
         uni.switchTab({
 					url: '/pages/equipList2/index',
           success: () => {
@@ -154,7 +171,11 @@ export default {
 				uni.navigateTo({
 					url: '/pages/afterSale/index'
 				})
-			}
+			}else if(purId == 422){
+			 uni.navigateTo({
+          url: '/pages/warning/index'
+        })
+      }
 			// 默认跳转到开发中页面
 			else {
 				uni.navigateTo({
@@ -283,8 +304,6 @@ export default {
 		box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
 		transition: all 0.3s ease;
 
-		
-
 		.menu-icon-wrap {
 			margin-bottom: 16rpx;
       .menu-name{
@@ -294,16 +313,19 @@ export default {
         font-weight: 700;
       }
       .menu-icon-container{
-        display: grid;
-        grid-template-columns: repeat(4, 1fr);
-        gap: 20rpx;
         margin-top: 20rpx;
       }
+			.menu-item-wraper{
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+			}
       .menu-icon{
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        justify-content: center;
+        display: inline-block;
+				width: 20%;
+				text-align: center;
+				margin-top: 20rpx;
       }
 			.app_menu_icon {
 				width: 80rpx;
@@ -316,6 +338,7 @@ export default {
 			}
       .menu-icon-text{
         // 超出部分省略号
+				width: 100%;
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;

+ 34 - 12
pages/warning/index.vue

@@ -42,7 +42,7 @@
           :class="{ active: activeTab === index }"
           @click="activeTabHandler(index)"
         >
-          {{ tab }}
+          {{ tab.name }}
         </view>
       </view>
 
@@ -139,7 +139,10 @@
         <u-icon name="arrow-up" size="28rpx" color="#999" />
       </view>
     </view>
-		<u-calendar v-model="showDatePicker" :mode="mode" @change="changeCalendar"></u-calendar>
+		<u-calendar v-model="showDatePicker" :mode="mode" @change="changeCalendar" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
     <u-popup v-model="popupShow" mode="bottom" height="50%" border-radius="20">
       <view class="popup-container">
         <view class="popup-icon" :class="
@@ -192,7 +195,7 @@ export default {
 			mode: 'range',
       activeTab: 0,
       listScrollTop: 0,
-      tabs: ['环境监测','手动预警'],
+      tabs: [],
       warningList: [],
       manualWarningList: [],
       page_size: 10,
@@ -209,15 +212,19 @@ export default {
     };
   },
   onLoad() {
-    this.getWarningList();
+    this.init();
   },
   methods: {
+    async init(){
+      await this.getLoginUSerSimpleMenusForAlert();
+      this.getWarningList();
+    },
     activeTabHandler(index){
       this.activeTab = index;
       this.page = 1;
-      if(index == 0){
+      if(index == 0 || index == 1){
         this.getWarningList();
-      }else if(index == 1){
+      }else if(index == 2){
         this.getWarningManualList();
       }
     },
@@ -240,18 +247,18 @@ export default {
       this.page = 1;
       this.loading = false;
       this.finished = false;
-      if(this.activeTab == 0){
+      if(this.activeTab == 0 || this.activeTab == 1){
         this.getWarningList();
-      }else if(this.activeTab == 1){
+      }else if(this.activeTab == 2){
         this.getWarningManualList();
       }
     },
     // 加载更多
     loadMore() {
       if (this.finished) return;
-      if(this.activeTab == 0){
+      if(this.activeTab == 0 || this.activeTab == 1){
         this.getWarningList();
-      }else if(this.activeTab == 1){
+      }else if(this.activeTab == 2){
         this.getWarningManualList();
       }
     },
@@ -263,12 +270,24 @@ export default {
       this.loading = false;
       this.finished = false;
       this.refreshing = true;
-      if(this.activeTab == 0){
+      if(this.activeTab == 0 || this.activeTab == 1){
         this.getWarningList();
-      }else if(this.activeTab == 1){
+      }else if(this.activeTab == 2){
         this.getWarningManualList();
       }
     },
+    async getLoginUSerSimpleMenusForAlert(){
+      await this.$myRequest({
+        url:'/api/api_gateway?method=user.login.user_simple_menus_for_alert',
+        method:'POST',
+      }).then(res => {
+        this.tabs = res || [];
+        this.tabs.push({
+          id: '0',
+          name:'手动预警'
+        })
+      })
+    },
     // 已读
     async readHandler(params){
       await this.$myRequest({
@@ -331,6 +350,7 @@ export default {
         end,
         page: this.page,
         page_size: this.page_size,
+        fk_type: this.tabs[this.activeTab].id,
         device_id: this.deviceId,
         device_type_id: this.device_type_id
       }
@@ -381,10 +401,12 @@ export default {
       
       const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
       const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
+      console.log(this.activeTab,this.tabs,'activeTabactiveTabactiveTab')
       const params = {
         start,
         end,
         page: this.page,
+        fk_type: this.tabs[this.activeTab].id,
         page_size: this.page_size,
         device_id: this.deviceId,
         device_type_id: this.device_type_id

+ 4 - 1
pages/waterandfer/elementdata.vue

@@ -11,7 +11,10 @@
 					<p>{{timetab(newtime)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+      btn-type="success"
+      active-bg-color="#0BBC58"
+      range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 			<view class="shuju_one">
 				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">

+ 4 - 1
pages/waterandfer/waterhis.vue

@@ -11,7 +11,10 @@
 					<p>{{timetab(newtime)}}</p>
 					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
 				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 			</view>
 		</view>
 		

+ 12 - 3
pages/waterandfernew/details.vue

@@ -38,7 +38,10 @@
 						<u-icon name="close-circle" color="#C1C1C1" size="28" @click="historyTime={};getHistoryData()"
 							v-if="historyTime.startDate"></u-icon>
 					</view>
-					<u-calendar v-model="calendarshow" mode="range" @change="changeDate"></u-calendar>
+					<u-calendar v-model="calendarshow" mode="range" @change="changeDate" range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 					<view class="chartBox">
 						<canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
 							@touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
@@ -83,7 +86,10 @@
 						<u-icon name="close-circle" color="#C1C1C1" size="28" @click="historyTime={};getHistoryData()"
 							v-if="historyTime.startDate"></u-icon>
 					</view>
-					<u-calendar v-model="calendarshow" mode="range" @change="changeDate"></u-calendar>
+					<u-calendar v-model="calendarshow" mode="range" @change="changeDate" range-color="#999"
+						btn-type="success"
+						active-bg-color="#0BBC58"
+						range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 					<view class="chartBox">
 						<canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
 							@touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
@@ -243,7 +249,10 @@
 					<u-icon name="close-circle" color="#C1C1C1" size="28" @click="clearContime"
 						v-if="consoleTime.startDate"></u-icon>
 				</view>
-				<u-calendar v-model="consoleshow" mode="range" @change="changeConsoleDate"></u-calendar>
+				<u-calendar v-model="consoleshow" mode="range" @change="changeConsoleDate" range-color="#999"
+					btn-type="success"
+					active-bg-color="#0BBC58"
+					range-bg-color="rgba(11,188,88,0.13)"></u-calendar>
 				<view class="tableList tableTitle">
 					<view>设备名称</view>
 					<view>操作内容</view>