Преглед изворни кода

fix: online duration report api

Casper Dai пре 2 година
родитељ
комит
f36170cd48

+ 3 - 3
src/api/statistics.js

@@ -65,8 +65,8 @@ export function getOnlineDurationByDevice (id) {
 
 export function getOnlineDurationReport (query) {
   return request({
-    url: '/deviceOnlineInfoDetail/listOnlineSummaryByProperties',
-    method: 'POST',
-    data: query
+    url: '/deviceOnlineSummary/queryByDeviceId',
+    method: 'GET',
+    params: query
   })
 }

+ 3 - 4
src/views/device/detail/components/DeviceRuntime/OnlineDuration.vue

@@ -242,9 +242,8 @@ export default {
       this.reportData = []
       getOnlineDurationReport({
         deviceId: this.device.id,
-        type: 1,
-        sumDateFrom: this.date[0],
-        sumDateTo: this.date[1]
+        from: this.date[0],
+        to: this.date[1]
       }).then(({ data }) => {
         this.reportData = data
         this.initChart()
@@ -258,7 +257,7 @@ export default {
         grid: {
           top: '16px',
           left: '16px',
-          right: '24px',
+          right: '32px',
           bottom: '8px',
           containLabel: true
         },