图表组件接入 显示成功
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
// 导入工单接口
|
||||
import { getWorkOrderApi, getWorkOrderDetailApi, updateWorkOrder, dispatchWorkOrder, completeWorkOrder } from '../api/workOrder';
|
||||
import { UniversalLineChart } from '../components/recharts';
|
||||
|
||||
const { Option } = Select;
|
||||
const { Search } = Input;
|
||||
@@ -705,17 +706,24 @@ const WorkOrderPage = () => {
|
||||
<Row gutter={12}>
|
||||
<Col span={13}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129', marginBottom: 12 }}>关联告警趋势 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>(近 7 天)</Text></div>
|
||||
<Line
|
||||
<UniversalLineChart
|
||||
data={alarmTrendData}
|
||||
xField="date"
|
||||
yField="value"
|
||||
smooth
|
||||
point={{ size: 3, shape: 'circle', style: { fill: '#165DFF', stroke: '#fff', lineWidth: 1 } }}
|
||||
xKey="date"
|
||||
height={130}
|
||||
color="#165DFF"
|
||||
padding={[10, 10, 20, 20]}
|
||||
xAxis={{ label: { style: { fontSize: 9, fill: '#86909C' } } }}
|
||||
yAxis={{ label: { style: { fontSize: 9, fill: '#86909C' } }, grid: { line: { style: { stroke: '#f0f0f0', lineDash: [3, 3] } } } }}
|
||||
backgroundColor="transparent"
|
||||
showLegend={false}
|
||||
showTooltip={true}
|
||||
showGrid={true}
|
||||
smooth
|
||||
dot
|
||||
series={[
|
||||
{
|
||||
key: 'value',
|
||||
name: '告警数量',
|
||||
color: '#165DFF',
|
||||
strokeWidth: 2,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={11}>
|
||||
|
||||
Reference in New Issue
Block a user