报表分析-报表设置

main
zjlnb666 2 weeks ago
parent 9c0012b3cd
commit 2da3e23700

@ -177,7 +177,20 @@ export default [
component: './alarmcenter_policy/Policy',
},
]
}
},
//分析报表
{
path: '/topnavbar00/business/analyzeReports',
name: 'analyzeReports',
routes: [
// 分析报表设置
{
path: '/topnavbar00/business/analyzeReports/set',
name: 'set',
component: './analyzeReports_set/Set',
},
]
},
],
},
],

@ -3,6 +3,8 @@ import { Button, Checkbox, Divider, Tabs } from 'antd';
import styles from './Policy.less'
import ListOfStrategies from "@/pages/alarmcenter_policy/component/listOfStrategies/ListOfStrategies";
import ScenarioBased from "@/pages/alarmcenter_policy/component/ScenarioBased/ScenarioBased";
import ContactGrouping from "@/pages/alarmcenter_policy/component/contactGroupManagement/ContactGrouping";
import TemplateManagement from "@/pages/alarmcenter_policy/component/templateManagement/TemplateManagement"; // 导入新组件
const items =[
{
@ -18,12 +20,12 @@ const items =[
{
label: `联系人分组管理`,
key: '联系人分组管理',
children: `Content of tab 3`,
children: <ContactGrouping/>,
},
{
label: `模板管理`,
key: '模板管理',
children: `Content of tab 4`,
children: <TemplateManagement/>, // 使用新组件替换占位文本
},
]
const Policy = ()=>{

@ -35,9 +35,7 @@
border-image-source: linear-gradient(96.54deg, #FFFFFF -0.94%, rgba(255, 255, 255, 0) 25.28%, rgba(167, 229, 228, 0) 59.69%, #A7E5E4 79.76%);
border-image-slice: 1;
backdrop-filter: blur(3.4000000953674316px);
box-shadow: 1px 2px 5px 0px #00666540;
}
:global(.ant-tabs-nav-list){
align-items: center;

@ -1,6 +1,6 @@
import React, { useState } from 'react';
import Title from "@/pages/homepage/compontent/title";
import { Col, Input, Row, Select, Steps, Button } from "antd";
import { Col, Input, Row, Select, Steps, Button, Table } from "antd"; // 添加Table组件导入
import styles from './ScenarioBased.less';
const ScenarioBased = () => {
@ -40,14 +40,105 @@ const ScenarioBased = () => {
}
};
// 步骤编号样式
const style={
position: 'absolute',
bottom: 0,
right: 0,
fontFamily: 'PingFang SC',
fontWeight: 'bold',
fontStyle: 'normal',
fontSize: '128px',
lineHeight: '100%',
letterSpacing: '0%',
color: '#2C9E9D33',
padding: '10px',
borderRadius: '4px'
};
// 升级规则表格数据
const [upgradeRules, setUpgradeRules] = useState([
{
key: '1',
stage: '阶段 1',
timeCondition: '告警后 1 小时未处理',
notifyUpgrade: '短信→短信 + 邮件',
contactGroupUpgrade: '运维组→运维组 + 研发组'
},
{
key: '2',
stage: '阶段 1',
timeCondition: '告警后 2 小时未处理',
notifyUpgrade: '短信 + 邮件→电话 + 短信 + 邮件',
contactGroupUpgrade: '运维组 + 研发组→高管组'
}
]);
// 表格列配置
const columns = [
{
title: '升级阶段',
dataIndex: 'stage',
key: 'stage',
render: (text) => <div style={{ backgroundColor: '#E6F7F6', padding: '8px 12px', borderRadius: '4px', textAlign: 'center' }}>{text}</div>
},
{
title: '时间条件',
dataIndex: 'timeCondition',
key: 'timeCondition',
render: (text) => <Input defaultValue={text} style={{ width: '100%' }} />
},
{
title: '通知方式升级',
dataIndex: 'notifyUpgrade',
key: 'notifyUpgrade',
render: (text) => <Input defaultValue={text} style={{ width: '100%' }} />
},
{
title: '联系人组升级',
dataIndex: 'contactGroupUpgrade',
key: 'contactGroupUpgrade',
render: (text) => <Input defaultValue={text} style={{ width: '100%' }} />
}
];
// 添加新的升级规则
const handleAddRule = () => {
const newRule = {
key: `${upgradeRules.length + 1}`,
stage: `阶段 ${upgradeRules.length + 1}`,
timeCondition: '',
notifyUpgrade: '',
contactGroupUpgrade: ''
};
setUpgradeRules([...upgradeRules, newRule]);
};
return (
<div style={{ padding: '20px', height: '100%', display: 'flex', flexDirection: 'column' }}>
<Title title='场景化配置'></Title>
<Row style={{ marginTop: 20 }}>
<Row style={{ marginTop: 20 }} justify={'space-between'}>
<Col span={18}>
{/* 步骤条组件current属性控制当前激活的步骤 */}
<Steps className={styles['steps']} current={currentStep} items={items} />
</Col>
<Col span={6} style={{ textAlignLast:'right' }}>
<Button
type="default"
onClick={() => setCurrentPage(0)}
disabled={currentPage === 0}
style={{ marginRight: 16 }}
>
上一页
</Button>
<Button
type="default"
onClick={() => setCurrentPage(1)}
disabled={currentPage === 1}
>
下一页
</Button>
</Col>
</Row>
{/* 步骤内容区域 */}
@ -58,7 +149,7 @@ const ScenarioBased = () => {
{/* 步骤1选择业务场景完全保持原有内容 */}
<Col span={7} style={{ borderRight: '1px solid #D7D7D7', height: '100%', position: 'relative' }}>
{/* 步骤数01右下角 */}
<div style={{ position: 'absolute', bottom: 0, right: 0, fontSize: '18px', color: '#999', fontWeight: 'bold' ,}}>01</div>
<div style={style}>01</div>
<Title title={'选择业务场景'} style={{ marginBottom: 20 }}></Title>
<span>预设场景</span>
<div style={{ marginTop: 20 }}>
@ -88,7 +179,7 @@ const ScenarioBased = () => {
{/* 步骤2配置联系人分组完全保持原有内容 */}
<Col span={16} offset={1} style={{ height: '100%', position: 'relative' }}>
{/* 步骤数02右下角 */}
<div style={{ position: 'absolute', bottom: 0, right: 0, fontSize: '18px', color: '#999', fontWeight: 'bold' }}>02</div>
<div style={style}>02</div>
<Title title={'配置联系人分组'}></Title>
<Row gutter={20}>
<Col style={{ width: 160 }}>
@ -144,82 +235,82 @@ const ScenarioBased = () => {
{/* 步骤3组合通知方式左侧 */}
<Col span={7} style={{borderRight: '1px solid #D7D7D7', height: '100%', position: 'relative' }}>
{/* 步骤数03右下角 */}
<div style={{ position: 'absolute', bottom: 0, right: 0, fontSize: '18px', color: '#999', fontWeight: 'bold' }}>03</div>
<div style={style}>03</div>
<Title title={'组合通知方式'} style={{ marginBottom: 20 }}></Title>
<div style={{ padding: '20px', borderRadius: '8px', height: 'calc(100% - 60px)' }}>
<Row gutter={[16, 16]}>
<Col span={24}>
<div style={{ fontWeight: 'bold', marginBottom: 10 }}>可选通知方式</div>
<Row gutter={[16, 16]}>
<Col span={12}>
<Select style={{ width: '100%' }} options={[{ label: '短信', value: 'sms' }]}></Select>
</Col>
<Col span={12}>
<Select style={{ width: '100%' }} options={[{ label: '邮件', value: 'email' }]}></Select>
</Col>
<Col span={12}>
<Select style={{ width: '100%' }} options={[{ label: '电话', value: 'phone' }]}></Select>
</Col>
</Row>
</Col>
<Col span={24}>
<div style={{ fontWeight: 'bold', marginBottom: 10 }}>组合规则</div>
<Input.TextArea rows={4} placeholder="请输入通知组合规则" />
</Col>
</Row>
<ul style={{ listStyleType: 'none', padding: 0 }}>
<li style={{ marginBottom: 20 }}>
<strong>组合通知方式</strong>
</li>
<li style={{ marginBottom: 15 }}>
<span style={{ display: 'block', marginBottom: 5 }}>短信</span>
<Input.TextArea
style={{ width: '100%' }}
defaultValue="立即发送,内容模板【紧急告警】{设备名称}出现{故障类型},请立即处理!"
rows={2}
/>
</li>
<li style={{ marginBottom: 15 }}>
<span style={{ display: 'block', marginBottom: 5 }}>邮件</span>
<Input.TextArea
style={{ width: '100%' }}
defaultValue="告警发生后 10 分钟发送,每 30 分钟重复一次,内容模板含故障详情、处理指引"
rows={2}
/>
</li>
<li style={{ marginBottom: 15 }}>
<span style={{ display: 'block', marginBottom: 5 }}>APP 推送</span>
<Input.TextArea
style={{ width: '100%' }}
defaultValue="立即发送,每 15 分钟重复一次,直到告警被确认"
rows={2}
/>
</li>
<li style={{ marginBottom: 15 }}>
<span style={{ display: 'block', marginBottom: 5 }}>电话</span>
<Input.TextArea
style={{ width: '100%' }}
defaultValue="仅在'告警升级'时触发"
rows={2}
/>
</li>
</ul>
</div>
</Col>
{/* 步骤4设置告警升级规则右侧 */}
<Col span={16} offset={1} style={{ height: '100%', position: 'relative' }}>
{/* 步骤数04右下角 */}
<div style={{ position: 'absolute', bottom: 0, right: 0, fontSize: '18px', color: '#999', fontWeight: 'bold' }}>04</div>
<div style={style}>04</div>
<Title title={'设置告警升级规则'} style={{ marginBottom: 20 }}></Title>
<div style={{ padding: '20px', borderRadius: '8px', height: 'calc(100% - 60px)' }}>
<Row gutter={[16, 16]}>
<Col span={8}>
<div style={{ fontWeight: 'bold', marginBottom: 10 }}>升级周期</div>
<Input placeholder="如30分钟" />
</Col>
<Col span={8}>
<div style={{ fontWeight: 'bold', marginBottom: 10 }}>升级层级</div>
<Select style={{ width: '100%' }} options={[{ label: '3层', value: '3' }]}></Select>
</Col>
<Col span={8}>
<div style={{ fontWeight: 'bold', marginBottom: 10 }}>最大重试次数</div>
<Input placeholder="如3次" />
</Col>
</Row>
<Row gutter={[16, 16]} style={{ marginTop: 20 }}>
<Col span={24}>
<div style={{ fontWeight: 'bold', marginBottom: 10 }}>升级规则详情</div>
<Input.TextArea rows={6} placeholder="请输入详细的告警升级规则" />
</Col>
</Row>
<div style={{ padding: '20px', borderRadius: '8px', height: 'calc(100% - 60px)' }}>
<div style={{ marginBottom: 20 }}>
<strong>设置告警升级规则</strong>
</div>
{/* 升级规则表格 */}
<Table
columns={columns}
dataSource={upgradeRules}
pagination={false}
bordered={false}
// 设置表格头部样式:透明背景,无边框
className={styles['tableaa']}
/>
{/* 添加新规则按钮 */}
<div style={{ display: 'flex', justifyContent: 'center' }}>
<Button
type="dashed"
onClick={handleAddRule}
style={{ width: 'auto', height: '40px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '24px', padding: '0 20px' }}
>
+
</Button>
</div>
</div>
</Col>
</Row>
)}
</div>
{/* 翻页按钮 */}
<Row style={{ marginTop: 40, justifyContent: 'flex-end' }}>
<Button
type="default"
onClick={() => setCurrentPage(0)}
disabled={currentPage === 0}
style={{ marginRight: 16 }}
>
上一页
</Button>
<Button
type="primary"
onClick={() => setCurrentPage(1)}
disabled={currentPage === 1}
>
下一页
</Button>
</Row>
</div>
);
};

@ -4,6 +4,7 @@
}
:global(.ant-steps-item-title){
position: relative;
border: 1px solid;
background: linear-gradient(45deg,
#fafafa, #f8f8f8, #f7f7f7, #f6f6f6,
#f6f6f6, #f7f7f7, #f8f8f8, #fafafa);
@ -66,4 +67,26 @@
//);
}
}
/* 添加步骤之间横线连接处右侧的旋转四边形 */
:global(.ant-steps-item:not(:last-child)){
&:after {
/* 创建旋转四边形 */
content: '';
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%) translateX(-30%) rotate(45deg);
width: 20px; /* 四边形的宽高 */
height: 20px;
background-color: #22C5AA; /* 颜色与连接线一致 */
z-index: 1; /* 确保显示在连接线之上 */
}
}
}
.tableaa{
:global(.ant-table-cell){
background-color: transparent !important;
border: none !important;
}
}

@ -0,0 +1,144 @@
import React, { useState } from 'react';
import { Button, Tag, Space } from 'antd';
import { EditOutlined, DeleteOutlined, UserOutlined } from '@ant-design/icons';
import TableWithPagination from '@/components/assetmangement/table';
const ContactGrouping = () => {
// 定义表格列配置
const columns = [
{
title: '',
dataIndex: 'checkbox',
key: 'checkbox',
// 复选框列通过TableWithPagination的rowSelection属性控制
},
{
title: '分组ID',
dataIndex: 'groupId',
key: 'groupId',
},
{
title: '分组名称',
dataIndex: 'groupName',
key: 'groupName',
},
{
title: '成员列表',
dataIndex: 'memberList',
key: 'memberList',
ellipsis: true, // 超出部分显示省略号
},
{
title: '优先级',
dataIndex: 'priority',
align: 'center',
key: 'priority',
render: (priority) => {
// 根据优先级显示不同颜色的标签
let color = 'default';
if (priority === '高') {
color = 'red';
} else if (priority === '中') {
color = 'orange';
} else if (priority === '低') {
color = 'green';
}
return <Tag color={color}>{priority}</Tag>;
},
},
{
title: '操作',
dataIndex: 'action',
key: 'action',
align: 'center',
render: (_, record) => (
<Space size="middle">
<Button
type="link"
icon={<EditOutlined />}
style={{ color: '#2C9E9D' }}
onClick={() => handleEdit(record)}
>
编辑
</Button>
<Button
type="link"
icon={<DeleteOutlined />}
style={{ color: '#FF826D' }}
onClick={() => handleDelete(record)}
>
删除
</Button>
<Button
type="link"
icon={<UserOutlined />}
style={{ color: '#FF8800' }}
onClick={() => handleMemberManagement(record)}
>
成员管理
</Button>
</Space>
),
},
];
// 模拟数据,匹配截图中的示例
const dataSource = [
{
key: '1',
groupId: 'GRP-001',
groupName: '运维组',
memberList: '张三, 李四, 王五',
priority: '高',
},
{
key: '2',
groupId: 'GRP-002',
groupName: '研发组',
memberList: '赵六, 孙七',
priority: '中',
},
{
key: '3',
groupId: 'GRP-003',
groupName: '管理层',
memberList: '周八, 吴九',
priority: '低',
},
];
// 编辑操作处理
const handleEdit = (record) => {
console.log('编辑分组:', record);
// 这里可以添加编辑逻辑,比如打开编辑弹窗
};
// 删除操作处理
const handleDelete = (record) => {
console.log('删除分组:', record);
// 这里可以添加删除逻辑,比如确认弹窗后删除
};
// 成员管理操作处理
const handleMemberManagement = (record) => {
console.log('成员管理:', record);
// 这里可以添加成员管理逻辑,比如打开成员管理弹窗
};
return (
<div style={{ padding: 20 }}>
{/* 表格组件 */}
<TableWithPagination
columns={columns}
dataSource={dataSource}
rowSelection={true} // 显示复选框
paginationProps={{
total: dataSource.length,
defaultPageSize: 10,
}}
/>
</div>
);
};
export default ContactGrouping;

@ -0,0 +1,123 @@
import React, { useState } from 'react';
import { Button, Space } from 'antd';
import { UploadOutlined, ExportOutlined, ShareAltOutlined } from '@ant-design/icons';
import TableWithPagination from '@/components/assetmangement/table';
const TemplateManagement = () => {
// 定义表格列配置
const columns = [
{
title: '',
dataIndex: 'checkbox',
key: 'checkbox',
// 复选框列通过TableWithPagination的rowSelection属性控制
},
{
title: '模板ID',
dataIndex: 'templateId',
key: 'templateId',
},
{
title: '模板名称',
dataIndex: 'templateName',
key: 'templateName',
},
{
title: '适用场景',
dataIndex: 'applicationScene',
key: 'applicationScene',
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: '操作',
dataIndex: 'action',
key: 'action',
align: 'center', // 设置操作列居中显示
render: (_, record) => (
<Space size="middle">
<Button
type="link"
icon={<UploadOutlined />}
style={{ color: '#2C9E9D' }}
onClick={() => handleApply(record)}
>
应用
</Button>
<Button
type="link"
icon={<ExportOutlined />}
style={{ color: '#006665' }}
onClick={() => handleExport(record)}
>
导出
</Button>
<Button
type="link"
icon={<ShareAltOutlined />}
style={{ color: '#FF8800' }}
onClick={() => handleShare(record)}
>
分享
</Button>
</Space>
),
},
];
// 模拟数据,匹配截图中的示例
const dataSource = [
{
key: '1',
templateId: 'TPL-001',
templateName: '设备故障告警模板',
applicationScene: '设备故障场景',
createTime: '2025-10-30',
},
{
key: '2',
templateId: 'TPL-002',
templateName: '系统性能告警模板',
applicationScene: '系统性能场景',
createTime: '2025-10-29',
},
];
// 应用操作处理函数
const handleApply = (record) => {
console.log('应用模板:', record);
// 这里可以添加应用模板的逻辑,比如打开应用确认弹窗
};
// 导出操作处理函数
const handleExport = (record) => {
console.log('导出模板:', record);
// 这里可以添加导出模板的逻辑,比如生成并下载模板文件
};
// 分享操作处理函数
const handleShare = (record) => {
console.log('分享模板:', record);
// 这里可以添加分享模板的逻辑,比如打开分享弹窗
};
return (
<div style={{ padding: 20 }}>
{/* 使用TableWithPagination组件渲染表格 */}
<TableWithPagination
columns={columns}
dataSource={dataSource}
rowSelection={true} // 显示复选框
paginationProps={{
total: dataSource.length,
defaultPageSize: 10,
}}
/>
</div>
);
};
export default TemplateManagement;

@ -0,0 +1,354 @@
import Title from '../homepage/compontent/title'
import {Button, Col, Form, Input, Row, Select, Switch, Tabs, DatePicker, Divider} from "antd";
import {PlusOutlined} from "@ant-design/icons";
import styles from './Set.less'
const Item=()=>{
// 时间粒度选项
const timeGranularityOptions = [
{ label: '按小时', value: 'hour' },
{ label: '按天', value: 'day' },
{ label: '按周', value: 'week' },
{ label: '按月', value: 'month' },
];
// 时间范围选项
const timeRangeOptions = [
{ label: '最近7天', value: 'last7days' },
{ label: '最近30天', value: 'last30days' },
{ label: '最近90天', value: 'last90days' },
{ label: '自定义', value: 'custom' },
];
// 表单提交处理
const onFinish = (values) => {
console.log('表单提交:', values);
};
return (
<div style={{padding: '20px 0'}}>
{/* 添加表单 */}
<Form
layout="vertical"
onFinish={onFinish}
style={{maxWidth: '100%'}}
className={styles.form}
>
<Row gutter={[32, 0]}>
{/* 时间粒度选择 */}
<Col span={6}>
<Form.Item
name="timeGranularity"
label="时间粒度选择:"
rules={[{required: true, message: '请选择时间粒度'}]}
style={{marginBottom: 0}}
layout={'vertical'}
>
<Select
options={timeGranularityOptions}
placeholder="请选择时间粒度"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
{/* 时间范围选择 */}
<Col span={6}>
<Form.Item
name="timeRange"
label="时间范围选择:"
rules={[{required: true, message: '请选择时间范围'}]}
style={{marginBottom: 0}}
layout="vertical"
>
<Select
options={timeRangeOptions}
placeholder="请选择时间范围"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
{/* 时间范围自定义 */}
<Col span={6}>
<Form.Item
layout="vertical"
name="customTimeRange"
label="时间范围自定义:"
style={{marginBottom: 0}}
>
<DatePicker.RangePicker
style={{width: '100%'}}
placeholder={['开始时间', '结束时间']}
/>
</Form.Item>
</Col>
</Row>
</Form>
</div>
)
}
// Excel选项组件
const ExcelOption=()=>{
// 表单提交处理
const onFinish = (values) => {
console.log('Excel选项表单提交:', values);
};
// 样式设置选项
const fontOptions = [
{ label: '宋体', value: 'simSun' },
{ label: '微软雅黑', value: 'microsoftYaHei' },
{ label: '黑体', value: 'heiTi' },
{ label: 'Arial', value: 'arial' },
{ label: 'Times New Roman', value: 'timesNewRoman' },
];
const fontSizeOptions = [
{ label: '10', value: '10' },
{ label: '12', value: '12' },
{ label: '14', value: '14' },
{ label: '16', value: '16' },
{ label: '18', value: '18' },
{ label: '20', value: '20' },
];
const colorOptions = [
{ label: '红色', value: '#FF0000' },
{ label: '蓝色', value: '#0000FF' },
{ label: '绿色', value: '#00FF00' },
{ label: '黄色', value: '#FFFF00' },
{ label: '黑色', value: '#000000' },
{ label: '白色', value: '#FFFFFF' },
];
const borderStyleOptions = [
{ label: '无', value: 'none' },
{ label: '细线', value: 'thin' },
{ label: '粗线', value: 'thick' },
{ label: '虚线', value: 'dashed' },
];
return (
<div style={{padding: '20px 0'}}>
<Form
onFinish={onFinish}
style={{maxWidth: '100%'}}
className={styles.form}
layout="vertical"
>
{/* 样式设置部分 */}
<div style={{marginBottom: 20}}>
<h3 style={{marginBottom: 10}}>样式设置</h3>
<Row gutter={[16, 8]}>
<Col span={6}>
<Form.Item
name="font"
label="字体:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Select
options={fontOptions}
placeholder="请选择字体"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
name="fontSize"
label="字号:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Select
options={fontSizeOptions}
placeholder="请选择字号"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
name="backgroundColor"
label="单元格背景色:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Select
options={colorOptions}
placeholder="请选择背景色"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
name="fontColor"
label="字体色:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Select
options={colorOptions}
placeholder="请选择字体色"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
name="columnWidth"
label="列宽:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Input placeholder="请输入列宽" style={{width: '100%'}} />
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
name="rowHeight"
label="行高:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Input placeholder="请输入行高" style={{width: '100%'}} />
</Form.Item>
</Col>
</Row>
</div>
{/* 布局设置部分 */}
<div style={{marginBottom: 20}}>
<h3 style={{marginBottom: 10}}>布局设置</h3>
<Row gutter={[16, 8]}>
<Col span={6}>
<Form.Item
name="headerStyle"
label="表头样式:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Input placeholder="请输入表头样式" style={{width: '100%'}} />
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
name="borderStyle"
label="边框样式:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Select
options={borderStyleOptions}
placeholder="请选择边框样式"
style={{width: '100%'}}
/>
</Form.Item>
</Col>
</Row>
</div>
{/* 导出选项部分 */}
<div style={{marginBottom: 20}}>
<h3 style={{marginBottom: 10}}>导出选项</h3>
<Row gutter={[16, 8]}>
<Col span={3}>
<Form.Item
name="dataFilter"
valuePropName="checked"
label="数据筛选:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Switch />
</Form.Item>
</Col>
<Col span={3}>
<Form.Item
name="keepFormula"
valuePropName="checked"
label="公式保留:" // 添加了冒号
style={{marginBottom: 0}}
layout="vertical"
>
<Switch />
</Form.Item>
</Col>
</Row>
</div>
{/* 按钮部分 */}
<div style={{marginTop: 30}}>
<Row justify="end">
<Col>
<Button className={styles["reset-button"]} style={{marginRight: 10}}>保存配置</Button>
<Button className={styles["reset-button"]} style={{marginRight: 10}}>预览</Button>
<Button className={styles["search-button"]} htmlType="submit">执行生成</Button>
</Col>
</Row>
</div>
</Form>
</div>
)
}
const Set = () => {
const onChange = key => {
console.log(key);
};
const items = [
{
key: '1',
label: '时间维度',
children: <Item/>,
},
{
key: '2',
label: '范围维度',
children: <Item/>,
},
{
key: '3',
label: '类型维度',
children: <Item/>,
},
];
const items2 = [
{
key: '1',
label: 'Excel格式配置',
children: <ExcelOption/>,
},
{
key: '2',
label: 'Pdf格式配置',
children: <Item/>,
},
];
return (
<div style={{padding: 20}}>
<div>
<Title title="报表维度配置"/>
<Row justify={'space-between'}
style={{padding: '20px 0', borderBottom: '1px solid #eeeeee', marginBottom: 30}}>
<Col>
<Button className={styles["search-button"]} style={{marginRight: 30}}>导入配置</Button>
<Button className={styles["reset-button"]}>导出配置</Button>
</Col>
<Col>
<Button className={styles["reset-button"]} style={{marginRight: 30}}>模板管理</Button>
<Button icon={<PlusOutlined/>} className={styles["search-button"]}>建新报表</Button>
</Col>
</Row>
<Tabs defaultActiveKey="1" items={items} onChange={onChange}/>
<Title title="格式自定义区"/>
<Tabs defaultActiveKey="1" items={items2} onChange={onChange}/>
</div>
</div>
);
};
export default Set;

@ -0,0 +1,34 @@
.search-button{
background-image: url('../../assets/img/assetmangement1.png');
background-repeat: no-repeat;
background-size: cover;
background-position:center;
color: #fff;
border-radius: 4px;
height: 36px;
border-color:#d9d9d9 ;
}
.reset-button{
background-image: url('../../assets/img/assetmangement2.png');
background-repeat: no-repeat;
background-size: cover;
background-position:center;
color: rgba(0, 102, 101, 1);
border-radius: 4px;
height: 36px;
border-color:#d9d9d9 ;
}
.del-button{
background-image: url('../../assets/img/assetmangement3.png');
background-repeat: no-repeat;
background-size: cover;
background-position:center;
color: #000;
border-radius: 4px;
height: 36px;
width:88px;
border-color:#d9d9d9 ;
background-color: #E5B7B733;
}

@ -287,6 +287,28 @@ const SystemContentList = (props) => {
},
]
},
// 分析报表
{
path: '/topnavbar00/business/analyzeReports',
icon: <img
src={icon1}
alt="分析报表"
style={{
width: '16px',
height: '16px',
opacity: selectedKey.includes('/topnavbar00/business/analyzeReports') ? 1 : 0.6
}}
/>,
key: "/topnavbar00/business/analyzeReports",
"label": "分析报表",
children: [
{
path: '/topnavbar00/business/analyzeReports/set',
key: "/topnavbar00/business/analyzeReports/set",
"label": "报表设置"
},
]
},
]
setMenuItems(fixedMenuItems)
// 初始化默认路由

@ -105,6 +105,11 @@ const menuItem = [
label: '通知策略和告警联系人',
key: '/topnavbar00/business/alarmcenter/policy',
},
// 分析报表
{
label: '分析报表',
key: '/topnavbar00/business/analyzeReports/set',
},
]
const TopNavBar = (props) => {

Loading…
Cancel
Save