|
@@ -455,6 +455,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
+
|
|
|
mounted() {
|
|
|
if (this.$route.query.type == "newTeam") {
|
|
|
this.onReset();
|
|
@@ -494,21 +495,41 @@ export default {
|
|
|
this.basdisabled = false;
|
|
|
}
|
|
|
},
|
|
|
- deactivated() {
|
|
|
- console.log("laile");
|
|
|
- },
|
|
|
- beforeDestroy() {
|
|
|
- // this.topFrom.paymentExpireDate = this.paymentExpireDate;
|
|
|
- this.setStore();
|
|
|
- },
|
|
|
+ deactivated() {},
|
|
|
+ // async beforeDestroy() {
|
|
|
+ // await this.setStore();
|
|
|
+ // // await new Promise((res, err) => {
|
|
|
+ // // setTimeout(() => {
|
|
|
+ // // res();
|
|
|
+ // // }, 1000);
|
|
|
+ // // });
|
|
|
+ // },
|
|
|
|
|
|
methods: {
|
|
|
setStore() {
|
|
|
if (this.teamid) {
|
|
|
- localStorage.setItem(
|
|
|
- `${this.teamid}base`,
|
|
|
- JSON.stringify(this.topFrom)
|
|
|
- );
|
|
|
+ let loadash = this.$helpers.lodash;
|
|
|
+ let sotrage = JSON.parse(localStorage.getItem(`${this.teamid}base`));
|
|
|
+ if (!loadash.isEqual(this.topFrom, sotrage) && sotrage) {
|
|
|
+ // 提示保存
|
|
|
+ return this.$confirm("已修改当前页面数据是否保存", "提示", {
|
|
|
+ confirmButtonText: "是",
|
|
|
+ cancelButtonText: "否",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ localStorage.setItem(
|
|
|
+ `${this.teamid}base`,
|
|
|
+ JSON.stringify(this.topFrom)
|
|
|
+ );
|
|
|
+ return this.gotoNext();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
|
|
|
+ }
|
|
|
} else {
|
|
|
localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
|
|
|
}
|
|
@@ -575,6 +596,7 @@ export default {
|
|
|
if (this.$route.query.id) {
|
|
|
// 单团修改
|
|
|
this.teamid = this.$route.query.id;
|
|
|
+
|
|
|
let sotrage = JSON.parse(
|
|
|
localStorage.getItem(`${this.$route.query.id}base`)
|
|
|
);
|
|
@@ -608,6 +630,7 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
// 如果是新建团
|
|
|
+
|
|
|
let sotrage = JSON.parse(localStorage.getItem(`newTeambase`));
|
|
|
sotrage ? (this.topFrom = sotrage) : this.topFrom;
|
|
|
if (this.topFrom?.section) {
|
|
@@ -697,8 +720,9 @@ export default {
|
|
|
this.$store.dispatch("topinfo", this.topFrom);
|
|
|
if (this.teamStatus == "teamAudit") {
|
|
|
// 获取数据提交
|
|
|
- this.$emit("handleClick", { name: "2" });
|
|
|
+ this.$emit("handleClick", { name: "2" });
|
|
|
} else {
|
|
|
+ console.log("调用了");
|
|
|
this.resetSubmit();
|
|
|
}
|
|
|
}
|
|
@@ -1099,6 +1123,7 @@ export default {
|
|
|
: null;
|
|
|
this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
|
|
|
this.applyExpireDate = res.data.musicGroup.applyExpireDate;
|
|
|
+ localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
|
|
|
},
|
|
|
},
|
|
|
computed: {
|