zhangjie 1 rok pred
rodič
commit
70e0f2ecde

+ 4 - 1
src/modules/course/components/ModifyEndScore.vue

@@ -121,11 +121,14 @@ export default {
 
       if (this.isSubmit) return;
       this.isSubmit = true;
+      const scoreDetail = this.modalForm.scoreDetail.map((item) => {
+        return { name: item.name, score: item.score + "" };
+      });
       const datas = {
         id: this.modalForm.id,
         name: this.modalForm.name,
         score: this.totalScore,
-        scoreDetail: JSON.stringify(this.modalForm.scoreDetail),
+        scoreDetail: JSON.stringify(scoreDetail),
       };
       const data = await endScoreSave(datas).catch(() => {});
       this.isSubmit = false;

+ 5 - 1
src/modules/course/components/ModifyNormalScore.vue

@@ -112,10 +112,14 @@ export default {
 
       if (this.isSubmit) return;
       this.isSubmit = true;
+
+      const normalScore = this.modalForm.normalScore.map((item) => {
+        return { name: item.name, score: item.score + "" };
+      });
       const datas = {
         id: this.modalForm.id,
         name: this.modalForm.name,
-        score: JSON.stringify(this.modalForm.normalScore),
+        score: JSON.stringify(normalScore),
       };
       const data = await normalScoreSave(datas).catch(() => {});
       this.isSubmit = false;