样式修改
parent
8b9c5ffbba
commit
e4eeefc275
@ -0,0 +1,58 @@
|
||||
<svg width="76" height="76" viewBox="0 0 76 76" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_2942_31317)">
|
||||
<g filter="url(#filter0_dif_2942_31317)">
|
||||
<path d="M35.4467 10.0789H35.3354C18.458 10.0789 4.76465 23.7722 4.76465 40.6496C4.76465 57.5269 18.458 71.2203 35.3354 71.2203C52.1756 71.2203 65.8689 57.6011 65.9061 40.7609H35.4467V10.0789Z" fill="url(#paint0_linear_2942_31317)"/>
|
||||
</g>
|
||||
<foreignObject x="29.3865" y="-6.53511" width="53.2821" height="55.7966"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(5.65px);clip-path:url(#bgblur_1_2942_31317_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter1_di_2942_31317)" data-figma-bg-blur-radius="11.3">
|
||||
<path d="M40.7979 4.76489H40.6865V35.2614H71.3686C71.3314 18.384 57.6381 4.76489 40.7979 4.76489Z" fill="white" fill-opacity="0.6" shape-rendering="crispEdges"/>
|
||||
<path d="M40.9365 5.01587C57.4921 5.09001 70.9435 18.4342 71.1143 35.011H40.9365V5.01587Z" stroke="url(#paint1_linear_2942_31317)" stroke-width="0.5" shape-rendering="crispEdges"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_dif_2942_31317" x="-5.23535" y="4.07886" width="81.1416" height="81.1414" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dy="4"/>
|
||||
<feGaussianBlur stdDeviation="5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.545673 0 0 0 0 1 0 0 0 0 0.85613 0 0 0 0.4 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2942_31317"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2942_31317" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3" dy="2"/>
|
||||
<feGaussianBlur stdDeviation="1.1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect2_innerShadow_2942_31317"/>
|
||||
<feGaussianBlur stdDeviation="1" result="effect3_foregroundBlur_2942_31317"/>
|
||||
</filter>
|
||||
<filter id="filter1_di_2942_31317" x="29.3865" y="-6.53511" width="53.2821" height="55.7966" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dy="4"/>
|
||||
<feGaussianBlur stdDeviation="5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.545673 0 0 0 0 1 0 0 0 0 0.795553 0 0 0 0.4 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2942_31317"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2942_31317" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3" dy="2"/>
|
||||
<feGaussianBlur stdDeviation="1.1"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"/>
|
||||
<feBlend mode="normal" in2="shape" result="effect2_innerShadow_2942_31317"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_1_2942_31317_clip_path" transform="translate(-29.3865 6.53511)"><path d="M40.7979 4.76489H40.6865V35.2614H71.3686C71.3314 18.384 57.6381 4.76489 40.7979 4.76489Z"/>
|
||||
</clipPath><linearGradient id="paint0_linear_2942_31317" x1="-25.9151" y1="70.1833" x2="69.7658" y2="45.9344" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#15A669"/>
|
||||
<stop offset="1" stop-color="#7FE2B4"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_2942_31317" x1="62.7821" y1="-5.87747" x2="35.7299" y2="30.9278" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="white" stop-opacity="0.1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clip0_2942_31317">
|
||||
<rect width="76" height="76" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
@ -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 ;
|
||||
background-color: #045F5E80;
|
||||
}
|
||||
.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 ;
|
||||
background-color: #B7E5D533;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
@ -0,0 +1,174 @@
|
||||
import {Button, Col, Pagination, Progress, Row, Table, Tabs, Tag} from "antd";
|
||||
import Title from '../homepage/compontent/title'
|
||||
import styles from './Maintenance.less'
|
||||
import svg1 from '../../assets/img/asset-main1.svg'
|
||||
import {DownloadOutlined, PlusOutlined, UploadOutlined} from "@ant-design/icons";
|
||||
import TabPane from "antd/es/tabs/TabPane";
|
||||
import TableWithPagination from "@/components/assetmangement/table";
|
||||
const Maintenance = ()=>{
|
||||
const progressStyle = [
|
||||
{title:'即将到期',num:'12',percent:24,color:'#6E5612',strokeColor:'#FFE666'},
|
||||
{title:'已逾期',num:'5',percent:10,color:'#6E1212',strokeColor:'#FF8966'},
|
||||
{title:'正常',num:'33',percent:66,color:'#12386E',strokeColor:'#66C9FF'},
|
||||
]
|
||||
// 维保计划数据
|
||||
const maintenancePlanData = [
|
||||
{key: '1', assetName: '核心服务器A', assetType: '硬件-服务器', maintenanceType: '年度硬件维保', nextMaintenanceDate: '2025-10-28', lastMaintenanceDate: '2024-10-28', status: '即将到期', notificationMethod: '短信+平台通知', importance: '核心'},
|
||||
{key: '2', assetName: '工业传感器B', assetType: '硬件-传感器', maintenanceType: '故障维保', nextMaintenanceDate: '--', lastMaintenanceDate: '2025-10-20', status: '已逾期', notificationMethod: '邮件+平台通知', importance: '重要'},
|
||||
{key: '3', assetName: '网关C', assetType: '硬件-网关', maintenanceType: '季度软件维保', nextMaintenanceDate: '2025-11-15', lastMaintenanceDate: '2025-08-15', status: '正常', notificationMethod: '平台通知', importance: '普通'},
|
||||
{key: '4', assetName: '数据库集群D', assetType: '硬件-服务器', maintenanceType: '月度巡检维保', nextMaintenanceDate: '2025-10-30', lastMaintenanceDate: '2025-09-30', status: '即将到期', notificationMethod: '短信+邮件', importance: '核心'},
|
||||
{key: '5', assetName: '边缘计算节点E', assetType: '硬件-网关', maintenanceType: '固件升级维保', nextMaintenanceDate: '2025-12-01', lastMaintenanceDate: '2025-09-01', status: '正常', notificationMethod: '平台通知', importance: '重要'},
|
||||
{key: '6', assetName: '温湿度传感器F', assetType: '硬件-传感器', maintenanceType: '年度校准维保', nextMaintenanceDate: '2025-11-05', lastMaintenanceDate: '2024-11-05', status: '正常', notificationMethod: '邮件通知', importance: '普通'},
|
||||
];
|
||||
// 状态标签颜色
|
||||
const getStatusColor = (status) => {
|
||||
switch(status) {
|
||||
case '正常': return '#52c41a';
|
||||
case '即将到期': return '#faad14';
|
||||
case '已逾期': return '#ff4d4f';
|
||||
default: return '#1890ff';
|
||||
}
|
||||
};
|
||||
// 维保计划列表列定义
|
||||
const planColumns = [
|
||||
{title: '序号', dataIndex: 'key', key: 'key', width: 60},
|
||||
{title: '资产名称', dataIndex: 'assetName', key: 'assetName'},
|
||||
{title: '资产类型', dataIndex: 'assetType', key: 'assetType'},
|
||||
{title: '维保类型', dataIndex: 'maintenanceType', key: 'maintenanceType'},
|
||||
{title: '下次维保时间', dataIndex: 'nextMaintenanceDate', key: 'nextMaintenanceDate'},
|
||||
{title: '上次维保时间', dataIndex: 'lastMaintenanceDate', key: 'lastMaintenanceDate'},
|
||||
{title: '维保状态', dataIndex: 'status', key: 'status',
|
||||
render: (status) => <span style={{color: getStatusColor(status)}}>{status}</span>
|
||||
},
|
||||
{title: '提醒方式', dataIndex: 'notificationMethod', key: 'notificationMethod'},
|
||||
{title: '资产重要程度', dataIndex: 'importance', key: 'importance',
|
||||
render: (importance) => <span>{importance}</span>
|
||||
},
|
||||
{title: '操作', key: 'action',align:'center',
|
||||
render: () => (
|
||||
<span>
|
||||
<a style={{color:'#2C9E9D',marginRight:'10px'}} href="#">编辑</a>
|
||||
<a style={{color:'#2C9E9D',marginRight:'10px'}} href="#">执行</a>
|
||||
<a style={{color:'#006665'}} href="#">记录</a>
|
||||
</span>
|
||||
)
|
||||
},
|
||||
];
|
||||
const items = [
|
||||
{key: '1', label: <Title title={'维保计划列表'}/>,children:<TableWithPagination columns={planColumns} dataSource={maintenancePlanData} rowSelection={false}/>},
|
||||
{key: '2', label: <span style={{fontSize:'20px'}}>维保记录列表</span>,children:<TableWithPagination columns={planColumns} dataSource={maintenancePlanData} rowSelection={false}/>},
|
||||
];
|
||||
const operations = <div style={{marginLeft: 20, display: 'flex'}}>
|
||||
<Button className={styles['reset-button']} type="default" style={{marginRight: 30}}>导入维保计划</Button>
|
||||
<Button className={styles['reset-button']} type="default" style={{marginRight: 30}}>导出维保数据</Button>
|
||||
<Button className={styles['search-button']} type="primary" icon={<PlusOutlined/>}>新增维保计划</Button>
|
||||
</div>;
|
||||
|
||||
|
||||
// 自定义提醒规则数据
|
||||
const reminderRuleData = [
|
||||
{key: '1', ruleId: '1', maintenanceType: '年度硬件维保', importance: '核心', advanceNoticeDays: '7', notificationMethod: '短信+邮件+平台通知', repeatInterval: '24', status: '启用'},
|
||||
{key: '2', ruleId: '2', maintenanceType: '故障维保', importance: '重要', advanceNoticeDays: '0(立即提醒)', notificationMethod: '短信+平台通知', repeatInterval: '12', status: '启用'},
|
||||
{key: '3', ruleId: '3', maintenanceType: '软件版本迭代', importance: '普通', advanceNoticeDays: '3', notificationMethod: '平台通知', repeatInterval: '--(仅一次)', status: '启用'},
|
||||
];
|
||||
// 自定义提醒规则列定义
|
||||
const ruleColumns = [
|
||||
{
|
||||
title: '',
|
||||
dataIndex: 'select',
|
||||
key: 'select',
|
||||
width: 40,
|
||||
render: () => <input type="checkbox" />
|
||||
},
|
||||
{title: '序号', dataIndex: 'ruleId', key: 'ruleId', width: 60},
|
||||
{title: '维保类型', dataIndex: 'maintenanceType', key: 'maintenanceType'},
|
||||
{title: '资产重要程度', dataIndex: 'importance', key: 'importance'},
|
||||
{title: '提前提醒时间(天)', dataIndex: 'advanceNoticeDays', key: 'advanceNoticeDays'},
|
||||
{title: '提醒方式(可多选)', dataIndex: 'notificationMethod', key: 'notificationMethod'},
|
||||
{title: '重复提醒间隔(小时)', dataIndex: 'repeatInterval', key: 'repeatInterval'},
|
||||
{title: '启用状态', dataIndex: 'status', key: 'status',
|
||||
render: (status) => <Tag color="green">{status}</Tag>
|
||||
},
|
||||
{title: '操作', key: 'action', align: 'center',
|
||||
render: () => (
|
||||
<span>
|
||||
<a style={{color:'#2C9E9D',marginRight:'10px'}} href="#">编辑</a>
|
||||
<a style={{color:'#ff4d4f'}} href="#">删除</a>
|
||||
</span>
|
||||
)
|
||||
},
|
||||
];
|
||||
return (
|
||||
<div>
|
||||
<div style={{backgroundColor: '#f0f7f7', height: '100%', overflow: 'hidden'}}>
|
||||
<Row gutter={20} style={{height: '100%'}}>
|
||||
<Col span={4}>
|
||||
<div style={{padding: '20px', backgroundColor: '#fff', height: '100%'}}>
|
||||
<Title title={'维保任务总览'}></Title>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
marginTop: '20px',
|
||||
}}>
|
||||
<div className={styles['item']}>
|
||||
<Row wrap={false}>
|
||||
<Col span={12}>
|
||||
<div className={styles['item-num']}>50</div>
|
||||
<div className={styles['item-title']}>总计划数</div>
|
||||
</Col>
|
||||
<Col span={12} style={{textAlign:'right'}}>
|
||||
<img src={svg1} alt=""/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
{
|
||||
progressStyle.map((item)=>{
|
||||
return (
|
||||
<div className={styles['item']}>
|
||||
<Row wrap={false}>
|
||||
<Col span={12}>
|
||||
<div className={styles['item-num']} style={{color: item.color}}>{item.num}
|
||||
</div>
|
||||
<div className={styles['item-title']}>{item.title}</div>
|
||||
</Col>
|
||||
<Col span={12} style={{textAlign: 'right'}}>
|
||||
<Progress type={'circle'} percent={item.percent} size={[76, 76]}
|
||||
strokeColor={item.strokeColor}/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={20}>
|
||||
<Row style={{backgroundColor: '#fff',padding:'20px'}}>
|
||||
<Tabs tabBarExtraContent={operations} items={items} style={{flex:'1'}}/>
|
||||
</Row>
|
||||
<Row style={{marginTop:'20px',backgroundColor:'#fff',padding:'20px'}}>
|
||||
<Title title={'自定义提醒规则配置'}></Title>
|
||||
<Row style={{width:'100%',marginTop:'20px'}}>
|
||||
<Col span={12}>
|
||||
<Button className={styles['search-button']} type="default" style={{marginRight: 30}}>导入规则模板</Button>
|
||||
<Button className={styles['reset-button']} type="default" style={{marginRight: 30}}>导出规则模板</Button>
|
||||
<Button className={styles['search-button']} type="primary" style={{marginRight: 30}}>启用</Button>
|
||||
<Button className={styles['del-button']} type="primary" >禁用</Button>
|
||||
</Col>
|
||||
<Col span={12} style={{textAlign:'right'}}>
|
||||
<Button className={styles['search-button']} type="default" icon={<PlusOutlined></PlusOutlined>} >新增规则</Button>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{width:'100%',marginTop:'20px',marginBottom:'50px'}}>
|
||||
<TableWithPagination columns={ruleColumns} dataSource={reminderRuleData} rowSelection={true}></TableWithPagination>
|
||||
</Row>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Maintenance;
|
||||
@ -0,0 +1,82 @@
|
||||
.item{
|
||||
padding: 20px;
|
||||
background: #FFFFFF4D;
|
||||
backdrop-filter: blur(15px);
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
margin-top: 20px;
|
||||
|
||||
// 使用伪元素创建边框
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 1px solid transparent;
|
||||
border-image-slice: 1;
|
||||
border-image-source: conic-gradient(from 102.21deg at 52.75% 38.75%, rgba(249, 249, 249, 0.5) -32.95deg, rgba(64, 64, 64, 0.5) 10.52deg, rgba(64, 64, 64, 0.35) 32.12deg, #FFFFFF 60.28deg, rgba(255, 255, 255, 0.5) 107.79deg, rgba(64, 64, 64, 0.35) 187.59deg, #F9F9F9 207.58deg, #FFFFFF 287.31deg, rgba(249, 249, 249, 0.5) 327.05deg, rgba(64, 64, 64, 0.5) 370.52deg);
|
||||
border-radius: 8px;
|
||||
pointer-events: none;
|
||||
}
|
||||
// 合并多个阴影效果,用逗号分隔
|
||||
box-shadow:
|
||||
-2px 4px 10px 0px #9191910D,
|
||||
-7px 17px 18px 0px #9191910A,
|
||||
-15px 37px 24px 0px #91919108,
|
||||
-27px 66px 29px 0px #91919103,
|
||||
-42px 103px 31px 0px #91919100;
|
||||
|
||||
|
||||
}
|
||||
.item-num{
|
||||
font-size: 26px;
|
||||
font-weight: 600;
|
||||
line-height: 32px;
|
||||
letter-spacing: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
.item-title{
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
letter-spacing: 0em;
|
||||
text-align: left;
|
||||
margin-top: 20px;
|
||||
color:#666666;
|
||||
}
|
||||
.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 ;
|
||||
background-color: #045F5E80;
|
||||
}
|
||||
.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 ;
|
||||
background-color: #B7E5D533;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
.item{
|
||||
padding: 20px;
|
||||
border: 1px solid;
|
||||
border-image-slice: 1;
|
||||
border-image-source: conic-gradient(from 102.21deg at 52.75% 38.75%, rgba(249, 249, 249, 0.5) -32.95deg, rgba(64, 64, 64, 0.5) 10.52deg, rgba(64, 64, 64, 0.35) 32.12deg, #FFFFFF 60.28deg, rgba(255, 255, 255, 0.5) 107.79deg, rgba(64, 64, 64, 0.35) 187.59deg, #F9F9F9 207.58deg, #FFFFFF 287.31deg, rgba(249, 249, 249, 0.5) 327.05deg, rgba(64, 64, 64, 0.5) 370.52deg);
|
||||
background: #FFFFFF4D;
|
||||
backdrop-filter: blur(15px);
|
||||
border-radius: 8px;
|
||||
|
||||
// 合并多个阴影效果,用逗号分隔
|
||||
box-shadow:
|
||||
-2px 4px 10px 0px #9191910D,
|
||||
-7px 17px 18px 0px #9191910A,
|
||||
-15px 37px 24px 0px #91919108,
|
||||
-27px 66px 29px 0px #91919103,
|
||||
-42px 103px 31px 0px #91919100;
|
||||
}
|
||||
Loading…
Reference in New Issue