1、增开监管端跳转子页面的权限控制
parent
627166fccb
commit
3293769b9d
|
|
@ -9,6 +9,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useDictionary from "zy-react-library/hooks/useDictionary";
|
import useDictionary from "zy-react-library/hooks/useDictionary";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { FIRE_RESOURCE_PERMISSION_QUERY_KEYS, getPermissionKeyFromSearch } from "~/enumerate/constant/fireResourcePermission";
|
||||||
import { NS_CONTROL_ROOM } from "~/enumerate/namespace";
|
import { NS_CONTROL_ROOM } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
|
@ -32,6 +33,18 @@ function List(props) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const isFromSupervision = !!query.eqCorpId;
|
const isFromSupervision = !!query.eqCorpId;
|
||||||
|
const searchParams = new URLSearchParams(props.location?.search || "");
|
||||||
|
const getPermissionValue = (action, defaultKey) => {
|
||||||
|
const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action];
|
||||||
|
const dynamicPermissionKey = queryKey ? searchParams.get(queryKey) : "";
|
||||||
|
|
||||||
|
if (isFromSupervision && dynamicPermissionKey) {
|
||||||
|
return props.permission(dynamicPermissionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return props.permission(getPermissionKeyFromSearch(props.location?.search, action, defaultKey));
|
||||||
|
};
|
||||||
|
const hasPermission = (action, defaultKey) => getPermissionValue(action, defaultKey);
|
||||||
const supervisionBackPath = normalizeBackPath(query.backPath
|
const supervisionBackPath = normalizeBackPath(query.backPath
|
||||||
|| props.location?.state?.backPath
|
|| props.location?.state?.backPath
|
||||||
|| window.sessionStorage.getItem("supervisionFireResourceStatsBackPath")
|
|| window.sessionStorage.getItem("supervisionFireResourceStatsBackPath")
|
||||||
|
|
@ -167,7 +180,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("xfkzs-add") && (
|
{hasPermission("add", "xfkzs-add") && (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -227,7 +240,7 @@ function List(props) {
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space size={8}>
|
<Space size={8}>
|
||||||
{props.permission("xfkzs-info") && (
|
{hasPermission("info", "xfkzs-info") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -238,7 +251,7 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfkzs-update") && (
|
{hasPermission("update", "xfkzs-update") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -249,7 +262,7 @@ function List(props) {
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfkzs-remove") && (
|
{hasPermission("remove", "xfkzs-remove") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useDictionary from "zy-react-library/hooks/useDictionary";
|
import useDictionary from "zy-react-library/hooks/useDictionary";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { FIRE_RESOURCE_PERMISSION_QUERY_KEYS, getPermissionKeyFromSearch } from "~/enumerate/constant/fireResourcePermission";
|
||||||
import { NS_PUMP_ROOM } from "~/enumerate/namespace";
|
import { NS_PUMP_ROOM } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
|
|
||||||
const normalizeBackPath = (path) => {
|
const normalizeBackPath = (path) => {
|
||||||
if (!path) return "";
|
if (!path) return "";
|
||||||
try {
|
try {
|
||||||
|
|
@ -30,6 +30,18 @@ function List(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const isFromSupervision = !!query.eqCorpId;
|
const isFromSupervision = !!query.eqCorpId;
|
||||||
|
const searchParams = new URLSearchParams(props.location?.search || "");
|
||||||
|
const getPermissionValue = (action, defaultKey) => {
|
||||||
|
const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action];
|
||||||
|
const dynamicPermissionKey = queryKey ? searchParams.get(queryKey) : "";
|
||||||
|
|
||||||
|
if (isFromSupervision && dynamicPermissionKey) {
|
||||||
|
return props.permission(dynamicPermissionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return props.permission(getPermissionKeyFromSearch(props.location?.search, action, defaultKey));
|
||||||
|
};
|
||||||
|
const hasPermission = (action, defaultKey) => getPermissionValue(action, defaultKey);
|
||||||
const supervisionBackPath = normalizeBackPath(
|
const supervisionBackPath = normalizeBackPath(
|
||||||
query.backPath
|
query.backPath
|
||||||
|| props.location?.state?.backPath
|
|| props.location?.state?.backPath
|
||||||
|
|
@ -149,7 +161,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("xfbf-add") && (
|
{hasPermission("add", "xfbf-add") && (
|
||||||
<Button type="primary" onClick={() => props.history.push("./add")}>新增</Button>
|
<Button type="primary" onClick={() => props.history.push("./add")}>新增</Button>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
|
@ -166,13 +178,13 @@ function List(props) {
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space size={8}>
|
<Space size={8}>
|
||||||
{props.permission("xfbf-info") && (
|
{hasPermission("info", "xfbf-info") && (
|
||||||
<Button type="link" size="small" onClick={() => props.history.push(`./view?id=${record.id}`)}>查看</Button>
|
<Button type="link" size="small" onClick={() => props.history.push(`./view?id=${record.id}`)}>查看</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfbf-update") && (
|
{hasPermission("update", "xfbf-update") && (
|
||||||
<Button type="link" size="small" onClick={() => props.history.push(`./add?id=${record.id}`)}>编辑</Button>
|
<Button type="link" size="small" onClick={() => props.history.push(`./add?id=${record.id}`)}>编辑</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfbf-remove") && (
|
{hasPermission("remove", "xfbf-remove") && (
|
||||||
<Button type="link" size="small" danger onClick={() => onDelete(record.id)}>删除</Button>
|
<Button type="link" size="small" danger onClick={() => onDelete(record.id)}>删除</Button>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,13 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { FIRE_RESOURCE_PERMISSION_QUERY_KEYS, getPermissionKeyFromSearch } from "~/enumerate/constant/fireResourcePermission";
|
||||||
import { NS_RESCUE_TEAM } from "~/enumerate/namespace";
|
import { NS_RESCUE_TEAM } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
|
|
||||||
const normalizeBackPath = (path) => {
|
const normalizeBackPath = (path) => {
|
||||||
if (!path) return "";
|
if (!path) return "";
|
||||||
try {
|
try {
|
||||||
|
|
@ -29,6 +30,19 @@ function List(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const isFromSupervision = !!query.eqCorpId;
|
const isFromSupervision = !!query.eqCorpId;
|
||||||
|
const searchParams = new URLSearchParams(props.location?.search || "");
|
||||||
|
const getPermissionValue = (action, defaultKey) => {
|
||||||
|
const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action];
|
||||||
|
const dynamicPermissionKey = queryKey ? searchParams.get(queryKey) : "";
|
||||||
|
|
||||||
|
if (isFromSupervision && dynamicPermissionKey) {
|
||||||
|
return props.permission(dynamicPermissionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return props.permission(getPermissionKeyFromSearch(props.location?.search, action, defaultKey));
|
||||||
|
};
|
||||||
|
const canAdd = getPermissionValue("add", "xfjyd-add");
|
||||||
|
const hasPermission = (action, defaultKey) => getPermissionValue(action, defaultKey);
|
||||||
const supervisionBackPath = normalizeBackPath(
|
const supervisionBackPath = normalizeBackPath(
|
||||||
query.backPath
|
query.backPath
|
||||||
|| props.location?.state?.backPath
|
|| props.location?.state?.backPath
|
||||||
|
|
@ -131,7 +145,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("xfjyd-add") && (
|
{canAdd && (
|
||||||
<Button type="primary" onClick={() => props.history.push("./add")}>新增</Button>
|
<Button type="primary" onClick={() => props.history.push("./add")}>新增</Button>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
|
@ -150,13 +164,13 @@ function List(props) {
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space size={8}>
|
<Space size={8}>
|
||||||
{props.permission("xfjyd-info") && (
|
{hasPermission("info", "xfjyd-info") && (
|
||||||
<Button type="link" size="small" onClick={() => props.history.push(`./view?id=${record.id}`)}>查看</Button>
|
<Button type="link" size="small" onClick={() => props.history.push(`./view?id=${record.id}`)}>查看</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfjyd-update") && (
|
{hasPermission("update", "xfjyd-update") && (
|
||||||
<Button type="link" size="small" onClick={() => props.history.push(`./add?id=${record.id}`)}>编辑</Button>
|
<Button type="link" size="small" onClick={() => props.history.push(`./add?id=${record.id}`)}>编辑</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfjyd-remove") && (
|
{hasPermission("remove", "xfjyd-remove") && (
|
||||||
<Button type="link" size="small" danger onClick={() => onDelete(record.id)}>删除</Button>
|
<Button type="link" size="small" danger onClick={() => onDelete(record.id)}>删除</Button>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useDictionary from "zy-react-library/hooks/useDictionary";
|
import useDictionary from "zy-react-library/hooks/useDictionary";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { FIRE_RESOURCE_PERMISSION_QUERY_KEYS, getPermissionKeyFromSearch } from "~/enumerate/constant/fireResourcePermission";
|
||||||
import { NS_WATER_SOURCE } from "~/enumerate/namespace";
|
import { NS_WATER_SOURCE } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
|
@ -32,6 +33,18 @@ function List(props) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const isFromSupervision = !!query.eqCorpId;
|
const isFromSupervision = !!query.eqCorpId;
|
||||||
|
const searchParams = new URLSearchParams(props.location?.search || "");
|
||||||
|
const getPermissionValue = (action, defaultKey) => {
|
||||||
|
const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action];
|
||||||
|
const dynamicPermissionKey = queryKey ? searchParams.get(queryKey) : "";
|
||||||
|
|
||||||
|
if (isFromSupervision && dynamicPermissionKey) {
|
||||||
|
return props.permission(dynamicPermissionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return props.permission(getPermissionKeyFromSearch(props.location?.search, action, defaultKey));
|
||||||
|
};
|
||||||
|
const hasPermission = (action, defaultKey) => getPermissionValue(action, defaultKey);
|
||||||
const supervisionBackPath = normalizeBackPath(query.backPath
|
const supervisionBackPath = normalizeBackPath(query.backPath
|
||||||
|| props.location?.state?.backPath
|
|| props.location?.state?.backPath
|
||||||
|| window.sessionStorage.getItem("supervisionFireResourceStatsBackPath")
|
|| window.sessionStorage.getItem("supervisionFireResourceStatsBackPath")
|
||||||
|
|
@ -161,7 +174,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("xfsy-add") && (
|
{hasPermission("add", "xfsy-add") && (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -207,7 +220,7 @@ function List(props) {
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space size={8}>
|
<Space size={8}>
|
||||||
{props.permission("xfsy-info") && (
|
{hasPermission("info", "xfsy-info") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -218,7 +231,7 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfsy-update") && (
|
{hasPermission("update", "xfsy-update") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -229,7 +242,7 @@ function List(props) {
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("xfsy-remove") && (
|
{hasPermission("remove", "xfsy-remove") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,15 @@ import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import {
|
||||||
|
FIRE_RESOURCE_PERMISSION_QUERY_KEYS,
|
||||||
|
FIRE_RESOURCE_SUPERVISION_PERMISSION_MAP,
|
||||||
|
} from "~/enumerate/constant/fireResourcePermission";
|
||||||
import { NS_FIRE_RESOURCE_STATS } from "~/enumerate/namespace";
|
import { NS_FIRE_RESOURCE_STATS } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function FireResourceStats(props) {
|
function FireResourceStats(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const canViewDetail = props.permission("xfzytj-jgd-detail");
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["fireResourceStatsList"], { form });
|
const { tableProps, getData } = useTable(props["fireResourceStatsList"], { form });
|
||||||
|
|
||||||
|
|
@ -24,9 +29,22 @@ function FireResourceStats(props) {
|
||||||
const corpId = record.corpId || record.companyId || "";
|
const corpId = record.corpId || record.companyId || "";
|
||||||
const backPath = `${props.location?.pathname || window.location.pathname}${props.location?.search || window.location.search || ""}`;
|
const backPath = `${props.location?.pathname || window.location.pathname}${props.location?.search || window.location.search || ""}`;
|
||||||
window.sessionStorage.setItem("supervisionFireResourceStatsBackPath", backPath);
|
window.sessionStorage.setItem("supervisionFireResourceStatsBackPath", backPath);
|
||||||
|
const searchParams = new URLSearchParams({
|
||||||
|
eqCorpId: corpId,
|
||||||
|
backPath,
|
||||||
|
});
|
||||||
|
const permissionConfig = FIRE_RESOURCE_SUPERVISION_PERMISSION_MAP[type] || {};
|
||||||
|
|
||||||
|
Object.entries(permissionConfig).forEach(([action, permissionKey]) => {
|
||||||
|
const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action];
|
||||||
|
if (queryKey && permissionKey) {
|
||||||
|
searchParams.set(queryKey, permissionKey);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
props.history.push({
|
props.history.push({
|
||||||
pathname: routeMap[type],
|
pathname: routeMap[type],
|
||||||
search: `?eqCorpId=${corpId}&backPath=${encodeURIComponent(backPath)}`,
|
search: `?${searchParams.toString()}`,
|
||||||
state: { backPath },
|
state: { backPath },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -47,6 +65,21 @@ function FireResourceStats(props) {
|
||||||
return <span style={{ color: "#1677ff", WebkitTextFillColor: "#1677ff" }}>0</span>;
|
return <span style={{ color: "#1677ff", WebkitTextFillColor: "#1677ff" }}>0</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!canViewDetail) {
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color: "#bfbfbf",
|
||||||
|
WebkitTextFillColor: "#bfbfbf",
|
||||||
|
fontWeight: 600,
|
||||||
|
cursor: "not-allowed",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{count}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
role="button"
|
role="button"
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,15 @@ import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import {
|
||||||
|
FIRE_RESOURCE_PERMISSION_QUERY_KEYS,
|
||||||
|
FIRE_RESOURCE_SUPERVISION_PERMISSION_MAP,
|
||||||
|
} from "~/enumerate/constant/fireResourcePermission";
|
||||||
import { NS_FIRE_RESOURCE_STATS } from "~/enumerate/namespace";
|
import { NS_FIRE_RESOURCE_STATS } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function FireResourceStats(props) {
|
function FireResourceStats(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const canViewDetail = props.permission("xfzytj-jgd-detail");
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["fireResourceStatsList"], { form });
|
const { tableProps, getData } = useTable(props["fireResourceStatsList"], { form });
|
||||||
|
|
||||||
|
|
@ -22,7 +27,17 @@ function FireResourceStats(props) {
|
||||||
|
|
||||||
if (routeMap[type]) {
|
if (routeMap[type]) {
|
||||||
const corpId = record.corpId || record.companyId || "";
|
const corpId = record.corpId || record.companyId || "";
|
||||||
props.history.push(`${routeMap[type]}?eqCorpId=${corpId}`);
|
const searchParams = new URLSearchParams({ eqCorpId: corpId });
|
||||||
|
const permissionConfig = FIRE_RESOURCE_SUPERVISION_PERMISSION_MAP[type] || {};
|
||||||
|
|
||||||
|
Object.entries(permissionConfig).forEach(([action, permissionKey]) => {
|
||||||
|
const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action];
|
||||||
|
if (queryKey && permissionKey) {
|
||||||
|
searchParams.set(queryKey, permissionKey);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
props.history.push(`${routeMap[type]}?${searchParams.toString()}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -41,6 +56,21 @@ function FireResourceStats(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!canViewDetail) {
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color: "#bfbfbf",
|
||||||
|
WebkitTextFillColor: "#bfbfbf",
|
||||||
|
fontWeight: 600,
|
||||||
|
cursor: "not-allowed",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{count}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
role="button"
|
role="button"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue