Browse Source

更新目录

李富豪 1 year ago
parent
commit
c75ed4b09e

+ 2 - 2
Web/index.html

@@ -3,9 +3,9 @@
 
 <head>
   <meta charset="UTF-8" />
-  <link rel="icon" href="/favicon.ico" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <title>demo-web</title>
+  <link rel="icon" href="/src/assets/public/favicon.ico" />
+  <title>上云无人机管理平台</title>
 </head>
 
 <body>

+ 19 - 20
Web/package-lock.json

@@ -10,17 +10,16 @@
       "license": "ISC",
       "dependencies": {
         "@amap/amap-jsapi-loader": "^1.0.1",
-        "@ant-design/icons-vue": "^6.0.1",
         "agora-rtc-sdk-ng": "^4.12.1",
-        "ant-design-vue": "^2.2.8",
+        "ant-design-vue": "2.2.8",
         "axios": "^0.21.1",
         "eventemitter3": "^5.0.0",
         "mitt": "^3.0.0",
         "mqtt": "^4.3.7",
         "reconnecting-websocket": "^4.4.0",
-        "vconsole": "^3.8.1",
+        "vconsole": "^3.15.0",
         "vue": "^3.2.0",
-        "vue-i18n": "^9.1.6",
+        "vue-i18n": "^9.13.0",
         "vue-router": "4",
         "vuex": "^4.0.0"
       },
@@ -28,9 +27,9 @@
         "@types/node": "^18.15.0",
         "@vitejs/plugin-vue": "^5.0.0",
         "sass": "^1.35.1",
-        "typescript": "^4.5.4",
-        "vite": "^5.3.0",
-        "vite-plugin-vconsole": "^1.1.0"
+        "typescript": "^5.5.0",
+        "vite": "5.3.0",
+        "vite-plugin-vconsole": "^2.1.0"
       }
     },
     "node_modules/@agora-js/media": {
@@ -792,9 +791,9 @@
       "dev": true
     },
     "node_modules/@types/node": {
-      "version": "18.19.37",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.37.tgz",
-      "integrity": "sha512-Pi53fdVMk7Ig5IfAMltQQMgtY7xLzHaEous8IQasYsdQbYK3v90FkxI3XYQCe/Qme58pqp14lXJIsFmGP8VoZQ==",
+      "version": "18.19.38",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.38.tgz",
+      "integrity": "sha512-SApYXUF7si4JJ+lO2o6X60OPOnA6wPpbiB09GMCkQ+JAwpa9hxUVG8p7GzA08TKQn5OhzK57rj1wFj+185YsGg==",
       "dev": true,
       "dependencies": {
         "undici-types": "~5.26.4"
@@ -2032,16 +2031,16 @@
       "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
     },
     "node_modules/typescript": {
-      "version": "4.9.5",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
-      "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+      "version": "5.5.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
+      "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
       "devOptional": true,
       "bin": {
         "tsc": "bin/tsc",
         "tsserver": "bin/tsserver"
       },
       "engines": {
-        "node": ">=4.2.0"
+        "node": ">=14.17"
       }
     },
     "node_modules/ua-parser-js": {
@@ -2089,9 +2088,9 @@
       }
     },
     "node_modules/vite": {
-      "version": "5.3.1",
-      "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz",
-      "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==",
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.0.tgz",
+      "integrity": "sha512-hA6vAVK977NyW1Qw+fLvqSo7xDPej7von7C3DwwqPRmnnnK36XEBC/J3j1V5lP8fbt7y0TgTKJbpNGSwM+Bdeg==",
       "dev": true,
       "dependencies": {
         "esbuild": "^0.21.3",
@@ -2144,9 +2143,9 @@
       }
     },
     "node_modules/vite-plugin-vconsole": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/vite-plugin-vconsole/-/vite-plugin-vconsole-1.3.1.tgz",
-      "integrity": "sha512-fSuk+UROXpxIZsQID7/CSvBxIRO4Zug5P+Qv8H2Rdnl4ks9nAhSCzNBE4amyZhJLJE1Rl4z0EMIOomK8sHLugQ==",
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/vite-plugin-vconsole/-/vite-plugin-vconsole-2.1.1.tgz",
+      "integrity": "sha512-369FlBnQhzR5pF2+nsmbMeF5qNO6MzUIk3l+DHa8In15cscyk4eXT5pWfExoSLn41dgeI1FPP+kgAKViePYPdQ==",
       "dev": true
     },
     "node_modules/vue": {

+ 7 - 8
Web/package.json

@@ -1,7 +1,7 @@
 {
   "name": "uav-manage-web",
   "version": "1.0.0",
-  "description": "无人机管理系统",
+  "description": "上云无人机管理平台",
   "type": "module",
   "license": "ISC",
   "scripts": {
@@ -10,17 +10,16 @@
   },
   "dependencies": {
     "@amap/amap-jsapi-loader": "^1.0.1",
-    "@ant-design/icons-vue": "^6.0.1",
     "agora-rtc-sdk-ng": "^4.12.1",
-    "ant-design-vue": "^2.2.8",
+    "ant-design-vue": "2.2.8",
     "axios": "^0.21.1",
     "eventemitter3": "^5.0.0",
     "mitt": "^3.0.0",
     "mqtt": "^4.3.7",
     "reconnecting-websocket": "^4.4.0",
-    "vconsole": "^3.8.1",
+    "vconsole": "^3.15.0",
     "vue": "^3.2.0",
-    "vue-i18n": "^9.1.6",
+    "vue-i18n": "^9.13.0",
     "vue-router": "4",
     "vuex": "^4.0.0"
   },
@@ -28,8 +27,8 @@
     "@types/node": "^18.15.0",
     "@vitejs/plugin-vue": "^5.0.0",
     "sass": "^1.35.1",
-    "typescript": "^4.5.4",
-    "vite": "^5.3.0",
-    "vite-plugin-vconsole": "^1.1.0"
+    "typescript": "^5.5.0",
+    "vite": "5.3.0",
+    "vite-plugin-vconsole": "^2.1.0"
   }
 }

