Selaa lähdekoodia

fix(student): 修复选择题详情弹窗的未提交学生数据展示问题

将原来从showData中获取未提交学生和作业数据,改为直接使用传入的props参数,确保数据来源统一正确
lsc 4 viikkoa sitten
vanhempi
commit
0d248d0ea3

+ 26 - 25
src/views/Student/components/choiceQuestionDetailDialog.vue

@@ -24,11 +24,11 @@
             </div>
           </div>
           <div class="c_t45_msg" v-if="props.roleType == 1">
-            <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-                v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length +
-                  props.showData.unsubmittedStudents.length
+            <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
+                v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
+                  props.unsubmittedStudents.length
                 }}</span></div>
-            <span v-if="props.showData.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
+            <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
               lang.ssViewSubmitStatus2 }}</span>
           </div>
           <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex <= 0}" @click="changeWorkIndex(0)">{{ lang.ssPrevQ }}</span>-->
@@ -129,11 +129,11 @@
             </div>
           </div>
           <div class="c_t45_msg" v-if="props.roleType == 1">
-            <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-                v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length +
-                  props.showData.unsubmittedStudents.length
+            <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
+                v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
+                  props.unsubmittedStudents.length
                 }}</span></div>
-            <span v-if="props.showData.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
+            <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
               lang.ssViewSubmitStatus2 }}</span>
           </div>
           <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex <= 0}" @click="changeWorkIndex(0)">{{ lang.ssPrevQ }}</span>-->
@@ -234,11 +234,11 @@
         </div>
         <span class="c_t15_type">{{ lang.ssQATest }}</span>
         <div class="c_t15_msg" v-if="props.roleType == 1">
-          <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-              v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length +
-                props.showData.unsubmittedStudents.length
+          <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
+              v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
+                props.unsubmittedStudents.length
               }}</span></div>
-          <span v-if="props.showData.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
+          <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
             lang.ssViewSubmitStatus2 }}</span>
         </div>
         <div class="c_t15_content" v-show="!lookWorkData">
@@ -342,11 +342,11 @@
         </div>
         <span class="c_t15_type">{{ lang.ssPhoto }}</span>
         <div class="c_t15_msg" v-if="props.roleType == 1">
-          <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-              v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length +
-                props.showData.unsubmittedStudents.length
+          <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
+              v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
+                props.unsubmittedStudents.length
               }}</span></div>
-          <span v-if="props.showData.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
+          <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
             lang.ssViewSubmitStatus2 }}</span>
         </div>
         <div class="c_t15_content" v-show="!lookWorkData">
@@ -433,11 +433,11 @@
         </div>
         <span class="c_t72_type">{{ lang.ssAiApp }}</span>
         <div class="c_t72_msg" v-if="props.roleType == 1">
-          <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-              v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length +
-                props.showData.unsubmittedStudents.length
+          <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
+              v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
+                props.unsubmittedStudents.length
               }}</span></div>
-          <span v-if="props.showData.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
+          <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
             lang.ssViewSubmitStatus2 }}</span>
         </div>
         <div class="c_t72_content" v-show="!lookWorkData">
@@ -561,11 +561,11 @@
         </div>
         <span class="c_t73_type">{{ lang.ssHPage }}</span>
         <div class="c_t73_msg" v-if="props.roleType == 1">
-          <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-              v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length +
-                props.showData.unsubmittedStudents.length
+          <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
+              v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
+                props.unsubmittedStudents.length
               }}</span></div>
-          <span v-if="props.showData.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
+          <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
             lang.ssViewSubmitStatus2 }}</span>
         </div>
         <div class="c_t73_content" v-show="!lookWorkData">
