Selaa lähdekoodia

分析状态更改

liujiejie 11 kuukautta sitten
vanhempi
commit
83b0e37213
2 muutettua tiedostoa jossa 10 lisäystä ja 43 poistoa
  1. 1 39
      src/views/dataAdministration/index.vue
  2. 9 4
      src/views/performance/assetssMag.vue

+ 1 - 39
src/views/dataAdministration/index.vue

@@ -57,7 +57,6 @@
         class="center-align-table"
         :data="tableData"
         border
-        :cell-style="rowStyle"
         stripe
         style="width: 100%"
         :row-key="(row) => row.uniqueCode"
@@ -66,12 +65,7 @@
         :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
       >
         <!-- Table Columns -->
-        <el-table-column
-          prop="fieldName"
-          align="center"
-          label="风场名称"
-          min-width="200"
-        >
+        <el-table-column prop="fieldName" label="风场名称" min-width="200">
         </el-table-column>
         <el-table-column
           prop="batchName"
@@ -912,38 +906,6 @@ export default {
         alert("弹出窗口已被阻止!请允许弹出式窗口访问本网站。");
       }
     },
-    // async handleClick() {
-    //   try {
-    //     // 获取 HTML 内容
-    //     const response = await axios.get("/downLoadApi", {
-    //       responseType: "blob",
-    //     }); // 确保响应类型为 Blob
-    //     const reader = new FileReader();
-    //     reader.onload = function (event) {
-    //       const htmlContent = event.target.result; // 读取的 HTML 内容
-    //       const newWindow = window.open("", "_blank");
-    //       newWindow.document.open();
-    //       newWindow.document.write(htmlContent);
-    //       newWindow.document.close();
-    //       // 获取当前页面的 URL
-    //       const currentUrl = window.location.href;
-    //       const proxyUrl = currentUrl.substring(0, currentUrl.indexOf("/", 8)); // 从第8个字符开始搜索,找到第一个 "/" 为止
-    //       // 拼接代理地址和接口路径
-    //       const apiEndpoint = proxyUrl + "/downLoadApi";
-
-    //       // 拼接新的路径
-    //       const newUrl = apiEndpoint + "/downLoadApi";
-    //       // 设置 base 元素
-    //       const baseElement = newWindow.document.createElement("base");
-    //       baseElement.href = newUrl; // 使用代理地址和接口路径
-    //       newWindow.document.head.appendChild(baseElement);
-    //     };
-    //     reader.readAsText(response.data, "utf-8"); // 以 UTF-8 编码读取 Blob
-    //   } catch (error) {
-    //     console.error("Failed to fetch data:", error);
-    //     this.$message.error("无法打开新链接");
-    //   }
-    // },
     async getTableList() {
       try {
         this.loading = true;

+ 9 - 4
src/views/performance/assetssMag.vue

@@ -54,7 +54,7 @@
         >
           <template slot-scope="scope">
             <el-progress
-              v-if="scope.row.analysisState == 0"
+              v-if="scope.row.analysisState == 20"
               :text-inside="true"
               :stroke-width="20"
               :percentage="scope.row.analysisProgress"
@@ -76,7 +76,7 @@
             <span v-if="scope.row.analysisState == -1">未分析</span>
             <span
               v-else-if="
-                scope.row.analysisState == 0 && scope.row.errState == 0
+                scope.row.analysisState == 20 && scope.row.errState == 0
               "
               style="color: #f90"
               >分析中</span
@@ -85,10 +85,15 @@
               >分析异常</span
             >
             <span
-              v-else-if="scope.row.analysisState == 1"
+              v-else-if="scope.row.analysisState == 30"
               style="color: #4caf50"
               >分析完成</span
             >
+            <span
+              v-else-if="scope.row.analysisState == 10"
+              style="color: #4caf50"
+              >排队中</span
+            >
             <span v-else>/</span>
           </template>
         </el-table-column>
@@ -145,7 +150,7 @@
             <!-- 分析中 -->
             <el-button
               v-else-if="
-                scope.row.analysisState == 0 && scope.row.errState == 0
+                scope.row.analysisState == 20 && scope.row.errState == 0
               "
               @click="handleAssetssDetail(scope.row, '0')"
               type="text"