소스 검색

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

dongfeng 8 달 전
부모
커밋
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,