Files
----/后端源码/yifan.action-ai.cn/index/js/index.WOSfjnwM.js

848 lines
38 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { T as ElCard, U as ElRow, i as ElIcon, t as ElLink, s as ElDivider, V as ElCol, W as connection_default, q as ElTag, X as ElSkeleton, Y as ElSkeletonItem, P as ElRadioGroup, Z as ElRadioButton, F as ElScrollbar, _ as ElTimeline, $ as ElTimelineItem, r as ElText } from "./element-plus.CkEW9frc.js";
import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_setup_true_lang.DN-P1Gi6.js";
import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js";
import { S as openBlock, _ as createElementBlock, a1 as createBaseVNode, J as defineComponent, r as ref, aD as dayjs, eh as useTransition, m as watch, t as onMounted, $ as createVNode, a0 as withCtx, o as unref, aa as toDisplayString, a9 as createTextVNode, T as createBlock, a3 as normalizeClass, a8 as createCommentVNode, z as isRef, H as Fragment, ay as renderList, aO as resolveComponent, j as computed } from "./.pnpm.BW3P1y8f.js";
import { f as useUserStore } from "./index.CMd5bD1r.js";
import { f as formatGrowthRate } from "./index.DZZZOFI8.js";
import { g as greetings } from "./common.ySZAMJjg.js";
import "./echarts.Cg_Ec8L-.js";
import "./codemirror.CvJAcn2d.js";
const _sfc_main$1 = {};
const _hoisted_1$1 = {
href: "https://github.com/1014TaoTao/FastapiAdmin",
target: "_blank",
class: "github-corner",
"aria-label": "View source on Github"
};
const _hoisted_2$1 = {
width: "80",
height: "80",
viewBox: "0 0 250 250",
style: { "color": "#fff", "fill": "#40c9c6" },
"aria-hidden": "true"
};
function _sfc_render(_ctx, _cache) {
return openBlock(), createElementBlock("a", _hoisted_1$1, [
(openBlock(), createElementBlock("svg", _hoisted_2$1, [..._cache[0] || (_cache[0] = [
createBaseVNode("path", { d: "M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" }, null, -1),
createBaseVNode("path", {
d: "M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",
fill: "currentColor",
style: { "transform-origin": "130px 106px" },
class: "octo-arm"
}, null, -1),
createBaseVNode("path", {
d: "M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",
fill: "currentColor",
class: "octo-body"
}, null, -1)
])]))
]);
}
const __unplugin_components_0 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-701f789e"]]);
const _hoisted_1 = { class: "dashboard-container" };
const _hoisted_2 = { class: "flex flex-wrap" };
const _hoisted_3 = { class: "flex-1 flex items-start" };
const _hoisted_4 = ["src"];
const _hoisted_5 = { class: "ml-5" };
const _hoisted_6 = { class: "text-20px font-bold mb-5px" };
const _hoisted_7 = { class: "hidden sm:block" };
const _hoisted_8 = { class: "flex items-end space-x-6" };
const _hoisted_9 = { class: "flex flex-col items-center" };
const _hoisted_10 = { class: "font-bold color-#4080ff text-sm flex items-center" };
const _hoisted_11 = { class: "mt-3 whitespace-nowrap" };
const _hoisted_12 = { class: "flex flex-col items-center" };
const _hoisted_13 = { class: "font-bold color-#ff9a2e text-sm flex items-center" };
const _hoisted_14 = { class: "mt-3 whitespace-nowrap" };
const _hoisted_15 = { class: "w-full sm:hidden mt-3" };
const _hoisted_16 = { class: "flex justify-end space-x-4 overflow-x-auto" };
const _hoisted_17 = { class: "flex-x-between" };
const _hoisted_18 = { class: "flex-x-between mt-2 flex-1" };
const _hoisted_19 = { class: "flex-y-center" };
const _hoisted_20 = {
key: 0,
class: "ml-2 text-xs text-[#67c23a]"
};
const _hoisted_21 = {
key: 1,
class: "ml-2 text-xs text-[#f56c6c]"
};
const _hoisted_22 = { class: "flex-x-between" };
const _hoisted_23 = { class: "mt-5 flex-x-between" };
const _hoisted_24 = { class: "flex-x-between" };
const _hoisted_25 = { class: "flex-x-between mt-2 flex-1" };
const _hoisted_26 = { class: "flex-y-center" };
const _hoisted_27 = { class: "text-lg" };
const _hoisted_28 = { class: "flex-x-between mt-2 text-sm text-gray" };
const _hoisted_29 = { class: "flex-x-between" };
const _hoisted_30 = { class: "mt-5 flex-x-between" };
const _hoisted_31 = { class: "flex-x-between" };
const _hoisted_32 = { class: "flex-x-between mt-2 flex-1" };
const _hoisted_33 = { class: "flex-y-center" };
const _hoisted_34 = { class: "text-lg" };
const _hoisted_35 = { class: "flex-x-between mt-2 text-sm text-gray" };
const _hoisted_36 = { class: "flex-x-between" };
const _hoisted_37 = { class: "flex-x-between" };
const _hoisted_38 = { key: 0 };
const welcome = "祝你开心每一天!";
const _sfc_main = /* @__PURE__ */ defineComponent({
...{
name: "Home",
inheritAttrs: false
},
__name: "index",
setup(__props) {
const timefix = greetings();
const userStore = useUserStore();
const vesionList = ref([
{
id: "1",
title: "v3.2.1",
date: dayjs().format("YYYY-MM-DD HH:mm:ss"),
content: "优化性能修复若干小bug。",
link: "https://gitee.com/tao__tao/FastapiAdmin/releases",
tag: "更新"
},
{
id: "2",
title: "v3.2.0",
date: dayjs().subtract(1, "day").format("YYYY-MM-DD HH:mm:ss"),
content: "新增用户行为分析功能。",
link: "https://gitee.com/tao__tao/FastapiAdmin/releases",
tag: "新功能"
},
{
id: "3",
title: "v3.1.0",
date: dayjs().subtract(3, "day").format("YYYY-MM-DD HH:mm:ss"),
content: "优化权限管理系统。",
link: "https://gitee.com/tao__tao/FastapiAdmin/releases",
tag: "优化"
}
]);
const visitStatsLoading = ref(true);
const visitStatsData = ref({
todayUvCount: 0,
uvGrowthRate: 0,
totalUvCount: 0,
todayPvCount: 0,
pvGrowthRate: 0,
totalPvCount: 0
});
const transitionUvCount = useTransition(
computed(() => visitStatsData.value.todayUvCount),
{
duration: 1e3,
transition: [0.25, 0.1, 0.25, 1]
// CSS cubic-bezier
}
);
const transitionTotalUvCount = useTransition(
computed(() => visitStatsData.value.totalUvCount),
{
duration: 1200,
transition: [0.25, 0.1, 0.25, 1]
}
);
const transitionPvCount = useTransition(
computed(() => visitStatsData.value.todayPvCount),
{
duration: 1e3,
transition: [0.25, 0.1, 0.25, 1]
}
);
const transitionTotalPvCount = useTransition(
computed(() => visitStatsData.value.totalPvCount),
{
duration: 1200,
transition: [0.25, 0.1, 0.25, 1]
}
);
const visitTrendDateRange = ref(7);
const visitTrendChartOptions = ref();
const updateVisitTrendChartOptions = () => {
visitTrendChartOptions.value = {
tooltip: {
trigger: "axis"
},
legend: {
data: ["浏览量(PV)", "访客数(UV)"],
bottom: 0
},
grid: {
left: "1%",
right: "5%",
bottom: "10%",
containLabel: true
},
xAxis: {
type: "category",
data: Array.from(
{ length: visitTrendDateRange.value },
(_, index2) => dayjs().subtract(visitTrendDateRange.value - index2 - 1, "day").format("YYYY-MM-DD")
)
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
type: "dashed"
}
}
},
series: [
{
name: "浏览量(PV)",
type: "line",
data: Array.from(
{ length: visitTrendDateRange.value },
() => Math.floor(Math.random() * 500) + 100
),
areaStyle: {
color: "rgba(64, 158, 255, 0.1)"
},
smooth: true,
itemStyle: {
color: "#4080FF"
},
lineStyle: {
color: "#4080FF"
}
},
{
name: "访客数(UV)",
type: "line",
data: Array.from(
{ length: visitTrendDateRange.value },
() => Math.floor(Math.random() * 200) + 50
),
areaStyle: {
color: "rgba(103, 194, 58, 0.1)"
},
smooth: true,
itemStyle: {
color: "#67C23A"
},
lineStyle: {
color: "#67C23A"
}
}
]
};
};
const computeGrowthRateClass = (growthRate) => {
if (!growthRate) {
return "text-[--el-color-info]";
}
if (growthRate > 0) {
return "text-[--el-color-danger]";
} else if (growthRate < 0) {
return "text-[--el-color-success]";
} else {
return "text-[--el-color-info]";
}
};
watch(
() => visitTrendDateRange.value,
() => {
updateVisitTrendChartOptions();
},
{ immediate: true }
);
onMounted(() => {
visitStatsLoading.value = false;
visitStatsData.value = {
todayUvCount: Math.floor(Math.random() * 200) + 50,
uvGrowthRate: parseFloat((Math.random() * 20 - 10).toFixed(2)),
totalUvCount: Math.floor(Math.random() * 5e3) + 1e3,
todayPvCount: Math.floor(Math.random() * 500) + 100,
pvGrowthRate: parseFloat((Math.random() * 20 - 10).toFixed(2)),
totalPvCount: Math.floor(Math.random() * 2e4) + 5e3
};
updateVisitTrendChartOptions();
});
return (_ctx, _cache) => {
const _component_GithubCorner = __unplugin_components_0;
const _component_Document = resolveComponent("Document");
const _component_el_icon = ElIcon;
const _component_el_link = ElLink;
const _component_Folder = resolveComponent("Folder");
const _component_el_divider = ElDivider;
const _component_el_card = ElCard;
const _component_el_tag = ElTag;
const _component_el_col = ElCol;
const _component_el_skeleton_item = ElSkeletonItem;
const _component_Top = resolveComponent("Top");
const _component_Bottom = resolveComponent("Bottom");
const _component_el_skeleton = ElSkeleton;
const _component_el_row = ElRow;
const _component_el_radio_button = ElRadioButton;
const _component_el_radio_group = ElRadioGroup;
const _component_ECharts = _sfc_main$2;
const _component_TopRight = resolveComponent("TopRight");
const _component_el_text = ElText;
const _component_el_timeline_item = ElTimelineItem;
const _component_el_timeline = ElTimeline;
const _component_el_scrollbar = ElScrollbar;
return openBlock(), createElementBlock("div", _hoisted_1, [
createVNode(_component_GithubCorner, { class: "github-corner" }),
createVNode(_component_el_card, { shadow: "hover" }, {
default: withCtx(() => [
createBaseVNode("div", _hoisted_2, [
createBaseVNode("div", _hoisted_3, [
createBaseVNode("img", {
class: "w80px h80px rounded-full",
src: unref(userStore).basicInfo.avatar + "?imageView2/1/w/80/h/80"
}, null, 8, _hoisted_4),
createBaseVNode("div", _hoisted_5, [
createBaseVNode("div", _hoisted_6, toDisplayString(unref(timefix)) + toDisplayString(unref(userStore).basicInfo.name) + "" + toDisplayString(welcome), 1),
_cache[1] || (_cache[1] = createBaseVNode("p", { class: "text-sm text-gray" }, "今日天气晴朗气温在15℃至25℃之间东南风。", -1))
])
]),
createBaseVNode("div", _hoisted_7, [
createBaseVNode("div", _hoisted_8, [
createBaseVNode("div", _hoisted_9, [
createBaseVNode("div", _hoisted_10, [
createVNode(_component_el_icon, { class: "mr-2px" }, {
default: withCtx(() => [
createVNode(_component_Document)
]),
_: 1
}),
_cache[2] || (_cache[2] = createTextVNode(" 文档 ", -1))
]),
createBaseVNode("div", _hoisted_11, [
createVNode(_component_el_link, {
href: "https://blog.csdn.net/weixin_46768253/article/details/149569141?spm=1001.2014.3001.5502",
target: "_blank"
}, {
default: withCtx(() => [..._cache[3] || (_cache[3] = [
createBaseVNode("div", { class: "i-svg:csdn text-lg" }, null, -1)
])]),
_: 1
})
])
]),
createBaseVNode("div", _hoisted_12, [
createBaseVNode("div", _hoisted_13, [
createVNode(_component_el_icon, { class: "mr-2px" }, {
default: withCtx(() => [
createVNode(_component_Folder)
]),
_: 1
}),
_cache[4] || (_cache[4] = createTextVNode(" 仓库 ", -1))
]),
createBaseVNode("div", _hoisted_14, [
createVNode(_component_el_link, {
href: "https://gitee.com/tao__tao/FastapiAdmin",
target: "_blank"
}, {
default: withCtx(() => [..._cache[5] || (_cache[5] = [
createBaseVNode("div", { class: "i-svg:gitee text-lg color-#F76560" }, null, -1)
])]),
_: 1
}),
createVNode(_component_el_divider, { direction: "vertical" }),
createVNode(_component_el_link, {
href: "https://github.com/1014TaoTao/FastapiAdmin",
target: "_blank"
}, {
default: withCtx(() => [..._cache[6] || (_cache[6] = [
createBaseVNode("div", { class: "i-svg:github text-lg color-#4080FF" }, null, -1)
])]),
_: 1
}),
createVNode(_component_el_divider, { direction: "vertical" }),
createVNode(_component_el_link, {
href: "https://gitcode.com/qq_36002987/FastapiAdmin",
target: "_blank"
}, {
default: withCtx(() => [..._cache[7] || (_cache[7] = [
createBaseVNode("div", { class: "i-svg:gitcode text-lg color-#FF9A2E" }, null, -1)
])]),
_: 1
})
])
])
])
]),
createBaseVNode("div", _hoisted_15, [
createBaseVNode("div", _hoisted_16, [
createVNode(_component_el_link, {
href: "https://gitee.com/tao__tao/FastapiAdmin",
target: "_blank"
}, {
default: withCtx(() => [..._cache[8] || (_cache[8] = [
createBaseVNode("div", { class: "i-svg:gitee text-lg color-#F76560" }, null, -1)
])]),
_: 1
}),
createVNode(_component_el_divider, { direction: "vertical" }),
createVNode(_component_el_link, {
href: "https://github.com/1014TaoTao/FastapiAdmin",
target: "_blank"
}, {
default: withCtx(() => [..._cache[9] || (_cache[9] = [
createBaseVNode("div", { class: "i-svg:github text-lg color-#4080FF" }, null, -1)
])]),
_: 1
}),
createVNode(_component_el_divider, { direction: "vertical" }),
createVNode(_component_el_link, {
href: "https://gitcode.com/qq_36002987/FastapiAdmin",
target: "_blank"
}, {
default: withCtx(() => [..._cache[10] || (_cache[10] = [
createBaseVNode("div", { class: "i-svg:gitcode text-lg color-#FF9A2E" }, null, -1)
])]),
_: 1
})
])
])
])
]),
_: 1
}),
createVNode(_component_el_row, {
gutter: 10,
class: "mt-4"
}, {
default: withCtx(() => [
createVNode(_component_el_col, {
span: 8,
xs: 24,
class: "mb-xs-3"
}, {
default: withCtx(() => [
createVNode(_component_el_card, {
shadow: "hover",
class: "h-full flex flex-col"
}, {
header: withCtx(() => [
createBaseVNode("div", _hoisted_17, [
_cache[12] || (_cache[12] = createBaseVNode("span", { class: "text-gray" }, "在线用户", -1)),
createVNode(_component_el_tag, {
type: "danger",
size: "small"
}, {
default: withCtx(() => [..._cache[11] || (_cache[11] = [
createTextVNode("实时", -1)
])]),
_: 1
})
])
]),
default: withCtx(() => [
createBaseVNode("div", _hoisted_18, [
createBaseVNode("div", _hoisted_19, [
_cache[15] || (_cache[15] = createBaseVNode("span", { class: "text-lg transition-all duration-300 hover:scale-110" }, "9999", -1)),
true ? (openBlock(), createElementBlock("span", _hoisted_20, [
createVNode(_component_el_icon, null, {
default: withCtx(() => [
createVNode(unref(connection_default))
]),
_: 1
}),
_cache[13] || (_cache[13] = createTextVNode(" 已连接 ", -1))
])) : (openBlock(), createElementBlock("span", _hoisted_21, [
createVNode(_component_el_icon, null, {
default: withCtx(() => [
createVNode(unref(Failed))
]),
_: 1
}),
_cache[14] || (_cache[14] = createTextVNode(" 未连接 ", -1))
]))
]),
_cache[16] || (_cache[16] = createBaseVNode("div", { class: "i-svg:people w-8 h-8 animate-[pulse_2s_infinite]" }, null, -1))
]),
_cache[17] || (_cache[17] = createBaseVNode("div", { class: "flex-x-between mt-2 text-sm text-gray" }, [
createBaseVNode("span", null, "更新时间"),
createBaseVNode("span", null, "2025-07-12 00:00:00")
], -1))
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_el_col, {
span: 8,
xs: 24,
class: "mb-xs-3"
}, {
default: withCtx(() => [
createVNode(_component_el_skeleton, {
loading: unref(visitStatsLoading),
rows: 5,
animated: ""
}, {
template: withCtx(() => [
createVNode(_component_el_card, null, {
header: withCtx(() => [
createBaseVNode("div", null, [
createVNode(_component_el_skeleton_item, {
variant: "h3",
style: { "width": "40%" }
}),
createVNode(_component_el_skeleton_item, {
variant: "rect",
style: { "float": "right", "width": "1em", "height": "1em" }
})
])
]),
default: withCtx(() => [
createBaseVNode("div", _hoisted_22, [
createVNode(_component_el_skeleton_item, {
variant: "text",
style: { "width": "30%" }
}),
createVNode(_component_el_skeleton_item, {
variant: "circle",
style: { "width": "2em", "height": "2em" }
})
]),
createBaseVNode("div", _hoisted_23, [
createVNode(_component_el_skeleton_item, {
variant: "text",
style: { "width": "50%" }
}),
createVNode(_component_el_skeleton_item, {
variant: "text",
style: { "width": "1em" }
})
])
]),
_: 1
})
]),
default: withCtx(() => [
!unref(visitStatsLoading) ? (openBlock(), createBlock(_component_el_card, {
key: 0,
shadow: "hover",
class: "h-full flex flex-col"
}, {
header: withCtx(() => [
createBaseVNode("div", _hoisted_24, [
_cache[19] || (_cache[19] = createBaseVNode("span", { class: "text-gray" }, "访客数(UV)", -1)),
createVNode(_component_el_tag, {
type: "success",
size: "small"
}, {
default: withCtx(() => [..._cache[18] || (_cache[18] = [
createTextVNode("日", -1)
])]),
_: 1
})
])
]),
default: withCtx(() => [
createBaseVNode("div", _hoisted_25, [
createBaseVNode("div", _hoisted_26, [
createBaseVNode("span", _hoisted_27, toDisplayString(Math.round(unref(transitionUvCount))), 1),
createBaseVNode("span", {
class: normalizeClass([
"text-xs",
"ml-2",
computeGrowthRateClass(unref(visitStatsData).uvGrowthRate)
])
}, [
createVNode(_component_el_icon, null, {
default: withCtx(() => [
unref(visitStatsData).uvGrowthRate > 0 ? (openBlock(), createBlock(_component_Top, { key: 0 })) : unref(visitStatsData).uvGrowthRate < 0 ? (openBlock(), createBlock(_component_Bottom, { key: 1 })) : createCommentVNode("", true)
]),
_: 1
}),
createTextVNode(" " + toDisplayString(unref(formatGrowthRate)(unref(visitStatsData).uvGrowthRate)), 1)
], 2)
]),
_cache[20] || (_cache[20] = createBaseVNode("div", { class: "i-svg:visitor w-8 h-8" }, null, -1))
]),
createBaseVNode("div", _hoisted_28, [
_cache[21] || (_cache[21] = createBaseVNode("span", null, "总访客数", -1)),
createBaseVNode("span", null, toDisplayString(Math.round(unref(transitionTotalUvCount))), 1)
])
]),
_: 1
})) : createCommentVNode("", true)
]),
_: 1
}, 8, ["loading"])
]),
_: 1
}),
createVNode(_component_el_col, {
span: 8,
xs: 24
}, {
default: withCtx(() => [
createVNode(_component_el_skeleton, {
loading: unref(visitStatsLoading),
rows: 5,
animated: ""
}, {
template: withCtx(() => [
createVNode(_component_el_card, null, {
header: withCtx(() => [
createBaseVNode("div", null, [
createVNode(_component_el_skeleton_item, {
variant: "h3",
style: { "width": "40%" }
}),
createVNode(_component_el_skeleton_item, {
variant: "rect",
style: { "float": "right", "width": "1em", "height": "1em" }
})
])
]),
default: withCtx(() => [
createBaseVNode("div", _hoisted_29, [
createVNode(_component_el_skeleton_item, {
variant: "text",
style: { "width": "30%" }
}),
createVNode(_component_el_skeleton_item, {
variant: "circle",
style: { "width": "2em", "height": "2em" }
})
]),
createBaseVNode("div", _hoisted_30, [
createVNode(_component_el_skeleton_item, {
variant: "text",
style: { "width": "50%" }
}),
createVNode(_component_el_skeleton_item, {
variant: "text",
style: { "width": "1em" }
})
])
]),
_: 1
})
]),
default: withCtx(() => [
!unref(visitStatsLoading) ? (openBlock(), createBlock(_component_el_card, {
key: 0,
shadow: "hover",
class: "h-full flex flex-col"
}, {
header: withCtx(() => [
createBaseVNode("div", _hoisted_31, [
_cache[23] || (_cache[23] = createBaseVNode("span", { class: "text-gray" }, "浏览量(PV)", -1)),
createVNode(_component_el_tag, {
type: "primary",
size: "small"
}, {
default: withCtx(() => [..._cache[22] || (_cache[22] = [
createTextVNode("日", -1)
])]),
_: 1
})
])
]),
default: withCtx(() => [
createBaseVNode("div", _hoisted_32, [
createBaseVNode("div", _hoisted_33, [
createBaseVNode("span", _hoisted_34, toDisplayString(Math.round(unref(transitionPvCount))), 1),
createBaseVNode("span", {
class: normalizeClass([
"text-xs",
"ml-2",
computeGrowthRateClass(unref(visitStatsData).pvGrowthRate)
])
}, [
createVNode(_component_el_icon, null, {
default: withCtx(() => [
unref(visitStatsData).pvGrowthRate > 0 ? (openBlock(), createBlock(_component_Top, { key: 0 })) : unref(visitStatsData).pvGrowthRate < 0 ? (openBlock(), createBlock(_component_Bottom, { key: 1 })) : createCommentVNode("", true)
]),
_: 1
}),
createTextVNode(" " + toDisplayString(unref(formatGrowthRate)(unref(visitStatsData).pvGrowthRate)), 1)
], 2)
]),
_cache[24] || (_cache[24] = createBaseVNode("div", { class: "i-svg:browser w-8 h-8" }, null, -1))
]),
createBaseVNode("div", _hoisted_35, [
_cache[25] || (_cache[25] = createBaseVNode("span", null, "总浏览量", -1)),
createBaseVNode("span", null, toDisplayString(Math.round(unref(transitionTotalPvCount))), 1)
])
]),
_: 1
})) : createCommentVNode("", true)
]),
_: 1
}, 8, ["loading"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_el_row, {
gutter: 10,
class: "mt-4"
}, {
default: withCtx(() => [
createVNode(_component_el_col, {
xs: 24,
span: 16
}, {
default: withCtx(() => [
createVNode(_component_el_card, null, {
header: withCtx(() => [
createBaseVNode("div", _hoisted_36, [
_cache[28] || (_cache[28] = createBaseVNode("span", null, "访问趋势", -1)),
createVNode(_component_el_radio_group, {
modelValue: unref(visitTrendDateRange),
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(visitTrendDateRange) ? visitTrendDateRange.value = $event : null),
size: "small"
}, {
default: withCtx(() => [
createVNode(_component_el_radio_button, { value: 7 }, {
default: withCtx(() => [..._cache[26] || (_cache[26] = [
createTextVNode("近7天", -1)
])]),
_: 1
}),
createVNode(_component_el_radio_button, { value: 30 }, {
default: withCtx(() => [..._cache[27] || (_cache[27] = [
createTextVNode("近30天", -1)
])]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"])
])
]),
default: withCtx(() => [
createVNode(_component_ECharts, {
options: unref(visitTrendChartOptions),
height: "400px"
}, null, 8, ["options"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_el_col, {
xs: 24,
span: 8
}, {
default: withCtx(() => [
createVNode(_component_el_card, null, {
header: withCtx(() => [
createBaseVNode("div", _hoisted_37, [
_cache[30] || (_cache[30] = createBaseVNode("span", { class: "header-title" }, "最新动态", -1)),
createVNode(_component_el_link, {
type: "primary",
underline: "never",
href: "https://gitee.com/tao__tao/FastapiAdmin/releases",
target: "_blank"
}, {
default: withCtx(() => [
_cache[29] || (_cache[29] = createTextVNode(" 完整记录 ", -1)),
createVNode(_component_el_icon, { class: "link-icon" }, {
default: withCtx(() => [
createVNode(_component_TopRight)
]),
_: 1
})
]),
_: 1
})
])
]),
default: withCtx(() => [
createVNode(_component_el_scrollbar, { height: "400px" }, {
default: withCtx(() => [
createVNode(_component_el_timeline, { class: "p-3" }, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(vesionList), (item, index2) => {
return openBlock(), createBlock(_component_el_timeline_item, {
key: index2,
timestamp: item.date,
placement: "top",
color: index2 === 0 ? "#67C23A" : "#909399",
hollow: index2 !== 0,
size: "large"
}, {
default: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass(["version-item", { "latest-item": index2 === 0 }])
}, [
createBaseVNode("div", null, [
createVNode(_component_el_text, { tag: "strong" }, {
default: withCtx(() => [
createTextVNode(toDisplayString(item.title), 1)
]),
_: 2
}, 1024),
item.tag ? (openBlock(), createBlock(_component_el_tag, {
key: 0,
type: index2 === 0 ? "success" : "info",
size: "small"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(item.tag), 1)
]),
_: 2
}, 1032, ["type"])) : createCommentVNode("", true)
]),
createVNode(_component_el_text, { class: "version-content" }, {
default: withCtx(() => [
createTextVNode(toDisplayString(item.content), 1)
]),
_: 2
}, 1024),
item.link ? (openBlock(), createElementBlock("div", _hoisted_38, [
createVNode(_component_el_link, {
type: index2 === 0 ? "primary" : "info",
href: item.link,
target: "_blank",
underline: "never"
}, {
default: withCtx(() => [
_cache[31] || (_cache[31] = createTextVNode(" 详情 ", -1)),
createVNode(_component_el_icon, { class: "link-icon" }, {
default: withCtx(() => [
createVNode(_component_TopRight)
]),
_: 1
})
]),
_: 1
}, 8, ["type", "href"])
])) : createCommentVNode("", true)
], 2)
]),
_: 2
}, 1032, ["timestamp", "color", "hollow"]);
}), 128))
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]);
};
}
});
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f38347e4"]]);
export {
index as default
};