80b9d247 by xukangle

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

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