Browse Source

校园打卡项目合并

MS-CIAZDCOIXVRW\Administrator 3 years ago
parent
commit
95b0ec8225

+ 1 - 1
pages.json

@@ -132,7 +132,7 @@
 				"path": "home/home",
 				"style": {
 					"navigationBarTitleText": "智慧校园打卡",
-					"enablePullDownRefresh": false
+					"enablePullDownRefresh": true
 				}
 			}, 
 			{

+ 29 - 3
pagesClockIn/cardRecord/cardRecord.vue

@@ -56,7 +56,7 @@
 				<!-- 图片区域 -->
 				<view class="imgs" v-if="item.status==4">
 					<view class="imgs_item">
-						<view class="image">
+						<view class="image" @click="handleBigImg(item.faceImage||'../static/imgs/headImage.png')">
 							<img :src="item.faceImage||'../static/imgs/headImage.png'">
 						</view>
 						<view class="title">
@@ -65,7 +65,7 @@
 					</view>
 
 					<view class="imgs_item">
-						<view class="image">
+						<view class="image" @click="handleBigImg(item.matchFaceImage)">
 							<img :src="item.matchFaceImage||'../static/imgs/headImage.png'">
 						</view>
 						<view class="title">
@@ -74,7 +74,7 @@
 					</view>
 
 					<view class="imgs_item">
-						<view class="image">
+						<view class="image" @click="handleBigImg(item.sceneImage)">
 							<img :src="item.sceneImage||'../static/imgs/headImage.png'">
 						</view>
 						<view class="title">
@@ -128,6 +128,13 @@
 			</view>
 		</view>
 
+		<!-- 图片放大弹窗区域 -->
+		<uni-popup ref="popup">
+			<view class="popup_img">
+				<img :src="popupImg">
+			</view>
+		</uni-popup>
+
 	</view>
 </template>
 
@@ -155,6 +162,8 @@
 				current: 0,
 				// 列表数组
 				list: [],
+				// 弹窗图片路径
+				popupImg:""
 			};
 		},
 		onLoad() {
@@ -209,6 +218,12 @@
 				}
 			},
 
+			// 点击放大图片
+			handleBigImg(url) {
+				this.popupImg = url
+				this.$refs.popup.open()
+			},
+
 			// 点击分段器回调
 			onClickItem(e) {
 				this.list = []
@@ -495,5 +510,16 @@
 				color: #5792F0;
 			}
 		}
+
+		.popup_img {
+			width: 600rpx;
+			height: 600rpx;
+			background-color: #fff;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
 	}
 </style>

+ 14 - 11
pagesClockIn/home/home.vue

@@ -151,15 +151,6 @@
 		onLoad() {
 			// 获取用户的个人信息数据
 			this.getUserInfo()
-			setTimeout(() => {
-				let flag = uni.getStorageSync("manager")
-				let flag2 = uni.getStorageSync("sub-administrator")
-				if (flag || flag2) {
-					this.showTab = true
-				} else {
-					this.showTab = false
-				}
-			}, 300)
 			// 实例化API核心类
 			qqmapsdk = new QQMapWX({
 				// 申请的key
@@ -228,8 +219,8 @@
 			},
 			// 获取用户详细信息
 			async getUserInfo() {
-				uni.removeStorageSync("manager")
-				uni.removeStorageSync("sub-administrator")
+
+
 				let userId = uni.getStorageSync("userInfo").id
 				let res = await this.$myRequest_clockIn({
 					url: `/attendance/api/system/user/detail/${userId}`,
@@ -247,9 +238,21 @@
 						let flag2 = temList.includes(3)
 						if (flag) {
 							uni.setStorageSync("manager", flag)
+						} else {
+							uni.removeStorageSync("manager")
 						}
 						if (flag2) {
 							uni.setStorageSync("sub-administrator", flag2)
+						} else {
+							uni.removeStorageSync("sub-administrator")
+						}
+
+						let flag_show = uni.getStorageSync("manager")
+						let flag_show2 = uni.getStorageSync("sub-administrator")
+						if (flag_show || flag_show2) {
+							this.showTab = true
+						} else {
+							this.showTab = false
 						}
 					}
 				}

+ 1 - 1
pagesClockIn/particulars/particulars.vue

@@ -96,7 +96,7 @@
 						name: this.searchValue,
 						page: this.page,
 						time: this.type == 1 ? this.nowTime_day : this.nowTime,
-						type: 1
+						type: 2
 					}
 				})
 				// console.log(res);

