sean.zhou
2023-04-25 f3e92fa13107b569e0aa4d3ffff013fd2983660b
src/pages/page-web/projects/Firmwares.vue
@@ -242,7 +242,7 @@
  if (fileList.value.length === 0) {
    message.error('Please select at least one file.')
  }
  const uploading: string = 'uploading'
  let uploading: string
  formRef.value.validate().then(async () => {
    const file: FileItem = fileList.value[0]
    const fileData = new FormData()
@@ -257,6 +257,8 @@
        fileData.append(key, val.toString())
      }
    })
    const timestamp = new Date().getTime()
    uploading = (file.name ?? 'uploding') + timestamp
    notification.open({
      key: uploading,
      message: `Uploading  ${moment().format()}`,
@@ -267,7 +269,7 @@
      if (res.code === 0) {
        notification.success({
          message: `Uploaded  ${moment().format()}`,
          description: `[${file.name}] file uploaded successfully.`,
          description: `[${file.name}] file uploaded successfully. Duration: ${moment.duration(new Date().getTime() - timestamp).asSeconds()}`,
          duration: null
        })
        getAllFirmwares(pageParam)