heyang 10 miesięcy temu
rodzic
commit
4cd7002744

+ 2 - 2
api/request/config.js

@@ -1,13 +1,13 @@
 const config = {
 	// base_url: 'http://192.168.1.43/api', //43服务器
 	//base_url: 'http://192.168.1.8/api',//1.8服务器
-	  base_url: 'http://192.168.1.9:8080',//柴
+	//  base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	//base_url: 'http://192.168.1.17:8080',//小飞
 	//base_url: 'http://192.168.1.43/api',//小飞
 	// base_url: 'http://192.168.1.20:8080',//志伟
-	// base_url: 'http://192.168.1.8:8080',//高升
+	 base_url: 'http://192.168.1.39:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试

+ 23 - 13
pages.json

@@ -9,18 +9,9 @@
 				"navigationStyle":"custom"  //关闭原生导航
 			}
 		},
-        {
-			"path": "pages/views/empowerOpen",
-			"style": {
-				"navigationBarTitleText": "授权开门"
-			}
-		},
-		{
-			"path": "pages/views/photoInspectionInfo",
-			"style": {
-				"navigationBarTitleText": "拍照检查"
-			}
-		},
+    
+		
+		
 
 		{
 			"path": "pages/views/mine/mine",//我的
@@ -137,7 +128,13 @@
 				{
 					"path": "views/photoInspection",
 					"style": {
-						"navigationBarTitleText": "离开检查"
+						"navigationBarTitleText": "拍照检查"
+					}
+				},
+				{
+					"path": "views/photoInspectionInfo",
+					"style": {
+						"navigationBarTitleText": "拍照检查"
 					}
 				},
 				/* 修改头像 */
@@ -553,6 +550,19 @@
 			"root": "pages_manage",  //分包根路径
 			"name": "manage", //分包名字可写可不写
 			"pages": [
+				//门禁授权
+				{
+					"path": "views/accessControl/empowerOpen",
+					"style": {
+						"navigationBarTitleText": "授权开门"
+					}
+				},
+				{
+					"path": "views/accessControl/remoteOpen",
+					"style": {
+						"navigationBarTitleText": "远程开门"
+					}
+				},
 				//应急处置
 				{
 					"path": "views/emergencyEvacuationBig",//应急疏散

+ 10 - 2
pages/api/index.js

@@ -229,11 +229,19 @@ export const systemNoticeGetNoticeType  = (data) => {
         data: data,
     })
 };
-
+//授权开门-查询实验室列表
+export function systemSubjectGetAppSubject(data) {
+	return apiResquest({
+		url: '/system/subject/getAppSubject',
+		method: 'post',
+		data: {
+			...data
+		}
+	})
+}
 /************************未调试************************/
 
 
-
 //获取离开检查配置
 export const outSubjectPhoto  = (id,data) => {
     return apiResquestForm({

+ 12 - 0
pages/component/mineConfigurationSlot.vue

@@ -102,6 +102,18 @@
 							url: this.mineConfig.layout[index].routeUrl,
 						});
 					}
+					if (this.mineConfig.layout[index].route === 'empowerOpen') { //授权开门
+						uni.navigateTo({
+							url: this.mineConfig.layout[index].routeUrl,
+						});
+					}
+					if (this.mineConfig.layout[index].route === 'remoteOpen') { //远程开门
+						uni.navigateTo({
+							url: this.mineConfig.layout[index].routeUrl,
+						});
+					}
+					
+					
 
 				} else if (this.mineConfig.layout[index].buttonType === 'button') {
 

BIN
pages/images/clear.png


+ 0 - 179
pages/views/empowerOpen.vue

@@ -1,179 +0,0 @@
-<!-- 拍照检查 -->
-<template>
-	<view id="empowerOpen">
-		<view class="page-one" v-if="pageType==1">
-			<view class="header">
-				<input class="header-l" type="text" v-model="newData.subId" placeholder="实验室名称">
-			</view>
-			<view class="list">
-				<view class="list-li">
-					<view class="list-li-l">实验室名称(房间号)</view>
-					<view class="list-li-r">授权</view>
-				</view>
-			</view>
-		</view>
-		<view class="page-tow" v-if="pageType==2">
-			<view class="list-tow">
-				<view class="list-tow-li">
-					<view class="list-tow-li-t">被授权人</view>
-					<input class="list-tow-li-b" type="text" v-model="newData.subId" placeholder="">
-				</view>
-				<view class="list-tow-li">
-					<view class="list-tow-li-t">生效时间</view>
-					<view class="time">
-						<view class="time-l">2024/02/04  12:23</view>
-						<view class="time-c">-</view>
-						<view class="time-r">2024/02/04  12:23</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		
-	</view>
-
-</template>
-
-<script>
-	import {
-		config
-	} from '@/api/request/config.js'
-	export default {
-		components: {
-
-		},
-		data() {
-			return {
-				pageType: 2,
-				baseUrl: config.base_url,
-				newData: {
-					
-				},
-				
-
-			}
-		},
-		onLoad(option) {
-
-		},
-		onShow() {
-
-		},
-		methods: {
-			
-		}
-	}
-</script>
-
-<style lang="stylus" scoped>
-	#empowerOpen {
-		.page-one{
-			.header{
-				width: 749rpx;
-				height: 120rpx;
-				background: #FFFFFF;
-				padding: 20rpx 30rpx;
-				box-sizing: border-box;
-				border-bottom: 1rpx solid #D8D8D8;
-				.header-l{
-					width: 690rpx;
-					height: 80rpx;
-					border-radius: 10rpx 10rpx 10rpx 10rpx;
-					border: 1rpx solid #E0E0E0;
-					padding: 20rpx;
-					box-sizing: border-box;
-				}
-			}
-			.list{
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				background: #fff;
-				.list-li{
-					height: 90rpx;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					border-bottom: 1rpx solid #D8D8D8;
-					
-					.list-li-l{
-						flex: 1;
-						font-family: PingFang SC, PingFang SC;
-						font-weight: 400;
-						font-size: 30rpx;
-						color: #333333;
-						line-height: 42rpx;	
-					}
-					.list-li-r{
-						font-family: PingFang SC, PingFang SC;
-						font-weight: 400;
-						font-size: 28rpx;
-						color: #0183FA;
-						line-height: 39rpx;
-					}
-				}
-			}
-			
-		}
-		.page-tow{
-			.list-tow{
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				background: #fff;
-				.list-tow-li{
-					.list-tow-li-t{
-						font-family: PingFang SC, PingFang SC;
-						font-weight: 400;
-						font-size: 30rpx;
-						color: #333333;
-						line-height: 42rpx;
-						text-align: left;
-						margin: 24rpx 0;
-					}
-					.list-tow-li-b{
-						width: 690rpx;
-						height: 80rpx;
-						border-radius: 10rpx 10rpx 10rpx 10rpx;
-						border: 1rpx solid #E0E0E0;
-					}
-					.time{
-						display:flex;
-						justify-content: flex-start;
-						align-items: center;
-						width: 690rpx;
-						height: 80rpx;
-						border-radius: 10rpx 10rpx 10rpx 10rpx;
-						border: 1rpx solid #E0E0E0;
-						.time-l{
-							height: 80rpx;
-							width: 324rpx;
-							border-right:1rpx solid #E0E0E0;
-							font-family: PingFang SC, PingFang SC;
-							font-weight: 400;
-							font-size: 28rpx;
-							color: #333333;
-							line-height: 80rpx;
-							text-align: left;
-						}
-						.time-c{
-							height: 80rpx;
-							width: 40rpx;
-							text-align: center;
-							line-height: 80rpx;
-						}
-						.time-r{
-							height: 80rpx;
-							width: 324rpx;
-							background: #E0E0E0;
-							border-left:1rpx solid #E0E0E0;
-							font-family: PingFang SC, PingFang SC;
-							font-weight: 400;
-							font-size: 28rpx;
-							color: #333333;
-							line-height: 80rpx;
-							text-align: left;
-						}
-					}
-				}
-			}
-		}
-	}
-</style>

