80b9d247 by xukangle

fix: 关闭后再次打开未初始化

1 parent 6d4f0972
......@@ -15,7 +15,7 @@ const { required, orderNum } = useValidator();
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
const fullPath = route.query.fullPath;
const fullPath = route.fullPath;
const userStore = useUserStore();
const fullscreenLoading = ref(false);
......@@ -517,6 +517,8 @@ const changeShowMethod = () => {
}
const cancel = () => {
console.log(userStore.tabbar);
console.log(fullPath);
proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
......
......@@ -10,7 +10,7 @@ import { saveGrade, getGradeList, deleteGrade, getLargeCategoryList, updateGrade
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
const route = useRoute();
const fullPath = route.query.fullPath;
const fullPath = route.fullPath;
onBeforeMount(() => {
getGradeListData();
getDataGrade();
......
......@@ -287,6 +287,7 @@ const newCreateClassStandardDialogInfo = ref({
newCreateClassStandardDialogInfo.value.submitBtnLoading = false;
newCreateClassStandardDialogInfo.value.visible = false;
} else {
newCreateClassStandardDialogInfo.value.submitBtnLoading = false;
proxy.$ElMessage.error(res.msg);
}
} else {
......@@ -381,6 +382,7 @@ const newCreateGradeStandardDialogInfo = ref({
newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
newCreateGradeStandardDialogInfo.value.visible = false;
} else {
newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
proxy.$ElMessage.error(res.msg);
}
} else {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!