mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
测评
This commit is contained in:
@@ -61,3 +61,6 @@ http.interceptors.response.use(
|
||||
);
|
||||
|
||||
export default http;
|
||||
export function timeoutUpload(uploadTime) {
|
||||
http.defaults.timeout = uploadTime;
|
||||
}
|
||||
@@ -506,7 +506,7 @@
|
||||
:columns="columnsAdd"
|
||||
:data-source="tableDataAdd"
|
||||
:loading="tableLoadingAdd"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
:scroll="{ x: 1000,y: 500 }"
|
||||
:pagination="paginationAdd"
|
||||
>
|
||||
<template #addAuthority="{ record, column }">
|
||||
@@ -680,6 +680,7 @@ import {
|
||||
} from "@/api/evaluation";
|
||||
import { useStore } from "vuex";
|
||||
import { message } from "ant-design-vue";
|
||||
import {timeoutUpload} from "@/api/configPublic";
|
||||
export default {
|
||||
name: 'evaluationUpload',
|
||||
components:{
|
||||
@@ -991,7 +992,7 @@ import { message } from "ant-design-vue";
|
||||
key: "realName",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
@@ -1020,6 +1021,7 @@ import { message } from "ant-design-vue";
|
||||
{
|
||||
title: "操作",
|
||||
width: "20%",
|
||||
fixed: 'right',
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
align: "center",
|
||||
@@ -1135,6 +1137,7 @@ import { message } from "ant-design-vue";
|
||||
|
||||
}
|
||||
const reportUpload = async () => {
|
||||
timeoutUpload(1000*60*5)
|
||||
if(!state.formData.evaluationName){
|
||||
message.error('请输入测评标题名称')
|
||||
return
|
||||
@@ -1158,9 +1161,24 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
})
|
||||
//
|
||||
await saveEvaluationDetail({evaluationDetailListlist:state.valueAll,pid:state.uploadId}).then((res)=>{
|
||||
await boeRequest('/activityApi/evaluation/detail/saveEvaluationDetail post',{evaluationDetailListlist:state.valueAll,pid:state.uploadId}).then((res)=>{
|
||||
if(res.code == 200){
|
||||
message.success(res.msg)
|
||||
if(res.data.length!=0){
|
||||
// message.success(res.msg)
|
||||
if(state.valueAll.length>1){
|
||||
state.totalNumber.failedEntries = state.totalNumber.failedEntries + res.data.length
|
||||
state.totalNumber.successfulEntries = state.totalNumber.successfulEntries - res.data.length
|
||||
}else{
|
||||
state.totalNumber.totalEntries = 1
|
||||
state.totalNumber.failedEntries = res.data.length
|
||||
state.totalNumber.successfulEntries = 0
|
||||
}
|
||||
message.error('请先下载失败数据,并修改后重新上传')
|
||||
state.totalNumber.failedIds = res.data
|
||||
state.bg_results = true
|
||||
state.bg_check = false
|
||||
return
|
||||
}
|
||||
}
|
||||
if(res.data.code == -1){
|
||||
message.error('保存失败')
|
||||
@@ -1170,7 +1188,7 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
if(state.uploadStatus||state.btShow){
|
||||
console.log(state.uploadStatus,'state.uploadStatus')
|
||||
await save({
|
||||
await boeRequest('/activityApi/evaluation/save post',{
|
||||
id: state.uploadDownId,
|
||||
createId:userInfo.value.userId,
|
||||
createName:userInfo.value.realName,
|
||||
@@ -1182,7 +1200,22 @@ import { message } from "ant-design-vue";
|
||||
// downloadUrls:state.downloadUrl,
|
||||
imagePath:state.formData.cover
|
||||
}).then((res)=>{
|
||||
console.log(res.data,'data')
|
||||
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
|
||||
}else{
|
||||
state.totalNumber.totalEntries = 1
|
||||
state.totalNumber.failedEntries = res.data.length
|
||||
state.totalNumber.successfulEntries = 0
|
||||
}
|
||||
message.error('请先下载失败数据,并修改后重新上传')
|
||||
state.totalNumber.failedIds = res.data
|
||||
state.bg_results = true
|
||||
state.bg_check = false
|
||||
return
|
||||
}
|
||||
console.log(res.data,'save')
|
||||
})
|
||||
}
|
||||
//else{
|
||||
|
||||
Reference in New Issue
Block a user