heyang пре 1 година
родитељ
комит
7adf86f9ba

+ 78 - 4
api/basicsModules/index.js

@@ -45,8 +45,16 @@ export const systemNoticeGetNoticeList = (data) => {
 		data: data,
 	})
 };
+//化学品登录-扫码验证
+export const chemicalAioIdentityScanLogin = (data) => {
+	return apiResquest({
+		url: `/chemical/aio/identity/scanLogin`,
+		method: 'GET',
+		data: data,
+	})
+};
 
-//获取实验室列表
+//实验室-列表
 export const laboratoryAppletSubList = (data) => {
 	return apiResquest({
 		url: `/laboratory/applet/subList`,
@@ -54,7 +62,7 @@ export const laboratoryAppletSubList = (data) => {
 		data: { ...data }
 	})
 };
-//获取实验室-详情
+//实验室-详情
 export const laboratoryAppletGetSubDetailInfo = (data) => {
 	return apiResquest({
 		url: `/laboratory/applet/getSubDetailInfo`,
@@ -62,6 +70,58 @@ export const laboratoryAppletGetSubDetailInfo = (data) => {
 		data: data,
 	})
 };
+//实验室-查询传感器状态
+export const iotAppSensorFindBySubId = (data) => {
+	return apiResquest({
+		url: `/iot/app/sensor/findBySubId`,
+		method: 'GET',
+		data: data,
+	})
+};
+//实验室-查询硬件设备
+export const iotAppHardwareFindByType = (data) => {
+	return apiResquest({
+		url: `/iot/app/hardware/findByType`,
+		method: 'POST',
+		data: { ...data }
+	})
+};
+
+
+//实验室-硬件设备-开关
+export const iotAppHardwareOperatingHardware = (data) => {
+	return apiResquest({
+		url: `/iot/app/hardware/operatingHardware`,
+		method: 'GET',
+		data: data,
+	})
+};
+
+//实验室-查询物联设备
+export const iotAppDeviceFindByType = (data) => {
+	return apiResquest({
+		url: `/iot/app/device/findByType`,
+		method: 'POST',
+		data: { ...data }
+	})
+};
+//实验室-查询喇叭列表
+export const iotAppSpeakerFindHorn = (data) => {
+	return apiResquest({
+		url: `/iot/app/speaker/findHorn`,
+		method: 'GET',
+		data: data,
+	})
+};
+//实验室-喇叭播放
+export const iotAppSpeakerPlayVoice = (data) => {
+	return apiResquest({
+		url: `/iot/app/speaker/playVoice`,
+		method: 'GET',
+		data: data,
+	})
+};
+
 
 //扫码-查询化学品详情
 export const chemicalAppletCabinetDetail = (data) => {
@@ -87,8 +147,22 @@ export const chemicalAppletGetStockDetail = (data) => {
 		data: data,
 	})
 };
-
-
+//个人中心-获取个人信息
+export const systemUserProfile = (data) => {
+	return apiResquest({
+		url: `/system/user/profile`,
+		method: 'GET',
+		data: data,
+	})
+};
+//用户修改头像接口
+export const systemMineUserEdit = (data) => {
+	return apiResquest({
+		url: `/system/mine/user/edit`,
+		method: 'POST',
+		data: { ...data }
+	})
+};
 /*                分类获取公共配置
 * category        1.系统参数 2.公共配置
 * configType      1.基础配置 2.管控一体机 3.化学品终端 4.小程序配置 5.开发配置 6.首页配置

+ 28 - 1
api/manage/index.js

@@ -2,4 +2,31 @@ import { apiResquest } from '../request/request.js'
 import { apiResquestForm } from '../request/request.js'
 import { apiResquestJsonList } from '../request/request.js'
 import { apiResquestFormVideo } from '../request/request.js'
-import { apiResquestTimer } from '../request/request.js'
+import { apiResquestTimer } from '../request/request.js'
+
+
+//安全准入审核列表接口
+export const laboratoryAppletAuditListByApply = (data) => {
+	return apiResquest({
+		url: `/laboratory/applet/auditListByApply`,
+		method: 'POST',
+		data: { ...data }
+	})
+};
+//审核信息详情(管理端)
+export const laboratoryAppletGetApplyDetails  = (data) => {
+    return apiResquest({
+        url: `/laboratory/applet/getApplyDetails`,
+        method: 'GET',
+        data: data,
+    })
+};
+
+//安全准入审批接口
+export const laboratoryAppletEditApp  = (data) => {
+    return apiResquest({
+        url: '/laboratory/applet/editApp',
+        method: 'POST',
+        data: data,
+    })
+};

+ 2 - 2
api/request/config.js

@@ -1,5 +1,5 @@
 const config = {
-	base_url: 'http://192.168.1.8/api',//V3
+	//base_url: 'http://192.168.1.8/api',//V3
 	// base_url: 'http://192.168.1.9:8080',//柴
 	//base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
@@ -7,7 +7,7 @@ const config = {
 	// base_url: 'http://192.168.1.20:8080',//志伟
     // base_url: 'http://192.168.1.8:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
-    // base_url: 'http://192.168.1.43:9800',//43服务器
+     base_url: 'http://192.168.1.43/api',//43服务器
 	// base_url: 'https://demo.zjznai.com/xzgd/',
     //base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
 	// base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上

+ 26 - 1
api/student/index.js

@@ -2,4 +2,29 @@ import { apiResquest } from '../request/request.js'
 import { apiResquestForm } from '../request/request.js'
 import { apiResquestJsonList } from '../request/request.js'
 import { apiResquestFormVideo } from '../request/request.js'
-import { apiResquestTimer } from '../request/request.js'
+import { apiResquestTimer } from '../request/request.js'
+
+//查询申请记录列表
+export const laboratoryAppletListApply  = (data) => {
+    return apiResquest({
+         url:'/laboratory/applet/listApply',
+        method: 'POST',
+        data: data,
+    })
+};
+//根据名称查询实验室
+export const systemMineGetListByPower  = (data) => {
+    return apiResquest({
+         url:'/system/mine/getListByPower',
+        method: 'POST',
+        data: data,
+    })
+};
+//获取实验室当前准入配置
+export const laboratoryAppletMaterialApply  = (data) => {
+    return apiResquest({
+         url:'/laboratory/applet/materialApply',
+        method: 'POST',
+        data: data,
+    })
+};

+ 1 - 0
component/homeConfigurationSlot.vue

@@ -115,6 +115,7 @@
 						//this.getGentleIdentifier(item.routeUrl)
 					}
 					if (item.route === 'leaveInspection') {//离开检查
+					console.log(11)
 						uni.navigateTo({
 							url: item.routeUrl,
 						});

+ 4 - 39
component/mineConfigurationSlot.vue

@@ -35,11 +35,9 @@
 					<view class="view-three-two" v-if="item.route === 'laboratory' && adminSubCount>0">{{adminSubCount}}</view>
 					<view class="view-three-two" v-if="item.route === 'PlanExecuteRecord' && wranDoCount>0">{{wranDoCount}}</view>
 					<view class="view-three-type" v-if="item.route === 'faceImage'"
-					:class="!ifFaceFeature?'colorA':'marginType'">
-						{{!ifFaceFeature?'去认证':'已认证'}}
+					:class="ifFaceFeature==''?'colorA':'marginType'">
+						{{ifFaceFeature==''?'去认证':'已认证'}}
 					</view>
-					<view class="view-three-type" v-if="item.route === 'signature'" :class="!isUpload?'colorA':'marginType'">{{!isUpload?'未上传':'已上传'}}</view>
-					<view class="view-three-type" v-if="item.route === 'fingerprint'" :class="Quantity>0?'marginType':'colorA'">{{Quantity>0?'已配置'+Quantity+'个':''}}</view>
 					<img class="right-img" src="@/images/basicsModules/icon_04.png">
 				</view>
 			</permissionsSlot>
@@ -74,7 +72,7 @@
 			}
 		},
 		created() {
-
+			this.$set(this,'ifFaceFeature',data.data.faceImg)
 		},
 		mounted() {
 			console.log('mineConfig',this.mineConfig)
@@ -102,22 +100,7 @@
 						uni.navigateTo({
 							url: item.routeUrl,
 						});
-					}
-					if (item.route === 'signature') {//电子签名
-						uni.navigateTo({
-							url: item.routeUrl,
-						});
-					}
-					if (item.route === 'fingerprint') {//指纹
-						uni.navigateTo({
-							url: item.routeUrl,
-						});
-						//this.fingerprintClick(item.routeUrl)
-					}
-					
-					
-					
-					
+					}	
 					
 				} else if (item.buttonType === 'button') {
 					
@@ -130,24 +113,6 @@
 					});
 				}
 			},
-			//电子签名
-			signatureButton() {
-				uni.navigateTo({
-					url: '/pages_manage/workbench/signature/signature?item=' + this.signatureUrl, //电子签名
-				});
-			},
-			//查询用户指纹录取数据
-			async fingerprintClick(routeUrl) {
-				let _this = this;
-				const {
-					data
-				} = await fingerprintQueryList(uni.getStorageSync('userId'));
-				if (data.code == 200) {
-					uni.navigateTo({
-						url: routeUrl, //指纹信息
-					});
-				}
-			},
 		},
 	}
 </script>

+ 34 - 27
pages.json

@@ -1,7 +1,6 @@
 {
 	"pages": [
-		
-		
+
 		{
 			"path": "pages/login/login",//登录
 			"style": {
@@ -10,7 +9,8 @@
 				"navigationStyle":"custom"  //关闭原生导航
 			}
 		},
-		
+
+
 		{
 			"path": "pages/mine/mine",//我的
 			"style": {
@@ -34,7 +34,12 @@
 				"navigationStyle": "custom"
 			}
 		},
-		/*化学品和课程扫码进入页面*/
+		{
+			"path": "pages/saoCode/saoCode",//扫码识别
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
 		{
 			"path": "pages/pages_patrolInspector/chemicalDetail",
 			"style": {
@@ -67,6 +72,15 @@
 				"navigationBarBackgroundColor": "#0183FA" //导航背景色
 			}
 		},
+		{
+			"path": "pages/pages_patrolInspector/identityVerify",
+			"style": {
+				"navigationBarTitleText": "提示",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
+		},
+
 		/*供应商*/
 		{
 			"path": "pages/supplier/forbidden",
@@ -101,36 +115,17 @@
 						"navigationBarTitleText": "离开检查"
 					}
 				},
-
-				/* 身份验证 */
+				/* 修改头像 */
 				{
-					"path": "faceImage",//身份验证
+					"path": "avatar",
 					"style": {
 						"navigationBarTitleText": "身份验证"
 					}
 				},
-				/* 电子签名 */
-				{
-					"path": "signature/signature",//电子签名
-					"style": {
-						"navigationBarTitleText": "电子签名",
-						"navigationBarTextStyle": "white", //导航文字颜色
-						"navigationBarBackgroundColor": "#0183FA" //导航背景色
-					}
-				},
 				{
-					"path": "signature/signatureImg",//电子签名-图片处理
-					"style": {
-						"navigationBarTitleText": ""
-					}
-				},
-				/* 指纹 */
-				{
-					"path": "fingerprint",//指纹信息
+					"path": "faceImage",//身份验证
 					"style": {
-						"navigationBarTitleText": "指纹信息",
-						"navigationBarTextStyle": "white", //导航文字颜色
-						"navigationBarBackgroundColor": "#0183FA" //导航背景色
+						"navigationBarTitleText": "身份验证"
 					}
 				},
 				/* 预警信息 */
@@ -554,6 +549,18 @@
 						"navigationBarTitleText": "准入审核"
 					}
 				},
