From c40b87a5a749aebb7ea96c6e7c96164ce8ca416a Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 29 Mar 2024 11:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=84=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drawers/project/ProjectEvalManage.vue | 2 +- src/views/evaluation/evaluationUpload.vue | 20 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/drawers/project/ProjectEvalManage.vue b/src/components/drawers/project/ProjectEvalManage.vue index 21b92390..263ae968 100644 --- a/src/components/drawers/project/ProjectEvalManage.vue +++ b/src/components/drawers/project/ProjectEvalManage.vue @@ -430,7 +430,7 @@ export default { // 导出数据 function exportTaskStu() { - window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`) + window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`) // window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}¤tStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&status=${state.name}&studentName=${state.projectName}`) } diff --git a/src/views/evaluation/evaluationUpload.vue b/src/views/evaluation/evaluationUpload.vue index f15b37c9..aaf4674b 100644 --- a/src/views/evaluation/evaluationUpload.vue +++ b/src/views/evaluation/evaluationUpload.vue @@ -691,6 +691,7 @@ import { message } from "ant-design-vue"; const userInfo = computed(() => store.state.userInfo); const router = useRouter(); const state = reactive({ + loadNewDown:false, totalNumber: {}, stateType:'', uploadDownLoad: false, @@ -1078,6 +1079,8 @@ import { message } from "ant-design-vue"; }; //报告上传 const bgupload = () => { + state.loadNewDown = false + state.uploadDownId = '' state.downloadUrl = null state.uploadId = '' state.valueAll = [] @@ -1086,6 +1089,7 @@ import { message } from "ant-design-vue"; state.formData = {} } const bgupload1 = (record) => { + state.loadNewDown = true state.downloadUrl = null console.log(record,'record') state.valueAll = [] @@ -1108,7 +1112,7 @@ import { message } from "ant-design-vue"; const of_exit = () => { state.bg_check = false; state.errorMessage = '' - state.uploadDownId = '' + // state.uploadDownId = '' // state.uploadId = '' state.uploadName = '' state.loadData = false @@ -1118,9 +1122,11 @@ import { message } from "ant-design-vue"; } // 上传结果 const of_results = () => { + state.totalNumber = {} state.bg_results = false } const resultsUp = () => { + state.totalNumber = {} state.bg_results = false } const failedDownload = () => { @@ -1142,7 +1148,7 @@ import { message } from "ant-design-vue"; } state.tableLoading = true - if(state.valueAll.length != 0 && !state.loadData){ + if(state.valueAll.length != 0 && !state.loadData&&state.loadNewDown){ if(state.valueAll.length >1){ state.bg_results = true } @@ -1172,8 +1178,8 @@ import { message } from "ant-design-vue"; remarks:state.formData.remarks, evaluationName:state.formData.evaluationName, // detailIds:state.idValue, - evaluationDetailList:state.valueAll, - downloadUrls:state.downloadUrl, + evaluationDetailList:!state.loadNewDown?state.valueAll:null, + // downloadUrls:state.downloadUrl, imagePath:state.formData.cover }).then((res)=>{ console.log(res.data,'data') @@ -1273,8 +1279,11 @@ import { message } from "ant-design-vue"; }else{ // state.idValue = res.data.evaluationDetailList.map(item=>item.id) state.downloadUrl = res.data.evaluationDetailList.map(item=>item.downloadUrl) - state.valueAll = res.data.evaluationDetailList state.totalNumber = res.data + if(state.totalNumber.failedEntries!=0){ + console.log('aaaaa') + state.valueAll = res.data.evaluationDetailList + } } console.log(state.valueAll,'state.valueAll') state.uploadDownLoad = false @@ -1366,6 +1375,7 @@ import { message } from "ant-design-vue"; // } // 编辑 const openEdit = (record) => { + state.loadNewDown = true state.uploadDownId =record.id state.bg_check = true state.btShow = true