MS-CIAZDCOIXVRW\Administrator преди 3 години
родител
ревизия
b0b3c27d37
променени са 73 файла, в които са добавени 917 реда и са изтрити 767 реда
  1. 22 20
      components/chocolate-progress-bar/chocolate-progress-bar.vue
  2. 4 3
      pages.json
  3. 17 20
      pages/cardRecord/cardRecord.vue
  4. 110 62
      pages/editRules/editRules.vue
  5. 61 48
      pages/home/home.vue
  6. 12 10
      pages/index/index.vue
  7. 24 19
      pages/stat/stat.vue
  8. 17 23
      pages/statDetail/statDetail.vue
  9. BIN
      static/headImage.png
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/chocolate-progress-bar/chocolate-progress-bar.js.map
  13. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tki-tree/tki-tree.js.map
  14. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/404/404.js.map
  15. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/addLocation/addLocation.js.map
  16. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/addRules/addRules.js.map
  17. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/authentication/authentication.js.map
  18. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cardRecord/cardRecord.js.map
  19. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/editRules/editRules.js.map
  20. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/group/group.js.map
  21. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/home.js.map
  22. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  23. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/location/location.js.map
  24. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map
  25. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/particulars/particulars.js.map
  26. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/powerSet/powerSet.js.map
  27. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/punchLocation/punchLocation.js.map
  28. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/punchTime/punchTime.js.map
  29. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/ruleName/ruleName.js.map
  30. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/ruleSet/ruleSet.js.map
  31. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/rulesDetail/rulesDetail.js.map
  32. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/setPunchTime/setPunchTime.js.map
  33. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/stat/stat.js.map
  34. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/statDetail/statDetail.js.map
  35. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/jlk-week/components/jlk-week/jlk-week.js.map
  36. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.js.map
  37. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.js.map
  38. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js.map
  39. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js.map
  40. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map
  41. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  42. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.js.map
  43. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js.map
  44. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js.map
  45. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.js.map
  46. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/zwx-dropDown/components/zwx-dropDown/zwx-dropDown.js.map
  47. 69 69
      unpackage/dist/dev/mp-weixin/common/vendor.js
  48. 20 19
      unpackage/dist/dev/mp-weixin/components/chocolate-progress-bar/chocolate-progress-bar.js
  49. 18 18
      unpackage/dist/dev/mp-weixin/pages/addLocation/addLocation.js
  50. 2 2
      unpackage/dist/dev/mp-weixin/pages/addRules/addRules.js
  51. 19 17
      unpackage/dist/dev/mp-weixin/pages/cardRecord/cardRecord.js
  52. 1 1
      unpackage/dist/dev/mp-weixin/pages/cardRecord/cardRecord.wxml
  53. 0 4
      unpackage/dist/dev/mp-weixin/pages/cardRecord/cardRecord.wxss
  54. 149 79
      unpackage/dist/dev/mp-weixin/pages/editRules/editRules.js
  55. 2 2
      unpackage/dist/dev/mp-weixin/pages/group/group.js
  56. 70 58
      unpackage/dist/dev/mp-weixin/pages/home/home.js
  57. 1 1
      unpackage/dist/dev/mp-weixin/pages/home/home.wxml
  58. 26 24
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  59. 1 1
      unpackage/dist/dev/mp-weixin/pages/location/location.js
  60. 30 30
      unpackage/dist/dev/mp-weixin/pages/my/my.js
  61. 21 21
      unpackage/dist/dev/mp-weixin/pages/particulars/particulars.js
  62. 2 2
      unpackage/dist/dev/mp-weixin/pages/powerSet/powerSet.js
  63. 19 19
      unpackage/dist/dev/mp-weixin/pages/punchLocation/punchLocation.js
  64. 16 16
      unpackage/dist/dev/mp-weixin/pages/punchTime/punchTime.js
  65. 19 19
      unpackage/dist/dev/mp-weixin/pages/ruleSet/ruleSet.js
  66. 16 16
      unpackage/dist/dev/mp-weixin/pages/rulesDetail/rulesDetail.js
  67. 18 18
      unpackage/dist/dev/mp-weixin/pages/setPunchTime/setPunchTime.js
  68. 64 54
      unpackage/dist/dev/mp-weixin/pages/stat/stat.js
  69. 27 28
      unpackage/dist/dev/mp-weixin/pages/statDetail/statDetail.js
  70. 1 1
      unpackage/dist/dev/mp-weixin/pages/statDetail/statDetail.wxml
  71. 0 4
      unpackage/dist/dev/mp-weixin/pages/statDetail/statDetail.wxss
  72. BIN
      unpackage/dist/dev/mp-weixin/static/headImage.png
  73. 2 2
      unpackage/dist/dev/mp-weixin/uni_modules/zwx-dropDown/components/zwx-dropDown/zwx-dropDown.js

+ 22 - 20
components/chocolate-progress-bar/chocolate-progress-bar.vue

@@ -19,12 +19,12 @@
 			},
 			progress_total: {
 				type: Number,
-				default: 100
+				default: 0
 			}
 		},
 		onReady() {
 			this.drawProgressbg();
-			this.drawCircle(this.progress_txt/this.progress_total*100); //参数为1-100
+			this.drawCircle(this.progress_txt / this.progress_total * 100); //参数为1-100
 		},
 		methods: {
 			drawProgressbg() {
@@ -40,26 +40,28 @@
 				ctx.draw();
 			},
 			drawCircle(step) {
-				if(step==0){
+				if (step == 0 || Object.is(step, NaN)) {
 					return
+				} else {
+					var ctx = uni.createCanvasContext('cpbar', this);
+					// 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
+					var gradient = ctx.createLinearGradient(28, 55, 192, 55);
+					gradient.addColorStop('0', '#2A82E4');
+					gradient.addColorStop('1.0', '#2A82E4');
+					ctx.setLineWidth(8);
+					ctx.setStrokeStyle(gradient);
+					ctx.setLineCap('round');
+					ctx.beginPath();
+					// 参数step 为绘制的百分比
+					step = 0.015 * step + 0.75;
+					if (step >= 2.25) {
+						step = 0.15
+					}
+					ctx.arc(80, 60, 55, 0.85 * Math.PI, step * Math.PI, false);
+					ctx.stroke();
+					ctx.draw();
 				}
-				var ctx = uni.createCanvasContext('cpbar', this);
-				// 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
-				var gradient = ctx.createLinearGradient(28, 55, 192, 55);
-				gradient.addColorStop('0', '#2A82E4');
-				gradient.addColorStop('1.0', '#2A82E4');
-				ctx.setLineWidth(8);
-				ctx.setStrokeStyle(gradient);
-				ctx.setLineCap('round');
-				ctx.beginPath();
-				// 参数step 为绘制的百分比
-				step = 0.015 * step + 0.75;
-				if (step >= 2) {
-					step = step % 2;
-				}
-				ctx.arc(80, 60, 55, 0.85 * Math.PI, step * Math.PI, false);
-				ctx.stroke();
-				ctx.draw();
+
 			}
 		}
 	};

