From 66718ff4780331da62c1fa08614c14a8e7cf45cb Mon Sep 17 00:00:00 2001 From: jianzhichu Date: Thu, 1 Jan 2026 22:26:44 +0800 Subject: [PATCH] =?UTF-8?q?docker-compose=E5=A2=9E=E5=8A=A0=E5=86=85?= =?UTF-8?q?=E5=AD=98=E9=99=90=E5=88=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Properties/PublishProfiles/docker.pubxml.user | 2 +- README.md | 4 + app/src/pages/workplace/statics.vue | 147 +++++++++--------- ....timestamp-1767276050117-db7b503f97077.mjs | 104 +++++++++++++ 4 files changed, 182 insertions(+), 75 deletions(-) create mode 100644 app/vite.config.ts.timestamp-1767276050117-db7b503f97077.mjs diff --git a/Properties/PublishProfiles/docker.pubxml.user b/Properties/PublishProfiles/docker.pubxml.user index 0b3f74d..60fe2d7 100644 --- a/Properties/PublishProfiles/docker.pubxml.user +++ b/Properties/PublishProfiles/docker.pubxml.user @@ -3,7 +3,7 @@ <_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\ - True|2026-01-01T13:10:19.3664263Z||;True|2026-01-01T21:09:38.6071080+08:00||;True|2025-12-30T11:45:54.5543034+08:00||;True|2025-12-30T09:19:08.3178124+08:00||;True|2025-12-29T18:57:29.7032246+08:00||;True|2025-12-27T14:52:24.4780776+08:00||;False|2025-12-27T14:52:19.5635794+08:00||;True|2025-12-27T14:48:01.6252748+08:00||;False|2025-12-27T14:47:55.7976192+08:00||;True|2025-12-27T14:38:23.9723838+08:00||;True|2025-12-27T13:00:29.8583858+08:00||;True|2025-12-26T22:18:42.4015637+08:00||;True|2025-12-26T22:10:58.5274572+08:00||;True|2025-12-26T22:06:26.3129600+08:00||;True|2025-12-26T22:03:55.6718618+08:00||;False|2025-12-26T22:03:48.3809954+08:00||;True|2025-12-26T22:02:33.1840390+08:00||;True|2025-12-26T22:01:16.1660100+08:00||;True|2025-12-25T00:50:26.1116465+08:00||;True|2025-12-25T00:48:27.3087708+08:00||;True|2025-12-25T00:47:38.4835720+08:00||; + True|2026-01-01T14:16:10.2974067Z||;True|2026-01-01T22:16:06.2123787+08:00||;False|2026-01-01T22:15:33.3626979+08:00||;True|2026-01-01T22:01:30.7161900+08:00||;True|2026-01-01T21:10:19.3664263+08:00||;True|2026-01-01T21:09:38.6071080+08:00||;True|2025-12-30T11:45:54.5543034+08:00||;True|2025-12-30T09:19:08.3178124+08:00||;True|2025-12-29T18:57:29.7032246+08:00||;True|2025-12-27T14:52:24.4780776+08:00||;False|2025-12-27T14:52:19.5635794+08:00||;True|2025-12-27T14:48:01.6252748+08:00||;False|2025-12-27T14:47:55.7976192+08:00||;True|2025-12-27T14:38:23.9723838+08:00||;True|2025-12-27T13:00:29.8583858+08:00||;True|2025-12-26T22:18:42.4015637+08:00||;True|2025-12-26T22:10:58.5274572+08:00||;True|2025-12-26T22:06:26.3129600+08:00||;True|2025-12-26T22:03:55.6718618+08:00||;False|2025-12-26T22:03:48.3809954+08:00||;True|2025-12-26T22:02:33.1840390+08:00||;True|2025-12-26T22:01:16.1660100+08:00||;True|2025-12-25T00:50:26.1116465+08:00||;True|2025-12-25T00:48:27.3087708+08:00||;True|2025-12-25T00:47:38.4835720+08:00||; \ No newline at end of file diff --git a/README.md b/README.md index dbfa99d..89263ec 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,10 @@ services: - 8.8.8.8 # Google DNS(提升海外访问稳定性) - 114.114.114.114 # 国内DNS(提升国内访问稳定性) - 223.5.5.5 # 阿里云DNS(备用) + deploy: + resources: + limits: + memory: 120m #限制内存占用不超过120mb,如果运行过程中报错,可以再增加点。不做限制会涨到300多 ``` diff --git a/app/src/pages/workplace/statics.vue b/app/src/pages/workplace/statics.vue index 0c80667..21f83f0 100644 --- a/app/src/pages/workplace/statics.vue +++ b/app/src/pages/workplace/statics.vue @@ -157,20 +157,23 @@
-
- 作者头像 -
-
-

