소스 검색

no message

MS-CIAZDCOIXVRW\Administrator 3 년 전
부모
커밋
ff8c55da7b
50개의 변경된 파일294개의 추가작업 그리고 208개의 파일을 삭제
  1. 1 3
      pages/editRules/editRules.vue
  2. 67 52
      pages/home/home.vue
  3. 0 2
      pages/location/location.vue
  4. 43 26
      pages/stat/stat.vue
  5. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  6. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  7. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/chocolate-progress-bar/chocolate-progress-bar.js.map
  8. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tki-tree/tki-tree.js.map
  9. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/404/404.js.map
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/addLocation/addLocation.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/addRules/addRules.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/authentication/authentication.js.map
  13. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cardRecord/cardRecord.js.map
  14. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/editRules/editRules.js.map
  15. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/group/group.js.map
  16. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/home.js.map
  17. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/location/location.js.map
  18. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map
  19. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/particulars/particulars.js.map
  20. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/powerSet/powerSet.js.map
  21. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/punchLocation/punchLocation.js.map
  22. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/punchTime/punchTime.js.map
  23. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/ruleName/ruleName.js.map
  24. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/ruleSet/ruleSet.js.map
  25. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/rulesDetail/rulesDetail.js.map
  26. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/setPunchTime/setPunchTime.js.map
  27. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/stat/stat.js.map
  28. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/statDetail/statDetail.js.map
  29. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/jlk-week/components/jlk-week/jlk-week.js.map
  30. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.js.map
  31. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.js.map
  32. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map
  33. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map
  34. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map
  35. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  36. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.js.map
  37. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js.map
  38. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js.map
  39. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.js.map
  40. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/zwx-dropDown/components/zwx-dropDown/zwx-dropDown.js.map
  41. 1 1
      unpackage/dist/dev/mp-weixin/common/vendor.js
  42. 1 3
      unpackage/dist/dev/mp-weixin/pages/editRules/editRules.wxss
  43. 63 45
      unpackage/dist/dev/mp-weixin/pages/home/home.js
  44. 1 1
      unpackage/dist/dev/mp-weixin/pages/home/home.wxml
  45. 0 2
      unpackage/dist/dev/mp-weixin/pages/location/location.js
  46. 77 32
      unpackage/dist/dev/mp-weixin/pages/stat/stat.js
  47. 1 1
      unpackage/dist/dev/mp-weixin/pages/stat/stat.wxml
  48. 0 1
      unpackage/dist/dev/mp-weixin/pages/stat/stat.wxss
  49. 2 2
      unpackage/dist/dev/mp-weixin/uni_modules/jlk-week/components/jlk-week/jlk-week.json
  50. 1 1
      util/api.js

+ 1 - 3
pages/editRules/editRules.vue

@@ -412,13 +412,11 @@
 <style lang="scss" scoped>
 	.container {
 		height: 100vh;
-		background-color: #fff;
 
 		.box {
 			display: flex;
 			align-items: center;
-			margin: 0 30rpx;
-			width: 690rpx;
+			padding: 0 30rpx;
 			height: 90rpx;
 			font-size: 30rpx;
 			border-bottom: 1rpx solid #CCCCCC;

+ 67 - 52
pages/home/home.vue

@@ -31,8 +31,12 @@
 						</view>
 						<view class="type">
 							<img v-if="item.status==4" src="./imgs/success.png">
-							<span v-if="item.status==4">{{item.updateTime}}</span>
-							{{item.status==4?"已打卡":"未打卡"}}
+							<span v-if="item.status==4">
+								{{format_time(item.updateTime)}}
+							</span>
+							<span v-if="item.status==4"> 已打卡</span>
+							<span v-if="item.status==3">已超时</span>
+							<span v-if="item.status==1||item.status==2">未打卡</span>
 						</view>
 					</view>
 				</view>
@@ -116,14 +120,16 @@
 			});
 			// 获取当前系统时间
 			this.getNowTime()
-			// 获取当前时间的时间戳
-			this.getTimestamp()
 			// 获取用户的个人信息数据
 			this.getUserInfo()
 			// 获取当前位置的详细信息
 			this.getLocationData()
