Przeglądaj źródła

修复bug6-25am 合并

liujiejie 1 rok temu
rodzic
commit
6028b0714c

BIN
dist.zip


BIN
src/assets/img/loadingError.jpeg


BIN
src/assets/img/loadingError.webp


BIN
src/assets/img/loadingErrorFx.webp


+ 27 - 2
src/views/dataAdministration/index.vue

@@ -174,7 +174,7 @@
     <!-- 弹出层 -->
     <!-- 新增 -->
     <el-dialog
-      title="新增"
+      title="新增(批次列表为空时,请前往性能分析下批次管理中添加批次!)"
       :visible.sync="nuedialog"
       class="dialogBox"
       width="900px"
@@ -742,7 +742,32 @@ export default {
     },
     //新增按钮
     addData() {
-      this.nuedialog = true;
+      if (this.batchList === null || this.batchList.length === 0) {
+        this.$confirm(
+          "批次列表为空,请前往性能分析菜单下的批次管理中添加批次!确认跳转到批次管理菜单吗?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            this.$router.push("/home/performance/batchMag?id=22");
+            this.$message({
+              type: "success",
+              message: "成功!",
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消",
+            });
+          });
+      } else {
+        this.nuedialog = true;
+      }
     },
     //获取批次编号列表接口
     async getBatchCodeList() {

+ 3 - 3
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2024-06-24 11:11:34
+ * @LastEditTime: 2024-06-25 17:07:05
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -110,7 +110,7 @@
               @error="imageError(index)"
               v-lazy-load="{
                 src: file.fileAddr,
-                errorImageSrc: require('../../assets/img/loadingError.webp'),
+                errorImageSrc: require('../../assets/img/loadingErrorFx.webp'),
               }"
             />
             <el-skeleton
@@ -161,7 +161,7 @@
               @error="imageError(index + generalFiles.length)"
               v-lazy-load="{
                 src: file.fileAddr,
-                errorImageSrc: require('../../assets/img/loadingError.webp'),
+                errorImageSrc: require('../../assets/img/loadingErrorFx.webp'),
               }"
             />
             <el-skeleton

+ 24 - 7
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2024-06-25 10:04:12
+ * @LastEditTime: 2024-06-25 17:03:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -120,10 +120,24 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="12"
-          ><div class="right">
-            <img src="../../../assets/Wechat.jpg" alt="" /></div
-        ></el-col>
+        <el-col :span="12" v-loading="htmlLoading">
+          <div class="right">
+            <iframe
+              v-if="htmlLoading"
+              :src="windDetail.elevationHeight"
+              frameborder="0"
+              @load="iframeLoad"
+              width="100%"
+              height="100%"
+            ></iframe>
+            <img
+              v-else
+              style="width: 100%"
+              src="../../../assets/img/loadingError.webp"
+              alt=""
+            />
+          </div>
+        </el-col>
       </el-row>
     </el-card>
     <el-empty :image-size="200" v-if="flage"></el-empty>
@@ -202,6 +216,7 @@ export default {
   },
   data() {
     return {
+      htmlLoading: true,
       loading: false,
       engineCode: null, //台账机组编号
       windDetail: {},
@@ -241,11 +256,13 @@ export default {
     this.getWindCodeList();
   },
   methods: {
+    iframeLoad() {
+      this.htmlLoading = false;
+    },
     async handleComment() {
       this.loading = true;
-      console.log(this.editableTabs, "this.editableTabs");
       try {
-        const res = await analysisCommentEdit({
+        await analysisCommentEdit({
           batchCode: this.$route.query.batchCode,
           analysisTypeCode: this.form.configAnalysis,
           commentList: this.editableTabs.map((item) => {

+ 33 - 3
src/views/performance/components/analysisEvent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2024-06-25 16:30:49
+ * @LastEditTime: 2024-06-26 09:08:48
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -33,6 +33,7 @@
                   v-model="form.configAnalysis"
                   placeholder="请选择分析类型"
                   size="small"
+                  collapse-tags
                   multiple
                   clearable
                 >
@@ -51,6 +52,7 @@
               >
                 <el-select
                   multiple
+                  collapse-tags
                   v-model="form.turbines"
                   placeholder="请选择机组编号"
                   size="small"
@@ -575,9 +577,22 @@
             <div>11.预期寿命(Expected Lifetime):风力发电机组的设计寿命</div> -->
           </div>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="12" v-loading="htmlLoading">
           <div class="right">
-            <iframe src="/html/A01.html" frameborder="0"></iframe>
+            <iframe
+              v-if="htmlLoading"
+              :src="windDetail.elevationHeight"
+              frameborder="0"
+              @load="iframeLoad"
+              width="100%"
+              height="100%"
+            ></iframe>
+            <img
+              v-else
+              style="width: 100%"
+              src="../../../assets/img/loadingError.webp"
+              alt=""
+            />
           </div>
         </el-col>
       </el-row>
@@ -661,6 +676,7 @@ import { getWindEngineGroup } from "@/api/ledger";
 export default {
   data() {
     return {
+      htmlLoading: true,
       engineCode: null, //台账机组编号
       picker: [],
       loading: false,
@@ -713,6 +729,9 @@ export default {
     this.getWindCodeList();
   },
   methods: {
+    iframeLoad() {
+      this.htmlLoading = false;
+    },
     ensureMinValue(field, index) {
       if (field[index] < 1) {
         field[index] = 1;
@@ -916,6 +935,17 @@ export default {
     }
   }
 }
+::v-deep.el-select--small,
+::v-deep.el-select__tags {
+  width: 200px !important;
+  .el-tag--light {
+    display: flex;
+    justify-content: space-between;
+  }
+  .el-tag--light:nth-child(1) {
+    width: 125px;
+  }
+}
 ::v-deep .searchFrom {
   .el-form-item__content {
     display: flex !important;