mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
测评上传修改下载空白页
This commit is contained in:
@@ -703,7 +703,7 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
uploadTypes: true,
|
fileLists: [],
|
||||||
saveNotUpload: true,
|
saveNotUpload: true,
|
||||||
stateUpload: true,
|
stateUpload: true,
|
||||||
uploadParameters: {},
|
uploadParameters: {},
|
||||||
@@ -1142,7 +1142,6 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
window.open(`/activityApi/evaluation/download?id=${record.id}`);
|
window.open(`/activityApi/evaluation/download?id=${record.id}`);
|
||||||
}
|
}
|
||||||
const of_exit = () => {
|
const of_exit = () => {
|
||||||
state.uploadTypes = true
|
|
||||||
state.bg_check = false;
|
state.bg_check = false;
|
||||||
state.errorMessage = ''
|
state.errorMessage = ''
|
||||||
state.saveNotUpload = true
|
state.saveNotUpload = true
|
||||||
@@ -1164,7 +1163,10 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
state.bg_results = false
|
state.bg_results = false
|
||||||
}
|
}
|
||||||
const failedDownload = () => {
|
const failedDownload = () => {
|
||||||
const ids = state.totalNumber.successId+','+state.totalNumber.failedId
|
if(state.totalNumber.successId==''){
|
||||||
|
state.totalNumber.successId = null
|
||||||
|
}
|
||||||
|
const ids = state.totalNumber?.successId||''+(state.totalNumber?.successId==null?'':',')+state.totalNumber?.failedId||''
|
||||||
window.open(`/activityApi/evaluation/download-failed?ids=${ids}`)
|
window.open(`/activityApi/evaluation/download-failed?ids=${ids}`)
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1183,7 +1185,7 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
// 保存上传文件
|
// 保存上传文件
|
||||||
await boeRequest('/activityApi/evaluation/detail/saveEvaluationDetail post',{
|
await boeRequest('/activityApi/evaluation/detail/saveEvaluationDetail post',{
|
||||||
id:state.uploadId,
|
id:state.uploadId,
|
||||||
successIds:state.sussessIds
|
successIds:state.sussessIds.split(',')
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
state.uploadDownLoad = false
|
state.uploadDownLoad = false
|
||||||
state.saveNotUpload = false
|
state.saveNotUpload = false
|
||||||
@@ -1207,7 +1209,7 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
evaluationName:state.formData.evaluationName,
|
evaluationName:state.formData.evaluationName,
|
||||||
workNum: userInfo.value.userNo,
|
workNum: userInfo.value.userNo,
|
||||||
imagePath:state.formData.cover,
|
imagePath:state.formData.cover,
|
||||||
successIds:state.saveNotUpload?state.sussessIds:null
|
successIds:state.saveNotUpload?state.sussessIds.split(','):null
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
state.uploadDownLoad = false
|
state.uploadDownLoad = false
|
||||||
@@ -1248,6 +1250,7 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
const beforeUpload3 = async (file) => {
|
const beforeUpload3 = async (file) => {
|
||||||
|
console.log('bbbbb')
|
||||||
if(file.type === "application/pdf"){
|
if(file.type === "application/pdf"){
|
||||||
const pattern = /^([0-9\u4e00-\u9fa5\a-z\A-Z]+-){2}[0-9\u4e00-\u9fa5\a-z\A-Z]+\.\w*$/;
|
const pattern = /^([0-9\u4e00-\u9fa5\a-z\A-Z]+-){2}[0-9\u4e00-\u9fa5\a-z\A-Z]+\.\w*$/;
|
||||||
if (!pattern.test(file.name)) {
|
if (!pattern.test(file.name)) {
|
||||||
@@ -1313,19 +1316,14 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
watch(()=>state.uploadList.length,()=>{
|
|
||||||
state.uploadTypes = true
|
|
||||||
})
|
|
||||||
const handleChange = ({file, fileList,event}) => {
|
const handleChange = ({file, fileList,event}) => {
|
||||||
if(!state.uploadTypes){
|
state.fileLists = fileList
|
||||||
return
|
|
||||||
}
|
|
||||||
if(file.response && file.response.code === 200){
|
if(file.response && file.response.code === 200){
|
||||||
state.totalNumber = file.response.data
|
state.totalNumber = file.response.data
|
||||||
state.sussessIds = file.response.data.successId.split(',')
|
state.sussessIds = file.response.data?.successId
|
||||||
state.failedId = file.response.data.failedId
|
state.failedId = file.response.data.failedId
|
||||||
state.bg_results = true
|
state.bg_results = true
|
||||||
state.uploadDownLoad = false
|
state.uploadDownLoad = false
|
||||||
}
|
}
|
||||||
if(state.stateUpload){
|
if(state.stateUpload){
|
||||||
state.uploadList = fileList.slice(-1)
|
state.uploadList = fileList.slice(-1)
|
||||||
@@ -1334,7 +1332,6 @@ import {timeoutUpload} from "@/api/configPublic";
|
|||||||
};
|
};
|
||||||
const uploadRef = ref()
|
const uploadRef = ref()
|
||||||
const delUploadList = (i) => {
|
const delUploadList = (i) => {
|
||||||
state.uploadTypes = false
|
|
||||||
state.uploadDownLoad = false
|
state.uploadDownLoad = false
|
||||||
state.sussessIds = null
|
state.sussessIds = null
|
||||||
state.failedId = ''
|
state.failedId = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user