Browse Source

fix: bug[4527]:样卷重新给分以后 也需要刷新页面分值

chenhao 2 years ago
parent
commit
4b700e7e06
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/modules/expert/sample/index.vue

+ 8 - 3
src/modules/expert/sample/index.vue

@@ -199,9 +199,14 @@ const onSearch = async () => {
 
 const { fetch: updateMarkScore } = useFetch('updateMarkScore')
 
-const onSubmit = () => {
-  if (currentRfPaper.value) {
-    updateMarkScore({ id: currentRfPaper.value.id, scores: modelScore.value })
+const onSubmit = async () => {
+  try {
+    if (currentRfPaper.value) {
+      await updateMarkScore({ id: currentRfPaper.value.id, scores: modelScore.value })
+      onRefresh()
+    }
+  } catch (error) {
+    console.error(error)
   }
 }