Pārlūkot izejas kodu

feat(cbd): 添加设备详情页操作菜单及功能

- 新增操作按钮及下拉菜单,包含拍照、维修、设置、SIM卡和修改功能
- 根据设备型号动态显示拍照功能
- 添加操作菜单相关图标资源
- 调整日期选择逻辑,默认显示最近30天数据
- 隐藏设备数据页面的浮动按钮
- 删除无用的equipList2页面副本
allen 1 dienu atpakaļ
vecāks
revīzija
cb52854412

BIN
pages/cbd/assets/editIcon.png


BIN
pages/cbd/assets/photoIcon.png


BIN
pages/cbd/assets/serviceIcon.png


BIN
pages/cbd/assets/settingIcon.png


BIN
pages/cbd/assets/simIcon.png


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

@@ -213,7 +213,7 @@
         </view>
       </view>
 		</u-popup>
-    <floatButton>
+    <floatButton v-if="false">
       <view slot="icon">
         <view class="general-border">
           <image :src="general" class="general-icon"></image>

+ 180 - 9
pages/cbd/detail.vue

@@ -9,6 +9,32 @@
       ></u-icon>
       {{ deviceInfo.name }}
     </view>
+    <view class="operation" @click.stop="isShowOperation = !isShowOperation">操作</view>
+    <view class="operation-container" v-if="isShowOperation" @click="closeOperationHandler">
+      <view class="operation-background"></view>
+      <view class="operation-content">
+        <view class="operation-item" v-if="isShowPhoto" @click="handlePhotoClick">
+          <image :src="photoIcon" class="operation-icon"></image>
+          拍照
+        </view>
+        <view class="operation-item" @click="handleServiceClick">
+          <image :src="serviceIcon" class="operation-icon"></image>
+          维修
+        </view>
+        <view class="operation-item" @click="handleSettingClick">
+          <image :src="settingIcon" class="operation-icon"></image>
+          设置
+        </view>
+        <view class="operation-item" @click="handleSimClick">
+          <image :src="simIcon" class="operation-icon"></image>
+          SIM卡
+        </view>
+        <view class="operation-item" @click="modification">
+          <image :src="editIcon" class="operation-icon"></image>
+          修改
+        </view>
+      </view>
+    </view>
     <view class="device-detail__body">
       <DeviceCard
         :dataSource="deviceInfo"
@@ -91,8 +117,8 @@
         />
       </view>
     </view>
-		<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>
+    <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>
 <script>
@@ -102,6 +128,11 @@ import PestEchart from './components/pestEchart.vue';
 import PestArchive from './components/pestArchive.vue';
 import photoImage from './components/photoImage.vue';
 import DeviceData from './components/deviceData.vue';
