From fe72b7570e8e76d9238932185ed12a89797eee3b Mon Sep 17 00:00:00 2001 From: zhangsir Date: Thu, 11 Apr 2024 11:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=84=E4=B8=8A=E4=BC=A0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/evaluation/evaluationUpload.vue | 70 +++++++++++++---------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/src/views/evaluation/evaluationUpload.vue b/src/views/evaluation/evaluationUpload.vue index 4691e8cd..58199612 100644 --- a/src/views/evaluation/evaluationUpload.vue +++ b/src/views/evaluation/evaluationUpload.vue @@ -199,48 +199,56 @@
- -
选择文件
- 上传完成 -
+
+ + {{ item.name }} + +
-
-
上传完成
+
+
+ {{ {uploading: '正在上传', done: '上传完成', error: '上传失败'}[item.status] || '' }} +
-
- 100% +
+ {{ item.status === 'uploading' ? parseInt(item.percent) : 100 }}%
-
-
- - 删除 - -
+
+ 删除
- --> +
备注
@@ -693,6 +701,7 @@ import {timeoutUpload} from "@/api/configPublic"; const userInfo = computed(() => store.state.userInfo); const router = useRouter(); const state = reactive({ + uploadList: [], isRegularAdministrator: '', loadNewDown:false, totalNumber: {}, @@ -1106,6 +1115,7 @@ import {timeoutUpload} from "@/api/configPublic"; state.downloadUrl = null state.uploadId = '' state.valueAll = [] + state.uploadList = [] state.btShow = true state.bg_check = true; state.formData = {} @@ -1114,6 +1124,7 @@ import {timeoutUpload} from "@/api/configPublic"; state.loadNewDown = true state.downloadUrl = null state.valueAll = [] + state.uploadList = [] state.uploadDownId =record.id state.btShowEdit = trueFalse(record.permission,2) state.uploadId = record.id @@ -1358,24 +1369,20 @@ import {timeoutUpload} from "@/api/configPublic"; state.totalNumber = res.data state.totalNumber.importTrue = res.data.failedIds state.valueAll = res.data.evaluationDetailList + console.log(res.data,'res.data') } state.uploadDownLoad = false } }) - return false + // return false } - const handleChange = (info) => { - let resFileList = [...info.fileList]; - - resFileList = resFileList.slice(-2); - - resFileList = resFileList.map(file => { - if (file.response) { - file.url = file.response.url; - } - return file; - }); - state.filesList = resFileList; + const handleChange = ({file, fileList}) => { + file.response && file.response.code === 200 && (file.url = file.response.data) + state.uploadList = fileList.slice(-1) + }; + const delUploadList = () => { + state.uploadList = [] + state.valueAll = [] } const deleteItem = (record) => { dialog({ @@ -1584,6 +1591,7 @@ import {timeoutUpload} from "@/api/configPublic"; beforeUpload, beforeUpload3, handleChange, + delUploadList, bgcheck, deleteItem, emptyItem,