wangjuncheng
2025-04-23 8a368655576fd4eb3f517610aa8b30d633f1ea84
change
已修改8个文件
29 ■■■■■ 文件已修改
src/components/monifangzhen/schemeInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/LayerTree.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/Message.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/area.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/area_all.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/GisView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mnfz.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/monifangzhen/schemeInfo.vue
@@ -59,7 +59,7 @@
watch(
  () => props.selectedScheme,
  (newScheme) => {
    console.log(newScheme, "弹窗的数据");
    // console.log(newScheme, "弹窗的数据");
    // 检查数据有效性
    if (!newScheme || typeof newScheme !== "object") {
src/components/tools/LayerTree.vue
@@ -204,16 +204,12 @@
 */
function toggleLayerVisible(name, checked) {
  const entityList = treeMap.get(name);
  console.log(`Toggling visibility for ${name}:`, checked);
  if (Array.isArray(entityList)) {
    entityList.forEach((entity) => {
      console.log(`Setting entity show to:`, checked);
      entity.show = checked;
    });
  } else if (entityList && typeof entityList.show !== "undefined") {
    console.log(`Setting layer show to:`, checked);
    entityList.show = checked;
  } else {
    console.error(`无法设置图层 ${name} 的可见性`);
@@ -228,7 +224,6 @@
 */
const getDevicetList = async () => {
  await getDevicetListData().then((res) => {
    console.log(res.data, "devicetList.value2");
    devicetList.value = res.data;
  });
};
src/components/tools/Message.vue
@@ -27,7 +27,7 @@
watch(
  () => props.mesData,
  (newMesData) => {
    console.log(newMesData, '弹窗的数据');
    // console.log(newMesData, '弹窗的数据');
    // 检查数据有效性
    if (!newMesData || typeof newMesData !== "object") {
src/utils/area.js
@@ -14,7 +14,7 @@
    // 获取 GeoJSON 中的第一个 Polygon feature
    return dataSourcePromise.then(function (dataSource) {
        viewer.dataSources.add(dataSource)
        console.log("dataSource", dataSource)
        // console.log("dataSource", dataSource)
        // 获取 GeoJSON 中的第一个 Polygon feature
        areaDataSource.push(dataSource)
@@ -25,7 +25,7 @@
        // return areaPrimitive
        const polygonEntity = dataSource.entities.values
        console.log("polygonEntity", polygonEntity)
        // console.log("polygonEntity", polygonEntity)
        const distanceDisplayCondition = new Cesium.DistanceDisplayCondition(1000, 50000000)
        polygonEntity.forEach(entity => {
            // console.log("entity", entity)
@@ -211,7 +211,7 @@
        dataSource.name = name
        // viewer.dataSources.add(dataSource)
        // 获取 GeoJSON 中的第一个 Polygon feature
        console.log("dataSource", dataSource)
        // console.log("dataSource", dataSource)
        const polygonEntity = dataSource.entities.values
        areaLineEntities.push(...polygonEntity)
src/utils/area_all.js
@@ -16,11 +16,11 @@
    // 获取 GeoJSON 中的 Polygon feature
    return dataSourcePromise.then(function (dataSource) {
        viewer.dataSources.add(dataSource);
        console.log("GeoJSON data loaded:", dataSource);
        // console.log("GeoJSON data loaded:", dataSource);
        areaDataSource.push(dataSource);
        const polygonEntity = dataSource.entities.values;
        console.log("Entities in dataSource:", polygonEntity);
        // console.log("Entities in dataSource:", polygonEntity);
        // 初始化效果
        applyPolygonEffects(polygonEntity, color);
@@ -33,7 +33,7 @@
}
function applyPolygonEffects(entities, color) {
    console.log("Applying polygon effects...");
    // console.log("Applying polygon effects...");
    entities.forEach(entity => {
        entity.polygon.heightReference = Cesium.HeightReference.NONE;
        entity.polygon.material = new Cesium.ColorMaterialProperty(color); // 设置填充颜色
@@ -44,7 +44,7 @@
        if (!viewer.entities.getById(entity.id)) {
            viewer.entities.add(entity);
        }
        console.log("Effect applied to entity:", entity.id);
        // console.log("Effect applied to entity:", entity.id);
    });
}
src/views/GisView.vue
@@ -49,7 +49,7 @@
  return dataSourcePromise.then(function (dataSource) {
    viewer.dataSources.add(dataSource)
    const polygonEntity = dataSource.entities.values
    console.log("polygonEntity", polygonEntity)
    // console.log("polygonEntity", polygonEntity)
    const distanceDisplayCondition = new Cesium.DistanceDisplayCondition(1000, 50000000)
    polygonEntity.forEach(entity => {
      // console.log("entity", entity)
src/views/Home.vue
@@ -104,7 +104,7 @@
  getSimData() //测试tr后端
  try {
    const wktResult = convertToWKT(multiPolygonCoordinates);
    console.log(wktResult,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
    // console.log(wktResult,'a');
    // 输出: MULTIPOLYGON(((120.123456 30.654321,120.234567 30.765432,120.345678 30.876543,120.123456 30.654321)))
  } catch (error) {
    console.error(error.message);
src/views/mnfz.vue
@@ -266,7 +266,6 @@
// 添加事件监听器,接收来自表格组件的事件
function setupRowClickListener(dataSources) {
  if (!Array.isArray(dataSources) || dataSources.length === 0) {
    console.error("Data sources array is undefined or empty!");
    return;
  }
  EventBus.on("row-clicked", (id) => {
@@ -294,7 +293,6 @@
// 根据ID查找实体
function findEntityById(id, dataSources) {
  if (!Array.isArray(dataSources) || dataSources.length === 0) {
    console.error("Data sources array is undefined or empty!");
    return null;
  }
  console.log("Searching for ID:", id);