无人机管理后台前端(已迁走)
张含笑
2025-08-14 36b6bda80513a5eb9f3ac888b43b34882385ae1e
feat:地图点转换
2 files modified
9 ■■■■■ changed files
src/components/CreateQRcode/CreateQRcode.vue 6 ●●●● patch | view | raw | blame | history
src/views/tickets/ticket.vue 3 ●●●●● patch | view | raw | blame | history
src/components/CreateQRcode/CreateQRcode.vue
@@ -4,6 +4,7 @@
</template>
<script setup>
import { wgs84ToGcj02 } from '@/utils/coordinateTransformation';
import QRCode from 'qrcodejs2-fix'
const props = defineProps(['latAndLon'])
@@ -11,8 +12,7 @@
let qrCodeInstance = null
const createQRcode = content => {
console.log('this.currentDetail.content',content);
    const transformed = wgs84ToGcj02(content[0], content[1])
    if (!content) return
    if (qrCodeInstance) {
        myQrCode.value.innerHTML = ''
@@ -21,7 +21,7 @@
    qrCodeInstance = new QRCode(myQrCode.value, {
        width: 92,
        height: 91,
        text: `https://uri.amap.com/marker?position=${content}&name=%E4%BA%8B%E4%BB%B6%E7%82%B9`,
        text: `https://uri.amap.com/marker?position=${transformed}&name=%E4%BA%8B%E4%BB%B6%E7%82%B9`,
    })
}
watch(
src/views/tickets/ticket.vue
@@ -884,7 +884,6 @@
</template>
<script>
import { getSmallImg, getShowImg } from '@/utils/util';
import { ElMessageBox, ElLoading } from 'element-plus';
import { calculateDefaultRange } from '@/utils/util';
@@ -1438,8 +1437,6 @@
    },
    async handleQRCode (val){
    val.showQR = !val.showQR
console.log('this.currentDetailvvvvv',val);
    },
    async loadAMapScripts() {
      try {