wgl 4 年之前
父节点
当前提交
f0ae913e6a

+ 1 - 1
config/project.js

@@ -1 +1 @@
-exports.name = 'pension'
+exports.name = 'business'

+ 0 - 3
src/projects/business/router/master.js

@@ -741,7 +741,6 @@ const routesMaster = [
 							role: [],
 							title: '考勤补卡申请审核列表',
 							mode: true,
-							//keepAlive: true
 						}
 					},
 					//考勤补卡申请详情
@@ -824,8 +823,6 @@ const routesMaster = [
 							role: [],
 							title: '考勤统计列表',
 							mode: true,
-							keepAlive: true,
-							deepth: 1
 						}
 					},
 					//考勤记录测温详情

+ 10 - 0
src/projects/business/views/Master/Attendance/StatisticList.vue

@@ -373,6 +373,16 @@
 				person_popedom: 'person_popedom',
 			})
 		},
+		//keepalive监控判断
+		beforeRouteLeave(to, from, next) {
+			console.log(to.name);
+			if (['MasterAttendanceTemperatureInfo', 'MasterAttendanceLeaveInfo', 'MasterAttendanceInfo'].indexOf(to.name) > -1) {
+				this.$store.commit('SET_KEEP_ALIVE_COMPONENTS', ['MasterAttendanceStatisticList'])
+			} else {
+				this.$store.commit('SET_KEEP_ALIVE_COMPONENTS', [])
+			}
+			next()
+		},
 	}
 </script>