src/views/dnc/common/ImportFileModal.vue
@@ -49,7 +49,7 @@
      /**
       * 点击导入文档或NC程序时触发
       * @param treeNodeInfo 点击树节点右键菜单导入程序时传入树节点信息
       * @param tableRowInfo 点击表格行右键菜单导入程序时传入行信息
       * @param tableRowInfo 右键表格行时传入行信息
       */
      handleImport(treeNodeInfo, tableRowInfo) {
        this.isUploadMultiple = true
@@ -69,6 +69,11 @@
        this.visible = true
      },
      /**
       * 点击文档生命周期的入库时触发
       * @param _
       * @param tableRowInfo 右键表格行时传入行信息
       */
      handlePush(_, tableRowInfo) {
        this.isUploadMultiple = false
        console.log('tableRowInfo', tableRowInfo)
@@ -80,22 +85,21 @@
        this.visible = true
      },
      handleRemove(file) {
        const index = this.fileList.indexOf(file)
        const newFileList = this.fileList.slice()
        newFileList.splice(index, 1)
        this.fileList = newFileList
      },
      /**
       * 选择好文件点击确定后
       * @param file 文件对象
       */
      beforeUpload(file) {
        if (this.isUploadMultiple) {
          if (!this.fileList.find(item => item.name === file.name)) this.fileList = [...this.fileList, file]
        } else {
          this.fileList.splice(0, 1, file)
        }
        else this.fileList.splice(0, 1, file)
        return false
      },
      /**
       * 点击上传至服务器按钮时触发
       */
      handleUpload() {
        const { fileList, $notification, isUploadMultiple, uploadParams, $bus } = this
        this.uploading = true
@@ -144,8 +148,11 @@
              if (uploadedFileCount === fileList.length) {
                // 至少有一个文件上传成功后就需要重新加载文档列表
                if (uploadSuccessFileCount > 0) {
                  $bus.$emit('importFileSuccess', uploadParams)
                  if (!isUploadMultiple) this.visible = false //无法连续入库多个版本因此入库成功后即可退出窗口
                  $bus.$emit('reloadDocumentListData', uploadParams)
                  if (!isUploadMultiple) {
                    $bus.$emit('reloadMainBottomTableData', 'documentVersion')
                    this.visible = false //无法连续入库多个版本因此入库成功后即可退出窗口
                  }
                }
                this.uploading = false
              }
@@ -154,6 +161,17 @@
      },
      /**
       * 删除文件列表项时触发
       * @param file 文件对象
       */
      handleRemove(file) {
        const index = this.fileList.indexOf(file)
        const newFileList = this.fileList.slice()
        newFileList.splice(index, 1)
        this.fileList = newFileList
      },
      /**
       * 控制文件上传窗口关闭并清空文件列表
       */
      handleModalClose() {