pages/views/photoInspectionInfo.vue → pages_basics/views/photoInspectionInfo.vue


+ 339 - 0
pages_manage/views/accessControl/empowerOpen.vue

@@ -0,0 +1,339 @@
+<!-- 授权开门 -->
+<template>
+	<view id="empowerOpen">
+		<view class="page-one" v-if="pageType==1">
+			<view class="header">
+				<input class="header-l" type="text" v-model="newData.subId" placeholder="实验室名称">
+			</view>
+			<view class="list">
+				<view class="list-li">
+					<view class="list-li-l">实验室名称(房间号)</view>
+					<view class="list-li-r">授权</view>
+				</view>
+			</view>
+		</view>
+		<view class="page-tow" v-if="pageType==2">
+			<view class="list-tow">
+				<view class="list-tow-li">
+					<view class="list-tow-li-t">被授权人</view>
+					<input class="list-tow-li-b" type="text" v-model="newData.subId" placeholder="">
+				</view>
+				<view class="list-tow-li">
+					<view class="list-tow-li-t">生效时间</view>
+					<view class="time">
+						<view class="time-l">2024/02/04 12:23</view>
+						<view class="time-c">-</view>
+						<view class="time-r">2024/02/04 12:23</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="bottom">
+			<view class="bottom-l" @click="cancelClick()">取消</view>
+			<view class="bottom-r" @click="submitForm()">确定</view>
+		</view>
+		<view class="success" v-if="successVisible">
+			<view class="null-box" @click="closeTip()"></view>
+			<view class="panel">
+				<img class="panel-t" v-if="authorizeStatus==1" src="@/pages/images/icon_kcxq_cg.png" />
+				<img class="panel-t" v-if="authorizeStatus==2" src="@/pages/images/icon_kcxq_sb.png" />
+				<view class="panel-m">{{authorizeStatus==1?'授权成功':'授权失败'}}</view>
+				<view class="panel-b">({{count}}S)</view>
+			</view>
+		</view>
+	</view>
+
+</template>
+
+<script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		systemSubjectGetAppSubject
+	} from '@/pages/api/index.js'
+	export default {
+		components: {
+
+		},
+		data() {
+			return {
+				pageType: 1,
+				baseUrl: config.base_url,
+				newData: {
+
+				},
+				addForm:{
+					
+				},
+				getData:{
+					searchValue:'',
+					adminId:uni.getStorageSync('userId'),
+				},
+				dataList:[],
+				authorizeStatus:2,//1成功 2失败
+				successVisible: false,
+				timer: null,
+				count: '',
+
+
+			}
+		},
+		onLoad(option) {
+
+		},
+		onShow() {
+
+		},
+		mounted() {
+			this.systemSubjectGetAppSubject();
+		},
+		methods: {
+			//获取实验室
+			async systemSubjectGetAppSubject() {
+				let self = this;
+				const {
+					data
+				} = await systemSubjectGetAppSubject(this.getData);
+				if (data.code == 200) {
+					this.dataList=data.data;
+				}
+			},
+			cancelClick(){
+				
+			},
+			submitForm(){
+				this.$set(this,'successVisible',true)
+				this.getCode();
+			},
+			//关闭弹框倒计时
+			getCode() {
+				let self=this;
+				const TIME_COUNT = 3;
+				if (!this.timer) {
+					this.count = TIME_COUNT;
+					this.show = false;
+					this.timer = setInterval(() => {
+						if (this.count > 0 && this.count <= TIME_COUNT) {
+							this.count -= 1;
+						} else {
+							self.successVisible=false;
+							clearInterval(this.timer);
+							this.timer = null;
+						}
+					}, 1000);
+				}
+			},
+			closeTip() {
+				this.$set(this, 'successVisible', false)
+			},
+		}
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#empowerOpen {
+
+		.page-one {
+			.header {
+				width: 749rpx;
+				height: 120rpx;
+				background: #FFFFFF;
+				padding: 20rpx 30rpx;
+				box-sizing: border-box;
+				border-bottom: 1rpx solid #D8D8D8;
+
+				.header-l {
+					width: 690rpx;
+					height: 80rpx;
+					border-radius: 10rpx 10rpx 10rpx 10rpx;
+					border: 1rpx solid #E0E0E0;
+					padding: 20rpx;
+					box-sizing: border-box;
+				}
+			}
+
+			.list {
+				padding: 0 30rpx;
+				box-sizing: border-box;
+				background: #fff;
+
+				.list-li {
+					height: 90rpx;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					border-bottom: 1rpx solid #D8D8D8;
+
+					.list-li-l {
+						flex: 1;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						font-size: 30rpx;
+						color: #333333;
+						line-height: 42rpx;
+					}
+
+					.list-li-r {
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #0183FA;
+						line-height: 39rpx;
+					}
+				}
+			}
+
+		}
+
+		.page-tow {
+			.list-tow {
+				padding: 0 30rpx 50rpx;
+				box-sizing: border-box;
+				background: #fff;
+
+				.list-tow-li {
+					overflow: hidden;
+
+					.list-tow-li-t {
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						font-size: 30rpx;
+						color: #333333;
+						line-height: 42rpx;
+						text-align: left;
+						margin: 24rpx 0;
+					}
+
+					.list-tow-li-b {
+						width: 690rpx;
+						height: 80rpx;
+						border-radius: 10rpx 10rpx 10rpx 10rpx;
+						border: 1rpx solid #E0E0E0;
+					}
+
+					.time {
+						display: flex;
+						justify-content: flex-start;
+						align-items: center;
+						width: 690rpx;
+						height: 80rpx;
+						border-radius: 10rpx 10rpx 10rpx 10rpx;
+						border: 1rpx solid #E0E0E0;
+
+						.time-l {
+							height: 80rpx;
+							width: 324rpx;
+							border-right: 1rpx solid #E0E0E0;
+							font-family: PingFang SC, PingFang SC;
+							font-weight: 400;
+							font-size: 28rpx;
+							color: #333333;
+							line-height: 80rpx;
+							text-align: center;
+						}
+
+						.time-c {
+							height: 80rpx;
+							width: 40rpx;
+							text-align: center;
+							line-height: 80rpx;
+						}
+
+						.time-r {
+							height: 80rpx;
+							width: 324rpx;
+							background: #E0E0E0;
+							border-left: 1rpx solid #E0E0E0;
+							font-family: PingFang SC, PingFang SC;
+							font-weight: 400;
+							font-size: 28rpx;
+							color: #333333;
+							line-height: 80rpx;
+							text-align: center;
+						}
+					}
+				}
+			}
+		}
+
+		.bottom {
+			display: flex;
+			justify-content: space-between;
+			position: fixed;
+			bottom: 0;
+
+			.bottom-l {
+				width: 375rpx;
+				height: 90rpx;
+				background: #FFFFFF;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 400;
+				font-size: 30rpx;
+				color: #333333;
+				line-height: 90rpx;
+				text-align: center;
+			}
+
+			.bottom-r {
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 400;
+				font-size: 30rpx;
+				color: #FFFFFF;
+				line-height: 90rpx;
+				text-align: center;
+				width: 375rpx;
+				height: 90rpx;
+				background: #0183FA;
+			}
+		}
+
+		.success {
+			height: 100%;
+			width: 100%;
+			position: fixed;
+			top: 0;
+			display: flex;
+			flex-direction: column;
+			z-index: 10;
+			background: rgba(0, 0, 0, 0.2);
+
+			.null-box {
+				flex: 1;
+			}
+
+			.panel {
+				width: 550rpx;
+				height: 255rpx;
+				background: #FFFFFF;
+				border-radius: 20rpx 20rpx 20rpx 20rpx;
+				position: absolute;
+				top: 320rpx;
+				left: 100rpx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				.panel-t{
+					width: 80rpx;
+					height: 80rpx;
+					margin: 40rpx 0 18rpx 0;
+				}
+				.panel-m{
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #3D3D3D;
+					line-height: 42rpx;
+					margin-bottom: 8rpx;
+				}
+				.panel-b{
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #999999;
+					line-height: 42rpx;
+				}
+			}
+		}
+	}
+</style>

