样式和工单列表接口
This commit is contained in:
@@ -61,3 +61,22 @@ export function completeWorkOrder(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//挂起
|
||||||
|
|
||||||
|
|
||||||
|
export function suspendWorkOrder(id) {
|
||||||
|
return request({
|
||||||
|
url: `/iot/ioTworkOrder/suspend/${id}`,
|
||||||
|
method: 'post',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除工单
|
||||||
|
|
||||||
|
export function deleteWorkOrder(ids) {
|
||||||
|
return request({
|
||||||
|
url: `/iot/ioTworkOrder/${ids}`,
|
||||||
|
method: 'post',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ const BasicSettings = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="normal-spacing" style={{ padding: '8px', background: '#f5f7fa', minHeight: '100vh' }}>
|
<div className="normal-spacing" style={{ padding: '8px 0px', background: '#f5f7fa', minHeight: '100vh' }}>
|
||||||
|
|
||||||
|
|
||||||
{/* 顶部统计卡片 */}
|
{/* 顶部统计卡片 */}
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ export default function DeviceAccessPage() {
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-5 bg-[#f5f7fa] min-h-screen">
|
<div className="p-0 pt-[8px] bg-[#f5f7fa] min-h-screen">
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
<Card className="mb-4">
|
<Card className="mb-4">
|
||||||
<Tabs activeKey={activeTab} onChange={setActiveTab}>
|
<Tabs activeKey={activeTab} onChange={setActiveTab}>
|
||||||
|
|||||||
@@ -140,11 +140,11 @@ export default function DeviceManagementPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: 24, paddingTop: 0 }}>
|
<div style={{ padding: "8px 0px", paddingTop: 0 }}>
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
onChange={setActiveTab}
|
onChange={setActiveTab}
|
||||||
style={{ marginBottom: 16 }}
|
style={{ marginBottom: 0 }}
|
||||||
>
|
>
|
||||||
<Tabs.TabPane key="all" tab="设备管理" />
|
<Tabs.TabPane key="all" tab="设备管理" />
|
||||||
<Tabs.TabPane key="camera" tab="摄像头管理" />
|
<Tabs.TabPane key="camera" tab="摄像头管理" />
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ export default function MenuList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '20px' }}>
|
<div style={{ padding: '8px 0px' }}>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
<Card title="菜单管理" style={{ borderRadius: 8 }}>
|
<Card title="菜单管理" style={{ borderRadius: 8 }}>
|
||||||
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||||
|
|||||||
@@ -86,12 +86,12 @@ const OnlineUserPage = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: 20, background: '#f5f7fa', minHeight: '100vh' }}>
|
<div style={{ padding: "8px 0px", background: '#f5f7fa', minHeight: '100vh' }}>
|
||||||
{/* ====================== 顶部 Tabs ====================== */}
|
{/* ====================== 顶部 Tabs ====================== */}
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
onChange={setActiveTab}
|
onChange={setActiveTab}
|
||||||
style={{ marginBottom: 20 }}
|
style={{ marginBottom: 0 }}
|
||||||
>
|
>
|
||||||
<TabPane tab="在线用户" key="onlineUser" />
|
<TabPane tab="在线用户" key="onlineUser" />
|
||||||
<TabPane tab="其他监控" key="other" />
|
<TabPane tab="其他监控" key="other" />
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export default function Organization() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '20px' }}>
|
<div style={{ padding: '8px 0px' }}>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
|
|
||||||
<AntdCard title="组织管理" style={{ borderRadius: 8 }}>
|
<AntdCard title="组织管理" style={{ borderRadius: 8 }}>
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ export default function StationManage() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '20px' }}>
|
<div style={{ padding: '8px 0px' }}>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
|
|
||||||
<Card title="场站管理" style={{ borderRadius: 8 }}>
|
<Card title="场站管理" style={{ borderRadius: 8 }}>
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ export default function UserRolePage() {
|
|||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
scrollbarWidth: 'none',
|
scrollbarWidth: 'none',
|
||||||
msOverflowStyle: 'none',
|
msOverflowStyle: 'none',
|
||||||
padding: '20px',
|
padding: '8px 0px',
|
||||||
background: '#f5f7fa'
|
background: '#f5f7fa'
|
||||||
}}>
|
}}>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
exportAlarm
|
exportAlarm
|
||||||
} from '../../api/alarmApi.js';
|
} from '../../api/alarmApi.js';
|
||||||
import { UniversalBarChart, UniversalLineChart, UniversalPieChart } from '../recharts.jsx';
|
import { UniversalBarChart, UniversalLineChart, UniversalPieChart } from '../recharts.jsx';
|
||||||
|
import { addWorkOrder } from '@/api/workOrder.js';
|
||||||
|
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
@@ -70,6 +71,8 @@ export default function AlarmCenterPage() {
|
|||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [pageNum, setPageNum] = useState(1);
|
const [pageNum, setPageNum] = useState(1);
|
||||||
const [pageSize] = useState(10);
|
const [pageSize] = useState(10);
|
||||||
|
const [messageApi, contextHolder] = message.useMessage();
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const [queryParams, setQueryParams] = useState({
|
const [queryParams, setQueryParams] = useState({
|
||||||
@@ -103,7 +106,7 @@ export default function AlarmCenterPage() {
|
|||||||
setTotal(res.total || 0);
|
setTotal(res.total || 0);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
message.error('加载失败');
|
messageApi.error('加载失败');
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -134,7 +137,7 @@ export default function AlarmCenterPage() {
|
|||||||
setDrawerVisible(true);
|
setDrawerVisible(true);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
message.error('加载详情失败');
|
messageApi.error('加载详情失败');
|
||||||
} finally {
|
} finally {
|
||||||
setDetailLoading(false);
|
setDetailLoading(false);
|
||||||
}
|
}
|
||||||
@@ -148,12 +151,12 @@ export default function AlarmCenterPage() {
|
|||||||
handleStatus: values.handleStatus,
|
handleStatus: values.handleStatus,
|
||||||
handleRemark: values.handleRemark || '已处理'
|
handleRemark: values.handleRemark || '已处理'
|
||||||
});
|
});
|
||||||
message.success('处理成功');
|
messageApi.success('处理成功');
|
||||||
setDrawerVisible(false);
|
setDrawerVisible(false);
|
||||||
fetchList();
|
fetchList();
|
||||||
fetchStat();
|
fetchStat();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
message.error('处理失败');
|
messageApi.error('处理失败');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -273,9 +276,63 @@ export default function AlarmCenterPage() {
|
|||||||
color: '#1890FF',
|
color: '#1890FF',
|
||||||
},
|
},
|
||||||
].filter(i => i.value > 0);
|
].filter(i => i.value > 0);
|
||||||
|
// 生成工单
|
||||||
|
const handleaddOrder = async () => {
|
||||||
|
if (!currentAlarm) {
|
||||||
|
messageApi.warning('无告警信息,无法生成工单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 组装接口需要的所有参数(你给的格式)
|
||||||
|
const params = {
|
||||||
|
id: '',
|
||||||
|
orderNo: '',
|
||||||
|
orderTitle: currentAlarm.alarmTitle || '告警生成工单',
|
||||||
|
sourceType: 7, // 来源 7=告警
|
||||||
|
orderType: 5, // 类型 5=运维
|
||||||
|
priorityLevel: currentAlarm.alarmLevel === 1 ? 1 : 2, // 严重=高,其他=中
|
||||||
|
deviceId: currentAlarm.deviceId || '',
|
||||||
|
deviceName: currentAlarm.deviceName || '',
|
||||||
|
deviceType: '', // 没有就传空
|
||||||
|
siteId: '',
|
||||||
|
siteName: '',
|
||||||
|
orgId: '',
|
||||||
|
assigneeId: '',
|
||||||
|
assigneeName: '',
|
||||||
|
collaboratorIds: '',
|
||||||
|
collaboratorNames: '',
|
||||||
|
planStartTime: '',
|
||||||
|
planEndTime: '',
|
||||||
|
deadlineTime: '',
|
||||||
|
actualStartTime: '',
|
||||||
|
actualEndTime: '',
|
||||||
|
orderStatus: 1, // 1-待处理
|
||||||
|
alarmId: currentAlarm.id || '', // 关联告警ID
|
||||||
|
alarmNo: currentAlarm.alarmNo || '', // 关联告警编号
|
||||||
|
taskDescription: currentAlarm.alarmContent || '', // 任务描述=告警内容
|
||||||
|
aiSuggestion: currentAlarm.rootCause || '', // AI建议
|
||||||
|
requiredEquipment: '',
|
||||||
|
estimatedImpact: '',
|
||||||
|
handleResult: '',
|
||||||
|
handleRemark: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
// 调用新增接口
|
||||||
|
const res = await addWorkOrder(params);
|
||||||
|
if (res.code === 0 || res.code === 200) {
|
||||||
|
messageApi.success('工单生成成功');
|
||||||
|
} else {
|
||||||
|
messageApi.error(res.msg || '工单生成失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
messageApi.error('接口调用失败');
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px' }}>
|
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '0' }}>
|
||||||
|
{contextHolder}
|
||||||
|
|
||||||
{/* 查询栏 */}
|
{/* 查询栏 */}
|
||||||
<Row gutter={8} style={{ marginBottom: 8 }}>
|
<Row gutter={8} style={{ marginBottom: 8 }}>
|
||||||
@@ -639,6 +696,13 @@ export default function AlarmCenterPage() {
|
|||||||
{/* 推荐处理措施 */}
|
{/* 推荐处理措施 */}
|
||||||
<Card size="small" title="推荐处理措施" style={{ marginBottom: 16 }}>
|
<Card size="small" title="推荐处理措施" style={{ marginBottom: 16 }}>
|
||||||
<div style={{ color: '#333' }}>{currentAlarm.handleSuggestion || '-'}</div>
|
<div style={{ color: '#333' }}>{currentAlarm.handleSuggestion || '-'}</div>
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<Button type="primary" onClick={handleaddOrder}>生成工单</Button>
|
||||||
|
|
||||||
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* 处理操作 */}
|
{/* 处理操作 */}
|
||||||
|
|||||||
@@ -80,8 +80,10 @@ h4, .ant-typography h4 { font-size: clamp(1rem, 1.5vw, 1.25rem) !important; }
|
|||||||
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
|
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
|
||||||
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
|
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
|
||||||
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
|
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
|
||||||
|
.ant-typography{
|
||||||
.ant-card-head-title {
|
color: #0837A8 !important;
|
||||||
|
}
|
||||||
|
.ant-card-head-title{
|
||||||
color: #0837A8;
|
color: #0837A8;
|
||||||
font-weight: 700 !important;
|
font-weight: 700 !important;
|
||||||
font-size: clamp(14px, 0.85vw, 16px) !important;
|
font-size: clamp(14px, 0.85vw, 16px) !important;
|
||||||
@@ -91,7 +93,7 @@ h4, .ant-typography h4 { font-size: clamp(1rem, 1.5vw, 1.25rem) !important; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ant-card-head-title>span {
|
.ant-card-head-title>span {
|
||||||
color: #0837A8;
|
color: #0837A8 !important;
|
||||||
font-weight: 700 !important;
|
font-weight: 700 !important;
|
||||||
font-size: clamp(14px, 0.85vw, 16px) !important;
|
font-size: clamp(14px, 0.85vw, 16px) !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export default function AIDiagnosisPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box', overflowX: 'hidden' }}>
|
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '8px 0px', boxSizing: 'border-box', overflowX: 'hidden' }}>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
@@ -197,7 +197,7 @@ export default function AIDiagnosisPage() {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: "16px" }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: "16px" }}>
|
||||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', fontWeight: 800, color: '#1D2129' }}>
|
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', color: '#1D2129' }}>
|
||||||
AI 智能诊断与分析中心
|
AI 智能诊断与分析中心
|
||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
<Space>
|
<Space>
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export default function CleanOptimizationPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box' }}>
|
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '12px 0px', boxSizing: 'border-box' }}>
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
.compact-table .ant-table-thead > tr > th {
|
.compact-table .ant-table-thead > tr > th {
|
||||||
@@ -152,6 +152,7 @@ export default function CleanOptimizationPage() {
|
|||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<Row
|
<Row
|
||||||
gutter={[8, 8]}
|
gutter={[8, 8]}
|
||||||
style={{
|
style={{
|
||||||
@@ -275,7 +276,7 @@ export default function CleanOptimizationPage() {
|
|||||||
{/* 标题与操作栏 */}
|
{/* 标题与操作栏 */}
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
|
||||||
<Space size={8}>
|
<Space size={8}>
|
||||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', fontWeight: 800 }}>清洗优化管理</Typography.Title>
|
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', }}>清洗优化管理</Typography.Title>
|
||||||
<InfoCircleOutlined style={{ color: '#86909C' }} />
|
<InfoCircleOutlined style={{ color: '#86909C' }} />
|
||||||
</Space>
|
</Space>
|
||||||
<Space>
|
<Space>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Layout, Typography, Menu } from 'antd';
|
import { Layout, Typography, Menu, Tabs } from 'antd';
|
||||||
import { AimOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons';
|
import { AimOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons';
|
||||||
import DeviceOverviewPage from '../components/devices/DeviceOverviewPage';
|
import DeviceOverviewPage from '../components/devices/DeviceOverviewPage';
|
||||||
import DeviceStatusPage from '../components/devices/DeviceStatusPage';
|
import DeviceStatusPage from '../components/devices/DeviceStatusPage';
|
||||||
@@ -96,21 +96,30 @@ export default function DeviceIndexPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout style={{ minHeight: '100vh', background: '#fff', overflow: 'hidden', scrollbarWidth: "thin", scrollbarColor: '#ccc transparent' }}>
|
<Layout style={{ minHeight: '100vh', overflow: 'hidden', scrollbarWidth: "thin", scrollbarColor: '#ccc transparent' }}>
|
||||||
<div style={{ display: 'flex', paddingBottom: "4px" }}>
|
<div style={{ display: 'flex', paddingBottom: "4px" }}>
|
||||||
<div style={{ padding: '8px 12px 0', flexShrink: 0 }}>
|
<div style={{ padding: '8px 12px 0', flexShrink: 0 }}>
|
||||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>装备控制</Typography.Title>
|
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>装备控制</Typography.Title>
|
||||||
<Text type="secondary" style={{ fontSize: '12px' }}>装备总览、状态监控与参数配置</Text>
|
{/*<Text type="secondary" style={{ fontSize: '12px' }}>装备总览、状态监控与参数配置</Text>*/}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Header style={{ flex: 1, background: '#fff', padding: 0, borderBottom: '1px solid #f0f0f0', height: 40, lineHeight: '40px' }}>
|
<Header style={{
|
||||||
|
flex: 1, padding: 0, background: 'transparent',
|
||||||
|
backgroundColor: 'transparent', borderBottom: '1px solid #f0f0f0', height: 40, lineHeight: '40px'
|
||||||
|
}}>
|
||||||
|
|
||||||
<Menu
|
<Menu
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
selectedKeys={[activeTab]}
|
selectedKeys={[activeTab]}
|
||||||
onClick={({ key }) => setActiveTab(key)}
|
onClick={({ key }) => setActiveTab(key)}
|
||||||
items={tabs}
|
items={tabs}
|
||||||
style={{ border: 0, height: 40, lineHeight: '40px' }}
|
style={{
|
||||||
/>
|
border: '0',
|
||||||
|
height: 40,
|
||||||
|
lineHeight: '40px',
|
||||||
|
background: 'transparent', // 这里直接写,不需要 !important
|
||||||
|
backgroundColor: 'transparent' // 兼容更好
|
||||||
|
}} />
|
||||||
</Header>
|
</Header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -118,7 +127,7 @@ export default function DeviceIndexPage() {
|
|||||||
maxHeight: 'calc(100vh - 40px)',
|
maxHeight: 'calc(100vh - 40px)',
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
background: '#f5f7fa',
|
background: '#f5f7fa',
|
||||||
padding: '8px',
|
padding: '8px 0px',
|
||||||
scrollbarWidth: "thin"
|
scrollbarWidth: "thin"
|
||||||
}}>
|
}}>
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export default function StationDashboard() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ background: '#f8fafc', padding: '8px', minHeight: '100vh', width: '100%', boxSizing: 'border-box' }}>
|
<div style={{ background: '#f8fafc', padding: '0px', minHeight: '100vh', width: '100%', boxSizing: 'border-box' }}>
|
||||||
<Row gutter={[8, 8]} style={{ margin: '0 4px 0px 4px' }}>
|
<Row gutter={[8, 8]} style={{ margin: '0 4px 0px 4px' }}>
|
||||||
{[
|
{[
|
||||||
{ title: '今日发电量', value: '4,752', unit: 'kWh', sub: '日目标 5,000 kWh', color: '#00B42A', bg: '#E8FFEA', icon: <ThunderboltOutlined /> },
|
{ title: '今日发电量', value: '4,752', unit: 'kWh', sub: '日目标 5,000 kWh', color: '#00B42A', bg: '#E8FFEA', icon: <ThunderboltOutlined /> },
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ const RealTimeMonitorPage = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ background: '#f8fafc', padding: '8px', minHeight: '100vh', width: '100%', boxSizing: 'border-box' }}>
|
<div style={{ background: '#f8fafc', padding: '8px 0px', minHeight: '100vh', width: '100%', boxSizing: 'border-box' }}>
|
||||||
<div style={{ marginBottom: 8 }}>
|
<div style={{ marginBottom: 8 }}>
|
||||||
<Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>实时监控中心</Title>
|
<Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>实时监控中心</Title>
|
||||||
<Text type="secondary" style={{ fontSize: '12px' }}>全方位实时掌握电站设备运行状态与发电表现</Text>
|
<Text type="secondary" style={{ fontSize: '12px' }}>全方位实时掌握电站设备运行状态与发电表现</Text>
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default function ReportCenterPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '16px 24px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
<div style={{ padding: '4px 0px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
.compact-table .ant-table-thead > tr > th {
|
.compact-table .ant-table-thead > tr > th {
|
||||||
@@ -153,17 +153,20 @@ export default function ReportCenterPage() {
|
|||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
|
||||||
|
<Typography.Title level={4} style={{ margin: '0 32px 0 0', }}>报表中心</Typography.Title>
|
||||||
|
|
||||||
|
{/* 页面头部标签 */}
|
||||||
|
<Tabs activeKey={activeTab} onChange={setActiveTab} className="report-tabs">
|
||||||
|
<TabPane tab="报表总览" key="overview" />
|
||||||
|
<TabPane tab="发电报表" key="power" />
|
||||||
|
<TabPane tab="运维报表" key="operation" />
|
||||||
|
<TabPane tab="告警报表" key="alarm" />
|
||||||
|
<TabPane tab="AI分析报告" key="ai" />
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Typography.Title level={4} style={{ margin: 0 }}>报表中心</Typography.Title>
|
|
||||||
|
|
||||||
{/* 页面头部标签 */}
|
|
||||||
<Tabs activeKey={activeTab} onChange={setActiveTab} className="report-tabs">
|
|
||||||
<TabPane tab="报表总览" key="overview" />
|
|
||||||
<TabPane tab="发电报表" key="power" />
|
|
||||||
<TabPane tab="运维报表" key="operation" />
|
|
||||||
<TabPane tab="告警报表" key="alarm" />
|
|
||||||
<TabPane tab="AI分析报告" key="ai" />
|
|
||||||
</Tabs>
|
|
||||||
|
|
||||||
<Row
|
<Row
|
||||||
gutter={[8, 8]}
|
gutter={[8, 8]}
|
||||||
|
|||||||
@@ -161,13 +161,13 @@ export default function SystemSettings() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Layout style={{ minHeight: '100vh', background: '#fff', overflow: 'hidden' }}>
|
<Layout style={{ minHeight: '100vh', overflow: 'hidden' }}>
|
||||||
|
|
||||||
<div style={{ padding: '8px 12px 0' }}>
|
<div style={{ padding: '4px 0px 0' }}>
|
||||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>系统设置</Typography.Title>
|
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>系统设置</Typography.Title>
|
||||||
<Text type="secondary" style={{ fontSize: '12px' }}>告警规则配置、用户角色、通知管理与系统参数设置</Text>
|
<Text type="secondary" style={{ fontSize: '12px' }}>告警规则配置、用户角色、通知管理与系统参数设置</Text>
|
||||||
</div>
|
</div>
|
||||||
<Header style={{ background: '#fff', padding: 0, borderBottom: '1px solid #f0f0f0', position: 'sticky', top: 0, zIndex: 10, height: 40, lineHeight: '40px' }}>
|
<Header style={{ padding: 0, borderBottom: '1px solid #f0f0f0', position: 'sticky', top: 0, zIndex: 10, height: 40, lineHeight: '40px' }}>
|
||||||
<Menu
|
<Menu
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
selectedKeys={[activeTab]}
|
selectedKeys={[activeTab]}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default function VideoMonitorPage() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box' }}>
|
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '8px 0px', boxSizing: 'border-box' }}>
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
.compact-table .ant-table-thead > tr > th {
|
.compact-table .ant-table-thead > tr > th {
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
const [completeModalVisible, setCompleteModalVisible] = useState(false);
|
const [completeModalVisible, setCompleteModalVisible] = useState(false);
|
||||||
const [completeForm] = Form.useForm(); // 完成工单表单
|
const [completeForm] = Form.useForm(); // 完成工单表单
|
||||||
|
const [messageApi, contextHolder] = message.useMessage();
|
||||||
|
|
||||||
|
|
||||||
// 统计数据(保留原模拟不变)
|
// 统计数据(保留原模拟不变)
|
||||||
const stats = [
|
const stats = [
|
||||||
@@ -122,7 +124,7 @@ const WorkOrderPage = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('获取工单列表失败');
|
messageApi.error('获取工单列表失败');
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -130,7 +132,7 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
// 打开完成工单弹窗
|
// 打开完成工单弹窗
|
||||||
const openCompleteModal = () => {
|
const openCompleteModal = () => {
|
||||||
if (!selectedRowKey) return message.warning('请先选择工单');
|
if (!selectedRowKey) return messageApi.warning('请先选择工单');
|
||||||
completeForm.setFieldsValue({
|
completeForm.setFieldsValue({
|
||||||
id: currentDetail?.id,
|
id: currentDetail?.id,
|
||||||
orderNo: currentDetail?.orderNo,
|
orderNo: currentDetail?.orderNo,
|
||||||
@@ -151,13 +153,13 @@ const WorkOrderPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
await completeWorkOrder(params);
|
await completeWorkOrder(params);
|
||||||
message.success('工单已完成');
|
messageApi.success('工单已完成');
|
||||||
setCompleteModalVisible(false);
|
setCompleteModalVisible(false);
|
||||||
// 刷新列表 + 详情
|
// 刷新列表 + 详情
|
||||||
getWorkOrderList();
|
getWorkOrderList();
|
||||||
getWorkOrderDetail(selectedRowKey);
|
getWorkOrderDetail(selectedRowKey);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
message.error('工单完成失败');
|
messageApi.error('工单完成失败');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -170,7 +172,7 @@ const WorkOrderPage = () => {
|
|||||||
setCurrentDetail(res.data);
|
setCurrentDetail(res.data);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('获取工单详情失败');
|
messageApi.error('获取工单详情失败');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,13 +186,12 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
// 打开修改工单弹窗
|
// 打开修改工单弹窗
|
||||||
const openEditModal = () => {
|
const openEditModal = () => {
|
||||||
if (!selectedRowKey) return message.warning('请先选择一条工单');
|
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
title: currentDetail?.orderTitle,
|
orderTitle: currentDetail?.orderTitle,
|
||||||
content: currentDetail?.taskDescription,
|
orderType: currentDetail?.orderType,
|
||||||
priority: currentDetail?.priorityLevel,
|
priorityLevel: currentDetail?.priorityLevel,
|
||||||
type: currentDetail?.orderType,
|
taskDescription: currentDetail?.taskDescription,
|
||||||
remark: currentDetail?.remark
|
|
||||||
});
|
});
|
||||||
setEditModalVisible(true);
|
setEditModalVisible(true);
|
||||||
};
|
};
|
||||||
@@ -198,7 +199,7 @@ const WorkOrderPage = () => {
|
|||||||
// 打开派发工单弹窗
|
// 打开派发工单弹窗
|
||||||
// 打开派发工单弹窗
|
// 打开派发工单弹窗
|
||||||
const openDispatchModal = () => {
|
const openDispatchModal = () => {
|
||||||
if (!selectedRowKey) return message.warning('请先选择一条工单');
|
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
orderId: selectedRowKey, // 自动回填工单ID
|
orderId: selectedRowKey, // 自动回填工单ID
|
||||||
assigneeName: currentDetail?.assigneeName || '',
|
assigneeName: currentDetail?.assigneeName || '',
|
||||||
@@ -210,22 +211,54 @@ const WorkOrderPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 提交修改工单
|
// 提交修改工单
|
||||||
|
// 提交修改工单(完整匹配后端参数)
|
||||||
const submitEdit = async (values) => {
|
const submitEdit = async (values) => {
|
||||||
try {
|
try {
|
||||||
// 适配后端传参:id、title、content、priority、type、remark
|
// 拼接你给的所有工单参数(1:1 匹配)
|
||||||
await updateWorkOrder({
|
const params = {
|
||||||
id: selectedRowKey,
|
id: selectedRowKey, // 主键ID
|
||||||
orderTitle: values.title,
|
orderNo: currentDetail?.orderNo, // 工单编号
|
||||||
taskDescription: values.content,
|
orderTitle: values.orderTitle, // 工单标题
|
||||||
priorityLevel: values.priority,
|
sourceType: currentDetail?.sourceType, // 来源(保持不变)
|
||||||
orderType: values.type,
|
orderType: values.orderType, // 类型
|
||||||
remark: values.remark
|
priorityLevel: values.priorityLevel, // 优先级
|
||||||
});
|
deviceId: currentDetail?.deviceId, // 设备ID
|
||||||
message.success('修改工单成功');
|
deviceName: currentDetail?.deviceName, // 设备名称
|
||||||
|
deviceType: currentDetail?.deviceType,
|
||||||
|
siteId: currentDetail?.siteId,
|
||||||
|
siteName: currentDetail?.siteName,
|
||||||
|
orgId: currentDetail?.orgId,
|
||||||
|
assigneeId: currentDetail?.assigneeId,
|
||||||
|
assigneeName: currentDetail?.assigneeName,
|
||||||
|
collaboratorIds: currentDetail?.collaboratorIds,
|
||||||
|
collaboratorNames: currentDetail?.collaboratorNames,
|
||||||
|
planStartTime: currentDetail?.planStartTime,
|
||||||
|
planEndTime: currentDetail?.planEndTime,
|
||||||
|
deadlineTime: currentDetail?.deadlineTime,
|
||||||
|
actualStartTime: currentDetail?.actualStartTime,
|
||||||
|
actualEndTime: currentDetail?.actualEndTime,
|
||||||
|
orderStatus: currentDetail?.orderStatus,
|
||||||
|
alarmId: currentDetail?.alarmId,
|
||||||
|
alarmNo: currentDetail?.alarmNo,
|
||||||
|
taskDescription: values.taskDescription, // 任务描述
|
||||||
|
aiSuggestion: currentDetail?.aiSuggestion,
|
||||||
|
requiredEquipment: currentDetail?.requiredEquipment,
|
||||||
|
estimatedImpact: currentDetail?.estimatedImpact,
|
||||||
|
handleResult: currentDetail?.handleResult,
|
||||||
|
handleRemark: currentDetail?.handleRemark,
|
||||||
|
};
|
||||||
|
|
||||||
|
// 调用你提供的接口
|
||||||
|
await updateWorkOrder(params);
|
||||||
|
|
||||||
|
messageApi.success('修改工单成功');
|
||||||
setEditModalVisible(false);
|
setEditModalVisible(false);
|
||||||
|
// 刷新列表和详情
|
||||||
getWorkOrderList();
|
getWorkOrderList();
|
||||||
|
getWorkOrderDetail(selectedRowKey);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('修改工单失败');
|
messageApi.error('修改工单失败');
|
||||||
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -247,11 +280,11 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
await dispatchWorkOrder(params);
|
await dispatchWorkOrder(params);
|
||||||
|
|
||||||
message.success('工单派发成功');
|
messageApi.success('工单派发成功');
|
||||||
setDispatchModalVisible(false);
|
setDispatchModalVisible(false);
|
||||||
getWorkOrderList(); // 刷新列表
|
getWorkOrderList(); // 刷新列表
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('工单派发失败');
|
messageApi.error('工单派发失败');
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -333,7 +366,8 @@ const WorkOrderPage = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '16px 24px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
<div style={{ padding: '0px 0px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
||||||
|
{contextHolder}
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
.compact-table .ant-table-thead > tr > th {
|
.compact-table .ant-table-thead > tr > th {
|
||||||
@@ -364,8 +398,8 @@ const WorkOrderPage = () => {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
{/* 顶部标题和页签 */}
|
{/* 顶部标题和页签 */}
|
||||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
||||||
<Title level={4} style={{ margin: '0 32px 0 0', fontWeight: 800 }}>工单任务管理</Title>
|
<Title level={4} style={{ margin: '0 32px 0 0', }}>工单任务管理</Title>
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
onChange={setActiveTab}
|
onChange={setActiveTab}
|
||||||
@@ -589,7 +623,7 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
<div style={{ marginBottom: 24 }}>
|
<div style={{ marginBottom: 24 }}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16, flexWrap: 'wrap', gap: 12 }}>
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16, flexWrap: 'wrap', gap: 12 }}>
|
||||||
<Title level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || '暂无标题'}</Title>
|
<span level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || '暂无标题'}</span>
|
||||||
{currentDetail?.priorityLevel && (
|
{currentDetail?.priorityLevel && (
|
||||||
<Tag
|
<Tag
|
||||||
style={{
|
style={{
|
||||||
@@ -607,19 +641,19 @@ const WorkOrderPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Row gutter={[16, 16]} style={{ background: '#f8fafc', padding: 16, borderRadius: 12, marginBottom: 20 }}>
|
<Row gutter={[16, 16]} style={{ background: '#f8fafc', padding: 16, borderRadius: 12, marginBottom: 20 }}>
|
||||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>来源:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.sourceType || '--'}</Text></Col>
|
<Col span={12}><span style={{ fontSize: 12 }}>来源:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.sourceType || '--'}</span></Col>
|
||||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>工单类型:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{orderTypeConfig[currentDetail?.orderType] || '--'}</Text></Col>
|
<Col span={12}><span style={{ fontSize: 12 }}>工单类型:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{orderTypeConfig[currentDetail?.orderType] || '--'}</span></Col>
|
||||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>负责人:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.assigneeName || '--'}</Text></Col>
|
<Col span={12}><span style={{ fontSize: 12 }}>负责人:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.assigneeName || '--'}</span></Col>
|
||||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>协同人员:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.collaboratorNames || '无'}</Text></Col>
|
<Col span={12}><span style={{ fontSize: 12 }}>协同人员:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.collaboratorNames || '无'}</span></Col>
|
||||||
<Col span={24}><Text type="secondary" style={{ fontSize: 12 }}>计划时间:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'}</Text></Col>
|
<Col span={24}><span style={{ fontSize: 12 }}>计划时间:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'}</span></Col>
|
||||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>关联设备:</Text><Text style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</Text></Col>
|
<Col span={12}><span style={{ fontSize: 12 }}>关联设备:</span><span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</span></Col>
|
||||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>关联区域:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</Text></Col>
|
<Col span={12}><span style={{ fontSize: 12 }}>关联区域:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</span></Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Text type="secondary" style={{ fontSize: 12 }}>当前状态:</Text>
|
<span style={{ fontSize: 12 }}>当前状态:</span>
|
||||||
<Tag color="blue" style={{ borderRadius: 4, fontWeight: 600, border: 'none', background: '#E8F3FF', color: '#165DFF' }}>{orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}</Tag>
|
<Tag color="blue" style={{ borderRadius: 4, fontWeight: 600, border: 'none', background: '#E8F3FF', color: '#165DFF' }}>{orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}</Tag>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Text type="secondary" style={{ fontSize: 12 }}>任务描述:</Text>
|
<span style={{ fontSize: 12 }}>任务描述:</span>
|
||||||
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>{currentDetail?.taskDescription || '暂无描述'}</div>
|
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>{currentDetail?.taskDescription || '暂无描述'}</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
@@ -750,31 +784,57 @@ const WorkOrderPage = () => {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
{/* 修改工单弹窗 */}
|
||||||
{/* 修改工单弹窗 */}
|
{/* 修改工单弹窗 */}
|
||||||
<Modal title="修改工单" open={editModalVisible} onCancel={() => setEditModalVisible(false)} footer={null} width={520}>
|
<Modal title="修改工单" open={editModalVisible} onCancel={() => setEditModalVisible(false)} footer={null} width={520}>
|
||||||
<Form form={form} layout="vertical" onFinish={submitEdit}>
|
<Form form={form} layout="vertical" onFinish={submitEdit}>
|
||||||
<FormItem name="title" label="工单标题">
|
<FormItem
|
||||||
|
name="orderTitle"
|
||||||
|
label="工单标题"
|
||||||
|
rules={[{ required: true, message: '请输入工单标题' }]}
|
||||||
|
>
|
||||||
<Input placeholder="请输入工单标题" />
|
<Input placeholder="请输入工单标题" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="content" label="工单内容">
|
|
||||||
<Input.TextArea rows={4} placeholder="请输入工单内容" />
|
<FormItem
|
||||||
|
name="orderType"
|
||||||
|
label="工单类型"
|
||||||
|
rules={[{ required: true, message: '请选择工单类型' }]}
|
||||||
|
>
|
||||||
|
<Select placeholder="请选择工单类型">
|
||||||
|
<Option value={1}>巡检</Option>
|
||||||
|
<Option value={2}>检修</Option>
|
||||||
|
<Option value={3}>清洗</Option>
|
||||||
|
<Option value={4}>维修</Option>
|
||||||
|
<Option value={5}>运维</Option>
|
||||||
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="priority" label="优先级">
|
|
||||||
|
<FormItem
|
||||||
|
name="priorityLevel"
|
||||||
|
label="优先级"
|
||||||
|
rules={[{ required: true, message: '请选择优先级' }]}
|
||||||
|
>
|
||||||
<Select placeholder="请选择优先级">
|
<Select placeholder="请选择优先级">
|
||||||
<Option value={1}>高</Option>
|
<Option value={1}>高</Option>
|
||||||
<Option value={2}>中</Option>
|
<Option value={2}>中</Option>
|
||||||
<Option value={3}>低</Option>
|
<Option value={3}>低</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="type" label="工单类型">
|
|
||||||
<Input placeholder="请输入工单类型" />
|
<FormItem
|
||||||
</FormItem>
|
name="taskDescription"
|
||||||
<FormItem name="remark" label="备注">
|
label="任务描述"
|
||||||
<Input.TextArea rows={2} placeholder="请输入备注" />
|
rules={[{ required: true, message: '请输入任务描述' }]}
|
||||||
|
>
|
||||||
|
<Input.TextArea rows={4} placeholder="请输入任务描述" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem style={{ textAlign: 'right', marginBottom: 0 }}>
|
<FormItem style={{ textAlign: 'right', marginBottom: 0 }}>
|
||||||
<Button onClick={() => setEditModalVisible(false)}>取消</Button>
|
<Button onClick={() => setEditModalVisible(false)}>取消</Button>
|
||||||
<Button type="primary" htmlType="submit" style={{ marginLeft: 8 }}>确认修改</Button>
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 8 }}>
|
||||||
|
确认修改
|
||||||
|
</Button>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user