+		},
+		onShow() {
 			// 获取当天的打卡列表数组
 			this.getRulesList()
+			// 获取当前时间的时间戳
+			this.getTimestamp()
 		},
 		onUnload() {
 			if (this.timer) {
@@ -152,15 +158,14 @@
 			getNowTime() {
 				if (this.timer) {
 					clearInterval(this.timer)
-				} else {
-					this.timer = setInterval(() => {
-						let date = new Date()
-						let hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
-						let minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
-						let seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
-						this.nowTime = hours + ':' + minutes + ':' + seconds
-					}, 1000)
 				}
+				this.timer = setInterval(() => {
+					let date = new Date()
+					let hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
+					let minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
+					let seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
+					this.nowTime = hours + ':' + minutes + ':' + seconds
+				}, 1000)
 			},
 			// 获取当前时间的时间戳
 			getTimestamp() {
@@ -227,55 +232,56 @@
 						this.list = res.data.reverse()
 						this.activeid = this.list[0].id
 						this.contrastObj = this.list[0]
-						// console.log(this.contrastObj);
 						this.changeType()
+						// console.log(this.contrastObj);
 					}
 				}
 			},
 			// 对比信息改变打卡的状态显示
 			changeType() {
-				// 没有到打卡时间 或者 超过打卡时间 的状态
-				if (this.timestamp < this.contrastObj.beginTime || this.timestamp > this.contrastObj.endTime) {
-					console.log(1);
+				if (this.contrastObj.status == 4) {
 					this.flags = false
-					this.notes = "未到打卡时间无法打卡"
-				}
-				// 到了打卡时间,判断是否在打卡范围内
-				else {
-					console.log(2);
-					if (this.contrastObj.locations.length) {
-						let temList = []
-						temList = this.contrastObj.locations.map((ele) => {
-							this.centerLat = ele.lat
-							this.centerLng = ele.lng
-							this.radius = ele.radius
-
-							let red1 = this.myLat * Math.PI / 180.0;
-							let red2 = this.centerLat * Math.PI / 180.0;
-							let a = red1 - red2;
-							let b = this.myLng * Math.PI / 180.0 - this.centerLng * Math.PI / 180.0;
-							let R = 6378137;
-							let distance = R * 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(
-									red1) *
-								Math.cos(red2) *
-								Math.pow(Math.sin(b / 2), 2)));
-							this.distance = distance.toFixed(2) * 1;
-
-							if (this.distance <= this.radius) {
-								return true
+					this.notes = "已打卡,无需再次打卡"
+				} else {
+					// 没有到打卡时间 或者 超过打卡时间 的状态
+					if (this.timestamp < this.contrastObj.beginTime || this.timestamp > this.contrastObj.endTime) {
+						this.flags = false
+						this.notes = "未到打卡时间无法打卡"
+					}
+					// 到了打卡时间,判断是否在打卡范围内
+					else {
+						if (this.contrastObj.locations.length) {
+							let temList = []
+							temList = this.contrastObj.locations.map((ele) => {
+								this.centerLat = ele.lat
+								this.centerLng = ele.lng
+								this.radius = ele.radius
+
+								let red1 = this.myLat * Math.PI / 180.0;
+								let red2 = this.centerLat * Math.PI / 180.0;
+								let a = red1 - red2;
+								let b = this.myLng * Math.PI / 180.0 - this.centerLng * Math.PI / 180.0;
+								let R = 6378137;
+								let distance = R * 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(
+										red1) *
+									Math.cos(red2) *
+									Math.pow(Math.sin(b / 2), 2)));
+								this.distance = distance.toFixed(2) * 1;
+								console.log(this.distance);
+								console.log(this.radius);
+								if (this.distance <= this.radius) {
+									return 1
+								} else {
+									return 2
+								}
+							})
+							let temFlag = temList.indexOf(1)
+							if (temFlag == -1) {
+								this.flags = false
+								this.notes = "不在管理员设定范围内,无法打卡"
 							} else {
-								return false
+								this.flags = true
 							}
-						})
-						let temFlag
-						temFlag = temList.some((item) => {
-							item = true
-						})
-						if (!temFlag) {
-							this.flags = false
-							this.notes = "不在管理员设定范围内,无法打卡"
-						} else {
-							this.flags = true
 						}
 					}
 				}
@@ -319,6 +325,15 @@
 					})
 				}
 			},
+			// 格式化时间
+			format_time(timestamp) {
+				//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+				var date = new Date(timestamp);
+				var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+				var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
+				let strDate = h + m;
+				return strDate;
+			}
 		}
 	}
 </script>

+ 0 - 2
pages/location/location.vue

