feat: 界面优化
This commit is contained in:
parent
039f780bc5
commit
2884d8d4f4
|
|
@ -28,9 +28,12 @@
|
|||
<table class="score-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>项目碳排放量</th>
|
||||
<th>
|
||||
<div>项目碳排放量</div>
|
||||
<div style="font-size: 12px;">与基准线相比</div>
|
||||
</th>
|
||||
<th>企业分值区间</th>
|
||||
<th>企业/项目等级</th>
|
||||
<th>项目/企业等级</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -38,11 +41,11 @@
|
|||
v-for="(item, index) in tableData"
|
||||
:key="index"
|
||||
:class="['score-row', { 'current-row': item.isCurrent }]"
|
||||
:style="{ backgroundColor: item.color }"
|
||||
|
||||
>
|
||||
<td>{{ item.pf }}</td>
|
||||
<td>{{ item.score }}</td>
|
||||
<td>{{ item.level }}</td>
|
||||
<td :style="{ color: item.color, fontWeight: 'bold' }">{{ item.pf }}</td>
|
||||
<td :style="{ color: item.color, fontWeight: 'bold' }">{{ item.score }}</td>
|
||||
<td :style="{ color: item.color, fontWeight: 'bold' }">{{ item.level }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -162,7 +165,7 @@ const tableData = computed(() => [
|
|||
isCurrent: currentScore.value >= 30 && currentScore.value < 60
|
||||
},
|
||||
{
|
||||
pf: "高于",
|
||||
pf: "高于基准线",
|
||||
score: "0~29",
|
||||
level: "较差",
|
||||
color: "rgba(244, 67, 54, 0.7)",
|
||||
|
|
@ -242,7 +245,7 @@ const updateRadarData = () => {
|
|||
// 生成随机数据,但保持在合理范围内
|
||||
const newData = currentData.value.map((value, index) => {
|
||||
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);
|
||||
|
||||
// 确保不超过最大值
|
||||
|
|
@ -311,11 +314,12 @@ onUnmounted(() => {
|
|||
|
||||
/* 表头样式 */
|
||||
.score-table thead {
|
||||
background-color: #333;
|
||||
background-color: #f7f6f6;
|
||||
}
|
||||
|
||||
.score-table th {
|
||||
color: #fff;
|
||||
/* color: #fff; */
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
padding: 12px 16px;
|
||||
text-align: center;
|
||||
|
|
@ -325,6 +329,7 @@ onUnmounted(() => {
|
|||
/* 表格行样式 */
|
||||
.score-table tbody tr {
|
||||
transition: all 0.3s ease;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.score-table td {
|
||||
|
|
|
|||
Loading…
Reference in New Issue