+ 18 - 6
pagesClockIn/stat/stat.vue

@@ -122,8 +122,7 @@
 			<view class="e_list" v-if="errList.length">
 				<view class="e_box" v-for="item in errList" :key="item.userId">
 					<view class="e_img">
-						<img
-							:src="item.headImage||'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F13579194276%2F1000&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1671596163&t=52c9def84f0fa7832bfc5824364917e0'">
+						<img :src="item.headImage||'../static/imgs/headImage.png'">
 					</view>
 					<view class="e_name">
 						{{item.name}}
@@ -261,6 +260,7 @@
 			}
 			if (this.flag) {
 				this.current = 0
+				this.errList = []
 				this.getMonthTimes_team()
 				this.getProportion()
 				this.getErrList()
@@ -454,11 +454,23 @@
 				uni.showModal({
 					title: '提示',
 					content: `当前列表中有 ${this.total} 位异常人员,确定需要全部通知吗?`,
-					success: (res) => {
+					success: async (res) => {
 						if (res.confirm) {
-
-						} else if (res.cancel) {
-
+							let data = JSON.stringify(this.nowTime)
+							let res = await this.$myRequest_clockIn({
+								url: "/attendance/api/sign/check/in/abnormal/notify/app",
+								method: "post",
+								data,
+								header: {
+									'Authorization': uni.getStorageSync("token")
+								}
+							})
+							// console.log(res);
+							if (res.code == 200) {
+								uni.showToast({
+									title: "通知成功"
+								})
+							}
 						}
 					}
 				});

+ 29 - 3
pagesClockIn/statDetail/statDetail.vue

@@ -56,7 +56,7 @@
 				<!-- 图片区域 -->
 				<view class="imgs" v-if="item.status==4">
 					<view class="imgs_item">
-						<view class="image">
+						<view class="image" @click="handleBigImg(item.faceImage||'../static/imgs/headImage.png')">
 							<img :src="item.faceImage||'../static/imgs/headImage.png'">
 						</view>
 						<view class="title">
@@ -65,7 +65,7 @@
 					</view>
 
 					<view class="imgs_item">
-						<view class="image">
+						<view class="image" @click="handleBigImg(item.matchFaceImage)">
 							<img :src="item.matchFaceImage||'../static/imgs/headImage.png'">
 						</view>
 						<view class="title">
@@ -73,7 +73,7 @@
 						</view>
 					</view>
 					<view class="imgs_item">
-						<view class="image">
+						<view class="image" @click="handleBigImg(item.sceneImage)">
 							<img :src="item.sceneImage||'../static/imgs/headImage.png'">
 						</view>
 						<view class="title">
@@ -127,6 +127,13 @@
 				暂无数据
 			</view>
 		</view>
+		
+		<!-- 图片放大弹窗区域 -->
+		<uni-popup ref="popup">
+			<view class="popup_img">
+				<img :src="popupImg">
+			</view>
+		</uni-popup>
 
 	</view>
 </template>
@@ -153,6 +160,8 @@
 				time: null,
 				// 列表数组
 				list: [],
+				// 弹窗图片路径
+				popupImg:""
 			};
 		},
 		onLoad() {
@@ -188,6 +197,12 @@
 				this.month = month
 				this.year = year
 			},
+			
+			// 点击放大图片
+			handleBigImg(url) {
+				this.popupImg = url
+				this.$refs.popup.open()
+			},
 
 			// 获取打卡记录列表数组
 			async getListData() {
@@ -498,5 +513,16 @@
 				color: #5792F0;
 			}
 		}
+		
+		.popup_img {
+			width: 600rpx;
+			height: 600rpx;
+			background-color: #fff;
+		
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
 	}
 </style>