月球大数据地理空间分析展示平台-【前端】-月球2期前端
1
WX
2023-07-13 95db84d44298bf695b843d7555d671a41595c814
src/views/layer/attributeList.vue
@@ -3,7 +3,7 @@
    <!--     v-resizable="'right, bottom'" -->
    <div class="spatialTitle">
      <label>空间查询</label>
      <el-icon @click="setSpatialClose" :size="20">
      <el-icon @click="setSpatialClose" :size="20" style="cursor: pointer">
        <Close />
      </el-icon>
    </div>
@@ -48,6 +48,7 @@
  defineProps,
  defineEmits,
  nextTick,
  watch,
} from "vue";
import config from "@/assets/js/Map/config";
import { User, Lock, Plus } from "@element-plus/icons-vue";
@@ -55,9 +56,9 @@
import { ElMessage } from "element-plus";
import store from "@/store";
const emits = defineEmits(["SETspatialClose"]);
const emits = defineEmits(["spatialClose"]);
const setSpatialClose = () => {
  emits("SETspatialClose", false);
  emits("spatialClose", false);
};
const dialogVisible = ref(false);
const listData = ref({
@@ -79,6 +80,14 @@
  value: "",
  cut: "",
});
//defineProps 来接收组件的传值
const props = defineProps({
  layerData: {
    type: Object,
  },
});
const handleSizeChange = (res) => {
  listData.value.pageSize = res;
  setQueySpatialData();
@@ -99,6 +108,7 @@
};
const setQueySpatialFields = async () => {
  console.log(props.layerData);
  const data = await dataQuery_selectFields({ name: listData.value.name });
  if (data.code != 200) {
    return ElMessage.error("字段查询失败");
@@ -144,9 +154,16 @@
  //
  setQueySpatialFields();
};
onMounted(() => {
  startQueryData();
});
watch(
  () => props.layerData,
  (nVal, oVal) => {
    console.log("值发生了变更", nVal, oVal);
    startQueryData();
  },
  { deep: true }
);
onMounted(() => {});
</script>
<style lang="less" scoped>
@@ -157,7 +174,7 @@
  flex-direction: column;
  position: absolute;
  bottom: 5%;
  right: 5%;
  left: 100%;
  background: rgba(7, 8, 14, 0.8);
  border: 1px solid #d6e4ff;
  z-index: 10;