소스 검색

Merge branch 'LAO_MO' into online

mo 5 년 전
부모
커밋
9b88cb2c99
2개의 변경된 파일58개의 추가작업 그리고 11개의 파일을 삭제
  1. 56 9
      src/views/teamDetail/componentCourse/studentWork.vue
  2. 2 2
      src/views/teamDetail/teamCourseList.vue

+ 56 - 9
src/views/teamDetail/componentCourse/studentWork.vue

@@ -26,16 +26,38 @@
                          label="手机号">
         </el-table-column>
         <el-table-column align='center'
-                         prop="status"
+                         prop="createTime"
                          label="交作业时间">
         </el-table-column>
         <el-table-column align='center'
-                         prop="status"
-                         label="老师回复时间">
+                         prop="isView"
+                         label="是否查看">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.isView ? '是' : '否' }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column align='center'
+                         prop="isReplied"
+                         label="是否回复">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.isReplied ? '是' : '否' }}
+            </div>
+          </template>
         </el-table-column>
         <el-table-column align='center'
-                         prop="status"
                          label="查看">
+          <template slot-scope="scope">
+            <div>
+              <!--  -->
+              <el-button type="text"
+                         v-if="scope.row.url"
+                         @click="lookWork(scope.row.url)">查看</el-button>
+            </div>
+          </template>
+
         </el-table-column>
       </el-table>
       <pagination :total="rules.total"
@@ -43,6 +65,19 @@
                   :limit.sync="rules.limit"
                   @pagination="getList" />
     </div>
+    <el-dialog title="查看作业"
+               @close="closeWorkVisible"
+               width="680px"
+               append-to-body
+               :visible.sync="workVisible">
+      <!-- activeUrl -->
+      <video style="width:640px;"
+             :src='activeUrl'
+             ref="dialogVideo"
+             controls="controls">
+        您的浏览器不支持视频播放
+      </video>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -60,9 +95,11 @@ export default {
         page: 1, // 当前页
         total: 0, // 总条数
       },
+      workVisible: false,
       studentNum: null,
       homeworkNum: null,
-      repliedNum: null
+      repliedNum: null,
+      activeUrl: null
     }
   },
   mounted () {
@@ -73,9 +110,6 @@ export default {
   },
   methods: {
     init () {
-      findStudentCourseHomeworks({ search: this.courseScheduleId }).then(res => {
-
-      })
       sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(res => {
         if (res.code == 200) {
           this.studentNum = res.data.studentNum;
@@ -83,9 +117,22 @@ export default {
           this.repliedNum = res.data.repliedNum
         }
       })
+      this.getList()
     },
     getList () {
-
+      findStudentCourseHomeworks({ search: this.courseScheduleId }).then(res => {
+        if (res.code == 200) {
+          this.rules.total = res.data.total
+          this.tableList = res.data.rows
+        }
+      })
+    },
+    lookWork (url) {
+      this.workVisible = true;
+      this.activeUrl = url;
+    },
+    closeWorkVisible () {
+      this.activeUrl = '';
     }
   }
 }

+ 2 - 2
src/views/teamDetail/teamCourseList.vue

@@ -167,7 +167,7 @@
                            prop="teacherName"
                            label="指导老师">
           </el-table-column>
-          <!-- <el-table-column align='center'
+          <el-table-column align='center'
                            label="详情">
             <template slot-scope="scope">
               <div>
@@ -175,7 +175,7 @@
                            @click="lookDetail(scope.row)">详情</el-button>
               </div>
             </template>
-          </el-table-column> -->
+          </el-table-column>
         </el-table>
         <pagination :total="rules.total"
                     :page.sync="rules.page"