修改集团及基地图表样式

This commit is contained in:
2026-03-20 16:13:53 +08:00
parent 2465f89d26
commit bb66f97b95
257 changed files with 25365 additions and 6814 deletions

View File

@@ -17,10 +17,10 @@
<img v-else class="arrow" src="../../../assets/img/downArrow.png" alt="下降">
</div>
</div>
<div class="electricityGauge">
<!-- <div class="electricityGauge"> -->
<!-- 传递包含flag的factoryData给仪表盘组件 -->
<electricityGauge id="month" :detailData="factoryData"></electricityGauge>
</div>
<!-- <electricityGauge id="month" :detailData="factoryData"></electricityGauge> -->
<!-- </div> -->
</div>
<div class="line" style="padding: 0px;">
<!-- 传递包含flag的factoryData给柱状图组件 -->
@@ -106,18 +106,18 @@ export default {
* @param {number} rate 完成率原始值如89代表89%
* @returns {0|1} flag值
*/
getRateFlag(rate, real, target) {
if (isNaN(rate) || rate === null || rate === undefined) return 0;
getRateFlag(rate, real, target) {
if (isNaN(rate) || rate === null || rate === undefined) return 0;
// 1. 完成率 >= 100 => 达标
if (rate >= 100) return 1;
// 1. 完成率 >= 100 => 达标
if (rate >= 100) return 1;
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
if (rate === 0 && target === 0) return 1;
// 2. 完成率 = 0 且 (目标值=0 或 实际值=目标值=0) => 达标
if (rate === 0 && target === 0) return 1;
// 其他情况 => 未达标
return 0;
},
// 其他情况 => 未达标
return 0;
},
}
}
</script>
@@ -155,31 +155,27 @@ getRateFlag(rate, real, target) {
}
.number {
display: flex;
align-items: center;
gap: 6px;
height: 32px;
font-family: YouSheBiaoTiHei;
font-size: 32px;
font-size: 46px;
color: #0B58FF;
line-height: 32px;
letter-spacing: 2px;
text-align: center;
font-style: normal;
white-space: nowrap;
margin-top: 20px;
}
.mom {
width: fit-content; // 自适应宽度,避免文字溢出
height: 18px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 18px;
font-size: 20px;
color: #000000;
line-height: 18px;
letter-spacing: 1px;
display: flex;
align-items: center; // 箭头和文字垂直居中
gap: 4px; // 文字和箭头间距
z-index: 1000;
text-align: center;
font-style: normal;
margin-top: 20px;
}
// 箭头样式优化