|
@@ -204,16 +204,16 @@ export default {
|
|
|
let students = this._.cloneDeep(this.curClass.members)
|
|
|
students.forEach(s => {
|
|
|
let work = data.find(w => w.stuId === s.id)
|
|
|
- let hasWork = work && work.attachments?.length
|
|
|
+ let hasWork = work && work.attachments
|
|
|
let hasZY = work && work.url
|
|
|
let info = {
|
|
|
id: s.id,
|
|
|
name: s.name,
|
|
|
}
|
|
|
info.status = hasWork || hasZY ? 1 : 0
|
|
|
- info.createTime = hasWork ? work.attachments[0].uploadTime : hasZY ? work.createTime : 0
|
|
|
- info.count = hasWork ? work.attachments.length : hasZY ? 1 : 0
|
|
|
- info.files = hasZY ? [{ type: 'zy', name: '评唱结果', url: work.url }] : hasWork ? work.attachments : []
|
|
|
+ info.createTime = hasWork ? work.attachments.uploadTime : hasZY ? work.createTime : 0
|
|
|
+ info.count = hasWork ? 1 : hasZY ? 1 : 0
|
|
|
+ info.files = hasZY ? [{ type: 'zy', name: '评唱结果', url: work.url }] : hasWork ? [work.attachments] : []
|
|
|
this.workData.push(info)
|
|
|
})
|
|
|
}
|