北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
11
少年
2024-01-22 b215847e8958a91c1ddbf71020938941e2c9725e
src/components/sideMenu/layerMenu/layerPanel.vue
@@ -133,7 +133,6 @@
import store from "@/utils/store.js";
import ZTTitem from "@/utils/ztt.js";
import { layers } from "../../../../static/json/layer.js";
import { set } from "ol/transform.js";
export default {
  name: "LayerPanel",
  data() {
@@ -252,6 +251,7 @@
      curZTIndex: -1,
      state: store.thematicLayer,
      basicMapChecked: store.basicMapChecked.val,
      state1: store.tdglInfo,
    };
  },
  mounted() {
@@ -477,6 +477,7 @@
    handleFuncClick(index) {
      if (this.curFuncIndex == index) {
        store.setTdglFlag(false);
        store.setSliderShow(false);
        store.setPoplayerListAction({});
        divPoint3 && divPoint3.deleteObject();
        store.setPoplayerShowAction(false);
@@ -496,6 +497,8 @@
        store.setMenuListShow(false);
        // 隐藏底部漫游面板
        store.setRoamPanelShow(false);
        //显示滑动条
        store.setSliderShow(true);
        this.curFuncIndex = index;
        switch (index) {
          case 0:
@@ -514,7 +517,8 @@
                  layers[8].children[0].tileType === "Geo"
                    ? new Cesium.GeographicTilingScheme()
                    : new Cesium.WebMercatorTilingScheme(),
                alpha: layers[8].children[0].alpha,
                // alpha: layers[8].children[0].alpha,
                alpha: this.alpha,
              },
              "0",
              layers[8].children[0].zIndex,
@@ -522,7 +526,6 @@
              ""
            );
            store.setTdglFlag(true);
            break;
          case 1:
            this.curFuncIndex = -1;
@@ -579,6 +582,17 @@
      immediate: true, //刷新加载 立马触发一次handler
      deep: true, // 可以深度检测到 obj 对象的属性值的变化
    },
    // "state1.alpha": {
    //   handler: function (newVal) {
    //     this.handleFuncClick(0);
    //   },
    //   deep: true,
    // },
  },
  computed: {
    alpha() {
      return store.tdglInfo.alpha;
    },
  },
};
</script>