| | |
| | | <el-input |
| | | v-model="searchValue" |
| | | class="searchInput" |
| | | placeholder="请输入地名" |
| | | placeholder="请输入地名或经纬度" |
| | | > |
| | | <template #suffix> |
| | | <el-icon |
| | |
| | | > |
| | | <div class="search_content_text">总查询结果:{{ listData.count }}</div> |
| | | <div class="search_content_text paging"> |
| | | 总页数:{{listData.page }} |
| | | 总页数:{{ listData.page }} |
| | | <el-button |
| | | size="small" |
| | | text |
| | |
| | | /> |
| | | </div> |
| | | <div class="table_box"> |
| | | |
| | | <div class="table_header"> |
| | | <div class="table_th_x">序号</div> |
| | | <div class="table_th">地名</div> |
| | |
| | | <div class="table_childer"> |
| | | <div |
| | | class="table_tr" |
| | | v-for='(item,flag) in tableData' |
| | | v-for="(item, flag) in tableData" |
| | | @click="setPointLocal(item)" |
| | | > |
| | | <div class="table_th_x">{{ flag +1}}</div> |
| | | <div class="table_th">{{ item.enName }}</div> |
| | | <div class="table_th_x">{{ flag + 1 }}</div> |
| | | <div class="table_th">{{ item.name }}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </el-collapse-item> |
| | |
| | | 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([]); |
| | |
| | | pageSize: 10, |
| | | }); |
| | | const imageLabel = null; |
| | | const NumhandleChange = (value: number) => { |
| | | console.log(value); |
| | | }; |
| | | const handleChange = (val: string[]) => { |
| | | console.log(val); |
| | | }; |
| | | 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) return; |
| | | 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: "lunarplacenane", |
| | | 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(() => {}); |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .searchBox { |
| | | margin-left: 34px; |
| | | // margin-left: 34px; |
| | | // height: auto; |
| | | position: absolute; |
| | | top: 0; |
| | | right: -255px; |
| | | z-index: 101; |
| | | } |
| | | .searchInput { |
| | | width: 243px; |
| | |
| | | width: 243px; |
| | | // background: rgba(7, 8, 14, 0.8); |
| | | border-radius: 4px; |
| | | z-index: 40px; |
| | | .el-collapse, |
| | | /deep/ .el-collapse-item__wrap { |
| | | border: 0; |