+ 223 - 0
pages_manage/views/accessControl/remoteOpen.vue

@@ -0,0 +1,223 @@
+<!-- 远程开门 -->
+<template>
+	<view id="empowerOpen">
+		<view class="page-one" v-if="pageType==1">
+			<view class="header">
+				<view class="header-n">
+					<input class="header-l" type="text" v-model="getData.searchValue" placeholder="实验室名称">
+					<view class="header-r" v-if="getData.searchValue" @click="clearSearch()" >
+						<img src="@/pages/images/clear.png" />
+					</view>
+					
+				</view>
+			</view>
+			<view class="list">
+				<view class="list-li">
+					<view class="list-li-l">实验室名称(房间号)</view>
+					<view class="list-li-r">开门</view>
+				</view>
+			</view>
+		</view>
+		<view class="success" v-if="successVisible">
+			<view class="null-box" @click="closeTip()"></view>
+			<view class="panel">
+				<img class="panel-t" v-if="authorizeStatus==1" src="@/pages/images/icon_kcxq_cg.png" />
+				<img class="panel-t" v-if="authorizeStatus==2" src="@/pages/images/icon_kcxq_sb.png" />
+				<view class="panel-m">{{authorizeStatus==1?'开门成功':'开门失败'}}</view>
+				<view class="panel-b">({{count}}S)</view>
+			</view>
+		</view>
+	</view>
+
+</template>
+
+<script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	export default {
+		components: {
+
+		},
+		data() {
+			return {
+				pageType: 1,
+				baseUrl: config.base_url,
+				getData:{
+					searchValue:'',
+				},
+				newData: {
+
+				},
+				addForm:{
+					
+				},
+				authorizeStatus:2,//1成功 2失败
+				successVisible: false,
+				timer: null,
+				count: '',
+
+
+			}
+		},
+		onLoad(option) {
+
+		},
+		onShow() {
+
+		},
+		methods: {
+			clearSearch(){
+				console.log(111)
+				this.getData.searchValue='';
+			},
+			cancelClick(){
+				
+			},
+			submitForm(){
+				this.$set(this,'successVisible',true)
+				this.getCode();
+			},
+			//关闭弹框倒计时
+			getCode() {
+				let self=this;
+				const TIME_COUNT = 3;
+				if (!this.timer) {
+					this.count = TIME_COUNT;
+					this.show = false;
+					this.timer = setInterval(() => {
+						if (this.count > 0 && this.count <= TIME_COUNT) {
+							this.count -= 1;
+						} else {
+							self.successVisible=false;
+							clearInterval(this.timer);
+							this.timer = null;
+						}
+					}, 1000);
+				}
+			},
+			closeTip() {
+				this.$set(this, 'successVisible', false)
+			},
+		}
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#empowerOpen {
+
+		.page-one {
+			.header {
+				width: 749rpx;
+				height: 120rpx;
+				background: #FFFFFF;
+				padding: 20rpx 30rpx;
+				box-sizing: border-box;
+				border-bottom: 1rpx solid #D8D8D8;
+				
+				.header-n{
+					position: relative;
+					width: 690rpx;
+					height: 80rpx;
+					border-radius: 10rpx 10rpx 10rpx 10rpx;
+					border: 1rpx solid #E0E0E0;
+					padding-left: 20rpx;
+					box-sizing: border-box;
+					.header-l {
+						width: 630rpx;
+						height: 80rpx;
+					}
+					.header-r{
+						position: absolute;
+						top: 0rpx;
+						right: 0rpx;
+						width: 68rpx;
+						height: 80rpx;
+					}
+				}
+				
+			}
+
+			.list {
+				padding: 0 30rpx;
+				box-sizing: border-box;
+				background: #fff;
+
+				.list-li {
+					height: 90rpx;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					border-bottom: 1rpx solid #D8D8D8;
+
+					.list-li-l {
+						flex: 1;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						font-size: 30rpx;
+						color: #333333;
+						line-height: 42rpx;
+					}
+
+					.list-li-r {
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						font-size: 28rpx;
+						color: #0183FA;
+						line-height: 39rpx;
+					}
+				}
+			}
+
+		}
+
+		
+		.success {
+			height: 100%;
+			width: 100%;
+			position: fixed;
+			top: 0;
+			display: flex;
+			flex-direction: column;
+			z-index: 10;
+			background: rgba(0, 0, 0, 0.2);
+
+			.null-box {
+				flex: 1;
+			}
+
+			.panel {
+				width: 550rpx;
+				height: 255rpx;
+				background: #FFFFFF;
+				border-radius: 20rpx 20rpx 20rpx 20rpx;
+				position: absolute;
+				top: 320rpx;
+				left: 100rpx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				.panel-t{
+					width: 80rpx;
+					height: 80rpx;
+					margin: 40rpx 0 18rpx 0;
+				}
+				.panel-m{
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #3D3D3D;
+					line-height: 42rpx;
+					margin-bottom: 8rpx;
+				}
+				.panel-b{
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #999999;
+					line-height: 42rpx;
+				}
+			}
+		}
+	}
+</style>

