瀏覽代碼

Merge remote-tracking branch 'origin/qirui-v2' into qirui-v2

dongfeng 10 月之前
父節點
當前提交
bb51ee33a6
共有 1 個文件被更改,包括 31 次插入27 次删除
  1. 31 27
      src/views/componentsDVP/verify/dvpVerify.vue

+ 31 - 27
src/views/componentsDVP/verify/dvpVerify.vue

@@ -698,37 +698,41 @@ export default {
       let _that = this;
       // 试验报告文件
       let testReportFileModel = undefined;
-      if (_that.fileList.length > 0 && _that.fileList[0].newFileName) {
-        testReportFileModel = {
-          newFileName: _that.fileList[0].newFileName,
-          fileName: _that.fileList[0].fileName,
-          filePath: _that.fileList[0].filePath,
-          fileSize: _that.fileList[0].fileSize
-        };
-      } else {
-        testReportFileModel = {
-          newFileName: _that.fileList[0].testReportFileGenerateName,
-          fileName: _that.fileList[0].testReportFileName,
-          filePath: _that.fileList[0].testReportFilePath,
-          fileSize: _that.fileList[0].testReportFileSize
-        };
+      if (_that.fileList.length > 0) {
+        if (_that.fileList[0].newFileName) {
+          testReportFileModel = {
+            newFileName: _that.fileList[0].newFileName,
+            fileName: _that.fileList[0].fileName,
+            filePath: _that.fileList[0].filePath,
+            fileSize: _that.fileList[0].fileSize
+          };
+        } else {
+          testReportFileModel = {
+            newFileName: _that.fileList[0].testReportFileGenerateName,
+            fileName: _that.fileList[0].testReportFileName,
+            filePath: _that.fileList[0].testReportFilePath,
+            fileSize: _that.fileList[0].testReportFileSize
+          };
+        }
       }
       // 材料报告文件
       let materialsReportFileModel = undefined;
-      if (_that.materialFileList.length > 0 && _that.materialFileList[0].newFileName) {
-        materialsReportFileModel = {
-          newFileName: _that.materialFileList[0].newFileName,
-          fileName: _that.materialFileList[0].fileName,
-          filePath: _that.materialFileList[0].filePath,
-          fileSize: _that.materialFileList[0].fileSize
-        };
-      } else {
+      if (_that.materialFileList.length > 0) {
+        if (_that.materialFileList[0].newFileName) {
           materialsReportFileModel = {
-          newFileName: _that.materialFileList[0].materialsFileGenerateName,
-          fileName: _that.materialFileList[0].materialsFileName,
-          filePath: _that.materialFileList[0].materialsFilePath,
-          fileSize: _that.materialFileList[0].materialsFileSize
-        };
+            newFileName: _that.materialFileList[0].newFileName,
+            fileName: _that.materialFileList[0].fileName,
+            filePath: _that.materialFileList[0].filePath,
+            fileSize: _that.materialFileList[0].fileSize
+          };
+        } else {
+          materialsReportFileModel = {
+            newFileName: _that.materialFileList[0].materialsFileGenerateName,
+            fileName: _that.materialFileList[0].materialsFileName,
+            filePath: _that.materialFileList[0].materialsFilePath,
+            fileSize: _that.materialFileList[0].materialsFileSize
+          };
+        }
       }
       let data = {
         dvpId: _that.$store.getters.dvpId,