zhangyun vor 4 Jahren
Ursprung
Commit
fe631377fd

+ 15 - 1
manifest.json

@@ -50,7 +50,16 @@
             /* ios打包配置 */
             "ios" : {},
             /* SDK配置 */
-            "sdkConfigs" : {}
+            "sdkConfigs" : {
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "android" ],
+                        "appkey_ios" : "",
+                        "appkey_android" : "ed68829a9567cb9e4c9dd45b4b7f65d5"
+                    }
+                },
+                "maps" : {}
+            }
         }
     },
     /* 快应用特有相关 */
@@ -76,5 +85,10 @@
     },
     "uniStatistics" : {
         "enable" : false
+    },
+    "h5" : {
+        "sdkConfigs" : {
+            "maps" : {}
+        }
     }
 }

+ 50 - 0
pages.json

@@ -310,6 +310,56 @@
             }
             
         }
+        ,{
+            "path" : "pages/fourBase/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "四情基地首页",
+                "enablePullDownRefresh": false,
+				"navigationStyle":"custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/fourBase/addbase",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "新增基地",
+                "enablePullDownRefresh": false,
+				"navigationStyle":"custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/fourBase/allocation",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设备分配",
+                "enablePullDownRefresh": false,
+				"navigationStyle":"custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/fourBase/fourbasemap",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false,
+				"navigationStyle":"custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/prevention/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "防治系统",
+                "enablePullDownRefresh": false,
+				"navigationStyle":"custom"
+            }
+            
+        }
     ],
 	"condition": { //模式配置,仅开发期间生效
 	    "current": 3, //当前激活的模式(list 的索引项)

+ 6 - 2
pages/distribution/index.vue

@@ -1,6 +1,7 @@
+<!-- 地图页面 -->
 <template>
 	<view>
-		<map :latitude="latitude" :longitude="longitude" style="width: 100%;height: 85vh;"></map>
+		<map :latitude="latitude" :longitude="longitude" style="width: 100%;height: 85vh;" :enable-zoom="enable_zoom" id="mapcon"></map>
 	</view>
 </template>
 
@@ -10,10 +11,13 @@
 			return {
 				latitude: 39.909,
 				longitude: 116.39742,
+				enable_zoom: true
 			}
 		},
 		methods: {
-			
+
+		},
+		onLoad() {
 		}
 	}
 </script>

+ 4 - 0
pages/equipList/index.vue

@@ -114,6 +114,9 @@
 	}
 </script>
 <style lang="scss">
+	/deep/.uni-icons{
+			font-size: 40rpx !important;
+		}
 	.utabs {
 		width: 95%;
 		position: fixed;
@@ -132,6 +135,7 @@
 			padding: 10rpx 20rpx;
 			position: relative;
 			background-color: #FFFFFF;
+			box-shadow: 0 0 10rpx #bcb9ca;
 			.list_item_top{
 				display: flex;
 				justify-content: space-between;

+ 3 - 0
pages/equipList/search.vue

@@ -124,6 +124,9 @@
 	}
 </script>
 <style lang="scss">
+	/deep/.uni-icons{
+		font-size: 40rpx !important;
+	}
 	.search_top_input {
 		width: 80%;
 		height: 54rpx;

+ 4 - 5
pages/equipMange/index/assignment.vue

@@ -185,9 +185,9 @@
 			},
 			checkboxchange(e) { //多选框变动时
 				this.allocationvaluesTF = e._processed
-				this.allocationvalues2 =e.detail.value
-				if(this.topbarTF){
-					this.allocationvalues3=this.allocationvalues3.concat(e.detail.value)
+				this.allocationvalues2 = e.detail.value
+				if (this.topbarTF) {
+					this.allocationvalues3 = this.allocationvalues3.concat(e.detail.value)
 					console.log(e.detail.value)
 				}
 			},
@@ -213,9 +213,8 @@
 			cancel() { //取消分配
 				uni.navigateTo({
 					url: './useroperation?item=' + JSON.stringify(this.user_info)
-				}) 
+				})
 			},
