dedsudiyu vor 9 Monaten
Ursprung
Commit
6ebf9f4b76

+ 2 - 1
pages/views/saoCode/saoCode.vue

@@ -185,7 +185,8 @@
 				});
 				if (data.code == 200) {
 					uni.reLaunch({
-						url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))+'&saoCode=true'
+						// url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))+'&saoCode=true'
+						url: '/pages_manage/views/laboratory/safetyCardScan?infoData=' + encodeURIComponent(JSON.stringify(data.data))+'&saoCode=true'
 					});
 				}
 			},

+ 1 - 0
pages_manage/views/laboratory/accessRecord.vue

@@ -29,6 +29,7 @@
 
 			</view>
 		</view>
+		<view v-if="!dataList[0]" style="text-align: center;line-height:300rpx;color:#999;">暂无数据</view>
 	</view>
 </template>
 

+ 240 - 110
pages_manage/views/laboratory/safetyCardScan.vue

@@ -1,52 +1,55 @@
 <!-- 安全检查扫一扫 实验室详情 -->
 <template>
 	<view class="safetyCardScan">
-		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-			<view class="header">
-				<view class="tabTitle">
-					<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
-						<view class="tabTitle_text">
-							<img :src="item.img">
-							<view
-								:id="curTab==index && curTab==0?'fontColor-A':(curTab==index && curTab==1?'fontColor-B':'')">
-								{{item.name}}
-							</view>
+		<view class="header">
+			<view class="tabTitle">
+				<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
+					<view class="tabTitle_text">
+						<img :src="item.img">
+						<view
+							:id="pageType==index&&index==0?'fontColor-A':(pageType==1&&index==1?'fontColor-B':(pageType==2&&index==2?'fontColor-C':''))">
+							{{item.name}}
 						</view>
-						<view :class="{on:curTab==index}" class="tabTitle_across">
-							<img src="@/pages_safetyCheck/images/img_xyzc_bg@1x.png">
-						</view>
-						<view class="line"></view>
-					</view>
-				</view>
-			</view>
-			<view class="safetyCard" v-if="pageType==1">
-				<view class="lab-info">
-					<view class="lab-info-t">
-						<view>一级</view>
-						<view>化学类</view>
-						<view>实验室名称名称名称(房间号)</view>
 					</view>
-					<view class="lab-info-b">
-						<img src="@/pages_safetyCheck/images/icon_sys_xz@1x.png">
-						楼栋楼层
+					<view :class="{on:pageType==index}" class="tabTitle_across">
+						<img src="@/pages_safetyCheck/images/img_xyzc_bg@1x.png">
 					</view>
+					<view class="line"></view>
 				</view>
-				<view class="liability-unit">
-					<view>学院单位</view>
-					<view>学院单位名称</view>
+			</view>
+		</view>
+		<view class="safetyCard" v-if="pageType==0">
+			<view class="lab-info">
+				<view class="lab-info-t">
+					<view>{{newData.levelName}}</view>
+					<view>{{newData.labClassTypeList[0].typeName}}</view>
+					<view>{{newData.subName}}({{newData.roomNum}})</view>
 				</view>
-				<view class="small-title">
-					<view>实验室负责人</view>
-					<img src="@/pages_safetyCheck/images/icon_06_1.png">
+				<view class="lab-info-b">
+					<img src="@/pages_safetyCheck/images/icon_sys_xz@1x.png">
+					{{newData.buildName}}{{newData.floorName}}
 				</view>
-				<view class="sub-head">
-					<view>{{newData.adminName}}</view>
-					<view @click="callPhone(newData.adminPhone)">
-						<img src="@/pages_manage/images/icon_aqxxp_dh.png">
-						<view>{{newData.adminPhone}}</view>
-					</view>
+			</view>
+			<view class="liability-unit">
+				<view>学院单位</view>
+				<view>{{newData.deptName}}</view>
+			</view>
+			<view class="small-title-new" @click="unfoldPackUp('subAdminShowType')">
+				<view>实验室负责人</view>
+				<uni-icons :type="newData.subAdminShowType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
+			</view>
+			<view class="sub-head" v-if="newData.subAdminShowType">
+				<view>{{newData.adminName}}</view>
+				<view @click="callPhone(newData.adminPhone)">
+					<img src="@/pages_manage/images/icon_aqxxp_dh.png">
+					<view>{{newData.adminPhone}}</view>
 				</view>
