Commit 63c0f0be authored by 陈龙's avatar 陈龙

feat: 指标选择、统计曲线去除熊猫头

parent 2ce50c26
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-proposal-private-methods": "^7.18.6",
"@wisdom-components/basictable": "^1.5.14", "@wisdom-components/basictable": "1.5.29",
"@wisdom-components/ec_historyview": "^1.4.3", "@wisdom-components/ec_historyview": "^1.4.3",
"@wisdom-components/empty": "^1.3.9", "@wisdom-components/empty": "^1.3.9",
"@wisdom-components/exportexcel": "^1.1.2", "@wisdom-components/exportexcel": "^1.1.2",
......
...@@ -30,7 +30,7 @@ const RealTimeInfo = (props) => { ...@@ -30,7 +30,7 @@ const RealTimeInfo = (props) => {
<div>采集编码:{guid}</div> <div>采集编码:{guid}</div>
<div>更新时间:{updateTime}</div> <div>更新时间:{updateTime}</div>
</div> </div>
<BasicTable {...props} /> <BasicTable {...props} locale={{empty:''}} />
</div> </div>
); );
}; };
......
...@@ -321,7 +321,7 @@ const RealTimeInfo = (props) => { ...@@ -321,7 +321,7 @@ const RealTimeInfo = (props) => {
<BasicTable <BasicTable
bordered bordered
columns={columns} columns={columns}
locale={{ emptyText: <Empty /> }} locale={{ empty: false }}
pagination={false} pagination={false}
dataSource={tableData} dataSource={tableData}
{...props} {...props}
......
...@@ -15,7 +15,60 @@ const StatisticalHistoryView = (props) => { ...@@ -15,7 +15,60 @@ const StatisticalHistoryView = (props) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-statistical-history-view'); const prefixCls = getPrefixCls('ec-statistical-history-view');
const chartRef = useRef(null); const chartRef = useRef(null);
const defaultOptionRef = useRef({
title: {
show: false,
text: '',
},
tooltip: false,
grid: {
containLabel: true,
left: 20,
right: 20,
// top: 20,
bottom: 10,
},
toolbox: {
show: false,
},
xAxis: [
{
type: 'time',
axisTick: {
alignWithLabel: true,
},
boundaryGap: false,
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
},
},
},
],
yAxis: [
{
type: 'value',
max:100,
min:0,
position: 'left',
alignTicks: true,
axisLine: {
show: true,
},
axisLabel: {
formatter: '{value}',
},
},
],
series:[{
type: 'line',
data:[
[moment(moment().format('YYYY-MM-DD 00:00:00')).valueOf(),null],
[moment(moment().format('YYYY-MM-DD 23:59:59')).valueOf(),null],
]
}]
});
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [historyRender, setHistoryRender] = useState(true); const [historyRender, setHistoryRender] = useState(true);
const [historyParams, setHistoryParams] = useState({}); const [historyParams, setHistoryParams] = useState({});
...@@ -453,18 +506,14 @@ const StatisticalHistoryView = (props) => { ...@@ -453,18 +506,14 @@ const StatisticalHistoryView = (props) => {
{ {
<> <>
<div className={classNames(`${prefixCls}-chart`)}> <div className={classNames(`${prefixCls}-chart`)}>
{options ? ( {
<BasicChart <BasicChart
ref={chartRef} ref={chartRef}
option={options} option={(!options||!options?.series) ? defaultOptionRef.current : options}
notMerge notMerge
style={{ width: '100%', height: '100%' }} style={{ width: '100%', height: '100%' }}
/> />
) : ( }
<div className={classNames(`${prefixCls}-empty`)}>
<Empty />
</div>
)}
</div> </div>
<div className={classNames(`${prefixCls}-table`)}> <div className={classNames(`${prefixCls}-table`)}>
<BasicTable <BasicTable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment