| | |
| | | <el-input |
| | | v-model="searchValue" |
| | | class="searchInput" |
| | | placeholder="请输入地名" |
| | | placeholder="请输入地名或经纬度" |
| | | > |
| | | <template #suffix> |
| | | <el-icon |
| | |
| | | @click="setPointLocal(item)" |
| | | > |
| | | <div class="table_th_x">{{ flag + 1 }}</div> |
| | | <div class="table_th">{{ item.enName }}</div> |
| | | <div class="table_th">{{ item.name }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | ArrowRight, |
| | | DArrowRight, |
| | | } from "@element-plus/icons-vue"; |
| | | import config from "@/assets/js/Map/config"; |
| | | // import config from "../../../public/config/config.js"; |
| | | import { dataQuery_selectByPage } from "@/api/api.js"; |
| | | import { ElMessage } from "element-plus"; |
| | | import menuTool from "@/assets/js/Map/menuTool"; |
| | | let searchValue = ref(""); |
| | | const searchFLag = ref(false); |
| | | const tableData = ref([]); |
| | |
| | | const NumhandleChange = (value: number) => {}; |
| | | const handleChange = (val: string[]) => {}; |
| | | const setPoitCannel = () => { |
| | | imageLabel.deleteObject(); |
| | | imageLabel = null; |
| | | // if (imageLabel) { |
| | | // imageLabel.deleteObject(); |
| | | // imageLabel = null; |
| | | // } |
| | | menuTool.setClearLocation("地名定位"); |
| | | }; |
| | | const setPointLocal = (res) => { |
| | | if (imageLabel) { |
| | | setPoitCannel(); |
| | | } |
| | | setPoitCannel(); |
| | | |
| | | var position = { X: res.lon, Y: res.lat, Altitude: 10 }; |
| | | imageLabel = window.sgworld.Creator.CreateImageLabel( |
| | | position, |
| | | config.StaticFileBaseUrl + "/Workers/image/mark.png", |
| | | {}, |
| | | 0, |
| | | "标签点" |
| | | ); |
| | | var id = imageLabel.item.id; |
| | | window.sgworld.Navigate.flyToObj(imageLabel.item); |
| | | menuTool.setLocationPoint([res.lon, res.lat], "地名定位"); |
| | | // imageLabel = window.sgworld.Creator.CreateImageLabel( |
| | | // position, |
| | | // config.StaticFileBaseUrl + "/Workers/image/location.png", |
| | | // {}, |
| | | // 0, |
| | | // "标签点" |
| | | // ); |
| | | // var id = imageLabel.item.id; |
| | | // window.sgworld.Navigate.flyToObj(imageLabel.item); |
| | | // window.earthCtrl.camera.flyTo(res.log, res.lat, 300, 9.5, -45, 0.0, 5); |
| | | }; |
| | | const setInputCahgne = () => { |
| | |
| | | |
| | | searchValue.value = ""; |
| | | setPoitCannel(); |
| | | menuTool.setLocalPositionClose(); |
| | | }; |
| | | const setSearchClick = async () => { |
| | | if (!searchValue.value) return; |
| | | if (searchValue.value.indexOf(",") > -1) { |
| | | var coord = searchValue.value.split(","); |
| | | |
| | | var obj = { |
| | | filter: "name like '" + searchValue.value + "'", |
| | | pageIndex: listData.value.pageIndex, |
| | | pageSize: listData.value.pageSize, |
| | | name: "lunarplacename", |
| | | hasGeom: 1, |
| | | }; |
| | | const data = await dataQuery_selectByPage(obj); |
| | | if (data.code != 200) { |
| | | return ElMessage(data.msg); |
| | | var ruleForm = { |
| | | lon: coord[0], |
| | | lat: coord[1], |
| | | alt: coord[2], |
| | | }; |
| | | menuTool.setLocalPosition(ruleForm); |
| | | } else { |
| | | var obj = { |
| | | filter: |
| | | "name like '" + |
| | | searchValue.value + |
| | | "' or enName like " + |
| | | searchValue.value, |
| | | pageIndex: listData.value.pageIndex, |
| | | pageSize: listData.value.pageSize, |
| | | name: "lunarplacename", |
| | | hasGeom: 1, |
| | | }; |
| | | const data = await dataQuery_selectByPage(obj); |
| | | if (data.code != 200) { |
| | | return ElMessage(data.msg); |
| | | } |
| | | tableData.value = data.result; |
| | | listData.value.count = data.count; |
| | | listData.value.page = Math.ceil(data.count / 10); |
| | | searchFLag.value = true; |
| | | } |
| | | tableData.value = data.result; |
| | | listData.value.count = data.count; |
| | | listData.value.page = Math.ceil(data.count / 10); |
| | | searchFLag.value = true; |
| | | }; |
| | | |
| | | onMounted(() => {}); |
| | |
| | | // height: auto; |
| | | position: absolute; |
| | | top: 0; |
| | | right: -270px; |
| | | right: -255px; |
| | | z-index: 101; |
| | | } |
| | | .searchInput { |