mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 10:26:44 +08:00
测评
This commit is contained in:
@@ -761,6 +761,7 @@ import {timeoutUpload} from "@/api/configPublic";
|
||||
// { value: 3, label: "已发布" },
|
||||
// ]);
|
||||
onMounted(()=>{
|
||||
timeoutUpload(1000*60*5)
|
||||
state.tableLoading = true
|
||||
console.log(userInfo.value,'sssss')
|
||||
listData()
|
||||
@@ -1137,7 +1138,6 @@ import {timeoutUpload} from "@/api/configPublic";
|
||||
|
||||
}
|
||||
const reportUpload = async () => {
|
||||
timeoutUpload(1000*60*5)
|
||||
if(!state.formData.evaluationName){
|
||||
message.error('请输入测评标题名称')
|
||||
return
|
||||
@@ -1149,7 +1149,7 @@ import {timeoutUpload} from "@/api/configPublic";
|
||||
return
|
||||
}
|
||||
state.tableLoading = true
|
||||
|
||||
state.uploadDownLoad = true
|
||||
if(state.valueAll.length != 0 && !state.loadData&&state.loadNewDown){
|
||||
if(state.valueAll.length >1){
|
||||
state.bg_results = true
|
||||
@@ -1159,20 +1159,28 @@ import {timeoutUpload} from "@/api/configPublic";
|
||||
item.createId = userInfo.value.userId
|
||||
}
|
||||
})
|
||||
state.totalNumber.failedEntisTrue = state.totalNumber.failedEntries == 0 ? '0' : '1'
|
||||
// 保存上传文件
|
||||
await boeRequest('/activityApi/evaluation/detail/saveEvaluationDetail post',{evaluationDetailListlist:state.valueAll,pid:state.uploadId}).then((res)=>{
|
||||
await boeRequest('/activityApi/evaluation/detail/saveEvaluationDetail post',{
|
||||
evaluationDetailListlist:state.valueAll,
|
||||
pid:state.uploadId,
|
||||
isUpload: state.totalNumber.failedEntisTrue,
|
||||
}).then((res)=>{
|
||||
state.uploadDownLoad = false
|
||||
if(res.code == 200){
|
||||
if(res.data.length!=0){
|
||||
if(state.valueAll.length>1){
|
||||
state.totalNumber.failedEntries = state.totalNumber.failedEntries + res.data.length
|
||||
state.totalNumber.successfulEntries = state.totalNumber.successfulEntries - res.data.length
|
||||
state.totalNumber.failedEntries = state.totalNumber.failedEntries + res.data.failedIds.length
|
||||
state.totalNumber.successfulEntries = state.totalNumber.successfulEntries - res.data.failedIds.length
|
||||
}else{
|
||||
state.totalNumber.totalEntries = 1
|
||||
state.totalNumber.failedEntries = res.data.length
|
||||
state.totalNumber.failedEntries = 1
|
||||
state.totalNumber.successfulEntries = 0
|
||||
}
|
||||
message.error('请先下载失败数据,并修改后重新上传')
|
||||
state.totalNumber.failedIds = res.data
|
||||
if(res.data.failedIds.length!=0){
|
||||
message.error('请先下载失败数据,并修改后重新上传')
|
||||
}
|
||||
state.totalNumber.failedIds = [...res.data.failedIds,...res.data.successIds]
|
||||
state.bg_results = true
|
||||
state.bg_check = false
|
||||
return
|
||||
@@ -1184,7 +1192,9 @@ import {timeoutUpload} from "@/api/configPublic";
|
||||
})
|
||||
}
|
||||
if(state.uploadStatus||state.btShow){
|
||||
state.totalNumber.failedEntisTrue = state.totalNumber.failedEntries == 0 ? '0' : '1'
|
||||
await boeRequest('/activityApi/evaluation/save post',{
|
||||
isUpload: state.totalNumber.failedEntisTrue,
|
||||
id: state.uploadDownId,
|
||||
createId:userInfo.value.userId,
|
||||
createName:userInfo.value.realName,
|
||||
@@ -1197,17 +1207,20 @@ import {timeoutUpload} from "@/api/configPublic";
|
||||
// downloadUrls:state.downloadUrl,
|
||||
imagePath:state.formData.cover
|
||||
}).then((res)=>{
|
||||
if(res.data.length!=0){
|
||||
state.uploadDownLoad = false
|
||||
if(res.data.failedIds!=null||res.data.successIds!=null){
|
||||
if(state.valueAll.length>1){
|
||||
state.totalNumber.failedEntries = state.totalNumber.failedEntries + res.data.length
|
||||
state.totalNumber.successfulEntries = state.totalNumber.successfulEntries - res.data.length
|
||||
state.totalNumber.failedEntries = state.totalNumber.failedEntries + res.data.failedIds.length
|
||||
state.totalNumber.successfulEntries = state.totalNumber.successfulEntries - res.data.failedIds.length
|
||||
}else{
|
||||
state.totalNumber.totalEntries = 1
|
||||
state.totalNumber.failedEntries = res.data.length
|
||||
state.totalNumber.failedEntries = 1
|
||||
state.totalNumber.successfulEntries = 0
|
||||
}
|
||||
message.error('请先下载失败数据,并修改后重新上传')
|
||||
state.totalNumber.failedIds = res.data
|
||||
if(res.data.failedIds.length!=0){
|
||||
message.error('请先下载失败数据,并修改后重新上传')
|
||||
}
|
||||
state.totalNumber.failedIds = [...res.data.failedIds,...res.data.successIds]
|
||||
state.bg_results = true
|
||||
state.bg_check = false
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user