+ 4 - 6
Web/src/antd.ts

@@ -1,13 +1,11 @@
-// import Icon from '@ant-design/icons-vue'
-import * as antDesign from 'ant-design-vue'
-import 'ant-design-vue/dist/antd.css'
 import { App } from 'vue'
+import * as antDesign from 'ant-design-vue'
 import svgIcon from '/@/components/svgIcon.vue'
+import 'ant-design-vue/dist/antd.css'
 
 export const antComponents = {
-  install (app: App): void {
+  install(app: App): void {
     app.use(antDesign)
-    // app.component('Icon', Icon)
     app.component('svg-icon', svgIcon)
   }
-}
+}

+ 0 - 0
Web/public/favicon.ico → Web/src/assets/public/favicon.ico


+ 1 - 1
Web/src/components/common/topbar.vue

@@ -4,7 +4,7 @@
     <div>
       <a-avatar :size="40" shape="square" :src="cloudapi" />
       <span class="ml10">
-        无人机管理系统
+        上云
       </span>
     </div>
     <div style="cursor: pointer;" class="height-100 fz16 flex-row flex-justify-between flex-align-center">

+ 1 - 3
Web/src/main.ts

@@ -1,17 +1,15 @@
 import App from './App.vue'
 import router from './router'
 import { antComponents } from './antd'
-import { CommonComponents } from './use-common-components'
 import store, { storeKey } from './store'
 import { createInstance } from '/@/root'
 import { useDirectives } from './directives'
-
 import '/@/styles/index.scss'
+
 const app = createInstance(App)
 
 app.use(store, storeKey)
 app.use(router)
-app.use(CommonComponents)
 app.use(antComponents)
 app.use(useDirectives)
 app.mount('#demo-app')

+ 1 - 1
Web/src/pages/page-pilot/pilot-index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="login flex-column flex-justify-center flex-align-center m0 b0">
     <a-image style="width: 17vw; height: 10vw; margin-bottom: 50px" :src="djiLogo" />
-    <p class="logo fz35 pb50">无人机管理系统</p>
+    <p class="logo fz35 pb50">上云无人机管理平台</p>
     <a-form layout="inline" :model="formState" class="flex-row flex-justify-center flex-align-center">
       <a-form-item>
         <a-input v-model:value="formState.username" placeholder="账号">

+ 1 - 1
Web/src/pages/page-web/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="login flex-column flex-justify-center flex-align-center m0 b0">
     <a-image :preview="false" style="width: 17vw; height: 10vw; margin-bottom: 50px" :src="djiLogo" />
-    <p class="fz35 pb50" style="color: #2d8cf0">无人机管理系统</p>
+    <p class="fz35 pb50" style="color: #2d8cf0">上云无人机管理平台</p>
     <a-form layout="inline" :model="formState" class="flex-row flex-justify-center flex-align-center">
       <a-form-item>
         <a-input v-model:value="formState.username" placeholder="账号">

+ 0 - 13
Web/src/use-common-components.ts

@@ -1,13 +0,0 @@
-import { App, DefineComponent } from 'vue'
-
-const components: Record<string, DefineComponent<{}, {}, any>> = {
-
-}
-
-export const CommonComponents = {
-  install(app: App): void {
-    Object.keys(components).forEach(name => {
-      app.component(name, components[name])
-    })
-  }
-}

+ 12 - 2
Web/vite.config.ts

@@ -21,9 +21,17 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => defineConfig(
     ]
   },
   server: {
-    open: true,
+    // 监听所有地址
     host: '0.0.0.0',
+    // 自定义端口号
     port: 8080,
+    // 自动打开浏览器
+    open: true,
+    // 开启热更新
+    hmr: true,
+    // 若端口被占用,自动尝试下一个可用端口
+    strictPort: false,
+    // 代理规则
     proxy: {
       '/api': {
         // 开启跨域
@@ -37,7 +45,9 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => defineConfig(
   },
   build: {
     target: ['es2015'], // 最低支持 es2015
-    sourcemap: true
+    sourcemap: false,// 构建后不生成源代码
+    write: true,// 构建的文件写入磁盘
+    chunkSizeWarningLimit: 10240,// 触发警告的chunk大小10M
   },
   plugins: [
     vue(),