SanHQin 2 months ago
parent
commit
e488554aa8

+ 26 - 2
src/components/components/choseWorksDetailDialog.vue

@@ -607,7 +607,7 @@
         </div>
       </div>
     </el-dialog>
-    <studentWorkPreviewDialog ref="studentWorkPreviewDialogRef"/>
+    <studentWorkPreviewDialog ref="studentWorkPreviewDialogRef" @close="studentPreviewClose"/>
   </div>
 </template>
 
@@ -984,6 +984,16 @@ export default {
     StudentWork(item){
 
       this.$refs.studentWorkPreviewDialogRef.open({work:item,testData:this.testData,testJson:this.testJson,tool:this.toolType});
+      this.$emit("changeSplitScreenBehavior",{code: 1,
+        form: {
+          toolType:this.toolType,
+          toolIndex: this.toolIndex,
+          courseType: this.courseType,
+          taskCount: this.taskCount,
+          type: this.showType,
+					showStatisticsType:this.showStatisticsType,
+					lookWorks:item.wid
+        }})
       // if (this.toolType == 41) {
       //   this.testJsonCopy=val.works.split(',')
       // }else if(this.toolType == 52 ) {
@@ -1011,6 +1021,18 @@ export default {
 			// 		lookWorks:val.wid
       //   }})
     },
+    studentPreviewClose(){
+      this.$emit("changeSplitScreenBehavior",{code: 1,
+        form: {
+          toolType:this.toolType,
+          toolIndex: this.toolIndex,
+          courseType: this.courseType,
+          taskCount: this.taskCount,
+          type: this.showType,
+					showStatisticsType:this.showStatisticsType,
+					lookWorks:null
+        }})
+    },
     setData() {
       if (this.show && this.toolIndex !== null) {
         this.worksStudent = JSON.parse(
@@ -1106,7 +1128,9 @@ export default {
         let work = this.worksStudent.find(e=>e.wid==data.lookWorks);
         if(work){
           this.StudentWork(work)
-        }
+        }else if(data.lookWorks===null){
+        this.$refs.studentWorkPreviewDialogRef.close();
+      }
 			}
 		}
   }

+ 133 - 7
src/components/components/studentWorkPreviewDialog.vue

@@ -17,7 +17,7 @@
           </div>
           <div
             class="s_b_m_content"
-            v-if="[45, 48, 52, 15, 41].includes(tool)"
+            v-if="[45, 48, 52, 15, 41, 47,40].includes(tool)"
           >
             <div class="s_b_m_tool45" v-if="[45].includes(tool)">
               <div class="s_b_m_toolItem" v-for="(item, index) in testJson">
@@ -132,16 +132,63 @@
             </div>
 
             <div class="s_b_m_tool47" v-if="[47].includes(tool)">
-              <div class="s_b_m_sortItem" v-for="(item, index) in testData.sentenceList">
+              <div
+                class="s_b_m_sortItem"
+                v-for="(item, index) in testData.sentenceList"
+              >
                 <div class="s_b_m_ti_title">
                   <span></span>
                   <span>第{{ index + 1 }}题</span>
                 </div>
 
+                <div class="s_s_b_m_s_rightOrError">
+                  <div v-if="JSON.stringify(item.rightAnswer)==JSON.stringify(userAnswer[index])">
+                    <img
+                      src="../../assets/icon/conSentences/right.png"
+                      alt=""
+                    />
+                    回答正确
+                  </div>
+                  <div v-else>
+                    <img
+                      src="../../assets/icon/conSentences/wrong.png"
+                      alt=""
+                    />
+                    回答错误
+                  </div>
+                </div>
+
                 <div class="s_b_m_s_answer">
-                  <span v-for="(item2,index2) in userAnswer[index]">{{ item2 }}</span>
+                  <span v-for="(item2, index2) in userAnswer[index]">{{
+                    item2
+                  }}</span>
+                </div>
+
+                <div class="s_b_m_s_sortText">
+                  <div>
+                    组成句子:<span
+                      v-for="(item2, index2) in userAnswer[index]"
+                      >{{ item2 }}</span
+                    >
+                  </div>
+                </div>
+              </div>
+            </div>
+
+            <div class="s_b_m_tool40" v-if="[40].includes(tool)">
+              <div class="s_b_m_t_rateItem" v-for="(item,index) in testData.rateJson">
+                <div>
+                  <span>{{ item.value }}</span>
+                  <el-rate
+                    :value="userAnswer.eStar[index]"
+                    disabled
+                  ></el-rate>
                 </div>
+                <span>{{ item.detail }}</span>
+              </div>
 
+              <div class="s_b_m_t_rateText">
+                {{ userAnswer.eBzText }}
               </div>
             </div>
           </div>
@@ -229,6 +276,7 @@ export default {
         (this.testData = null),
         (this.testJson = null),
         (this.tool = null);
+        this.$emit("close")
     },
     init() {
       this.studentWork = null;
@@ -258,6 +306,8 @@ export default {
         } else if ([47].includes(this.tool)) {
           let _answer = _studentWorks.map(i => i.chooseSenList);
           _result = _answer;
+        }else if([40].includes(this.tool)){
+          _result = _studentWorks;
         }
       }
 
@@ -509,13 +559,89 @@ export default {
   margin-bottom: 20px;
 }
 
-.s_b_m_sortItem{
+.s_b_m_sortItem {
+  margin-bottom: 30px;
+}
+
+.s_b_m_s_answer {
+  width: 100%;
+  height: auto;
+  padding-top: 30px;
+  padding-bottom: 30px;
+}
+
+.s_b_m_s_answer > span {
+  padding: 10px 35px;
+  border-radius: 8px;
+  margin-right: 20px;
+  border: solid 2px #a3c7f9;
+  font-size: 20px;
+  font-weight: bold;
+}
+
+.s_b_m_s_sortText {
+  font-size: 20px;
+}
+
+.s_s_b_m_s_rightOrError {
+  display: flex;
+  margin-top: 20px;
+}
+
+.s_s_b_m_s_rightOrError > div {
+  font-size: 18px;
+  display: flex;
+  align-items: center;
+}
+
+.s_s_b_m_s_rightOrError > div > img {
+  width: 25px;
+  height: 25px;
+  margin-right: 10px;
+}
+
+.s_b_m_t_rateItem{
+  width: 100%;
+  height: auto;
   margin-bottom: 30px;
+  font-size: 18px;
+}
+
+.s_b_m_t_rateItem>div{
+  display: flex;
+  align-items: center;
+  margin-bottom: 25px;
+}
+
+
+.s_b_m_t_rateItem>div>>> .el-rate {
+  height: 30px;
+}
+
+
+.s_b_m_t_rateItem>div>>> .el-rate__icon{
+  font-size: 28px;
+}
+
+.s_b_m_t_rateItem>div>span{
+  margin-right: 20px;
 }
 
-.s_b_m_s_answer{
-  padding: 10px 20px;
+.s_b_m_t_rateItem>span{
+  padding: 10px 30px;
+  background-color: #F7F6F9;
   border-radius: 8px;
-  border: solid 2px red;
+  font-size: 18px;
+}
+
+.s_b_m_t_rateText{
+  margin-top: 20px;
+  min-width: 200px;
+  min-height: 100px;
+  height: auto;
+  width: auto;
+  padding: 10px 10px;
+  border: solid 1px #D0D0D2;
+  background-color: #F7F6F9;
 }
 </style>