-
 		},
 		onLoad(option) {
 			this.user_info = JSON.parse(option.item)

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

@@ -103,6 +103,9 @@
 </script>
 1
 <style lang="scss">
+	/deep/.uni-icons{
+			font-size: 40rpx !important;
+		}
 	.uinput-box {
 		position: fixed;
 		top: 44px;

+ 12 - 6
pages/expertDiagnosis/particulars.vue

@@ -36,9 +36,11 @@
 				</view>
 			</view>
 		</view>
-		<view class="issue">
-			<input type="text" v-model="issuedata"/>
-			<p @click="issue">发布</p>
+		<view class="issue_box">
+			<view class="issue">
+				<input type="text" v-model="issuedata"/>
+				<p @click="issue">发布</p>
+			</view>
 		</view>
 	</view>
 </template>
@@ -210,11 +212,15 @@
 			}
 		}
 	}
-	.issue{
-		width: 95%;
+	.issue_box{
+		width: 100%;
 		position: fixed;
 		bottom: 0;
-		left: 2.5%;
+		background-color: #FFFFFF;
+	}
+	.issue{
+		width: 95%;
+		margin: 0 auto;
 		display: flex;
 		padding-bottom: 20rpx;
 		input{

+ 246 - 0
pages/fourBase/addbase.vue

@@ -0,0 +1,246 @@
+<template>
+	<view>
+		<view style="position: fixed;z-index: 100;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="新增基地"></uni-nav-bar>
+		</view>
+		<view class="addimg">
+			<view class="addimg_add" @click="gainimg">
+				<u-icon name="plus" size="60rpx" color="#A5A6A8"></u-icon>
+				<image :src="userinfos" mode="" class="addimg_img"></image>
+			</view>
+		</view>
+		<view class="base_text">
+			<p class="title">基地信息</p>
+			<view class="base_text_item1">
+				<u-icon name="fangzi" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>基地名称</span>
+				<input type="text" value="" placeholder="请输入基地名称" />
+			</view>
+			<view class="base_text_item1">
+				<u-icon name="ren1" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>负责人</span>
+				<input type="text" value="" placeholder="请输入基地负责人" />
+			</view>
+			<view class="base_text_item1">
+				<u-icon name="lianxidianhua" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>联系电话</span>
+				<input type="text" value="" placeholder="请输入联系电话" />
+			</view>
+			<view class="base_text_item1">
+				<u-icon name="mianji" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>面积(亩)</span>
+				<input type="number" value="" placeholder="请输入基地面积" />
+			</view>
+			<view class="base_text_item2">
+				<u-icon name="miaoshu" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>基地描述</span>
+				<textarea value="" placeholder="" auto-height class="textarea" placeholder="请输入基地描述" />
+				</view>
+			<view class="base_text_item1" @click="map">
+				<u-icon name="Frame1" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>基地定位</span>
+				<u-icon name="arrow-right" class="iconright"></u-icon>
+			</view>
+			<view class="base_text_item1" @click="binding">
+				<u-icon name="bangding" custom-prefix="custom-icon" class="icon"></u-icon>
+				<span>设备绑定</span>
+				<u-icon name="arrow-right" class="iconright"></u-icon>
+			</view>
+			<view class="base_id_box">
+				<view class="base_id" v-for="(item,key,index) in base_id" :key="index">
+					<view class="base_id_item" v-for="(items,indexs) in item" :key="indexs">
+						<span>{{key}}</span>
+						<span>{{items}}</span>
+					</view>
+				</view>
+			</view>
+			<view class="btn">
+				确 定
+			</view>
+		</view>
+	</view>
+</template>
+<style lang="scss">
+	
+</style>
+<script>
+	export default {
+		data() {
+			return {
+				base_id:{},
+				userinfos:''
+			}
+		},
+		methods: {
+			clickLeft(){
+				uni.navigateTo({
+					url:"./index"
+				})
+			},
+			binding(){
+				uni.navigateTo({
+					url:"./allocation"
+				})
+			},
+			gainimg() { //添加图片
+					uni.chooseImage({
+						count: 1, //默认9
+						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+						sourceType: ['album', 'camera'], //从相册选择
+						success: (res) => {
+							uni.uploadFile({
+								url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+								filePath: res.tempFilePaths[0],
+								name: 'img_file',
+								formData: {
+									'user': 'test'
+								},
+								success: (uploadFileRes) => {
+									this.userinfos = JSON.parse(uploadFileRes.data).data.src
+									console.log(this.userinfos)
+									this.$forceUpdate() //强制刷新视图
+								}
+							});
+						}
+					})
+			},
+			map(){
+				// uni.chooseLocation({
+				//     success: function (res) {
+				//         console.log('位置名称:' + res.name);
+				//         console.log('详细地址:' + res.address);
+				//         console.log('纬度:' + res.latitude);
+				//         console.log('经度:' + res.longitude);
+				//     }
+				// });
+				uni.navigateTo({
+					url:"./fourbasemap"
+				})
+			}
+		},
+		onLoad(option) {
+			console.log(option=={})
+			if(JSON.stringify(option) != "{}"){
+				this.base_id=JSON.parse(option.id)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.addimg{
+	position: absolute;
+	top: 108rpx;
+	width: 100%;
+	.addimg_add{
+		position: relative;
+		width: 90%;
+		height: 276rpx;
+		margin: 0 auto;
+		background-color: #F7F8FA;
+		text-align: center;
+		line-height: 276rpx;
+		color: #A7A8AA;
+		.addimg_img{
+			position: absolute;
+			top: 0;
+			width: 100%;
+			left: 0;
+			height: 276rpx;
+		}
+	}
+}
+.base_text{
+	position: absolute;
+	top: 390rpx;
+	width: 100%;
+	.title{
+		width: 90%;
+		margin: 20rpx auto;
+	}
+	.base_text_item2{
+		width: 90%;
+		margin: 10rpx auto 20rpx;
+		padding: 16rpx 20rpx;
+		background-color: #F7F8FA;
+		display: flex;
+		.icon{
+			color: #5FBBA0;
+			height: 42rpx;
+		}
+		span{
+			margin: 0 20rpx;
+		}
+		.textarea{
+			font-size: 24rpx;
+			margin-left: 20rpx;
+			width: 426rpx;
+			text-align: right;
+		}
+		
+	}
+	.base_text_item1{
+		display: flex;
+		position: relative;
+		width: 90%;
+		height: 70rpx;
+		margin: 10rpx auto 20rpx;
+		padding: 16rpx 20rpx;
+		background-color: #F7F8FA;
+		.icon{
+			color: #5FBBA0;
+		}
+		span{
+			margin: 0 20rpx;
+		}
+		input{
+			position: absolute;
+			right: 20rpx;
+			width: 70%;
+			text-align: right;
+			font-size: 24rpx;
+			margin-top: 5rpx;
+		}
+		.iconright{
+			position: absolute;
+			right: 20rpx;
+			top: 28rpx;
+			color: #B5B6B8;
+			font-size: 24rpx;
+		}
+	}
+}
+.base_id_box{
+		width: 90%;
+		margin: 20rpx auto 70rpx;
+	}
+	.base_id{
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		flex-wrap: wrap;
+		.base_id_item{
+			width: 48%;
+			padding: 10rpx 30rpx;
+			display: flex;
+			justify-content: space-between;
+			font-size: 28rpx;
+			background-color: #F7F8FA;
+			color: #B8B8BA;
+			margin-bottom: 10rpx;
+		}
+	}
+	.btn{
+		width: 90%;
+		position: fixed;
+		bottom: 0;
+		right: 5%;
+		text-align: center;
+		height: 70rpx;
+		line-height: 70rpx;
+		background-color: #359773;
+		font-size: 34rpx;
+		border-radius: 35rpx;
+		color: #FFFFFF;
+	}
+</style>

+ 280 - 0
pages/fourBase/allocation.vue

@@ -0,0 +1,280 @@
+<template>
+	<view>
+		<view style="position: fixed;z-index: 100;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备分配"></uni-nav-bar>
+		</view>
+		<view class="utabs">
+			<view style="width: 95%;margin: 0 auto;">
+				<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" item-width="140" font-size="24" gutter="20"
+				 bar-width="60" active-color="#42b983"></u-tabs>
+			</view>
+		</view>
+		<!-- <view class="bases_search">
+			<view class="bases_search_text">
+				<u-icon name="search" class="search" @click="searchs"></u-icon>
+				<input type="text" v-model="search" placeholder="请输入基地名称" />
+			</view>
+		</view> -->
+		<view class="ass_list">
+			<checkbox-group class="che_group" @change="checkboxchange">
+				<label class="equipment" v-for="(items,indexs) in assignments.children" :key="items.id">
+					<view class="equipment_top">
+						<image :src="assignments.src" mode="" class="equipment_top_img"></image>
+						<span class="equipment_top_name">{{assignments.type_name}}</span>
+						<checkbox :value="String(items.id)" :checked="items.check" class="ucheckbox" color="#42b983" />
+					</view>
+					<view class="equipment_bot">
+						<p class="equipment_bot_id">设备ID:{{items.id}}</p>
+						<p class="equipment_bot_name">设备名称:{{items.type_name}}</p>
+						<view class="equipment_state">在线</view>
+					</view>
+				</label>
+			</checkbox-group>
+		</view>
+		<view class="allocbtn">
+			<button @click="cancel" class="cancel">取消分配</button>
+			<button @click="canfirm" class="canfirm">确定分配</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				search: '',
+				checken: false,
+				assignment: [],
+				assignments: [],
+				list: [],
+				current: 0,
+				assignment_item: [],
+				assignment_items: [],
+				images: [{
+					path: "../../static/image/fourMoodBase/测报灯.png",
+					id: 3
+				}, {
+					path: "../../static/image/fourMoodBase/环境监测.png",
+					id: 5
+				}, {
+					path: "../../static/image/fourMoodBase/监控.png",
+					id: 6
+				}, {
+					path: "../../static/image/fourMoodBase/孢子仪.png",
+					id: 7
+				}],
+				src: '',
+				obj: {}
+			}
+		},
+		methods: {
+			async getFourbase() { //基地列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=base.bases.base_equip',
+				})
+				this.assignment = res.data
+				for (var i = 0; i < this.assignment.length; i++) {
+					let obj = {}
+					obj.name = this.assignment[i].type_name
+					this.list.push(obj)
+					if (this.assignment[i].id == this.images[i].id) {
+						this.assignment[i].src = this.images[i].path
+					}
+				}
+				this.assignments = this.assignment[this.current]
+				for (let i = 0; i < this.assignments.children.length; i++) {
+					this.assignments.children[i].check = false
+				}
+			},
+			forchange(obj) {
+				for (let i = 0; i < this.assignments.children.length; i++) {
+					this.assignments.children[i].check = false
+				}
+				for (let key in obj) {
+					for (let i = 0; i < key.length; i++) {
+						for (let j = 0; j < this.assignments.children.length; j++) {
+							if (Number(obj[key][i]) == this.assignments.children[j].id) {
+								this.assignments.children[j].check = true
+
+							}
+						}
+					}
+				}
+				this.$forceUpdate()
+			},
+			change(index) {
+				this.current = index
+				this.assignments = this.assignment[index]
+				this.forchange(this.obj)
+			},
+			checkboxchange(e, items) {
+				this.assignment_item = e.detail.value
+				this.obj[this.assignments.type_name] = this.assignment_item
+				this.forchange(this.obj)
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			cancel() {
+				this.clickLeft()
+			},
+			canfirm() {
+				var pages = getCurrentPages();
+				var prevPage = pages[pages.length - 2]; //上一个页面
+				if (prevPage.__page__.fullPath.indexOf("?")!=-1) {
+					prevPage.__page__.fullPath = prevPage.__page__.fullPath.slice(0, prevPage.__page__.fullPath.indexOf("?"))
+				} else {
+					prevPage.__page__.fullPath = prevPage.__page__.fullPath
+				}
+				console.log(prevPage)
+				uni.navigateTo({
+					url: prevPage.__page__.fullPath + "?id="+JSON.stringify(this.obj)
+				})
+			},
+		},
+		onLoad(option) {
+			this.getFourbase()
+			// this.forchange(this.obj)
+		}
+	}
+</script>
+
+<style lang="scss">
+	.utabs {
+		width: 100%;
+		position: fixed;
+		top: 44px;
+		z-index: 100;
+	}
+
+	.bases_search {
+		width: 100%;
+		position: fixed;
+		top: 84px;
+		z-index: 100;
+		background-color: #FFFFFF;
+		height: 80rpx;
+		padding-top: 20rpx;
+
+		.bases_search_text {
+			width: 90%;
+			margin: 0 auto;
+			background-color: #F8F8F8;
+			height: 60rpx;
+			border-radius: 30rpx;
+			display: flex;
+			line-height: 60rpx;
+
+			.search {
+				padding: 0 20rpx;
+				font-size: 34rpx;
+			}
+
+			input {
+				width: 80%;
+				margin-top: 10rpx;
+				font-size: 28rpx;
+			}
+		}
+	}
+
+	.ass_list {
+		position: absolute;
+		top: 84px;
+		width: 100%;
+		margin-bottom: 40px;
+
+		.che_group {
+			display: flex;
+			flex-direction: column;
+			width: 90%;
+			margin: 0 auto;
+		}
+
+		.equipment {
+			width: 90%;
+			margin: 20rpx auto;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding: 20rpx 30rpx;
+
+			.equipment_top {
+				height: 60rpx;
+				width: 100%;
+				border-bottom: 1px solid #dfe5ec;
+				position: relative;
+
+				.equipment_top_img {
+					width: 40rpx;
+					height: 40rpx;
+					position: absolute;
+				}
+
+				.equipment_top_name {
+					font-size: 24rpx;
+					margin-left: 60rpx;
+				}
+
+				.ucheckbox {
+					float: right;
+					margin: 0rpx -4rpx;
+					transform: scale(0.7);
+				}
+			}
+
+			.equipment_bot {
+				padding: 30rpx 0;
+				position: relative;
+
+				.equipment_bot_id {
+					font-weight: 700;
+					font-size: 15px;
+					margin-bottom: 16rpx;
+				}
+
+				.equipment_bot_name {
+					font-size: 10px;
+				}
+
+				.equipment_state {
+					position: absolute;
+					top: 20rpx;
+					right: 0;
+					width: 100rpx;
+					height: 100rpx;
+					text-align: center;
+					line-height: 100rpx;
+					color: #42b983;
+
+				}
+			}
+		}
+	}
+
+	.allocbtn {
+		width: 100%;
+		position: fixed;
+		bottom: 0;
+		z-index: 100;
+		display: flex;
+
+		button {
+			width: 50%;
+			font-size: 24rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 0;
+		}
+
+		.cancel {
+			background-color: #C8C7CC;
+			color: #555555;
+		}
+
+		.canfirm {
+			color: white;
+			background-color: #42b983;
+		}
+	}
+</style>

+ 40 - 0
pages/fourBase/fourbasemap.vue

@@ -0,0 +1,40 @@
+<template>
+	<view>
+		<view class="maps">
+			<map class="map_item" :latitude="latitude" :longitude="longitude" scale="14" :markers="markers" :show-location="true"
+			 @markertap="markertap">
+			</map>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				title: 'map',
+				latitude: 39.909,
+				longitude: 116.39742,
+				markers: []
+			}
+		},
+		methods: {
+			
+		},
+		onLoad() {
+			
+		},
+
+	}
+</script>
+
+<style lang="scss">
+	.maps {
+		width: 100%;
+		.map_item {
+			width: 90%;
+			margin: 0 auto;
+			height: 1000rpx;
+		}
+	}
+</style>

