From 21c284bbb5e2b194e72dae18b737527c6557058f Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 30 Jan 2020 11:48:27 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0=E8=AD=A6=E5=91=8A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/monitor/Table.js | 1 - spug_web/src/pages/monitor/store.js | 3 ++- spug_web/src/pages/schedule/Table.js | 1 - spug_web/src/pages/schedule/store.js | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spug_web/src/pages/monitor/Table.js b/spug_web/src/pages/monitor/Table.js index 0b274097..6c578b1e 100644 --- a/spug_web/src/pages/monitor/Table.js +++ b/spug_web/src/pages/monitor/Table.js @@ -12,7 +12,6 @@ import http from 'libs/http'; import store from './store'; import hostStore from '../host/store'; import lds from 'lodash'; -import moment from "moment"; import groupStore from "pages/alarm/group/store"; @observer diff --git a/spug_web/src/pages/monitor/store.js b/spug_web/src/pages/monitor/store.js index cf6901f6..61a7d453 100644 --- a/spug_web/src/pages/monitor/store.js +++ b/spug_web/src/pages/monitor/store.js @@ -22,7 +22,8 @@ class Store { .then(res => { res.map(item => { const value = item['latest_run_time']; - item['latest_run_time'] = value ? moment(value).fromNow() : null + item['latest_run_time'] = value ? moment(value).fromNow() : null; + return null }); this.records = res }) diff --git a/spug_web/src/pages/schedule/Table.js b/spug_web/src/pages/schedule/Table.js index 92a058ec..ae05a83f 100644 --- a/spug_web/src/pages/schedule/Table.js +++ b/spug_web/src/pages/schedule/Table.js @@ -11,7 +11,6 @@ import http from 'libs/http'; import store from './store'; import { LinkButton } from "components"; import Info from './Info'; -import moment from "moment"; @observer class ComTable extends React.Component { diff --git a/spug_web/src/pages/schedule/store.js b/spug_web/src/pages/schedule/store.js index 5f6558dd..10668a1d 100644 --- a/spug_web/src/pages/schedule/store.js +++ b/spug_web/src/pages/schedule/store.js @@ -26,7 +26,8 @@ class Store { .then(({types, tasks}) => { tasks.map(item => { const value = item['latest_run_time']; - item['latest_run_time'] = value ? moment(value).fromNow() : null + item['latest_run_time'] = value ? moment(value).fromNow() : null; + return null }); this.records = tasks; this.types = types