1.优化
This commit is contained in:
2025-07-10 09:44:51 +08:00
parent b61ca7f567
commit 269e35d19b
4 changed files with 21 additions and 4 deletions
-1
View File
@@ -65,7 +65,6 @@
function initChart(chartData, total, color) { function initChart(chartData, total, color) {
let myChart = echarts.init(healthChart.value); let myChart = echarts.init(healthChart.value);
let options = circleRing(chartData, total, color); let options = circleRing(chartData, total, color);
console.log(options);
myChart.setOption(options); myChart.setOption(options);
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
myChart.resize(); myChart.resize();
+4 -1
View File
@@ -2,7 +2,10 @@
import { visibleChartLabel } from '/@/utils/utils.ts'; import { visibleChartLabel } from '/@/utils/utils.ts';
export function screenPie(chartData) { export function screenPie(chartData) {
const data = visibleChartLabel(chartData); const data = visibleChartLabel(chartData).map((item) => {
item = { ...item, label: { show: item.value > 0 }, labelLine: { show: item.value > 0 } };
return item;
});
return { return {
color: ['#B750BE', '#6C63F0', '#3AACFF', '#ED589D', '#FB466C'], color: ['#B750BE', '#6C63F0', '#3AACFF', '#ED589D', '#FB466C'],
tooltip: { tooltip: {
@@ -100,7 +100,6 @@
setValue(result); setValue(result);
// setSession(PAGE2_LEFT, JSON.stringify(result)); // setSession(PAGE2_LEFT, JSON.stringify(result));
} }
console.log(dataList.value);
} catch { } catch {
// const result = JSON.parse(getSession(PAGE2_LEFT)); // const result = JSON.parse(getSession(PAGE2_LEFT));
// setValue(result); // setValue(result);
@@ -113,8 +112,10 @@
data.forEach((item) => { data.forEach((item) => {
let resData = result.find((v) => v.type == item.type); let resData = result.find((v) => v.type == item.type);
item.userCount = resData.userCount; item.userCount = resData.userCount;
item.data.forEach((val) => { item.data = item.data.map((val) => {
val.value = resData[val.key]; val.value = resData[val.key];
val = { ...val, label: { show: val.value > 0 }, labelLine: { show: val.value > 0 } };
return val;
}); });
}); });
dataList.value = data; dataList.value = data;
+14
View File
@@ -509,6 +509,20 @@
margin-bottom: 10px; margin-bottom: 10px;
gap: 20px; gap: 20px;
> div {
position: relative;
&:before {
position: absolute;
top: 10px;
left: 10px;
background: #000001;
content: '';
width: 220px;
height: 100px;
z-index: -1;
}
}
> :nth-child(1) { > :nth-child(1) {
background: url('/@/assets/indexSun/footerBlue.png') no-repeat; background: url('/@/assets/indexSun/footerBlue.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;