liujiejie 5 miesięcy temu
rodzic
commit
af44678177

+ 30 - 6
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2024-12-30 14:18:54
+ * @LastEditTime: 2025-01-03 12:11:11
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -417,6 +417,22 @@
                   @load="iframeLoad(index + diagramRelations.length)"
                 ></iframe>
               </el-col>
+              <el-col
+                v-for="(file, index) in diagramRelations"
+                :key="index + file.fileAddr + file.createTime + 'png'"
+                :span="24"
+                :style="{
+                  display:
+                    getFileType(file.fileAddr) === 'image' ? 'block' : 'none',
+                }"
+                class="col_content"
+              >
+                <img
+                  :src="file.fileAddr"
+                  alt=""
+                  style="width: 100%; height: 590px"
+                />
+              </el-col>
             </template>
           </el-row>
         </el-card>
@@ -713,11 +729,19 @@ export default {
             response.data.length > 0 &&
             response.data[0].commentDescriptionVos) ||
           [];
-        const fileUrl = response.data[0].generalFiles[0].fileAddr;
-        if (this.formInfo.analysisTypeCode === "yaw_error") {
-          this.fetchCsvData("yaw_error", fileUrl);
-        } else if (this.formInfo.analysisTypeCode === "production_indicator") {
-          this.fetchCsvData("production_indicator", fileUrl);
+        if (
+          response.data[0] &&
+          response.data[0]?.generalFiles &&
+          response.data[0]?.generalFiles[0]?.fileAddr
+        ) {
+          const fileUrl = response.data[0]?.generalFiles[0]?.fileAddr;
+          if (this.formInfo.analysisTypeCode === "yaw_error") {
+            this.fetchCsvData("yaw_error", fileUrl);
+          } else if (
+            this.formInfo.analysisTypeCode === "production_indicator"
+          ) {
+            this.fetchCsvData("production_indicator", fileUrl);
+          }
         }
 
         this.initializeLoading();

+ 42 - 6
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2024-12-31 14:29:58
+ * @LastEditTime: 2025-01-03 12:15:53
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -347,6 +347,21 @@
                   height="100%"
                 ></iframe>
               </el-col>
+              <el-col
+                :key="index + file.fileAddr + file.createTime + 'png'"
+                :span="24"
+                class="col_content"
+                :style="{
+                  display:
+                    getFileType(file.fileAddr) === 'image' ? 'block' : 'none',
+                }"
+              >
+                <img
+                  :src="file.fileAddr"
+                  alt=""
+                  style="width: 100%; height: 590px"
+                />
+              </el-col>
             </template>
           </template>
         </template>
@@ -479,6 +494,21 @@
                   @load="iframeLoad(index + diagramRelations.length)"
                 ></iframe>
               </el-col>
+              <el-col
+                :key="index + file.fileAddr + file.createTime + 'png'"
+                :span="24"
+                class="col_content"
+                :style="{
+                  display:
+                    getFileType(file.fileAddr) === 'image' ? 'block' : 'none',
+                }"
+              >
+                <img
+                  :src="file.fileAddr"
+                  alt=""
+                  style="width: 100%; height: 590px"
+                />
+              </el-col>
             </template>
           </template>
         </template>
@@ -741,11 +771,17 @@ export default {
               ? this.editableTabs[0].commentTypeCode
               : "";
         }
-        const fileUrl = response.data[0].generalFiles[0].fileAddr;
-        if (this.form.configAnalysis === "yaw_error") {
-          this.fetchCsvData("yaw_error", fileUrl);
-        } else if (this.form.configAnalysis === "production_indicator") {
-          this.fetchCsvData("production_indicator", fileUrl);
+        if (
+          response.data[0] &&
+          response.data[0]?.generalFiles &&
+          response.data[0]?.generalFiles[0]?.fileAddr
+        ) {
+          const fileUrl = response.data[0].generalFiles[0].fileAddr;
+          if (this.form.configAnalysis === "yaw_error") {
+            this.fetchCsvData("yaw_error", fileUrl);
+          } else if (this.form.configAnalysis === "production_indicator") {
+            this.fetchCsvData("production_indicator", fileUrl);
+          }
         }
 
         //有功功率的数据处理