Browse Source

文件上传问题解决

master
ljlong_2630 7 months ago
parent
commit
8c435fa7e3
  1. 4
      src/components/Detail/src/DetailDeviceLedger.vue
  2. 15
      src/components/UploadFile/src/UploadFile.vue

4
src/components/Detail/src/DetailDeviceLedger.vue

@ -984,8 +984,8 @@ const getDialogUpload = (row) => {
function dialogUploadFile() {
let data = {
number: dialogUploadNumber.value,
filePathList: fileDialogUploadData.value.filePathList.map((item) => item.url),
fileInfoList: fileDialogUploadData.value.filePathList,
filePathList: fileDialogUploadData.value.filePathList?fileDialogUploadData.value.filePathList.map((item) => item.url):null,
fileInfoList: fileDialogUploadData.value.filePathList?fileDialogUploadData.value.filePathList:[],
funcCode: props.milestoneFuncCode,
fileBusiType: dialogUploadBusiCode.value
}

15
src/components/UploadFile/src/UploadFile.vue

@ -145,15 +145,12 @@ const excelUploadError: UploadProps['onError'] = (): void => {
}
//
const handleRemove = (file) => {
debugger
console.log(fileList.value)
console.log(file.name)
const findex = fileList.value.map((f) => f.name).indexOf(file.name)
console.log(findex)
if (findex > -1) {
fileList.value.splice(findex, 1)
emit('update:modelValue', listToString(fileList.value))
}
// const findex = fileList.value.map((f) => f.name).indexOf(file.name)
// console.log(findex)
// if (findex > -1) {
// fileList.value.splice(findex, 1)
// emit('update:modelValue', listToString(fileList.value))
// }
}
const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
console.log(uploadFile)

Loading…
Cancel
Save