-				<view class="small-title">安全员</view>
+			</view>
+			<view class="small-title-new" @click="unfoldPackUp('adminShowType')">
+				<view>安全员</view>
+				<uni-icons :type="newData.adminShowType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
+			</view>
+			<view v-if="newData.adminShowType">
 				<view class="sub-head" v-for="(item,index) in newData.safeUserList" :key="index">
 					<view>{{item.safeUserName}}</view>
 					<view @click="callPhone(item.safeUserPhone)">
@@ -54,35 +57,43 @@
 						<view>{{item.safeUserPhone}}</view>
 					</view>
 				</view>
-				<view class="classify" v-for="(item,index) in newData.labInfoBrandModels" :key="index">
-					<view v-if="item.privateList.length>0 && item.brandType==1" class="small-title">{{item.brandName}}
-					</view>
-					<view v-if="item.privateList.length>0 && item.brandType==1 && !item.isSpecial" class="small-items"
-						v-for="(item2,index2) in item.privateList" :key="index2">
-						<view>● </view>
+			</view>
+			<view class="classify" v-for="(item,index) in newData.labInfoBrandModels" :key="index">
+				<view v-if="item.privateList.length>0" class="small-title-new" @click="unfoldPackUp('list',index)">
+					<view>{{item.brandName}}</view>
+					<uni-icons :type="item.showType?'up':'down'" size="12" color='#A2A2A2'></uni-icons>
+				</view>
+				<view v-if="item.privateList.length>0 && item.brandType==1 && !item.isSpecial&&item.showType">
+					<view class="small-items-new" v-for="(item2,index2) in item.privateList" :key="index2">
+						<view>{{index2+1}}. </view>
 						<view>{{item2.infoName}}</view>
 					</view>
-					<view v-if="item.privateList.length>0 && item.brandType==1 && item.isSpecial" class="small-items"
-						v-for="(item2,index2) in item.privateList" :key="index2">
+				</view>
+				<view v-if="item.privateList.length>0 && item.brandType==1 && item.isSpecial&&item.showType">
+					<view class="small-items-new" v-for="(item2,index2) in item.privateList" :key="index2">
 						<view></view>
 						<view>{{item2.infoName}}</view>
 					</view>
-					<view v-if="item.privateList.length>0 && item.brandType==2" class="logotype">{{item.brandName}}
-					</view>
-					<view v-if="item.privateList.length>0 && item.brandType==2" class="logotype-img">
+				</view>
+				<view v-if="item.privateList.length>0 && item.brandType==2&&item.showType">
+					<view class="logotype-img-new">
 						<img v-for="(item3,index3) in item.privateList" :key="index3" :src="baseUrl+item3.infoContent">
 					</view>
 				</view>
 			</view>
-			<!-- 物联控制 -->
-			<iotControl ref="iotControl" v-if="pageType == 2" :subjectData="subjectData"></iotControl>
-			<!-- 进出记录 -->
-			<accessRecord v-if="pageType == 4" :subjectData="subjectData"></accessRecord>
-			<!-- 语音广播弹窗 -->
-			<voiceBroadcast v-if="broadcastPage" :subjectData="subjectData"></voiceBroadcast>
-			<!-- 空调弹窗 -->
-			<airConditioning v-if="conditioningPage" :airConditioningData="airConditioningData"></airConditioning>
-		</scroll-view>
+		</view>
+		<view class="position-button-box">
+			<view class="position-button-p-null"></view>
+			<view class="position-button-p-1">检查</view>
+			<view class="position-button-p-2">整改</view>
+			<view class="position-button-p-3">复查</view>
+			<view class="position-button-p-4">随手拍</view>
+			<view class="position-button-p-null"></view>
+		</view>
+		<!-- 物联控制 -->
+		<iotControl ref="iotControl" v-if="pageType == 1" :subjectData="subjectData"></iotControl>
+		<!-- 进出记录 -->
+		<accessRecord v-if="pageType == 2" :subjectData="subjectData"></accessRecord>
 	</view>
 
 </template>
