From 99a4466197f58f067a1d8cbdd594f8b2e9dbf546 Mon Sep 17 00:00:00 2001 From: "ray.ma" Date: Tue, 22 Apr 2025 14:50:00 +0800 Subject: [PATCH] fix score edit --- src/views/form/score.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/views/form/score.vue b/src/views/form/score.vue index 82b096e..4ece0a3 100644 --- a/src/views/form/score.vue +++ b/src/views/form/score.vue @@ -101,12 +101,13 @@ export default { } }, created() { - if (this.id) { - Promise.all([getList(), getClassList(), subjectList()]) - .then(([studentRes, classRes, subjectRes]) => { - this.studentList = studentRes.result - this.classList = classRes.result - this.subjectList = subjectRes.result + Promise.all([getList(), getClassList(), subjectList()]) + .then(([studentRes, classRes, subjectRes]) => { + this.studentList = studentRes.result + this.classList = classRes.result + this.subjectList = subjectRes.result + + if (this.id) { const params = { id: this.id } @@ -123,8 +124,8 @@ export default { }).catch(() => { this.loading = false }) - }) - } + } + }) }, methods: { onSubmit() {