فهرست منبع

Merge branch 'Nov16thResetMusic' into online

mo 4 سال پیش
والد
کامیت
c91bcf4417
2فایلهای تغییر یافته به همراه139 افزوده شده و 36 حذف شده
  1. 6 5
      src/views/operateManager/serverIndexDetail.vue
  2. 133 31
      src/views/teamDetail/componentCourse/studentWork.vue

+ 6 - 5
src/views/operateManager/serverIndexDetail.vue

@@ -101,11 +101,12 @@
                   </div>
                   <p class="contant"
                      v-if='msg.msgType=="TXT"'>{{msg.content}}</p>
-                  <a class="contant"
-                     :href="msg.content"
-                     target="_blank"
-                     style="display:block;color:#1890FF"
-                     v-if='msg.msgType=="IMG"'>查看图片</a>
+                  <el-image style="width: 100px; height: 100px"
+                            fit='cover'
+                            v-if='msg.msgType=="IMG"'
+                            :src="msg.content"
+                            :preview-src-list="[msg.content]">
+                  </el-image>
                   <p v-if='msg.msgType=="VC"'
                      class="contant"
                      style="color:#1890FF"

+ 133 - 31
src/views/teamDetail/componentCourse/studentWork.vue

@@ -60,13 +60,13 @@
             <div>{{ scope.row.isView ? '是' : '否' }}</div>
           </template>
         </el-table-column>
-        <!-- <el-table-column align="center"
+        <el-table-column align="center"
                          prop="isReplied"
                          label="是否回复">
           <template slot-scope="scope">
             <div>{{ scope.row.isReplied ? '是' : '否' }}</div>
           </template>
-        </el-table-column> -->
+        </el-table-column>
         <el-table-column align="center"
                          label="查看作业"
                          width="200px">
@@ -76,9 +76,6 @@
               <el-button type="text"
                          v-if="scope.row.urlList"
                          @click="lookWork(scope.row)">查看作业</el-button>
-              <el-button type="text"
-                         v-if="scope.row.isReplied"
-                         @click="lookReplied(scope.row)">查看回复</el-button>
             </div>
           </template>
         </el-table-column>
@@ -90,34 +87,70 @@
     </div>
     <el-dialog title="查看作业"
                @close="closeWorkVisible"
-               width="480px"
+               width="940px"
                append-to-body
                :visible.sync="workVisible">
       <!-- activeUrl -->
-      <swiper ref="mySwiper"
-              :options="swiperOptions"
-              v-if="activeRow">
-        <swiper-slide v-for="
+      <div class="sliderWrap">
+        <div class="swiperWrap">
+          <swiper ref="mySwiper"
+                  :options="swiperOptions"
+                  v-if="activeRow">
+            <swiper-slide v-for="
                    (item,index)
                    in
                    activeRow.urlList"
-                      :key="index">
-          <video style="width:480px;"
-                 :src="item"
-                 ref="dialogVideo"
-                 controls="controls">您的浏览器不支持视频播放</video>
+                          :key="index">
+
+              <video style="width:480px;"
+                     :src="item"
+                     ref="dialogVideo"
+                     controls="controls">您的浏览器不支持视频播放</video>
+
+            </swiper-slide>
+            <div class="swiper-pagination"
+                 slot="pagination"></div>
+            <div class="swiper-button-prev swiper-button-white"
+                 @click="prev"
+                 slot="button-prev"></div>
+            <div class="swiper-button-next swiper-button-white"
+                 @click="next"
+                 slot="button-next"></div>
+          </swiper>
+        </div>
 
