北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2023-11-15 c658f316d2f464e510d10f1081c52848c3aefeb2
src/components/left/leftmenu.vue
@@ -464,18 +464,18 @@
    //获取token并请求加载图层数据
    this.SmartEarthToken = common.smartearthtoken;
    this.$nextTick(() => {
      getmenu().then((response) => {
        // // 得到默认选中的数据的id
        // this.parseJson(response.data); //场景配置
        // this.treeData = response.data;
        // this.setDefaultCheck(response.data);
        //   setTimeout(() => {
        //     this.randomSelectLayer();
        //     let selectedLayers = this.$refs.tree.getCheckedNodes();
        //     // .filter((item) => item.sourceType == "cluster");
        //     this.$store.commit("selectedLayer", selectedLayers);
        //   }, 1000);
      });
      // getmenu().then((response) => {
      //   // // 得到默认选中的数据的id
      //   // this.parseJson(response.data); //场景配置
      //   // this.treeData = response.data;
      //   // this.setDefaultCheck(response.data);
      //   //   setTimeout(() => {
      //   //     this.randomSelectLayer();
      //   //     let selectedLayers = this.$refs.tree.getCheckedNodes();
      //   //     // .filter((item) => item.sourceType == "cluster");
      //   //     this.$store.commit("selectedLayer", selectedLayers);
      //   //   }, 1000);
      // });
      this.getLayersData("./static/layers.json");
      // axios.get("./static/layers.json").then(
      //   (response) => {
@@ -545,6 +545,10 @@
    Bus.$on("showSPJK", () => {
      this.$refs.tree.setChecked("zhianjiankong", true, true);
      this.setChecked("zhianjiankong", true);
    });
    Bus.$on("closeSPJK", () => {
      this.$refs.tree.setChecked("zhianjiankong", false, false);
      this.setChecked("zhianjiankong", false);
    });
    //关闭菜单弹窗
    Bus.$on("closeMenuPop", (data) => {
@@ -3033,6 +3037,10 @@
  /* box-shadow: 0px 0px 5px 2px #a8a8a8; */
}
.leftmenu:hover {
  background-image: url("~@/assets/img/new/treeClose-y.png");
}
.leftmenu {
  background-image: url("~@/assets/img/new/treeClose.png");
  background-size: 100% 100%;
@@ -3097,32 +3105,34 @@
  font-size: 14px;
}
.layerTree::-webkit-scrollbar {
::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 4px;
  width: 5px;
  /*高宽分别对应横竖滚动条的尺寸*/
  height: 4px;
  height: 8px;
  scrollbar-arrow-color: red;
}
.layerTree::-webkit-scrollbar-thumb {
/* 滚动条 */
::-webkit-scrollbar-thumb {
  border-radius: 5px;
  -webkit-box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.5);
  -webkit-box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
  box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
  background: rgba(218, 218, 218, 0.5);
  scrollbar-arrow-color: red;
}
.layerTree::-webkit-scrollbar-track {
/* 滚动槽 */
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
  box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
  border-radius: 0;
  background: rgba(218, 218, 218, 0.1);
}
.el-tree .TreeNodeClass {
  width: 100%;
  background-color: #bfa;
  flex: 1;
  display: flex;
  align-items: center;