仪表板组件支持拖动排序

This commit is contained in:
jxxghp
2024-05-09 14:45:12 +08:00
parent 74e96980e6
commit 2065992b17
18 changed files with 437 additions and 464 deletions

View File

@@ -80,8 +80,7 @@ const options = controlledComputed(
fontSize: '12px',
},
formatter: (value: number) =>
value > 999 ? (value / 1000).toFixed(0) : value,
formatter: (value: number) => (value > 999 ? (value / 1000).toFixed(0) : value),
},
},
}
@@ -100,8 +99,7 @@ async function getWeeklyData() {
const res: number[] = await api.get('dashboard/transfer')
series.value = [{ data: res }]
}
catch (e) {
} catch (e) {
console.log(e)
}
}
@@ -114,16 +112,11 @@ onMounted(() => {
<template>
<VCard>
<VCardItem>
<VCardTitle>最近入库</VCardTitle>
<VCardTitle class="cursor-move">最近入库</VCardTitle>
</VCardItem>
<VCardText>
<VueApexCharts
type="bar"
:options="options"
:series="series"
:height="160"
/>
<VueApexCharts type="bar" :options="options" :series="series" :height="160" />
<div class="d-flex align-center mb-3">
<h5 class="text-h5 me-4">
@@ -132,13 +125,7 @@ onMounted(() => {
<p>最近一周入库了 {{ totalCount }} 部影片 😎</p>
</div>
<VBtn
v-if="superUser"
block
to="/history"
>
查看详情
</VBtn>
<VBtn v-if="superUser" block to="/history"> 查看详情 </VBtn>
</VCardText>
</VCard>
</template>