Browse Source

修复首页默认时间范围BUG

zhangchuang 2 months ago
parent
commit
b65423fc59
2 changed files with 13 additions and 10 deletions
  1. 0 1
      src/views/FileManagement/database.vue
  2. 13 9
      src/views/HealthStatusAnalysis/mock.vue

+ 0 - 1
src/views/FileManagement/database.vue

@@ -159,7 +159,6 @@ import {
 import { ElMessage, ElMessageBox } from "element-plus";
 import cTree from "@/components/Tree/index.vue";
 import ModalComponent from "@/components/ModalComponent/index.vue";
-import ts from "typescript";
 
 const { proxy } = getCurrentInstance()!;
 

+ 13 - 9
src/views/HealthStatusAnalysis/mock.vue

@@ -626,23 +626,27 @@ const getQueryDataRangeSpeed = async () => {
     count: Number(valueObj.batch_size),
     time: Number(valueObj.interval),
   };
+  mockTotalText.value = {
+    start_time: valueObj.start_time,
+    end_time: valueObj.end_time
+  };
   // handleConditionHistoryRecords(valueObj.start_time, valueObj.end_time);
   mockStart(true);
 };
 onMounted(async () => {
   nextTick(() => {
     pageInit()
-    getMockTotal()
+    // getMockTotal()
   })
 });
-const getMockTotal = () => {
-  mockTotal({}).then((res) => {
-    mockTotalText.value = {
-      start_time: res.data.start_time,
-      end_time: res.data.end_time
-    };
-  });
-};
+// const getMockTotal = () => {
+//   mockTotal({}).then((res) => {
+//     mockTotalText.value = {
+//       start_time: res.data.start_time,
+//       end_time: res.data.end_time
+//     };
+//   });
+// };
 const pageInit = async () => {
   getcateData();
   getQueryDataRangeSpeed();