mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
fix
This commit is contained in:
@@ -51,6 +51,7 @@ const headers = [
|
|||||||
{ title: "状态", key: "status"},
|
{ title: "状态", key: "status"},
|
||||||
{ title: "时间", key: "date"},
|
{ title: "时间", key: "date"},
|
||||||
{ title: "失败原因", key: "errmsg"},
|
{ title: "失败原因", key: "errmsg"},
|
||||||
|
{ title: "", key: "actions", sortable: false},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 数据列表
|
// 数据列表
|
||||||
@@ -84,8 +85,6 @@ const getStatusColor = (status: boolean) => {
|
|||||||
// 加载时获取数据
|
// 加载时获取数据
|
||||||
onMounted(fetchData);
|
onMounted(fetchData);
|
||||||
|
|
||||||
const search = ref("");
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -127,9 +126,18 @@ const search = ref("");
|
|||||||
<template #item.errmsg="{ item }">
|
<template #item.errmsg="{ item }">
|
||||||
{{ item.raw.errmsg }}
|
{{ item.raw.errmsg }}
|
||||||
</template>
|
</template>
|
||||||
|
<template #item.actions="{ item }">
|
||||||
|
<MoreBtn />
|
||||||
|
</template>
|
||||||
<template #no-data>
|
<template #no-data>
|
||||||
没有数据
|
没有数据
|
||||||
</template>
|
</template>
|
||||||
</VDataTable>
|
</VDataTable>
|
||||||
</VCard>
|
</VCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style type="scss">
|
||||||
|
.v-table th {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -78,12 +78,20 @@ const getIcon = (type: string) => {
|
|||||||
return "mdi-help-circle";
|
return "mdi-help-circle";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 计算百分比
|
||||||
|
const getPercentage = (total: number, lack: number) => {
|
||||||
|
if (total === 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return Math.round(((total - lack) / total) * 100);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VRow v-if="filteredDataList.length > 0">
|
<VRow>
|
||||||
<VCol v-for="data in filteredDataList" :key="data.id" cols="12" md="6" lg="4">
|
<VCol v-for="data in filteredDataList" :key="data.id" cols="12" md="6" lg="4">
|
||||||
<VCard :image="data.backdrop" class="card-with-overlay">
|
<VCard :image="data.backdrop || data.poster" class="card-with-overlay">
|
||||||
<VCardItem>
|
<VCardItem>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<VIcon
|
<VIcon
|
||||||
@@ -120,7 +128,7 @@ const getIcon = (type: string) => {
|
|||||||
icon="mdi-progress-clock"
|
icon="mdi-progress-clock"
|
||||||
color="white"
|
color="white"
|
||||||
class="me-1"
|
class="me-1"
|
||||||
v-if="data.season"
|
v-if="data.total_episode"
|
||||||
/>
|
/>
|
||||||
<span class="text-subtitle-2 text-white" v-if="data.season"
|
<span class="text-subtitle-2 text-white" v-if="data.season"
|
||||||
>{{ (data.total_episode || 0) - (data.lack_episode || 0) }} /
|
>{{ (data.total_episode || 0) - (data.lack_episode || 0) }} /
|
||||||
@@ -128,14 +136,16 @@ const getIcon = (type: string) => {
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
|
|
||||||
|
<VProgressLinear
|
||||||
|
v-if="data.total_episode || 0 > 0"
|
||||||
|
:model-value="getPercentage(data.total_episode || 0, data.lack_episode || 0)"
|
||||||
|
bg-color="success"
|
||||||
|
color="success"
|
||||||
|
/>
|
||||||
</VCard>
|
</VCard>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<ErrorHeader v-else
|
|
||||||
error-code="404"
|
|
||||||
error-title="没有订阅⚠️"
|
|
||||||
error-description="通过顶部搜索框搜索或远程发送消息来添加订阅吧。"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user