Эх сурвалжийг харах

企业管理查看用户详情后保存页码

cornyuan 2 сар өмнө
parent
commit
1c3d08dfc1

+ 11 - 1
src/views/autonym/autonym.vue

@@ -818,6 +818,8 @@
 			},
 			// 详情跳转
 			updates(row) {
+				// 保存当前页码到本地存储
+  				localStorage.setItem('autonymListPage', this.page);
 				this.$router.push({
 					path: '/userDetailQ',
 					query: {
@@ -1845,7 +1847,7 @@
       qungkong(){
         this.companyScope = []
       },
-		},
+	},
 		mounted() {
 			var statusN =  this.$route.query.status
 			if(statusN){
@@ -1853,6 +1855,14 @@
 			}else{
 				this.status = 0
 			}
+			 // ========== 新增:恢复页码 ==========
+			const savePage = localStorage.getItem('autonymListPage');
+			if (savePage) {
+				this.page = Number(savePage);
+				// 读取后清除,避免影响下次
+				localStorage.removeItem('autonymListPage');
+			}
+			// ==================================
 			this.dataSelect()
 		}
 	};