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
<template>
  <mars-pannel :visible="true" right="10" top="10" width="220">
    <mars-button @click="showMapImg">查看场景出图(弹窗)</mars-button>
 
    <mars-button @click="downLoad">下载场景出图</mars-button>
    <mars-button @click="downLoad2">下载场景缩略图</mars-button>
 
    <mars-button @click="downLoadDiv">下载场景出图(含DIV部分)</mars-button>
  </mars-pannel>
 
  <mars-dialog :position="{ left: '25%', top: '30%' }" width="50%" title="场景出图" v-model:visible="showImg">
    <img :src="imges" style="width: 100%; height: 90%" />
  </mars-dialog>
</template>
 
<script setup lang="ts">
import { ref } from "vue"
import * as mapWork from "./map.js"
 
const showImg = ref<boolean>(false)
 
const imges = ref()
 
const showMapImg = () => {
  mapWork.showMapImg().then((image) => {
    imges.value = image
    showImg.value = true
  })
}
 
const downLoad = () => {
  mapWork.downLoad()
}
const downLoad2 = () => {
  mapWork.downLoad2()
}
 
const downLoadDiv = () => {
  mapWork.downLoadDiv()
}
</script>
<style scoped lang="less">
.mars-button {
  margin-right: 8px;
  margin-bottom: 8px;
}
</style>