管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-03-03 b6c8e7c61f0270598ba7fdbc44f79512e010d0fe
src/components/MapView/mapSpaceTop.vue
@@ -57,34 +57,34 @@
</template>
<script>
import queryinfo from "../../views/Tools/queryinfo.vue"
import { inquiry_SelectTabs, dataLib_selectTabs } from '../../api/api.js';
import queryinfo from "../../views/Tools/queryinfo.vue";
import { inquiry_SelectTabs, dataLib_selectTabs } from "../../api/api.js";
export default {
  components: { queryinfo },
  data() {
    return {
      menuTopFrom: {
        queryLayer: '',
        queryLayer: "",
      },
      layerData: [
        {
          id: 1,
          label: '基础数据',
          tabDesc: '基础数据',
          value: 'BD',
          children: [],
        },
        {
          id: 2,
          label: '业务数据',
          tabDesc: '业务数据',
          value: 'BS',
          children: [],
        },
        // {
        //   id: 1,
        //   label: '基础数据',
        //   tabDesc: '基础数据',
        //   value: 'BD',
        //   children: [],
        // },
        // {
        //   id: 2,
        //   label: '业务数据',
        //   tabDesc: '业务数据',
        //   value: 'BS',
        //   children: [],
        // },
      ],
      defaultProps: {
        children: 'children',
        label: 'label',
        children: "children",
        label: "label",
      },
      mapSpaceQueryLayer: null,
    };
@@ -97,18 +97,19 @@
      // const data = await inquiry_SelectTabs();
      const data = await dataLib_selectTabs({
        pageIndex: 1,
        pageSize: 500
      })
        pageSize: 500,
      });
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        this.$message.error("列表调用失败");
      }
      var option = data.result;
      this.layerData = option.filter((res) => {
        if (res.rows != 0) {
          return res;
        }
      })
      });
      // for (var i in option) {
      //   // console.log(option[i].tableType)
@@ -125,30 +126,34 @@
    getCheckedNodes() {
      this.$store.state.mapSpaceQueryLayer = this.mapSpaceQueryLayer;
      // this.$store.state.mapPopBoolean = true;
      this.$store.state.mapPopBoxFlag = '2';
      this.$store.state.mapPopBoxFlag = "2";
      this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close();
      this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("属性", null, {
        close: () => {
      this.$refs &&
        this.$refs.queryinfo &&
        this.$refs.queryinfo.open("属性", null, {
          close: () => {
            if (this.$store.state.primitLayer != null) {
              sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
              this.$store.state.primitLayer = null;
            }
          if (this.$store.state.primitLayer != null) {
            sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
            this.$store.state.primitLayer = null;
          }
          if (window.Viewer.scene.primitives.length != 0) {
            window.Viewer.scene.primitives.removeAll()
          }
        }
      });
            if (window.Viewer.scene.primitives.length != 0) {
              window.Viewer.scene.primitives.removeAll();
            }
          },
        });
    },
    resetCheckedNodes() {
      this.menuTopFrom.queryLayer = null;
      this.$refs.treeForm.setCheckedKeys([]);
    },
    menuTreeCheck(value) {
      this.mapSpaceQueryLayer = value;
      this.layerData.forEach(item => {
        if (this.menuTopFrom.queryLayer == item.entity){
          this.$store.state.propertiesName = item;
        }
      })
      this.getCheckedNodes();
    },
  },
@@ -164,5 +169,4 @@
  overflow: hidden;
}
</style>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>