فهرست منبع

Merge remote-tracking branch 'origin/dev' into dev

yangyuxuan 3 ماه پیش
والد
کامیت
e597eff5fe

+ 1 - 1
src/hooks/AMap/useAMap.ts

@@ -480,7 +480,7 @@ export function useAMap(options) {
       } else if (item.type === 'circle') {
         graphic = new AMap.Circle({
           center: item.center,
-          radius: item.radius,
+          radius: item.radius * 100000,
           strokeColor: item.strokeColor,
           strokeOpacity: item.strokeOpacity,
           strokeWeight: item.strokeWeight,

+ 8 - 1
src/views/globalMap/RightMenu/OnlinePlotting/EditClassDialog.vue

@@ -1,5 +1,12 @@
 <template>
-  <Dialog custom-show :title="!id ? '新增分类' : '修改分类'" class="custom-dialog" @close="handleCancel" @confirm="submitForm(classFormRef)">
+  <Dialog
+    custom-show
+    draggable
+    :title="!id ? '新增分类' : '修改分类'"
+    class="custom-dialog"
+    @close="handleCancel"
+    @confirm="submitForm(classFormRef)"
+  >
     <el-form ref="classFormRef" :model="form" :rules="rules">
       <el-form-item label="分类名称:" label-width="80px" prop="name">
         <el-input v-model="form.name" class="custom-input2" placeholder="请输入分类名称" />

+ 8 - 2
src/views/globalMap/RightMenu/OnlinePlotting/index.vue

@@ -497,7 +497,7 @@ const initDrawMethod = (options) => {
       } else {
         if (options.type == 'circle') {
           data.center = [obj.getCenter().lng, obj.getCenter().lat];
-          data.radius = obj.getRadius();
+          data.radius = obj.getRadius() / 100000;
         } else {
           const path = obj.getPath();
           // 将AMap.LngLat对象数组转换为经纬度数组
@@ -932,7 +932,13 @@ const handleShowSetting = (item, index) => {
 let dataURL = ref('');
 // 页面元素转图片
 const handleScreenshot = () => {
-  const canvasBox = getMap().Iv;
+  let map = getMap();
+  let canvasBox;
+  if (AMapType.includes(props.activeMap)) {
+    canvasBox = map.Iv;
+  } else {
+    canvasBox = map.targetElement_;
+  }
   // 手动创建一个 canvas 标签
   const canvas = document.createElement('canvas');
   if (canvasBox) {