From 36cf3d705190409bced3d46004928139d2eba389 Mon Sep 17 00:00:00 2001 From: chris <510148846@qq.com> Date: Mon, 27 Oct 2025 15:09:02 +0800 Subject: [PATCH] =?UTF-8?q?build:=201=E3=80=81=E5=8D=87=E7=BA=A7sass-embed?= =?UTF-8?q?ded=E7=89=88=E6=9C=AC=EF=BC=8C=E6=84=8F=E5=9B=BE=E8=A7=A3?= =?UTF-8?q?=E5=86=B3@import/@use=20=E8=AD=A6=E5=91=8A=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=88=E6=9A=82=E6=9C=AA=E8=A7=A3=E5=86=B3=EF=BC=89;=20=202?= =?UTF-8?q?=E3=80=81=E5=BC=95=E5=85=A5video.js=E6=8F=92=E4=BB=B6=20feat:?= =?UTF-8?q?=20=201=E3=80=81=E6=B0=94=E8=B1=A1=E7=9B=91=E6=B5=8B=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=96=B0=E5=A2=9E=E6=B0=94=E8=B1=A1=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E7=94=BB=E9=9D=A2=EF=BC=9B=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=99=AB=E6=83=85=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=EF=BC=8C=E4=B8=8E=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A3=E5=88=9D?= =?UTF-8?q?=E6=AD=A5=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- src/assets/styles/variables.module.scss | 2 +- .../{variables.scss => variables_custom.scss} | 0 src/main.js | 7 + src/utils/index.js | 30 ++ .../components/ActionButtons.vue | 0 .../components/PestFormDialog.vue | 0 .../components/PestSearchForm.vue | 0 .../components/PestTable.vue | 0 .../components/PestViewDialog.vue | 0 src/views/{device => devices}/config.js | 0 src/views/{device => devices}/index.vue | 0 .../components/OrchardBriefInfo.vue | 37 +- .../orchardScreen/components/PestInfo.vue | 129 +++-- .../orchardScreen/components/SoilInfo.vue | 133 ++--- .../orchardScreen/components/WeatherInfo.vue | 207 +++----- src/views/orchardScreen/config.js | 187 +++++++ src/views/orchardScreen/index.vue | 126 ++++- src/views/orchardScreen/mock.js | 10 +- .../imgAnalysis/components/DeviceList.vue | 22 +- .../imgAnalysis/components/ImageDetail.vue | 20 +- .../pest/imgAnalysis/components/ImageList.vue | 21 +- src/views/pest/imgAnalysis/config.js | 18 +- src/views/pest/imgAnalysis/index.vue | 58 ++- src/views/pest/pestMonitor/index.vue | 3 +- .../pestStatistics/components/DeviceList.vue | 25 +- .../pestStatistics/components/SearchForm.vue | 36 +- .../components/StatisticsChart.vue | 49 +- .../pestStatistics/components/chartAction.vue | 31 +- src/views/pest/pestStatistics/config.js | 18 + src/views/pest/pestStatistics/index.vue | 118 ++++- .../pushHistory/components/HistoryTable.vue | 43 ++ .../pushHistory/components/SearchForm.vue | 69 +++ .../pushHistory/components/Statistics.vue | 301 ++++++++++++ src/views/pest/pushHistory/config.js | 26 + src/views/pest/pushHistory/index.vue | 103 ++++ .../pushManagement}/index.vue | 216 ++++---- .../trendAnalysis/components/DeviceList.vue | 26 +- .../trendAnalysis/components/SearchForm.vue | 36 +- .../trendAnalysis/components/TrendChart.vue | 19 +- .../trendAnalysis/components/chartAction.vue | 28 +- src/views/pest/trendAnalysis/index.vue | 128 ++++- .../soil/monitor/components/LiveData.vue | 12 +- .../soil/monitor/components/SoilChart.vue | 460 ++++++++++-------- src/views/soil/monitor/config.js | 59 +++ src/views/soil/monitor/index.vue | 91 +++- src/views/system/dept/index.vue | 48 +- src/views/uav/index.vue | 24 + .../weather/monitor/components/LiveData.vue | 106 ++-- src/views/weather/monitor/config.js | 5 + src/views/weather/monitor/index.vue | 81 +-- vite.config.js | 4 +- 52 files changed, 2315 insertions(+), 860 deletions(-) rename src/assets/styles/{variables.scss => variables_custom.scss} (100%) rename src/views/{device => devices}/components/ActionButtons.vue (100%) rename src/views/{device => devices}/components/PestFormDialog.vue (100%) rename src/views/{device => devices}/components/PestSearchForm.vue (100%) rename src/views/{device => devices}/components/PestTable.vue (100%) rename src/views/{device => devices}/components/PestViewDialog.vue (100%) rename src/views/{device => devices}/config.js (100%) rename src/views/{device => devices}/index.vue (100%) create mode 100644 src/views/orchardScreen/config.js create mode 100644 src/views/pest/pestStatistics/config.js create mode 100644 src/views/pest/pushHistory/components/HistoryTable.vue create mode 100644 src/views/pest/pushHistory/components/SearchForm.vue create mode 100644 src/views/pest/pushHistory/components/Statistics.vue create mode 100644 src/views/pest/pushHistory/config.js create mode 100644 src/views/pest/pushHistory/index.vue rename src/views/{memberPush => pest/pushManagement}/index.vue (50%) create mode 100644 src/views/soil/monitor/config.js create mode 100644 src/views/uav/index.vue diff --git a/package.json b/package.json index da7f9f3..da5261a 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "pinia": "2.1.7", "splitpanes": "3.1.5", "unocss": "^0.65.1", + "video.js": "^8.23.4", "vue": "3.4.31", "vue-cropper": "1.1.1", "vue-router": "4.4.0" @@ -42,7 +43,7 @@ "@iconify-json/carbon": "^1.2.5", "@iconify/vue": "^4.2.0", "@vitejs/plugin-vue": "5.0.5", - "sass-embedded": "^1.83.4", + "sass-embedded": "^1.93.2", "unplugin-auto-import": "0.17.6", "unplugin-vue-setup-extend-plus": "1.0.1", "vite": "5.3.2", diff --git a/src/assets/styles/variables.module.scss b/src/assets/styles/variables.module.scss index ffac6d5..954a144 100644 --- a/src/assets/styles/variables.module.scss +++ b/src/assets/styles/variables.module.scss @@ -1,4 +1,4 @@ -@import './variables.scss'; +@import './variables_custom.scss'; :export { menuText: $menuText; diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables_custom.scss similarity index 100% rename from src/assets/styles/variables.scss rename to src/assets/styles/variables_custom.scss diff --git a/src/main.js b/src/main.js index e7ba3db..c65390e 100644 --- a/src/main.js +++ b/src/main.js @@ -1,3 +1,9 @@ +/* + * @Author: chris + * @Date: 2025-01-13 09:34:10 + * @LastEditors: chris + * @LastEditTime: 2025-10-27 14:19:18 + */ import { createApp } from "vue"; import Cookies from "js-cookie"; @@ -7,6 +13,7 @@ import "element-plus/dist/index.css"; import "element-plus/theme-chalk/dark/css-vars.css"; import locale from "element-plus/es/locale/lang/zh-cn"; import "virtual:uno.css"; +import "video.js/dist/video-js.css"; import "@/assets/styles/index.scss"; // global css diff --git a/src/utils/index.js b/src/utils/index.js index c800c9c..0282594 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -396,3 +396,33 @@ export function isNumberStr(str) { export function objectToArray(obj) { return Object.keys(obj).map((key) => obj[key]); } + +/** + * 随机生成暗色 + * 确保生成的颜色不是亮色,通过控制RGB值在较低范围内 + * @returns {string} 十六进制颜色代码 + */ +export function getRandomColor() { + // 生成0-255之间的随机RGB值 + const r = Math.floor(Math.random() * 255); + const g = Math.floor(Math.random() * 255); + const b = Math.floor(Math.random() * 255); + + // 转换为十六进制并格式化 + const toHex = (value) => { + const hex = value.toString(16); + return hex.length === 1 ? "0" + hex : hex; + }; + + return "#" + toHex(r) + toHex(g) + toHex(b); +} + +export function getDateRange(days) { + const endDate = new Date(); + const startDate = new Date(endDate); + startDate.setDate(endDate.getDate() - days); + return { + beginTime: startDate.toISOString().split("T")[0], + endTime: endDate.toISOString().split("T")[0], + }; +} diff --git a/src/views/device/components/ActionButtons.vue b/src/views/devices/components/ActionButtons.vue similarity index 100% rename from src/views/device/components/ActionButtons.vue rename to src/views/devices/components/ActionButtons.vue diff --git a/src/views/device/components/PestFormDialog.vue b/src/views/devices/components/PestFormDialog.vue similarity index 100% rename from src/views/device/components/PestFormDialog.vue rename to src/views/devices/components/PestFormDialog.vue diff --git a/src/views/device/components/PestSearchForm.vue b/src/views/devices/components/PestSearchForm.vue similarity index 100% rename from src/views/device/components/PestSearchForm.vue rename to src/views/devices/components/PestSearchForm.vue diff --git a/src/views/device/components/PestTable.vue b/src/views/devices/components/PestTable.vue similarity index 100% rename from src/views/device/components/PestTable.vue rename to src/views/devices/components/PestTable.vue diff --git a/src/views/device/components/PestViewDialog.vue b/src/views/devices/components/PestViewDialog.vue similarity index 100% rename from src/views/device/components/PestViewDialog.vue rename to src/views/devices/components/PestViewDialog.vue diff --git a/src/views/device/config.js b/src/views/devices/config.js similarity index 100% rename from src/views/device/config.js rename to src/views/devices/config.js diff --git a/src/views/device/index.vue b/src/views/devices/index.vue similarity index 100% rename from src/views/device/index.vue rename to src/views/devices/index.vue diff --git a/src/views/orchardScreen/components/OrchardBriefInfo.vue b/src/views/orchardScreen/components/OrchardBriefInfo.vue index 1283202..8b0300a 100644 --- a/src/views/orchardScreen/components/OrchardBriefInfo.vue +++ b/src/views/orchardScreen/components/OrchardBriefInfo.vue @@ -2,36 +2,11 @@ * @Author: chris * @Date: 2025-08-25 15:42:45 * @LastEditors: chris - * @LastEditTime: 2025-09-02 16:28:57 + * @LastEditTime: 2025-10-15 16:00:17 -->