|
@@ -21,9 +21,15 @@
|
|
|
<img v-else-if="item.type == 'res'" src="../../assets/icon/htex.png" />
|
|
|
<img v-else src="../../assets/source/unknow.png" />
|
|
|
</div>
|
|
|
- <p class="work-file-name" @click="handlePreviewHw(item)">
|
|
|
+ <!-- <p class="work-file-name" @click="handlePreviewHw(item)">
|
|
|
{{item.name}}
|
|
|
- </p>
|
|
|
+ </p> -->
|
|
|
+ <p v-if="item.type != 'zy'" class="work-file-name" @click="handlePreviewHw(item)">
|
|
|
+ {{ item.name }}
|
|
|
+ </p>
|
|
|
+ <a v-else :href="item.url" target="_blank">
|
|
|
+ {{ item.name }}
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }" slot="createTime">
|
|
@@ -47,7 +53,7 @@
|
|
|
<source :src="hwPreviewFile.url+schoolSas.sas">
|
|
|
{{$t('teachContent.notAudio')}}
|
|
|
</audio>
|
|
|
- <img v-else-if="hwPreviewFile.type == 'image'" :src="hwPreviewFile.url+schoolSas.sas" style="border-radius: 5px;max-height: 800px;max-width:870px;" />
|
|
|
+ <img v-else-if="hwPreviewFile.type == 'image'" :src="hwPreviewFile.url" style="border-radius: 5px;max-height: 800px;max-width:870px;" />
|
|
|
</div>
|
|
|
</Modal>
|
|
|
</div>
|
|
@@ -71,7 +77,11 @@ export default {
|
|
|
subjectId: {
|
|
|
type: String,
|
|
|
default: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ artExamId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
let _this = this
|
|
@@ -120,8 +130,10 @@ export default {
|
|
|
* 预览/下载作业文件
|
|
|
* @param {string} type video 删除研修视频 file 删除资料
|
|
|
*/
|
|
|
- handlePreviewHw(info) {
|
|
|
+ async handlePreviewHw(info) {
|
|
|
if (info.type === 'image' || info.type === 'video' || info.type === 'audio') {
|
|
|
+ let fullUrl = await this.$tools.getFileSas(info.url)
|
|
|
+ info.url = fullUrl.url
|
|
|
this.hwPreviewFile = info
|
|
|
this.hwViewStatus = true
|
|
|
} else if (info.type === 'doc') {
|
|
@@ -171,8 +183,8 @@ export default {
|
|
|
console.log(`output->this.taskInfo`, this.taskInfo)
|
|
|
if (!workId || !this.subjectId || !this.curClass.id) return
|
|
|
let req = {
|
|
|
- id: workId,
|
|
|
- // taskId:workId,
|
|
|
+ id: this.artExamId,
|
|
|
+ taskId: workId,
|
|
|
subject: this.subjectId,
|
|
|
classId: this.curClass.id
|
|
|
}
|
|
@@ -194,17 +206,19 @@ export default {
|
|
|
students.forEach(s => {
|
|
|
let work = data.find(w => w.stuId === s.id)
|
|
|
let hasWork = work && work.attachments?.length
|
|
|
+ let hasZY = work && work.url
|
|
|
let info = {
|
|
|
id: s.id,
|
|
|
name: s.name,
|
|
|
}
|
|
|
- info.status = hasWork ? 1 : 0
|
|
|
- info.createTime = hasWork ? work.attachments[0].createTime : 0
|
|
|
- info.count = hasWork ? work.attachments.length : 0
|
|
|
- info.files = hasWork ? work.attachments : []
|
|
|
+ info.status = hasWork || hasZY ? 1 : 0
|
|
|
+ info.createTime = hasWork ? work.attachments[0].createTime : hasZY ? work.createTime : 0
|
|
|
+ info.count = hasWork ? work.attachments.length : hasZY ? 1 : 0
|
|
|
+ info.files = hasWork ? work.attachments : hasZY ? [{ type: 'zy', name: '评唱结果', url: work.url }] : []
|
|
|
this.workData.push(info)
|
|
|
})
|
|
|
}
|
|
|
+ console.log(this.workData);
|
|
|
this.pageChange(1)
|
|
|
},
|
|
|
// 分页页面变化
|
|
@@ -213,7 +227,8 @@ export default {
|
|
|
let end = this.pageSize * page
|
|
|
this.currentPage = page
|
|
|
this.tableData = this.workData.slice(start, end)
|
|
|
- },
|
|
|
+ console.log(this.tableData);
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
subjectId: {
|