From 6a542e726a8a8573f7acacf22639ffa4c68ee538 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 21 Jun 2025 11:03:59 +0800
Subject: [PATCH] feat: 保存的时候转为wgs84
---
src/views/tickets/ticket.vue | 12 +++++-------
src/views/tickets/orderLog.vue | 6 +++---
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 66ea5ae..ba8e811 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -4,9 +4,9 @@
* @LastEditors: shuishen 1109946754@qq.com
* @LastEditTime: 2025-04-28 11:38:16
* @FilePath: \drone-web-manage\src\views\tickets\orderLog.vue
- * @Description:
- *
- * Copyright (c) 2025 by shuishen, All Rights Reserved.
+ * @Description:
+ *
+ * Copyright (c) 2025 by shuishen, All Rights Reserved.
-->
<template>
<basic-container>
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index cf827b8..6bf9848 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -74,7 +74,7 @@
</el-tabs>
<!-- 新建工单对话框 -->
- <el-dialog v-model="dialogVisible" title="新建工单" width="70%" :close-on-click-modal="false" @close="resetForm">
+ <el-dialog v-model="dialogVisible" v-if="dialogVisible" title="新建工单" width="70%" :close-on-click-modal="false" @close="resetForm">
<el-form :model="form" :rules="rules" ref="form" label-width="90px" class="create-ticket-form">
<div class="form-section">
<el-row :gutter="16">
@@ -1351,14 +1351,10 @@
handleLocationChange (val) {
let locationValue = val.value
- console.log('handleLocationChange', locationValue)
if (locationValue && locationValue.length >= 2) {
// 兼容第三项为地址
- this.form.location = [
- Number(locationValue[0]),
- Number(locationValue[1]),
- locationValue[2] || '',
- ]
+ const [lng, lat] = gcj02ToWgs84(locationValue[0], locationValue[1])
+ this.form.location = [Number(lng), Number(lat), locationValue[2] || '',]
this.form.address = locationValue[2] || ''
} else {
this.form.location = []
@@ -1471,6 +1467,8 @@
handleAdd () {
this.dialogVisible = true
+ this.mapParams.center = null
+ this.form.location = []
},
resetForm () {
--
Gitblit v1.9.3