liujiejie vor 6 Monaten
Ursprung
Commit
93610d0cac

+ 20 - 20
src/assets/js/constants/echarts-config/pareto.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:19:45
- * @LastEditTime: 2024-11-27 15:05:13
+ * @LastEditTime: 2024-12-31 11:10:20
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/pareto.js
@@ -79,22 +79,22 @@ export const option = {
       type: "bar",
       data: [50, 30, 10, 5, 5],
       showBackground: true,
-      itemStyle: {
-        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-          { offset: 0, color: "#83bff6" },
-          { offset: 0.5, color: "#188df0" },
-          { offset: 1, color: "#188df0" },
-        ]),
-      },
-      emphasis: {
-        itemStyle: {
-          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-            { offset: 0, color: "#2378f7" },
-            { offset: 0.7, color: "#2378f7" },
-            { offset: 1, color: "#83bff6" },
-          ]),
-        },
-      },
+      // itemStyle: {
+      //   color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+      //     { offset: 0, color: "#83bff6" },
+      //     { offset: 0.5, color: "#188df0" },
+      //     { offset: 1, color: "#188df0" },
+      //   ]),
+      // },
+      // emphasis: {
+      //   itemStyle: {
+      //     color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+      //       { offset: 0, color: "#2378f7" },
+      //       { offset: 0.7, color: "#2378f7" },
+      //       { offset: 1, color: "#83bff6" },
+      //     ]),
+      //   },
+      // },
     },
     {
       name: "累积百分比",
@@ -102,9 +102,9 @@ export const option = {
       yAxisIndex: 1,
       data: [50, 80, 90, 95, 100],
       smooth: true,
-      lineStyle: {
-        color: "#d14a61",
-      },
+      // lineStyle: {
+      //   color: "#d14a61",
+      // },
     },
   ],
 };

+ 2 - 3
src/components/Tinymce.vue