+ 4 - 3
pages.json

@@ -1,18 +1,19 @@
 {
-	"pages": [{
+	"pages": [
+		{
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "授权中",
 				"enablePullDownRefresh": false
 			}
-		}, {
+		},{
 			"path": "pages/home/home",
 			"style": {
 				"navigationBarTitleText": "智慧校园打卡",
 				// "navigationStyle": "custom",
 				"enablePullDownRefresh": false
 			}
-		}, {
+		},  {
 			"path": "pages/404/404",
 			"style": {
 				"navigationBarTitleText": "404",

+ 17 - 20
pages/cardRecord/cardRecord.vue

@@ -41,14 +41,14 @@
 				<!-- 人物信息区域 -->
 				<view class="person">
 					<view class="img">
-						<img :src="item.headImage">
+						<img :src="item.headImage||'../../static/headImage.png'">
 					</view>
 					<view class="info">
 						<view class="name">
 							{{item.name}}
 						</view>
 						<view class="college">
-							{{item.college}}
+							{{item.college?item.college:"南昌交通学院"}}
 						</view>
 					</view>
 				</view>
@@ -56,7 +56,7 @@
 				<view class="imgs" v-if="item.status==4">
 					<view class="imgs_item">
 						<view class="image">
-							<img :src="item.faceImage">
+							<img :src="item.faceImage||'../../static/headImage.png'">
 						</view>
 						<view class="title">
 							匹对照片
@@ -65,7 +65,7 @@
 
 					<view class="imgs_item">
 						<view class="image">
-							<img :src="item.matchFaceImage">
+							<img :src="item.matchFaceImage||'../../static/headImage.png'">
 						</view>
 						<view class="title">
 							被匹对照片
@@ -74,7 +74,7 @@
 
 					<view class="imgs_item">
 						<view class="image">
-							<img :src="item.sceneImage">
+							<img :src="item.sceneImage||'../../static/headImage.png'">
 						</view>
 						<view class="title">
 							场景照片
@@ -127,11 +127,6 @@
 			</view>
 		</view>
 
-		<!-- 底线区域 -->
-		<view class="foot" v-if="flag">
-			------我是有底线的------
-		</view>
-
 	</view>
 </template>
 
@@ -159,8 +154,6 @@
 				current: 0,
 				// 列表数组
 				list: [],
-				// 底线区域显示隐藏控制标识
-				flag: false,
 			};
 		},
 		onLoad() {
@@ -173,7 +166,10 @@
 				this.page++
 				this.getListData()
 			} else {
-				this.flag = true
+				uni.showToast({
+					title: "没有更多数据了",
+					icon: 'none'
+				})
 			}
 		},
 		computed: {
@@ -195,7 +191,6 @@
 
 			// 获取打卡记录列表数组
 			async getListData() {
-				this.flag = false
 				this.time = this.year + "-" + this.format_month + "-01 00:00:00"
 				let res = await this.$myRequest({
 					url: "/attendance/api/sign/check/in/list/month",
@@ -209,12 +204,13 @@
 				// console.log(res);
 				if (res.code == 200) {
 					this.total = res.data.total
-					this.list = [...res.data.list, ...this.list]
+					this.list = [...this.list, ...res.data.list]
 				}
 			},
 
 			// 点击分段器回调
 			onClickItem(e) {
+				this.list = []
 				if (e.currentIndex == 0) {
 					this.status = ""
 				} else if (e.currentIndex == 1) {
@@ -234,6 +230,7 @@
 						icon: 'none'
 					})
 				} else {
+					this.list = []
 					this.year -= 1
 					this.page = 1
 					this.getListData()
@@ -248,6 +245,7 @@
 						icon: 'none'
 					})
 				} else {
+					this.list = []
 					this.year += 1
 					this.page = 1
 					this.getListData()
@@ -263,12 +261,14 @@
 							icon: 'none'
 						})
 					} else {
+						this.list = []
 						this.year -= 1
 						this.month = 12
 						this.page = 1
 						this.getListData()
 					}
 				} else {
+					this.list = []
 					this.month -= 1
 					this.page = 1
 					this.getListData()
@@ -284,12 +284,14 @@
 							icon: 'none'
 						})
 					} else {
+						this.list = []
 						this.year += 1
 						this.month = 1
 						this.page = 1
 						this.getListData()
 					}
 				} else {
+					this.list = []
 					this.month += 1
 					this.page = 1
 					this.getListData()
@@ -486,10 +488,5 @@
 				color: #5792F0;
 			}
 		}
-
-		.foot {
-			padding-bottom: 20rpx;
-			text-align: center;
-		}
 	}
 </style>

+ 110 - 62
pages/editRules/editRules.vue

@@ -128,23 +128,25 @@
 				index: 0,
 				id: "",
 				groupIds: [],