@@ -634,6 +634,7 @@ const props = defineProps<{
   slideIndex: number;
   showData: any;
   workArray: any[];
+  unsubmittedStudents: any[];
   courseDetail: any;
   userId: string;
   workId: string;
@@ -1304,7 +1305,7 @@ watch(
 
 // 查看未提交学生
 const viewUnsubmittedStudents = () => {
-  selectUserDialogRef.value.open(lang.ssSubmitStatus, { user: props.showData.unsubmittedStudents.map((item: any) => item.name), notFiledUser: props.showData.unsubmittedStudents.map((item: any) => item.name), isSubmitUser: props.workArray.map((item: any) => item.name) })
+  selectUserDialogRef.value.open(lang.ssSubmitStatus, { user: props.unsubmittedStudents.map((item: any) => item.name), notFiledUser: props.unsubmittedStudents.map((item: any) => item.name), isSubmitUser: props.workArray.map((item: any) => item.name) })
   // if (props.unsubmittedStudents.length > 0) {
   // unsubmittedStudentsDialogRef.value.open(props.unsubmittedStudents)
   // }

+ 1 - 1
src/views/Student/index.vue

@@ -106,7 +106,7 @@
           <ScreenSlideList :style="{ width: isFullscreen ? '100%' : slideWidth2 * canvasScale + 'px', height: isFullscreen ? '100%' : slideHeight2 * canvasScale + 'px', margin: '0 auto' }" :slideWidth="isFullscreen ? slideWidth * canvasScale : slideWidth2 * canvasScale" :slideHeight="isFullscreen ? slideHeight * canvasScale : slideHeight2 * canvasScale"
             :animationIndex="0" :turnSlideToId="() => { }" :manualExitFullscreen="() => { }"  :slideIndex="slideIndex" v-show="!choiceQuestionDetailDialogOpenList.includes(slideIndex)"/>
 
-          <choiceQuestionDetailDialog ref="choiceQuestionDetailDialogRef" v-if="choiceQuestionDetailDialogOpenList.includes(slideIndex) && currentSlideToolType !== 77" :roleType="props.type" :cid="props.cid" :courseid="props.courseid" :workId="workId" :workUrl="workUrl" :userId="props.userid" :courseDetail="courseDetail" :workArray="workArray" @changeWorkIndex="changeWorkIndex" v-model:visible="choiceQuestionDetailDialogOpenList" :showData="answerTheResultRef" :slideIndex="slideIndex" :workIndex="0" :style="{ width: isFullscreen ? '100%' : slideWidth2 * canvasScale + 'px', height: isFullscreen ? '100%' : slideHeight2 * canvasScale + 'px', margin: '0 auto' }" :slideWidth="isFullscreen ? slideWidth * canvasScale : slideWidth2 * canvasScale" :slideHeight="isFullscreen ? slideHeight * canvasScale : slideHeight2 * canvasScale" :resultArray="currentIsResultArray" @setIsResultArray="setIsResultArray2" :isCreator="isCreator" @successLike="successLike" @sendMessage="sendMessage" :isFollowModeActive="isFollowModeActive"/>
+          <choiceQuestionDetailDialog ref="choiceQuestionDetailDialogRef" v-if="choiceQuestionDetailDialogOpenList.includes(slideIndex) && currentSlideToolType !== 77" :roleType="props.type" :cid="props.cid" :courseid="props.courseid" :workId="workId" :workUrl="workUrl" :userId="props.userid" :courseDetail="courseDetail" :workArray="workArray" @changeWorkIndex="changeWorkIndex" v-model:visible="choiceQuestionDetailDialogOpenList" :unsubmittedStudents="unsubmittedStudents" :showData="answerTheResultRef" :slideIndex="slideIndex" :workIndex="0" :style="{ width: isFullscreen ? '100%' : slideWidth2 * canvasScale + 'px', height: isFullscreen ? '100%' : slideHeight2 * canvasScale + 'px', margin: '0 auto' }" :slideWidth="isFullscreen ? slideWidth * canvasScale : slideWidth2 * canvasScale" :slideHeight="isFullscreen ? slideHeight * canvasScale : slideHeight2 * canvasScale" :resultArray="currentIsResultArray" @setIsResultArray="setIsResultArray2" :isCreator="isCreator" @successLike="successLike" @sendMessage="sendMessage" :isFollowModeActive="isFollowModeActive"/>
           <SpeakingClassPanel
             v-else-if="choiceQuestionDetailDialogOpenList.includes(slideIndex) && currentSlideToolType === 77"
             ref="speakingPanelRef"