+ 209 - 0
pages/fourBase/index.vue

@@ -0,0 +1,209 @@
+<template>
+	<view>
+		<view style="position: fixed;z-index: 100;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="四情基地"></uni-nav-bar>
+			<u-icon name="plus-circle" class="tianjia" @click="clickRight"></u-icon>
+		</view>
+		<view class="bases_search">
+			<view class="bases_search_text">
+				<u-icon name="search" class="search" @click="search"></u-icon>
+				<input type="text" v-model="data.search" placeholder="请输入基地名称" @input="searchinput"/>
+			</view>
+		</view>
+		<view class="bases">
+			<view class="bases_list" v-for="(items,index) in baselist" :key="index" @click="details">
+				<view class="bases_list_bgi" >
+					<image :src="items.base_img" mode=""></image>
+				</view>
+				<view class="bases_list_text">
+					<p><span style="margin-right: 30rpx;">{{items.base_name}}</span><span>{{items.base_area}}㎡</span></p>
+					<p style="font-size: 24rpx;">联系人:{{items.base_charge}}</p>
+					<p style="font-size: 24rpx;">联系电话:{{items.base_phone}}</p>
+					<p style="font-size: 24rpx;">地址:{{items.base_name}}</p>
+				</view>
+				<u-icon name="more-dot-fill" class="bases_list_xiangqing" @click.native.stop="XQclick"></u-icon>
+				<view class="photoshow">
+					<image src="../../static/image/fourMoodBase/测报灯.png" mode=""></image>
+					<image src="../../static/image/fourMoodBase/杀虫灯.png" mode=""></image>
+					<image src="../../static/image/fourMoodBase/环境监测.png" mode=""></image>
+					<view class="photoshow_num">
+						6+
+					</view>
+				</view>
+			</view>
+			<u-action-sheet :list="actionSheetList" v-model="post_show" @click="message"></u-action-sheet>
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		Debounce,
+		Throttle
+	} from "../../util/anitthro.js"
+	export default {
+		data() {
+			return {
+				data: {
+					ret: 'list',
+					search: '',
+					page_size: 10,
+					page: 1
+				},
+				baselist: [],
+				actionSheetList:[{
+					text:"编辑基地"
+				},{
+					text:"删除基地"
+				}],
+				post_show:false
+			}
+		},
+		methods: {
+			async getFourbase() { //基地列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=base.bases.base_list',
+					data: this.data
+				})
+				this.baselist = this.baselist.concat(res.data)
+				console.log(this.baselist)
+			},
+			clickLeft(){//返回主页
+				uni.switchTab({
+					url:"../index/index"
+				})
+			},
+			clickRight(){//添加基地
+				uni.navigateTo({
+					url:"./addbase"
+				})
+			},
+			searchinput() {//搜索
+				this.data.page=1
+				Debounce(() => {
+					this.getFourbase()
+				}, 1000)()
+			},
+			search(){//搜索按钮
+				this.data.page=1
+				this.getFourbase()
+			},
+			details(){//详情页
+				console.log(1)
+			},
+			XQclick(){//编辑
+				this.post_show=!this.post_show
+			},
+			message(index){//编辑或者删除
+				console.log(index)
+			}
+		},
+		onLoad() {
+			this.getFourbase()
+		},
+		onReachBottom() {//滑动到底部加载
+			this.data.page++
+			this.getFourbase()
+		},
+	}
+</script>
+<style lang="scss">
+	.tianjia {
+		position: absolute;
+		top: 24rpx;
+		right: 24rpx;
+		font-size: 38rpx;
+	}
+	.bases_search{
+		width: 100%;
+		position: fixed;
+		top: 44px;
+		z-index: 100;
+		background-color: #FFFFFF;
+		.bases_search_text{
+			width: 90%;
+			margin: 0 auto;
+			background-color: #F8F8F8;
+			height: 60rpx;
+			border-radius: 30rpx;
+			display: flex;
+			line-height: 60rpx;
+			.search{
+				padding:0  20rpx ;
+				font-size: 34rpx;
+			}
+			input{
+				width: 80%;
+				margin-top: 10rpx;
+				font-size: 28rpx;
+			}
+		}
+	}
+	.bases {
+		width: 100%;
+		position: relative;
+		top: 170rpx;
+		.bases_list {
+			width: 90%;
+			margin: 0 auto 20rpx;
+			height: 276rpx;
+			position: relative;
+
+			.bases_list_bgi {
+				image {
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 276rpx;
+					border-radius: 25rpx;
+				}
+			}
+
+			.bases_list_text {
+				position: absolute;
+				top: 0;
+				left: 0;
+				z-index: 10;
+				padding: 40rpx;
+				color: #FFFFFF;
+				p{
+					margin-bottom: 10rpx;
+				}
+			}
+			.bases_list_xiangqing{
+				position: absolute;
+				top: 20rpx;
+				right: 20rpx;
+				transform: rotate(90deg);
+				font-size: 26rpx;
+				color: #FFFFFF;
+			}
+			.photoshow{
+				width: 160rpx;
+				height: 42rpx;
+				display: flex;
+				position: absolute;
+				bottom: 26rpx;
+				right: 36rpx;
+				background-color: #a7a8a0;
+				border-radius: 18rpx;
+				padding: 4rpx;
+				image{
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 4rpx;
+				}
+				.photoshow_num{
+					width: 50rpx;
+					height: 34rpx;
+					border: 1px solid #FFFFFF;
+					border-radius: 17rpx;
+					text-align: center;
+					line-height: 28rpx;
+					font-size: 24rpx;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
+</style>

+ 6 - 2
pages/index/index.vue

@@ -122,7 +122,9 @@
 		methods: {
 			tabfunction(index){
 				if(index==0){
-					console.log(0)
+					uni.navigateTo({
+						url:"../fourBase/index"
+					})
 				}else if(index==1){
 					console.log(1)
 				}else if(index==2){
@@ -141,7 +143,9 @@
 						url:"../cb/index/index"
 					})
 				}else if(index==1){
-					console.log(1)
+					uni.navigateTo({
+						url:"../prevention/index"
+					})
 				}else if(index==2){
 					console.log(2)
 				}else if(index==3){

+ 106 - 0
pages/prevention/index.vue

@@ -0,0 +1,106 @@
+<template>
+	<view>
+		<view style="position: fixed;z-index: 100;">
+			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="防治系统" right-icon="search" size="16"></uni-nav-bar>
+		</view>
+		<image src="../../static/image/prevention/1.png" mode="" class="image"></image>
+		<view class="prevents">
+			<view class="prevents_item" v-for="item,index in eqlistdata" :key="index">
+				<image :src="item.device_status==1?'../../static/image/prevention/6.png':'../../static/image/prevention/7.png'" mode="" class="prevents_item_img"></image>
+				<view class="prevents_item_top">
+					<p>设备 ID:{{item.device_id}}</p>
+					<p :class="item.device_status==1?'green':'red'" v-text="item.device_status==1?'在线':'离线'"></p>
+				</view>
+				<view class="prevents_item_bot">
+					最新上报时间:{{item.status_time|timeFormat()}}
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				page:1,
+				size:10,
+				eqlistdata:[]
+			}
+		},
+		methods: {
+			async eqlist() { //设备列表
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: 2,
+						page:this.page,
+						size:this.size,
+					}
+				})
+				this.eqlistdata=this.eqlistdata.concat(res.data) 
+				console.log(this.eqlistdata)
+			},
+			clickLeft(){
+				uni.switchTab({
+					url:"../index/index"
+				})
+			}
+		},
+		onLoad(){
+			this.eqlist()
+		}
+	}
+</script>
+
+<style lang="scss">
+/deep/.uni-icons{
+	font-size: 40rpx !important;
+}
+.image{
+	position: fixed;
+	top: 44px;
+	width: 100%;
+	height: 140rpx;
+	z-index: 555;
+}
+.prevents{
+	width: 100%;
+	position: absolute;
+	top: 244rpx;
+	.prevents_item{
+		width: 95%;
+		margin: 0 auto 30rpx;
+		border-radius: 10rpx;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 20rpx 40rpx 20rpx 80rpx;
+		position: relative;
+		.prevents_item_img{
+			width: 30rpx;
+			height: 50rpx;
+			position: absolute;
+			top: -4rpx;
+			left: 30rpx;
+		}
+		.prevents_item_top{
+			display: flex;
+			justify-content: space-between;
+			height: 60rpx;
+			border-bottom: 2rpx solid #F4F4F4;
+			line-height: 60rpx;
+			font-size: 26rpx;
+			.red{
+				color: #ff0000;
+			}
+			.green{
+				color: #7DBB91;
+			}
+		}
+		.prevents_item_bot{
+			margin-top: 20rpx;
+			font-size: 26rpx;
+			color: #BDBDBD;
+		}
+	}
+}
+</style>

BIN
static/image/prevention/1.png


BIN
static/image/prevention/10.png


BIN
static/image/prevention/2.png


BIN
static/image/prevention/3.png


BIN
static/image/prevention/4.png


BIN
static/image/prevention/5.png


BIN
static/image/prevention/6.png


BIN
static/image/prevention/7.png


BIN
static/image/prevention/8.png


BIN
static/image/prevention/9.png


Datei-Diff unterdrückt, da er zu groß ist
+ 29 - 1
static/outfont/iconfont.css