Browse Source

文件上传修改

master
陈薪名 1 year ago
parent
commit
c4dad6c041
  1. 4
      src/components/ImportForm/src/ImportForm.vue

4
src/components/ImportForm/src/ImportForm.vue

@ -156,11 +156,11 @@ const submitForm = async () => {
} }
formLoading.value = true formLoading.value = true
const formData = new FormData() const formData = new FormData()
formData.append('888', fileList.value[0].raw) formData.append(file.value, fileList.value[0].raw)
request.post({ request.post({
url: importUrl, url: importUrl,
method:'POST', method:'POST',
params:{mode:mode.value, file: '888', updatePart: updatePart.value}, params:{mode:mode.value, file: file.value, updatePart: updatePart.value},
data:formData, responseType:'blob', data:formData, responseType:'blob',
headersType:'multipart/form-data' }) headersType:'multipart/form-data' })
.then((response: any) => { .then((response: any) => {

Loading…
Cancel
Save