歷史資料: 按鈕說明不換行、暫時移除table loadind | 能源管理: sankey的分支顏色明顯
This commit is contained in:
parent
ac867d368c
commit
eee56c4273
@ -39,7 +39,7 @@ const chartOption = {
|
||||
borderWidth: 0,
|
||||
},
|
||||
lineStyle: {
|
||||
color: "target",
|
||||
color: 'gradient',
|
||||
opacity: 0.7,
|
||||
curveness: 0.5,
|
||||
},
|
||||
@ -64,15 +64,21 @@ const loadData = async () => {
|
||||
];
|
||||
|
||||
// 構造 links 連結
|
||||
const links = rawData.map((item) => ({
|
||||
const links = rawData.map((item, index) => ({
|
||||
source: "Total",
|
||||
target: item.key,
|
||||
value: item.value,
|
||||
percentage: item.percentage,
|
||||
}));
|
||||
|
||||
const colors = ["#45f4ef", "#f5d54e", "#63ed84", "#5a5cac", "#ff5e5e", "#e266fe"];
|
||||
// 更新 chartOption
|
||||
chartOption.series[0].data = data;
|
||||
chartOption.series[0].data = data.map((item, index) => ({
|
||||
...item,
|
||||
itemStyle: {
|
||||
color: colors[index % colors.length], // 節點顏色
|
||||
},
|
||||
}));
|
||||
chartOption.series[0].links = links;
|
||||
|
||||
// 初始化圖表
|
||||
|
@ -160,7 +160,7 @@ onBeforeMount(() => {
|
||||
<div class="flex flex-col custom-border p-4 mb-4">
|
||||
<!-- <HistoryFavoriteOption class="mb-4" />-->
|
||||
<div class="flex items-center gap-4 mb-4">
|
||||
<h2 class="text-lg font-bold ps-2">
|
||||
<h2 class="text-lg font-bold ps-2 whitespace-nowrap">
|
||||
{{ $t("history.system_category") }} :
|
||||
</h2>
|
||||
<ButtonGroup
|
||||
@ -174,7 +174,7 @@ onBeforeMount(() => {
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-4 mb-4">
|
||||
<h2 class="text-lg font-bold ps-2">
|
||||
<h2 class="text-lg font-bold ps-2 whitespace-nowrap">
|
||||
{{ $t("history.device_category") }} :
|
||||
</h2>
|
||||
<ButtonGroup
|
||||
@ -188,7 +188,9 @@ onBeforeMount(() => {
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-4 mb-4">
|
||||
<h2 class="text-lg font-bold ps-2">{{ $t("history.point") }} :</h2>
|
||||
<h2 class="text-lg font-bold ps-2 whitespace-nowrap">
|
||||
{{ $t("history.point") }} :
|
||||
</h2>
|
||||
<ButtonGroup
|
||||
v-if="searchParams?.Device_list"
|
||||
:items="points"
|
||||
|
@ -39,7 +39,7 @@ const { tableData, loading } = inject("history_table_data");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Table :loading="loading" :columns="columns" :dataSource="tableData"></Table>
|
||||
<Table :columns="columns" :dataSource="tableData"></Table>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
Loading…
Reference in New Issue
Block a user