From 9e8cf9977f0c3afb59c7b9b7508df786939d7c43 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Fri, 9 Jan 2026 10:47:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E6=89=80=E5=9C=A8=E5=AD=A6=E7=A7=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/study/comp/suject.vue | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/business/study/comp/suject.vue b/src/views/business/study/comp/suject.vue index 403dc19..7d425a0 100644 --- a/src/views/business/study/comp/suject.vue +++ b/src/views/business/study/comp/suject.vue @@ -125,11 +125,24 @@ export default { checkPermi, checkRole, getList(){ - studySubject_listByStudyId({studyId:this.study.id}).then(response => { - this.subjectList = response.data; - this.selectedSubjectId = this.subjectList.length>0?this.subjectList[0].id:'' - this.$emit('change',this.selectedSubjectId) - }) + if(this.study.id){ + this.selectedSubjectId = '' + studySubject_listByStudyId({studyId:this.study.id}).then(response => { + this.subjectList = response.data; + for(let i=0;i0 && item.userIdList.indexof(this.userId)>-1)){ + this.selectedSubjectId = item.id + break + } + } + if(this.selectedSubjectId === ''){ + this.selectedSubjectId = this.subjectList.length>0?this.subjectList[0].id:'' + } + + this.$emit('change',this.selectedSubjectId) + }) + } }, changeSelectedSubject(item){ this.selectedSubjectId = item.id