|
@@ -41,12 +41,12 @@
|
|
{{ $t("answerSheet.dp.tip1") }}:{{ $t('studentWeb.art.tip1') }}
|
|
{{ $t("answerSheet.dp.tip1") }}:{{ $t('studentWeb.art.tip1') }}
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
- <div style="margin-bottom: 20px" v-if="hwInfo.answer && hwInfo.answer.attachments.length">
|
|
|
|
|
|
+ <div style="margin-bottom: 20px" v-if="hwInfo.answer">
|
|
<p>{{ $t('jyzx.offline.submitFile') }}:
|
|
<p>{{ $t('jyzx.offline.submitFile') }}:
|
|
<!-- <span style="float: right; margin-right: 10px; color: #4e77b1; cursor: pointer;" @click="deleteFile">{{ $t("cusMgt.delBatch") }}</span> -->
|
|
<!-- <span style="float: right; margin-right: 10px; color: #4e77b1; cursor: pointer;" @click="deleteFile">{{ $t("cusMgt.delBatch") }}</span> -->
|
|
</p>
|
|
</p>
|
|
<div class="file-show">
|
|
<div class="file-show">
|
|
- <div v-for="(item, index) in hwInfo.answer.attachments" :key="index" class="one-show">
|
|
|
|
|
|
+ <div v-for="(item, index) in hwInfo.answer" :key="index" class="one-show">
|
|
<div class="repair-link-wrap-item-box">
|
|
<div class="repair-link-wrap-item-box">
|
|
<div class="file-icon">
|
|
<div class="file-icon">
|
|
<img :src="$tools.getFileThum(item.type, item.name)" />
|
|
<img :src="$tools.getFileThum(item.type, item.name)" />
|
|
@@ -328,15 +328,19 @@ export default {
|
|
attachments: content,
|
|
attachments: content,
|
|
classId: this.getItemTitle.classIds[0], //行政班一个学生只会存在一个班级
|
|
classId: this.getItemTitle.classIds[0], //行政班一个学生只会存在一个班级
|
|
}
|
|
}
|
|
- // 如果是重新上传,要再传一个works里面的id
|
|
|
|
- if (this.hwInfo.answer) params.id = this.hwInfo.answer.id
|
|
|
|
|
|
+ // 如果是重新上传,要再传一个works里面的id #2642 后端调整结构后,不需要这个id
|
|
|
|
+ // if (this.hwInfo.answer) params.id = this.hwInfo.answer.id
|
|
this.$api.studentWeb.uploadArtFile(params).then(res => {
|
|
this.$api.studentWeb.uploadArtFile(params).then(res => {
|
|
- if (res.code === 200 && res.record) {
|
|
|
|
|
|
+ // 后端结构调整,res.record不再返回,从param里面取attachments
|
|
|
|
+ if (res.code === 200) {
|
|
this.uploadList.length = 0
|
|
this.uploadList.length = 0
|
|
- this.isUpload = false
|
|
|
|
this.$Message.success(this.$t("jyzx.offline.uploadSuccess"))
|
|
this.$Message.success(this.$t("jyzx.offline.uploadSuccess"))
|
|
- this.$emit('changeHwAnswer', res.record, this.hwIndex)
|
|
|
|
|
|
+ this.$emit('changeHwAnswer', params, this.hwIndex)
|
|
|
|
+ } else {
|
|
|
|
+ this.$Message.success(this.$t("jyzx.offline.uploadError"))
|
|
}
|
|
}
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.isUpload = false
|
|
})
|
|
})
|
|
} catch (e) {
|
|
} catch (e) {
|
|
this.isUpload = false
|
|
this.isUpload = false
|
|
@@ -490,7 +494,7 @@ export default {
|
|
this.openSong = false
|
|
this.openSong = false
|
|
return
|
|
return
|
|
} else if(message === 'singComplete') {
|
|
} else if(message === 'singComplete') {
|
|
- let params = {
|
|
|
|
|
|
+ /* let params = {
|
|
acId: this.hwInfo.id,
|
|
acId: this.hwInfo.id,
|
|
subject: this.hwInfo.subject,
|
|
subject: this.hwInfo.subject,
|
|
artId: this.getItemTitle.id,
|
|
artId: this.getItemTitle.id,
|
|
@@ -499,8 +503,13 @@ export default {
|
|
isAnswer: 1,
|
|
isAnswer: 1,
|
|
url: '', //智音作答详情
|
|
url: '', //智音作答详情
|
|
}
|
|
}
|
|
|
|
+ params.url = this.zyModule('aqd', true) */
|
|
|
|
+ let params = {
|
|
|
|
+ id: `${this.userInfo.azp}-${this.userInfo.sub}`, //work里的id
|
|
|
|
+ artId: this.getItemTitle.id,
|
|
|
|
+ isAnswer: 1,
|
|
|
|
+ }
|
|
// 返回智音详情链接
|
|
// 返回智音详情链接
|
|
- params.url = this.zyModule('aqd', true)
|
|
|
|
this.$api.studentWeb.setArtScore(params).then(res => {
|
|
this.$api.studentWeb.setArtScore(params).then(res => {
|
|
this.hwInfo.isAnswer = 1
|
|
this.hwInfo.isAnswer = 1
|
|
this.finishSong = true
|
|
this.finishSong = true
|