@@ -95,12 +106,6 @@
 		accessRecord
 	} from '@/pages_manage/views/laboratory/accessRecord.vue'
 	import {
-		voiceBroadcast
-	} from '@/pages_manage/views/laboratory/voiceBroadcast.vue'
-	import {
-		airConditioning
-	} from '@/pages_manage/views/laboratory/airConditioning.vue'
-	import {
 		config
 	} from '@/api/request/config.js'
 	import {
@@ -111,8 +116,6 @@
 		components: {
 			iotControl,
 			accessRecord,
-			voiceBroadcast,
-			airConditioning,
 		},
 		data() {
 			return {
@@ -131,19 +134,12 @@
 						img: require('@/pages_safetyCheck/images/icon_sys_jcjl@1x.png'),
 					},
 				],
-				curTab: 0,
+				pageType: 0,
 				newData: {
-					adminName: '李飘飘',
-					adminPhone: '13655668899',
-					safeUserList: [{
-							safeUserName: '周游',
-							safeUserPhone: '13655668899',
-						},
-						{
-							safeUserName: '周游',
-							safeUserPhone: '13655668899',
-						},
-					],
+					adminName: '',
+					adminPhone: '',
+					safeUserList: [],
+					labInfoBrandModels: [],
 				},
 				//语音广播弹窗
 				broadcastPage: false,
@@ -169,17 +165,19 @@
 			uni.$emit('onPullDownRefresh') // 设置监听事件
 		},
 		onLoad(option) {
-			//this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
-			//this.$set(this, 'subjectData', JSON.parse(decodeURIComponent(option.infoData)));
-			if (option.saoCode) {
-				this.$set(this, 'saoCodeType', true);
-				this.$set(this, 'currentIndex', 1);
-				this.$set(this, 'pageType', 3);
-			} else {
-				this.$set(this, 'saoCodeType', false);
-				this.$set(this, 'currentIndex', 0);
-				this.$set(this, 'pageType', 2);
+			let newData = JSON.parse(decodeURIComponent(option.infoData));
+			newData.subAdminShowType = true;
+			newData.adminShowType = true;
+			if (newData.labInfoBrandModels) {
+				for (let i = 0; i < newData.labInfoBrandModels.length; i++) {
+					newData.labInfoBrandModels[i].showType = true;
+				}
 			}
+			this.$nextTick(() => {
+				this.$set(this, 'newData', newData);
+				this.$set(this, 'subjectData', newData);
+				this.$set(this, 'pageType', 0);
+			})
 
 		},
 		onShow() {
@@ -189,20 +187,26 @@
 
 		},
 		methods: {
-			//滚动事件
-			scrollGet() {},
+			//展开/收起操作
+			unfoldPackUp(type, index) {
+				console.log('type', type)
+				console.log('item', index)
+				if (type == 'subAdminShowType') {
+					console.log('1')
+					this.$set(this.newData, 'subAdminShowType', !this.newData.subAdminShowType);
+				} else if (type == 'adminShowType') {
+					console.log('2')
+					this.$set(this.newData, 'adminShowType', !this.newData.adminShowType);
+				} else if (type == 'list') {
+					console.log('3')
+					this.$set(this.newData.labInfoBrandModels[index], 'showType', !this.newData.labInfoBrandModels[index]
+					.showType);
+				}
+			},
 			//顶部tab点击
 			tabClick(index) {
-				this.curTab = index;
-				if (index == 0) {
-					//安全信息牌
-					this.$set(this, 'pageType', 1);
-				} else if (index == 1) {
-					//监测控制
-					this.$set(this, 'pageType', 2);
-				} else if (index == 2) {
-					//进出记录
-					this.$set(this, 'pageType', 4);
+				if (this.pageType != index) {
+					this.$set(this, 'pageType', index);
 				}
 			},
 			goVideoPage() {
@@ -248,7 +252,9 @@
 <style lang="stylus" scoped>
 	.safetyCardScan {
 		height: 100%;
-
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
 		#fontColor-A {
 			color: #00DEDE;
 		}
@@ -257,11 +263,15 @@
 			color: #FF8C00;
 		}
 
+		#fontColor-C {
+			color: #0083FD;
+		}
+
 		.header {
 			width: 100%;
-			position: fixed;
-			top: 0rpx;
-			z-index: 100;
+			// position: fixed;
+			// top: 0rpx;
+			// z-index: 100;
 			background: #fff;
 
 			.tabTitle {
@@ -344,15 +354,15 @@
 
 		/* 安全信息牌 */
 		.safetyCard {
-			margin-top: 190rpx;
-
+			flex:1;
+			overflow-y: scroll;
+			padding-bottom:150rpx;
 			.lab-info {
 				background: #FFFFFF;
-
 				.lab-info-t {
 					width: 750rpx;
 					height: 80rpx;
-					border: 2rpx dashed #E0E0E0;
+					border-bottom: 2rpx dashed #E0E0E0;
 					display: flex;
 					justify-content: flex-start;
 					align-items: center;
@@ -508,7 +518,74 @@
 				border-bottom: none;
 			}
 
+
+			.small-title-new {
+				width: 750rpx;
+				height: 80rpx;
+				background: #FFFFFF;
+				border-bottom: 1rpx solid #E0E0E0;
+				padding: 0 30rpx;
+				box-sizing: border-box;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				>view {
+					font-size: 30rpx;
+					color: #333333;
+					line-height: 80rpx;
+					text-align: left;
+				}
+
+				>img {
+					width: 24rpx;
+					height: 12rpx;
+				}
+			}
+
 			.classify {
+				.small-items-new {
+					padding-left: 20rpx;
+					box-sizing: border-box;
+					background: #fff;
+					display: flex;
+					justify-content: flex-start;
+					padding: 30rpx;
+					box-sizing: border-box;
+					border-bottom: 1rpx solid #E0E0E0;
+
+					>view:nth-of-type(1) {
+						color: #999999;
+						font-weight: 500;
+						font-size: 28rpx;
+						margin-right: 12rpx;
+						line-height: 34rpx;
+					}
+
+					>view:nth-of-type(2) {
+						display: block;
+						font-family: PingFang SC;
+						font-weight: 500;
+						font-size: 28rpx;
+						line-height: 34rpx;
+						color: #999999;
+					}
+				}
+
+				.logotype-img-new {
+					padding: 26rpx 0 34rpx 0;
+					box-sizing: border-box;
+					background: #fff;
+
+					>img {
+						display: inline-block;
+						width: 86rpx;
+						height: 114rpx;
+						margin-left: 30rpx;
+						margin-bottom: 20rpx;
+					}
+				}
+
 				.small-items {
 					padding-left: 20rpx;
 					box-sizing: border-box;
@@ -520,7 +597,10 @@
 
 					>view:nth-of-type(1) {
 						color: #999999;
+						font-weight: 500;
+						font-size: 28rpx;
 						margin-right: 12rpx;
+						line-height: 34rpx;
 					}
 
 					>view:nth-of-type(2) {
@@ -545,6 +625,7 @@
 					padding-left: 20rpx;
 					box-sizing: border-box;
 					background: #0183FA;
+					color: #fff;
 				}
 
 				.logotype-img {
@@ -562,5 +643,54 @@
 				}
 			}
 		}
+		.position-button-box{
+			position:absolute;
+			bottom:25rpx;
+			left:60rpx;
+			width:640rpx;
+			height:100rpx;
+			display: flex;
+			color:#fff;
+			overflow: hidden;
+			view:nth-child(2){
+				border-top-left-radius: 10rpx
+				border-bottom-left-radius: 10rpx
+			}
+			view:nth-last-child(2){
+				border-top-right-radius: 10rpx
+				border-bottom-right-radius: 10rpx
+			}
+			.position-button-p-null{
+				flex:1;
+			}
+			.position-button-p-1{
+				width:160rpx;
+				line-height:100rpx;
+				font-size: 30rpx
+				text-align: center;
+				background-color: #0183FA;
+			}
+			.position-button-p-2{
+				width:160rpx;
+				line-height:100rpx;
+				font-size: 30rpx
+				text-align: center;
+				background-color: #16B531;
+			}
+			.position-button-p-3{
+				width:160rpx;
+				line-height:100rpx;
+				font-size: 30rpx
+				text-align: center;
+				background-color: #00DEDE;
+			}
+			.position-button-p-4{
+				width:160rpx;
+				line-height:100rpx;
+				font-size: 30rpx
+				text-align: center;
+				background-color: #FF8C00;
+			}
+		}
 	}
-</style>
+</style>