李程龙 3 年之前
父節點
當前提交
6821929b41
共有 6 個文件被更改,包括 14 次插入108 次删除
  1. 1 1
      api/pest.js
  2. 0 4
      pages/camera/details.vue
  3. 10 5
      pages/camera/index.vue
  4. 2 1
      pages/pest/index.vue
  5. 1 1
      pages/worm/analyse.vue
  6. 0 96
      pages/worm/components/analyse/worm-table.vue

+ 1 - 1
api/pest.js

@@ -41,7 +41,7 @@ export const baseDiscern = (url, img_file) => {
 
 
 // 病虫害库
-export const loadPestList = (data) => async (data) => {
+export const loadPestList = async (data) => {
 	const res = await request.post(`api/api_gateway?method=pest.pests.pests_info`, data);
 	return res?.data;
 }

+ 0 - 4
pages/camera/details.vue

@@ -4,8 +4,6 @@
 		<!-- 监控区域 -->
 		<view class="monitor-area">
 			<view class="video-js" ref="video" style="width: 100%;height:510rpx;"></view>
-			<!-- <image src="@/static/demo/demo1.png" mode="widthFix"></image> -->
-			<!-- <video id="hlsId" autoplay controls  style="width: 100%;height:800rpx"></video> -->
 		</view>
 		<!-- 监控工具 -->
 		<view class="monitor-tools">
@@ -62,8 +60,6 @@
 			video.setAttribute('x5-video-player-type', 'h5') //安卓 声明启用同层H5播放器 可以在video上面加东西
 			let source = document.createElement('source');
 			source.src =this.cameraAddress;
-				// 'http://yun-live.oss-cn-shanghai.aliyuncs.com/record/yunlive/record/yunlive/meeting_1070/2020-11-25-09-27-59_2020-11-25-09-35-52.m3u8';
-			// source.type = 'application/x-mpegURL';
 			video.appendChild(source);
 			this.$refs.video.$el.appendChild(video);
 			let that = this;

+ 10 - 5
pages/camera/index.vue

@@ -5,12 +5,11 @@
 			<!-- 监控列表 -->
 			<block v-for="(item,index) in cameraList" :key="index">
 				<view class="camera-item" @click="openCameraDetails(item.device_id)">
-					<image class="pic" mode="aspectFill"
-						:src="item.jk_live_img">
+					<image class="pic" mode="aspectFill" :src="item.jk_live_img">
 					</image>
 					<view class="row-between p-10">
 						<text class="text">{{item.device_id}}</text>
-						<text class="tips"></text>
+						<text class="tips" :calss="item.status?'':'close'"></text>
 					</view>
 				</view>
 			</block>
@@ -73,15 +72,17 @@
 <style lang="scss">
 	// 可视监控面板
 	.camera-panel {
-		
+
 		padding: 24rpx;
 		margin-top: 24rpx;
 		background-color: #fff;
 	}
-	.camera-list{
+
+	.camera-list {
 		display: flex;
 		flex-wrap: wrap;
 	}
+
 	// 可视列表项
 	.camera-item {
 		width: 336rpx;
@@ -114,6 +115,10 @@
 			height: 24rpx;
 			background: #07F546;
 			border-radius: 100%;
+
+			&.close {
+				background: #e93f27;
+			}
 		}
 	}
 </style>

+ 2 - 1
pages/pest/index.vue

@@ -71,7 +71,8 @@
 			},
 			// 获取虫害or病害 列表
 			async getPestList() {
-				let {
+				console.log("dsdfs");
+				const {
 					disease_nums,
 					pest_nums,
 					data

+ 1 - 1
pages/worm/analyse.vue

@@ -140,7 +140,7 @@
 			raiseCard
 		},
 		onLoad(options) {
-			this.deviceId = '15'; //options.id
+			this.deviceId =  options.id;// '15';
 			this.getPestStatisticsChart();
 			this.getPestImageSourceList();
 			this.getPestBaseDataList();

+ 0 - 96
pages/worm/components/analyse/worm-table.vue

@@ -1,96 +0,0 @@
-<template>
-	<!-- 害虫分析表格数据-->
-	<view class="ui-card px-13">
-		
-	</view>
-</template>
-
-<script>
-	/**
-	 * 虫害始见期数据卡片
-	 */
-	import {
-		getPestRaiseInfo
-	} from '@/api/worm.js'
-	export default {
-		name: 'w-raise-card',
-		data() {
-			return {
-				pestList: [], //始见期选项
-				pestInfo: {},
-				pestDate: (new Date()).getUTCFullYear(),
-				pestItem: '',
-			}
-		},
-		props: {
-			// 设备id
-			deviceId: [String, Number]
-		},
-
-		mounted() {
-			this.getPestRaiseInfo();
-		},
-		methods: {
-			// 获取始见期数据
-			async getPestRaiseInfo() {
-				const res = await getPestRaiseInfo({
-					year: this.pestDate,
-					d_ids: this.deviceId,
-				});
-				this.pestList = res.pest_list; //始见期选项
-				this.pestInfo = res.pest_info;
-				this.pestItem = this.pestList[0];
-			},
-			
-			// 选择年份
-			changePestDate(e) {
-				this.pestDate=e.detail.value;
-				this.getPestRaiseInfo();
-			},
-			// 选择始见期类型
-			changePestList(e) {
-				this.pestItem = this.pestList[e.detail.value];
-			},
-		}
-	};
-</script>
-
-<style lang="scss">
-	// 时期样式
-	.period-navs {
-		display: flex;
-		justify-content: space-between;
-	}
-	
-	.period-item {
-		width: 200rpx;
-		height: 264rpx;
-		padding: 122rpx 24rpx 24rpx;
-		background: url('/static/img/startTime.png') center center no-repeat;
-		background-size: 200rpx 264rpx;
-	
-		&.high-time {
-			background-image: url('/static/img/highTime.png');
-		}
-	
-		&.end-time {
-			background-image: url('/static/img/endTime.png');
-		}
-	
-		.title {
-			font-size: 32rpx;
-			font-weight: normal;
-			color: #333333;
-			line-height: 44rpx;
-		}
-	
-		.text {
-			margin-top: 10rpx;
-			font-size: 24rpx;
-			font-weight: normal;
-			color: #999999;
-			line-height: 34rpx;
-		}
-	}
-	
-</style>