Compare commits

..

2 Commits

6 changed files with 465 additions and 446 deletions

View File

@ -1,16 +0,0 @@
import {
https
} from '@/utils/http.js';
/*
这是后端系统通用的系统类的基础性的api路径后续的大家分类建js存放
*/
export function initDictOption(dictCode) { // 获取部门所有人员信息
return https({
url: ' /sys/dict/getDictItems',
method: 'get',
data: dictCode
})
}

4
package-lock.json generated
View File

@ -19,7 +19,7 @@
}, },
"node_modules/base-64": { "node_modules/base-64": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
}, },
"node_modules/dayjs": { "node_modules/dayjs": {
@ -61,7 +61,7 @@
}, },
"base-64": { "base-64": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
}, },
"dayjs": { "dayjs": {

View File

@ -20,23 +20,23 @@
</template> </template>
<script setup> <script setup>
function toTaizhang() { function toTaizhang() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/views/renliziyuan/renyuanxinxi/taizhang' url: '/pages/views/renliziyuan/renyuanxinxi/taizhang'
}); });
} }
function toTongji() { function toTongji() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/views/renliziyuan/renyuanxinxi/tongji' url: '/pages/views/renliziyuan/renyuanxinxi/tongji'
}); });
} }
function toQtTongji() { function toQtTongji() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/views/renliziyuan/renyuanxinxi/qttongji' url: '/pages/views/renliziyuan/renyuanxinxi/qttongji'
}); });
} }
</script> </script>
<style></style> <style></style>

View File