+ 16 - 0
pages_safetyExamine/api/index.js

@@ -197,6 +197,22 @@ export const isSCollege  = (data) => {
         data: data,
     })
 };
+//巡查计划-选择学院-带实验室数量
+export const laboratorySubRelInfoConditionCollegeInfo  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subRelInfo/conditionCollegeInfo`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划-选择全校-带学院和实验室数量
+export const laboratorySubRelInfoGetAllSubNum  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subRelInfo/getAllSubNum`,
+        method: 'GET',
+        data: data,
+    })
+};
 
 //专项检查/巡查计划-检查类型
 export const dangerList  = (data) => {

+ 5 - 3
pages_safetyExamine/views/patrolPlan/patrolPlanAdd.vue

@@ -114,7 +114,9 @@
 		checkPlanAdd,
 		systemDeptDropList,
 		getAllSubNum,
-		isSCollege
+		isSCollege,
+		laboratorySubRelInfoConditionCollegeInfo,
+		laboratorySubRelInfoGetAllSubNum
 	} from '@/pages_safetyExamine/api/index.js'
 	export default {
 		name: "rectifyList",
@@ -452,7 +454,7 @@
 				let self = this;
 				const {
 					data
-				} = await systemDeptDropList({
+				} = await laboratorySubRelInfoConditionCollegeInfo({
 					deptName: '',
 					level: 2,
 					deptType: 1
@@ -469,7 +471,7 @@
 				let self = this;
 				const {
 					data
-				} = await getAllSubNum();
+				} = await laboratorySubRelInfoGetAllSubNum();
 				if (data.code == 200) {
 					this.form.collegeNum = data.data.collegeCount
 					this.form.subjectNum = data.data.subCount

+ 3 - 3
pages_safetyExamine/views/patrolPlan/patrolPlanAddContent.vue

@@ -115,7 +115,7 @@
 
 				if (this.dataList[index].type) { //判断是选中还是取消
 					if (this.seleteListDevice.length > 0) {
-						if (this.seleteListDevice.findIndex((item) => item.id === this.dataList[index].id) == -
+						if (this.seleteListDevice.findIndex((item) => item.hazardId === this.dataList[index].hazardId) == -
 							1) { //等于-1说明数组里没有当前选中元素,可以添加
 							this.seleteListDevice.push(this.dataList[index])
 						}
@@ -155,7 +155,7 @@
 				this.$set(this.form, 'seleteListDevice', this.seleteListDevice)
 				if (this.seleteListDevice.length > 0) {
 					this.seleteListDevice.forEach(function(item) {
-						hazardIds.push(item.id)
+						hazardIds.push(item.hazardId)
 					})
 					this.$set(this.form, 'hazardIds', hazardIds.join(','))
 				} else {
@@ -214,7 +214,7 @@
 					self.total = data.total;
 					if (this.seleteListDevice.length > 0) { //如果有选中的数据
 						for (let i = 0; i < this.dataList.length; i++) {
-							if (this.seleteListDevice.findIndex((item) => item.id === this.dataList[i].id) != -
+							if (this.seleteListDevice.findIndex((item) => item.hazardId === this.dataList[i].hazardId) != -
 								1) { //不等于-1说明数组里有当前元素,可以改为选中
 								this.dataList[i].type = true;
 							} else {

+ 50 - 33
utils/mineConfig.js

@@ -1,67 +1,84 @@
-let routeDataList = [
-	{	
-		id:'1',
+let routeDataList = [{
+		id: '1',
 		name: "预警记录",
-		limits:"",
+		limits: "",
 		route: "mineWarningRecording",
 		routeUrl: "/pages_basics/views/earlyWarningManage/earlyWarningList",
 		img: require('@/images/commonality/icon_003.png'),
-		buttonType:"page",
+		buttonType: "page",
 	},
-	{	
-		id:'2',
+	{
+		id: '2',
 		name: "我的实验室",
-		limits:"",
+		limits: "",
 		route: "laboratory",
 		routeUrl: "/pages_manage/views/laboratory/meLaboratory",
 		img: require('@/images/commonality/icon_002.png'),
-		buttonType:"page",
+		buttonType: "page",
 	},
 	{
-		id:'3',
+		id: '3',
 		name: "预案执行记录",
-		limits:"",
+		limits: "",
 		route: "PlanExecuteRecord",
 		routeUrl: "/pages_manage/views/plan/planList",
 		img: require('@/images/commonality/icon_004.png'),
-		buttonType:"page",
+		buttonType: "page",
+	},
+	{
+		id: '4', //id
+		name: "身份验证", //名称
+		limits: "", //权限字段
+		route: "faceImage", //路由名称
+		routeUrl: "/pages_basics/views/faceImage", //组件地址
+		img: require('@/images/commonality/icon_001.png'), //图片
+		buttonType: "page", //类型
+	},
+	{
+		id: '5', //id
+		name: "授权开门", //名称
+		limits: "", //权限字段
+		route: "empowerOpen", //路由名称
+		routeUrl: "/pages_manage/views/accessControl/empowerOpen", //组件地址
+		img: require('@/images/commonality/icon_001.png'), //图片
+		buttonType: "page", //类型
 	},
 	{
-		id:'4',																								//id
-		name: "身份验证",																			//名称
-		limits:"",														//权限字段
-		route: "faceImage",																		//路由名称
-		routeUrl: "/pages_basics/views/faceImage",									//组件地址
-		img: require('@/images/commonality/icon_001.png'),	//图片
-		buttonType:"page",																		//类型
+		id: '6', //id
+		name: "远程开门", //名称
+		limits: "", //权限字段
+		route: "remoteOpen", //路由名称
+		routeUrl: "/pages_manage/views/accessControl/remoteOpen", //组件地址
+		img: require('@/images/commonality/icon_001.png'), //图片
+		buttonType: "page", //类型
 	}
 ];
 
 export function getMineConfig(data) {
 	let list = JSON.parse(JSON.stringify(data));
 	let mineList = [];
-	for(let i=0 ; i<list.length; i++){
+	for (let i = 0; i < list.length; i++) {
 		let bigObj = {
-			type:list[i].type,
-			layout:[],
+			type: list[i].type,
+			layout: [],
 		};
-		for(let l=0 ; l<list[i].layout.length; l++){
-			for(let o=0 ; o<routeDataList.length; o++){
-				if(list[i].layout[l].path === routeDataList[o].route){
+		for (let l = 0; l < list[i].layout.length; l++) {
+			for (let o = 0; o < routeDataList.length; o++) {
+				if (list[i].layout[l].path === routeDataList[o].route) {
 					bigObj.layout.push({
-						limits:routeDataList[o].limits,
-						route:routeDataList[o].route,
-						routeUrl:routeDataList[o].routeUrl,
-						name:routeDataList[o].name,
-						img:routeDataList[o].img,
-						buttonType:routeDataList[o].buttonType,
+						limits: routeDataList[o].limits,
+						route: routeDataList[o].route,
+						routeUrl: routeDataList[o].routeUrl,
+						name: routeDataList[o].name,
+						img: routeDataList[o].img,
+						buttonType: routeDataList[o].buttonType,
 					})
 				}
 			}
 		}
-		if(bigObj.layout[0]){
+		if (bigObj.layout[0]) {
 			mineList.push(bigObj);
 		}
 	}
-  return mineList;
+	return mineList;
 }