This commit is contained in:
ljx
2025-09-12 22:20:33 +08:00
parent e1360a3f16
commit a71d861227
4 changed files with 7 additions and 5 deletions

View File

@ -205,7 +205,9 @@ const getProjectAttendanceCount = async () => {
try {
const res = await allAttendanceCount();
const { data, code } = res;
if (code === 0 && data) {
if (code === 200) {
console.log(data, 222222222);
// 直接使用接口返回的数据
attendanceCount.value = data.attendanceCount || 0;
attendanceRate.value = data.attendanceRate || 0;

View File

@ -90,7 +90,7 @@ export let barOption = {
trigger: 'axis',
// formatter: '{b0}{c0}万元',
formatter: (params: any) => {
console.log(params);
// console.log(params);
const projectName = params[0].name;
// params 是数组,对应每条柱子
// return params.map((p: any) => `${p.name} <br/> ${p.seriesName}${Number(p.value).toFixed(2)} MW`).join('<br/>');

View File

@ -155,7 +155,7 @@ const initPieChart = () => {
const getOutputData = async () => {
const res = await outpuProgress();
if (res.code == 200) {
designAreaData.value = res.data.map((item: any) => Number(item.plannedCapacity * item.progressPercentage));
designAreaData.value = res.data.map((item: any) => Number((item.plannedCapacity * item.progressPercentage) / 100));
transferAreaData.value = res.data.map((item: any) => Number(item.plannedCapacity));
barNames.value = res.data.map((item: any) => item.projectName);
initLineChart();