feat: 界面优化

This commit is contained in:
caoqianming 2025-11-13 09:25:02 +08:00
parent 039f780bc5
commit 2884d8d4f4
1 changed files with 15 additions and 10 deletions

View File

@ -28,9 +28,12 @@
<table class="score-table"> <table class="score-table">
<thead> <thead>
<tr> <tr>
<th>项目碳排放量</th> <th>
<div>项目碳排放量</div>
<div style="font-size: 12px;">与基准线相比</div>
</th>
<th>企业分值区间</th> <th>企业分值区间</th>
<th>企业/项目等级</th> <th>项目/企业等级</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -38,11 +41,11 @@
v-for="(item, index) in tableData" v-for="(item, index) in tableData"
:key="index" :key="index"
:class="['score-row', { 'current-row': item.isCurrent }]" :class="['score-row', { 'current-row': item.isCurrent }]"
:style="{ backgroundColor: item.color }"
> >
<td>{{ item.pf }}</td> <td :style="{ color: item.color, fontWeight: 'bold' }">{{ item.pf }}</td>
<td>{{ item.score }}</td> <td :style="{ color: item.color, fontWeight: 'bold' }">{{ item.score }}</td>
<td>{{ item.level }}</td> <td :style="{ color: item.color, fontWeight: 'bold' }">{{ item.level }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -162,7 +165,7 @@ const tableData = computed(() => [
isCurrent: currentScore.value >= 30 && currentScore.value < 60 isCurrent: currentScore.value >= 30 && currentScore.value < 60
}, },
{ {
pf: "高于", pf: "高于基准线",
score: "0~29", score: "0~29",
level: "较差", level: "较差",
color: "rgba(244, 67, 54, 0.7)", color: "rgba(244, 67, 54, 0.7)",
@ -242,7 +245,7 @@ const updateRadarData = () => {
// //
const newData = currentData.value.map((value, index) => { const newData = currentData.value.map((value, index) => {
const maxValue = option.value.radar.indicator[index].max; const maxValue = option.value.radar.indicator[index].max;
const fluctuation = (Math.random() - 0.5) * 0.4; // -20% +20% const fluctuation = (Math.random() - 0.5) * 0.3; // -20% +20%
let newValue = value * (1 + fluctuation); let newValue = value * (1 + fluctuation);
// //
@ -311,11 +314,12 @@ onUnmounted(() => {
/* 表头样式 */ /* 表头样式 */
.score-table thead { .score-table thead {
background-color: #333; background-color: #f7f6f6;
} }
.score-table th { .score-table th {
color: #fff; /* color: #fff; */
color: black;
font-weight: bold; font-weight: bold;
padding: 12px 16px; padding: 12px 16px;
text-align: center; text-align: center;
@ -325,6 +329,7 @@ onUnmounted(() => {
/* 表格行样式 */ /* 表格行样式 */
.score-table tbody tr { .score-table tbody tr {
transition: all 0.3s ease; transition: all 0.3s ease;
background-color: white;
} }
.score-table td { .score-table td {