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,