测评上传

This commit is contained in:
zhangsir
2024-03-29 11:37:20 +08:00
parent 339cea4dc6
commit c40b87a5a7
2 changed files with 16 additions and 6 deletions

View File

@@ -430,7 +430,7 @@ export default {
// 导出数据 // 导出数据
function exportTaskStu() { 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}&currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&status=${state.name}&studentName=${state.projectName}`) // window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}&currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&status=${state.name}&studentName=${state.projectName}`)
} }

View File

@@ -691,6 +691,7 @@ import { message } from "ant-design-vue";
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
loadNewDown:false,
totalNumber: {}, totalNumber: {},
stateType:'', stateType:'',
uploadDownLoad: false, uploadDownLoad: false,
@@ -1078,6 +1079,8 @@ import { message } from "ant-design-vue";
}; };
//报告上传 //报告上传
const bgupload = () => { const bgupload = () => {
state.loadNewDown = false
state.uploadDownId = ''
state.downloadUrl = null state.downloadUrl = null
state.uploadId = '' state.uploadId = ''
state.valueAll = [] state.valueAll = []
@@ -1086,6 +1089,7 @@ import { message } from "ant-design-vue";
state.formData = {} state.formData = {}
} }
const bgupload1 = (record) => { const bgupload1 = (record) => {
state.loadNewDown = true
state.downloadUrl = null state.downloadUrl = null
console.log(record,'record') console.log(record,'record')
state.valueAll = [] state.valueAll = []
@@ -1108,7 +1112,7 @@ import { message } from "ant-design-vue";
const of_exit = () => { const of_exit = () => {
state.bg_check = false; state.bg_check = false;
state.errorMessage = '' state.errorMessage = ''
state.uploadDownId = '' // state.uploadDownId = ''
// state.uploadId = '' // state.uploadId = ''
state.uploadName = '' state.uploadName = ''
state.loadData = false state.loadData = false
@@ -1118,9 +1122,11 @@ import { message } from "ant-design-vue";
} }
// 上传结果 // 上传结果
const of_results = () => { const of_results = () => {
state.totalNumber = {}
state.bg_results = false state.bg_results = false
} }
const resultsUp = () => { const resultsUp = () => {
state.totalNumber = {}
state.bg_results = false state.bg_results = false
} }
const failedDownload = () => { const failedDownload = () => {
@@ -1142,7 +1148,7 @@ import { message } from "ant-design-vue";
} }
state.tableLoading = true state.tableLoading = true
if(state.valueAll.length != 0 && !state.loadData){ if(state.valueAll.length != 0 && !state.loadData&&state.loadNewDown){
if(state.valueAll.length >1){ if(state.valueAll.length >1){
state.bg_results = true state.bg_results = true
} }
@@ -1172,8 +1178,8 @@ import { message } from "ant-design-vue";
remarks:state.formData.remarks, remarks:state.formData.remarks,
evaluationName:state.formData.evaluationName, evaluationName:state.formData.evaluationName,
// detailIds:state.idValue, // detailIds:state.idValue,
evaluationDetailList:state.valueAll, evaluationDetailList:!state.loadNewDown?state.valueAll:null,
downloadUrls:state.downloadUrl, // downloadUrls:state.downloadUrl,
imagePath:state.formData.cover imagePath:state.formData.cover
}).then((res)=>{ }).then((res)=>{
console.log(res.data,'data') console.log(res.data,'data')
@@ -1273,8 +1279,11 @@ import { message } from "ant-design-vue";
}else{ }else{
// state.idValue = res.data.evaluationDetailList.map(item=>item.id) // state.idValue = res.data.evaluationDetailList.map(item=>item.id)
state.downloadUrl = res.data.evaluationDetailList.map(item=>item.downloadUrl) state.downloadUrl = res.data.evaluationDetailList.map(item=>item.downloadUrl)
state.valueAll = res.data.evaluationDetailList
state.totalNumber = res.data state.totalNumber = res.data
if(state.totalNumber.failedEntries!=0){
console.log('aaaaa')
state.valueAll = res.data.evaluationDetailList
}
} }
console.log(state.valueAll,'state.valueAll') console.log(state.valueAll,'state.valueAll')
state.uploadDownLoad = false state.uploadDownLoad = false
@@ -1366,6 +1375,7 @@ import { message } from "ant-design-vue";
// } // }
// 编辑 // 编辑
const openEdit = (record) => { const openEdit = (record) => {
state.loadNewDown = true
state.uploadDownId =record.id state.uploadDownId =record.id
state.bg_check = true state.bg_check = true
state.btShow = true state.btShow = true