|
@@ -0,0 +1,426 @@
|
|
|
+<template>
|
|
|
+ <div class="teacher-task-detail">
|
|
|
+ <div class="teacher-task-detail-top">
|
|
|
+ <div class="title">
|
|
|
+ <span class="title-name">{{ course_name }}</span>
|
|
|
+ <span class="title-time">{{ time_space_view_txt }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="course_name">{{ cs_item_name }}</div>
|
|
|
+ <div class="learning-material">
|
|
|
+ <div class="learning-material-title">学习资料</div>
|
|
|
+ <el-tag
|
|
|
+ v-for="item in cs_item_learning_material_list"
|
|
|
+ :key="item.file_id"
|
|
|
+ color="#fff"
|
|
|
+ :title="item.file_name"
|
|
|
+ >
|
|
|
+ <a :href="item.file_url" target="_blank">{{ item.file_name }}</a>
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="teacher-task-detail-main">
|
|
|
+ <div class="student-finish-situation">
|
|
|
+ <div>学员完成情况</div>
|
|
|
+ <div class="student-list">
|
|
|
+ <ul>
|
|
|
+ <li
|
|
|
+ v-for="item in student_list"
|
|
|
+ :key="item.student_id"
|
|
|
+ :class="['student-item', { active: item.student_id === curStudentId }]"
|
|
|
+ @click="getTaskStudentExecuteInfo(item.student_id)"
|
|
|
+ >
|
|
|
+ <span>{{ item.student_name }}</span>
|
|
|
+ <svg-icon v-if="item.is_finished === 'true'" icon-class="check-mark" />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="finish-detail">
|
|
|
+ <div class="student-info">
|
|
|
+ <div>
|
|
|
+ <el-avatar
|
|
|
+ :src="curFinishDetail.student_image_url"
|
|
|
+ :size="32"
|
|
|
+ icon="el-icon-user-solid"
|
|
|
+ />
|
|
|
+ <span class="student-info-name">{{ curFinishDetail.student_name }}</span>
|
|
|
+ </div>
|
|
|
+ <span class="finish-time">{{ curFinishDetail.finish_time_view_txt }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="finish-situation">
|
|
|
+ <div class="title">课件任务</div>
|
|
|
+ <div class="courseware-list">
|
|
|
+ <el-tag
|
|
|
+ v-for="item in curFinishDetail.courseware_list"
|
|
|
+ :key="item.courseware_id"
|
|
|
+ color="#fff"
|
|
|
+ :title="item.courseware_name"
|
|
|
+ @click="showCompletionView(item.courseware_id, item.is_finished)"
|
|
|
+ >
|
|
|
+ <div class="courseware">
|
|
|
+ <svg-icon icon-class="courseware" />
|
|
|
+ <span class="courseware_name">{{ item.courseware_name }}</span>
|
|
|
+ <svg-icon
|
|
|
+ v-if="item.is_finished === 'true'"
|
|
|
+ class="check-mark"
|
|
|
+ icon-class="check-mark-circle"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ <div class="title">文档列表</div>
|
|
|
+ <div>
|
|
|
+ <el-tag
|
|
|
+ v-for="item in curFinishDetail.homework_list"
|
|
|
+ :key="item.file_id"
|
|
|
+ color="#fff"
|
|
|
+ :title="item.file_name"
|
|
|
+ >
|
|
|
+ <a :href="item.file_url" target="_blank">{{ item.file_name }}</a>
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ <div class="title">学生留言</div>
|
|
|
+ <div>{{ curFinishDetail.student_message }}</div>
|
|
|
+ <div class="title">
|
|
|
+ <span>教师点评</span>
|
|
|
+ <el-rate v-model="teacher_score"></el-rate>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-input v-model="teacher_remark" type="textarea" resize="none" :rows="6"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="confirm">
|
|
|
+ <el-button type="primary" @click="remarkTaskStudentExecuteInfo_Teacher">提交</el-button>
|
|
|
+ <el-button v-if="student_list.length > 1" @click="next">
|
|
|
+ {{ buttonName() }} <i class="el-icon-right" />
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <completion-view
|
|
|
+ :task-id="id"
|
|
|
+ :cur-student-id="curStudentId"
|
|
|
+ :cur-courseware-id="curCoursewareId"
|
|
|
+ :dialog-visible="dialogVisible"
|
|
|
+ @dialogClose="dialogClose"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import CompletionView from '@/components/course/CompletionView.vue';
|
|
|
+import {
|
|
|
+ GetTaskInfo,
|
|
|
+ GetTaskStudentExecuteInfo,
|
|
|
+ RemarkTaskStudentExecuteInfo_Teacher
|
|
|
+} from '@/api/course';
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: { CompletionView },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ id: this.$route.params.id,
|
|
|
+ name: '',
|
|
|
+ teaching_type: '',
|
|
|
+ time_type: '',
|
|
|
+ course_name: '',
|
|
|
+ cs_item_name: '',
|
|
|
+ task_mode: '',
|
|
|
+ time_space_view_txt: '',
|
|
|
+ courseware_list: [],
|
|
|
+ accessory_list: [],
|
|
|
+ cs_item_learning_material_list: [],
|
|
|
+ file_list: [],
|
|
|
+ student_list: [],
|
|
|
+ curStudentId: '',
|
|
|
+ // 当前学生完成详情
|
|
|
+ curFinishDetail: {
|
|
|
+ student_name: '',
|
|
|
+ student_image_url: '',
|
|
|
+ courseware_list: [],
|
|
|
+ homework_list: [],
|
|
|
+ student_message: '',
|
|
|
+ finish_time_view_txt: ''
|
|
|
+ },
|
|
|
+ teacher_remark: '',
|
|
|
+ teacher_score: 0,
|
|
|
+ dialogVisible: false,
|
|
|
+ curCoursewareId: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ GetTaskInfo({
|
|
|
+ id: this.id,
|
|
|
+ is_contain_cs_item_learning_material: true,
|
|
|
+ is_contain_student: true
|
|
|
+ }).then(
|
|
|
+ ({
|
|
|
+ name,
|
|
|
+ teaching_type,
|
|
|
+ time_type,
|
|
|
+ course_name,
|
|
|
+ courseware_list,
|
|
|
+ cs_item_name,
|
|
|
+ accessory_list,
|
|
|
+ cs_item_learning_material_list,
|
|
|
+ task_mode,
|
|
|
+ time_space_view_txt,
|
|
|
+ student_list
|
|
|
+ }) => {
|
|
|
+ this.name = name;
|
|
|
+ this.course_name = course_name;
|
|
|
+ this.cs_item_name = cs_item_name;
|
|
|
+ this.teaching_type = teaching_type;
|
|
|
+ this.time_type = time_type;
|
|
|
+ this.courseware_list = courseware_list;
|
|
|
+ this.accessory_list = accessory_list;
|
|
|
+ this.task_mode = task_mode;
|
|
|
+ this.cs_item_learning_material_list = cs_item_learning_material_list;
|
|
|
+ this.time_space_view_txt = time_space_view_txt;
|
|
|
+ this.student_list = student_list;
|
|
|
+ if (student_list.length > 0) this.getTaskStudentExecuteInfo(student_list[0].student_id);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getTaskStudentExecuteInfo(student_id) {
|
|
|
+ GetTaskStudentExecuteInfo({
|
|
|
+ task_id: this.id,
|
|
|
+ student_id
|
|
|
+ }).then(
|
|
|
+ ({
|
|
|
+ courseware_list,
|
|
|
+ homework_list,
|
|
|
+ student_message,
|
|
|
+ student_name,
|
|
|
+ student_image_url,
|
|
|
+ finish_time_view_txt
|
|
|
+ }) => {
|
|
|
+ this.curStudentId = student_id;
|
|
|
+ this.teacher_remark = '';
|
|
|
+ this.teacher_score = 0;
|
|
|
+ this.curFinishDetail = {
|
|
|
+ courseware_list,
|
|
|
+ homework_list,
|
|
|
+ student_message,
|
|
|
+ student_name,
|
|
|
+ student_image_url,
|
|
|
+ finish_time_view_txt
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
+ showCompletionView(id, is_finished) {
|
|
|
+ if (is_finished === 'false') return this.$message.warning('该课件没有被完成');
|
|
|
+ this.curCoursewareId = id;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ dialogClose() {
|
|
|
+ this.curCoursewareId = '';
|
|
|
+ this.dialogVisible = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ buttonName() {
|
|
|
+ let list = this.student_list;
|
|
|
+ if (list.length <= 0) return '';
|
|
|
+ return list[list.length - 1].student_id === this.curStudentId ? '上一个' : '下一个';
|
|
|
+ },
|
|
|
+
|
|
|
+ remarkTaskStudentExecuteInfo_Teacher() {
|
|
|
+ RemarkTaskStudentExecuteInfo_Teacher({
|
|
|
+ task_id: this.id,
|
|
|
+ student_id: this.curStudentId,
|
|
|
+ teacher_score: this.teacher_score,
|
|
|
+ teacher_remark: this.teacher_remark
|
|
|
+ }).then(() => {
|
|
|
+ this.$message.success('点评成功');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ next() {
|
|
|
+ let list = this.student_list;
|
|
|
+ if (list.length <= 0) {
|
|
|
+ return this.$message.warning('当前学生列表为空');
|
|
|
+ }
|
|
|
+ let curIndex = list.findIndex(item => item.student_id === this.curStudentId);
|
|
|
+ let nextList = list.length - 1 === curIndex ? list[curIndex - 1] : list[curIndex + 1];
|
|
|
+ if (nextList) this.getTaskStudentExecuteInfo(nextList.student_id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+@import '~@/styles/mixin.scss';
|
|
|
+$bor-color: #d9d9d9;
|
|
|
+
|
|
|
+.teacher-task-detail {
|
|
|
+ @include container;
|
|
|
+ @include dialog;
|
|
|
+
|
|
|
+ .el-tag {
|
|
|
+ @include el-tag;
|
|
|
+
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-right: 8px;
|
|
|
+ border-color: $bor-color;
|
|
|
+ }
|
|
|
+ // 课程信息
|
|
|
+ &-top {
|
|
|
+ padding: 24px 32px;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ &-name {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-time {
|
|
|
+ color: #737373;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .course_name {
|
|
|
+ margin: 8px 0 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .learning-material {
|
|
|
+ border-top: 1px solid $bor-color;
|
|
|
+ padding-top: 24px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+
|
|
|
+ &-title {
|
|
|
+ font-size: 18px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-main {
|
|
|
+ display: flex;
|
|
|
+ min-height: calc(100vh - 390px);
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+ margin-top: 16px;
|
|
|
+
|
|
|
+ .student-finish-situation {
|
|
|
+ padding: 24px 0;
|
|
|
+ flex: 3;
|
|
|
+
|
|
|
+ > div:first-child {
|
|
|
+ font-weight: 700;
|
|
|
+ padding: 0 32px;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ }
|
|
|
+ // 学员列表
|
|
|
+ .student-list {
|
|
|
+ ul {
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ .student-item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 8px 32px;
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ background-color: #f2f2f2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 完成详情
|
|
|
+ .finish-detail {
|
|
|
+ flex: 7;
|
|
|
+ border-left: 1px solid #dbdbdb;
|
|
|
+
|
|
|
+ .student-info {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 28px 32px;
|
|
|
+ border-bottom: 1px solid #dbdbdb;
|
|
|
+ height: 89px;
|
|
|
+ line-height: 32px;
|
|
|
+
|
|
|
+ &-name {
|
|
|
+ display: inline-block;
|
|
|
+ vertical-align: text-bottom;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ margin-left: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .finish-time {
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 完成情况
|
|
|
+ .finish-situation {
|
|
|
+ width: 100%;
|
|
|
+ padding: 24px 32px;
|
|
|
+
|
|
|
+ .el-rate {
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 42px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 18px;
|
|
|
+
|
|
|
+ & + div {
|
|
|
+ padding: 16px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .courseware-list {
|
|
|
+ .el-tag {
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ .courseware {
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ .svg-icon {
|
|
|
+ font-size: 18px;
|
|
|
+ margin-right: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .check-mark {
|
|
|
+ position: relative;
|
|
|
+ top: 2px;
|
|
|
+ margin: 0 0 0 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &_name {
|
|
|
+ display: inline-block;
|
|
|
+ max-width: 120px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 学员详情按钮
|
|
|
+ .confirm {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ width: 110px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|