@ -85,6 +85,7 @@
import { ref, reactive, onMounted, computed } from 'vue'; import { ref, reactive, onMounted, computed } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { cxcRyDatAstatistics, cxcRyDatAstatisticsDetails } from '@/api/renyuan.js'; import { cxcRyDatAstatistics, cxcRyDatAstatisticsDetails } from '@/api/renyuan.js';
import { initDictOption } from '@/api/common.js';
// tableData // tableData
const bottomHeight = ref(0); const bottomHeight = ref(0);
@ -756,7 +757,7 @@ const onChartClick = (e) => {
/* 图表容器 */ /* 图表容器 */
.chart-container { .chart-container {
height: 250px; height: 200px;
margin: 20rpx 0; margin: 20rpx 0;
border-radius: 24rpx; border-radius: 24rpx;
overflow: hidden; overflow: hidden;
@ -849,9 +850,14 @@ scroll-view {
/* 响应式调整优化 */ /* 响应式调整优化 */
@media (max-width: 768px) { @media (max-width: 768px) {
.chart-container { .chart-container {
height: 250px; height: 200px;
border-radius: 20rpx; border-radius: 20rpx;
} }
.titleStyle {
font-size: 26rpx;
padding: 24rpx 0;
}
} }
/* 数据行高亮效果 */ /* 数据行高亮效果 */

View File

@ -1,17 +1,18 @@
<template> <template>
<view> <view>
<view class="container" id="top1"> <view class="container" id="top1">
<uni-row style="margin-bottom: 10rpx; margin-left: 30rpx; margin-right: 30rpx"> <uni-row style="margin-bottom: 10rpx;margin-left: 30rpx;margin-right: 30rpx;">
<uni-col :span="24"><uni-title :title="'所选单位'" align="left" type="h4"></uni-title></uni-col> <uni-col :span="24"><uni-title :title="'所选单位ID:'+orgCode" align="left" type="h4"></uni-title></uni-col>
</uni-row> </uni-row>
<uni-row style="margin-bottom: 20rpx; margin-left: 30rpx; margin-right: 30rpx"> <uni-row style="margin-bottom: 20rpx;margin-left: 30rpx;margin-right: 30rpx;">
<uni-col :span="24"> <uni-col :span="24">
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode" @change="departChange"></trq-depart-select> <trq-depart-select v-model="orgCode" returnCodeOrID="orgCode"
@change="departChange"></trq-depart-select>
</uni-col> </uni-col>
</uni-row> </uni-row>
<!-- 概览统计 --> <!-- 概览统计 -->
<view class="stats-box" v-if="summary.total"> <view class="stats-box" v-if="summary.total">
<view class="stat-item"> <view class=" stat-item">
<text class="label">总人数</text> <text class="label">总人数</text>
<text class="value">{{ summary.total }}</text> <text class="value">{{ summary.total }}</text>
</view> </view>
@ -26,47 +27,56 @@
<l-echart ref="chart" @finished="initChart" /> <l-echart ref="chart" @finished="initChart" />
</view> </view>
<!-- 数据表格 --> <!-- 数据表格 -->
<uni-row style="margin-top: 10px; margin-left: 30rpx; margin-right: 30rpx" v-if="tableData.length > 0"> <uni-row style="margin-top: 10px; margin-left: 30rpx;margin-right: 30rpx;" v-if="tableData.length>0">
<uni-col :span="3"> <uni-col :span="3">
<view class="titleStyle">序号</view> <view class="titleStyle">
序号
</view>
</uni-col> </uni-col>
<uni-col :span="5"> <uni-col :span="5">
<view class="titleStyle">姓名</view> <view class="titleStyle">
姓名
</view>
</uni-col> </uni-col>
<uni-col :span="5"> <uni-col :span="5">
<view class="titleStyle">性别</view> <view class="titleStyle">
性别
</view>
</uni-col> </uni-col>
<uni-col :span="5"> <uni-col :span="5">
<view class="titleStyle">年龄</view> <view class="titleStyle">
年龄
</view>
</uni-col> </uni-col>
<uni-col :span="6"> <uni-col :span="6">
<view class="titleStyle">操作</view> <view class="titleStyle">
操作
</view>
</uni-col> </uni-col>
</uni-row> </uni-row>
<scroll-view scroll-y :style="{ height: bottomHeight + 'px' }"> <scroll-view scroll-y :style="{height: bottomHeight + 'px' }">
<uni-row style="margin-bottom: 10rpx; margin-left: 30rpx; margin-right: 30rpx"> <uni-row style="margin-bottom: 10rpx;margin-left: 30rpx;margin-right: 30rpx;">
<view v-for="(item, index) in tableData"> <view v-for="(item,index) in tableData">
<uni-col :span="3"> <uni-col :span="3">
<view class="dataStyle"> <view class="dataStyle">
{{ index + 1 }} {{index+1}}
</view> </view>
</uni-col> </uni-col>
<uni-col :span="5"> <uni-col :span="5">
<view class="dataStyle"> <view class="dataStyle">
{{ item.xm }} {{item.xm}}
</view> </view>
</uni-col> </uni-col><uni-col :span="5">
<uni-col :span="5">
<view class="dataStyle"> <view class="dataStyle">
{{ item.xb_dictText }} {{item.xb_dictText}}
</view> </view>
</uni-col> </uni-col><uni-col :span="5">
<uni-col :span="5">
<view class="dataStyle"> <view class="dataStyle">
{{ item.nl }} {{item.nl}}
</view> </view>
</uni-col> </uni-col>
<uni-col :span="6"> <uni-col :span="6">
@ -74,297 +84,310 @@
<button size="mini" type="primary" @click="detail(item)">详情</button> <button size="mini" type="primary" @click="detail(item)">详情</button>
</view> </view>
</uni-col> </uni-col>
</view> </view>
</uni-row> </uni-row>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted } from 'vue'; import {
import * as echarts from 'echarts'; ref,
reactive,
onMounted
} from 'vue';
import * as echarts from 'echarts'
import { queryRenyuanByDepartID } from '@/api/renyuan.js'; import {
queryRenyuanByDepartID
} from '@/api/renyuan.js'
// //
const bottomHeight = ref(0); const bottomHeight = ref(0);
// //
const isLoading = ref(false); const isLoading = ref(false);
const orgCode = ref(''); const orgCode = ref('');
const rawData = ref([]); const rawData = ref([]);
const tableData = ref([]); const tableData = ref([]);
const summary = reactive({ const summary = reactive({
total: 0, total: 0,
avgAge: 0 avgAge: 0
});
const chart = ref(null);
const chartOption = ref({});
const drillPopup = ref(null);
const drillList = ref([]);
const drillTitle = ref('');
function detail(record) {
// console.log(record)
uni.navigateTo({
url: '/pages/views/renliziyuan/renyuanxinxi/detail?data=' + encodeURIComponent(JSON.stringify(record))
}); });
} const chart = ref(null);
// initChart const chartOption = ref({});
const calculateAge = (birthDate) => { const drillPopup = ref(null);
const today = new Date(); const drillList = ref([]);
const birth = new Date(birthDate); const drillTitle = ref('');
let age = today.getFullYear() - birth.getFullYear();
const monthDiff = today.getMonth() - birth.getMonth(); function detail(record) {
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) { // console.log(record)
age--; uni.navigateTo({
url: "/pages/views/renliziyuan/renyuanxinxi/detail?data=" + encodeURIComponent(JSON.stringify(record))
})
} }
return age; // initChart
}; const calculateAge = (birthDate) => {
// const today = new Date();
const departChange = async (e, data) => { const birth = new Date(birthDate);
tableData.value = []; let age = today.getFullYear() - birth.getFullYear();
console.log(e); const monthDiff = today.getMonth() - birth.getMonth();
orgCode.value = e; if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
try { age--;
//
isLoading.value = true;
if (orgCode.value.length <= 6) {
console.log(123242353);
uni.showToast({
title: '全厂数据较多,请选 下一层级...',
icon: 'none',
duration: 1000
});
isLoading.value = false;
return;
} else {
uni.showLoading({
title: '数据加载中...',
mask: true
});
} }
return age;
};
//
const departChange = async (e, data) => {
let params = { tableData.value = []
pageSize: 3000, console.log(e)
fields: ['xm', 'nl', 'xb', 'xb_dictText', 'orgCode', 'jcdw', 'jcxd', 'jcxdCode'] orgCode.value = e;
}; try {
if (orgCode.value.length <= 9) { //
params.orgCode = orgCode.value;
} else { isLoading.value = true;
params.jcxd_code = orgCode.value; if (orgCode.value.length <= 6) {
}
queryRenyuanByDepartID(params) console.log(123242353)
.then((res) => { uni.showLoading({
title: '全厂数据较多,耐心等待数据加载中...',
mask: true
});
} else {
uni.showLoading({
title: '数据加载中...',
mask: true
});
}
let params = {
pageSize: 3000,
fields: ['xm', 'nl', 'xb', 'xb_dictText', 'orgCode', 'jcdw', 'jcxd', 'jcxdCode']
};
if (orgCode.value.length <= 9) {
params.orgCode = orgCode.value
} else {
params.jcxd_code = orgCode.value
}
queryRenyuanByDepartID(params).then((res) => {
if (res.success) { if (res.success) {
processData(res.result.records); processData(res.result.records);
// //
isLoading.value = false; isLoading.value = false;
uni.hideLoading(); uni.hideLoading();
} }
}) }).catch((err) => {
.catch((err) => { console.log(err)
console.log(err);
uni.showToast({ uni.showToast({
title: '数据加载失败', title: '数据加载失败',
icon: 'none', icon: 'none'
duration: 1000
}); });
}); })
} catch (error) {
console.log(error);
uni.showToast({
title: '数据加载失败',
icon: 'none',
duration: 1000
});
} finally {
//
isLoading.value = false;
uni.hideLoading();
}
};
//
const processData = (data) => { } catch (error) {
// console.log(error)
const validData = data uni.showToast({
.map((item) => ({ title: '数据加载失败',
icon: 'none'
});
} finally {
//
isLoading.value = false;
uni.hideLoading();
}
};
//
const processData = (data) => {
//
const validData = data.map(item => ({
...item, ...item,
nl: calculateAge(item.cssj) nl: calculateAge(item.cssj)
})).filter(item => item.nl >= 21 && item.nl <= 64);
//
summary.total = validData.length;
summary.avgAge = validData.reduce((sum, cur) => sum + cur.nl, 0) / summary.total || 0;
//
// tableData.value = validData;
groupsData(validData);
//
generateChartData(validData);
};
// ...
const subOrgStaffs = ref({}); //
const ageGroupStaffs = ref({}); //
const groupsData = (data) => {
//
subOrgStaffs.value = {};
ageGroupStaffs.value = {};
data.reduce((acc, cur) => {
// console.log(cur)
let subOrg = "";
let ageRange = getAgeRange(cur.nl);
// console.log(cur.orgCode, cur.jcxdCode)
if (cur.orgCode <= 6) {
subOrg = cur.orgCode
} else {
subOrg = cur.jcxdCode
}
// subOrgStaffs
if (!subOrgStaffs.value[subOrg]) {
subOrgStaffs.value[subOrg] = [];
}
subOrgStaffs.value[subOrg].push(cur);
// ageGroupStaffs
if (!ageGroupStaffs.value[ageRange]) {
ageGroupStaffs.value[ageRange] = [];
}
ageGroupStaffs.value[ageRange].push(cur);
})
}
//
const getAgeRange = (age) => {
const ranges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
const index = Math.floor((age - 21) / 10);
return ranges[index] || '其他';
};
//
const showStaffList = (subOrg, ageRange) => {
//
const targetStaffs = subOrgStaffs.value[subOrg].filter(staff =>
getAgeRange(staff.nl) === ageRange
);
staffList.value = targetStaffs;
popupTitle.value = `${subOrg} ${ageRange}人员列表(共${targetStaffs.length}人)`;
popup.value.open();
};
//
const getSubOrgStaffs = (subOrgCode) => {
return subOrgStaffs.value[subOrgCode] || [];
};
//
const getAgeGroupStaffs = (ageRange) => {
return ageGroupStaffs.value[ageRange] || [];
};
//
const generateChartData = (data) => {
//
const ageRanges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
const jcdwGroups = data.reduce((acc, cur) => {
if (!acc[cur.jcdw]) {
acc[cur.jcdw] = {
ageGroups: [0, 0, 0, 0, 0] // 21-30,31-40,41-50,51-60,61-64
};
}
const ageGroup = Math.floor((cur.nl - 21) / 10);
// console.log(ageGroup, cur.jcdw)
if (ageGroup >= 0 && ageGroup <= 4) {
acc[cur.jcdw].ageGroups[ageGroup]++;
}
return acc;
}, {});
//
const xData = Object.keys(jcdwGroups);
const seriesData = ageRanges.map((range, index) => ({
name: range,
type: 'bar',
data: xData.map(jcdw => jcdwGroups[jcdw].ageGroups[index] || 0),
itemStyle: {
color: ['#5470C6', '#91CC75', '#FAC858', '#EE6666', '#73C0DE'][index]
},
//
label: {
show: true,
position: 'top'
},
// 20
// barWidth: 20
})) }))
.filter((item) => item.nl >= 21 && item.nl <= 64); chartOption.value = {
// title: {
summary.total = validData.length; text: '人员年龄分组统计',
summary.avgAge = validData.reduce((sum, cur) => sum + cur.nl, 0) / summary.total || 0; padding: [0, 0, 0, 30],
// },
// tableData.value = validData; toolbox: {
padding: [0, 30, 0, 0],
show: true,
feature: {
//
groupsData(validData); restore: {
// show: true //
generateChartData(validData); },
}; saveAsImage: {
show: true //
// ... }
const subOrgStaffs = ref({}); //
const ageGroupStaffs = ref({}); //
const groupsData = (data) => {
//
subOrgStaffs.value = {};
ageGroupStaffs.value = {};
data.reduce((acc, cur) => {
// console.log(cur)
let subOrg = '';
let ageRange = getAgeRange(cur.nl);
// console.log(cur.orgCode, cur.jcxdCode)
if (cur.orgCode <= 6) {
subOrg = cur.orgCode;
} else {
subOrg = cur.jcxdCode;
}
// subOrgStaffs
if (!subOrgStaffs.value[subOrg]) {
subOrgStaffs.value[subOrg] = [];
}
subOrgStaffs.value[subOrg].push(cur);
// ageGroupStaffs
if (!ageGroupStaffs.value[ageRange]) {
ageGroupStaffs.value[ageRange] = [];
}
ageGroupStaffs.value[ageRange].push(cur);
});
};
//
const getAgeRange = (age) => {
const ranges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
const index = Math.floor((age - 21) / 10);
return ranges[index] || '其他';
};
//
const showStaffList = (subOrg, ageRange) => {
//
const targetStaffs = subOrgStaffs.value[subOrg].filter((staff) => getAgeRange(staff.nl) === ageRange);
staffList.value = targetStaffs;
popupTitle.value = `${subOrg} ${ageRange}人员列表(共${targetStaffs.length}人)`;
popup.value.open();
};
//
const getSubOrgStaffs = (subOrgCode) => {
return subOrgStaffs.value[subOrgCode] || [];
};
//
const getAgeGroupStaffs = (ageRange) => {
return ageGroupStaffs.value[ageRange] || [];
};
//
const generateChartData = (data) => {
//
const ageRanges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
const jcdwGroups = data.reduce((acc, cur) => {
if (!acc[cur.jcdw]) {
acc[cur.jcdw] = {
ageGroups: [0, 0, 0, 0, 0] // 21-30,31-40,41-50,51-60,61-64
};
}
const ageGroup = Math.floor((cur.nl - 21) / 10);
// console.log(ageGroup, cur.jcdw)
if (ageGroup >= 0 && ageGroup <= 4) {
acc[cur.jcdw].ageGroups[ageGroup]++;
}
return acc;
}, {});
//
const xData = Object.keys(jcdwGroups);
const seriesData = ageRanges.map((range, index) => ({
name: range,
type: 'bar',
data: xData.map((jcdw) => jcdwGroups[jcdw].ageGroups[index] || 0),
itemStyle: {
color: ['#5470C6', '#91CC75', '#FAC858', '#EE6666', '#73C0DE'][index]
},
//
label: {
show: true,
position: 'top'
}
// 20
// barWidth: 20
}));
chartOption.value = {
title: {
text: '人员年龄分组统计',
padding: [0, 0, 0, 30]
},
toolbox: {
padding: [0, 30, 0, 0],
show: true,
feature: {
//
restore: {
show: true //
},
saveAsImage: {
show: true //
} }
}
},
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// type: 'shadow',
// label: {
// show: false
// }
// }
// },
grid: {
top: '15%',
left: '4%',
right: '4%',
bottom: '10%',
containLabel: true
},
legend: {
data: ageRanges,
itemGap: 5,
padding: [0, 15, 0, 15],
y: 'bottom',
itemHeight: 8, //
itemWidth: 8, //
type: 'scroll'
},
xAxis: {
type: 'category',
data: xData,
axisLabel: {
color: '#7F84B5',
fontWeight: 300,
interval: 0,
rotate: 0
}, },
padding: [0, 10, 0, 10], // tooltip: {
axisTick: { // trigger: 'axis',
show: false //线 // axisPointer: {
// type: 'shadow',
// label: {
// show: false
// }
// }
// },
grid: {
top: '15%',
left: '4%',
right: '4%',
bottom: '10%',
containLabel: true
}, },
axisLine: { legend: {
show: false //线 data: ageRanges,
} itemGap: 5,
}, padding: [0, 15, 0, 15],
yAxis: [ y: 'bottom',
{ itemHeight: 8, //
itemWidth: 8, //
type: 'scroll'
},
xAxis: {
type: 'category',
data: xData,
axisLabel: {
color: '#7F84B5',
fontWeight: 300,
interval: 0,
rotate: 0,
},
padding: [0, 10, 0, 10],
axisTick: {
show: false //线
},
axisLine: {
show: false //线
}
},
yAxis: [{
show: true, show: true,
boundaryGap: false, //线 boundaryGap: false, //线
type: 'value', type: 'value',
@ -388,147 +411,153 @@ const generateChartData = (data) => {
axisLine: { axisLine: {
show: false //线 show: false //线
} }
} }],
],
series: seriesData,
};
//
setTimeout(async () => {
if (!chart.value) return
const myChart = await chart.value.init(echarts)
myChart.setOption(chartOption.value)
myChart.on('click', (params) => {
console.log(params.seriesName)
tableData.value = getAgeGroupStaffs(params.seriesName)
})
}, 300)
// #ifdef APP
getHeight();
// #endif
series: seriesData
}; };
onMounted(() => {
// #ifdef APP
getHeight();
// #endif
})
// #ifdef APP
const getHeight = () => {
//
const systemInfo = uni.getSystemInfoSync();
const screenHeight = systemInfo.screenHeight;
//
const query = uni.createSelectorQuery();
//
query
.select('#top1')
.boundingClientRect((rect1) => {
//
const topComponentsHeight = rect1.height
//
bottomHeight.value = screenHeight - topComponentsHeight - 415;
})
.exec();
};
// #endif
// //
setTimeout(async () => { const initChart = () => {
if (!chart.value) return; setTimeout(async () => {
const myChart = await chart.value.init(echarts); if (!chart.value) return
myChart.setOption(chartOption.value); const myChart = await chart.value.init(echarts)
myChart.on('click', (params) => { myChart.setOption(chartOption.value)
console.log(params.seriesName); }, 300)
tableData.value = getAgeGroupStaffs(params.seriesName); };
});
}, 300);
// #ifdef APP
getHeight();
// #endif
};
onMounted(() => {
// #ifdef APP
getHeight();
// #endif
});
// #ifdef APP
const getHeight = () => {
//
const systemInfo = uni.getSystemInfoSync();
const screenHeight = systemInfo.screenHeight;
//
const query = uni.createSelectorQuery();
//
query
.select('#top1')
.boundingClientRect((rect1) => {
//
const topComponentsHeight = rect1.height;
//
bottomHeight.value = screenHeight - topComponentsHeight - 415;
})
.exec();
};
// #endif
//
const initChart = () => {
setTimeout(async () => {
if (!chart.value) return;
const myChart = await chart.value.init(echarts);
myChart.setOption(chartOption.value);
}, 300);
};
</script> </script>
<style scoped> <style scoped>
.container { .container {
margin: 20, 20, 20, 20rpx; margin: 20, 20, 20, 20rpx;
} }
.input-group { .input-group {
display: flex; display: flex;
gap: 20rpx; gap: 20rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.input { .input {
flex: 1; flex: 1;
border: 1rpx solid #ddd; border: 1rpx solid #ddd;
padding: 15rpx; padding: 15rpx;
border-radius: 8rpx; border-radius: 8rpx;
} }
.query-btn { .query-btn {
background: #007aff; background: #007AFF;
color: white; color: white;
padding: 0 40rpx; padding: 0 40rpx;
border-radius: 8rpx; border-radius: 8rpx;
} }
.stats-box { .stats-box {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin: 30rpx 0; margin: 30rpx 0;
padding: 20rpx; padding: 20rpx;
background: #f8f8f8; background: #f8f8f8;
border-radius: 12rpx; border-radius: 12rpx;
} }
.stat-item { .stat-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.label { .label {
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
} }
.value { .value {
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #0000ff; color: #0000ff;
} }
.chart-container { .chart-container {
height: 400rpx; height: 400rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.titleStyle { .titleStyle {
font-size: 12px; font-size: 12px;
color: #747474; color: #747474;
line-height: 30px; line-height: 30px;
height: 30px; height: 30px;
background: #f2f9fc; background: #F2F9FC;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
border-left: 1px solid #919191; border-left: 1px solid #919191;
border-bottom: 1px solid #919191; border-bottom: 1px solid #919191;
} ;
}
/* 内容样式 */ /* 内容样式 */
.dataStyle { .dataStyle {
max-font-size: 14px; max-font-size: 14px;
/* 最大字体限制 */ /* 最大字体限制 */
min-font-size: 10px; min-font-size: 10px;
/* 最小字体限制 */ /* 最小字体限制 */
font-size: 12px; font-size: 12px;
color: #00007f; color: #00007f;
line-height: 30px; line-height: 30px;
height: 30px; height: 30px;
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
border-bottom: 1px solid #919191; border-bottom: 1px solid #919191;
border-left: 1px solid #919191; border-left: 1px solid #919191;
text-overflow: ellipsis; text-overflow: ellipsis;
}
}
</style> </style>