-				timeGroups: []
+				timeGroups: [],
+				locations: []
 			};
 		},
 		onLoad(option) {
 			uni.removeStorageSync("chooseList_edit")
 			uni.removeStorageSync("ruleTime_edit")
 			uni.removeStorageSync("flag")
+
 			uni.$on('updateRuleName', (data) => {
 				this.ruleName = data
 			})
 
 			uni.$on('updateRuleGroup', (data) => {
 				let temList = []
+				this.groupIds = []
 				data.forEach((ele) => {
-					temList.push(
-						ele.name
-					)
+					temList.push(ele.name)
+					this.groupIds.push(ele.id)
 				})
 				this.group = temList.join(",")
 			})
@@ -170,15 +172,67 @@
 			}
 		},
 		onShow() {
+
 			let rulePlace = uni.getStorageSync("chooseList") || uni.getStorageSync("chooseList_edit")
 			if (rulePlace) {
+				this.locations = rulePlace
 				let temList = []
 				rulePlace.forEach((ele) => {
 					temList.push(ele.name)
 				})
 				this.place = temList.join(",")
 			}
-			
+
+			let ruleTime = uni.getStorageSync("ruleTime") || uni.getStorageSync("ruleTime_edit")
+			let flag = uni.getStorageSync("flag")
+
+			if (ruleTime.length == 0 && flag) {
+				this.time = "未设置"
+			}
+			if (ruleTime.length > 0) {
+
+				let temList = []
+				ruleTime.forEach((ele) => {
+					temList.push({
+						dayOfWeeks: ele.selectedWeeks,
+						periods: ele.list
+					})
+				})
+				this.periods = []
+				this.time = []
+				temList.forEach((element) => {
+					this.time.push(element.dayOfWeeks.join(","))
+					this.periods.push(element.periods[0])
+				})
+
+				temList.forEach((item) => {
+					item.dayOfWeeks = item.dayOfWeeks.map((element) => {
+						if (element == '星期一') {
+							return element = 1
+						}
+						if (element == '星期二') {
+							return element = 2
+						}
+						if (element == '星期三') {
+							return element = 3
+						}
+						if (element == '星期四') {
+							return element = 4
+						}
+						if (element == '星期五') {
+							return element = 5
+						}
+						if (element == '星期六') {
+							return element = 6
+						}
+						if (element == '星期天') {
+							return element = 7
+						}
+					})
+				})
+				this.timeGroups = temList
+			}
+
 			// let ruleTime = uni.getStorageSync("ruleTime_edit")
 			// console.log(ruleTime);
 			// if (ruleTime) {
@@ -232,61 +286,6 @@
 			// 		})
 			// 		this.group = temList.join(",")
 			// 	}
-
-				let ruleTime = uni.getStorageSync("ruleTime")||uni.getStorageSync("ruleTime_edit")
-				let flag = uni.getStorageSync("flag")
-				// console.log(ruleTime);
-				// console.log(flag);
-				if (ruleTime.length == 0 && flag) {
-					this.time = "未设置"
-				}
-				if (ruleTime.length > 0) {
-					// this.time = ruleTime[0].selectedWeeks
-					// this.periods = ruleTime[0].list
-					// this.time = ruleTime
-					let temList = []
-					ruleTime.forEach((ele) => {
-						temList.push({
-							dayOfWeeks: ele.selectedWeeks,
-							periods: ele.list
-						})
-					})
-					// temList.forEach((item) => {
-					// 	item.dayOfWeeks = item.dayOfWeeks.map((element) => {
-					// 		if (element == '星期一') {
-					// 			return element = 1
-					// 		}
-					// 		if (element == '星期二') {
-					// 			return element = 2
-					// 		}
-					// 		if (element == '星期三') {
-					// 			return element = 3
-					// 		}
-					// 		if (element == '星期四') {
-					// 			return element = 4
-					// 		}
-					// 		if (element == '星期五') {
-					// 			return element = 5
-					// 		}
-					// 		if (element == '星期六') {
-					// 			return element = 6
-					// 		}
-					// 		if (element == '星期天') {
-					// 			return element = 7
-					// 		}
-					// 	})
-					// })
-					this.periods = []
-					this.time = []
-					temList.forEach((element)=>{
-						this.time.push(element.dayOfWeeks.join(","))
-						this.periods.push(element.periods[0])
-					})
-					this.timeGroups = temList
-					console.log(temList);
-				}
-				console.log(this.periods);
-				console.log(this.time);
 		},
 		methods: {
 			// 点击确认按钮回调
@@ -333,10 +332,51 @@
 				uni.showModal({
 					title: '提示',
 					content: '确定修改吗?',
-					success: (res) => {
+					success: async (res) => {
 						if (res.confirm) {
 
-							console.log('用户点击确定');
+							let temList = []
+							this.timeGroups.forEach((ele) => {
+								ele.periods.forEach((item) => {
+									temList.push({
+										beginTime: this.formatTime(item.beginTime),
+										endTime: this.formatTime(item.endTime)
+									})
+								})
+								ele.periods = temList
+							})
+
+							let res = await this.$myRequest({
+								url: "/attendance/api/settings/rule/update",
+								method: "put",
+								header: {
+									'Authorization': uni.getStorageSync("token") ||
+										'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo1MDQ2LCJ1c2VyX3V1aWQiOjEzNDc3NzE0NzM1NTY5NzE1MiwibmJmIjoxNjcxMTU1ODQzfQ.u4-N762Ijfb9RkuuFOFkeMiJQI9uCi0IaheJlGwi5Ms'
+								},
+								data: {
+									// 编辑的规则id
+									id: this.id,
+									// 是否需要人脸识别
+									faceRecognition: true,
+									// 考勤组ID列表
+									groupIds: this.groupIds,
+									// 是否同步节假日
+									holiday: true,
+									// 是否可选择本地图片
+									localPicture: false,
+									// 规则名称
+									name: this.ruleName,
+									// 提前通知时间
+									noticeTime: this.value,
+									// 是否需要场景拍照
+									takePicture: true,
+									// 打卡地点列表
+									locations: this.locations,
+									// 打卡时间列表
+									timeGroups: this.timeGroups
+								}
+							})
+							console.log(res);
 
 						} else if (res.cancel) {}
 					}
@@ -420,6 +460,14 @@
 				var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
 				let strDate = h + m;
 				return strDate;
+			},
+			// 格式化时间
+			formatTime(val) {
+				let tem = '2021-11-22 ' + val + ':00'
+				// console.log(tem);
+				let date = new Date(tem);
+				let time = date.getTime();
+				return time
 			}
 		}
 	}

+ 61 - 48
pages/home/home.vue

@@ -3,8 +3,7 @@
 		<!-- 头部学生信息区域 -->
 		<view class="header">
 			<view class="img">
-				<img
-					:src="userInfo.headImage||'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F7974778847%2F1000&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1673765601&t=e38144720930d00c5bf59536379da218'">
+				<img :src="userInfo.headImage||'../../static/headImage.png'">
 			</view>
 			<view class="msg">
 				<view class="name">
@@ -30,9 +29,9 @@
 							{{item.timeRange}}
 						</view>
 						<view class="type">
-							<img v-if="item.finish" src="./imgs/success.png">
-							<span v-if="item.finish">{{item.updateTime}}</span>
-							{{item.finish?"已打卡":"未打卡"}}
+							<img v-if="item.updateTime" src="./imgs/success.png">
+							<span v-if="item.updateTime">{{item.updateTime}}</span>
+							{{item.updateTime?"已打卡":"未打卡"}}
 						</view>
 					</view>
 				</view>
@@ -43,7 +42,7 @@
 
 			<!-- 打卡区域 -->
 			<view :class="{clock:flags,active:!flags}" @click="handlePunch">
-				<view class="info" v-if="flags&&list.length">
+				<view class="info" v-if="flags">
 					打卡
 				</view>
 				<view class="info" v-else>
@@ -53,27 +52,31 @@
 					{{nowTime}}
 				</view>
 			</view>
+			
+			<!-- 提示信息位置 -->
+			<view class="address" v-if="flags">
+				{{notes}}
+			</view>
 
-			<!-- 位置信息区域 -->
-			<view class="address" v-if="flags&&list.length">
-				{{address}}
+			<view class="address" v-if="!flags">
+				无打卡任务无需打卡
 			</view>
-			<view class="address" v-if="addressFlags&&!flags">
+
+			<!-- <view class="address" v-if="addressFlags&&!flags">
 				不在管理员设定范围打卡
 			</view>
 			<view class="address" v-if="timeFlags&&!flags">
 				未到打卡时间无法打卡
 			</view>
-			<view class="address" v-if="!list.length">
-				无打卡任务无需打卡
-			</view>
+			
 			<view class="address" v-if="!list.length">
 				今日休息无需打卡
 			</view>
 
 			<view class="address" v-if="!list.length">
 				下一次打卡时间段为18:00-19:00
-			</view>
+			</view> -->
+
 		</view>
 	</view>
 </template>
@@ -88,17 +91,25 @@
 				userInfo: {},
 				// 打卡规则列表
 				list: [],
-				flags: true,
+				// 是否在打卡范围内标识
 				addressFlags: false,
+				// 是否在打卡时间内标识
 				timeFlags: false,
 				// 当前时间
 				nowTime: "",
 				// 当前定位位置信息
 				address: "",
 				// 定时器标识
-				timer: null
+				timer: null,
+				notes:""
 			};
 		},
