Sfoglia il codice sorgente

fix: 告警仪表盘bug修复

xieyonghong 3 anni fa
parent
commit
c28cb89891
2 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 4 4
      config/proxy.ts
  2. 3 3
      src/pages/rule-engine/DashBoard/index.tsx

+ 4 - 4
config/proxy.ts

@@ -9,11 +9,11 @@
 export default {
   dev: {
     '/jetlinks': {
-      target: 'http://192.168.32.8:8844/',
-      ws: 'ws://192.168.32.8:8844/',
+      // target: 'http://192.168.32.8:8844/',
+      // ws: 'ws://192.168.32.8:8844/',
       // 开发环境
-      // target: 'http://120.79.18.123:8844/',
-      // ws: 'ws://120.79.18.123:8844/',
+      target: 'http://120.79.18.123:8844/',
+      ws: 'ws://120.79.18.123:8844/',
       // 测试环境
       // target: 'http://120.77.179.54:8844/',
       // ws: 'ws://120.77.179.54:8844/',

+ 3 - 3
src/pages/rule-engine/DashBoard/index.tsx

@@ -53,7 +53,7 @@ const Dashboard = observer(() => {
     group: 'today',
     params: {
       time: '1h',
-      targetType: 'device',
+      // targetType: 'device',
       format: 'HH:mm:ss',
       from: moment(new Date(new Date().setHours(0, 0, 0, 0))).format('YYYY-MM-DD HH:mm:ss'),
       to: 'now',
@@ -69,7 +69,7 @@ const Dashboard = observer(() => {
     group: 'thisMonth',
     params: {
       time: '1d',
-      targetType: 'device',
+      // targetType: 'device',
       format: 'yyyy-MM',
       limit: 1,
       from: 'now-1M',
@@ -204,7 +204,7 @@ const Dashboard = observer(() => {
       dimension: 'agg',
       group: 'alarmTrend',
       params: {
-        targetType: 'device', // product、device、org、other
+        targetType: params.targetType, // product、device、org、other
         format: format,
         time: time,
         // from: 'now-1y', // now-1d、now-1w、now-1M、now-1y