sunchengjie 9 ay önce
ebeveyn
işleme
816ee4b499
2 değiştirilmiş dosya ile 27 ekleme ve 8 silme
  1. 26 8
      src/pages/components/HomePage.vue
  2. 1 0
      src/pages/login.vue

+ 26 - 8
src/pages/components/HomePage.vue

@@ -49,36 +49,36 @@
 		<!-- 图标 -->
 		<div class="icon">
 			<div class="icon-box">
-				<router-link to="storage">
+				<a @click="goPage(1)">
 					<span class="span">
 						<img src="@/assets/user/u32.png" alt="">
 					</span>
 					<p>快件入库</p>
-				</router-link>
+				</a>
 			</div>
 			<div class="icon-box">
-				<router-link to="Removal">
+				<a @click="goPage(2)" >
 					<span class="span">
 						<img src="@/assets/user/u35.png" alt="">
 					</span>
 					<p>快件出库</p>
-				</router-link>
+				</a>
 			</div>
 			<div class="icon-box">
-				<router-link to="DeliveryInquiry">
+				<a @click="goPage(3)" >
 					<span class="span">
 						<img src="@/assets/user/u38.png" alt="">
 					</span>
 					<p>派件查询</p>
-				</router-link>
+				</a>
 			</div>
 			<div class="icon-box">
-				<router-link to="SignA">
+				<a @click="goPage(4)" >
 					<span class="span">
 						<img src="@/assets/user/u41.png" alt="">
 					</span>
 					<p>派件签收</p>
-				</router-link>
+				</a>
 			</div>
 		</div>
 	</div>
@@ -307,6 +307,24 @@ export default {
 
 	},
 	methods: {
+		goPage(value) {
+			if(value === 1) {
+				window.location.href = window.location.href + "storage"
+				window.location.reload()
+			}
+			if(value === 2) {
+				window.location.href = window.location.href + "Removal"
+				window.location.reload()
+			}
+			if(value === 3) {
+				window.location.href = window.location.href + "DeliveryInquiry"
+				window.location.reload()
+			}
+			if(value === 4) {
+				window.location.href = window.location.href + "SignA"
+				window.location.reload()
+			}
+		},
 		// 图表点击设置,因为需求和echars的API有冲突,所以自己写了一个图例
 		action(dataIndex) {
 			// 先取消所有高亮

+ 1 - 0
src/pages/login.vue

@@ -67,6 +67,7 @@ export default {
 				localStorage.setItem("roomId", res.roomId);
 				localStorage.setItem("courierId", res.userId);
 				this.$router.push({ path: '/' });
+				window.location.reload()
 			} else {
 				Toast(res.message);
 			}