@@ -126,8 +126,6 @@
 							sourceType: ['camera'],
 							success: (res) => {
 								// console.log(res);
-								// console.log(res.tempFilePaths[0]);
-								// console.log(JSON.stringify(res.tempFilePaths));
 								let imgUrl = res.tempFilePaths[0]
 								uni.navigateTo({
 									url: `/pages/authentication/authentication?imgUrl=${imgUrl}&id=${this.id}&address=${this.address}&latitude=${this.latitude}&longitude=${this.longitude}`

+ 43 - 26
pages/stat/stat.vue

@@ -44,7 +44,7 @@
 			</view>
 
 			<view class="calendar_body">
-				<uni-calendar :showMonth="false" @change="change" :selected="list" />
+				<uni-calendar :showMonth="false" @change="change" :selected="selectList" />
 			</view>
 
 			<view class="calendar_foot" v-if="current==1">
@@ -58,7 +58,7 @@
 						<view class="circular" v-if="item.finish"></view>
 						<view class="circular color" v-else></view>
 						{{item.finish?"已打卡":"未打卡"}}
-						<span v-if="item.finish">{{item.updateTime}}</span>
+						<span v-if="item.finish">{{format_time(item.updateTime)}}</span>
 					</view>
 				</view>
 			</view>
@@ -154,35 +154,40 @@
 		},
 		data() {
 			return {
+				// 是否为管理员或子管理员标识
 				flag: false,
 				// 有标记点的数组日期
-				// list: [{
-				// 		date: "2022-12-20",
-				// 		info: ''
-				// 	},
-				// 	{
-				// 		date: "2022-12-21",
-				// 		info: '',
-				// 		data: {
-				// 			custom: '自定义信息',
-				// 			name: '自定义消息头'
-				// 		}
-				// 	},
-				// 	{
-				// 		date: "2022-12-22",
-				// 		info: ''
-				// 	}
-				// ],
-				// 考勤规则列表
+				selectList: [
+					// {
+					// 	date: "2022-12-20",
+					// 	info: '打卡'
+					// },
+					// {
+					// 	date: "2022-12-21",
+					// 	info: '未打卡',
+					// 	data: {
+					// 		custom: '自定义信息',
+					// 		name: '自定义消息头'
+					// 	}
+					// }
+				],
+				// 个人考勤规则列表
 				list2: [],
-				month: null,
+				// 分段器数组
 				items: ['团队统计', '我的统计'],
+				// 分段器默认索引
 				current: 1,
+				// 当前年份
 				year: null,
+				// 当前月份
 				month: null,
+				// 当前天数
 				day: null,
+				// 异常人员名单数组
 				errList: [],
+				// 环形图完成数量
 				progress_txt: 0,
+				// 环形图总数
 				progress_total: 0,
 				// 当前时间
 				nowTime: "",
@@ -190,10 +195,15 @@
 				fail_count: 0,
 				// 打卡成功次数
 				success_count: 0,
+				// 异常人员名单当前页
 				page: 1,
+				// 异常人员名单总条数
 				total: 0,
+				// 个人考勤规则列表当前页
 				page_my: 1,
+				// 个人考勤规则列表总条数
 				total_my: 0,
+				// 环形图显示隐藏控制
 				showBar: true
 			};
 		},
@@ -388,11 +398,11 @@
 				uni.showModal({
 					title: '提示',
 					content: `当前列表中有 ${this.total} 位异常人员,确定需要全部通知吗?`,
-					success: (res)=> {
+					success: (res) => {
 						if (res.confirm) {
-							
+
 						} else if (res.cancel) {
-							
+
 						}
 					}
 				});
@@ -496,7 +506,15 @@
 					this.getErrList()
 				}
 			},
-
+			// 格式化时间
+			format_time(timestamp) {
+				//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+				var date = new Date(timestamp);
+				var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+				var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
+				let strDate = h + m;
+				return strDate;
+			}
 		}
 	}
 </script>
@@ -605,7 +623,6 @@
 
 			.calendar_body {
 				height: 690rpx;
-				background-color: skyblue;
 			}
 
 			.calendar_foot {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/chocolate-progress-bar/chocolate-progress-bar.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/tki-tree/tki-tree.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/404/404.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/addLocation/addLocation.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/addRules/addRules.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/authentication/authentication.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cardRecord/cardRecord.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/editRules/editRules.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/group/group.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/home.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/location/location.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/particulars/particulars.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/powerSet/powerSet.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/punchLocation/punchLocation.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/punchTime/punchTime.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/ruleName/ruleName.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/ruleSet/ruleSet.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/rulesDetail/rulesDetail.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/setPunchTime/setPunchTime.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/stat/stat.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/statDetail/statDetail.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/jlk-week/components/jlk-week/jlk-week.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/zwx-dropDown/components/zwx-dropDown/zwx-dropDown.js.map


+ 1 - 1
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -10756,7 +10756,7 @@ var myRequest = function myRequest(options) {
                 }
               }
             });
