This commit is contained in:
zh
2025-10-23 18:20:20 +08:00
11 changed files with 209 additions and 128 deletions

View File

@ -26,6 +26,7 @@ declare module 'vue' {
ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
ElSlider: typeof import('element-plus/es')['ElSlider']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,5 @@
import request from '@/axios/request'
import { param } from 'jquery'
export const TreeApi = {
// 查询树的所有节点
@ -81,6 +82,12 @@ export const TreeApi = {
return await request.get({
url: `/source/default`
})
},
queryPOI: async (data) => {
return await request.get({
url: `/poi/data`,
params: data
})
}
}

View File

@ -55,10 +55,11 @@ import { useI18n } from 'vue-i18n'
import uploadFiles from '@/components/upload/uploadFiles.vue'
import { AuthApi } from '@/api/setting/auth'
import useClipboard from 'vue-clipboard3'
import { ElMessage, ElMessageBox } from 'element-plus'
const eventBus: any = inject('bus')
const { t } = useI18n()
const authInfo:any = ref({
const authInfo: any = ref({
license_code: '',
//授权信息
generateTime: '', //开始时间
@ -94,7 +95,7 @@ const getStatus = () => {
} else {
authInfo.value.status = false
}
(window as any).checkAuthIsValid = authInfo.value.status
;(window as any).checkAuthIsValid = authInfo.value.status
}
const getAuthCode = async () => {
const res = await AuthApi.authInfo()
@ -109,8 +110,10 @@ const copy = async (text) => {
try {
await toClipboard(text)
console.log('复制成功')
ElMessage.success('复制成功')
} catch (e) {
console.error('复制失败', e)
ElMessage.error('复制失败')
}
}
</script>

View File

@ -117,17 +117,17 @@
<div class="engineering_title2">
<span class="fankuai"></span>
<span class="setting_title">工程数据</span>
<el-button color="#004b4b" style="border: 1px solid rgba(var(--color-base1), 0.5)">
<template #icon>
<svg-icon name="leading_in" />
</template>
<span>工程覆盖导入</span>
</el-button>
<el-button
@click="importProject"
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
>
<template #icon>
<svg-icon name="leading_in" />
</template>
<span>工程覆盖导入</span>
</el-button>
<el-button color="#004b4b" style="border: 1px solid rgba(var(--color-base1), 0.5)">
<template #icon>
<svg-icon name="leading_in" />
</template>
@ -326,10 +326,11 @@ const importProject = () => {
if (paths.length > 0) {
// let loadingInstance = this.$openLoading('拼命导入中...')
importWin = false
// let arr = getElectronPath().replaceAll('\\', '/').split('/')
// arr.pop()
let path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth'
unzip_file(paths[0], path)
let arr = getElectronPath().replaceAll('\\', '/').split('/')
console.log(arr, 'arrarr')
arr.pop()
// let path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth'
unzip_file(paths[0], arr.join('/'))
.then((res) => {
// loadingInstance.close()
ElMessage({
@ -348,6 +349,10 @@ const importProject = () => {
})
.catch((err) => {
console.log(err)
ElMessage({
message: err,
type: 'warning'
})
})
} else {
importWin = false
@ -358,7 +363,7 @@ const importProject = () => {
// import Store from 'electron-store'
const getElectronPath = () => {
const Store = require('electron-store')
let Store = require('electron-store')
const store = new Store()
console.log(store.path)
return store.path
@ -461,11 +466,12 @@ function derive() {
// let loadingInstance = this.$openLoading('拼命导出中...')
exportWin = !exportWin
console.log('111111')
// let arr = getElectronPath().replaceAll('\\', '/').split('/')
// console.log(arr, '222222')
// arr[arr.length - 1] = 'database.ydb'
// let db_path: any = arr.join('/')
let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
let arr = getElectronPath().replaceAll('\\', '/').split('/')
console.log(arr, '222222')
arr.pop()
arr[arr.length - 1] = 'yjearth/app.db'
let db_path: any = arr.join('/')
// let db_path: any = 'C:/Users/Administrator/AppData/Roaming/yjearth/app.db'
zip_file([db_path], path, () => {
// loadingInstance.close()
ElMessage({

View File

@ -116,7 +116,7 @@
</div>
<div v-show="isHotGroupOpen2">
<el-option
v-for="item in name_map"
v-for="item in name_map2"
:key="item.epsg"
:label="item.name"
:value="item.epsg"
@ -473,6 +473,28 @@ const concurrentWorkloadList = ref([
])
const name_map: any = ref([])
const name_map1: any = ref([])
const name_map2: any = ref([
{
epsg: 'EPSG:32601',
name: 'WGS84 通用横轴墨卡托投影'
},
{
epsg: 'EPSG:4534',
name: '2000 坐标 3 度不带代号'
},
{
epsg: 'EPSG:4513',
name: '2000 坐标 3 度带代号'
},
{
epsg: 'EPSG:4502',
name: '2000 坐标 6 度不带代号'
},
{
epsg: 'EPSG:4491',
name: '2000 坐标 6 度带代号'
}
])
const position_map: any = ref([
{
name: '度',
@ -495,6 +517,7 @@ concurrentcode.value = localStorage.getItem('concurrentcode') || 10
//系统坐标系
let tool = new YJ.Tools(window.earth)
name_map.value = Array.from(tool.name_map.values())
console.log(name_map.value, 'ooooooo')
name_map1.value = name_map.value.splice(0, 2)
const sysChange = async () => {

View File

@ -133,6 +133,8 @@ import { $changeComponentShow } from '@/utils/communication'
import { ref, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import { bus } from '@/utils/bus'
import { TreeApi } from '@/api/tree'
import { get } from 'jquery'
const { initTree, rightMenuRef, initTreeCallBack } = useTree()
@ -187,6 +189,28 @@ const selectChange = (val) => {
; (window as any).searchPlaceEntity.remove()
}
}
// let poiNum: any = 1
// let poiPage: any = 10
// const loadMore = () => {
// poiNum++
// getPoiList(searchKey.value.trim())
// }
// const getPoiList = (name) => {
// TreeApi.queryPOI({ name: name, pageNum: poiNum, pageSize: poiPage }).then((res) => {
// console.log(res, 'resres')
// // poiOptions.value = res.data
// // if (poiOptions.value.length) {
// if (res.data.length) {
// res.data = res.data.map((item) => {
// item.search_key = item.name
// return item
// })
// poiOptions.value = poiOptions.value.concat(res.data)
// select1.value.toggleMenu()
// }
// loading.value = false
// })
// }
const clearResult = () => {
let string = searchKey.value.trim()
@ -315,19 +339,24 @@ const searchPlace = debounce(function () {
}
} else if (way == 'poi') {
let string = searchKey.value.trim()
// if (string)
// queryPOI({ key: string }, (res) => {
// poiOptions.value = res.list
// if (poiOptions.value.length) {
// select1.value.toggleMenu()
// }
// loading.value = false
// })
// else
// ElMessage({
// message: '请输入搜索关键字',
// type: 'warning'
// })
if (string) {
TreeApi.queryPOI({ name: string, pageNum: 1, pageSize: 1000 }).then((res) => {
console.log(res, 'resres')
poiOptions.value = res.data
if (poiOptions.value.length) {
poiOptions.value = poiOptions.value.map((item) => {
item.search_key = item.name
return item
})
select1.value.toggleMenu()
}
loading.value = false
})
} else
ElMessage({
message: '请输入搜索关键字',
type: 'warning'
})
}
} else {
poiOptions.value = []

View File

@ -75,7 +75,7 @@ import attackArrow from '../components/propertyBox/attackArrow.vue'
import richText from '../components/propertyBox/richText.vue'
import groundText from '../components/propertyBox/groundText.vue'
import standText from '../components/propertyBox/standText.vue'
import circleObject from '../components/propertyBox/circleObject.vue'
import circleObject from '../components/propertyBox/CircleObject.vue'
import addDirectory from '@/components/dialog/directory.vue'
import editDirectory from '@/components/dialog/directoryEdit.vue'
import firstMenu from '@/views/components/leftSide/leftSideFirst.vue'