+				{
+					"path": "accessQualification/accessQualificationInfo",//准入资格证书申请详情
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "accessQualification/approve",//不通过原因
+					"style": {
+						"navigationBarTitleText": "审核未通过"
+					}
+				},
 				/* 我的实验室 */
 				{
 					"path": "laboratory/meLaboratory",//我的实验室

+ 2 - 2
pages/information/information.vue

@@ -6,11 +6,11 @@
 				<img  src="@/images/basicsModules/icon_xx_tz.png">
 				<view class="right-box">
 					<view class="top-box">
-						<view>{{item.title}}</view>
+						<view>{{item.userName}}</view>
 						<view>{{item.deptName}}</view>
 						<view>{{item.sendTime}}</view>
 					</view>
-					<view class="bottom">{{item.content}}</view>
+					<view class="bottom">{{item.title}}</view>
 				</view>
 			</view>
 			<view class="get-null-box" v-if="!dataList[0]">暂无更多数据</view>

+ 2 - 1
pages/login/login.vue

@@ -89,7 +89,8 @@ export default {
       }
       const {data} = await login(obj)
       if(data.code == 200){
-        uni.setStorageSync('token',data.data.token);
+        //uni.setStorageSync('token',data.data.token);
+        uni.setStorageSync('token','2be4d101-2456-46d1-87ee-c1658ef21d2d');
         uni.setStorageSync('userId',data.data.userId);
          // userType 0-系统 1-教职工 2-学生 3-大屏
         uni.setStorageSync('userType',data.data.userType==0||data.data.userType==1?'11':(data.data.userType==2?'22':(data.data.userType==3?'3':'none')));

+ 15 - 29
pages/mine/mine.vue

@@ -3,15 +3,15 @@
   <view id="mine">
     <view class="top-max-big-box" v-if="pageType">
       <!--老师-->
-      <view class="top-max-box-two" v-if="userType==1&&certification.auditStatus">
+      <view class="top-max-box-two" v-if="userType==1">
         <view class="user-img-box" @click="selectImage">
-          <img v-if="userData.avatar" :src="userData.avatarUrl">
+          <img v-if="userData.avatar" :src="baseUrl+userData.avatar">
           <img v-else  src="@/images/basicsModules/icon_01.png">
           <view>{{userData.avatar?'编辑':'未上传'}}</view>
         </view>
         <view class="name-box">
           <view>{{userData.userName}}</view>
-          <view>{{userData.professional}}丨{{userData.deptName}}</view>
+          <view>{{userData.deptName}}</view>
         </view>
       </view>
       <!--学生-->
@@ -57,9 +57,7 @@
           </view>
         </view>
       </view>
-
     </view>
-    
     <mineConfigurationSlot v-for="(item,index) in mineConfigData" :key="index" :mineConfig="item"></mineConfigurationSlot>
 	<view class="out-button" @click="clickOut">退出登录</view>
     <tab-bar></tab-bar>
@@ -69,7 +67,7 @@
 <script>
 import { config } from '@/api/request/config.js'
 import { logout,studentinfoFacemy,simpleInfo,getSafeWarnList,getMyPointsLogInfo,
-		querySignature,fingerprintQuantity,fingerprintQueryList,systemAppletLayoutSelect} from '@/api/basicsModules/index.js'
+		querySignature,fingerprintQuantity,fingerprintQueryList,systemAppletLayoutSelect,systemUserProfile} from '@/api/basicsModules/index.js'
 import { tabBar } from '@/component/tabBar.vue'
 
 	import { mineConfigurationSlot } from '@/component/mineConfigurationSlot'
@@ -82,6 +80,7 @@ export default {
   },
   data() {
     return {
+		baseUrl:config.base_url,
 	  mineConfigData: [],
       //页面状态
       pageType:false,
@@ -113,15 +112,15 @@ export default {
     }
   },
   onLoad() {
-
+	
   },
   onShow(){
-
+	this.simpleInfo();
 	this.systemAppletLayoutSelect();
     if(uni.getStorageSync('token')&&uni.getStorageSync('userId')&&uni.getStorageSync('userType')){
-      this.userType = uni.getStorageSync('userType')
+	  this.userType = uni.getStorageSync('userType')
       this.studentinfoFacemy();
-      this.simpleInfo();
+      
       this.querySignature();
     }else{
       uni.removeStorageSync('token');
@@ -177,24 +176,11 @@ export default {
     },
     //获取个人信息
     async simpleInfo(){
-      const {data} = await simpleInfo();
+      const {data} = await systemUserProfile();
       if(data.code == 200){
-        this.userData = data.data;
-        this.userData.avatar=data.data.avatar;
-
-        this.userData.avatarUrl=config.base_url+data.data.avatar;
-		console.log(config.base_url)
-		console.log(this.userData.avatarUrl)
-        if(this.userType == 1){
-          this.getSafeWarnList();
-        }else if(this.userType == 2){
-          //this.getMyPointsLogInfo();
-        }
-        if(data.data.count){
-          this.adminSubCount = data.data.count.adminSubCount;
-          this.wranDoCount = data.data.count.wranDoCount;
-        }
-        this.pageType = true;
+		this.$set(this,'userData',data.data)
+		uni.setStorageSync('faceImg',data.data.faceImg);
+		this.$set(this,'pageType',true)
       }
     },
 
@@ -342,7 +328,7 @@ export default {
         mask: true
       });
       uni.uploadFile({
-        url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
+        url: config.base_url+'/system/file/upload', //仅为示例,非真实的接口地址
         header:{'Authorization':uni.getStorageSync('token')},
         filePath: tempFilePaths,
         name: 'file',
@@ -353,7 +339,7 @@ export default {
           let res = JSON.parse(uploadFileRes.data);
           if(res.code == 200){
             uni.navigateTo({
-              url: '/pages/avatar?src='+config.base_url+res.data.url,//预案执行记录
+              url: '/pages_basics/avatar?src='+config.base_url+res.data.url,
             });
 
 

+ 77 - 0
pages/pages_patrolInspector/identityVerify.vue

@@ -0,0 +1,77 @@
+<!--化学品扫码身份验证-->
+<template>
+	<view class="identityVerify">
+		<img v-if="pageType==1" src="@/images/basicsModules/icon_kcxq_cg.png"/>
+		<img v-if="pageType==2" src="@/images/basicsModules/icon_kcxq_sb.png"/>
+		<view class="tip">{{pageType==1?'身份验证成功':'身份验证失败'}}</view>
+	</view>
+</template>
+<script>
+	import {chemicalAioIdentityScanLogin} from '@/api/basicsModules/index.js'
+	export default {
+		name: "identityVerify",
+		props: {
+			
+		},
+		data() {
+			return {
+				pageType:1,
+				// 查询参数
+				queryParams: {
+				  code:'',
+				  subId:'',
+				  userId:'',
+				},
+				
+			}
+		},
+		onLoad(option) {
+			this.$set(this.queryParams,'code',option.code);
+			this.$set(this.queryParams,'subId',option.subId);
+			this.$set(this.queryParams,'userId',uni.setStorageSync('userId'));
+			this.chemicalAioIdentityScanLogin();
+			
+		},
+		created() {
+
+		},
+		mounted() {
+			
+		},
+		methods: {
+			//身份验证
+			async chemicalAioIdentityScanLogin(){
+				let self = this;
+				const {data} = await chemicalAioIdentityScanLogin(this.queryParams);
+				if(data.code == 200){
+					this.$set(this,'pageType',1)
+				}else{
+					this.$set(this,'pageType',2)
+				}
+			}, 
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.identityVerify {
+		margin: 0;
+		padding: 0;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		>img{
+			width: 200rpx;
+			height: 200rpx;
+			margin: 339rpx 0 48rpx 0;
+		}
+		.tip{
+			font-weight: 400;
+			font-size: 30rpx;
+			color: #3D3D3D;
+			line-height: 60rpx;
+			text-align: center;
+		}
+	}
+</style>

+ 16 - 3
pages/saoCode/saoCode.vue

@@ -4,17 +4,17 @@
         <web-view :src="baseUrl+'admin/#/codeHtml?code='+code+'&type='+type"></web-view>
     </view>
 </template>
-
 <script>
 	import { config } from '@/api/request/config.js'
     export default {
-
         name: "saoCode",
         data() {
             return {
 				baseUrl:config.base_url,
                 code:"",
                 type:"",
+                subId:"",
+				pageType:2,
             }
         },
 
@@ -29,11 +29,14 @@
               self.code = newList[1];
             }else if(newList[0] == 'type'){
               self.type = newList[1];
+            }else if(newList[0] == 'subId'){
+              self.subId = newList[1];
             }
           }
           if(!uni.getStorageSync('token')){
             uni.setStorageSync('saoCode',this.code);
             uni.setStorageSync('saoType',this.type);
+            uni.setStorageSync('saoSubId',this.subId);
             uni.redirectTo({
               url: '/pages/login',
             });
@@ -50,13 +53,19 @@
               uni.redirectTo({
                 url: '/pages/pages_patrolInspector/chemicalDetail?code='+this.code,
               });
+            }else if(this.type==11){//化学品身份识别验证
+              uni.redirectTo({
+                url: '/pages/pages_patrolInspector/identityVerify?code='+this.code+'&subId='+this.subId,
+              });
             }
           }
         }else{
           this.code = uni.getStorageSync('saoCode');
           this.type = uni.getStorageSync('saoType');
+          this.type = uni.getStorageSync('saoSubId');
           uni.removeStorageSync('saoCode');
           uni.removeStorageSync('saoType');
+          uni.removeStorageSync('saoSubId');
           if(this.type==7){//培训课程
             uni.redirectTo({
               url: '/pages/pages_patrolInspector/courseQRcode?code='+this.code,
@@ -69,7 +78,11 @@
             uni.redirectTo({
               url: '/pages/pages_patrolInspector/chemicalDetail?code='+this.code,
             });
-          }
+          }else if(this.type==11){//化学品身份识别验证
+              uni.redirectTo({
+                url: '/pages/pages_patrolInspector/identityVerify?code='+this.code+'&subId='+this.subId,
+              });
+            }
         }
       },
       mounted(){

+ 78 - 46
pages_basics/signature/signatureImg.vue

@@ -1,4 +1,4 @@
-<!-- 电子签名图片 -->
+<!-- 修改头像 -->
 <template>
 	<view class="avatar-page">
 		<view style="height:100%;width:100%;" v-if="src&&src!='null'">
@@ -7,8 +7,6 @@
 				:zoom="1"
 				:angle="0"
 				:src="src"
-				cutWidth='688rpx'
-				cutHeight='250rpx'
 				canvasBackground="red"
 				@cropped="cropped"
 				@afterDraw="afterDraw"
@@ -21,7 +19,7 @@
 
 <script>
     import { config } from '@/api/request/config.js'
-    import { querygenSign} from '@/api/apiDemo/index.js'
+    import { systemMineUserEdit } from '@/api/basicsModules/index.js'
 	import ImageCropper from '@/component/cropper.vue'
 	export default {
 		components: {
@@ -31,7 +29,6 @@
 			return {
 				src:"",
 				srcData:"",
-				signatureData:'',
 			}
 		},
 		onLoad(option){
@@ -42,7 +39,17 @@
 		},
 		methods:{
 			/************************************************修改头像************************************************/
-
+			selectImg() {
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['original'],
+					sourceType: ['album', 'camera'],
+					success: res => {
+						var tempFilePaths = res.tempFilePaths
+						this.src = tempFilePaths[0]
+					}
+				})
+			},
 			beforeDraw(context, transform) {
 				context.setFillStyle('yellow')
 				transform.zoom = 2
@@ -50,56 +57,81 @@
 			afterDraw(ctx, info) {
 				ctx.fillText('', 20, 20)
 			},
-			async cropped(imagePath, imageInfo) {
+			cropped(imagePath, imageInfo) {
 				this.srcData = imagePath;
-				//小程序电子签名抠图生成图片
-				uni.uploadFile({
-				    url: config.base_url+'/base/app/sysuser/api/genSign', //仅为示例,非真实的接口地址
-				    header:{'Authorization':uni.getStorageSync('token')},
-				    filePath: imagePath,
-				    name: 'file',
-				    formData: {
-				        'user': 'test'
-				    },
-				    success: (response) => {
-						let data=JSON.parse(response.data)
-						if(data.code == 200){
-							let text = data.data.replace(/[\r\n]/g,"");
-							this.signatureData = 'data:image/png;base64,'+ text;
-
-						} else {
-							uni.showToast({
-								title: response.msg,
-								icon:"none",
-								mask:true,
-								duration: 2000
-							});
-						}
-
-				    },
-				    fail: err => {},
-				    complete: () => {
-				        uni.hideLoading()
-				    }
-				});
-
 			},
 
 			/************************************************************************************************/
 			upImg(){
 				let self = this;
-			    uni.setStorageSync('signatureData',this.signatureData)
-				setTimeout(function(){
-				    uni.navigateBack();
-				},200);
-
-
+				uni.showModal({
+				    content: '确认提交吗?',
+				    cancelColor:"#999",
+				    confirmColor:"#0183FA",
+				    success: function (res) {
+				        if (res.confirm) {
+				            self.uploadImg(self.srcData);
+				        } else if (res.cancel) {
+				        }
+				    }
+				});
 			},
 			backButton(){
 				uni.navigateBack();
 			},
-
-
+			async uploadImg(tempFilePaths){
+				console.log(tempFilePaths)
+			    var self = this;
+			    uni.showLoading({
+			        title: '上传中',
+			        mask: true
+			    });
+			    uni.uploadFile({
+			        url: config.base_url+'/system/file/upload', //仅为示例,非真实的接口地址
+			        header:{'Authorization':uni.getStorageSync('token')},
+			        filePath: tempFilePaths,
+			        name: 'file',
+			        formData: {
+			            'user': 'test'
+			        },
+			        success: (uploadFileRes) => {
+			            let res = JSON.parse(uploadFileRes.data);
+						if(res.code == 200){
+							self.systemMineUserEdit(res.data.url);
+						}else{
+							uni.showToast({
+								title: res.msg,
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+						}
+			        },
+			        fail: err => {},
+			        complete: () => {
+			            uni.hideLoading()
+			        }
+			    });
+			},
+			//修改头像
+			async systemMineUserEdit(url){
+				let obj = {
+					userId:uni.getStorageSync('userId'),
+					avatar:url,
+				}
+				const {data} = await systemMineUserEdit(obj);
+				if(data.code == 200){
+					uni.showToast({
+						title:'上传成功',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+                    setTimeout(function(){
+                        uni.navigateBack();
+                    },2000);
+				}
+			},
 		}
 	}
 </script>

+ 12 - 10
pages_basics/faceImage.vue

@@ -4,7 +4,7 @@
         <view class="max-box">
             <view>添加照片</view>
             <img v-if="!imgUrl" class="img-add" src="@/images/basicsModules/icon_07.png" @click="selectImage">
-            <img v-if="imgUrl" mode="widthFix" class="img-box" :src="imgUrl">
+            <img v-if="imgUrl" mode="widthFix" class="img-box" :src="baseUrl+imgUrl">
         </view>
 		<view v-if="imgUrl" class="button-box" @click="selectImage">重新上传</view>
     </view>
@@ -16,7 +16,8 @@
     export default {
         data() {
             return {
-                imgUrl:"",
+				baseUrl:config.base_url,
+                imgUrl:uni.getStorageSync('faceImg'),
 
             }
         },
@@ -24,7 +25,7 @@
 
         },
 		onShow(){
-			this.mystudent();
+			//this.mystudent();
 		},
         methods: {
 			// 获取上传头像
@@ -50,23 +51,27 @@
                 });
             },
             async uploadImg(tempFilePaths){
+				console.log(tempFilePaths)
                 var self = this;
                 uni.showLoading({
                     title: '上传中',
                     mask: true
                 });
                 uni.uploadFile({
-                    url: config.base_url+'/base/app/lab/api/commit/face', //仅为示例,非真实的接口地址
-                    header:{'Authorization':uni.getStorageSync('token')},
+                    url: config.base_url+'/system/mine/user/face', 
+                    header:{
+						'Authorization':uni.getStorageSync('token'),
+						},
                     filePath: tempFilePaths,
                     name: 'file',
                     formData: {
-                        'file': 'test'
+                        'file': 'test',
+                        'userId': uni.getStorageSync('userId'),
                     },
                     success: (uploadFileRes) => {
                         let res = JSON.parse(uploadFileRes.data);
                         if(res.code == 200){
-							this.imgUrl = res.data.cardUrl
+							
                             uni.showToast({
                                 title: "识别成功",
                                 icon:"none",
@@ -84,9 +89,6 @@
                                 duration: 2000
                             });
                         }
-                        // let res = JSON.parse(uploadFileRes.data);
-                        // self.imgUrl = res.data.url;
-                        // self.commitFace();
                     },
                     fail: err => {},
                     complete: () => {

+ 0 - 415
pages_basics/fingerprint.vue

@@ -1,415 +0,0 @@
-<!-- 指纹 -->
-<template>
-	<view id="fingerprint">
-		<view class="fingerprint_one" v-if="pageType==1">
-			<view class="fingerprint_one_li" @click="goPage(item)" v-for="(item,index) in fingerprintList" :key="index">
-				<view class="fingerprint_one_li_l">{{item.name}}</view>
-				<view :class="item.isConfig?'colorB':'colorA'">{{item.isConfig?'已配置':'无'}}</view>
-				<img  class="fingerprint_one_li_r" src="@/images/basicsModules/icon_04.png">
-			</view>
-		</view>
-		<view class="tip_tow" v-if="pageType==2">
-			<view class="tip_tow_l">提醒</view>
-			<view class="tip_tow_l">请选中门禁点击【指纹采集】并在当前门禁上录入指纹</view>
-		</view>
-		<view class="fingerprint_tow" v-if="pageType==2">
-			<view class="input_tip">请选择可采集的指纹门禁:</view>
-			<input class="input_search"  type="text" v-model="dialogForm.searchValue" placeholder="请输入门禁名称" @blur="searchGuard()"/>
-			<view class="fingerprint_tow_border_li" v-for="(item2,index2) in yesUseList" @click="selectGuard(item2,index2)" :key="index2">
-				<view :class="item2.isCheck?'colorD':'colorC'">{{item2.subName +'+'+ item2.hardName}}</view>
-				<img  v-if="item2.isCheck" class="fingerprint_tow_border_li_r" src="@/images/basicsModules/icon_xzwt_xz.png">
-			</view>
-		</view>
-		<view v-if="pageType==1" class="tip_one">至少添加一个指纹才可以通过指纹开锁</view>
-		<view v-if="pageType==1" class="out-button" @click="fingerprintGtherSyncFun">确定</view>
-		<view v-if="pageType==2" class="out-button" @click="gather">指纹采集</view>
-		<!-- 指纹采集遮罩-->
-		  <view class="shade-outfire" v-if="dialogVisible">
-			<view class="null-box" @click="dialogClose()"></view>
-			<view class="shade-outfire-n">
-			  <view class="shade-outfire-n-t">门禁名称</view>
-			  <img  class="shade-outfire-n-t2" src="@/pages_basics/images/icon_zw_bk.png" />
-			  <img class="shade-outfire-n-m" src="@/pages_basics/images/icon_wd_zw.png" />
-			  <view class="shade-outfire-n-b">指纹采集中...</view>
-			</view>
-		  </view>
-	</view>
-</template>
-
-<script>
-    import { config } from '@/api/request/config.js'
-    import {fingerprintQeryMySubList,fingerprintGther,fingerprintQueryList,fingerprintGtherSync} from '@/api/apiDemo/index.js'
-	export default {
-
-		data() {
-			return {
-				//页面状态
-				pageType:1,
-				//签名
-				checked:true,
-				name:'',
-				dialogVisible:false,
-				dialogForm:{
-					searchValue:'',
-				},
-				fingerprintList:[
-					{
-						name:'第一个指纹',
-						num:1,
-						isConfig:false,
-					},
-					{
-						name:'第二个指纹',
-						num:2,
-						isConfig:false,
-					},
-					{
-						name:'第三个指纹',
-						num:3,
-						isConfig:false,
-					},
-					{
-						name:'第四个指纹',
-						num:4,
-						isConfig:false,
-					},
-					{
-						name:'第五个指纹',
-						num:5,
-						isConfig:false,
-					},
-				],
-				yesUseList:[],
-				fingerNum:null,//第几个指纹
-
-
-			}
-		},
-		onLoad() {
-			this.impowerUseList();
-			this.fingerprintClick();
-		},
-		onShow(){
-
-
-		},
-
-		methods: {
-			//指紋采集
-			gather(){
-				let rest=this.yesUseList.some(v=>v.isCheck==true)
-				if(rest){
-					this.dialogVisible=true;
-					this.fingerprintGtherFun()
-				}else{
-					uni.showToast({
-							mask:true,
-							icon:"none",
-							position:"center",
-							title: '请先选择门禁名称!',
-							duration: 3000
-						});
-				}
-
-			},
-		   dialogClose(){
-			   this.dialogVisible=false;
-		   },
-		   searchGuard(){
-			   this.impowerUseList();
-		   },
-		   selectGuard(d,index){
-			   let _this=this;
-			   //选中
-				d.isCheck=!d.isCheck
-				this.$set(this.yesUseList,index,d)
-			 //循环实现单选
-			  if(_this.yesUseList[index].isCheck==true){
-			    _this.yesUseList.forEach(function(item2) {
-			      if(item2.hardId==_this.yesUseList[index].hardId){
-			        item2.isCheck=true
-			      }else{
-			        item2.isCheck=false
-			      }
-			    })
-			  }
-		   },
-		   //查询用户指纹录取数据
-		   async fingerprintClick(){
-		   	let _this=this;
-		       const {data} = await fingerprintQueryList(uni.getStorageSync('userId'));
-				if(data.code == 200){
-					if(data.rows.length>0){
-						_this.fingerprintList.forEach(function(item){
-							data.rows.forEach(function(item2){
-								if(item.num==item2.fingerNum){
-									item.isConfig=true;
-								}
-							})
-						})
-					}
-				}
-		   },
-		   //指纹采集
-		   async fingerprintGtherFun(){
-		       let _this=this;
-			   let obj={}
-			   this.yesUseList.forEach(function(item){
-					  if(item.isCheck){
-						  obj.hardId=item.hardId
-						  obj.num=_this.fingerNum
-					  }
-			   })
-
-		       const {data} = await fingerprintGther(obj)
-				if(data.code == 200){
-					_this.dialogVisible=false;
-					_this.pageType=1;
-					_this.fingerprintClick();
-				}else if(data.code==500){
-					_this.dialogVisible=false;
-					uni.showToast({
-						mask:true,
-						icon:"none",
-						position:"center",
-						title: data.msg,
-						duration: 5000
-					});
-				}
-		   },
-		   //指纹同步
-		   async fingerprintGtherSyncFun(){
-		       let _this=this;
-		       const {data} = await fingerprintGtherSync(uni.getStorageSync('userId'))
-					if(data.code == 200){
-						uni.redirectTo({
-						    url: '/pages/mine',
-						});
-					}
-		   },
-			//查询当前用户已授权门禁列表
-			async impowerUseList(){
-				let _this=this;
-			    const {data} = await fingerprintQeryMySubList(_this.dialogForm)
-				if(data.code == 200){
-					_this.yesUseList=data.data;
-					_this.yesUseList.forEach(function(item){
-						item.isCheck=false;
-					})
-				}
-			},
-			//页面跳转
-            goPage(d){
-                this.pageType=2;
-				this.fingerNum=d.num;
-			},
-
-		},
-	}
-</script>
-
-<style lang="stylus" scoped>
-	#fingerprint{
-		height: 100%;
-		  width: 100%;
-		  display: flex;
-		  flex-direction: column;
-		  overflow-y: scroll;
-		.fingerprint_one{
-			width: 710rpx;
-			height: 507rpx;
-			background: #FFFFFF;
-			border-radius: 20rpx;
-			margin: 20rpx;
-			.fingerprint_one_li{
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				height: 100rpx;
-				margin: 0 20rpx;
-				border-bottom: 1px solid #E0E0E0;
-				.fingerprint_one_li_l{
-					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #333333;
-					text-align: left;
-					flex: 1;
-
-				}
-				.fingerprint_one_li_r{
-					width: 12rpx;
-					height: 24rpx;
-				}
-				.colorA{
-					font-size: 26rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-					text-align: right;
-					margin-right: 40rpx;
-					flex: 1;
-				}
-				.colorB{
-					font-size: 26rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #0183FA;
-					text-align: right;
-					margin-right: 40rpx;
-					flex: 1;
-				}
-			}
-			.fingerprint_one_li:last-child{
-				border-bottom: none;
-			}
-		}
-		.tip_tow{
-			margin: 10rpx 0;
-			.tip_tow_l{
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #FF0000;
-				line-height: 36rpx;
-				text-align: left;
-				margin-left: 36rpx;
-			}
-		}
-		.fingerprint_tow{
-			width: 710rpx;
-			background: #FFFFFF;
-			border-radius: 10px;
-			margin: 0 20rpx;
-			padding: 0 20rpx;
-			box-sizing: border-box;
-			overflow: hidden;
-			.input_tip{
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-				line-height: 30rpx;
-				margin: 34rpx 0;
-			}
-			.input_search{
-				width: 670rpx;
-				height: 80rpx;
-				background: #FFFFFF;
-				border: 1px solid #E0E0E0;
-				border-radius: 10rpx;
-				padding-left: 20rpx;
-				box-sizing: border-box;
-				margin-bottom: 32rpx;
-			}
-			.fingerprint_tow_border_li{
-				height: 100rpx;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				margin: 0 20rpx;
-				border-bottom: 1px solid #E0E0E0;
-				.fingerprint_tow_border_li_l{}
-				.fingerprint_tow_border_li_r{
-					width: 30rpx;
-					height: 20rpx;
-				}
-				.colorC{
-					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #333333;
-				}
-				.colorD{
-					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #0183FA;
-				}
-			}
-			.fingerprint_tow_border_li:last-child{
-				border-bottom: none;
-			}
-		}
-		.tip_one{
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FF0000;
-			line-height: 30rpx;
-			margin-top: 36rpx;
-			text-align: center;
-		}
-		.out-button{
-			position absolute
-			bottom:140rpx;
-			left:25rpx;
-			width:700rpx;
-			height:100rpx;
-			line-height:100rpx;
-			border-radius:10rpx;
-			text-align center
-			background #0183FA;
-			color:#FFFFFF;
-			font-size: 30rpx;
-			margin:0 auto;
-		}
-	    /* 指纹采集 */
-	    .shade-outfire {
-	      height: 100%;
-	      width: 100%;
-	      position: fixed;
-	      display: flex;
-	      flex-direction: column;
-	      z-index: 10;
-	      background: rgba(0, 0, 0, 0.2);
-	      .null-box {
-	        flex: 1;
-	      }
-	      .shade-outfire-n {
-	        width: 625rpx;
-	        height: 550rpx;
-	        background: #FFFFFF;
-	        border-radius: 20rpx;
-	        position: absolute;
-	        top: 370rpx;
-	        left: 62rpx;
-
-	        .shade-outfire-n-t {
-				 font-size: 30rpx;
-				 font-family: PingFang SC;
-				 font-weight: 500;
-				 color: #333333;
-				 text-align: center;
-				 margin-top: 32rpx;
-	        }
-			.shade-outfire-n-t2 {
-			  width: 182rpx;
-			  height: 202rpx;
-			  position: absolute;
-			  left: 222rpx;
-			  top: 106rpx;
-			}
-
-	        .shade-outfire-n-m {
-	          width: 84rpx;
-	          height: 108rpx;
-	          position: absolute;
-	          left: 266rpx;
-	          top: 150rpx;
-	        }
-
-	        .shade-outfire-n-b {
-				width: 100%;
-	         font-size: 30rpx;
-	         font-family: PingFang SC;
-	         font-weight: 500;
-	         color: #0183FA;
-			 text-align: center;
-			 position: absolute;
-			 top: 358rpx;
-	        }
-	      }
-	    }
-	  }
-</style>

+ 111 - 50
pages_basics/photoInspection.vue

@@ -15,28 +15,39 @@
 					</view>
 				</picker>
 			</view>
-			<view class="photo-max-box">
-			    <view class="photo-button" v-if="!newData.subUrl" @click="upImg('subUrl')">+ 添加</view>
-			    <img :src="baseUrl+newData.subUrl" v-else @click="upImg('subUrl')">
-			    <view class="photo-title">{{newData.sub}}</view>
-			</view>
-			<view class="photo-max-box">
-			    <view class="photo-button" v-if="!newData.garbageUrl" @click="upImg('garbageUrl')">+ 添加</view>
-			    <img :src="baseUrl+newData.garbageUrl" v-else @click="upImg('garbageUrl')">
-			    <view class="photo-title">{{newData.garbage}}</view>
-			</view>
-			<view class="photo-max-box">
-			    <view class="photo-button" v-if="!newData.dangerousUrl" @click="upImg('dangerousUrl')">+ 添加</view>
-			    <img :src="baseUrl+newData.dangerousUrl" v-else @click="upImg('dangerousUrl')">
-			    <view class="photo-title">{{newData.dangerous}}</view>
+			<!-- 有图片 -->
+			<view class="photo-b" v-if="pageType==1">
+				<view class="photo-max-box">
+				    <view class="photo-button" v-if="!newData.subUrl" @click="upImg('subUrl')">+ 添加</view>
+				    <img :src="baseUrl+newData.subUrl" v-else @click="upImg('subUrl')">
+				    <view class="photo-title">{{newData.sub}}</view>
+				</view>
+				<view class="photo-max-box">
+				    <view class="photo-button" v-if="!newData.garbageUrl" @click="upImg('garbageUrl')">+ 添加</view>
+				    <img :src="baseUrl+newData.garbageUrl" v-else @click="upImg('garbageUrl')">
+				    <view class="photo-title">{{newData.garbage}}</view>
+				</view>
+				<view class="photo-max-box">
+				    <view class="photo-button" v-if="!newData.dangerousUrl" @click="upImg('dangerousUrl')">+ 添加</view>
+				    <img :src="baseUrl+newData.dangerousUrl" v-else @click="upImg('dangerousUrl')">
+				    <view class="photo-title">{{newData.dangerous}}</view>
+				</view>
+				<view class="photo-max-box">
+				    <view class="photo-button" v-if="!newData.sourceRiskUrl" @click="upImg('sourceRiskUrl')">+ 添加</view>
+				    <img :src="baseUrl+newData.sourceRiskUrl" v-else @click="upImg('sourceRiskUrl')">
+				    <view class="photo-title">{{newData.sourceRisk}}</view>
+				</view>
 			</view>
-			<view class="photo-max-box">
-			    <view class="photo-button" v-if="!newData.sourceRiskUrl" @click="upImg('sourceRiskUrl')">+ 添加</view>
-			    <img :src="baseUrl+newData.sourceRiskUrl" v-else @click="upImg('sourceRiskUrl')">
-			    <view class="photo-title">{{newData.sourceRisk}}</view>
+			<!-- 无图片 -->
+			<view class="photo-b" v-if="pageType==2">
+				<view v-for="(item,index) in photoList"  @click="photoClick(item)" class="list-li" :class="!item.type?'color-A':'color-B'">
+					<view>{{item.name}}</view>
+					<img v-if="item.type" :src="item.icon">
+				</view>
 			</view>
+			
 		</view>
-		<view class="up-data-button" @click="upButton">提交</view>
+		<view class="up-data-button" @click="upButton">离开</view>
 		<helang-compress ref="helangCompress"></helang-compress>
     </view>
 	
@@ -56,7 +67,11 @@
                 newData:{},
 				buttonArray:[],
 				buttonArrayIndex:"",
-				
+				pageType:2,
+				photoList:[
+					{type:false,name:'实验室照片',icon:require('@/images/basicsModules/icon_pzjc_xz.png')},
+					{type:false,name:'垃圾桶清理后照片',icon:require('@/images/basicsModules/icon_pzjc_xz.png')},
+					],
 				params: {
 					maxSize: 400,
 					fileType: 'png',
@@ -74,6 +89,9 @@
 			this.outSubjectList();
         },
         methods: {
+			photoClick(item){
+				item.type=!item.type;
+			},
 			buttonChange(e){
 				console.log("e",e.mp.detail.value);
 				this.buttonArrayIndex = e.mp.detail.value;
@@ -240,45 +258,57 @@
 		.photInspection-max{
 			flex:1;
 			padding-bottom:40rpx;
-			overflow-y:scroll;
-			.photo-max-box{
-			    width:702rpx;
-			    height:422rpx;
-			    border-radius: 20rpx;
-			    background: #FFFFFF;
-			    border:4rpx dashed #E0E0E0;
-			    margin:20rpx 20rpx 0;
-			    .photo-button{
-			        height:336rpx;
-			        width:702rpx;
-			        color: #999999;
-			        font-size:30rpx;
-			        line-height 336rpx
-			        text-align center
-			    }
-			    img{
-			        height:336rpx;
-			        width:702rpx;
-			        border-top-left-radius :20rpx
-			        border-top-right-radius :20rpx
-			    }
-			    .photo-title{
-			        border-top:4rpx dashed #E0E0E0;
-			        line-height:82rpx;
-			        color: #333333;
-			        font-size: 30rpx;
-			        padding-left:28rpx;
-			    }
+			.photo-b{
+				overflow-y:scroll;
+				position: absolute;
+				top: 140rpx;
+				.photo-max-box{
+				    width:702rpx;
+				    height:422rpx;
+				    border-radius: 20rpx;
+				    background: #FFFFFF;
+				    border:4rpx dashed #E0E0E0;
+				    margin:20rpx 20rpx 0;
+				    .photo-button{
+				        height:336rpx;
+				        width:702rpx;
+				        color: #0183FA;
+				        font-size:30rpx;
+				        line-height 336rpx
+				        text-align center
+				    }
+				    img{
+				        height:336rpx;
+				        width:702rpx;
+				        border-top-left-radius :20rpx
+				        border-top-right-radius :20rpx
+				    }
+				    .photo-title{
+				        border-top:4rpx dashed #E0E0E0;
+				        line-height:82rpx;
+				        color: #333333;
+				        font-size: 30rpx;
+				        padding-left:28rpx;
+				    }
+				}
 			}
+			
 			.null-view-box{
 			    text-align center;
 			    line-height:100rpx;
 			    color:#999;
 			    font-size:26rpx;
 			}
+			.photo-b{
+				padding-bottom: 140rpx;
+			}
 			.picker-max-box{
-				margin:20px 0;
+				width: 100%;
+				padding:20rpx 0;
 				display:flex;
+				background: #FFFFFF;
+				position: fixed;
+				z-index: 100;
 				.picker-title-box{
 					padding:0 20rpx;
 					display flex
@@ -320,6 +350,35 @@
 					}
 				}
 			}
+			.list-li{
+				width: 690rpx;
+				height: 100rpx;
+				background: #FFFFFF;
+				border-radius: 20rpx 20rpx 20rpx 20rpx;
+				display: flex;
+				justify-content: space-between;
+				margin: 20rpx 20rpx 0;
+				>view{
+					font-weight: 400;
+					font-size: 30rpx;
+					color: #333333;
+					line-height: 100rpx;
+					text-align: left;
+					padding-left: 28rpx;
+				}
+				>img{
+					width: 60rpx;
+					height: 60rpx;
+					margin-top: 44rpx;
+				}
+				
+			}
+			.color-A{
+				border: 2rpx dotted #E0E0E0;
+			}
+			.color-B{
+				border: 2rpx dotted #0183FA;
+			}
 		}
 		.up-data-button{
 			width: 750rpx;
@@ -329,6 +388,8 @@
 			text-align center
 			color:#fff;
 			font-size: 30rpx;
+			position: fixed;
+			bottom: 0;
 		}
     }
 </style>

+ 0 - 272
pages_basics/signature/signature.vue

@@ -1,272 +0,0 @@
-<!-- 电子签名 -->
-<template>
-	<view id="signature">
-		<view class="signature_li">
-			<view class="signature_li_t">示例:</view>
-			<view class="signature_li_b">
-				<img src="@/pages_basics/images/img_dzqm_sl.png">
-			</view>
-		</view>
-		<view class="tip">请上传白字黑子正楷签名</view>
-		<view class="signature_li">
-			<view  class="signature_li_t">上传签名:</view>
-			<view  class="signature_li_b">
-				<view class="signature_li_b_c" @click="selectImage"><span v-if="!signatureData">点击上传签名</span></view>
-				<img class=".signature_li_img2" :src="signatureData">
-			</view>
-			<view class="clear_signature" @tap="signatureDele()">
-				<img class="clear_signature_img" src="@/images/basicsModules/icon_fjgk_sc.png" />
-				<text>清除</text>
-			</view>
-			<view class="upload_tip">请严格按照示例上传正楷签名并置于框内</view>
-		</view>
-		<view class="signature_li">
-			<view  class="signature_li_t" style="margin-top: 20rpx;">已上传的签名:</view>
-			<image class="signature_li_img" :src="alreadyImg"></image>
-
-		</view>
-		<view class="save_btn" @click="saveFun()">保存</view>
-	</view>
-
-</template>
-
-<script>
-    import { config } from '@/api/request/config.js'
-    import { logout,studentinfoFacemy,simpleInfo,getSafeWarnList,getMyPointsLogInfo,updateSignature} from '@/api/apiDemo/index.js'
-	export default {
-
-		data() {
-			return {
-				baseUrl:config.base_url,
-				signatureData:'',
-				alreadyImg:'',
-
-			}
-		},
-		onLoad(option) {
-			//首次进入获取上个页面传过来的签名
-			this.alreadyImg = this.baseUrl+option.item;
-			console.log(this.alreadyImg)
-		},
-		onShow(){
-			//用户点击上传签名
-			if(uni.getStorageSync('signatureData')){
-				this.signatureData = uni.getStorageSync('signatureData');
-				uni.removeStorageSync('signatureData')	;
-			}
-		},
-		methods: {
-			//清除签名
-			async signatureDele(){
-				let _this=this;
-				this.signatureData='';
-				this.alreadyImg='';
-			},
-			//保存按钮
-			async saveFun(){
-				let _this=this;
-
-				if(!this.signatureData){
-
-					uni.showToast({
-						title:'请先选择签名上传并保存查看',
-						icon:"none",
-						mask:true,
-						duration: 2000
-					});
-					return
-				}
-				 var  arr = this.signatureData.split(',')
-				 let obj={
-					 signature:arr[1]
-				 }
-				 const {data} = await updateSignature(obj);
-				 if(data.code == 200){
-				 	uni.showToast({
-				 		title:'上传成功',
-				 		icon:"none",
-				 		mask:true,
-				 		duration: 2000
-				 	});
-					setTimeout(function(){
-						uni.navigateBack()
-					},2000);
-					// uni.switchTab({
-					//      url: '/pages/mine'
-					//  });
-
-				 }
-
-			},
-		// 头像上传
-		selectImage() {
-		    let self = this;
-		    wx.chooseImage({
-		        count: 1,
-		        sizeType: ["original", "compressed"],
-		        sourceType: ["album", "camera"],
-		        success: function(res) {
-					console.log("res1",res)
-		            let tempFilePaths = res.tempFilePaths[0];
-		            self.uploadImg(tempFilePaths);
-		        }
-		    });
-		},
-		async uploadImg(tempFilePaths){
-		    var self = this;
-		    uni.showLoading({
-		        title: '上传中',
-		        mask: true
-		    });
-		    uni.uploadFile({
-		        url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
-		        header:{'Authorization':uni.getStorageSync('token')},
-		        filePath: tempFilePaths,
-		        name: 'file',
-		        formData: {
-		            'user': 'test'
-		        },
-		        success: (uploadFileRes) => {
-		            let res = JSON.parse(uploadFileRes.data);
-					if(res.code == 200){
-						uni.navigateTo({
-							url: '/page_basics/signature/signatureImg?src='+config.base_url+res.data.url,//电子签名-图片处理
-						});
-					}else{
-						uni.showToast({
-							title: res.msg,
-							icon:"none",
-							mask:true,
-							duration: 2000
-						});
-					}
-		        },
-		        fail: err => {},
-		        complete: () => {
-		            uni.hideLoading()
-		        }
-		    });
-		},
-	   },
-	}
-</script>
-
-<style lang="stylus" scoped>
-	#signature{
-	 width: 710rpx;
-	 height: auto;
-	 background: #FFFFFF;
-	 border-radius: 20rpx;
-	 margin :20rpx 20rpx 0;
-	 padding :28rpx 20rpx 94rpx;
-	 box-sizing :border-box;
-	 .tip{
-		 width :100%;
-		 font-size: 24rpx;
-		 font-family: PingFang SC;
-		 font-weight: 500;
-		 color: #999999;
-		 line-height: 24rpx;
-		 margin :24rpx 0 42rpx 0;
-		 text-align :center;
-	 }
-	 .signature_li{
-		.signature_li_t{
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #333333;
-			line-height: 28rpx;
-
-		}
-		.signature_li_b{
-			position :relative;
-			margin-top :28rpx;
-			width: 668rpx;
-			height: 250rpx;
-			background: #FFFFFF;
-			border: 1px solid #E0E0E0;
-			border-radius: 10rpx;
-			text-align :center;
-			>img{
-				display :inline-block;
-				width: 192rpx;
-				height: 60rpx;
-				margin-top :90rpx;
-			}
-			.signature_li_b_c{
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #0183FA;
-				line-height: 250rpx;
-				cursor :pointer;
-				position :relative;
-				z-index :200;
-			}
-			.signature_li_img2{
-				position :absolute;
-				left :0;
-				top:0;
-				z-index :100;
-				width: 668rpx;
-				height: 250rpx;
-				margin :0;
-			}
-
-		}
-		.signature_li_img{
-			margin-top :28rpx;
-			width: 668rpx;
-			height: 250rpx;
-			background: #FFFFFF;
-			border: 1px solid #E0E0E0;
-			border-radius: 10rpx;
-			text-align :center;
-		}
-		.upload_tip{
-			width :100%;
-			font-size: 24rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #999999;
-			line-height: 24rpx;
-			margin :24rpx 0 42rpx 0;
-			text-align :center;
-		}
-	    .clear_signature{
-			height: 30rpx;
-			margin: 20rpx 0;
-			display: flex;
-			justify-content: flex-end;
-			.clear_signature_img{
-				width: 30rpx;
-				height: 30rpx;
-				margin-right: 10rpx;
-			}
-			>text{
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #A2A2A2;
-				line-height: 30rpx;
-			}
-		}
-	 }
-	 /* 保存按钮*/
-	  .save_btn{
-	 	 width: 650rpx;
-	 	 height: 100rpx;
-	 	 background: #0183FA;
-	 	 border-radius: 20px;
-	 	 font-size: 28rpx;
-	 	 font-family: PingFang SC;
-	 	 font-weight: 500;
-	 	 color: #FFFFFF;
-	 	 line-height: 100rpx;
-	 	 text-align :center;
-	 	 margin-top :44rpx;
-	  }
-	}
-
-</style>

+ 73 - 86
pages_manage/accessQualification/accessQualification.vue

@@ -9,31 +9,30 @@
 			</picker>
 		</view>
         <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-			<view class="for-big-box" v-for="(item,index) in infoList" :key="index">
-			    <view class="for-time-p">{{item.creatTime}}</view>
+			<view class="for-big-box" v-for="(item,index) in dataList" :key="index">
+			    <view class="for-time-p">{{item.titleCreatTime}}</view>
 			    <img class="for-back-img" src="@/images/basicsModules/for_min_bg.png">
 			    <view class="for-list-box" @click="goPageInfo(minItem)"
-				v-for="(minItem,indexTwo) in item.applyList" :key="indexTwo">
+				v-for="(minItem,indexTwo) in item.subList" :key="indexTwo">
 			        <view class="min-for-box-one">
 						<view :class="minItem.auditStatus==1?'titleType1':(minItem.auditStatus==0?'titleType2':(minItem.auditStatus==2?'titleType3':''))">{{minItem.auditStatus==1?'未通过':(minItem.auditStatus==0?'待审核':(minItem.auditStatus==2?'已通过':''))}}</view>
-						<view>{{minItem.subjectName}}</view>
+						<view>{{minItem.subName}}</view>
 					</view>
 					<view class="min-for-box-two">
 						<view></view>
 						<view>申请人:{{minItem.userName}}</view>
-						<view>{{minItem.hi}}</view>
+						<view>{{minItem.creatTime}}</view>
 					</view>
 			    </view>
 			</view>
             <view class="get-null-box" v-if="getData.nullDataType">暂无更多数据</view>
         </scroll-view>
 		<view class="tip">请联系管理员开通<text>白名单</text>来获取实验室准入资格</view>
-       <!-- <view class="bottom-button-box" @click="goSafeAccess">我的准入</view> -->
     </view>
 </template>
-
 <script>
-    import { applyList } from '@/api/apiDemo/index.js'
+    import { parseTime } from '@/component/public.js'
+    import { laboratoryAppletAuditListByApply } from '@/api/manage/index.js'
     export default {
         data() {
             return {
@@ -47,105 +46,93 @@
 				buttonArrayIndex:0,
 				auditStatus:"",
                 //列表请求参数
-                getData:{
-                    page:1,
-                    pageSize:20,
-                    getType:true,
-                    nullDataType:true,
-                },
-                infoList:[],
+				queryParams: {
+				  page: 1,
+				  pageSize: 20,
+				},
+				total:0,
+				dataList:[],
+				
             }
         },
         onLoad() {
 
         },
         onShow(){
-            this.clearData();
+			this.clearData();
             this.getList();
         },
+		mounted() {
+			
+		},
         methods: {
-			goSafeAccess(){
-				uni.navigateTo({
-					url: '/pages_student/workbench/safeAccess/safeAccess',
-				});
+			//清除
+			clearData(){
+				this.dataList = [];
+				this.queryParams.page = 1;
 			},
-            //清除
-            clearData(){
-                this.infoList = [];
-                this.getData.page = 1;
-                this.getData.getType = true;
-                this.getData.nullDataType = true;
-            },
             //去详情页
             goPageInfo(item){
-                // uni.navigateTo({
-                //     url:'/pages_manage/workbench/accessQualification/accessQualificationInfo?item='+encodeURIComponent(JSON.stringify(item))+'&type='+encodeURIComponent(JSON.stringify(this.tabIndex))
-                // })
                 uni.navigateTo({
-                    url:'/page_manage/accessQualification/accessQualificationInfo?item='+encodeURIComponent(JSON.stringify(item))
+                    url:'/pages_manage/accessQualification/accessQualificationInfo?item='+encodeURIComponent(JSON.stringify(item))
                 })
             },
-            //滚动事件
-            scrollGet(){
-                if(this.getData.getType){
-                    this.getData.page += 1;
-                    this.getList();
-                }
-            },
-            //获取头部数量数据
-            async getTabData(){
-                console.log("123")
-                const {data} = await getApprovalCount()
-                if(data.code == 200){
-                    this.tabData = data.data;
-                }
-            },
+           //滚动事件
+           scrollGet(){
+				let self=this;
+				if(self.total/self.queryParams.pageSize<=self.queryParams.page){
+					console.log('没有更多数据!')
+				}else{
+						setTimeout(function(){
+							self.queryParams.page += 1;
+							self.getList();
+						},1000)
+				
+				}
+           	
+           },
 			//选择
 			buttonChange(e){
+				this.clearData()
 				this.buttonArrayIndex = e.detail.value;
-                this.infoList = [];
-                this.getData.page = 1;
-                this.getData.getType = true;
-                this.getData.nullDataType = true;
 				this.$set(this,'auditStatus',this.buttonArray[this.buttonArrayIndex].id);
 				this.getList();
 			},
-            //获取列表数据
-            async getList(){
-                let self = this;
-                let obj = {
-                    pageNum:this.getData.page,
-                    pageSize:this.getData.pageSize,
-					auditStatus:this.auditStatus
-                }
-                const {data} = await applyList(obj)
-                if(data.code==200){
-                    if(self.page==1){
-                        if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
-                            self.infoList = data.rows;
-                        }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
-                            self.infoList = data.rows;
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }else{
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }
-                    }else{
-                        if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
-                            self.infoList = self.infoList.concat(data.rows)
-                        }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
-                            self.infoList = self.infoList.concat(data.rows);
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }else{
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }
-                    }
-                }
-
-            },
+			//获取列表数据
+			async getList(){
+			    let self = this;
+				this.$set(this.queryParams,'auditStatus',this.auditStatus)
+			    const {data} = await laboratoryAppletAuditListByApply(this.queryParams);
+			    if(data.code==200){
+					//定义一个空数组
+					let newArr = [];
+					//通过forEach循环数组
+					data.data.records.forEach((item, i) => {
+						item.creatTime=parseTime(item.creatTime,"{h}:{i}")
+						let index = -1;
+						//然后在跑到这里筛选 根据不同的时间放置不同的数组    some()用来查找数组中是否存在某个值  如果存在 就return true
+						let isExists = newArr.some((newItem, j) => {
+							if(item.titleCreatTime == newItem.titleCreatTime) {
+								index = j;
+								return true;
+							}
+						})
+						//代码是先跑这里的if条件判读  
+						if(!isExists) {
+							newArr.push({
+								titleCreatTime: item.titleCreatTime,
+								subList: [item]
+							})
+						} else {
+							newArr[index].subList.push(item);
+						}
+					})
+					this.dataList=[...this.dataList,...newArr]
+					this.total=data.data.total;
+				}   
+			},
+            
+            
         }
     }
 </script>

+ 92 - 126
pages_manage/accessQualification/accessQualificationInfo.vue

@@ -1,57 +1,57 @@
 <!-- 准入资格申请详情 -->
 <template>
-    <view id="accessQualificationInfo" v-if="pageType">
+    <view id="accessQualificationInfo">
 		<view class="user-info-box">
 			<view class="user-info-box-min">
 				<view>实验室:</view>
-				<view>{{subjectData.labSecurityApply.subjectName}}</view>
+				<view>{{newData.labSecurityApply.subName}}</view>
 			</view>
 			<view class="user-info-box-min">
 				<view>申请人:</view>
-				<view>{{subjectData.labSecurityApply.userName}}</view>
+				<view>{{newData.labSecurityApply.userName}}</view>
 			</view>
 			<view class="user-info-box-min">
 				<view>申请时限:</view>
-				<view>{{subjectData.labSecurityApply.validBeginTime}}至{{subjectData.labSecurityApply.validEndTime}}</view>
+				<view>{{newData.labSecurityApply.validBeginTime}}至{{newData.labSecurityApply.validEndTime}}</view>
 			</view>
 			<view class="user-info-box-min">
 				<view>申请备注:</view>
-				<view>{{subjectData.labSecurityApply.applyCause==null?'':subjectData.labSecurityApply.applyCause}}</view>
+				<view>{{newData.labSecurityApply.applyCause==null?'':newData.labSecurityApply.applyCause}}</view>
 			</view>
 		</view>
 		<view class="user-info-box">
 			<view class="user-info-box_title"><view style="color: red;">*</view>身份信息:(关联学生信息材料)</view>
 			<view class="user-info-box-min">
 				<view>申请人:</view>
-				<view>{{subjectData.sysUser.nickName}}</view>
+				<view>{{newData.sysUser.userName}}</view>
 			</view>
 			<view class="user-info-box-min">
 				<view>联系电话:</view>
-				<view>{{subjectData.sysUser.phonenumber}}</view>
+				<view>{{newData.sysUser.mobile}}</view>
 			</view>
 			<view class="user-info-box-min" >
 				<view>学号:</view>
-				<view>{{subjectData.sysUser.userName}}</view>
+				<view>{{newData.sysUser.account}}</view>
 			</view>
 			<view class="user-info-box-min">
 				<view>物理卡号:</view>
-				<view>{{subjectData.sysUser.cardNum}}</view>
+				<view>{{newData.sysUser.cardNum}}</view>
 			</view>
 			<view class="user-info-box-min" >
 				<view>班级:</view>
-				<view>{{subjectData.sysUser.grade}}</view>
+				<view>{{newData.sysUser.gradeName}}</view>
 			</view>
 			<view class="user-info-box-min" >
 				<view>导师:</view>
-				<view>{{subjectData.sysUser.tutorUserName}}</view>
+				<view>{{newData.sysUser.tutorUserName}}</view>
 			</view>
 		</view>
-		<view v-for="(item,index) in subjectData.listTemp" :key="index" style="overflow: hidden;">
-			<view class="img-box" v-if="item.materialType==2&&item.relationType==2">
+		<view v-for="(item,index) in newData.listTemp" :key="index" style="overflow: hidden;">
+			<!-- <view class="img-box" v-if="item.materialType==2&&item.relationType==2">
 				<view class="img-title">安全考试证书</view>
-				<img v-if="subjectData.listcert[0]" class="item-img-box" :src="subjectData.listcert[0].cert_url">
-				<view v-if="!subjectData.listcert[0]" style="margin-left:40px;color:#999;font-size:14px;">暂无证书</view>
-			</view>
+				<img v-if="newData.listcert[0]" class="item-img-box" :src="newData.listcert[0].cert_url">
+				<view v-if="!newData.listcert[0]" style="margin-left:40px;color:#999;font-size:14px;">暂无证书</view>
+			</view> -->
 			<view class="word-box" v-if="item.materialType==1">
 				<view class="word-box-title">{{item.materialName}}</view>
 				<view class="word-box-min" v-for="(minItem,minIndex) in item.upList" :key="minIndex" @click="lookItem(minItem)">
@@ -62,7 +62,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="bottom-button-box" v-if="subjectData.labSecurityApply.auditStatus == 0">
+		<view class="bottom-button-box" v-if="newData.labSecurityApply.auditStatus == 0">
 			<view @click="goReviewFailed">审核未通过</view>
 			<view @click="accessButtonClick">审核通过</view>
 		</view>
@@ -73,6 +73,7 @@
 
      import { config } from '@/api/request/config.js'
     import { getDetails,laboratoryApply } from '@/api/apiDemo/index.js'
+    import { laboratoryAppletGetApplyDetails,laboratoryAppletEditApp} from '@/api/manage/index.js'
     export default {
         data() {
             return {
@@ -80,44 +81,23 @@
 				pageType:false,
 				//获取数据
 				subjectData:{},
-				newData:{
-					text1:"甲烷监测实验室",
-					text2:"曹秀康",
-					text3:"学生",
-					text4:"2022-01-11  14:56",
-					text5:"曹秀康",
-					text6:"24141534553",
-					text7:"安全工程学院",
-					text8:"安全科学与工程专业",
-					textlist1:[
-						'https://img1.baidu.com/it/u=1349023829,1710986137&fm=253&fmt=auto&app=138&f=JPEG?w=786&h=500',
-						'https://img1.baidu.com/it/u=1349023829,1710986137&fm=253&fmt=auto&app=138&f=JPEG?w=786&h=500',
-						'https://img1.baidu.com/it/u=1349023829,1710986137&fm=253&fmt=auto&app=138&f=JPEG?w=786&h=500',
-					],
-					textlist2:[
-						{
-							type:1,
-							name:"信息照片副本.pdf",
-						},
-						{
-							type:2,
-							name:"信息照片副本.word",
-						},
-					],
-				},
+				newData:{},
                 itemData:{},
                 type:0,
+				applyId:'',
             }
         },
         onLoad(option) {
             this.infoData = JSON.parse(decodeURIComponent(option.item));
+			this.applyId=JSON.parse(decodeURIComponent(option.item)).applyId;
+			this.laboratoryAppletGetApplyDetails();
             //修改页面title
             uni.setNavigationBarTitle({
                 title:this.infoData.auditStatus==0?'待审核':(this.infoData.auditStatus==1?'未通过':(this.infoData.auditStatus==2?'已通过':''))
             });
         },
 		onShow(){
-			this.getDetails()
+			
 		},
         methods: {
 			//审核按钮
@@ -129,19 +109,19 @@
 				    confirmColor:"#0183FA",
 				    success: function (res) {
 				        if (res.confirm) {
-				            self.laboratoryApply();
+				            self.laboratoryAppletEditApp();
 				        } else if (res.cancel) {
 				        }
 				    }
 				});
 			},
 			//审核接口
-			async laboratoryApply(){
+			async laboratoryAppletEditApp(){
 				let obj = {
-				  id:this.subjectData.labSecurityApply.id,
+				  applyId:this.newData.labSecurityApply.applyId,
 				  auditStatus:2,
 				};
-				const {data} = await laboratoryApply(obj)
+				const {data} = await laboratoryAppletEditApp(obj)
 				if(data.code == 200){
 					uni.showToast({
 						title: '审核成功',
@@ -213,43 +193,14 @@
 					})
 				}
 			},
-            //获取安全准入审批记录详细信息(用户端)
-            async getDetails() {
-                let self = this;
-                const {data} = await getDetails({id:this.infoData.id})
-                if(data.code==200){
-				  for(let i=0;i<data.data.listTemp.length;i++){
-					if(data.data.listTemp[i].materialType == 1){
-					  let maxList = [];
-					  for(let o=0;o<data.data.listTemp[i].listMr.length;o++){
-						let bigList = data.data.listTemp[i].listMr[o].dataUrl.split(',');
-						for(let x=0;x<bigList.length;x++){
-						  if(bigList[x]){
-							let minList = bigList[x].split(';');
-							let minListTwo = minList[0].split('.')
-							let obj = {
-							  name:minList[0],
-							  url:minList[1],
-							  type:minListTwo[1]
-							};
-							maxList.push(obj);
-						  }
-						}
-					  }
-					  data.data.listTemp[i].upList = maxList;
-					}
-				  }
-				  this.$set(this,"subjectData",data.data);
-				  this.pageType = true;
-                }
-            },
+            
 			goReviewFailed(){
 				let obj = {
-				  id:this.subjectData.labSecurityApply.id,
-				  rejectCause:this.subjectData.listTemp,
+				  applyId:this.newData.labSecurityApply.applyId,
+				  rejectCause:this.newData.listTemp,
 				}
 				uni.navigateTo({
-				    url:'/page_basics/accessQualification/approve?item='+encodeURIComponent(JSON.stringify(obj))
+				    url:'/pages_manage/accessQualification/approve?item='+encodeURIComponent(JSON.stringify(obj))
 				})
 			},
 			//查看图片
@@ -265,54 +216,69 @@
 					complete: function(res) {},
 				})
 			},
-            approveClick(){
-                let self = this;
-                uni.showModal({
-                    // title: '确认要退出吗?',
-                    content: '确认审核通过吗?',
-                    cancelColor:"#999",
-                    confirmColor:"#0183FA",
-                    success: function (res) {
-                        if (res.confirm) {
-                            self.appOperation();
-                        } else if (res.cancel) {
-                        }
-                    }
-                });
-            },
-            async appOperation(){
-                let self = this;
-                let obj = {
-                    id:this.itemData.id,
-                    recordContent:1,
-                };
-                const {data} = await appOperation(obj);
-                if(data.code == 200){
-                    uni.showToast({
-                        title: '提交成功',
-                        icon:"none",
-                        mask:true,
-                        duration: 2000
-                    });
-                    setTimeout(function(){
-                        uni.navigateBack();
-                    },2000);
-                }
-            },
-            async approvalDetailManage(){
-                let obj = {
-                    ids:this.itemData.id
-                }
-                const {data} = await approvalDetailManage(obj)
+            
+			//审核信息详情
+            async laboratoryAppletGetApplyDetails(){
+                const {data} = await laboratoryAppletGetApplyDetails({applyId:this.applyId})
                 if(data.code == 200){
-                    this.newData = data.data;
+					let self=this;
+					let dataList = [];
+					for(let i=0;i<data.data.listTemp.length;i++){
+					  if(data.data.listTemp[i].materialType == 2 && data.data.listTemp[i].materialType == 2){
+						dataList.unshift(data.data.listTemp[i]);
+					  }
+					}
+					for(let i=0;i<data.data.listTemp.length;i++){
+					  if(data.data.listTemp[i].materialType == 1){
+						dataList.push(data.data.listTemp[i]);
+					  }
+					}
+					for(let i=0;i<data.data.listTemp.length;i++){
+					  if(data.data.listTemp[i].materialType == 2 && data.data.listTemp[i].materialType == 1){
+						dataList.unshift(data.data.listTemp[i]);
+					  }
+					}
+					this.$set(data.data,'listTemp',dataList);
+					let newList = [];
+					for(let i=0;i<data.data.listTemp.length;i++){
+					  if(data.data.listTemp[i].materialType == 1){
+						let maxList = [];
+						for(let o=0;o<data.data.listTemp[i].listMr.length;o++){
+						  let bigList = data.data.listTemp[i].listMr[o].dataUrl.split(',');
+						  for(let x=0;x<bigList.length;x++){
+							if(bigList[x]){
+							  let minList = bigList[x].split(';');
+							  let typeList= minList[0].split('.');
+							  let obj = {
+								name:minList[0],
+								url:minList[1],
+								type:typeList[1],
+							  };
+							  maxList.push(obj);
+							}
+						  }
+						}
+						data.data.listTemp[i].upList = maxList;
+						let obj ={};
+						if(maxList.length>0){
+						  obj = {
+							forIndex:0,
+							url:self.baseUrl+maxList[0].url
+						  }
+						}
+						newList.push(obj);
+					  }else{
+						let obj = {
+						  forIndex:"",
+						  url:""
+						}
+						newList.push(obj);
+					  }
+					}
+					this.$set(this,'newData',data.data)
+					console.log(this.newData)
                 }
-            },
-            //去不通过原因页面
-            goPageInfo(item){
-                uni.navigateTo({
-                    url:'/pages_manage/workbench/accessQualification/approve?item='+encodeURIComponent(JSON.stringify(this.itemData))
-                })
+				
             },
         }
     }

+ 3 - 11
pages_manage/accessQualification/approve.vue

@@ -19,6 +19,7 @@
         },
         onLoad(option) {
 			let self = this;
+			console.log(this.itemData)
             this.itemData = JSON.parse(decodeURIComponent(option.item));
 			for(let i=0;i<self.itemData.rejectCause.length;i++){
 				self.itemData.rejectCause[i].type = false
@@ -33,18 +34,9 @@
 				for(let i=0;i<self.itemData.rejectCause.length;i++){
 					if(self.itemData.rejectCause[i].type){
 						num++
-						this.checkList.push(self.itemData.rejectCause[i].id);
+						this.checkList.push(self.itemData.rejectCause[i].materialId);
 					}
 				}
-				/* if(num == 0){
-					uni.showToast({
-						title: '请勾选未通过材料',
-						icon:"none",
-						mask:true,
-						duration: 2000
-					});
-					return
-				} */
 				if(!self.rejectCause){
 					uni.showToast({
 						title: '请输入驳回原因',
@@ -71,7 +63,7 @@
 			//审核接口
 			async laboratoryApply(){
 				let obj = {
-				  id:this.itemData.id,
+				  applyId:this.itemData.applyId,
 				  auditStatus:1,
 				  rejectCause:this.rejectCause,
 				  rejectMaterial:this.checkList + '',

+ 7 - 5
pages_manage/emergencyEvacuationBig.vue

@@ -1050,12 +1050,15 @@ export default {
       this.$set(this,'pageType',2);
       this.getDeviceList();
       this.laboratoryInfo();
+	   console.log(1111)
 	  this.$set(this,'fireStartType',false);
 	  if(this.conductCountdown){
 	   this.clearTimer2()
 	    this.$set(this,'conductCountdown',null);
 	  }
       this.firedeviceStatus();
+	 
+	  this.getRedisEvacuation();
 
     },
     //执行疏散
@@ -1143,12 +1146,11 @@ export default {
           this.$set(this, 'mapList', JSON.parse(JSON.stringify(list)));
           // this.$set(this, 'shadeMapList', JSON.parse(JSON.stringify(list)));
           this.$set(this, 'mapType', true);
-          setTimeout(function() {
-            self.getRedisEvacuation();
-          }, 500);
           this.selectTriggerInfo(3);
-
         }
+		  setTimeout(function() {
+			self.getRedisEvacuation();
+		  }, 500);
       }
     },
     //获取疏散数据
@@ -1491,7 +1493,7 @@ export default {
       }
     },
 	videoErrorCallback(e){
-	  console.log("播放失败",e);
+	  //console.log("播放失败",e);
 	  // uni.showToast({
 	  //     title: '视频播放失败',
 	  //     icon:"none",

+ 5 - 2
pages_manage/laboratory/airConditioning.vue

@@ -8,8 +8,8 @@
 				<view>{{switchStatus==0?'空调未开启':'空调已开启'}}</view>
 				<view @click="switchFun()" :class="switchStatus==0?'color-A':'color-B'">{{switchStatus==0?'开启':'关闭'}}</view>
 			</view>
-			<view class="panel-m">
-				<view :class="keystrokeIndex==index?'color-C':''" v-for="(item,index) in keystrokeData">{{item}}</view>
+			<view class="panel-m" >
+				<view @click="temperatureFun(index)" :class="keystrokeIndex==index?'color-C':''" v-for="(item,index) in keystrokeData">{{item}}</view>
 			</view>
 			<view class="panel-b">
 				<view @click="subtract">-</view>
@@ -60,6 +60,9 @@
 					this.$set(this, 'switchStatus',0);
 				}
 			},
+			temperatureFun(index){
+				this.$set(this, 'keystrokeIndex',index);
+			},
 			add() {
 			  this.num1 += 1;
 			},

+ 158 - 109
pages_manage/laboratory/iotControl.vue

@@ -3,7 +3,7 @@
 		<view class="device-type">
 			<view v-for="(item,index) in deviceType" @click="deviceTypeFun(item)">
 				<img :src="item.img">
-				<view>{{item.name}}</view>
+				<view>{{item.hardwareName}}</view>
 				<img src="@/images/basicsModules/icon_wdwg_gd.png">
 			</view>
 		</view>
@@ -14,8 +14,8 @@
 		</view>
 		<view class="sensor">
 			<view v-for="(item,index) in sensorData">
-				<img :src="item.img">
-				<veiw>{{item.name}}</veiw>
+				<img :src="baseUrl+item.icon">
+				<veiw>{{item.deviceName}}: {{item.deviceValue?item.deviceValue:''}}{{item.unit?item.unit:''}}</veiw>
 			</view>
 		</view>
 		<!-- 智能控制 -->
@@ -24,15 +24,13 @@
 			<view>智能控制</view>
 		</view>
 		<view class="intelligent-control">
-			<view  v-for="(item,index) in labHardwareVOList" :key="index">
+			<view  v-for="(item,index) in labHardwareVOList" :key="index" v-if="item.hardwareTypeKey !='airConditioner'">
 			  <view class="for-button-p">{{item.hardwareName}}
-				<text v-if="item.state.code=='3'&& item.hardwareTypeEnum.hardwareTypeCode==2">({{item.dictLabel}})</text>
+				<text v-if="item.reservedThree">({{item.reservedThree}})</text>
 			  </view>
-			  <img v-if="item.state.code=='3' && item.pcType != 1" src="@/images/basicsModules/icon_10.png" @click="buttonClick('switch',item,'close')">
-			  <img v-if="item.state.code=='4' && item.pcType != 1" src="@/images/basicsModules/icon_11.png" @click="buttonClick('switch',item,'open')">
-			  <view class="for-button-p" v-if="item.state.code=='0' && item.pcType != 1">离线</view>
-			  <view class="for-button-p" v-if="item.state.code=='2' && item.pcType != 1" style="color:#0183FA;">在线</view>
-			  <view v-if="item.pcType == 1" class="pcType-button" @click="buttonClick('operate',item,'')">操作</view>
+			  <img v-if="item.online && item.operatingState" src="@/images/basicsModules/icon_10.png" @click="buttonClick('switch',item,'0')">
+			  <img v-if="item.online && !item.operatingState" src="@/images/basicsModules/icon_11.png" @click="buttonClick('switch',item,'1')">
+			  <view class="for-button-p" v-if="!item.online">离线</view>
 			</view>
 		</view>
 		<!-- 智能终端 -->
@@ -42,17 +40,22 @@
 		</view>
 		<view class="intelligent-control">
 			<view  v-for="(item,index) in terminalData" :key="index">
-			  <view class="for-button-p">{{item.name}}</view>
-			  <view class="for-button-p" v-if="item.pcType == 1">离线</view>
-			  <view class="for-button-p" v-if="item.pcType != 1" style="color:#0183FA;">在线</view>
+			  <view class="for-button-p">{{item.deviceName}}</view>
+			  <view class="for-button-p" v-if="!item.online">离线</view>
+			  <view class="for-button-p" v-if="item.online" style="color:#0183FA;">在线</view>
 			</view>
 		</view>
-		
+
 	</view>
 </template>
 
 <script>
-	import {} from '@/api/basicsModules/index.js'
+	import $mqtt from '@/utils/mqtt.min.js';
+	import {iotAppSensorFindBySubId,iotAppHardwareFindByType,
+	iotAppHardwareOperatingHardware,
+	iotAppDeviceFindByType,
+	} from '@/api/basicsModules/index.js'
+	import { config } from '@/api/request/config.js'
 	export default {
 		name: "iotControl",
 		props: {
@@ -60,63 +63,28 @@
 		},
 		data() {
 			return {
+				baseUrl:config.base_url,
+				//MQTT请求参数-传感器
+				mtopic:"iot/device/sensor/sub/",
+				//MQTT请求参数-智能控制
+				mtopicOne:"iot/hardware/all/sub/",
+				client:{},
+				newData:{},
+				subId:'',
 				deviceType:[
 					{
-						id:1,
-						name:'视频监控',
+						type:'video',
+						hardwareName:'视频监控',
 						img: require('@/images/basicsModules/icon_xq_spjk.png'),
 					},
 					{
-						id:2,
-						name:'语音广播',
+						type:'speech',
+						hardwareName:'语音广播',
 						img: require('@/images/basicsModules/icon_sskz_xz.png'),
 					},
-					{
-						id:3,
-						name:'空调1',
-						img: require('@/images/basicsModules/icon_xq_kt.png'),
-					},
-					{
-						id:4,
-						name:'空调2',
-						img: require('@/images/basicsModules/icon_xq_kt.png'),
-					},
-				],
-				sensorData:[
-					{
-						name:'温度:  36°',
-						img: require('@/images/basicsModules/icon_yw_yc.png'),
-					},
-					{
-						name:'湿度:  60%',
-						img: require('@/images/basicsModules/icon_yw_yc.png'),
-					},
-					{
-						name:'烟感1号:  0',
-						img: require('@/images/basicsModules/icon_yw_yc.png'),
-					},
-					{
-						name:'烟感2号:  1',
-						img: require('@/images/basicsModules/icon_yw_yc.png'),
-					},
-					{
-						name:'一氧化碳:  0ppm',
-						img: require('@/images/basicsModules/icon_yw_yc.png'),
-					},
-					
-				],
-				labHardwareVOList:[
-					{
-						hardwareName:'高温设备1',
-						hardwareTypeEnum:{
-							enumName:'',	
-						},
-						state:{
-							code:3,
-						},
-						pcType:2,
-					}
 				],
+				sensorData:[],
+				labHardwareVOList:[],
 				terminalData:[
 					{
 						name:'智能管控一体机',
@@ -126,20 +94,25 @@
 			}
 		},
 		created() {
-			
+
 		},
 		mounted() {
-			console.log(this.subjectData)
+			this.$set(this, 'newData',this.subjectData);
+			this.$set(this, 'subId',this.subjectData.subId);
+			this.iotAppSensorFindBySubId();
+			this.iotAppHardwareFindByType();
+			this.iotAppDeviceFindByType();
+			this.offMQTT('on');
 		},
 		methods: {
 			//物联控制设备
 			deviceTypeFun(item){
-				if(item.id==1){
-					
-				}else if(item.id==2){
+				if(item.type=='video'){
+
+				}else if(item.type=='speech'){
 					//语音广播弹窗开启
 					this.$parent.buttonClick('broadcastOpen','');
-				}else if(item.id==3){
+				}else if(item.type=='conditioning'){
 					//空调弹窗开启
 					this.$parent.buttonClick('conditioningOpen','');
 				}
@@ -147,11 +120,11 @@
 			buttonClick(type,row,status){
 			    let self = this;
 				if(type == 'switch'){
-				  //开关			
+				  //开关
 				  let text = '';
-				  if(status == 'close'){
+				  if(status == '0'){
 				  	text = '关闭';
-				  }else if(status == 'open'){
+				  }else if(status == '1'){
 				  	text = '开启';
 				  }
 				  uni.showModal({
@@ -166,38 +139,18 @@
 							console.log('用户点击取消');
 						  }
 						}
-				  });  
-				}else if(type=='operate'){
-					//操作
-					uni.showModal({
-					  content: '确认要操作该设备吗?',
-					  cancelColor:"#999",
-					  confirmColor:"#0183FA",
-					  success: function (res) {
-						if (res.confirm) {
-						  self.controlSwitch(item.id);
-						  console.log('用户点击确定');
-						} else if (res.cancel) {
-						  console.log('用户点击取消');
-						}
-					  }
-					});
+				  });
 				}
-			  
+
 			},
 			//设备开关
 			async mangerControl(item,status){
 			  let obj = {
-				id:item.id,
+				hardwareNo:item.hardwareNo,
 				command:status,
 			  };
-			  const {data} = await mangerControl(obj);
+			  const {data} = await iotAppHardwareOperatingHardware(obj);
 			  if(data.code == 200){
-				if(command == 'open'){
-				  item.type = 3;
-				}else if(command == 'close'){
-				  item.type = 4;
-				}
 				uni.showToast({
 				  title: '操作成功',
 				  icon:"none",
@@ -206,17 +159,112 @@
 				});
 			  }
 			},
-			async controlSwitch(id){
-				const {data} = await controlSwitch({id:id});
+			//查询传感器状态
+			async iotAppSensorFindBySubId(){
+				const {data} = await iotAppSensorFindBySubId({subId:this.subId});
+				if(data.code == 200){
+					this.$set(this, 'sensorData',data.data);
+				}
+			},
+			//查询硬件设备
+			async iotAppHardwareFindByType(){
+				const {data} = await iotAppHardwareFindByType({subId:this.subId});
+				if(data.code == 200){
+					this.$set(this, 'labHardwareVOList',data.data);
+					for(let i=0;i<data.data.length;i++){
+						if(data.data[i].hardwareTypeKey=='airConditioner'){
+							data.data[i].type='conditioning';
+							data.data[i].img=require('@/images/basicsModules/icon_xq_kt.png');
+							this.deviceType.push(data.data[i])
+						}
+					}
+				}
+			},
+			//查询物联设备
+			async iotAppDeviceFindByType(){
+				const {data} = await iotAppDeviceFindByType({subjectId:this.subId,typeKeyList:['aio']});
 				if(data.code == 200){
-					uni.showToast({
-					  title: '操作成功',
-					  icon:"none",
-					  mask:true,
-					  duration: 2000
-					});
+					this.$set(this, 'terminalData',data.data);
+				}
+			},
+			 //MQTT订阅
+			sensorMQTT(){
+				let self = this;
+				this.client = $mqtt.connect('wxs://' +uni.getStorageSync('mqttUrl'), {
+				  username:uni.getStorageSync('mqttUser'),
+				  password:uni.getStorageSync('mqttPassword')
+				});
+				this.client.on("connect", e =>{
+				  this.client.subscribe(this.mtopic+self.subId, (err) => {
+					if (!err) {
+					   console.log("传感器订阅成功:" + this.mtopic+self.subId);
+					}else{
+					  // console.log("连接错误:" + err);
+					}
+				  });
+				  this.client.subscribe(this.mtopicOne+self.subId, (err) => {
+						if (!err) {
+						   console.log("智能控制订阅成功:" + this.mtopicOne+self.subId);
+						}else{
+						  // console.log("连接错误:" + err);
+						}
+				  });
+				});
+				this.client.on("message", (topic, message) => {
+				  if (message){
+					if(topic==this.mtopic+this.subId){
+						//传感器
+						let data = JSON.parse(message)
+						let list = JSON.parse(JSON.stringify(this.sensorData))
+						list.forEach((item)=>{
+						  data.forEach((minItem)=>{
+							if(item.deviceNo == minItem.deviceNo){
+							  item.deviceValue = minItem.deviceValue;
+							  item.online = minItem.online;
+							}
+						  })
+						})
+						this.$set(this,'sensorData',list);
+					}else if(topic == this.mtopicOne+this.subId){
+						//智能控制
+						let data = JSON.parse(message)
+						let list = JSON.parse(JSON.stringify(this.labHardwareVOList))
+						list.forEach((item)=>{
+						  if(item.hardwareNo == data.hardwareNo){
+							item.operatingState = data.operatingState;
+							item.online = data.online;
+						  }
+						})
+						this.$set(this,'labHardwareVOList',list);
+					}
+
+				  }
+				});
+			},
+			//取消订阅关闭MQTT连接
+			offMQTT(type){
+				let self = this;
+				if(self.client.unsubscribe){
+				  self.client.unsubscribe(self.mtopicOne+self.subId, error => {
+					if (error) {
+					  // console.log('mqtt关闭连接错误:', error)
+					}
+				  })
+				  self.client.end();
+				  this.$set(this,'client',{});
+				}
+				//判断传入参数如果存在 发起一次新的连接
+				if(type){
+				  this.sensorMQTT();
 				}
 			},
+
+
+		},
+		beforeDestroy(){
+			//清除定时器
+			let self = this;
+			self.offMQTT();
 		},
 	}
 </script>
@@ -232,7 +280,7 @@
 			justify-content: flex-start;
 			flex-wrap: wrap;
 			>view{
-				width: 356rpx;
+				//width: 356rpx;
 				height: 80rpx;
 				display: flex;
 				justify-content: flex-start;
@@ -240,6 +288,7 @@
 				border-right: 1px dashed #E0E0E0;
 				border-bottom: 1px dashed #E0E0E0;
 				padding-left: 10rpx;
+				padding-right: 10rpx;
 				box-sizing: border-box;
 				>img:nth-of-type(1){
 					width: 42rpx;
@@ -291,7 +340,7 @@
 				color: #333333;
 				line-height: 80rpx;
 			}
-			
+
 		}
 		.sensor{
 			display: flex;
@@ -359,7 +408,7 @@
 			}
 			>view:nth-last-child(1){
 				border-bottom:none;
-			}	
+			}
 		}
 	}
-</style>
+</style>

+ 10 - 5
pages_manage/laboratory/safetyCard.vue

@@ -5,16 +5,16 @@
 		<view class="small-title">实验室负责人</view>
 		<view class="sub-head" style="border:none;">
 			<view>{{newData.adminName}}</view>
-			<view>
-				<img src="@/images/basicsModules/icon_14.png">
+			<view @click="callPhone(newData.adminPhone)">
+				<img src="@/images/basicsModules/icon_aqxxp_dh.png">
 				<view>{{newData.adminPhone}}</view>
 			</view>
 		</view>
 		<view class="small-title">安全员</view>
 		<view class="sub-head" v-for="(item,index) in newData.safeUserList">
 			<view>{{item.safeUserName}}</view>
-			<view>
-				<img src="@/images/basicsModules/icon_14.png">
+			<view @click="callPhone(item.safeUserPhone)">
+				<img src="@/images/basicsModules/icon_aqxxp_dh.png">
 				<view>{{item.safeUserPhone}}</view>
 			</view>
 		</view>
@@ -89,7 +89,12 @@
 			this.$set(this, 'newData',this.subjectData);
 		},
 		methods: {
-			
+			//拨打电话
+			callPhone(tel){
+				uni.makePhoneCall({
+					phoneNumber: tel
+				})
+			},
 		},
 	}
 </script>

+ 25 - 32
pages_manage/laboratory/voiceBroadcast.vue

@@ -12,7 +12,7 @@
 				  :key="index">
 			  <img src="@/images/basicsModules/icon_sskz_zc.png" v-if="!item.type">
 			  <img src="@/images/basicsModules/icon_sskz_xz.png" v-if="item.type">
-			  {{item.name}}
+			  {{item.deviceName}}
 			</view>
 		  </view>
 		  <view class="broadcast_m">
@@ -31,7 +31,7 @@
 	</view>
 </template>
 <script>
-	import {} from '@/api/basicsModules/index.js'
+	import {iotAppSpeakerFindHorn,iotAppSpeakerPlayVoice} from '@/api/basicsModules/index.js'
 	import { config } from '@/api/request/config.js'
 	export default {
 		name: "voiceBroadcast",
@@ -49,14 +49,18 @@
 				recorderManager: wx.getRecorderManager(),
 				isEvacuate: true, //疏散按钮控制,当为true时候执行疏散
 				//滑动记录
-				startPoint: {},	  		
+				startPoint: {},
+				subId:'',			
+				floorId:'',			
 			}
 		},
 		created() {
 
 		},
 		mounted() {
-			
+			this.$set(this, 'subId',this.subjectData.subId);
+			this.$set(this, 'floorId',this.subjectData.floorId);
+			this.iotAppSpeakerFindHorn();
 		},
 		methods: {
 			// 返回按钮
@@ -64,15 +68,13 @@
 			  this.$parent.buttonClick('broadcastClose','');
 			},      
 			//获取喇叭列表
-			async getDeviceListBySub() {
-			  let _this=this;
+			async iotAppSpeakerFindHorn() {
+			  let self=this;
 			  let obj = {
-				subId: _this.subId,
-				floorId: _this.itemData.subAddrr.floorId,
-				page: 1,
-				pageSize: 100,
+				subId: self.subId,
+				floorId: self.floorId,
 			  };
-			  const {data} = await getDeviceListBySub(obj)
+			  const {data} = await iotAppSpeakerFindHorn(obj)
 			  if (data.code == 200) {
 				for (let i = 0; i < data.data.length; i++) {
 				  data.data[i].type = false;
@@ -191,7 +193,7 @@
 			async uploadImg(tempFilePaths) {
 			  var self = this;
 			  uni.uploadFile({
-				url: config.base_url + '/base/file/upload', //仅为示例,非真实的接口地址
+				url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
 				header: {
 				  'Authorization': uni.getStorageSync('token')
 				},
@@ -204,7 +206,7 @@
 				  let res = JSON.parse(uploadFileRes.data);
 				  if (res.code == 200) {
 					console.log("上传成功", res)
-					self.textParseUrlIps(config.base_url + '/' + res.data.url);
+					self.iotAppSpeakerPlayVoice(config.base_url + '/' + res.data.url);
 				  } else {
 					uni.showToast({
 					  title: res.msg,
@@ -221,30 +223,21 @@
 			  });
 			},
 			//发送语音
-			async textParseUrlIps(text) {
+			async iotAppSpeakerPlayVoice(text) {
 			  let self = this;
-			  let newList = [];
+			  let list=[];
 			  for (let i = 0; i < self.trumpetList.length; i++) {
 				if (self.trumpetList[i].type) {
-				  let obj = {
-					sn: self.trumpetList[i].deviceSn,
-					port: self.trumpetList[i].port,
-					deviceIp: self.trumpetList[i].deviceIp,
-					type: "",
-					name: "",
-					speed: "",
-					params: {
-					  tid: "",
-					  vol: self.trumpetList[i].deviceVol,
-					  urls: []
-					}
-				  };
-				  newList.push(obj);
+					list.push(self.trumpetList[i].deviceNo)
 				}
 			  }
-			  const {
-				data
-			  } = await textParseUrlIps(newList, text)
+			  console.log(text)
+			  let obj={
+				  deviceNo:list.join(','),
+				  voiceUrls:'http://192.168.1.20:8080/statics/2024/03/05/8dc08220-3d9a-4d7c-8235-a0a7c38f5ece.mp3',
+				  cycle:1,
+			  }
+			  const {data} = await iotAppSpeakerPlayVoice(obj)
 			  if (data.code == 200) {
 				uni.showToast({
 				  title: '发送成功',

+ 14 - 25
pages_student/accessApplication/newApplication.vue

@@ -151,7 +151,7 @@
 			<view class="for-max-box">
 				<view class="for-null-text" v-if="!searchList[0]">{{nullText}}</view>
 				<view class="for-box" v-for="(item,index) in searchList" :key="index">
-					<view>{{item.name}}</view>
+					<view>{{item.subName}}</view>
 					<view @click="checkClick(item)">选择</view>
 				</view>
 			</view>
@@ -169,6 +169,7 @@
 
 <script>
     import { subjectList,materialApply,materialUpdate,materialAdd ,teacherApply} from '@/api/apiDemo/index.js'
+    import {systemMineGetListByPower,laboratoryAppletMaterialApply} from '@/api/student/index.js'
 	import { config } from '@/api/request/config.js'
     export default {
         data() {
@@ -659,27 +660,18 @@
 			//获取实验室相关配置
 			async materialApply(){
 				let self = this;
-				const {data} = await materialApply({subjectId:this.subject.id})
+				const {data} = await laboratoryAppletMaterialApply({subjectId:this.subject.subId})
 				if(data.code == 200){
-				  /* if(data.data.sysUser.userType!='11'&&data.data.sysUser.userType!='22'){
-					uni.showToast({
-						title: '您不是学生也不是教职工,无法申请准入',
-						icon:"none",
-						mask:true,
-						duration: 2000
-					});
-					return
-				  } */
-				  if(data.data.sysUser.userType!='22'){
-				  					uni.showToast({
-				  						title: '您不是学生,无法申请准入',
-				  						icon:"none",
-				  						mask:true,
-				  						duration: 2000
-				  					});
-				  					return
+				  if(data.data.sysUser.userType!='2'){
+						uni.showToast({
+							title: '您不是学生,无法申请准入',
+							icon:"none",
+							mask:true,
+							duration: 2000
+						});
+						return
 				  }
-				  if(data.data.sysUser.userType == '11'){
+				  if(data.data.sysUser.userType == '1'){
 					if(!data.data.listTeacher[0]){
 						uni.showToast({
 							title: '该实验室未设置准入条件',
@@ -690,7 +682,7 @@
 						return
 					}
 				  }
-				  if(data.data.sysUser.userType == '22'){
+				  if(data.data.sysUser.userType == '2'){
 					if(!data.data.listStudent[0]){
 						uni.showToast({
 							title: '该实验室未设置准入条件',
@@ -756,10 +748,7 @@
 			},
 			//查询实验室
 			async subjectList(){
-				let obj = {
-					name:this.subjectName
-				}
-				const {data} = await subjectList(obj)
+				const {data} = await systemMineGetListByPower({subName:this.subjectName})
 				if(data.code == 200){
 					this.searchList = data.data;
 					if(!data.data[0]){

+ 35 - 64
pages_student/accessApplication/safeAccess.vue

@@ -2,10 +2,10 @@
 <template>
     <view id="safeAccess">
         <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-			<view class="for-box" v-for="(item,index) in infoList" :key="index" @click="goInfoPage(item)">
+			<view class="for-box" v-for="(item,index) in dataList" :key="index" @click="goInfoPage(item)">
 				<view class="name-box">
 					<view :class="item.auditStatus==0?'typeColor1':(item.auditStatus==1?'typeColor2':(item.auditStatus==2?'typeColor3':''))">{{item.auditStatus==0?'待审核':(item.auditStatus==1?'未通过':(item.auditStatus==2?'已通过':''))}}</view>
-					<view>{{item.subjectName}}准入申请</view>
+					<view>{{item.subName}}准入申请</view>
 				</view>
 				<view class="time-box">
 					<view></view>
@@ -19,19 +19,19 @@
 </template>
 
 <script>
+	import { parseTime } from '@/component/public.js'
     import { listapply } from '@/api/apiDemo/index.js'
+    import { laboratoryAppletListApply } from '@/api/student/index.js'
     export default {
         data() {
             return {
-                //数据列表
-                infoList:[],
-                //列表请求参数
-                getData:{
-                    page:1,
-                    pageSize:20,
-                    getType:true,
-                    nullDataType:true,
-                }
+				//列表请求参数
+				queryParams: {
+				  page: 1,
+				  pageSize: 20,
+				},
+				total:0,
+				dataList:[],
             }
         },
         onLoad() {
@@ -44,10 +44,8 @@
         methods: {
             //清除
             clearData(){
-                this.infoList = [];
-                this.getData.page = 1;
-                this.getData.getType = true;
-                this.getData.nullDataType = true;
+            	this.dataList = [];
+            	this.queryParams.page = 1;
             },
             //去准入详情
             goInfoPage(item){
@@ -61,63 +59,36 @@
 				uni.navigateTo({
 				    url:'/pages_student/accessApplication/newApplication'
 				})
-                // uni.navigateTo({
-                //     url:'/pages_student/workbench/safeAccess/chooseALaboratory'
-                // })
             },
             //滚动事件
             scrollGet(){
-                if(this.getData.getType){
-                    this.getData.page += 1;
-                    this.getList();
-                }
+				let self=this;
+				if(self.total/self.queryParams.pageSize<=self.queryParams.page){
+					console.log('没有更多数据!')
+				}else{
+					setTimeout(function(){
+						self.queryParams.page += 1;
+						self.getList();
+					},1000)
+				
+				}
+            	
             },
             //获取列表数据
             async getList(){
                 let self = this;
-                let obj = {
-                    pageNum:this.getData.page,
-                    pageSize:this.getData.pageSize,
-                    // recordContent:"-1",
-                    // userId:uni.getStorageSync('userId'),
-                }
-                const {data} = await listapply(obj)
+            	this.$set(this.queryParams,'auditStatus',this.auditStatus)
+                const {data} = await laboratoryAppletListApply(this.queryParams);
                 if(data.code==200){
-					for(let i=0;i<data.rows.length;i++){
-						// item.auditTime + ' 至 ' + item.validEndTime
-						if(data.rows[i].auditTime){
-							let leftTiem = data.rows[i].auditTime.split(' ');
-							data.rows[i].auditTime = leftTiem[0];
-						}
-						if(data.rows[i].validEndTime){
-							let rightTuem = data.rows[i].validEndTime.split(' ');
-							data.rows[i].validEndTime = rightTuem[0];
-						}
-					}
-                    if(self.page==1){
-                        if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
-                            self.infoList = data.rows;
-                        }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
-                            self.infoList = data.rows;
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }else{
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }
-                    }else{
-                        if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
-                            self.infoList = self.infoList.concat(data.rows)
-                        }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
-                            self.infoList = self.infoList.concat(data.rows);
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }else{
-                            self.getData.getType = false;
-                            self.getData.nullDataType = true;
-                        }
-                    }
-                }
+            		//通过forEach循环数组
+            		data.data.records.forEach((item, i) => {
+            			item.auditTime=parseTime(item.auditTime,"{y}-{m}-{d}")
+            			item.validEndTime=parseTime(item.validEndTime,"{y}-{m}-{d}")
+            			item.rejectTime=parseTime(item.rejectTime,"{y}-{m}-{d}")
+            		})
+            		this.dataList=[...this.dataList,...data.data.records]
+            		this.total=data.data.total;
+            	}   
             },
 
         }

+ 2 - 2
utils/homeConfig.js

@@ -20,7 +20,7 @@ let routeDataList = [
 		name: "离开检查",
 		limits:"",
 		route: "leaveInspection",
-		routeUrl: "/page_basics/photoInspection",
+		routeUrl: "/pages_basics/photoInspection",
 		img: require('@/images/basicsModules/icon_dzt_pzjc.png'),
 		buttonType:"page",
 	},
@@ -68,7 +68,7 @@ let routeDataList = [
 		name: "安全报警",
 		limits:"",
 		route: "warningRecording",
-		routeUrl: "/page_basics/earlyWarningManage/earlyWarningList",
+		routeUrl: "/pages_basics/earlyWarningManage/earlyWarningList",
 		img: require('@/images/basicsModules/button_1.png'),
 		buttonType:"page",
 	},

+ 1 - 17
utils/mineConfig.js

@@ -30,23 +30,7 @@ let routeDataList = [
 		routeUrl: "/pages_basics/faceImage",
 		img: require('@/images/basicsModules/icon_001.png'),
 		buttonType:"page",
-	},
-	{
-		name: "电子签名",
-		limits:"",
-		route: "signature",
-		routeUrl:  "/pages_basics/signature/signature",
-		img: require('@/images/basicsModules/icon_wd_dzqm.png'),
-		buttonType:"page",
-	},
-	{
-		name: "指纹",
-		limits:"",
-		route: "fingerprint",
-		routeUrl:"/pages_basics/fingerprint",
-		img: require('@/images/basicsModules/icon_wd_zw.png'),
-		buttonType:"page",
-	},
+	}
 ];
 
 export function getMineConfig(data) {