Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
b50bc3db
Commit
b50bc3db
authored
Dec 28, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化历史曲线组件添加缺省页
parent
883a88d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
11 deletions
+27
-11
config.js
config/config.js
+1
-0
proxy.js
config/proxy.js
+1
-1
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+13
-7
index.js
packages/extend-components/EC_HistoryView/src/index.js
+8
-3
index.less
packages/extend-components/EC_HistoryView/src/index.less
+4
-0
No files found.
config/config.js
View file @
b50bc3db
...
...
@@ -124,6 +124,7 @@ export default {
'EC_HistoryInfo'
,
'EC_RealTimeInfo'
,
'EC_ConfigurationView'
,
'EC_HistoryView'
,
],
},
],
...
...
config/proxy.js
View file @
b50bc3db
...
...
@@ -2,7 +2,7 @@ const proxyURL = process.env.PANDA_ENV_PROXY || 'http://192.168.8.28:8911';
export
default
{
'/api'
:
{
target
:
'http://192.168.10.150:8669'
,
target
:
proxyURL
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api'
:
''
},
},
...
...
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
b50bc3db
import
React
from
'react'
;
import
HistoryView
from
'../index'
;
const
deviceParams
=
[{
deviceCode
:
"EGBF00000146"
,
sensors
:
"进水压力,出水瞬时流量,出水累计流量"
,
deviceType
:
"二供泵房"
}]
const
deviceParams
=
[
// {
// deviceCode: "EGBF00000146",
// sensors: "进水压力,出水瞬时流量,出水累计流量",
// deviceType: "二供泵房"
// },
// {
// deviceCode: "EGJZ00001113",
// sensors: "出水瞬时流量,出水压力,泵1状态",
// deviceType: "二供机组"
// }
];
const
Demo
=
()
=>
{
return
(
<
div
style
=
{{
height
:
700
}}
>
<
div
style
=
{{
height
:
700
}}
>
<
HistoryView
deviceParams
=
{
deviceParams
}
/
>
<
/div
>
);
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
b50bc3db
...
...
@@ -6,6 +6,7 @@ import { CloseCircleFilled, DownloadOutlined, PlusCircleOutlined } from '@ant-de
import
moment
from
'moment'
;
import
_
from
'lodash'
;
import
TimeRangePicker
from
'@wisdom-components/timerangepicker'
;
import
PandaEmpty
from
'@wisdom-components/empty'
;
import
BasicTable
from
'@wisdom-components/basictable'
;
import
{
getHistoryInfo
}
from
'./apis'
;
import
SimgleChart
from
'./SingleChart'
;
...
...
@@ -580,7 +581,9 @@ const HistoryView = (props) => {
{
renderCurveOption
()}
<
/div
>
<
div
className
=
{
`
${
prefixCls
}
-content`
}
>
{
grid
===
true
?
(
{
!
chartDataSource
.
length
?
(
<
PandaEmpty
/>
)
:
grid
===
true
?
(
<
GridChart
prefixCls
=
{
prefixCls
}
dataSource
=
{
chartDataSource
}
...
...
@@ -603,7 +606,7 @@ const HistoryView = (props) => {
{
renderCurveOption
()}
<
/div
>
<
div
className
=
{
`
${
prefixCls
}
-content`
}
>
{
{
chartDataSource
.
length
>
0
?
(
<
BasicTable
dataSource
=
{
tableData
}
columns
=
{
columns
}
...
...
@@ -611,7 +614,9 @@ const HistoryView = (props) => {
pagination
=
{{
showQuickJumper
:
true
,
showSizeChanger
:
true
}}
onChange
=
{()
=>
{}}
/
>
}
)
:
(
<
PandaEmpty
/>
)}
<
/div
>
<
/Tabs.TabPane
>
<
/Tabs
>
...
...
packages/extend-components/EC_HistoryView/src/index.less
View file @
b50bc3db
...
...
@@ -104,13 +104,17 @@
}
.@{history-view}-content {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
overflow: hidden;
}
.@{history-view}-grid {
display: flex;
flex-wrap: wrap;
width: 100%;
height: 100%;
padding: 4px;
overflow-y: auto;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment