Forráskód Böngészése

设备注册静态排版

Ming 4 éve
szülő
commit
49aeb059d8

+ 64 - 20
common/common.scss

@@ -167,6 +167,29 @@ radio,checkbox {
 	padding:0 10px ;
 }
 
+
+// 底部操作样式 (分享  设备注册)
+	.share{
+		position:fixed;
+		bottom:0;
+		left:0;
+		width:100%;
+		background: #f4f5f7;
+		border: 1px solid #e6e6e6;
+		.share-item{
+			padding:20rpx;
+			
+		}
+		.share-item:nth-child(2){
+			border-left:1px solid #e6e6e6;
+			border-right:1px solid #e6e6e6;
+		}
+	}
+	
+	
+	
+	
+
 /* 页面样式 */
 
 /* 站点列表页 */
@@ -231,12 +254,15 @@ radio,checkbox {
 
 .pro-res {}
 
-.processList,.fireBashWrapper.pushListWrapper{
-	margin-top:90rpx;
+.processList{
+	
 	width: 100%;
 	height: calc(100% - 90rpx);
 	overflow-y: scroll;
 }
+.fireBashWrapper.pushListWrapper{
+	margin-top:0rpx;
+}
 .share-item.active{
 	color:red
 }
@@ -511,7 +537,8 @@ radio,checkbox {
 		-webkit-appearance: none;
 		color: #999;
 
-	}
+	}
+	
 	
 	select:focus,
 	select:active,
@@ -674,24 +701,7 @@ radio,checkbox {
 			line-height:1.5;
 			// text-indent:56rpx;
 		}
-		.share{
-			position:fixed;
-			bottom:0;
-			left:0;
-			width:100%;
-			background: #f4f5f7;
-			border: 1px solid #e6e6e6;
-			.share-item{
-				padding:20rpx;
-				
-			}
-			.share-item:nth-child(2){
-				border-left:1px solid #e6e6e6;
-				border-right:1px solid #e6e6e6;
-			}
-			
 		
-		}
 	}
 	.fireD-tit{
 		font-size:32rpx;
@@ -703,6 +713,11 @@ radio,checkbox {
 	}
 	
 	
+
+	
+	
+	
+	
 	// 月报详情
 	.reportD-wrapper{
 		
@@ -737,4 +752,33 @@ radio,checkbox {
 		
 	}
 	
+	// 设备注册
+	.deviceRegistList{
+		// height:calc(100vh - 490rpx);
+		checkbox{
+			position:absolute;
+			left:0
+		}
+		.cu-list.menu-avatar > .cu-item > .cu-avatar{
+			left:64rpx;
+		}
+		.cu-list.menu-avatar > .cu-item .content{
+			left:170rpx
+		}
+		
+	}
+	.deviceRegistWrapper{
+		.checkAll{
+			position:absolute;
+			top:-60rpx;
+			left:22rpx
+		}
+		.cu-form-group{
+			min-height:30rpx;
+			margin-top:0
+		}
+		
+	}
+	
+	
 	

+ 55 - 20
data/json.js

@@ -259,6 +259,41 @@ let deviceManage = [{
 		"time": "2021-01-20 15:23:43",
 		"status": 0
 	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status": 0
+	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status": 0
+	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status": 0
+	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status": 0
+	},
+	{
+		"id": "561",
+		"title": "测试用传装置",
+		"des": "三楼茶水间",
+		"time": "2021-01-20 15:23:43",
+		"status": 0
+	},
 	{
 		"id": "561",
 		"title": "测试用传装置",
@@ -424,42 +459,42 @@ let repair = [{
 		"status": 4
 	}
 
-];
+];
 let repairSquare = [{
 		"id": "561",
 		"title": "报修总数",
-		"num": "5",
-		"color":"#7992F9"
+		"num": "5",
+		"color": "#7992F9"
 	},
 	{
 		"id": "561",
 		"title": "未处理",
-		"num": "1",
-		"color":"#FDCA60"
+		"num": "1",
+		"color": "#FDCA60"
 	},
 	{
 		"id": "561",
 		"title": "未审核",
-		"num": "1",
-		"color":"#59D1EA"
+		"num": "1",
+		"color": "#59D1EA"
 	},
 	{
 		"id": "561",
 		"title": "未通过",
-		"num": "1",
-		"color":"#F77070"
+		"num": "1",
+		"color": "#F77070"
 	},
 	{
 		"id": "561",
 		"title": "已完成",
-		"num": "1",
-		"color":"#72D06A"
-	},
-	{
-		"id": "561",
-		"title": "超时完成",
-		"num": "1",
-		"color":"#F7895E"
+		"num": "1",
+		"color": "#72D06A"
+	},
+	{
+		"id": "561",
+		"title": "超时完成",
+		"num": "1",
+		"color": "#F7895E"
 	}
 
 ];
@@ -544,9 +579,9 @@ module.exports = {
 	xunJianRecord: xunJianRecord,
 	xunJianPlan: xunJianPlan,
 
-	repair: repair,
-	repairSquare:repairSquare,
-	
+	repair: repair,
+	repairSquare: repairSquare,
+
 	weiBaoList: weiBaoList,
 	weiBaoRecord: weiBaoRecord,
 	weiBaoPlan: weiBaoPlan,

+ 18 - 3
pages.json

@@ -308,6 +308,7 @@
 			"style": {
 				"navigationBarTitleText": "设备新增",
 				"enablePullDownRefresh": false
+				
 			}
 
 		}, {
@@ -366,10 +367,24 @@
 			}
 
 		}, {
-			"path": "pages/deviceAdd/deviceAdd",
+			"path": "pages/deviceManage/deviceAdd/deviceAdd",
 			"style": {
-				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false
+				"navigationBarTitleText": "新增",
+				"enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": {
+						"buttons": [{
+								"text": "\ue607",
+								"fontSize": "18px",
+								// "redDot": true,
+								"float": "right",
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"width": "auto"
+				
+							}
+						]
+					}
+				}
 			}
 
 		}

+ 1 - 1
pages/device-Manage/device-Manage.vue

@@ -34,7 +34,7 @@
 	export default {
 		data() {
 			return {
-				deviceManage: json.xunJianRecord,
+				deviceManage: json.deviceManage,
 				modalName: null,
 			};
 		},

+ 0 - 530
pages/deviceAdd/deviceAdd.vue

@@ -1,530 +0,0 @@
-<template>
-	<view class="appWrapper">
-
-		<!-- 站点新增start -->
-		<form action="" @submit="formSubmit" v-if="!deviceCode">
-			<view class="form-item margin-top">
-				<view class="title">
-					<text class="necessary">*</text>
-					设备编号:
-				</view>
-				<input name="deviceCode" v-model="formMess.deviceCode"></input>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>设备名称:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>安装位置:</view>
-				<input name="input" v-model="formMess.deviceInstallationPosition"></input>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>所属楼层:</view>
-				<!-- <select name="" id="" v-model="formMess.floor" filterable clearable>
-					<option value="1" >楼层1</option>
-					<option value="2" >楼层2</option>
-				</select> -->
-				<select name="" id="" v-model="formMess.floor" filterable clearable>
-					<!-- <option value="" >请选择</option> -->
-					<option value="-10">楼层B10</option>
-					<option value="-9">楼层B9</option>
-					<option value="-8">楼层B8</option>
-					<option value="-7">楼层B7</option>
-					<option value="-6">楼层B6</option>
-					<option value="-5">楼层B5</option>
-					<option value="-4">楼层B4</option>
-					<option value="-3">楼层B3</option>
-					<option value="-2">楼层B2</option>
-					<option value="-1">楼层B1</option>
-					<option value="item" v-for="item in 60" :key="index">楼层{{item}}</option>
-				</select>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>设备类型:</view>
-				<select name="" id="" v-model="formMess.deviceType" filterable clearable>
-					<option value="1">智慧用电</option>
-					<option value="2">视频监测</option>
-				</select>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>站点:</view>
-				<select name="" id="" v-model="formMess.siteId" filterable clearable>
-					<option :value=item.id v-for="item in siteList">{{ item.siteName}}</option>
-				</select>
-			</view>
-
-
-
-			<view class="btn-area submitBottomBtn padding-lr-sm">
-				<button class="bg-blue round  margin-top" @click="addSubmit">提 交 </button>
-			</view>
-		</form>
-		<!-- 站点新增end -->
-
-		<!-- 站点修改start -->
-		<form action="" @submit="formSubmit" v-else>
-			<view class="form-item margin-top">
-				<view class="title">
-					<text class="necessary">*</text>
-					设备编号:
-				</view>
-				<input name="deviceCode" v-model="deviceMessage.deviceCode" disabled="disabled"></input>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>设备名称:</view>
-				<input name="input" v-model="deviceMessage.deviceName" disabled="disabled"></input>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>安装位置:</view>
-				<input name="input" v-model="deviceMessage.deviceInstallationPosition"></input>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>所属楼层:</view>
-				<select name="" id="" v-model="deviceMessage.floor" filterable clearable>
-					<!-- <option value="" >请选择</option> -->
-					<option value="-10">楼层B10</option>
-					<option value="-9">楼层B9</option>
-					<option value="-8">楼层B8</option>
-					<option value="-7">楼层B7</option>
-					<option value="-6">楼层B6</option>
-					<option value="-5">楼层B5</option>
-					<option value="-4">楼层B4</option>
-					<option value="-3">楼层B3</option>
-					<option value="-2">楼层B2</option>
-					<option value="-1">楼层B1</option>
-					<option :value=index+1 v-for="(item,index) in 60" :key="index">楼层{{item}}</option>
-				</select>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>设备类型:</view>
-				<select name="" id="" v-model="deviceMessage.deviceType" filterable clearable>
-					<option value="1">智慧用电</option>
-					<option value="2">视频监测</option>
-				</select>
-			</view>
-			<view class="form-item">
-				<view class="title"><text class="necessary">*</text>站点:</view>
-				<select name="" id="" v-model="deviceMessage.siteId" filterable clearable>
-					<option :value=item.id v-for="item in siteList">{{ item.siteName}}</option>
-				</select>
-			</view>
-
-
-
-			<view class="btn-area submitBottomBtn padding-lr-sm">
-				<button class="bg-blue round  margin-top" @click="editSubmit">提 交 </button>
-			</view>
-		</form>
-		<!-- 站点修改end -->
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				siteList: [],
-				id: 0,
-				deviceCode:'',
-				formMess: {
-					"deviceCode": "",
-					"siteId": "",
-					"deviceType": "",
-					"deviceName": "",
-					"deviceInstallationPosition": "",
-					"floor": "",
-				},
-				deviceMessage: {}
-			}
-		},
-
-		onLoad: function(option) {
-			this.id = option.id
-			this.deviceCode=option.deviceCode
-			this.getSiteList()
-			if (option.deviceCode) {
-				uni.setNavigationBarTitle({
-					title: '设备修改'
-				});
-				this.getDeviceList({
-					"siteId": option.id,
-					"deviceCode": option.deviceCode
-				})
-			} else {
-				uni.setNavigationBarTitle({
-					title: '设备新增'
-				});
-
-			}
-
-
-		},
-
-		methods: {
-
-			//新增验证并提交
-			addSubmit() {
-				if (!this.formMess.deviceCode) {
-					uni.showToast({
-						title: "请填写设备编号",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.formMess.deviceName) {
-					uni.showToast({
-						title: "请填写设备名称",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.formMess.deviceInstallationPosition) {
-					uni.showToast({
-						title: "请填写安装位置",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.formMess.floor) {
-					uni.showToast({
-						title: "请选择所属楼层",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.formMess.deviceType) {
-					uni.showToast({
-						title: "请选择设备类型",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.formMess.siteId) {
-					uni.showToast({
-						title: "请选择站点",
-						icon: "none"
-					});
-					return
-				}
-
-				this.setAddDevice({
-					"deviceCode": this.formMess.deviceCode,
-					"siteId": this.formMess.siteId,
-					"deviceType": this.formMess.deviceType,
-					"deviceName": this.formMess.deviceName,
-					"deviceInstallationPosition": this.formMess.deviceInstallationPosition,
-					"floor": this.formMess.floor
-				})
-			},
-
-			//编辑验证并提交
-			editSubmit() {
-				if (!this.deviceMessage.deviceCode) {
-					uni.showToast({
-						title: "请填写设备编号",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.deviceMessage.deviceName) {
-					uni.showToast({
-						title: "请填写设备名称",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.deviceMessage.deviceInstallationPosition) {
-					uni.showToast({
-						title: "请填写安装位置",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.deviceMessage.floor) {
-					uni.showToast({
-						title: "请选择所属楼层",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.deviceMessage.deviceType) {
-					uni.showToast({
-						title: "请选择设备类型",
-						icon: "none"
-					});
-					return
-				}
-				if (!this.deviceMessage.siteId) {
-					uni.showToast({
-						title: "请选择站点",
-						icon: "none"
-					});
-					return
-				}
-				this.setEditDevice({
-					"deviceCode": this.deviceMessage.deviceCode,
-					"siteId": this.deviceMessage.siteId,
-					"deviceType": this.deviceMessage.deviceType,
-					"deviceName": this.deviceMessage.deviceName,
-					"deviceInstallationPosition": this.deviceMessage.deviceInstallationPosition,
-					"floor": this.deviceMessage.floor
-				})
-			},
-
-			// 新增请求
-			async setAddDevice(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'DeviceManagement/setAddDevice',
-					data: ming
-				})
-				if (!res.data.flag) {
-					uni.showToast({
-						title: "添加失败",
-						icon: "none"
-					});
-				} else {
-					uni.showToast({
-						title: "添加成功",
-					});
-				}
-				setTimeout(() => {
-					uni.navigateTo({
-						url: '/pages/siteManage/siteManage',
-					});
-				}, 1000);
-
-			},
-
-
-
-
-			// 站点下拉
-			async getSiteList(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'SiteManagement/getSiteList',
-					data: ming
-				})
-				// this.deviceMessage=res.data.data[0];
-				this.siteList = res.data.data
-				// console.log(res.data.data)
-			},
-
-
-			// 修改回显请求
-			async getDeviceList(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'DeviceManagement/getDeviceList',
-					data: ming
-				})
-				console.log('res.data.data')
-				console.log(res.data.data[0])
-				this.deviceMessage = res.data.data[0];
-				console.log(this.deviceMessage)
-			},
-
-
-			// 编辑请求
-			async setEditDevice(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'DeviceManagement/setEditDevice',
-					data: ming
-				})
-				if (!res.data.flag) {
-					uni.showToast({
-						title: "编辑失败",
-						icon: "none"
-					});
-				} else {
-					uni.showToast({
-						title: "编辑成功",
-					});
-				}
-				setTimeout(() => {
-					uni.navigateTo({
-						url: '/pages/siteManage/siteManage',
-					});
-				}, 1000);
-			},
-
-		}
-	}
-</script>
-
-
-
-
-<style lang="scss">
-	.cu-form-group {
-		border-top: 0;
-
-	}
-
-	input,
-	select,
-	option {
-		line-height: 70rpx;
-		padding: 0 20rpx;
-		height: 70rpx;
-		border: 1px solid #EDEDED;
-		// width:500rpx!important;
-		background-color: #fff;
-		box-sizing: border-box;
-		appearance: none;
-		-moz-appearance: none;
-		-webkit-appearance: none;
-		color: #999;
-
-
-	}
-
-	select:focus,
-	select:active,
-	select:hover {
-		outline: none;
-	}
-
-	select {
-		background: url(../../static/arrow.png) no-repeat scroll 98% center;
-		background-size: 6%;
-	}
-
-	.form-item label text {
-		position: relative;
-		top: 2rpx
-	}
-
-	.form-item {
-		padding: 0 40rpx;
-		display: flex;
-		align-items: top;
-		margin-bottom: 20rpx;
-
-
-		.title {
-			width: 170rpx;
-			position: relative;
-
-			.necessary {
-				color: red;
-				display: inline-block;
-				position: absolute;
-				top: -2rpx;
-				left: -20rpx;
-				font-size: 40rpx;
-
-			}
-		}
-
-		input,
-		select {
-			width: 500rpx;
-			font-size: 28rpx;
-		}
-
-
-	}
-
-
-
-
-
-	/* 站点多选下拉样式 start */
-
-	.layui-btn {
-		background-color: #5fb878;
-	}
-
-	a {
-		text-decoration: none;
-	}
-
-	.label {
-		padding: 2px 0px;
-		background: #aaa;
-		border-radius: 2px;
-		color: #fff;
-		display: block;
-		line-height: 20px;
-		height: 20px;
-		margin: 2px 5px 2px 0;
-		float: left;
-	}
-
-	.label span {
-		padding: 0 5px;
-		color: #fff;
-	}
-
-	.close {
-		padding: 1px 5px !important;
-	}
-
-	.close:hover {
-		/* background-color: #009E94;
-	    border-radius: 2px;
-	    color: tomato; */
-	}
-
-	.selectId input {
-		width: 100% !important;
-	}
-
-	.selectId input {
-		height: 25px;
-		padding: 1px 5px;
-		border-radius: 3px;
-		width: calc(100% - 12px);
-		outline-color: #5fb878;
-		border: 1px solid #5fb878;
-	}
-
-	.selectId {
-		position: relative;
-	}
-
-	.selectId dl {
-		border: 1px solid #eee;
-		border-radius: 3px;
-		margin: 2px 0px;
-		max-height: 300px;
-		overflow-x: hidden;
-		white-space: nowrap;
-		position: absolute;
-		width: 100%;
-		top: 40px;
-		background: #fff;
-		z-index: 1000
-	}
-
-	.selectId dl dd {
-		margin: 0;
-		padding: 5px 10px;
-	}
-
-	.selectId dl dd:hover {
-		background-color: #5FB878;
-		color: white;
-	}
-
-	.AD {
-		/* width: 210px;
-	        margin-left: 40px; */
-		overflow-y: auto;
-		max-height: 200px;
-		/* border: 2px solid #5fb878;
-	        border-radius: 6px;
-	        padding: 1px 2px; */
-	}
-
-	form .AD span {
-		width: auto;
-	}
-
-	.siteSelect {
-		width: 71%;
-		display: inline-block;
-	}
-
-
-	/* 站点多选下拉样式end */
-</style>

+ 233 - 0
pages/deviceManage/deviceAdd/deviceAdd.vue

@@ -0,0 +1,233 @@
+
+<template>
+	<view class="appWrapper">
+		<!-- <form action=""  @submit="formSubmit">
+			<view class="form-item margin-top">
+				<view class="title">
+					<text class="necessary">*</text>
+					用户名称:
+				</view>
+				<input name="userName" v-model="formMess.userName"></input>
+			</view>
+			<view class="form-item">
+				<view class="title">地址:</view>
+				<input name="input" v-model="formMess.place"></input>
+			</view>
+			<view class="form-item">
+				<view class="title">经度:</view>
+				<input name="input" v-model="formMess.longitude"></input>
+			</view>
+			<view class="form-item">
+				<view class="title">维度:</view>
+				<input name="input" v-model="formMess.dimension"></input>
+			</view>
+			<view class="form-item">
+				<view class="title">联系人:</view>
+				<input name="input" v-model="formMess.contactor"></input>
+			</view>
+			<view class="form-item">
+				<view class="title">手机号码:</view>
+				<input name="input" v-model="formMess.mobile"></input>
+			</view>
+		
+		
+			<view class="btn-area submitBottomBtn padding-lr-sm">
+				<button class="bg-blue round  margin-top" form-type="submit">提 交 </button>
+			</view>
+		</form> -->
+		<form action="">
+			<view class="form-item margin-top">
+				<view class="title">
+					<text class="necessary">*</text>
+					设备编号:
+				</view>
+				<input name="input" v-model="formMess.deviceNo"></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>设备名称:</view>
+				<input name="input" v-model="formMess.deviceName"></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>单元地址:</view>
+				<input name="input" v-model="formMess.place"></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>所属楼层:</view>
+				<select name="" id="">
+					<option value="">楼层一</option>
+					<option value="">楼层一</option>
+					<option value="">楼层一</option>
+				</select>
+			</view>
+			<view class="form-item">
+				<view class="title">物联网卡号:</view>
+				<input name="input" v-model="formMess.place"></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>所属单位:</view>
+				<select name="" id="">
+					<option value="">楼层一</option>
+					<option value="">楼层一</option>
+					<option value="">楼层一</option>
+				</select>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>设备类型:</view>
+				<select name="" id="">
+					<option value="">类型一</option>
+					<option value="">类型一</option>
+					<option value="">类型一</option>
+				</select>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>传输方式:</view>
+				<select name="" id="">
+					<option value="">方式一</option>
+					<option value="">方式一</option>
+					<option value="">方式一</option>
+				</select>
+			</view>
+			<view class="form-item margin-top">
+				<view class="title">
+					<text class="necessary">*</text>
+					是否顶楼
+				</view>
+				<radio-group name="gender">
+					<label class="margin-right">
+						<radio value="是"/><text>是</text>
+					</label>
+					<label>
+						<radio value="否"  checked /><text>否</text>
+					</label>
+				</radio-group>
+			</view>
+		
+
+			<view class="btn-area submitBottomBtn padding-lr-sm">
+				<button class="bg-blue round  margin-top">提 交 </button>
+			</view>
+		</form>
+		
+		
+	</view>
+</template>
+
+<script>
+	// var graceChecker = require("../../common/graceChecker.js");
+	// import add from '../../common/select.js';
+	export default {
+		
+		data() {
+			return {
+				index: -1,
+				picker: ['楼层一', '楼层二', '楼层三'],
+				type: '0',
+
+
+				formMess: {
+					"userName": "sss",
+					"place": "",
+					"longitude": "",
+					"dimension": "",
+					"contactor": "",
+					"mobile": "",
+				},
+				
+				// 站点多选下拉
+				data2: [
+					{id: 1, value: '选项1'},
+					{id: 2, value: '选项2'},
+					{id: 3, value: '选项3'},
+					{id: 4, value: '选项4'},
+					{id: 5, value: '选项5'},
+					{id: 6, value: '这是6'},
+					{id: 7, value: '这是7'},
+					{id: 8, value: '这是8'},
+					{id: 9, value: '这是9'},
+					{id: 10, value: '这是10'},
+				],
+				// 站点多选下拉 end
+
+
+			}
+		},
+		onLoad: function(option) {
+			
+
+
+		},
+		methods: {
+			// 站点多选下拉
+			getBackVal:function(e){
+				console.log(e)
+			},
+			// 站点多选下拉 end
+			
+			
+			formSubmit: function(e) {
+				console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value))
+				//定义表单规则
+				var rule = [{
+						name: "userName",
+						checkType: "string",
+						checkRule: "1,3",
+						errorMsg: "姓名应为1-3个字符..."
+					},
+					// {name:"gender", checkType : "in", checkRule:"男,女",  errorMsg:"请选择性别"},
+					// {name:"loves", checkType : "notnull", checkRule:"",  errorMsg:"请选择爱好"}
+				];
+				//进行表单检查
+				var formData = e.detail.value;
+				var checkRes = graceChecker.check(formData, rule);
+				if (checkRes) {
+					uni.showToast({
+						title: "验证通过!",
+						icon: "none"
+					});
+				} else {
+					uni.showToast({
+						title: graceChecker.error,
+						icon: "none"
+					});
+				}
+			},
+			formReset: function(e) {
+				console.log('清空数据')
+			}
+
+
+
+
+
+		}
+	}
+</script>
+
+
+
+
+<style lang="scss">
+
+
+	input,
+	select,
+	option {
+		line-height: 70rpx;
+		padding: 0 20rpx;
+		height: 70rpx;
+		border: 1px solid #EDEDED;
+		// width:500rpx!important;
+		background-color: #fff;
+		box-sizing: border-box;
+		appearance: none;
+		-moz-appearance: none;
+		-webkit-appearance: none;
+		color: #999;
+	}
+
+
+
+	
+	/* 站点多选下拉样式end */
+</style>
+

+ 193 - 126
pages/deviceManage/deviceManage.vue

@@ -1,176 +1,243 @@
 <template>
-	<view class="site-wrapper">
+	<view class="deviceRegistWrapper" ref="contentWrapper">
+
 		<!-- 筛选框start -->
-		<view class="ding">
-			<view class="cu-bar search bg-gray filter-section">
-				<view class="search-form round bg-white">
-					<text class="cuIcon-search"></text>
-					<input class=""  type="text" placeholder="请输入设备名称"
-					 confirm-type="search" v-model="deviceName"></input>
+			
+		<view>
+			<view style="height:103px"></view>
+			<view class="ding">
+				<view class="cu-bar search bg-gray filter-section" style="with:50%;">
+					<view class="search-form round bg-white">
+						<select name="" id="" placeholder="">
+							<option value="">请选择设备类型</option>
+							<option value="">类型1</option>
+							<option value="">类型2</option>
+						</select>
+					</view>
+					<view class="search-form round bg-white">
+						<input type="text" placeholder="选输入设备点位" confirm-type="search"></input>
+					</view>
 				</view>
-				<view class="action">
-					<button class="cu-btn bg-blue round" @click="searchSiteList">查询</button>
+			
+				<view class="cu-bar search bg-gray filter-section">
+					<view class="search-form round bg-white" style="margin-bottom:26rpx">
+						<input class="" @focus="InputFocus" v-model="siteName" @blur="InputBlur" :adjust-position="false"
+							type="text" placeholder="选择传输方式" confirm-type="search"></input>
+					</view>
+					<view class="action">
+						<button class="cu-btn bg-blue round" @click="searchData()">查询</button>
+					</view>
 				</view>
+			
+			
 			</view>
 		</view>
+	
 		<!-- 筛选框end -->
 
-		<!-- 站点列表start -->
-		<view class="site-items">
-			<view class="cu-list menu-avatar">
-				<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in siteList" :key="index"
-				 @touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index">
-					<view class="cu-avatar round lg" style="background-image: url(/static/device-icon.png);"></view>
 
-					<view class="content">
-						<view class="text-grey site-tit">{{item.deviceName}}</view>
+		<!-- 设备注册列表start -->
+		<block class="">
+			<view class="processList deviceRegistList" style="height: calc(100vh - 241px);">
+				<view class="cu-list menu-avatar ">
+					<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
+						v-for="(item,index) in newDeviceManage" :key="index" :data-target="'move-box-' + index">
+
+						<checkbox-group class="block" @change="CheckboxChange">
+							<view class="cu-form-group margin-top">
+								<checkbox class='blue' :class="checkbox[0].checked?'checked':''"
+									:checked="checkbox[0].checked?true:false" value="A"></checkbox>
+							</view>
+						</checkbox-group>
+
+
+						<view class="cu-avatar round lg" style="background-image:url(../../static/device-icon.png)">
+						</view>
+						<view class="content" @longpress="showDetail(item)">
+							<view class="pro-title">
+								<view class="cut">{{item.title}}</view>
+							</view>
+							<view class="pro-des  ">
+								<view class="text-cut">
+									{{item.des}}
+								</view>
+							</view>
+							<view class="pro-date ">{{item.time}}</view>
+							
+							<view class="showDetail"  v-if="item.isShow">
+								<view>修改设备</view>
+								<view>删除设备</view>
+							</view>
+						</view>
+						<view class="nav-right num">
+							<view class="text-grey">
+								<span class="online" v-if="item.status==0">在线</span>
+								<span class="offline" v-if="item.status==1">离线</span>
+								<span class="error" v-if="item.status==2">故障</span>
+								<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+							</view>
+						</view>
 					</view>
+				</view>
+			</view>
+		</block>
+		<!-- 设备注册列表end -->
 
-					<view class="nav-right num">
-						
-					</view>
-					<view class="move">
-						<view class="bg-grey" @click.stop="editItem(item)">编辑</view>
-						<view class="bg-red" @click.stop="deleteItem(item)">删除</view>
+
+		<view class="share grid col-3 ">
+			<view class="checkAll">
+				<checkbox-group class="block" @change="CheckboxChange" style="display:inline-block">
+					<view class="cu-form-group margin-top">
+						<checkbox class='blue' :class="checkbox[0].checked?'checked':''"
+							:checked="checkbox[0].checked?true:false" value="A"></checkbox>
 					</view>
-				</view>
+				</checkbox-group>全选
+			</view>
+			<view class="share-item  text-center">
+				<view><text class="icon iconfont margin-xs" style="color:#19A402">&#xe66d;</text></view>
+				<view @tap="goDeviceAdd()">新增</view>
 			</view>
-			<view v-if="!siteList.length&&siteListRes==1" class="text-center margin-top"> 暂无数据</view>
-		</view>
-		<!-- 站点列表end -->
+			<view class="share-item  text-center">
+				<view><text class="icon iconfont margin-xs" style="color:#FF0303">&#xe66c;</text></view>
+				<view>删除</view>
+			</view>
+			<view class="share-item  text-center">
+				<view><text class="icon iconfont margin-xs" style="color:#FF642E">&#xe66e;</text></view>
+				<view>导出</view>
 
-		<!-- 新增按钮start -->
-		<view class="plus">
-			<image src="../../static/plus.png" style="width:125rpx;height:125rpx" @tap="goAddPage()"></image>
+			</view>
 		</view>
-		<!-- 新增按钮end -->
+
+
 	</view>
 
 </template>
 
 <script>
+	import json from '../../data/json.js';
+
 	export default {
 		data() {
 			return {
+
+				checkbox: [{
+					value: 'A',
+					checked: false
+				}],
+
+				deviceManage: json.deviceManage,
+				siteListRes: 0,
+				siteName: '',
+				type: '0',
+				siteListData: [],
 				modalName: null,
 				listTouchStart: 0,
 				listTouchDirection: null,
-
-				deviceName: '',
-				siteList: [],
-				siteListRes: 0,
-				siteId:''
+				CustomBar: this.CustomBar,
 			};
 		},
 
-		onLoad: function(option) {
-			this.siteId=option.siteId;
-			//设备列表渲染
-			this.getDeviceList({"siteId":option.siteId})
-			
-		},
-		
-		methods: {
-			//筛选
-			searchSiteList() {
-				this.getDeviceList({
-					"deviceName": this.deviceName,"siteId":this.siteId
+
+		onPullDownRefresh() {
+			console.log('refresh');
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		computed: {
+			newDeviceManage() {
+				return this.deviceManage.map(item => {
+					this.$set(item, "isShow", false)
+					return item
 				})
-			},
-			
-			//编辑
-			editItem(item) {
-				uni.navigateTo({
-					url: '/pages/deviceAdd/deviceAdd?id=' + item.siteId + '&deviceCode=' + item.deviceCode + '',
-				});
-			},
+			}
 
-			//删除
-			deleteItem(item) {
-				uni.showModal({
-					title: '确认删除吗?',
-					content: '',
-					success: function(result) {
-						if (result.confirm) {
-							this.setDelSite({
-								"id": item.id
-							})
-						} else if (result.cancel) {
-							// console.log('用户点击取消');
-						}
-					}.bind(this)
-				});
-			},
-			
+		},
 
-			async setDelSite(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'DeviceManagement/setDelSite',
-					data: ming
-				})
-				if (!res.data.flag) {
-					uni.showToast({
-						title: "删除失败",
-						icon: "none"
-					});
-				}else{
-					uni.showToast({
-						title: "删除成功",
-					});
-					setTimeout(() => {
-						this.getDeviceList({"siteId":this.siteId})
-					}, 1000);
+
+		mounted() {
+			document.addEventListener('click', (e) => {
+				if (e.target.className != 'showDetail') {
+					this.deviceManage.forEach(item => {
+						item.isShow = false
+					})
 				}
+			})
+		},
+
+		methods: {
+		
+			// 页面跳转
+			goDeviceAdd() {
+				alert(1)
 				
+				// uni.navigateTo({
+				// 	url: '/pages/deviceDetail/deviceDetail',
+				// });
+				uni.navigateTo({
+					url: '/pages/deviceManage/deviceAdd/deviceAdd',
+				});
 			},
 
-			async getDeviceList(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'DeviceManagement/getDeviceList',
-					showLoading: true,
-					data: ming
+			CheckboxChange(e) {
+				var items = this.checkbox,
+					values = e.detail.value;
+				for (var i = 0, lenI = items.length; i < lenI; ++i) {
+					items[i].checked = false;
+					for (var j = 0, lenJ = values.length; j < lenJ; ++j) {
+						if (items[i].value == values[j]) {
+							items[i].checked = true;
+							break
+						}
+					}
+				}
+			},
+
+			// 隐藏显示
+			showDetail(e) {
+				// alert(1)
+				// 存储点击那一项的状态
+				const nowStatu = e.isShow;
+				// 将每一项列表的isShow设置为false,让所有的列表都隐藏
+				this.deviceManage.forEach(item => {
+					item.isShow = false
 				})
-				this.siteListRes = 1;
-				this.siteList = res.data.data
-				console.log(res.data.data);
+				// 用于再次点击该项的取反
+				e.isShow = !nowStatu
+			},
+			InputFocus(e) {
+				this.InputBottom = e.detail.height
+			},
+			InputBlur(e) {
+				this.InputBottom = 0
 			},
 			
-			// 新增跳转
-			goAddPage() {
-				uni.navigateTo({
-					url: '/pages/deviceAdd/deviceAdd?id=' + this.siteId + '',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
 			
-		
 
-			// ListTouch触摸开始
-			ListTouchStart(e) {
-				this.listTouchStart = e.touches[0].pageX
-			},
 
-			// ListTouch计算方向
-			ListTouchMove(e) {
-				this.listTouchDirection = e.touches[0].pageX - this.listTouchStart < -80 ? 'left' : 'right'
-			},
 
-			// ListTouch计算滚动
-			ListTouchEnd(e) {
-				if (this.listTouchDirection == 'left') {
-					this.modalName = e.currentTarget.dataset.target
-				} else {
-					this.modalName = null
-				}
-				this.listTouchDirection = null
-			}
 		}
 
 	}
 </script>
 
-<style>
+<style >
+	.showDetail {
+		position: absolute;
+		background: #fff;
+		box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
+		border-radius: 10rpx;
+		top: 50rpx;
+		right: 47%;
+		z-index: 3000000;
+		font-size: 28rpx;
+	}
+	.showDetail view{
+		padding: 0rpx 20rpx;
+	}
+	.showDetail view:first-child{
+		border-bottom:1px solid #EDEDED;
+	}
+		
 
 </style>

+ 3 - 0
pages/index/index.vue

@@ -159,6 +159,9 @@
 					case 7:
 						url = "/pages/safeGuard/safeGuard"
 						break;
+						case 9:
+							url = "/pages/deviceManage/deviceManage"
+							break;
 						case 10:
 							url = "/pages/accountManage/accountManage"
 							break;

+ 2 - 2
pages/info/fireBashDetail/fireBashDetail.vue

@@ -42,14 +42,14 @@
 		</view>
 
 
-		<view class="share grid col-3 ">
+		<!-- <view class="share grid col-3">
 			<view class="share-item align">
 				<text class="icon iconfont margin-right-xs margin-left-lg">&#xe60c;</text>
 				分享
 			</view>
 			<view class="share-item" @click="clickPraise()" :class="[praise?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg"  >&#xe62a;</text>收藏</view>
 			<view class="share-item"  @click="clickZan()" :class="[zan?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg">&#xe600;</text>点赞</view>
-		</view>
+		</view> -->
 
 
 

+ 1 - 1
pages/setting/messagePush/messagePush.vue

@@ -3,7 +3,7 @@
 
 		<form action="">
 			<checkbox-group class="block" @change="CheckboxChange">
-				<view class="  margin-top  ">
+				<view class="margin-top  ">
 					<view class="flex align-center checkItems">
 						<checkbox class="blue" :class="checkbox[0].checked?'checked':''" :checked="checkbox[0].checked?true:false" value="A"></checkbox>
 						<view class="title">火警报警</view>

+ 5 - 5
static/iconfont/iconfont.css

@@ -9,17 +9,17 @@
 } */
 
 
-
-
 @font-face {
   font-family: 'iconfont';  /* Project id 2394829 */
-  src: url('https://at.alicdn.com/t/font_2394829_n6v5f56a8bs.woff2?t=1622785113718') format('woff2'),
-       url('https://at.alicdn.com/t/font_2394829_n6v5f56a8bs.woff?t=1622785113718') format('woff'),
-       url('https://at.alicdn.com/t/font_2394829_n6v5f56a8bs.ttf?t=1622785113718') format('truetype');
+  src: url('https://at.alicdn.com/t/font_2394829_ken0vmyss6a.woff2?t=1623131965202') format('woff2'),
+       url('https://at.alicdn.com/t/font_2394829_ken0vmyss6a.woff?t=1623131965202') format('woff'),
+       url('https://at.alicdn.com/t/font_2394829_ken0vmyss6a.ttf?t=1623131965202') format('truetype');
 }
 
 
 
+
+
 .iconfont {
   font-family: "iconfont" !important;
   font-size: 16px;

BIN
static/iconfont/iconfont.ttf