Browse Source

fix: change textbookSubscription

DESKTOP-USV654P\pc 2 weeks ago
parent
commit
2f2aa18cf5
2 changed files with 9 additions and 4 deletions
  1. 1 1
      Makefile
  2. 8 3
      src/views/educational/textbookSubscription/components/view.vue

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change textbookPushManager"
+	git commit --no-verify -m "fix: change textbookSubscription"
 
 checkPre:
 	git checkout pre

+ 8 - 3
src/views/educational/textbookSubscription/components/view.vue

@@ -20,12 +20,17 @@
   const dataInfo = ref<any>({});
   const itemId = ref<any>(null);
   const status = ref<any>(null);
+
+  const reloadInfo = async () => {
+    dataInfo.value = await getTextbookSubscriptionDetail({ id: itemId.value });
+    await reloadHistory();
+  };
   const [viewReg] = useModalInner(async (data) => {
-    dataInfo.value = await getTextbookSubscriptionDetail({ id: data.baseData.id });
     itemId.value = data.baseData.id;
     status.value = data.baseData.status;
+
     // console.log(data);
-    await reloadHistory();
+    await reloadInfo();
   });
   const [changeHistoryRef, { openModal: openChangeHistory }] = useModal();
   const [changeRef, { openModal }] = useModal();
@@ -131,7 +136,7 @@
         </template>
       </BasicTable>
     </div>
-    <changeTextBookVue @register="changeRef" @success="reloadHistory()" />
+    <changeTextBookVue @register="changeRef" @success="reloadInfo" />
     <changeHistoryVue @register="changeHistoryRef" @success="reloadHistory" />
     <ClassDetail @register="classDetailRef" />
   </BasicModal>