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
<template>
  <mars-pannel :visible="true" right="10" top="10" width="190px">
    <mars-gui :options="options"></mars-gui>
  </mars-pannel>
</template>
 
<script lang="ts" setup>
// import { reactive } from "vue"
// import type { UnwrapRef } from "vue"
import * as mapWork from "./map.js"
import type { GuiItem } from "@mars/components/mars-ui/mars-gui"
 
const options: GuiItem[] = [
  {
    type: "radio",
    field: "type",
    label: "单选",
    value: "xyz",
    show(data) {
      return data.speed !== "2"
    },
    data: [
      {
        label: "无地形",
        value: "none"
      },
      {
        label: "标准服务",
        value: "xyz"
      },
      {
        label: "lon在线服务",
        value: "ion"
      },
      {
        label: "ArcGIS服务",
        value: "arcgis"
      }
    ],
    change(value) {
      mapWork.radioTerrain(value)
    }
  },
  {
    type: "checkbox",
    field: "type",
    label: "调试",
    value: ["1"],
    data: [
      {
        label: "开启地形",
        value: "1"
      },
      {
        label: "地形三角网",
        value: "2"
      }
    ],
    change(value) {
      mapWork.enabledTerrain(
        value.find((item) => {
          return item === "1"
        })
      )
      mapWork.enabledTerrainSJW(
        value.find((item) => {
          return item === "2"
        })
      )
    }
  }
]
</script>
 
<style lang="less" scoped></style>