+		computed: {
+			// 是否有打卡任务的标识
+			flags() {
+				return this.list.length ? true : false
+			}
+		},
 		onLoad() {
 			uni.removeStorageSync("manager")
 			uni.removeStorageSync("sub-administrator")
@@ -166,7 +177,7 @@
 						// console.log(res);
 						if (res.status == 0) {
 							// 获取详细地址信息
-							this.address = res.result.address
+							this.notes = res.result.address
 						} else {
 							uni.showToast({
 								title: "请求定位失败",
@@ -178,45 +189,47 @@
 			},
 			// 获取打卡规则列表
 			async getRulesList() {
-				let name = uni.getStorageSync("userInfo").username
+				// let name = uni.getStorageSync("userInfo").username
 				let res = await this.$myRequest({
-					url: "/attendance/api/sign/check/in/list",
-					data: {
-						name: name ? name : "",
-						size: 999
-					}
+					url: "/attendance/api/sign/check/in/list/today",
+					// data: {
+					// 	name: name ? name : "",
+					// 	size: 999
+					// }
 				})
 				// console.log(res);
 				if (res.code == 200) {
-					this.list = res.data.list
+					this.list = res.data.reverse()
 				}
 			},
 			// 点击打卡按钮回调
 			handlePunch() {
-				// 获取用户位置权限
-				uni.authorize({
-					scope: 'scope.userLocation',
-					success() {
-						uni.navigateTo({
-							url: "/pages/location/location"
-						})
-					},
-					fail() {
-						uni.showModal({
-							title: '提示',
-							content: '请先开启定位权限,否则将无法使用定位功能',
-							cancelText: '不授权',
-							confirmText: '授权',
-							success: function(res) {
-								if (res.confirm) {
-									uni.openSetting({
-										success(res) {}
-									})
-								} else if (res.cancel) {}
-							}
-						});
-					}
-				})
+				if (this.flags) {
+					// 获取用户位置权限
+					uni.authorize({
+						scope: 'scope.userLocation',
+						success() {
+							uni.navigateTo({
+								url: "/pages/location/location"
+							})
+						},
+						fail() {
+							uni.showModal({
+								title: '提示',
+								content: '请先开启定位权限,否则将无法使用定位功能',
+								cancelText: '不授权',
+								confirmText: '授权',
+								success: function(res) {
+									if (res.confirm) {
+										uni.openSetting({
+											success(res) {}
+										})
+									} else if (res.cancel) {}
+								}
+							});
+						}
+					})
+				}
 			},
 		}
 	}

+ 12 - 10
pages/index/index.vue

@@ -30,14 +30,13 @@
 			// 检查是否存在用户信息
 			hasUserInfo() {
 				let userInfo = uni.getStorageSync('userInfo');
-				console.log(userInfo);
+				// console.log(userInfo);
 				if (userInfo) {
-					// this.showLogin = false
-					uni.navigateTo({
+					uni.reLaunch({
 						url: "/pages/home/home"
 					})
 				} else {
-					console.log("重新授权");
+					// console.log("重新授权");
 					this.showLogin = true
 					this.visible = true
 				}
@@ -45,21 +44,21 @@
 
 			// 授权成功回调
 			loginSuccess(res) {
-				console.log("成功");
+				// console.log("成功");
 				let wxcode = res.detail.wxcode
 				// 获取wxcode后请求登录
 				this.login(wxcode)
 			},
 			// 授权失败回调
 			loginFail() {
-				console.log("授权失败");
+				// console.log("授权失败");
 				uni.showModal({
 					title: '提示',
 					content: '授权:请先领取校园卡、并激活!',
 					confirmText: '领取',
 					success: (res) => {
 						if (res.confirm) {
-							uni.navigateTo({
+							uni.reLaunch({
 								url: "/pages/qr_code/qr_code"
 							});
 						} else if (res.cancel) {
@@ -72,7 +71,7 @@
 			},
 			// 授权取消回调
 			loginCancel() {
-				console.log("取消");
+				// console.log("取消");
 				uni.showModal({
 					title: '提示',
 					content: '请先授权,否则无法使用该功能',
@@ -91,10 +90,14 @@
 				});
 			},
 
+			// 用户登陆获取个人信息和token
 			async login(wxcode) {
 				let res = await this.$myRequest({
 					url: "/attendance/api/system/user/login/app",
 					method: "post",
+					header:{
+						'content-type': 'application/json',
+					},
 					data: {
 						redirect_uri: `mnp://${this.appid}`,
 						wxcode,
@@ -104,8 +107,7 @@
 				if (res.code == 200) {
 					uni.setStorageSync("userInfo", res.data)
 					uni.setStorageSync("token", res.data.token)
-					// uni.setStorageSync("userId", res.data.id)
-					uni.navigateTo({
+					uni.reLaunch({
 						url: "/pages/home/home"
 					})
 				} else {

+ 24 - 19
pages/stat/stat.vue

@@ -156,23 +156,23 @@
 			return {
 				flag: false,
 				// 有标记点的数组日期
-				list: [{
-						date: "2022-12-20",
-						info: ''
-					},
-					{
-						date: "2022-12-21",
-						info: '',
-						data: {
-							custom: '自定义信息',
-							name: '自定义消息头'
-						}
-					},
-					{
-						date: "2022-12-22",
-						info: ''
-					}
-				],
+				// list: [{
+				// 		date: "2022-12-20",
+				// 		info: ''
+				// 	},
+				// 	{
+				// 		date: "2022-12-21",
+				// 		info: '',
+				// 		data: {
+				// 			custom: '自定义信息',
+				// 			name: '自定义消息头'
+				// 		}
+				// 	},
+				// 	{
+				// 		date: "2022-12-22",
+				// 		info: ''
+				// 	}
+				// ],
 				// 考勤规则列表
 				list2: [],
 				month: null,
@@ -228,11 +228,15 @@
 		watch: {
 			progress_txt() {
 				this.showBar = false
-				this.showBar = true
+				setTimeout(() => {
+					this.showBar = true
+				}, 10)
 			},
 			progress_total() {
 				this.showBar = false
-				this.showBar = true
+				setTimeout(() => {
+					this.showBar = true
+				}, 10)
 			},
 		},
 		onReachBottom() {
@@ -357,6 +361,7 @@
 				if (this.current == 0) {
 					this.getProportion()
 				} else {
+					this.list2 = []
 					this.page_my = 1
 					this.getRulesList()
 				}

+ 17 - 23
pages/statDetail/statDetail.vue

@@ -41,14 +41,14 @@
 				<!-- 人物信息区域 -->
 				<view class="person">
 					<view class="img">
-						<img :src="item.headImage">
+						<img :src="item.headImage||'../../static/headImage.png'">
 					</view>
 					<view class="info">
 						<view class="name">
 							{{item.name}}
 						</view>
 						<view class="college">
-							{{item.college}}
+							{{item.college?item.college:"南昌交通学院"}}
 						</view>
 					</view>
 				</view>
@@ -56,7 +56,7 @@
 				<view class="imgs" v-if="item.status==4">
 					<view class="imgs_item">
 						<view class="image">
-							<img :src="item.faceImage">
+							<img :src="item.faceImage||'../../static/headImage.png'">
 						</view>
 						<view class="title">
 							匹对照片
@@ -65,7 +65,7 @@
 
 					<view class="imgs_item">
 						<view class="image">
-							<img :src="item.matchFaceImage">
+							<img :src="item.matchFaceImage||'../../static/headImage.png'">
 						</view>
 						<view class="title">
 							被匹对照片
@@ -73,7 +73,7 @@
 					</view>
 					<view class="imgs_item">
 						<view class="image">
-							<img :src="item.sceneImage">
+							<img :src="item.sceneImage||'../../static/headImage.png'">
 						</view>
 						<view class="title">
 							场景照片
@@ -127,11 +127,6 @@
 			</view>
 		</view>
 
-		<!-- 底线区域 -->
-		<view class="foot" v-if="flag">
-			------我是有底线的------
-		</view>
-
 	</view>
 </template>
 
@@ -149,8 +144,6 @@
 				current: 0,
 				// 第几页
 				page: 1,
-				// 每页条数
-				size: 10,
 				// 数据总条数
 				total: 0,
 				// 打卡状态参数
@@ -159,8 +152,6 @@
 				time: null,
 				// 列表数组
 				list: [],
-				// 底线区域显示隐藏控制标识
-				flag: false,
 			};
 		},
 		onLoad() {
@@ -173,7 +164,10 @@
 				this.page++
 				this.getListData()
 			} else {
-				this.flag = true
+				uni.showToast({
+					title: "没有更多数据了",
+					icon: 'none'
+				})
 			}
 		},
 		computed: {
@@ -196,13 +190,11 @@
 
 			// 获取打卡记录列表数组
 			async getListData() {
-				this.flag = false
 				this.time = this.year + "-" + this.format_month + "-01 00:00:00"
 				let res = await this.$myRequest({
 					url: "/attendance/api/sign/check/in/list/month",
 					data: {
 						page: this.page,
-						size: this.size,
 						status: this.status,
 						time: this.time
 					}
@@ -210,7 +202,7 @@
 				// console.log(res);
 				if (res.code == 200) {
 					this.total = res.data.total
-					this.list = [...res.data.list, ...this.list]
+					this.list = [...this.list,...res.data.list]
 					if (this.status == 4) {
 						this.items[0] = `打卡成功(${this.total}次)`
 						this.items[1] = `打卡失败`
@@ -223,6 +215,7 @@
 
 			// 点击分段器回调
 			onClickItem(e) {
+				this.list = []
 				// console.log(e.currentIndex);
 				if (e.currentIndex == 0) {
 					this.status = 4
@@ -241,6 +234,7 @@
 						icon: 'none'
 					})
 				} else {
+					this.list = []
 					this.year -= 1
 					this.page = 1
 					this.getListData()
@@ -254,6 +248,7 @@
 						icon: 'none'
 					})
 				} else {
+					this.list = []
 					this.year += 1
 					this.page = 1
 					this.getListData()
@@ -268,12 +263,14 @@
 							icon: 'none'
 						})
 					} else {
+						this.list = []
 						this.year -= 1
 						this.month = 12
 						this.page = 1
 						this.getListData()
 					}
 				} else {
+					this.list = []
 					this.month -= 1
 					this.page = 1
 					this.getListData()
@@ -289,12 +286,14 @@
 							icon: 'none'
 						})
 					} else {
+						this.list = []
 						this.year += 1
 						this.month = 1
 						this.page = 1
 						this.getListData()
 					}
 				} else {
+					this.list = []
 					this.month += 1
 					this.page = 1
 					this.getListData()
@@ -492,10 +491,5 @@
 				color: #5792F0;
 			}
 		}
-
-		.foot {
-			padding-bottom: 20rpx;
-			text-align: center;
-		}
 	}
 </style>

BIN
static/headImage.png


Файловите разлики са ограничени, защото са твърде много
+ 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/index/index.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


Файловите разлики са ограничени, защото са твърде много
+ 69 - 69
unpackage/dist/dev/mp-weixin/common/vendor.js


+ 20 - 19
unpackage/dist/dev/mp-weixin/components/chocolate-progress-bar/chocolate-progress-bar.js

@@ -140,7 +140,7 @@ var _default = {
     },
     progress_total: {
       type: Number,
-      default: 100
+      default: 0
     }
   },
   onReady: function onReady() {
@@ -162,26 +162,27 @@ var _default = {
       ctx.draw();
     },
     drawCircle: function drawCircle(step) {
-      if (step == 0) {
+      if (step == 0 || Object.is(step, NaN)) {
         return;
+      } else {
+        var ctx = uni.createCanvasContext('cpbar', this);
+        // 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
+        var gradient = ctx.createLinearGradient(28, 55, 192, 55);
+        gradient.addColorStop('0', '#2A82E4');
+        gradient.addColorStop('1.0', '#2A82E4');
+        ctx.setLineWidth(8);
+        ctx.setStrokeStyle(gradient);
+        ctx.setLineCap('round');
+        ctx.beginPath();
+        // 参数step 为绘制的百分比
+        step = 0.015 * step + 0.75;
+        if (step >= 2.25) {
+          step = 0.15;
+        }
+        ctx.arc(80, 60, 55, 0.85 * Math.PI, step * Math.PI, false);
+        ctx.stroke();
+        ctx.draw();
       }
-      var ctx = uni.createCanvasContext('cpbar', this);
-      // 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
-      var gradient = ctx.createLinearGradient(28, 55, 192, 55);
-      gradient.addColorStop('0', '#2A82E4');
-      gradient.addColorStop('1.0', '#2A82E4');
-      ctx.setLineWidth(8);
-      ctx.setStrokeStyle(gradient);
-      ctx.setLineCap('round');
-      ctx.beginPath();
-      // 参数step 为绘制的百分比
-      step = 0.015 * step + 0.75;
-      if (step >= 2) {
-        step = step % 2;
-      }
-      ctx.arc(80, 60, 55, 0.85 * Math.PI, step * Math.PI, false);
-      ctx.stroke();
-      ctx.draw();
     }
   }
 };

Файловите разлики са ограничени, защото са твърде много
+ 18 - 18
unpackage/dist/dev/mp-weixin/pages/addLocation/addLocation.js


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

@@ -159,8 +159,8 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 39));
-var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 41));
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
 //
 //
 //

+ 19 - 17
unpackage/dist/dev/mp-weixin/pages/cardRecord/cardRecord.js

@@ -139,7 +139,7 @@ var render = function () {
         }
       })
     : null
-  var m5 = _vm.list.length == 0 ? __webpack_require__(/*! ../../static/nodata.png */ 167) : null
+  var m5 = _vm.list.length == 0 ? __webpack_require__(/*! ../../static/nodata.png */ 88) : null
   _vm.$mp.data = Object.assign(
     {},
     {
@@ -193,14 +193,9 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 39));
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
 var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 17));
-var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 41));
-//
-//
-//
-//
-//
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
 //
 //
 //