{{ author.name }}

-

作品数: {{ author.count }}

+ +
+
+ 作者头像 +
+
+

{{ author.name }}

+

同步数量: {{ author.count }}

+
+
-
@@ -248,6 +251,16 @@ defineOptions({ name: 'StatsDashboard', }); +// 生成随机十六进制颜色的工具函数 +const generateRandomColor = () => { + // 生成0-255的随机RGB值,转换为十六进制并补零 + const randomHex = () => + Math.floor(Math.random() * 256) + .toString(16) + .padStart(2, '0'); + return `#${randomHex()}${randomHex()}${randomHex()}`; +}; + // 加载数据和切换标签逻辑 onMounted(() => { loadDashboardData(); @@ -268,27 +281,27 @@ const loadDashboardData = async () => { totalAuthors.value = res.data.authorCount; categoryTotal.value = res.data.categoryCount; totalVideos.value = res.data.videoCount; - fileSizeTotal.value = res.data.videoSizeTotal || 0.0; - totalDiskSize.value = res.data.totalDiskSize || 0.0; + fileSizeTotal.value = res.data.videoSizeTotal || '0.00'; + totalDiskSize.value = res.data.totalDiskSize || '0.00'; favoriteCount.value = res.data.favoriteCount; collectCount.value = res.data.collectCount; followCount.value = res.data.followCount || 0; graphicVideoCount.value = res.data.graphicVideoCount || 0; - favoriteSize.value = res.data.videoFavoriteSize || 0.0; - collectSize.value = res.data.videoCollectSize || 0.0; - followSize.value = res.data.videoFollowSize || 0.0; - graphicVideoSize.value = res.data.graphicVideoSize || 0.0; + favoriteSize.value = res.data.videoFavoriteSize || '0.00'; + collectSize.value = res.data.videoCollectSize || '0.00'; + followSize.value = res.data.videoFollowSize || '0.00'; + graphicVideoSize.value = res.data.graphicVideoSize || '0.00'; categories.value = res.data.categories; authors.value = res.data.authors; - const cates = getRandomElements(categoriessss.value, categories.value.length); - const colors = getRandomElements(colorArray, categories.value.length); - categories.value.forEach((item, index) => { - item.icon = cates[index]; - item.color = colors[index]; + // 移除categoriessss相关逻辑,直接给分类设置固定图标cup(保证显示) + // 动态为每个分类生成随机颜色,替代原有的colorArray + categories.value.forEach((item) => { + item.icon = 'cup'; // 固定使用已定义的cup图标,确保显示正常 + item.color = generateRandomColor(); // 随机生成颜色 }); } catch (err) { console.error('加载仪表盘数据失败:', err); @@ -300,46 +313,7 @@ const getRandomElements = (arr: any[], n: number) => { if (n >= arr.length) return [...arr]; return [...arr].sort(() => Math.random() - 0.5).slice(0, n); }; - -const categoriessss = ref([ - 'cup', - 'spoon', - 'fork', - 'knife', - 'plate', - 'bottle', - 'toothbrush', - 'comb', - 'mirror', - 'soap', - 'mobile', - 'tablet', - 'camera', - 'headphones', - 'speaker', - 'tv', - 'watch', - 'charger', -]); - -const colorArray = [ - '#3A7CA5', - '#D9A566', - '#6B4226', - '#829399', - '#A63446', - '#4F6367', - '#FE5F55', - '#C7EFCF', - '#78C0E0', - '#49BEAA', - '#49DCB1', - '#FF9999', - '#66B2FF', - '#99FF99', -]; -