+import photoIcon from './assets/photoIcon.png';
+import editIcon from './assets/editIcon.png';
+import serviceIcon from './assets/serviceIcon.png';
+import simIcon from './assets/simIcon.png';
+import settingIcon from './assets/settingIcon.png';
 
 export default {
   components: {
@@ -110,21 +141,28 @@ export default {
     PestEchart,
     PestArchive,
     photoImage,
-    DeviceData
+    DeviceData,
   },
   data(){
     return {
       isShowTab:false,
       showPicker: false,
       disableShow: false,
+      isShowOperation: false,
+      photoIcon,
+      editIcon,
+      serviceIcon,
+      simIcon,
+      settingIcon,
       totalPage:0,
       currentYear: new Date().getFullYear(),
       selectorRange: [],
       maxDate: this.formatDate(new Date()),
       minDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
       show: false,
-      // 当前年份的第一天 格式2026-01-01 月份和日期小于10的时候前面加个0
-      startDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
+      showSim: false,
+      // 当前日期向前推30天 格式2026-01-01 月份和日期小于10的时候前面加个0
+      startDate: this.formatDate(new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)),
       endDate: this.formatDate(new Date()),
       mode: 'range',
       imageList: [],
@@ -145,12 +183,27 @@ export default {
       pest_names:'',
       pests:[],
       polylineList:[],
+      isShowPhoto:false,
       deviceHistoryList:[],
       deviceStatic:{}
     }
   },
   onLoad(options){
     this.deviceInfo = JSON.parse(options.info);
+    const newVal = this.deviceInfo;
+    if (newVal.device_model == '11'){
+      this.isShowPhoto = true
+    } else if(newVal.device_model == '12'){
+      this.isShowPhoto = false
+    } else if(newVal.device_model == '13'){
+      this.isShowPhoto = true
+    } else if(newVal.device_model == '14'){
+      this.isShowPhoto = true
+    } else if(newVal.device_model == '15'){
+      this.isShowPhoto = false
+    } else{
+      this.isShowPhoto = true
+    }
     this.getPestAnalysis();
     this.isShow();
     const currentYear = new Date().getFullYear();
@@ -164,6 +217,51 @@ export default {
     }
   },
   methods: {
+    handleSimClick(){
+      // this.showSim = true;
+      //`/pages/deviceDetails/weatherStation/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}`
+      uni.navigateTo({
+        url:
+          '/pages/deviceDetails/weatherStation/simDetail?deviceInfo=' +
+          encodeURIComponent(JSON.stringify(this.deviceInfo))
+      }); 
+    },
+		modification() {
+      uni.navigateTo({
+        url:
+          '/pages/equipList2/seabox/modification?data=' +
+          JSON.stringify(this.deviceInfo) +
+          '&id=' +
+          this.deviceInfo.type,
+      }); 
+    },
+    async handlePhotoClick(){
+       const res = await this.$myRequest({
+        url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
+        method: 'POST',
+        data: {
+          device_type_id: this.deviceInfo.type,
+          d_id: this.deviceInfo.d_id,
+          cmd: 'takephoto',
+        },
+      });
+      if(res){
+        this.$u.toast('拍照成功')
+      }
+    },
+    handleServiceClick(){
+      uni.navigateTo({
+        url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
+      })
+    },
+    handleSettingClick(){
+      uni.navigateTo({
+        url: '/pages/cbd/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id,
+      });
+    },
+    closeOperationHandler(){
+      this.isShowOperation = false;
+    },
     isShow(){
       // disable == 0 或者 device_model == 15 表示不可以查看
       if(!this.deviceInfo.d_id){
@@ -212,13 +310,19 @@ export default {
     confirmHandler(e){
       this.currentYear = this.selectorRange[e].id;
       if(this.currentYear == new Date().getFullYear()){
-        this.startDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
-        this.endDate = this.formatDate(new Date());
+        // 结束日期为this.endDate的月份和日期加上选择的年份
+        const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
+        this.endDate = this.formatDate(new Date(timeDate));
+        // 开始日期为结束日期前30天
+        this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
         this.maxDate = this.formatDate(new Date());
         this.minDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
       }else{
-        this.startDate = this.formatDate(new Date(this.currentYear, 0, 1));
-        this.endDate = this.formatDate(new Date(this.currentYear, 11, 31));
+        // 结束日期为this.endDate的月份和日期加上选择的年份
+        const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
+        this.endDate = this.formatDate(new Date(timeDate));
+        // 开始日期为结束日期前30天
+        this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
         this.maxDate = this.formatDate(new Date(this.currentYear, 11, 31));
         this.minDate = this.formatDate(new Date(this.currentYear, 0, 1));
       }
@@ -386,6 +490,73 @@ export default {
     color:#aaa !important;
   }
 }
+.operation-container{
+  position: fixed;
+  right: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 99;
+}
+.operation{
+  position: fixed;
+  top: 260rpx;
+  right: 0;
+  z-index: 999;
+  width:48rpx;
+  height: 100rpx;
+  line-height: 50rpx;
+  border-radius: 8px 0 0 8px;
+  border-top: 4rpx solid #FFF;
+  border-bottom: 4rpx solid #FFF;
+  border-left: 4rpx solid #FFF;
+  background: #dddfe6a3;
+  color: #515153;
+  text-align: center;
+  font-family: "Source Han Sans CN VF";
+  font-size: 24rpx;
+  font-weight: 500;
+  writing-mode: vertical-rl;
+}
+.operation-background{
+  position: fixed;
+  right: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 998;
+  background: #00000040;
+}
+.operation-content{
+  position: fixed;
+  top: 240rpx;
+  right: 80rpx;
+  height: 126rpx;
+  display: flex;
+  padding: 16rpx 32rpx;
+  align-items: center;
+  gap: 64rpx;
+  z-index: 999;
+  border-radius: 32rpx;
+  border: 2rpx solid #FFF;
+  background: #FFF;
+  backdrop-filter: blur(8rpx);
+  .operation-item{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    color: #333333;
+    text-align: center;
+    font-family: "Source Han Sans CN VF";
+    font-size: 24rpx;
+    font-weight: 400;
+  }
+  .operation-icon{
+    width: 58rpx;
+    height: 58rpx;
+  }
+}
 .device-detail {
   display: flex;
   width: 100%;

+ 0 - 977
pages/equipList2/index copy.vue

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