zhangjie 1 سال پیش
والد
کامیت
70e0f2ecde
2فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 4 1
      src/modules/course/components/ModifyEndScore.vue
  2. 5 1
      src/modules/course/components/ModifyNormalScore.vue

+ 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;