poi搜索
This commit is contained in:
1
src/renderer/components.d.ts
vendored
1
src/renderer/components.d.ts
vendored
@ -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']
|
||||
|
||||
12
src/renderer/public/sdk/YJEarth.min.js
vendored
12
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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"
|
||||
@ -471,6 +471,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: '度',
|
||||
@ -493,6 +515,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 () => {
|
||||
|
||||
@ -85,6 +85,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()
|
||||
|
||||
@ -139,6 +141,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()
|
||||
|
||||
@ -267,19 +291,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 = []
|
||||
|
||||
Reference in New Issue
Block a user