diff --git a/.env b/.env index 5eb9c9dd..e1024599 100644 --- a/.env +++ b/.env @@ -24,6 +24,5 @@ VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码 VITE_APP_DEFAULT_LOGIN_USERNAME = admin VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123 -# 高德地图 -VITE_AMAP_KEY='48eb85e0e245e293a0b61474943b177c' -VITE_AMAP_SECURITY_CODE='86a45878caff8c0c60d88e80a93ddadd' \ No newline at end of file +# 百度地图 +VITE_BAIDU_MAP_KEY = 'efHIw2qmH8RzHPxK0z0rbCgzDVLup9LD' \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5fdb4b63..ca57a521 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "2.5.0-snapshot", "license": "MIT", "dependencies": { - "@amap/amap-jsapi-loader": "^1.0.1", "@element-plus/icons-vue": "^2.1.0", "@form-create/designer": "^3.2.6", "@form-create/element-ui": "^3.2.11", diff --git a/package.json b/package.json index eeb59e50..43c851f5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "lint:lint-staged": "lint-staged -c " }, "dependencies": { - "@amap/amap-jsapi-loader": "^1.0.1", "@element-plus/icons-vue": "^2.1.0", "@form-create/designer": "^3.2.6", "@form-create/element-ui": "^3.2.11", diff --git a/src/components/Map/index.vue b/src/components/Map/index.vue index eda8449c..0386fafd 100644 --- a/src/components/Map/index.vue +++ b/src/components/Map/index.vue @@ -1,12 +1,10 @@ - - + + \ No newline at end of file diff --git a/src/views/iot/device/device/DeviceForm.vue b/src/views/iot/device/device/DeviceForm.vue index 9fe57888..ca3584b0 100644 --- a/src/views/iot/device/device/DeviceForm.vue +++ b/src/views/iot/device/device/DeviceForm.vue @@ -93,14 +93,14 @@ @blur="updateLocationFromCoordinates" /> -
+
@@ -151,7 +151,7 @@ const formData = ref({ groupIds: [] as number[] }) -// 监听经纬度变化,更新location +/** 监听经纬度变化,更新location */ watch([() => formData.value.longitude, () => formData.value.latitude], ([newLong, newLat]) => { if (newLong && newLat) { formData.value.location = `${newLong},${newLat}` diff --git a/src/views/iot/device/device/detail/DeviceDetailsInfo.vue b/src/views/iot/device/device/detail/DeviceDetailsInfo.vue index 9500982e..39a226d4 100644 --- a/src/views/iot/device/device/detail/DeviceDetailsInfo.vue +++ b/src/views/iot/device/device/detail/DeviceDetailsInfo.vue @@ -151,12 +151,12 @@ const authPasswordVisible = ref(false) // 定义密码可见性状态 const authInfo = ref({} as IotDeviceAuthInfoVO) // 定义设备认证信息对象 // TODO @AI:注释使用 /** */ 风格,方法注释; -// 控制地图显示的标志 +/** 控制地图显示的标志 */ const showMap = computed(() => { return !!(device.longitude && device.latitude) }) -// 获取位置字符串,用于地图组件 +/** 获取位置字符串,用于地图组件 */ const getLocationString = () => { if (device.longitude && device.latitude) { return `${device.longitude},${device.latitude}`