From 68eafbfba0801cd758362b2a1d9ed985b6e5cb1f Mon Sep 17 00:00:00 2001
From: wangzenghua <1048523306@qq.com>
Date: Fri, 18 Apr 2025 02:55:54 +0100
Subject: [PATCH 2/6] =?UTF-8?q?fix=EF=BC=9Biot?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.eslintrc.js | 2 +-
src/views/iot/device/components/BugLamp/BlDetail.vue | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 5269ffe..c9ab67e 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -48,7 +48,7 @@ module.exports = {
'camelcase': [0, {
'properties': 'always'
}],
- 'comma-dangle': [0, 'always'],
+ 'comma-dangle': [1, 'off'],
'comma-spacing': [2, {
'before': false,
'after': true
diff --git a/src/views/iot/device/components/BugLamp/BlDetail.vue b/src/views/iot/device/components/BugLamp/BlDetail.vue
index 6094450..e60046a 100644
--- a/src/views/iot/device/components/BugLamp/BlDetail.vue
+++ b/src/views/iot/device/components/BugLamp/BlDetail.vue
@@ -53,7 +53,7 @@
-
![]()
+
From 3f829832d30f7e4f6ca0d56d75b8a0ae75b50527 Mon Sep 17 00:00:00 2001
From: wangzenghua <1048523306@qq.com>
Date: Fri, 18 Apr 2025 04:17:46 +0100
Subject: [PATCH 3/6] fix:matt
---
.env.development | 2 +-
.env.production | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.env.development b/.env.development
index 121d4c0..a0f4bb6 100644
--- a/.env.development
+++ b/.env.development
@@ -22,7 +22,7 @@ VUE_APP_EMQX_API_USER_NAME = 'admin'
VUE_APP_EMQX_API_PASSWORD = 'sznyb@2025'
# EMQX消息服务器连接地址
-VUE_APP_EMQX_SERVER_URL = 'ws://localhost:8083/mqtt'
+VUE_APP_EMQX_SERVER_URL = 'ws://47.109.205.240:8083/mqtt'
# 高德地图参数
VUE_APP_GAO_DE_SECURITYJSCODE = '77ef0c4c95553799630ad60dd9b692d7'
diff --git a/.env.production b/.env.production
index d2805b4..96e9a83 100644
--- a/.env.production
+++ b/.env.production
@@ -9,7 +9,7 @@ VUE_APP_BASE_API = '/prod-api'
# EMQX接口账号(后端地址和EMQX接口地址部署时,通过nginx配置代理)
VUE_APP_EMQX_API_USER_NAME = 'admin'
-VUE_APP_EMQX_API_PASSWORD = 'public'
+VUE_APP_EMQX_API_PASSWORD = 'sznyb@2025'
# EMQX消息服务器连接地址,使用空字符串则会自动获取服务器地址
VUE_APP_EMQX_SERVER_URL = 'ws://47.117.148.147:8083/mqtt'
From 68a6225685d21f5b62650d9e28b533eabe9ee932 Mon Sep 17 00:00:00 2001
From: lx <826276471@qq.com>
Date: Fri, 18 Apr 2025 11:47:55 +0800
Subject: [PATCH 4/6] feat
---
src/views/agriculture/mapManager/MapArea.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/agriculture/mapManager/MapArea.vue b/src/views/agriculture/mapManager/MapArea.vue
index 4436fbf..af06faa 100644
--- a/src/views/agriculture/mapManager/MapArea.vue
+++ b/src/views/agriculture/mapManager/MapArea.vue
@@ -482,7 +482,7 @@ export default {
new this.AMap.Text({
text: `${item.landName}[${item.cropName || '闲置'}]`,
anchor: 'center',
- // position: this.getAreaCenter(pointList),
+ position: this.getAreaCenter(pointList),
style: {
background: 'transparent',
color: '#fff',
From 3c4f26262e9f0652547e03f208bea012064c231e Mon Sep 17 00:00:00 2001
From: wangzenghua <1048523306@qq.com>
Date: Fri, 18 Apr 2025 06:42:52 +0100
Subject: [PATCH 5/6] =?UTF-8?q?fix:=E5=8A=A0=E8=BD=BD=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 3 +-
src/permission.js | 2 +-
vue.config.js | 79 +++++++++++++++++++++++++++--------------------
3 files changed, 48 insertions(+), 36 deletions(-)
diff --git a/package.json b/package.json
index 16b4c0f..2f91b53 100644
--- a/package.json
+++ b/package.json
@@ -96,11 +96,12 @@
"@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0",
"chalk": "4.1.0",
+ "compression-webpack-plugin": "6.x",
"connect": "3.6.6",
"eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0",
- "prettier": "^3.4.2",
"lint-staged": "10.5.3",
+ "prettier": "^3.4.2",
"runjs": "4.4.2",
"sass": "1.32.13",
"sass-loader": "10.1.1",
diff --git a/src/permission.js b/src/permission.js
index 1444338..cf19297 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -7,7 +7,7 @@ import { getToken } from '@/utils/auth';
NProgress.configure({ showSpinner: false });
-const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/preview'];
+const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/preview', '/dataV'];
router.beforeEach((to, from, next) => {
NProgress.start();
diff --git a/vue.config.js b/vue.config.js
index a467ac6..b16b490 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,13 +1,14 @@
-'use strict'
-const path = require('path')
+'use strict';
+const path = require('path');
+const CompressionWebpackPlugin = require('compression-webpack-plugin');
function resolve(dir) {
- return path.join(__dirname, dir)
+ return path.join(__dirname, dir);
}
-const name = process.env.VUE_APP_TITLE || '智慧农业智能控制系统' // 网页标题
+const name = process.env.VUE_APP_TITLE || '智慧农业智能控制系统'; // 网页标题
-const port = process.env.VUE_PORT || process.env.npm_config_port || 80 // 端口
+const port = process.env.VUE_PORT || process.env.npm_config_port || 80; // 端口
// vue.config.js 配置说明
// 官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
// 这里只列一部分,具体配置参考文档
@@ -35,32 +36,40 @@ module.exports = {
target: process.env.VUE_APP_SERVER_API_URL,
changeOrigin: true,
pathRewrite: {
- ['^' + process.env.VUE_APP_BASE_API]: ''
- }
+ ['^' + process.env.VUE_APP_BASE_API]: '',
+ },
},
'/api/v4': {
target: process.env.VUE_APP_EMQX_API_URL,
- changeOrigin: true
+ changeOrigin: true,
// logLevel: 'debug',
- }
+ },
},
https: false,
- disableHostCheck: true
+ disableHostCheck: true,
},
configureWebpack: {
name: name,
resolve: {
alias: {
- '@': resolve('src')
- }
- }
+ '@': resolve('src'),
+ },
+ },
+ plugins: [
+ // 开启 Gzip 压缩
+ new CompressionWebpackPlugin({
+ test: /\.(js|css|html|svg)$/,
+ threshold: 10240,
+ minRatio: 0.8,
+ }),
+ ],
},
chainWebpack(config) {
- config.plugins.delete('preload') // TODO: need test
- config.plugins.delete('prefetch') // TODO: need test
+ config.plugins.delete('preload'); // TODO: need test
+ config.plugins.delete('prefetch'); // TODO: need test
// set svg-sprite-loader
- config.module.rule('svg').exclude.add(resolve('src/assets/icons')).end()
+ config.module.rule('svg').exclude.add(resolve('src/assets/icons')).end();
config.module
.rule('icons')
.test(/\.svg$/)
@@ -69,9 +78,9 @@ module.exports = {
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
- symbolId: 'icon-[name]'
+ symbolId: 'icon-[name]',
})
- .end()
+ .end();
config.when(process.env.NODE_ENV !== 'development', (config) => {
config
@@ -80,10 +89,11 @@ module.exports = {
.use('script-ext-html-webpack-plugin', [
{
// `runtime` must same as runtimeChunk name. default is `runtime`
- inline: /runtime\..*\.js$/
- }
+ inline: /runtime\..*\.js$/,
+ },
])
- .end()
+ .end();
+
config.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
@@ -91,28 +101,29 @@ module.exports = {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
- chunks: 'initial' // only package third parties that are initially dependent
+ chunks: 'initial', // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
- test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
+ test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
- reuseExistingChunk: true
- }
- }
- })
+ reuseExistingChunk: true,
+ },
+ },
+ });
+
// eslint-disable-next-line no-sequences
config.optimization.runtimeChunk('single'),
- {
- from: path.resolve(__dirname, './public/robots.txt'), // 防爬虫文件
- to: './' // 到根目录下
- }
- })
- }
-}
+ {
+ from: path.resolve(__dirname, './public/robots.txt'), // 防爬虫文件
+ to: './', // 到根目录下
+ };
+ });
+ },
+};
From fe070f8084e93bc9b92bcd38a5a3b66d5b2d20d9 Mon Sep 17 00:00:00 2001
From: wangzenghua <1048523306@qq.com>
Date: Fri, 18 Apr 2025 07:56:24 +0100
Subject: [PATCH 6/6] =?UTF-8?q?feat:=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/baseManager/index.vue | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/views/system/baseManager/index.vue b/src/views/system/baseManager/index.vue
index 434268f..0ae63a3 100644
--- a/src/views/system/baseManager/index.vue
+++ b/src/views/system/baseManager/index.vue
@@ -36,8 +36,16 @@
-
-
+
+
+ {{ scope.row.baseArea ? `${scope.row.baseArea}亩` : '' }}
+
+
+
+
+ {{ scope.row.baseAltitude ? `${scope.row.baseAltitude}米` : '' }}
+
+