fuchengshen
2022-07-09 3a25c05b5ab837714f30469cdcb1e2a77d8d7f6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<template>
  <mars-pannel :visible="true" right="10" height="540px" top="10">
    <a-space>
      <mars-button @click="showChinaLine">省界线</mars-button>
      <mars-button @click="showPlanningSurface">规划面</mars-button>
      <mars-button @click="showDraw">标绘数据</mars-button>
      <mars-button @click="showMonomer">单体化面</mars-button>
      <mars-button @click="showWorld">世界各国</mars-button>
      <mars-button @click="showPoint">体育设施点</mars-button>
      <mars-button @click="showBuilding">立体建筑物</mars-button>
      <mars-button @click="showBoundaryWall">合肥边界墙</mars-button>
      <mars-button @click="showRegion">合肥区域面</mars-button>
      <mars-button @click="showFloor">分层分户楼栋</mars-button>
    </a-space>
    <div class="f-pt">
      <layer-state label="" />
    </div>
  </mars-pannel>
</template>
 
<script lang="ts" setup>
import LayerState from "@mars/components/mars-sample/layer-state.vue"
import * as mapWork from "./map.js"
import { useWidget } from "@mars/widgets/common/store/widget"
 
const { updateWidget } = useWidget()
 
const showDraw = () => {
  mapWork.setDefuatData()
  mapWork.showDraw(true)
 
  changeGraphicData()
}
const showPoint = () => {
  mapWork.setDefuatData()
  mapWork.showPoint()
 
  changeGraphicData()
}
const showChinaLine = () => {
  mapWork.setDefuatData()
  mapWork.showChinaLine()
 
  changeGraphicData()
}
const showRegion = () => {
  mapWork.setDefuatData()
  mapWork.showRegion()
 
  changeGraphicData()
}
const showBoundaryWall = () => {
  mapWork.setDefuatData()
  mapWork.showBoundaryWall()
 
  changeGraphicData()
}
const showPlanningSurface = () => {
  mapWork.setDefuatData()
  mapWork.showPlanningSurface()
 
  changeGraphicData()
}
const showWorld = () => {
  mapWork.setDefuatData()
  mapWork.showWorld()
 
  changeGraphicData()
}
const showBuilding = () => {
  mapWork.setDefuatData()
  mapWork.showBuilding()
 
  changeGraphicData()
}
const showFloor = () => {
  mapWork.setDefuatData()
  mapWork.showFloor()
 
  changeGraphicData()
}
const showMonomer = () => {
  mapWork.setDefuatData()
  mapWork.showMonomer()
 
  changeGraphicData()
}
 
function changeGraphicData() {
  setTimeout(() => {
    updateWidget("manage-layers")
  }, 500)
}
</script>
<style scoped lang="less">
.ant-space {
  display: grid;
}
</style>