-          } else if (res.data.code == 401) {
+          } else if (res.data.code == 401 || res.data.code == 499) {
             uni.showModal({
               title: "提示",
               content: res.data.message,

+ 1 - 3
unpackage/dist/dev/mp-weixin/pages/editRules/editRules.wxss

@@ -3,13 +3,11 @@
 /* 水平间距 */
 .container.data-v-138ca3bc {
   height: 100vh;
-  background-color: #fff;
 }
 .container .box.data-v-138ca3bc {
   display: flex;
   align-items: center;
-  margin: 0 30rpx;
-  width: 690rpx;
+  padding: 0 30rpx;
   height: 90rpx;
   font-size: 30rpx;
   border-bottom: 1rpx solid #CCCCCC;

+ 63 - 45
unpackage/dist/dev/mp-weixin/pages/home/home.js

@@ -106,9 +106,11 @@ var render = function () {
     ? _vm.__map(_vm.list, function (item, __i0__) {
         var $orig = _vm.__get_orig(item)
         var m0 = item.status == 4 ? __webpack_require__(/*! ./imgs/success.png */ 46) : null
+        var m1 = item.status == 4 ? _vm.format_time(item.updateTime) : null
         return {
           $orig: $orig,
           m0: m0,
+          m1: m1,
         }
       })
     : null
@@ -230,6 +232,10 @@ var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/r
 //
 //
 //
+//
+//
+//
+//
 
 var QQMapWX = __webpack_require__(/*! ../../util/qqmap-wx-jssdk1.1/qqmap-wx-jssdk */ 49);
 var qqmapsdk;
@@ -280,14 +286,16 @@ var _default = {
     });
     // 获取当前系统时间
     this.getNowTime();
-    // 获取当前时间的时间戳
-    this.getTimestamp();
     // 获取用户的个人信息数据
     this.getUserInfo();
     // 获取当前位置的详细信息
     this.getLocationData();
+  },
+  onShow: function onShow() {
     // 获取当天的打卡列表数组
     this.getRulesList();
+    // 获取当前时间的时间戳
+    this.getTimestamp();
   },
   onUnload: function onUnload() {
     if (this.timer) {
@@ -317,15 +325,14 @@ var _default = {
       var _this = this;
       if (this.timer) {
         clearInterval(this.timer);
-      } else {
-        this.timer = setInterval(function () {
-          var date = new Date();
-          var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
-          var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
-          var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
-          _this.nowTime = hours + ':' + minutes + ':' + seconds;
-        }, 1000);
       }
+      this.timer = setInterval(function () {
+        var date = new Date();
+        var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
+        var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
+        var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+        _this.nowTime = hours + ':' + minutes + ':' + seconds;
+      }, 1000);
     },
     // 获取当前时间的时间戳
     getTimestamp: function getTimestamp() {
@@ -420,8 +427,8 @@ var _default = {
                     _this4.list = res.data.reverse();
                     _this4.activeid = _this4.list[0].id;
                     _this4.contrastObj = _this4.list[0];
-                    // console.log(this.contrastObj);
                     _this4.changeType();
+                    // console.log(this.contrastObj);
                   }
                 }
               case 4:
@@ -435,43 +442,45 @@ var _default = {
     // 对比信息改变打卡的状态显示
     changeType: function changeType() {
       var _this5 = this;
-      // 没有到打卡时间 或者 超过打卡时间 的状态
-      if (this.timestamp < this.contrastObj.beginTime || this.timestamp > this.contrastObj.endTime) {
-        console.log(1);
+      if (this.contrastObj.status == 4) {
         this.flags = false;
-        this.notes = "未到打卡时间无法打卡";
-      }
-      // 到了打卡时间,判断是否在打卡范围内
-      else {
-        console.log(2);
-        if (this.contrastObj.locations.length) {
-          var temList = [];
-          temList = this.contrastObj.locations.map(function (ele) {
-            _this5.centerLat = ele.lat;
-            _this5.centerLng = ele.lng;
-            _this5.radius = ele.radius;
-            var red1 = _this5.myLat * Math.PI / 180.0;
-            var red2 = _this5.centerLat * Math.PI / 180.0;
-            var a = red1 - red2;
-            var b = _this5.myLng * Math.PI / 180.0 - _this5.centerLng * Math.PI / 180.0;
-            var R = 6378137;
-            var distance = R * 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(red1) * Math.cos(red2) * Math.pow(Math.sin(b / 2), 2)));
-            _this5.distance = distance.toFixed(2) * 1;
-            if (_this5.distance <= _this5.radius) {
-              return true;
+        this.notes = "已打卡,无需再次打卡";
+      } else {
+        // 没有到打卡时间 或者 超过打卡时间 的状态
+        if (this.timestamp < this.contrastObj.beginTime || this.timestamp > this.contrastObj.endTime) {
+          this.flags = false;
+          this.notes = "未到打卡时间无法打卡";
+        }
+        // 到了打卡时间,判断是否在打卡范围内
+        else {
+          if (this.contrastObj.locations.length) {
+            var temList = [];
+            temList = this.contrastObj.locations.map(function (ele) {
+              _this5.centerLat = ele.lat;
+              _this5.centerLng = ele.lng;
+              _this5.radius = ele.radius;
+              var red1 = _this5.myLat * Math.PI / 180.0;
+              var red2 = _this5.centerLat * Math.PI / 180.0;
+              var a = red1 - red2;
+              var b = _this5.myLng * Math.PI / 180.0 - _this5.centerLng * Math.PI / 180.0;
+              var R = 6378137;
+              var distance = R * 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(red1) * Math.cos(red2) * Math.pow(Math.sin(b / 2), 2)));
+              _this5.distance = distance.toFixed(2) * 1;
+              console.log(_this5.distance);
+              console.log(_this5.radius);
+              if (_this5.distance <= _this5.radius) {
+                return 1;
+              } else {
+                return 2;
+              }
+            });
+            var temFlag = temList.indexOf(1);
+            if (temFlag == -1) {
+              this.flags = false;
+              this.notes = "不在管理员设定范围内,无法打卡";
             } else {
-              return false;
+              this.flags = true;
             }
-          });
-          var temFlag;
-          temFlag = temList.some(function (item) {
-            item = true;
-          });
-          if (!temFlag) {
-            this.flags = false;
-            this.notes = "不在管理员设定范围内,无法打卡";
-          } else {
-            this.flags = true;
           }
         }
       }
@@ -514,6 +523,15 @@ var _default = {
           }
         });
       }
+    },
+    // 格式化时间
+    format_time: function format_time(timestamp) {
+      //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+      var date = new Date(timestamp);
+      var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+      var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
+      var strDate = h + m;
+      return strDate;
     }
   }
 };

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/home.wxml


+ 0 - 2
unpackage/dist/dev/mp-weixin/pages/location/location.js

@@ -282,8 +282,6 @@ var _default = {
             sourceType: ['camera'],
             success: function success(res) {
               // console.log(res);
-              // console.log(res.tempFilePaths[0]);
-              // console.log(JSON.stringify(res.tempFilePaths));
               var imgUrl = res.tempFilePaths[0];
               uni.navigateTo({
                 url: "/pages/authentication/authentication?imgUrl=".concat(imgUrl, "&id=").concat(_this2.id, "&address=").concat(_this2.address, "&latitude=").concat(_this2.latitude, "&longitude=").concat(_this2.longitude)

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 77 - 32
unpackage/dist/dev/mp-weixin/pages/stat/stat.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/stat/stat.wxml


+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/stat/stat.wxss

@@ -89,7 +89,6 @@
 }
 .container .calendar .calendar_body.data-v-44536cf4 {
   height: 690rpx;
-  background-color: skyblue;
 }
 .container .calendar .calendar_foot.data-v-44536cf4 {
   padding: 0 30rpx;

+ 2 - 2
unpackage/dist/dev/mp-weixin/uni_modules/jlk-week/components/jlk-week/jlk-week.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 1 - 1
util/api.js

@@ -54,7 +54,7 @@ export const myRequest = (options) => {
 								}
 							}
 						});
-					} else if (res.data.code == 401) {
+					} else if (res.data.code == 401 || res.data.code == 499) {
 						uni.showModal({
 							title: "提示",
 							content: res.data.message,