|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div v-loading="loading" class="task-detail">
|
|
<div v-loading="loading" class="task-detail">
|
|
- <TaskTop :item-info="itemInfo" type="student" @viewFile="viewFile" />
|
|
|
|
|
|
+ <TaskTop :item-info="itemInfo" type="student" @viewFile="showFileVisible" />
|
|
|
|
|
|
<div class="task-detail-main">
|
|
<div class="task-detail-main">
|
|
<div class="time-type">{{ $t(timeType) }} {{ name }}</div>
|
|
<div class="time-type">{{ $t(timeType) }} {{ name }}</div>
|
|
@@ -30,7 +30,7 @@
|
|
<span class="label">{{ $t('Key313') }}</span>
|
|
<span class="label">{{ $t('Key313') }}</span>
|
|
<div>
|
|
<div>
|
|
<el-tag v-for="item in accessory_list" :key="item.file_id" color="#fff" :title="item.file_name">
|
|
<el-tag v-for="item in accessory_list" :key="item.file_id" color="#fff" :title="item.file_name">
|
|
- <span @click="viewFile(item.file_name, item.file_id)">{{ item.file_name }}</span>
|
|
|
|
|
|
+ <span @click="showFileVisible(item.file_name, item.file_id)">{{ item.file_name }}</span>
|
|
</el-tag>
|
|
</el-tag>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -46,7 +46,7 @@
|
|
color="#fff"
|
|
color="#fff"
|
|
:title="item.file_name"
|
|
:title="item.file_name"
|
|
>
|
|
>
|
|
- <span @click="viewFile(item.file_name, item.file_id)">{{ item.file_name }}</span>
|
|
|
|
|
|
+ <span @click="showFileVisible(item.file_name, item.file_id)">{{ item.file_name }}</span>
|
|
</el-tag>
|
|
</el-tag>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -158,7 +158,7 @@
|
|
@dialogClose="dialogClose"
|
|
@dialogClose="dialogClose"
|
|
/>
|
|
/>
|
|
|
|
|
|
- <ShowFile :visible="visible" :file-name="showCurFileName" :file-id="showCurFileId" @close="dialogShowFileClose" />
|
|
|
|
|
|
+ <ShowFile :visible="visible" :file-name="curFileName" :file-id="curFileId" @close="dialogShowFileClose" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -170,12 +170,13 @@ export default {
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { ref, computed, inject } from 'vue';
|
|
import { ref, computed, inject } from 'vue';
|
|
-import { fileUpload, FileDownload } from '@/api/app';
|
|
|
|
|
|
+import { fileUpload } from '@/api/app';
|
|
import { CreateEnterLiveRoomSession } from '@/api/live';
|
|
import { CreateEnterLiveRoomSession } from '@/api/live';
|
|
import { GetTaskInfo, FillMyTaskExecuteInfo_Student } from '@/api/course';
|
|
import { GetTaskInfo, FillMyTaskExecuteInfo_Student } from '@/api/course';
|
|
import { isAllowFileType, fileTypeSizeLimit } from '@/utils/validate';
|
|
import { isAllowFileType, fileTypeSizeLimit } from '@/utils/validate';
|
|
import { useRoute, useRouter } from 'vue-router/composables';
|
|
import { useRoute, useRouter } from 'vue-router/composables';
|
|
import { Message } from 'element-ui';
|
|
import { Message } from 'element-ui';
|
|
|
|
+import { useShowFile } from '@/common/show_file/index';
|
|
|
|
|
|
import TaskTop from '../TaskTop.vue';
|
|
import TaskTop from '../TaskTop.vue';
|
|
import FinishCourseware from '@/components/course/FinishCourseware.vue';
|
|
import FinishCourseware from '@/components/course/FinishCourseware.vue';
|
|
@@ -211,9 +212,7 @@ let my_execute_info = ref({});
|
|
let student_remark = ref('');
|
|
let student_remark = ref('');
|
|
let student_score = ref(0);
|
|
let student_score = ref(0);
|
|
let loading = ref(true);
|
|
let loading = ref(true);
|
|
-let visible = ref(false);
|
|
|
|
-let showCurFileName = ref('');
|
|
|
|
-let showCurFileId = ref('');
|
|
|
|
|
|
+
|
|
// 开启课后评价
|
|
// 开启课后评价
|
|
let is_enable_KHPJ = ref(false);
|
|
let is_enable_KHPJ = ref(false);
|
|
let is_enable_homework = ref(false);
|
|
let is_enable_homework = ref(false);
|
|
@@ -320,23 +319,7 @@ function deleteFile(i) {
|
|
file_list.value.splice(i, 1);
|
|
file_list.value.splice(i, 1);
|
|
}
|
|
}
|
|
|
|
|
|
-function download(FileID) {
|
|
|
|
- FileDownload(FileID).then((data) => {
|
|
|
|
- console.log(data);
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function viewFile(fileName, fileId) {
|
|
|
|
- showCurFileName.value = fileName;
|
|
|
|
- showCurFileId.value = fileId;
|
|
|
|
- visible.value = true;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function dialogShowFileClose() {
|
|
|
|
- visible.value = false;
|
|
|
|
- showCurFileName.value = '';
|
|
|
|
- showCurFileId.value = '';
|
|
|
|
-}
|
|
|
|
|
|
+let { visible, curFileId, curFileName, dialogShowFileClose, showFileVisible } = useShowFile();
|
|
|
|
|
|
function fillTaskExecuteInfo_Student() {
|
|
function fillTaskExecuteInfo_Student() {
|
|
// 基础任务,必须提交作业
|
|
// 基础任务,必须提交作业
|