Compare commits
2 Commits
206b6915e5
...
9212b45ece
| Author | SHA1 | Date | |
|---|---|---|---|
| 9212b45ece | |||
| b5916dd408 |
@@ -239,6 +239,11 @@ export default function AppLayout() {
|
||||
/>
|
||||
)}
|
||||
<span style={{ fontSize: 'clamp(12px, 1vw, 14px)' }}>{userInfo?.nickName || userInfo?.username}</span>
|
||||
{userInfo?.roleKey === "admin" && <Tag color="red">管理员</Tag>}
|
||||
{userInfo?.roleKey === "manager" && <Tag color="orange">组织管理员</Tag>}
|
||||
{userInfo?.roleKey === "siteManager" && <Tag color="blue">场站管理员</Tag>}
|
||||
|
||||
|
||||
</Space>
|
||||
<Button type="text" danger icon={<LogoutOutlined />} onClick={handleLogout} style={{ fontSize: 'clamp(12px, 1vw, 14px)' }}>
|
||||
{t('layout.logout')}
|
||||
|
||||
@@ -2022,17 +2022,27 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
||||
captureScreenshot
|
||||
}));
|
||||
|
||||
return <>
|
||||
<div ref={containerRef} className="w-full h-full bg-slate-900 overflow-hidden" />
|
||||
<div
|
||||
ref={tooltipRef}
|
||||
style={{
|
||||
position: "absolute", display: "none", pointerEvents: "none",
|
||||
background: "rgba(0,0,0,0.75)", color: "#fff", padding: "8px 10px",
|
||||
borderRadius: "4px", fontSize: "12px", zIndex: 9999, whiteSpace: "nowrap"
|
||||
}}
|
||||
/>
|
||||
</>;
|
||||
return (
|
||||
<div className="w-full h-full bg-slate-900 overflow-hidden relative">
|
||||
<div ref={containerRef} className="w-full h-full overflow-hidden" />
|
||||
<div
|
||||
ref={tooltipRef}
|
||||
style={{
|
||||
position: "absolute",
|
||||
display: "none",
|
||||
pointerEvents: "none",
|
||||
background: "rgba(0,0,0,0.75)",
|
||||
color: "#fff",
|
||||
padding: "8px 10px",
|
||||
borderRadius: "4px",
|
||||
fontSize: "12px",
|
||||
zIndex: 99999,
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
export default CesiumMap;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Layout, Tabs, Card, Row, Col, Button, Typography, Space, Modal, Form, Tree, message,
|
||||
Input, Popconfirm, Divider, InputNumber, Pagination, Table, Select,
|
||||
@@ -130,12 +130,13 @@ export default function UserRolePage() {
|
||||
const params = {
|
||||
pageNum: userPagination.pageNum,
|
||||
pageSize: userPagination.pageSize,
|
||||
orgId: userInfo?.roleKey == "manager" ? userInfo?.orgId : currentStation?.orgId,
|
||||
...(userInfo?.roleKey == "manager"
|
||||
orgId: userInfo?.roleKey === "manager" ? userInfo?.orgId : currentStation?.orgId,
|
||||
...(userInfo?.roleKey === "admin" && stationId
|
||||
? {}
|
||||
: { siteId: stationId }
|
||||
)
|
||||
};
|
||||
console.log(userInfo?.roleKey)
|
||||
|
||||
getUser(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
@@ -171,7 +172,7 @@ export default function UserRolePage() {
|
||||
useEffect(() => {
|
||||
getUserData();
|
||||
getRoleForSelect();
|
||||
}, [userPagination.pageNum, userPagination.pageSize,]);
|
||||
}, [userPagination.pageNum, userPagination.pageSize, stationId]);
|
||||
|
||||
// ====================== 角色操作 ======================
|
||||
const handleAddRole = () => {
|
||||
|
||||
Reference in New Issue
Block a user