-        </swiper-slide>
-        <div class="swiper-pagination"
-             slot="pagination"></div>
-        <div class="swiper-button-prev swiper-button-white"
-             @click="prev"
-             slot="button-prev"></div>
-        <div class="swiper-button-next swiper-button-white"
-             @click="next"
-             slot="button-next"></div>
-      </swiper>
+        <div class="msgWrap">
+          <p style="margin-bottom:20;">作业回复内容:</p>
+          <div :class="activeCommit.length>0?'':'flex'">
+            <div v-if="activeCommit.length>0"
+                 class="msgLi"
+                 v-for='(msg,index) in activeCommit'
+                 :key="index">
+              <div class="info">
+                <p>{{msg.userName}}</p>
+                <p style="color:#999"
+                   v-if="msg.createTime">{{msg.createTime | dateForMinFormat}}</p>
+              </div>
+              <p class="contant"
+                 v-if='msg.msgType=="TXT"'>{{msg.content}}</p>
+              <el-image style="width: 100px; height: 100px"
+                        fit='cover'
+                        v-if='msg.msgType=="IMG"'
+                        :src="msg.content"
+                        :preview-src-list="[msg.content]">
+              </el-image>
 
+              <audio id='audio'
+                     v-if='msg.msgType=="VC"'
+                     controls
+                     :src="msg.content"
+                     ref="dialogVideo">您的浏览器不支持音频播放</audio>
+            </div>
+            <p class="nomore"
+               v-if="activeCommit.length<=0">暂无回复内容</p>
+          </div>
+        </div>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -132,6 +165,7 @@ import {
   sumStudentAttendance,
   getCourseScheduleHomework
 } from "@/api/buildTeam";
+import { findStudentHomeworkComments } from "@/api/operateManager";
 export default {
   props: ["courseScheduleId"],
   components: {
@@ -151,6 +185,7 @@ export default {
         total: 0 // 总条数
       },
       workVisible: false,
+      repliedVisible: false,
       studentNum: null,
       homeworkNum: null,
       repliedNum: null,
@@ -163,9 +198,18 @@ export default {
         navigation: {
           nextEl: '.swiper-button-next',
           prevEl: '.swiper-button-prev'
+        },
+        on: {
+          slideChange: () => {
+            console.log(this.activeRow)
+          }
         }
+
         // Some Swiper option/callback...
-      }
+      },
+      comUrl: '',
+      comVisible: false,
+      activeCommit: []
     };
   },
   computed: {
@@ -221,20 +265,31 @@ export default {
     },
     lookWork (row) {
       this.activeRow = row
-      this.workVisible = true;
+      findStudentHomeworkComments({ studentCourseHomeworkId: row.studentCourseHomeworkId, rows: 9999 }).then(res => {
+        if (res.code == 200) {
+          this.activeCommit = res.data.rows;
+          this.workVisible = true;
+          // item.up = false
+        }
+      })
+
     },
     closeWorkVisible () {
       this.activeUrl = "";
     },
-    prev () {
+    prev (val) {
       this.swiper.slidePrev()
     },
-    next () {
+    next (val) {
       this.swiper.slideNext()
     },
     lookReplied (row) {
-
-    }
+      // repliedVisible
+    },
+    openAideo (src) {
+      this.comUrl = src;
+      this.comVisible = true;
+    },
   }, watch: {
     courseScheduleId (val) {
       if (val) {
@@ -253,4 +308,51 @@ export default {
   line-height: 30px;
   font-size: 14px;
 }
+.flex {
+  display: flex;
+  flex-direction: row;
+  height: 100%;
+}
+.sliderWrap {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+
+  .swiperWrap {
+    width: 480px;
+  }
+  .msgWrap {
+    .nomore {
+      text-align: center;
+      width: 100%;
+      margin-top: 120px;
+      display: block;
+    }
+    width: 400px;
+    min-height: 300px;
+    height: 100%;
+    border: 1px solid #e5e5e5;
+    padding: 5px 20px;
+    border-radius: 5px;
+    overflow: auto;
+    font-size: 14px;
+    .msgLi {
+      padding: 10px 0;
+      .info {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        margin-bottom: 10px;
+        padding: 0 10px;
+      }
+      .contant {
+        border-bottom: 1px solid #ededed;
+        line-height: 30px;
+        padding: 0 10px;
+        color: #666;
+      }
+    }
+  }
+}
 </style>