diff --git a/src/pages/match/manage/index.vue b/src/pages/match/manage/index.vue
index 8a1f7ff..88e41d4 100644
--- a/src/pages/match/manage/index.vue
+++ b/src/pages/match/manage/index.vue
@@ -25,6 +25,7 @@
import MatchDetail from "./matchDetail";
import MatchProgress from "./matchProgress";
import MatchSignup from "./matchSignup";
+import EventBus from "@/libs/bus.js";
export default {
name: "matchManage",
@@ -44,35 +45,29 @@ export default {
MatchSignup
},
created() {
-
+ EventBus.$on("tabChangeWait", (waitIndex) => {
+ this.tabChange(waitIndex)
+ });
+ },
+ beforeDestroy() {
+ // EventBus.$off()
},
methods: {
goBack() {
this.$router.back();
},
tabChange(index) {
- console.log('changewait?')
- console.log(this.wait)
- // this.active = index;
- if(!this.wait) {
+ this.$store.commit("match/setWaitIndex", index);
+ if(!(this.wait !== 999)) {
this.active = index;
}else {
- sessionStorage.setItem('tabIndex', index)
+ EventBus.$emit("tabClickWait", this.wait);
+ this.$store.commit("match/setWait", 999);
}
},
- tabChangeWait() {
- tabChange(sessionStorage.setItem('tabIndex', index))
- },
- beforeLeave(newTab, oldTab) {
- console.log(newTab)
- console.log(oldTab)
- // if(sessionStorage.getItem('wait')) {
- // this.$confirm('暂未保存,是否保存本次编辑?', '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'warning'
- // })
- // }
+ tabChangeWait(index) {
+ this.tabChange(index)
+ // tabChange(sessionStorage.setItem('tabIndex', fromIndex))
}
},
computed: {
diff --git a/src/pages/match/manage/matchProgress.vue b/src/pages/match/manage/matchProgress.vue
index 65a9aad..56e44ac 100644
--- a/src/pages/match/manage/matchProgress.vue
+++ b/src/pages/match/manage/matchProgress.vue
@@ -9,18 +9,18 @@
-
+
-
+
-
+
@@ -40,6 +40,7 @@