diff --git a/src/renderer/src/I18n/zh-CN.ts b/src/renderer/src/I18n/zh-CN.ts
index 59dc626..54ac8fb 100644
--- a/src/renderer/src/I18n/zh-CN.ts
+++ b/src/renderer/src/I18n/zh-CN.ts
@@ -163,7 +163,9 @@ export default {
authTime: '授权时间',
authCode: '授权码',
upload: '授权导入',
- authexpire: '授权过期'
+ authexpire: '授权过期',
+ authTempExpire: '临时授权',
+ noAuthexpire: '暂未授权',
},
systemSetting: {
setLanguage: '语言设置',
@@ -188,6 +190,7 @@ export default {
areaUnit: '面积单位',
heightUnit: '高度单位',
speedUnit: '速度单位',
+ administrativeArea: '行政区划',
skinList: {
yingguangse: '荧光色',
gonganlan: '科技蓝',
diff --git a/src/renderer/src/api/route/index.ts b/src/renderer/src/api/route/index.ts
new file mode 100644
index 0000000..09a8140
--- /dev/null
+++ b/src/renderer/src/api/route/index.ts
@@ -0,0 +1,25 @@
+//路径规划
+import request from '@/axios/request'
+export const RouteApi = {
+ // 查看路径
+ queryRoute: async (data: any) => {
+ return await request.post({
+ url: `/graphhopper/route`,
+ data
+ });
+ },
+ //获取地图列表
+ getRouteList: async () => {
+ return await request.get({
+ url: `/graphhopper/list`
+ })
+ },
+ //加载路网数据
+ loadRoute: async (data: any) => {
+ return await request.post({
+ url: `/graphhopper/loadMap`,
+ data,
+ headersType: 'application/x-www-form-urlencoded'
+ })
+ },
+}
diff --git a/src/renderer/src/assets/i18n/lang/local_zh.js b/src/renderer/src/assets/i18n/lang/local_zh.js
index b270dc0..205088f 100644
--- a/src/renderer/src/assets/i18n/lang/local_zh.js
+++ b/src/renderer/src/assets/i18n/lang/local_zh.js
@@ -197,7 +197,9 @@ module.exports = {
authTime: '授权时间',
authCode: '授权码',
upload: '授权导入',
- authexpire: '授权过期'
+ authexpire: '授权过期',
+ authTempExpire: '临时授权',
+ noAuthexpire: '暂未授权'
},
service: {
offline: '离线服务',
diff --git a/src/renderer/src/common/initMapData.ts b/src/renderer/src/common/initMapData.ts
index 396dd72..1614961 100644
--- a/src/renderer/src/common/initMapData.ts
+++ b/src/renderer/src/common/initMapData.ts
@@ -52,7 +52,7 @@ export const initMapData = async (type, data) => {
break
case 'layer':
data.host = baseURL
- console.log('data',data)
+ console.log('data', data)
entityObject = new YJ.Obj.Layer(window.earth, data)
break
case 'tileset':
@@ -97,8 +97,10 @@ export const initMapData = async (type, data) => {
default:
break
}
- options = structuredClone(entityObject.options)
- delete options.host
+ if (entityObject) {
+ options = structuredClone(entityObject.options)
+ delete options.host
+ }
// options = entityObject
return options
}
diff --git a/src/renderer/src/components/upload/uploadFiles.vue b/src/renderer/src/components/upload/uploadFiles.vue
index 4e634aa..67ccaf4 100644
--- a/src/renderer/src/components/upload/uploadFiles.vue
+++ b/src/renderer/src/components/upload/uploadFiles.vue
@@ -19,6 +19,7 @@
@@ -83,8 +119,8 @@ const copy = () => {
.auth_info_text {
color: #fff;
- font-size: 18px;
- font-weight: bolder;
+ font-size: 14px;
+ font-weight: 700;
margin: 7px 0 15px 15px;
display: flex;
align-items: center;
diff --git a/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue b/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue
index 7d19627..72e5482 100644
--- a/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue
+++ b/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue
@@ -3,16 +3,47 @@
工程设置
-
-
-
-
- 路网导入
-
+
+
+
+
+
+
+ 路网导入
+
+
-
+
+
+
+

+
+
+ {{ item.fileName }}
+ {{ item.createdAt }}
+
+
+
+
+ 删除
+
+
+
+
@@ -109,7 +121,100 @@
-
+
-->
+
diff --git a/src/renderer/src/views/components/propertyBox/RoutePlanning.vue b/src/renderer/src/views/components/propertyBox/RoutePlanning.vue
index aecc66a..55a4e73 100644
--- a/src/renderer/src/views/components/propertyBox/RoutePlanning.vue
+++ b/src/renderer/src/views/components/propertyBox/RoutePlanning.vue
@@ -5,30 +5,129 @@
title="路径规划"
left="180px"
top="100px"
+ width="527px"
:closeCallback="closeCallBack"
>
-
-
+
+
+
+ 起点
+
+ 经度
+
+
+
+ 纬度
+
+
+
+ 拾取
+
+
+
+
+
- 绘制
+
+ 查询
+
+
+ 清除路线
+
+ 取消
@@ -37,6 +136,7 @@
import { ref, reactive } from 'vue'
import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue'
+import { RouteApi } from '@/api/route/index.ts'
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
@@ -48,29 +148,148 @@ var endLng: any = ref(null)
var endLat: any = ref(null)
var routePlanning: any = reactive([])
+
+var svgHover: any = reactive([false, false])
eventBus.on('routePlanningDialog', () => {
baseDialog.value?.open()
+ setTimeout(() => {
+ //加载路网数据
+
+ let host = 'http://192.168.110.25:8848'
+ routePlanning = new YJ.Obj.RoutePlanning(window.earth, {
+ gps: false,
+ host
+ })
+ routePlanning.Dialog.queryCallBack = async (v) => {
+ console.log(v, 'vvvvvvvvv')
+ // await queryRoute(params, (response) => {
+ // if (response) {
+ // routePlanning.createRoute(response.list[0].positions)
+ // }
+ // })
+ let res = await RouteApi.queryRoute({
+ startLng: startLng.value,
+ startLat: startLat.value,
+ endLng: endLng.value,
+ endLat: endLat.value,
+ waypoints: []
+ })
+ routePlanning.createRoute(res.data.pathPoints)
+ console.log(res, 'routLIst')
+ }
+ }, 100)
})
-const closeCallBack = (e) => {}
-function pickStartPos() {}
-function pickEndPos() {}
+//加载路网数据
-const draw = (e) => {}
+const addRoute = async (fileId) => {
+ let res = await RouteApi.loadRoute({ fileId })
+ console.log(res, 'res')
+}
+const getList = async () => {
+ let list = await RouteApi.getRouteList()
+ if (list.data.length > 0) {
+ let file = list.data[list.data.length - 1]
+ addRoute(file.id)
+ }
+ console.log(list, 'list')
+}
+
+const closeCallBack = (e) => {
+ startLng.value = null
+ startLat.value = null
+ endLng.value = null
+ endLat.value = null
+}
+const routeQuery = async (e) => {
+ console.log('aaaaa')
+ let res = await RouteApi.queryRoute({
+ startLng: startLng.value,
+ startLat: startLat.value,
+ endLng: endLng.value,
+ endLat: endLat.value,
+ waypoints: []
+ })
+ console.log(res, 'res')
+}
+const clearRoute = (e) => {}
+const pickStartPos = () => {
+ routePlanning.pickStartPos((position) => {
+ console.log(position, 'position')
+ startLng.value = position.lng
+ startLat.value = position.lat
+ })
+}
+const pickEndPos = () => {
+ routePlanning.pickEndPos((position) => {
+ endLng.value = position.lng
+ endLat.value = position.lat
+ })
+}
+
+const close = (e) => {
+ baseDialog.value?.close()
+}
+
+const changeStartLng = () => {
+ routePlanning.startLng = startLng.value
+}
+const inputStartLng = () => {
+ let dom: any = document.getElementById('startLng')
+ if (startLng.value < dom.min * 1) {
+ startLng.value = dom.min * 1
+ } else if (startLng.value > dom.max * 1) {
+ startLng.value = dom.max * 1
+ }
+}
+const changeStartLat = () => {
+ routePlanning.startLat = startLat.value
+}
+const inputStartLat = () => {
+ let dom: any = document.getElementById('startLat')
+ if (startLat.value < dom.min * 1) {
+ startLat.value = dom.min * 1
+ } else if (startLat.value > dom.max * 1) {
+ startLat.value = dom.max * 1
+ }
+}
+const changeEndLng = () => {
+ routePlanning.endLng = endLng.value
+}
+const inputEndLng = () => {
+ let dom: any = document.getElementById('endLng')
+ if (endLng.value < dom.min * 1) {
+ endLng.value = dom.min * 1
+ } else if (endLng.value > dom.max * 1) {
+ endLng.value = dom.max * 1
+ }
+}
+const changeEndLat = () => {
+ routePlanning.endLat = endLat.value
+}
+const inputEndLat = () => {
+ let dom: any = document.getElementById('endLat')
+ if (endLat.value < dom.min * 1) {
+ endLat.value = dom.min * 1
+ } else if (endLat.value > dom.max * 1) {
+ endLat.value = dom.max * 1
+ }
+}
diff --git a/src/renderer/src/views/home/index.vue b/src/renderer/src/views/home/index.vue
index 98fd056..6a34e76 100644
--- a/src/renderer/src/views/home/index.vue
+++ b/src/renderer/src/views/home/index.vue
@@ -10,27 +10,33 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+