diff --git a/test_client/src/views/analyse/examtest.vue b/test_client/src/views/analyse/examtest.vue index 6c3de1e..983119a 100644 --- a/test_client/src/views/analyse/examtest.vue +++ b/test_client/src/views/analyse/examtest.vue @@ -233,12 +233,14 @@ export default { const loading = this.$loading({text: '正在生成word...',}); exportwTest(scope.row.id).then(res=>{ loading.close() + window.open(res.data.path, "_blank"); }).catch(e=>{loading.close()}) }, handleExport2(scope) { const loading = this.$loading({text: '正在重新生成word...',}); exportwTest(scope.row.id, {anew:true}).then(res=>{ loading.close() + window.open(res.data.path, "_blank"); }).catch(e=>{loading.close()}) }, exportTest() { diff --git a/test_server/examtest/views.py b/test_server/examtest/views.py index e8f4a75..7a291ae 100644 --- a/test_server/examtest/views.py +++ b/test_server/examtest/views.py @@ -443,7 +443,7 @@ class ExamTestViewSet(ModelViewSet): path = exportw_test(obj, True) else: path = exportw_test(obj, False) - # return res + return Response({'path': path}) class PaperViewSet(ModelViewSet): """ diff --git a/test_server/tmp/examtest - 副本.docx b/test_server/tmp/examtest - 副本.docx deleted file mode 100644 index e46dcca..0000000 Binary files a/test_server/tmp/examtest - 副本.docx and /dev/null differ