@@ -355,9 +350,7 @@ var _default = {
       // 当前所在分段器索引
       current: 0,
       // 列表数组
-      list: [],
-      // 底线区域显示隐藏控制标识
-      flag: false
+      list: []
     };
   },
   onLoad: function onLoad() {
@@ -370,7 +363,10 @@ var _default = {
       this.page++;
       this.getListData();
     } else {
-      this.flag = true;
+      uni.showToast({
+        title: "没有更多数据了",
+        icon: 'none'
+      });
     }
   },
   computed: {
@@ -398,9 +394,8 @@ var _default = {
           while (1) {
             switch (_context.prev = _context.next) {
               case 0:
-                _this.flag = false;
                 _this.time = _this.year + "-" + _this.format_month + "-01 00:00:00";
-                _context.next = 4;
+                _context.next = 3;
                 return _this.$myRequest({
                   url: "/attendance/api/sign/check/in/list/month",
                   data: {
@@ -410,14 +405,14 @@ var _default = {
                     time: _this.time
                   }
                 });
-              case 4:
+              case 3:
                 res = _context.sent;
                 // console.log(res);
                 if (res.code == 200) {
                   _this.total = res.data.total;
-                  _this.list = [].concat((0, _toConsumableArray2.default)(res.data.list), (0, _toConsumableArray2.default)(_this.list));
+                  _this.list = [].concat((0, _toConsumableArray2.default)(_this.list), (0, _toConsumableArray2.default)(res.data.list));
                 }
-              case 6:
+              case 5:
               case "end":
                 return _context.stop();
             }
@@ -427,6 +422,7 @@ var _default = {
     },
     // 点击分段器回调
     onClickItem: function onClickItem(e) {
+      this.list = [];
       if (e.currentIndex == 0) {
         this.status = "";
       } else if (e.currentIndex == 1) {
@@ -445,6 +441,7 @@ var _default = {
           icon: 'none'
         });
       } else {
+        this.list = [];
         this.year -= 1;
         this.page = 1;
         this.getListData();
@@ -458,6 +455,7 @@ var _default = {
           icon: 'none'
         });
       } else {
+        this.list = [];
         this.year += 1;
         this.page = 1;
         this.getListData();
@@ -472,12 +470,14 @@ var _default = {
             icon: 'none'
           });
         } else {
+          this.list = [];
           this.year -= 1;
           this.month = 12;
           this.page = 1;
           this.getListData();
         }
       } else {
+        this.list = [];
         this.month -= 1;
         this.page = 1;
         this.getListData();
@@ -492,12 +492,14 @@ var _default = {
             icon: 'none'
           });
         } else {
+          this.list = [];
           this.year += 1;
           this.month = 1;
           this.page = 1;
           this.getListData();
         }
       } else {
+        this.list = [];
         this.month += 1;
         this.page = 1;
         this.getListData();

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cardRecord/cardRecord.wxml


+ 0 - 4
unpackage/dist/dev/mp-weixin/pages/cardRecord/cardRecord.wxss

@@ -140,8 +140,4 @@
 .container .no_data .info.data-v-5abf34a6 {
   color: #5792F0;
 }
-.container .foot.data-v-5abf34a6 {
-  padding-bottom: 20rpx;
-  text-align: center;
-}
 

+ 149 - 79
unpackage/dist/dev/mp-weixin/pages/editRules/editRules.js

@@ -161,8 +161,8 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 39));
-var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 41));
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
 //
 //
 //
