| 
					
				 | 
			
			
				@@ -42,12 +42,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-icon size="15"><CloseBold /></el-icon> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <span>删除点</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <div class="btn delete"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div class="btn delete" @click="handleDelete"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-icon size="15" color="#fff"><CloseBold /></el-icon> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <span>删除地块</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div class="edit-popup"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="edit-popup" v-show="isEdit"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div class="edit-title"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <img src="@/assets/images/common/chart-icon.png" alt="" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <span>地块属性</span> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,76 +61,62 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="农场地址"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  v-model="formInline.user" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="formInline.address" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请输入农场地址" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="农场名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  v-model="formInline.user" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="formInline.farmName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请输入农场名称" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="创建时间"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-input v-model="formInline.user" placeholder="" clearable /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="formInline.createDate" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  placeholder="" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="农场面积"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-input v-model="formInline.user" placeholder="" clearable /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-input v-model="formInline.area" placeholder="" clearable /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="作物物种"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  v-model="formInline.user" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="formInline.speciesTypeName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请输入作物物种" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="客户姓名"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  v-model="formInline.user" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="formInline.masterName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请输入姓名" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-form-item label="联系电话"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  v-model="formInline.user" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="formInline.masterTel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   placeholder="请输入联系电话" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="list-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div class="list-box" v-show="pointList.length > 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <span>边界点经纬度</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <div class="list-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="list-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <span>A1</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <div class="item-box">北纬23.039,东经113.388</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <div 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  class="list-item" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-for="(item, index) in pointList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  :key="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span>A{{ index + 1 }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <div class="item-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    北纬{{ item.lat }},东经{{ item.lnt }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -146,34 +132,174 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script setup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { onMounted, ref, reactive } from "vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { onMounted, ref, reactive, watchEffect } from "vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import fnHeader from "@/components/fnHeader.vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import AuthenticMap from "./authenticMap"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { mapData } from "./authenticMap"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useRouter } from "vue-router"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { ElMessage, ElMessageBox } from "element-plus"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const router = useRouter(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let authenticMap = new AuthenticMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const mapRef = ref(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const location = ref("POINT (113.78049350268851 23.419886891845312)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 onMounted(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  let location = "POINT (113.78049350268851 23.419886891845312)"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  authenticMap.initMap(location, mapRef.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  getList(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const input = ref(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 获取地块列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const plotList = ref([]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const getList = (isInitMap = false) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  VE_API.authentic.getList().then(({ code, data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (code !== 0) return authenticMap.initMap(location.value, mapRef.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    plotList.value = data || []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (isInitMap) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      authenticMap.initMap(data[0].point, mapRef.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   const geom = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   data.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     geom.push({ featureWkt: item.geom }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   authenticMap.setAreaGeometry(geom); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const geom = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      data.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        geom.push({ featureWkt: item.geom }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      authenticMap.setAreaGeometry(geom); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   authenticMap.c() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    authenticMap.addPoint(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const input = ref(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const initForm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  address: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  farmName: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  createDate: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  area: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  speciesTypeName: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  masterName: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  masterTel: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  geom: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const formInline = reactive({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  user: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  region: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  date: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ...initForm, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const isEdit = ref(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 取消 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const onCancel = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  isEdit.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  authenticMap.a(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   authenticMap.b(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (!mapData.curPointData.id) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  authenticMap.setPoint("point"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 保存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const onSubmit = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  console.log("submit!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  VE_API.authentic.saveData(formInline).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (formInline.id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      onCancel(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      isEdit.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const goBack = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   router.go(-1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function updateFormInline(newData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Object.assign(formInline, newData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function formatDate(isoString) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const date = new Date(isoString); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // 获取年、月、日、小时、分钟和秒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const year = date.getFullYear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const month = String(date.getMonth() + 1).padStart(2, "0"); // 月份从0开始,需要加1,并且用0填充 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const day = String(date.getDate()).padStart(2, "0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const hours = String(date.getHours()).padStart(2, "0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const minutes = String(date.getMinutes()).padStart(2, "0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const seconds = String(date.getSeconds()).padStart(2, "0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // 格式化日期为 YYYY-MM-DD hh:mm:ss 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  return formattedDate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const handleDelete = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (!mapData.curPointData.id) return ElMessage("请选择地块"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ElMessageBox.confirm("您确定删除该地块吗?", "提示", { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    confirmButtonText: "确认", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    cancelButtonText: "取消", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    type: "warning", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      VE_API.authentic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        .deleteData({ id: mapData.curPointData.id }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        .then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          authenticMap.b(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            onCancel(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .catch(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const pointList = ref([]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+watchEffect(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  updateFormInline({...initForm}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  pointList.value = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (mapData.isEdit) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    isEdit.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const { geometryArr, area } = authenticMap.getAreaGeometry(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const lastItem = geometryArr[geometryArr.length - 1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    formInline.geom = lastItem.featureWkt; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    formInline.area = area + "亩"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    formInline.createDate = formatDate(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    authenticMap.endEdit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (mapData.isEditArea) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const { geometryArr, area } = authenticMap.getAreaGeometry(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    formInline.geom = geometryArr[0].featureWkt; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    formInline.area = area + "亩"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (mapData.curPointData.id && !mapData.isEdit) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mapData.curPointData.icon === "point-act") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      VE_API.authentic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        .getDetails({ id: mapData.curPointData.id }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        .then(({ data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          isEdit.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          data.createDate = formatDate(data.createDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          updateFormInline({ ...data }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const { area } = authenticMap.getAreaGeometry(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          formInline.area = area + "亩"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          //   经纬度列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const arr = JSON.parse(data.points); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          pointList.value = arr.map((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              lat: item[1].toString().slice(0, 6), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              lnt: item[0].toString().slice(0, 7), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          authenticMap.endEdit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // isEdit.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <style lang="scss" scoped> 
			 |