优化代码消除 控制台的报错信息

This commit is contained in:
mmc
2026-08-31 10:30:21 +08:00
parent 674721504d
commit a1922cdeaf
23 changed files with 259 additions and 214 deletions

View File

@@ -915,7 +915,7 @@ const WorkOrderPage = () => {
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
{stats.map((item, index) => (
<Col key={index} xs={24} sm={12} md={8} xl={4}>
<Card bordered={false} bodyStyle={{ padding: '20px 16px' }} style={cardStyle}>
<Card variant="borderless" styles={{ body: { padding: '20px 16px' } }} style={cardStyle}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div>
<div style={{ fontSize: 'clamp(12px, 0.8vw, 13px)', color: '#86909C', marginBottom: 2 }}>{item.title}</div>
@@ -940,7 +940,7 @@ const WorkOrderPage = () => {
</Row>
{/* 筛选栏 */}
<Card bordered={false} bodyStyle={{ padding: '8px 16px 0px 16px' }} style={{ ...cardStyle, marginBottom: 8 }}>
<Card variant="borderless" styles={{ body: { padding: '8px 16px 0px 16px' } }} style={{ ...cardStyle, marginBottom: 8 }}>
<Form form={queryForm} layout="inline" initialValues={{
orderStatus: 1
}}>
@@ -976,7 +976,7 @@ const WorkOrderPage = () => {
{/* 左侧:列表 + 底部图表 */}
<Col xs={24} xl={15}>
<Card
bordered={false}
variant="borderless"
title={
<Space size={8}>
<Text strong style={{ fontSize: 15, color: '#1D2129' }}>{t('workOrder.listFixed2')}</Text>
@@ -1002,7 +1002,7 @@ const WorkOrderPage = () => {
)}
</Space>
}
bodyStyle={{ padding: 0 }}
styles={{ body: { padding: 0 } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
@@ -1037,7 +1037,7 @@ const WorkOrderPage = () => {
<Row gutter={[12, 12]}>
<Col xs={24} md={9}>
<Card bordered={false} title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2OrderStatus')}</Text>} style={{ ...cardStyle, height: 380 }}>
<Card variant="borderless" title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2OrderStatus')}</Text>} style={{ ...cardStyle, height: 380 }}>
<div style={{ height: 300, position: 'relative' }}>
<Pie
data={pieData}
@@ -1059,7 +1059,7 @@ const WorkOrderPage = () => {
</Col>
<Col xs={24} md={15}>
<Card
bordered={false}
variant="borderless"
title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2TaskSuspended2')}</Text>}
extra={
<Button
@@ -1070,7 +1070,7 @@ const WorkOrderPage = () => {
</Button>
}
style={{ ...cardStyle, height: 380 }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
>
{/* 日期切换栏 */}
<div style={{ marginBottom: 16 }}>
@@ -1206,7 +1206,7 @@ const WorkOrderPage = () => {
{/* 右侧:详情 + AI + 告警 */}
<Col xs={24} xl={9}>
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: '20px' }}>
<Card variant="borderless" style={cardStyle} styles={{ body: { padding: '20px' } }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
<Text strong style={{ fontSize: 16, color: '#1D2129' }}>{t('workOrder.detailFixed2')}</Text>
<Text type="secondary" style={{ fontSize: 12 }}>{t('workOrder.fixed2OrderNo')}<span style={{ color: '#4E5969', fontWeight: 600 }}>{currentDetail?.orderNo || '--'}</span></Text>
@@ -1464,8 +1464,8 @@ const WorkOrderPage = () => {
</Card>
<Card bordered={false} title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>{t('workOrder.aiSuggestion')}</Text>}
style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: '16px' }}>
<Card variant="borderless" title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>{t('workOrder.aiSuggestion')}</Text>}
style={{ ...cardStyle, marginTop: 8 }} styles={{ body: { padding: '16px' } }}>
<Row gutter={12} style={{ marginBottom: 16 }}>
<Col span={8}>
<div style={{ background: '#F9F0FF', padding: '16px 8px', borderRadius: 12, textAlign: 'center', height: '100%', border: '1px solid #F3E8FF' }}>