- {kpiItems.map(item => (
-
-
{item.name}
-
{item.value}%
-
同比 ↗ {item.yoy}%
+ {(loading ? kpiSkeleton : kpiItems).map((item, index) => (
+
+
{loading ? : item.name}
+
{loading ? : `${item.value}%`}
+
{loading ? : `同比 ↗ ${item.yoy}%`}
))}
@@ -295,7 +279,7 @@ function KpiCards({ data }) {
}
// ==================== 地图区域分布 ====================
-function MapSection({ data }) {
+function MapSection({ data, loading }) {
const [selectedAreaName, setSelectedAreaName] = useState('重庆市');
const zoomRef = useRef(1.1);
const chartInstanceRef = useRef(null);
@@ -443,11 +427,15 @@ function MapSection({ data }) {
return (
- {mapScatterPoints.map((item, index) =>
{item.name}正在开展评价项目数:{item.value}
)}
+ {!loading && mapScatterPoints.map((item, index) =>
{item.name}正在开展评价项目数:{item.value}
)}
{selectedArea.name}
- 项目数:{selectedArea.evalProjectCount}
- 备案机构数:{selectedArea.filingOrgCount}
+ {loading
+ ? <>>
+ : <>
+ 项目数:{selectedArea.evalProjectCount}
+ 备案机构数:{selectedArea.filingOrgCount}
+ >}
@@ -455,15 +443,21 @@ function MapSection({ data }) {
}
// ==================== 执业全过程管控 ====================
-function TodoPanel({ data }) {
+function TodoPanel({ data, loading }) {
const { processNodes } = data;
+ const skeletonNodes = Array.from({ length: 9 });
return (
- {processNodes.map((item, index) => {
- const Icon = iconMap[index] || FileDoneOutlined;
- return
{item.nodeName}
{item.pendingCount};
- })}
+ {loading
+ ? skeletonNodes.map((_, index) => {
+ const Icon = iconMap[index] || FileDoneOutlined;
+ return
;
+ })
+ : processNodes.map((item, index) => {
+ const Icon = iconMap[index] || FileDoneOutlined;
+ return
{item.nodeName}
{item.pendingCount};
+ })}
);
@@ -476,7 +470,7 @@ const PERIOD_TABS = [
{ key: 'month', label: '月' },
];
-function ReviewLinePanel({ data, period, onPeriodChange }) {
+function ReviewLinePanel({ data, period, onPeriodChange, loading }) {
const { trendBuckets, trendSeries } = data;
const lineOption = useMemo(() => {
@@ -510,13 +504,13 @@ function ReviewLinePanel({ data, period, onPeriodChange }) {
>{tab.label}
))}
-