@@ -292,7 +292,8 @@ var _default = {
       index: 0,
       id: "",
       groupIds: [],
-      timeGroups: []
+      timeGroups: [],
+      locations: []
     };
   },
   onLoad: function onLoad(option) {
@@ -305,8 +306,10 @@ var _default = {
     });
     uni.$on('updateRuleGroup', function (data) {
       var temList = [];
+      _this.groupIds = [];
       data.forEach(function (ele) {
         temList.push(ele.name);
+        _this.groupIds.push(ele.id);
       });
       _this.group = temList.join(",");
     });
@@ -332,12 +335,59 @@ var _default = {
     var _this2 = this;
     var rulePlace = uni.getStorageSync("chooseList") || uni.getStorageSync("chooseList_edit");
     if (rulePlace) {
+      this.locations = rulePlace;
       var temList = [];
       rulePlace.forEach(function (ele) {
         temList.push(ele.name);
       });
       this.place = temList.join(",");
     }
+    var ruleTime = uni.getStorageSync("ruleTime") || uni.getStorageSync("ruleTime_edit");
+    var flag = uni.getStorageSync("flag");
+    if (ruleTime.length == 0 && flag) {
+      this.time = "未设置";
+    }
+    if (ruleTime.length > 0) {
+      var _temList = [];
+      ruleTime.forEach(function (ele) {
+        _temList.push({
+          dayOfWeeks: ele.selectedWeeks,
+          periods: ele.list
+        });
+      });
+      this.periods = [];
+      this.time = [];
+      _temList.forEach(function (element) {
+        _this2.time.push(element.dayOfWeeks.join(","));
+        _this2.periods.push(element.periods[0]);
+      });
+      _temList.forEach(function (item) {
+        item.dayOfWeeks = item.dayOfWeeks.map(function (element) {
+          if (element == '星期一') {
+            return element = 1;
+          }
+          if (element == '星期二') {
+            return element = 2;
+          }
+          if (element == '星期三') {
+            return element = 3;
+          }
+          if (element == '星期四') {
+            return element = 4;
+          }
+          if (element == '星期五') {
+            return element = 5;
+          }
+          if (element == '星期六') {
+            return element = 6;
+          }
+          if (element == '星期天') {
+            return element = 7;
+          }
+        });
+      });
+      this.timeGroups = _temList;
+    }
 
     // let ruleTime = uni.getStorageSync("ruleTime_edit")
     // console.log(ruleTime);
@@ -392,65 +442,12 @@ var _default = {
     // 		})
     // 		this.group = temList.join(",")
     // 	}
-
-    var ruleTime = uni.getStorageSync("ruleTime") || uni.getStorageSync("ruleTime_edit");
-    var flag = uni.getStorageSync("flag");
-    // console.log(ruleTime);
-    // console.log(flag);
-    if (ruleTime.length == 0 && flag) {
-      this.time = "未设置";
-    }
-    if (ruleTime.length > 0) {
-      // this.time = ruleTime[0].selectedWeeks
-      // this.periods = ruleTime[0].list
-      // this.time = ruleTime
-      var _temList = [];
-      ruleTime.forEach(function (ele) {
-        _temList.push({
-          dayOfWeeks: ele.selectedWeeks,
-          periods: ele.list
-        });
-      });
-      // temList.forEach((item) => {
-      // 	item.dayOfWeeks = item.dayOfWeeks.map((element) => {
-      // 		if (element == '星期一') {
-      // 			return element = 1
-      // 		}
-      // 		if (element == '星期二') {
-      // 			return element = 2
-      // 		}
-      // 		if (element == '星期三') {
-      // 			return element = 3
-      // 		}
-      // 		if (element == '星期四') {
-      // 			return element = 4
-      // 		}
-      // 		if (element == '星期五') {
-      // 			return element = 5
-      // 		}
-      // 		if (element == '星期六') {
-      // 			return element = 6
-      // 		}
-      // 		if (element == '星期天') {
-      // 			return element = 7
-      // 		}
-      // 	})
-      // })
-      this.periods = [];
-      this.time = [];
-      _temList.forEach(function (element) {
-        _this2.time.push(element.dayOfWeeks.join(","));
-        _this2.periods.push(element.periods[0]);
-      });
-      this.timeGroups = _temList;
-      console.log(_temList);
-    }
-    console.log(this.periods);
-    console.log(this.time);
   },
+
   methods: {
     // 点击确认按钮回调
     handleConfirm: function handleConfirm() {
+      var _this3 = this;
       if (this.ruleName == '未设置') {
         uni.showToast({
           title: "请设置规则名称",
@@ -489,42 +486,107 @@ var _default = {
       uni.showModal({
         title: '提示',
         content: '确定修改吗?',
-        success: function success(res) {
-          if (res.confirm) {
-            console.log('用户点击确定');
-          } else if (res.cancel) {}
-        }
+        success: function () {
+          var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(res) {
+            var temList, _res;
+            return _regenerator.default.wrap(function _callee$(_context) {
+              while (1) {
+                switch (_context.prev = _context.next) {
+                  case 0:
+                    if (!res.confirm) {
+                      _context.next = 9;
+                      break;
+                    }
+                    temList = [];
+                    _this3.timeGroups.forEach(function (ele) {
+                      ele.periods.forEach(function (item) {
+                        temList.push({
+                          beginTime: _this3.formatTime(item.beginTime),
+                          endTime: _this3.formatTime(item.endTime)
+                        });
+                      });
+                      ele.periods = temList;
+                    });
+                    _context.next = 5;
+                    return _this3.$myRequest({
+                      url: "/attendance/api/settings/rule/update",
+                      method: "put",
+                      header: {
+                        'Authorization': uni.getStorageSync("token") || 'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo1MDQ2LCJ1c2VyX3V1aWQiOjEzNDc3NzE0NzM1NTY5NzE1MiwibmJmIjoxNjcxMTU1ODQzfQ.u4-N762Ijfb9RkuuFOFkeMiJQI9uCi0IaheJlGwi5Ms'
+                      },
+                      data: {
+                        // 编辑的规则id
+                        id: _this3.id,
+                        // 是否需要人脸识别
+                        faceRecognition: true,
+                        // 考勤组ID列表
+                        groupIds: _this3.groupIds,
+                        // 是否同步节假日
+                        holiday: true,
+                        // 是否可选择本地图片
+                        localPicture: false,
+                        // 规则名称
+                        name: _this3.ruleName,
+                        // 提前通知时间
+                        noticeTime: _this3.value,
+                        // 是否需要场景拍照
+                        takePicture: true,
+                        // 打卡地点列表
+                        locations: _this3.locations,
+                        // 打卡时间列表
+                        timeGroups: _this3.timeGroups
+                      }
+                    });
+                  case 5:
+                    _res = _context.sent;
+                    console.log(_res);
+                    _context.next = 10;
+                    break;
+                  case 9:
+                    if (res.cancel) {}
+                  case 10:
+                  case "end":
+                    return _context.stop();
+                }
+              }
+            }, _callee);
+          }));
+          function success(_x) {
+            return _success.apply(this, arguments);
+          }
+          return success;
+        }()
       });
     },
     // 点击删除按钮回调
     handleDelete: function handleDelete() {
-      var _this3 = this;
+      var _this4 = this;
       uni.showModal({
         title: '提示',
         content: '确定删除吗?',
         success: function () {
-          var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(res) {
-            var _res;
-            return _regenerator.default.wrap(function _callee$(_context) {
+          var _success2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(res) {
+            var _res2;
+            return _regenerator.default.wrap(function _callee2$(_context2) {
               while (1) {
-                switch (_context.prev = _context.next) {
+                switch (_context2.prev = _context2.next) {
                   case 0:
                     if (!res.confirm) {
-                      _context.next = 7;
+                      _context2.next = 7;
                       break;
                     }
-                    _context.next = 3;
-                    return _this3.$myRequest({
+                    _context2.next = 3;
+                    return _this4.$myRequest({
                       url: "/attendance/api/settings/rule/delete",
                       method: "delete",
                       data: {
-                        ids: [_this3.id]
+                        ids: [_this4.id]
                       }
                     });
                   case 3:
-                    _res = _context.sent;
+                    _res2 = _context2.sent;
                     // console.log(res);
-                    if (_res.code == 200) {
+                    if (_res2.code == 200) {
                       uni.showToast({
                         title: "删除成功"
                       });
@@ -534,19 +596,19 @@ var _default = {
                         });
                       }, 1500);
                     }
-                    _context.next = 8;
+                    _context2.next = 8;
                     break;
                   case 7:
                     if (res.cancel) {}
                   case 8:
                   case "end":
-                    return _context.stop();
+                    return _context2.stop();
                 }
               }
-            }, _callee);
+            }, _callee2);
           }));
-          function success(_x) {
-            return _success.apply(this, arguments);
+          function success(_x2) {
+            return _success2.apply(this, arguments);
           }
           return success;
         }()
@@ -601,6 +663,14 @@ var _default = {
       var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
       var strDate = h + m;
       return strDate;
+    },
+    // 格式化时间
+    formatTime: function formatTime(val) {
+      var tem = '2021-11-22 ' + val + ':00';
+      // console.log(tem);
+      var date = new Date(tem);
+      var time = date.getTime();
+      return time;
     }
   }
 };

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

@@ -198,8 +198,8 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 39));
-var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 41));
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
 var tkiTree = function tkiTree() {
   __webpack_require__.e(/*! require.ensure | components/tki-tree/tki-tree */ "components/tki-tree/tki-tree").then((function () {
     return resolve(__webpack_require__(/*! @/components/tki-tree/tki-tree.vue */ 288));

Файловите разлики са ограничени, защото са твърде много
+ 70 - 58
unpackage/dist/dev/mp-weixin/pages/home/home.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/home.wxml


Файловите разлики са ограничени, защото са твърде много
+ 26 - 24
unpackage/dist/dev/mp-weixin/pages/index/index.js


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

@@ -196,7 +196,7 @@ exports.default = void 0;
 //
 //
 
-var QQMapWX = __webpack_require__(/*! ../../util/qqmap-wx-jssdk1.1/qqmap-wx-jssdk */ 49);
+var QQMapWX = __webpack_require__(/*! ../../util/qqmap-wx-jssdk1.1/qqmap-wx-jssdk */ 43);
 var qqmapsdk;
 var _default = {
   data: function data() {

Файловите разлики са ограничени, защото са твърде много
+ 30 - 30
unpackage/dist/dev/mp-weixin/pages/my/my.js


Файловите разлики са ограничени, защото са твърде много
+ 21 - 21
unpackage/dist/dev/mp-weixin/pages/particulars/particulars.js


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

@@ -177,8 +177,8 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 39));
-var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 41));
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
 //
 //
 //

Файловите разлики са ограничени, защото са твърде много
+ 19 - 19
unpackage/dist/dev/mp-weixin/pages/punchLocation/punchLocation.js


Файловите разлики са ограничени, защото са твърде много
+ 16 - 16
unpackage/dist/dev/mp-weixin/pages/punchTime/punchTime.js


Файловите разлики са ограничени, защото са твърде много
+ 19 - 19
unpackage/dist/dev/mp-weixin/pages/ruleSet/ruleSet.js


Файловите разлики са ограничени, защото са твърде много
+ 16 - 16
unpackage/dist/dev/mp-weixin/pages/rulesDetail/rulesDetail.js


Файловите разлики са ограничени, защото са твърде много
+ 18 - 18
unpackage/dist/dev/mp-weixin/pages/setPunchTime/setPunchTime.js


Файловите разлики са ограничени, защото са твърде много
+ 64 - 54
unpackage/dist/dev/mp-weixin/pages/stat/stat.js


Файловите разлики са ограничени, защото са твърде много
+ 27 - 28
unpackage/dist/dev/mp-weixin/pages/statDetail/statDetail.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/statDetail/statDetail.wxml


+ 0 - 4
unpackage/dist/dev/mp-weixin/pages/statDetail/statDetail.wxss

@@ -140,8 +140,4 @@
 .container .no_data .info.data-v-6f03e226 {
   color: #5792F0;
 }
-.container .foot.data-v-6f03e226 {
-  padding-bottom: 20rpx;
-  text-align: center;
-}
 

BIN
unpackage/dist/dev/mp-weixin/static/headImage.png


+ 2 - 2
unpackage/dist/dev/mp-weixin/uni_modules/zwx-dropDown/components/zwx-dropDown/zwx-dropDown.js

@@ -121,8 +121,8 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 exports.default = void 0;
-var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 39));
-var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 41));
+var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
+var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
 var dropDown = function dropDown() {
   Promise.resolve(/*! require.ensure */).then((function () {
     return resolve(__webpack_require__(/*! @/uni_modules/zwx-dropDown/components/zwx-dropDown/zwx-dropDown */ 232));