From 38a4183276c1ff97964026b43eee6c2db008f211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Wed, 28 Feb 2024 09:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E5=9C=B0=E5=9B=BE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 7 ++++ src/main.ts | 14 ++++--- .../online/runningCondition/index.vue | 23 +++++++---- vite.config.ts | 4 ++ ....timestamp-1709021487815-153b26a45c9ee.mjs | 39 +++++++++++++++++++ 6 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 vite.config.ts.timestamp-1709021487815-153b26a45c9ee.mjs diff --git a/package.json b/package.json index 6124def0..b4c7e4ab 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "use-element-plus-theme": "^0.0.5", "vue": "^3.3.11", "vue-baidu-map-3x": "^1.0.35", + "vue-baidu-map-offline": "^1.0.7", "vue-draggable-resizable": "3.0.0-beta.2", "vue-router": "4", "vxe-table": "^4.5.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04cdbc8c..3174dc06 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,6 +73,9 @@ dependencies: vue-baidu-map-3x: specifier: ^1.0.35 version: 1.0.35(vue@3.3.13) + vue-baidu-map-offline: + specifier: ^1.0.7 + version: 1.0.7 vue-draggable-resizable: specifier: 3.0.0-beta.2 version: 3.0.0-beta.2(vue@3.3.13) @@ -3087,6 +3090,10 @@ packages: vue-router: 4.2.5(vue@3.3.13) dev: false + /vue-baidu-map-offline@1.0.7: + resolution: {integrity: sha512-8gje38sG/8o03PSghoWsYxsuKUfLVj48kWWHGp6+zeE5nb7rtiyH8fTMKgO8Stf1deRIBr9PVsc1BqwFoz+pXg==} + dev: false + /vue-demi@0.14.6(vue@3.3.13): resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==, tarball: https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.6.tgz} engines: {node: '>=12'} diff --git a/src/main.ts b/src/main.ts index d552c70f..867565de 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,6 +15,7 @@ import '@/styles/index.scss' import '@/assets/font/iconfont.css' import { ElDialog } from 'element-plus' import BaiduMap from 'vue-baidu-map-3x' +import BaiduMapOffline from 'vue-baidu-map-offline'; import ExcelJS from 'exceljs' import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx' // 方式1:NPM 安装,注入 ExcelJS 对象 @@ -24,12 +25,15 @@ VXETable.use(VXETablePluginExportXLSX, { window.XEUtils = XEUtils const app = createApp(App) - +//开启离线地图 +// app.use(BaiduMapOffline, { +// offline: true, +// offlineUrl: window.location.origin + '/map/', +// }); app.use(BaiduMap, { - ak: 'RpQi6WNFZ9tseKzhdwOQsXwFsoVntnsN', - - // type: 'WebGL' // ||API 默认API (使用此模式 BMap=BMapGL) -}) + ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK', + v: '3.0', +}); app.use(router) app.use(pinia) app.use(ElementPlus) diff --git a/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue index 763a8918..008d4eeb 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue @@ -1,5 +1,5 @@