Parcourir la source

Merge branch 'dev_g' of United_Software/k_online_ui into dev

Jack Zhou il y a 1 an
Parent
commit
459ce3d586
2 fichiers modifiés avec 5 ajouts et 18 suppressions
  1. 1 2
      src/auto-imports.d.ts
  2. 4 16
      src/views/Dashboard/src/DashboardView.vue

+ 1 - 2
src/auto-imports.d.ts

@@ -3,7 +3,6 @@
 // @ts-nocheck
 // noinspection JSUnusedGlobalSymbols
 // Generated by unplugin-auto-import
-// biome-ignore lint: disable
 export {}
 declare global {
   const $api: typeof import('@/api/index')['default']
@@ -69,6 +68,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 4 - 16
src/views/Dashboard/src/DashboardView.vue

@@ -140,20 +140,14 @@ const GetETDEcharts = () => {
   const currentDate = new Date()
   let tenyear = currentDate.getFullYear()
   let tenmonth = currentDate.getMonth() - 11
-  let month = currentDate.getMonth() + 1
   if (tenmonth < 0) {
     tenyear -= 1
     tenmonth += 11
   }
   $api
     .GetETDEcharts({
-      e_date:
-        currentDate.getFullYear() +
-        '-' +
-        month +
-        '-' +
-        new Date(currentDate.getFullYear(), month, 0).getDate(),
-      b_date: tenyear + '-' + tenmonth + '-01'
+      e_date: currentDate.getMonth() + 1 + '/' + currentDate.getFullYear(),
+      b_date: tenmonth + '/' + tenyear
     })
     .then((res: any) => {
       if (res.code === 200) {
@@ -282,7 +276,6 @@ const GetContainerCountEcharts = (val: any) => {
   const currentDate = new Date()
   let tenyear = currentDate.getFullYear()
   let tenmonth = currentDate.getMonth() - 11
-  let month = currentDate.getMonth() + 1
   if (tenmonth < 0) {
     tenyear -= 1
     tenmonth += 11
@@ -290,13 +283,8 @@ const GetContainerCountEcharts = (val: any) => {
   containerType.value = []
   $api
     .GetContainerCountEcharts({
-      e_date:
-        currentDate.getFullYear() +
-        '-' +
-        month +
-        '-' +
-        new Date(currentDate.getFullYear(), month, 0).getDate(),
-      b_date: tenyear + '-' + tenmonth + '-01',
+      e_date: currentDate.getMonth() + 1 + '/' + currentDate.getFullYear(),
+      b_date: tenmonth + '/' + tenyear,
       ...val
     })
     .then((res: any) => {