@@ -99,7 +99,6 @@ export default Vue.extend({
               uploadFile(form)
                 .then((res) => {
                   let data = res.data;
-                  console.log(data, 7777);
                   insertFn(`${data}`);
                   Vue.prototype.$message({
                     type: "success",
@@ -137,8 +136,8 @@ export default Vue.extend({
     //     alert("只能上传格式为html、pdf、word、excel、csv、docx、xlsx的文件!");
     //     return;
     //   }
-    //   const form = new FormData();
-    //   form.append("file", file);
+    // const form = new FormData();
+    // form.append("file", file);
     //   uploadFile(form)
     //     .then((res) => {
     //       let data = res.data;

+ 1 - 1
src/store/dragChart.js

@@ -43,7 +43,7 @@ export default {
         relatedFieldsData: [], //关联字段表
         formFilterAlign: [],
       };
-      //清空indexeddb 数据库
+      //跳转离开编辑表格页面触发清空indexeddb 数据库方法
       clearAllDataFromIndexedDB();
       clearMyIndexedDBIndexedDB();
       // 遍历重置每个字段

+ 0 - 10
src/utils/vuexIndexedDBPlugin.js

@@ -185,18 +185,14 @@ const filterState = (state) => {
 const openDB = (dbName, version) => {
   return new Promise((resolve, reject) => {
     const request = indexedDB.open(dbName, version);
-
     request.onsuccess = () => {
       resolve(request.result);
     };
-
     request.onerror = (error) => {
       reject(error);
     };
-
     request.onupgradeneeded = (event) => {
       const db = event.target.result;
-
       // 创建对象存储,确保名称为 vuexData(与getData中的名称一致)
       if (!db.objectStoreNames.contains("vuexData")) {
         db.createObjectStore("vuexData");
@@ -204,12 +200,10 @@ const openDB = (dbName, version) => {
     };
   });
 };
-
 // vuex 插件
 const vuexIndexedDBPlugin = (store) => {
   const dbName = "vuexDB";
   const keyName = "vuexState";
-
   // 初始化 IndexedDB 并加载状态
   openDB(dbName, 1).then(() => {
     getData(dbName, keyName).then((savedState) => {
@@ -221,16 +215,13 @@ const vuexIndexedDBPlugin = (store) => {
       }
     });
   });
-
   // 订阅 Vuex mutations,每次状态变更时保存到 IndexedDB
   store.subscribe((mutation, state) => {
     if (mutation.type.startsWith("dragChart/")) {
       const dragChartState = state.dragChart;
-
       try {
         // 过滤不需要保存的内容
         const cleanedState = filterState(dragChartState);
-
         // 直接保存整个状态到 IndexedDB
         saveData("vuexData", keyName, cleanedState)
           .then(() => {
@@ -253,5 +244,4 @@ const vuexIndexedDBPlugin = (store) => {
     }
   });
 };
-
 export default vuexIndexedDBPlugin;

+ 76 - 51
src/views/dataAdministration/index.vue

@@ -516,8 +516,20 @@
             </el-col>
           </el-row>
         </el-form>
-        <el-divider>映射点表配置</el-divider>
-        <WindCodeAndTypeForPlt ref="forPltRef"></WindCodeAndTypeForPlt>
+        <el-divider
+          v-if="
+            editTransferStateForm.transferTypeName !== '故障' &&
+            editTransferStateForm.transferTypeName !== '告警'
+          "
+          >映射点表配置</el-divider
+        >
+        <WindCodeAndTypeForPlt
+          v-if="
+            editTransferStateForm.transferTypeName !== '故障' &&
+            editTransferStateForm.transferTypeName !== '告警'
+          "
+          ref="forPltRef"
+        ></WindCodeAndTypeForPlt>
         <span slot="footer" class="dialog-footer">
           <el-button @click="editstateCancel('editStateForm')" size="small"
             >取 消</el-button
@@ -745,53 +757,64 @@ export default {
             .then((_) => {
               const token = JSON.parse(sessionStorage.getItem("vuex"))?.auth
                 ?.userInfo?.token;
-              axios
-                .post(
-                  "/transDataWeb/transConf/insertOrUpdate",
-                  {
-                    type: this.forPltFrom.transferType,
-                    windCode: this.forPltFrom.fieldCode,
-                    windName: this.forPltFrom.fieldName,
-                    ...this.$refs.forPltRef.formData,
-                  },
-                  {
-                    headers: {
-                      token,
+              try {
+                axios
+                  .post(
+                    "/transDataWeb/transConf/insertOrUpdate",
+                    {
+                      type: this.forPltFrom.transferType,
+                      windCode: this.forPltFrom.fieldCode,
+                      windName: this.forPltFrom.fieldName,
+                      ...(this.$refs.forPltRef && this.$refs.forPltRef.formData
+                        ? this.$refs.forPltRef.formData
+                        : {}),
                     },
-                  }
-                )
-                .then((pltRes) => {
-                  if (pltRes.data.code === 200) {
-                    dataTransfer({
-                      dataTransferAddr:
-                        this.editTransferStateForm.dataTransferTypePath,
-                      dataTransferType: this.editTransferStateForm.transferType,
-                      batchCode: this.editTransferStateForm.batchCode,
-                      timeGranularity:
-                        this.editTransferStateForm.timeGranularity,
-                    })
-                      .then((res) => {
-                        this.$message({
-                          message: "操作成功",
-                          type: "success",
-                        });
-                        this.$refs.forPltRef.reset("fromPlt");
-                        this.fetchData();
-                        this.editstateCancel();
+                    {
+                      headers: {
+                        token,
+                      },
+                    }
+                  )
+                  .then((pltRes) => {
+                    if (pltRes.data.code === 200) {
+                      dataTransfer({
+                        dataTransferAddr:
+                          this.editTransferStateForm.dataTransferTypePath,
+                        dataTransferType:
+                          this.editTransferStateForm.transferType,
+                        batchCode: this.editTransferStateForm.batchCode,
+                        timeGranularity:
+                          this.editTransferStateForm.timeGranularity,
                       })
-                      .catch((error) => {
-                        this.loadingViewEdit = false;
+                        .then((res) => {
+                          this.$message({
+                            message: "操作成功",
+                            type: "success",
+                          });
+                          if (this.$refs.forPltRef) {
+                            this.$refs.forPltRef.reset("fromPlt");
+                          }
+
+                          this.fetchData();
+                          this.editstateCancel();
+                        })
+                        .catch((error) => {
+                          this.loadingViewEdit = false;
+                        });
+                    } else {
+                      this.loadingViewEdit = false;
+                      this.$message({
+                        message: pltRes.message,
+                        type: "error",
                       });
-                  } else {
-                    this.$message({
-                      message: pltRes.message,
-                      type: "error",
-                    });
-                  }
-                })
-                .catch((error) => {
-                  this.loadingViewEdit = false;
-                });
+                    }
+                  })
+                  .catch((error) => {
+                    this.loadingViewEdit = false;
+                  });
+              } catch (err) {
+                this.loadingViewEdit = true;
+              }
             })
             .catch((_) => {
               this.loadingViewEdit = false;
@@ -817,11 +840,13 @@ export default {
       this.editTransferStateLoading = true;
       // if (title === "重新转换") {
       this.$nextTick(() => {
-        this.$refs.forPltRef.reset("fromPlt");
-        this.$refs.forPltRef.reSetByWindCodeAndTypeForPlt({
-          type: this.forPltFrom.transferType,
-          windCode: this.forPltFrom.fieldCode,
-        });
+        if (this.$refs.forPltRef) {
+          this.$refs.forPltRef.reset("fromPlt");
+          this.$refs.forPltRef.reSetByWindCodeAndTypeForPlt({
+            type: this.forPltFrom.transferType,
+            windCode: this.forPltFrom.fieldCode,
+          });
+        }
       });
       // } else {
       //   this.$nextTick(() => {

+ 1 - 17
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2024-12-27 14:23:21
+ * @LastEditTime: 2024-12-30 14:18:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -713,9 +713,6 @@ export default {
             response.data.length > 0 &&
             response.data[0].commentDescriptionVos) ||
           [];
-        // if (this.formInfo.analysisTypeCode === "yaw_error") {
-        //   this.getCsvData(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);
@@ -971,19 +968,6 @@ export default {
         console.error(error);
       }
     },
-    // getSpan(index, type) {
-    //   let isLastElement = false;
-    //   if (type === "generalFiles") {
-    //     isLastElement = index === this.generalFiles.length - 1;
-    //   } else if (type === "diagramRelations") {
-    //     isLastElement = index === this.diagramRelations.length - 1;
-    //   }
-    //   const isOddPosition = (index + 1) % 2 !== 0;
-    //   if (isLastElement && isOddPosition) {
-    //     return 24;
-    //   }
-    //   return 12;
-    // },
     getFileType(url) {
       // 使用 URL 对象解析 URL
       // 获取路径名部分

+ 1 - 40
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2024-12-27 14:13:38
+ * @LastEditTime: 2024-12-31 14:29:58
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -67,7 +67,6 @@
     ></el-empty>
     <el-card v-if="!noData" shadow="always" class="box-card">
       <el-row class="assetssConent">
-        <!-- {{ generalFilesData }} -->
         <el-col
           :span="24"
           v-if="form.configAnalysis === 'yaw_error' && this.csvData.length > 0"
@@ -629,7 +628,6 @@ export default {
   created() {
     //获取分析 分析类型、机组编号 列表
     // this.getWindCodeList();
-    console.log(this.form.configAnalysis, "1111this.form.configAnalysis");
   },
   methods: {
     iframeLoad() {
@@ -723,7 +721,6 @@ export default {
             response.data.length > 0 &&
             response.data[0].generalFiles) ||
           [];
-
         this.diagramRelations = [];
         this.diagramRelations =
           (response.data &&
@@ -744,7 +741,6 @@ export default {
               ? this.editableTabs[0].commentTypeCode
               : "";
         }
-        console.log(this.form.configAnalysis, "this.form.configAnalysis");
         const fileUrl = response.data[0].generalFiles[0].fileAddr;
         if (this.form.configAnalysis === "yaw_error") {
           this.fetchCsvData("yaw_error", fileUrl);
@@ -937,11 +933,6 @@ export default {
                   this.productionIndicatorCsvData = result.data.filter(
                     (row) => Object.keys(row).length
                   ); // 过滤空行
-                  console.log(
-                    this.productionIndicatorCsvHeader,
-                    result.data,
-                    "result.data"
-                  );
                 }
               },
               error: (error) => {
@@ -955,34 +946,6 @@ export default {
           console.error("无法获取 CSV 文件:", error);
         });
     },
-
-    // getCsvData(url) {
-    //   // 使用 axios 获取 CSV 文件
-    //   axios
-    //     .get(url, { responseType: "blob" }) // 确保数据以 blob 格式返回
-    //     .then((response) => {
-    //       const reader = new FileReader();
-    //       reader.onload = (e) => {
-    //         const csvText = e.target.result;
-    //         Papa.parse(csvText, {
-    //           header: true, // 使用 CSV 第一行作为键
-    //           complete: (result) => {
-    //             this.csvHeaders = Object.keys(result.data[0]);
-    //             this.csvData = result.data.filter(
-    //               (row) => Object.keys(row).length
-    //             ); // 过滤空行
-    //           },
-    //           error: (error) => {
-    //             console.error("CSV 解析错误:", error);
-    //           },
-    //         });
-    //       };
-    //       reader.readAsText(response.data); // 读取 blob 数据
-    //     })
-    //     .catch((error) => {
-    //       console.error("无法获取 CSV 文件:", error);
-    //     });
-    // },
     downLoadCsv(tableDatas) {
       const headers = ["风机名称", "风机机型", "风速", "合同功率", "实际功率"]; // CSV 文件的标题
       const data = tableDatas.map((item) => {
@@ -1034,7 +997,6 @@ export default {
     //修改赋值
     async getWindCodeList() {
       this.loading = true;
-      console.log(this.form.configAnalysis, "this.form.configAnalysis");
       try {
         const resAnalysisedType = await queryAnalysisedType({
           batchCode: this.$route.query.batchCode,
@@ -1165,7 +1127,6 @@ export default {
 <style scoped lang="scss">
 .box-card {
   margin: 10px 0;
-  // box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
   width: 100%;
   font-size: 14px;
   .el-card__body {

+ 0 - 1
src/views/performance/components/custonAsCom/AssociatedFields.vue

@@ -301,7 +301,6 @@ export default {
           filterNodeData = this.filterDataRecursively(filterNodeData, 1);
           this.saveDatas(filterNodeData);
         } else {
-          console.log("error submit!!");
           return false;
         }
       });

+ 2 - 2
src/views/performance/components/custonAsCom/dataTable.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-10-28 16:46:38
- * @LastEditTime: 2024-12-26 09:13:11
+ * @LastEditTime: 2024-12-31 14:30:17
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dataTable.vue
@@ -124,7 +124,7 @@ export default {
     removeTab(targetName) {
       // 1. 在 tabData 中删除对应的 tab
       const index = this.tabData.findIndex((tab) => tab.fileId === targetName);
-      console.log(this.tabData, targetName, "targetName");
+
       if (index !== -1) {
         this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
           confirmButtonText: "确定",

+ 29 - 29
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pareto.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-27 09:59:10
- * @LastEditTime: 2024-12-26 15:54:13
+ * @LastEditTime: 2024-12-31 11:08:57
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pareto.js
@@ -41,34 +41,34 @@ function generateSeriesData(dataSource, xData, yData, labelKey) {
       progressive: true, // 启用渐进式渲染
       showBackground: true,
       smooth: labelKey === "line" ? true : undefined,
-      lineStyle:
-        labelKey === "line"
-          ? {
-              color: "#d14a61",
-            }
-          : undefined,
-      itemStyle:
-        labelKey === "bar"
-          ? {
-              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                { offset: 0, color: "#83bff6" },
-                { offset: 0.5, color: "#188df0" },
-                { offset: 1, color: "#188df0" },
-              ]),
-            }
-          : undefined,
-      emphasis: {
-        itemStyle:
-          labelKey === "bar"
-            ? {
-                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  { offset: 0, color: "#2378f7" },
-                  { offset: 0.7, color: "#2378f7" },
-                  { offset: 1, color: "#83bff6" },
-                ]),
-              }
-            : undefined,
-      },
+      // lineStyle:
+      //   labelKey === "line"
+      //     ? {
+      //         color: "#d14a61",
+      //       }
+      //     : undefined,
+      // itemStyle:
+      //   labelKey === "bar"
+      //     ? {
+      //         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+      //           { offset: 0, color: "#83bff6" },
+      //           { offset: 0.5, color: "#188df0" },
+      //           { offset: 1, color: "#188df0" },
+      //         ]),
+      //       }
+      //     : undefined,
+      // emphasis: {
+      //   itemStyle:
+      //     labelKey === "bar"
+      //       ? {
+      //           color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+      //             { offset: 0, color: "#2378f7" },
+      //             { offset: 0.7, color: "#2378f7" },
+      //             { offset: 1, color: "#83bff6" },
+      //           ]),
+      //         }
+      //       : undefined,
+      // },
       data: item.data
         ?.map((val, valInd) => {
           if (val === null) {

+ 1 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pie.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-26 16:33:45
- * @LastEditTime: 2024-12-27 15:12:21
+ * @LastEditTime: 2025-01-02 16:22:21
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pie.js

+ 1 - 3
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/sankeyDiagram.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-27 17:15:51
- * @LastEditTime: 2024-12-27 15:12:49
+ * @LastEditTime: 2024-12-31 14:25:18
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/sankeyDiagram.js
@@ -62,7 +62,6 @@ export function handleSankeyDiagramPlotChartLogic(
     item.Xdata = formLabelAlign.Xdata;
     item.Ydata = formLabelAlign.Ydata;
   }
-  console.log(item.Xdata, item.Ydata, "item.Xdata,item.Ydata");
   // 设置 X 轴
   const xData = formLabelAlign.Xdata.flatMap((item) =>
     item.data.map((val) => val[item.label] + "")
@@ -101,7 +100,6 @@ export function handleSankeyDiagramPlotChartLogic(
         });
       }
     }
-    console.log(sankeyDiagramData, "sankeyDiagramData");
     item.option.series = [
       {
         type: "sankey",

+ 0 - 5
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartTitle.vue

@@ -820,7 +820,6 @@ export default {
       const { type } = this.curEdit;
       const { BarYdata, LineYdata, ScatterYdata, Ydata } = this.formLabelAlign;
       if (type === "pareto") {
-        console.log([...BarYdata, ...LineYdata], "[...BarYdata, ...LineYdata]");
         return [...LineYdata, ...BarYdata];
       } else if (type === "Cp") {
         return [...LineYdata, ...ScatterYdata];
@@ -882,7 +881,6 @@ export default {
     handleLatitude(type) {
       switch (type) {
         case "init":
-          console.log(this.curEdit.type, this.formLabelAlign.Xdata.length);
           if (
             (this.curEdit.type === "sankeyDiagram" ||
               this.curEdit.type === "Heatmap") &&
@@ -898,7 +896,6 @@ export default {
       }
     },
     handleMetrics(type) {
-      console.log(type, "tianjia yige");
       switch (type) {
         case "init":
           if (
@@ -1037,7 +1034,6 @@ export default {
               }));
             }
           });
-          console.log(selected, "dataBaseCheckList updateAxisData");
           Vue.set(axisData, index, {
             ...item,
             label: selected.label || "",
@@ -1094,7 +1090,6 @@ export default {
       if (this.$refs.form) {
         this.$refs.form.resetFields();
       }
-      console.log(this.formFilterAlign, "this.formFilterAlign 默认");
       // 图表内容回显图表配置赋值
       if (this.curEdit && this.curEdit.option) {
         // 使用 this.$set 替代直接赋值

+ 3 - 4
src/views/performance/components/custonAsCom/dragChart/components/chartsContent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-11-01 10:14:11
- * @LastEditTime: 2024-12-24 14:35:12
+ * @LastEditTime: 2024-12-31 14:54:06
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartsContent.vue
@@ -94,7 +94,6 @@ export default {
       screenWidth: 0,
     };
   },
-  created() {},
   watch: {
     addChartType(type) {
       if (type !== "") {
@@ -128,8 +127,8 @@ export default {
       "updateChart",
       "deleteChart",
       "setCurEdit",
-      "recordOriginChartList",
-      "restoreOriginChartList",
+      // "recordOriginChartList",
+      // "restoreOriginChartList",
     ]),
     // ruler-tool 组件标尺滚动事件
     handleScroll({ scrollLeft, scrollTop }) {

+ 0 - 2
src/views/performance/components/custonAsCom/dragChart/components/chartsData.vue

@@ -46,7 +46,6 @@ export default {
     },
     triggerGetData: function (newVal) {
       if (newVal) {
-        console.log(newVal, "newVal chartData");
         this.getAllData();
         // 重置 triggerGetData 状态为 false
         this.setTriggerGetData(false);
@@ -60,7 +59,6 @@ export default {
     ...mapMutations("dragChart", ["updateDataBase", "setTriggerGetData"]),
     async getIndexDbData() {
       const jsonData = await getDataFromIndexedDB();
-      console.log(jsonData, "jsonData  chartData");
       this.data = jsonData.map((item) => {
         return {
           label: item.filename,

+ 5 - 3
src/views/performance/components/custonAsCom/luckySheet.vue

@@ -183,9 +183,11 @@ export default {
       await initDatabase()
         .then((database) => {
           allFileData.forEach((fileData) => {
-            storeSetData(database, "files", "fileDataArray", fileData, () => {
-              console.log("数据存储成功:", fileData.filename);
-            });
+            if (fileData && fileData.fileData.length > 0) {
+              storeSetData(database, "files", "fileDataArray", fileData, () => {
+                console.log("数据存储成功:", fileData.filename);
+              });
+            }
           });
           // 跳转到分析页面
           this.$router.push("/home/performance/customAnalysis");

+ 5 - 6
src/views/performance/customAnalysis.vue

@@ -206,7 +206,6 @@
     ></DatabaseTable>
   </div>
 </template>
-
 <script>
 import DataTable from "./components/custonAsCom/dataTable.vue";
 import DatabaseTable from "./components/custonAsCom/DatabaseTable.vue";
@@ -283,7 +282,7 @@ export default {
   watch: {
     updateTriggerGetData: function (newVal) {
       if (newVal) {
-        console.log(newVal, "newVal dataTable");
+        // console.log(newVal, "newVal dataTable");
         this.setUpdateTriggerGetData(false);
         this.$refs.dataTableRef.getIndexDbData();
         // 重置 triggerGetData 状态为 false
@@ -300,7 +299,7 @@ export default {
         const request = indexedDB.open("FileDataDB", 2); // 使用较高版本
         request.onupgradeneeded = (event) => {
           const db = event.target.result;
-          console.log("升级数据库,创建对象存储。");
+          // console.log("升级数据库,创建对象存储。");
 
           // 检查是否存在对象存储
           if (!db.objectStoreNames.contains("files")) {
@@ -309,7 +308,7 @@ export default {
         };
         request.onsuccess = async (event) => {
           this.db = event.target.result;
-          console.log("数据库已成功初始化。");
+          // console.log("数据库已成功初始化。");
           resolve();
         };
         request.onerror = (event) => {
@@ -331,7 +330,7 @@ export default {
           })),
         };
       });
-      console.log(this.options, "调用数据");
+      // console.log(this.options, "调用数据");
     },
     async submitComputedFn(formName) {
       this.loading = true;
@@ -533,7 +532,7 @@ export default {
       const formData = new FormData();
       formData.append("file", file);
       // 使用 axios 自定义上传逻辑
-      console.log("自定义上传", file.name);
+      // console.log("自定义上传", file.name);
     },
     // 验证并处理文件变化
     validateAndHandleChange(fileList) {

+ 4 - 3
vue.config.js

@@ -75,8 +75,8 @@ module.exports = {
       },
       // 未知量  //振动、激光测距仪
       "/WZLapi": {
-        // target: "http://192.168.50.241:9001", // WZLapi 目标地址
-        target: "http://106.120.102.238:18080/WindTransDev", // WZLapi 外网目标地址
+        target: "http://192.168.50.241:9001", // WZLapi 目标地址
+        // target: "http://106.120.102.238:18080/WindTransDev", // WZLapi 外网目标地址
         changeOrigin: true,
         pathRewrite: {
           "^/WZLapi": "", // 去掉 /WZLapi 前缀
@@ -96,7 +96,8 @@ module.exports = {
       },
       // 数据转换亮亮
       "/transDataWeb": {
-        target: "http://192.168.50.241:9000/trans_data_web",
+        // target: "http://192.168.50.241:9000/trans_data_web",//生产
+        target: "http://192.168.50.235/transDataWeb", //测试
         changeOrigin: true,
         pathRewrite: {
           "^/transDataWeb": "", // 去掉 /transDataWeb 前缀