月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-09-14 be3618780ef924115aa63bf40ac56b515025eab7
src/views/search/search.vue
@@ -7,20 +7,37 @@
        placeholder="请输入地名"
      >
        <template #suffix>
          <el-icon title="清除" @click="setSearchClose" class="el-input__icon">
          <el-icon
            title="清除"
            @click="setSearchClose"
            class="el-input__icon"
          >
            <Close />
          </el-icon>
        </template>
        <template #prefix>
          <el-icon @click="setSearchClick" title="查询" class="el-input__icon">
          <el-icon
            @click="setSearchClick"
            title="查询"
            class="el-input__icon"
          >
            <search />
          </el-icon>
        </template>
      </el-input>
    </div>
    <div v-if="searchFLag" class="search_content">
      <el-collapse v-model="activeNames" @change="handleChange">
        <el-collapse-item title="查询结果" name="1">
    <div
      v-if="searchFLag"
      class="search_content"
    >
      <el-collapse
        v-model="activeNames"
        @change="handleChange"
      >
        <el-collapse-item
          title="查询结果"
          name="1"
        >
          <div class="search_content_text">总查询结果:{{ listData.count }}</div>
          <div class="search_content_text paging">
            总页数:{{ listData.page }}
@@ -70,7 +87,7 @@
                @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>
@@ -95,9 +112,10 @@
  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([]);
@@ -109,30 +127,29 @@
  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 = () => {
@@ -185,7 +202,7 @@
    filter: "name like '" + searchValue.value + "'",
    pageIndex: listData.value.pageIndex,
    pageSize: listData.value.pageSize,
    name: "lunarplacenane",
    name: "lunarplacename",
    hasGeom: 1,
  };
  const data = await dataQuery_selectByPage(obj);
@@ -206,7 +223,8 @@
  // height: auto;
  position: absolute;
  top: 0;
  right: -277px;
  right: -270px;
  z-index: 101;
}
.searchInput {
  width: 243px;
@@ -220,6 +238,7 @@
  width: 243px;
  //   background: rgba(7, 8, 14, 0.8);
  border-radius: 4px;
  z-index: 40px;
  .el-collapse,
  /deep/ .el-collapse-item__wrap {
    border: 0;