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

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

parent 2ce50c26
......@@ -30,7 +30,7 @@ const RealTimeInfo = (props) => {
<div>采集编码:{guid}</div>
<div>更新时间:{updateTime}</div>
</div>
<BasicTable {...props} />
<BasicTable {...props} locale={{empty:''}} />
</div>
);
};
......
......@@ -321,7 +321,7 @@ const RealTimeInfo = (props) => {
<BasicTable
bordered
columns={columns}
locale={{ emptyText: <Empty /> }}
locale={{ empty: false }}
pagination={false}
dataSource={tableData}
{...props}
......
......@@ -15,7 +15,60 @@ const StatisticalHistoryView = (props) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-statistical-history-view');
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 [historyRender, setHistoryRender] = useState(true);
const [historyParams, setHistoryParams] = useState({});
......@@ -453,18 +506,14 @@ const StatisticalHistoryView = (props) => {
{
<>
<div className={classNames(`${prefixCls}-chart`)}>
{options ? (
{
<BasicChart
ref={chartRef}
option={options}
option={(!options||!options?.series) ? defaultOptionRef.current : options}
notMerge
style={{ width: '100%', height: '100%' }}
/>
) : (
<div className={classNames(`${prefixCls}-empty`)}>
<Empty />
</div>
)}
}
</div>
<div className={classNames(`${prefixCls}-table`)}>
<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