|
@@ -3,105 +3,93 @@
|
|
|
<el-form :inline="true">
|
|
|
<el-form-item label="应交学生数">
|
|
|
<!-- <el-input disabled
|
|
|
- :value="studentNum"></el-input> -->
|
|
|
- <div class="inputStyle">{{ studentNum}}</div>
|
|
|
+ :value="studentNum"></el-input>-->
|
|
|
+ <div class="inputStyle">{{ studentNum}}</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="已交学生数">
|
|
|
<!-- <el-input disabled
|
|
|
- :value="homeworkNum"></el-input> -->
|
|
|
+ :value="homeworkNum"></el-input>-->
|
|
|
<div class="inputStyle">{{ homeworkNum}}</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="已回复数">
|
|
|
<!-- <el-input disabled
|
|
|
- :value="repliedNum"></el-input> -->
|
|
|
+ :value="repliedNum"></el-input>-->
|
|
|
<div class="inputStyle">{{ repliedNum}}</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<p class="work">老师布置的作业:{{content}}</p>
|
|
|
<div class="tableWrap">
|
|
|
- <el-table :data='tableList'
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column align='center'
|
|
|
- prop="username"
|
|
|
- label="学生姓名">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="phone"
|
|
|
- label="手机号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="subjectName"
|
|
|
- label="声部名称">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="createTime"
|
|
|
- label="交作业时间">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="isView"
|
|
|
- label="是否查看">
|
|
|
+ <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
+ <el-table-column align="center" prop="username" label="学生姓名"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="phone" label="手机号"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="subjectName" label="声部名称"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="createTime" label="交作业时间"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="isView" label="是否查看">
|
|
|
<template slot-scope="scope">
|
|
|
- <div>
|
|
|
- {{ scope.row.isView ? '是' : '否' }}
|
|
|
- </div>
|
|
|
+ <div>{{ scope.row.isView ? '是' : '否' }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="isReplied"
|
|
|
- label="是否回复">
|
|
|
+ <el-table-column align="center" prop="isReplied" label="是否回复">
|
|
|
<template slot-scope="scope">
|
|
|
- <div>
|
|
|
- {{ scope.row.isReplied ? '是' : '否' }}
|
|
|
- </div>
|
|
|
+ <div>{{ scope.row.isReplied ? '是' : '否' }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- label="操作">
|
|
|
+ <el-table-column align="center" label="查看作业" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<!-- -->
|
|
|
- <el-button type="text"
|
|
|
- v-if="scope.row.url"
|
|
|
- @click="lookWork(scope.row.url)">查看</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-for="(item,index) in scope.row.urlList"
|
|
|
+ :key="index"
|
|
|
+ @click="lookWork(item)"
|
|
|
+ >{{'作业'+(index+1) }}</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination :total="rules.total"
|
|
|
- :page.sync="rules.page"
|
|
|
- :limit.sync="rules.limit"
|
|
|
- @pagination="getList" />
|
|
|
+ <pagination
|
|
|
+ :total="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <el-dialog title="查看作业"
|
|
|
- @close="closeWorkVisible"
|
|
|
- width="680px"
|
|
|
- append-to-body
|
|
|
- :visible.sync="workVisible">
|
|
|
+ <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>
|
|
|
+ <video
|
|
|
+ style="width:640px;"
|
|
|
+ :src="activeUrl"
|
|
|
+ ref="dialogVideo"
|
|
|
+ controls="controls"
|
|
|
+ >您的浏览器不支持视频播放</video>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import pagination from '@/components/Pagination/index'
|
|
|
-import { findStudentCourseHomeworks, sumStudentAttendance, getCourseScheduleHomework } from '@/api/buildTeam'
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import {
|
|
|
+ findStudentCourseHomeworks,
|
|
|
+ sumStudentAttendance,
|
|
|
+ getCourseScheduleHomework
|
|
|
+} from "@/api/buildTeam";
|
|
|
export default {
|
|
|
- props: ['courseScheduleId'],
|
|
|
+ props: ["courseScheduleId"],
|
|
|
components: { pagination },
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
tableList: [],
|
|
|
rules: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
- total: 0, // 总条数
|
|
|
+ total: 0 // 总条数
|
|
|
},
|
|
|
workVisible: false,
|
|
|
studentNum: null,
|
|
@@ -109,53 +97,62 @@ export default {
|
|
|
repliedNum: null,
|
|
|
activeUrl: null,
|
|
|
content: null
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.init()
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.init()
|
|
|
+ activated() {
|
|
|
+ this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
- init () {
|
|
|
- sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.studentNum = res.data.studentNum;
|
|
|
- this.homeworkNum = res.data.homeworkNum;
|
|
|
- this.repliedNum = res.data.repliedNum
|
|
|
+ init() {
|
|
|
+ sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.studentNum = res.data.studentNum;
|
|
|
+ this.homeworkNum = res.data.homeworkNum;
|
|
|
+ this.repliedNum = res.data.repliedNum;
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
- //this.courseScheduleId
|
|
|
- //
|
|
|
+ );
|
|
|
+ //this.courseScheduleId
|
|
|
+ //
|
|
|
|
|
|
- getCourseScheduleHomework({ courseScheduleId: this.courseScheduleId }).then(res => {
|
|
|
+ getCourseScheduleHomework({
|
|
|
+ courseScheduleId: this.courseScheduleId
|
|
|
+ }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
if (res.data) {
|
|
|
- this.content = res.data.content
|
|
|
+ this.content = res.data.content;
|
|
|
}
|
|
|
- this.content ? this.content : this.content = '还未布置作业'
|
|
|
+ this.content ? this.content : (this.content = "还未布置作业");
|
|
|
}
|
|
|
- })
|
|
|
- this.getList()
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
},
|
|
|
- getList () {
|
|
|
- findStudentCourseHomeworks({ search: this.courseScheduleId }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.rules.total = res.data.total
|
|
|
- this.tableList = res.data.rows
|
|
|
+ getList() {
|
|
|
+ findStudentCourseHomeworks({ search: this.courseScheduleId }).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.rules.total = res.data.total;
|
|
|
+ this.tableList = res.data.rows.map(item => {
|
|
|
+ item.urlList = item.url ? item.url.split(",") : [];
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ );
|
|
|
},
|
|
|
- lookWork (url) {
|
|
|
+ lookWork(url) {
|
|
|
this.workVisible = true;
|
|
|
this.activeUrl = url;
|
|
|
},
|
|
|
- closeWorkVisible () {
|
|
|
- this.activeUrl = '';
|
|
|
+ closeWorkVisible() {
|
|
|
+ this.activeUrl = "";
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.inputStyle {
|