|
|
@@ -278,7 +278,7 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
</View>
|
|
|
|
|
|
{/* 性别分布 */}
|
|
|
- {false && (<View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
+ <View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
<Text className="font-semibold text-gray-700">性别分布</Text>
|
|
|
{isLoadingGender ? (
|
|
|
<Text className="text-gray-500 text-center py-4">加载中...</Text>
|
|
|
@@ -289,7 +289,7 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
<ColumnChart
|
|
|
canvasId="gender-chart"
|
|
|
width={650}
|
|
|
- height={200}
|
|
|
+ height={300}
|
|
|
categories={genderStats.map(s => s.key)}
|
|
|
series={[{
|
|
|
name: '人数',
|
|
|
@@ -297,14 +297,6 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
}]}
|
|
|
config={{
|
|
|
color: ['#3b82f6', '#ec4899'],
|
|
|
- fontSize: 11,
|
|
|
- dataLabel: true,
|
|
|
- xAxis: { disableGrid: true },
|
|
|
- yAxis: {}
|
|
|
- }}
|
|
|
- tooltipFormatter={(item: any, category: string) => {
|
|
|
- const statItem = genderStats.find(s => s.key === category)
|
|
|
- return `${category} ${item.data}人 (${statItem?.percentage || 0}%)`
|
|
|
}}
|
|
|
/>
|
|
|
</View>
|
|
|
@@ -312,10 +304,10 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
<Text className="text-gray-500 text-center py-4">暂无数据</Text>
|
|
|
)
|
|
|
})()}
|
|
|
- </View>)}
|
|
|
+ </View>
|
|
|
|
|
|
{/* 年龄分布 */}
|
|
|
- {false && (<View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
+ <View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
<Text className="font-semibold text-gray-700">年龄分布</Text>
|
|
|
{isLoadingAge ? (
|
|
|
<Text className="text-gray-500 text-center py-4">加载中...</Text>
|
|
|
@@ -345,10 +337,10 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
<Text className="text-gray-500 text-center py-4">暂无数据</Text>
|
|
|
)
|
|
|
})()}
|
|
|
- </View>)}
|
|
|
+ </View>
|
|
|
|
|
|
{/* 户籍省份分布 */}
|
|
|
- {false && <View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
+ <View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
<Text className="font-semibold text-gray-700">户籍省份分布</Text>
|
|
|
{isLoadingHousehold ? (
|
|
|
<Text className="text-gray-500 text-center py-4">加载中...</Text>
|
|
|
@@ -382,10 +374,10 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
return <Text className="text-gray-500 text-center py-4 mt-3">暂无数据</Text>
|
|
|
}
|
|
|
})()}
|
|
|
- </View>}
|
|
|
+ </View>
|
|
|
|
|
|
{/* 在职状态统计 */}
|
|
|
- {false && <View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
+ <View className="card bg-white p-4 mb-4 rounded-lg shadow-sm flex flex-col">
|
|
|
<Text className="font-semibold text-gray-700">在职状态统计</Text>
|
|
|
{isLoadingJobStatus ? (
|
|
|
<Text className="text-gray-500 text-center py-4">加载中...</Text>
|
|
|
@@ -417,10 +409,10 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
return <Text className="text-gray-500 text-center py-4 mt-3">暂无数据</Text>
|
|
|
}
|
|
|
})()}
|
|
|
- </View>}
|
|
|
+ </View>
|
|
|
|
|
|
{/* 薪资分布 */}
|
|
|
- {false && <View className="card bg-white p-4 rounded-lg shadow-sm flex flex-col">
|
|
|
+ <View className="card bg-white p-4 rounded-lg shadow-sm flex flex-col">
|
|
|
<Text className="font-semibold text-gray-700">薪资分布</Text>
|
|
|
{isLoadingSalary ? (
|
|
|
<Text className="text-gray-500 text-center py-4">加载中...</Text>
|
|
|
@@ -454,7 +446,7 @@ const Statistics: React.FC<StatisticsProps> = () => {
|
|
|
return <Text className="text-gray-500 text-center py-4 mt-3">暂无数据</Text>
|
|
|
}
|
|
|
})()}
|
|
|
- </View>}
|
|
|
+ </View>
|
|
|
|
|
|
</ScrollView>
|
|
|
</YongrenTabBarLayout>
|