diff --git a/src/api/stationManage/index.ts b/src/api/stationManage/index.ts index 7fb0be1..9f30f97 100644 --- a/src/api/stationManage/index.ts +++ b/src/api/stationManage/index.ts @@ -1,6 +1,7 @@ import request from '../request'; -//获取组织列表 +//根据用户获取场站 + export function getStationList(params) { return request({ url: '/system/site/list', @@ -10,6 +11,15 @@ export function getStationList(params) { }); } +//获取组织列表 +export function getStationByUserId() { + return request({ + url: '/system/site/selectByUserId', + method: 'get', + + }); +} + export function saveSite(data) { return request({ url: '/system/site/save', diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index e6c7d3f..211074c 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -17,7 +17,7 @@ import { RootState, useAppDispatch } from '../store'; import { logout } from '../store/userSlice'; import { setCurrentStation, clearStation } from '../store/stationSlice'; import { getMenuList } from '../api/mune'; -import { getStationList } from '../api/stationManage'; +import { getStationByUserId } from '../api/stationManage'; import envConfig from '../../env'; const { Header, Sider, Content } = Layout; @@ -38,14 +38,10 @@ export default function AppLayout() { const { currentStation, stationId } = useSelector((state: RootState) => state.station); const getStationData = () => { - const params = { - pageNum: 1, - pageSize: 9999, - orgId: userInfo?.orgId, - }; - getStationList(params).then(res => { + + getStationByUserId().then(res => { if (res.code === 200) { - const list = res.rows || []; + const list = res.data || []; setStationList(list); if (!currentStation && list.length > 0) { dispatch(setCurrentStation(list[0])); diff --git a/src/components/SystemSetting/ErrorManagement.tsx b/src/components/SystemSetting/ErrorManagement.tsx index 580d02e..ba74296 100644 --- a/src/components/SystemSetting/ErrorManagement.tsx +++ b/src/components/SystemSetting/ErrorManagement.tsx @@ -347,20 +347,20 @@ export default function ErrorManagement() { {/* 搜索区域完全不变 */}
- + - + - {errorSourceOptions.map(option => ( ))} - {errorLevelOptions.map(option => ( ))} @@ -368,9 +368,9 @@ export default function ErrorManagement() { - - - + + +
diff --git a/src/components/SystemSetting/StationManage.tsx b/src/components/SystemSetting/StationManage.tsx index 18445cc..becae18 100644 --- a/src/components/SystemSetting/StationManage.tsx +++ b/src/components/SystemSetting/StationManage.tsx @@ -273,14 +273,13 @@ export default function StationManage() { ))} + )} -
- -
+ { {/* 右侧:详情 + AI + 告警 */} -
+
工单详情 工单编号: {currentDetail?.orderNo || '--'}
-
-
+
+
{currentDetail?.orderTitle || '暂无标题'} {currentDetail?.priorityLevel && ( @@ -653,7 +653,7 @@ const WorkOrderPage = () => {
-
+
= 3 ? '100%' : (currentDetail?.orderStatus === 2 ? '66%' : '33%'), height: '100%', background: '#00B42A' }}>