| 
					
				 | 
			
			
				@@ -35,7 +35,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     <div class="box-content"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <div class="create-title"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             <img class="title-icon" src="@/assets/img/home/create-icon.png" alt="" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            {{ isClient ? '新增用户' : '创建农场' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            {{ isClient ? "新增用户" : "创建农场" }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <div class="create-content"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             <div class="create-from"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -57,28 +57,43 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             <div class="draw-btn" @click="toSubPage">点击勾选地块</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <el-form-item label="农场面积" prop="area"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    <el-form-item label="农场面积" prop="mianji"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         <div class="area-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 placeholder="勾选地块获得农场面积" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                v-model="ruleForm.area" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                v-model="ruleForm.mianji" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 autocomplete="off" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                style="width: fit-content;" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                style="width: fit-content" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             <div class="unit">亩</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <el-form-item label="种植作物" prop="phenologyId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    <el-form-item label="种植作物" prop="speciesItem"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         <div class="select-wrap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            <el-select @change="changeSpecie" class="select-item" v-model="ruleForm.speciesItem" placeholder="作物类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                <el-option v-for="(item, index) in specieList" :key="index" :label="item.name" :value="{value: item.id, ...item}" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            <el-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                @change="changeSpecie" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                class="select-item" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                v-model="ruleForm.speciesItem" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                placeholder="作物类型" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    v-for="(item, index) in specieList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    :key="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    :label="item.name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    :value="{ value: item.id, ...item }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             <el-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 v-model="ruleForm.phenologyId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 placeholder="物候期" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 class="period-select select-item" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                <el-option v-for="(item, index) in phenologyList" :key="index" :label="item.name" :value="item.id" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    v-for="(item, index) in phenologyList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    :key="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    :label="item.name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                    :value="item.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     </el-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -93,7 +108,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             <div class="create-btn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 <div class="btn-item sencond-btn" @click="resetForm(ruleFormRef)">取消</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                <div class="btn-item primary-btn" @click="submitForm(ruleFormRef)">{{ isClient ? '添加' : '立即创建' }}</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                <div class="btn-item primary-btn" @click="submitForm(ruleFormRef)"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    {{ isClient ? "添加" : "立即创建" }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     </div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -107,11 +124,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import customHeader from "@/components/customHeader.vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import IndexMap from "./map/index.js"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useRoute, useRouter } from "vue-router"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { mapLocation } from "./map/index.js" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { mapLocation } from "./map/index.js"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { onMounted, ref, reactive, watch, onActivated } from "vue"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useStore } from "vuex"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { convertPointToArray } from "@/utils/index"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ElMessage } from "element-plus"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { transformFromGCJToWGS, transformFromWGSToGCJ } from "@/utils/WSCoordinate.js"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const route = useRoute(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const router = useRouter(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const store = useStore(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -119,28 +138,35 @@ const store = useStore(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const indexMap = new IndexMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const mapContainer = ref(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 onMounted(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    centerPoint.value = store.state.home.miniUserLocationPoint 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    centerPoint.value = store.state.home.miniUserLocationPoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const arr = convertPointToArray(centerPoint.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getLocationName(`${arr[1]},${arr[0]}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     indexMap.initMap(centerPoint.value, mapContainer.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const arr = convertPointToArray(centerPoint.value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getLocationName(`${arr[1]},${arr[0]}`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getSpecieList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getSpecieList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const polygonArr = ref(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const polygonArr = ref(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const isClient = ref(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 onActivated(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (route.query.type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         isClient.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (route.query.isFromHome) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        centerPoint.value = store.state.home.miniUserLocationPoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const arr = convertPointToArray(centerPoint.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        getLocationName(`${arr[1]},${arr[0]}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        indexMap.setMapPosition(arr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    indexMap.clearLayer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 绘制勾画范围 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const polygonData = store.state.home.polygonData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const polygonData = store.state.home.polygonData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (polygonData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        indexMap.setAreaGeometry(polygonData?.geometryArr) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        polygonArr.value = polygonData.geometryArr 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ruleForm.area = polygonData.area 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        indexMap.setAreaGeometry(polygonData?.geometryArr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        polygonArr.value = polygonData.geometryArr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ruleForm.mianji = polygonData.mianji; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 搜索 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -181,25 +207,26 @@ const remoteMethod = async (keyword) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const handleSearchRes = (v) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const parts = v.value.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const coordinateArray = [parseFloat(parts[1]), parseFloat(parts[0])]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let { latitude, longitude } = transformFromGCJToWGS(parseFloat(parts[0]), parseFloat(parts[1])); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const coordinateArray = [longitude, latitude]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     indexMap.setMapPosition(coordinateArray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    centerPoint.value = `POINT (${coordinateArray[0]} ${coordinateArray[1]})` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    centerPoint.value = `POINT (${coordinateArray[0]} ${coordinateArray[1]})`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ruleForm.address = v.item?.title || v.item?.address; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    pointAddress.value = v.item?.province + v.item?.city + v.item?.district 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    pointAddress.value = v.item?.province + v.item?.city + v.item?.district; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 表单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const ruleFormRef = ref(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const ruleForm = reactive({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     address: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    area: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    speciesItem: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    mianji: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    speciesItem: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     phenologyId: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const rules = reactive({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     address: [{ required: true, message: "请选择农场位置", trigger: "blur" }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    area: [{ required: true, message: "请勾选地块获得农场面积", trigger: "blur" }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    mianji: [{ required: true, message: "请勾选地块获得农场面积", trigger: "blur" }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     speciesItem: [{ required: true, message: "请选择品类", trigger: "blur" }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     phenologyId: [{ required: true, message: "请选择物候期", trigger: "blur" }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: [{ required: true, message: "请输入您的农场名称", trigger: "blur" }], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -214,13 +241,15 @@ const submitForm = (formEl) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 wkt: centerPoint.value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 speciesId: ruleForm.speciesItem?.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 containerId: ruleForm.speciesItem?.defaultContainerId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // geom: polygonArr.value 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                geom: polygonArr.value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             VE_API.farm.saveFarm(params).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                console.log('code', res.code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ElMessage.success("创建成功") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                router.replace('/home?reload=true') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ElMessage.success("创建成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 重置表单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ruleFormRef.value.resetFields(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                store.commit("home/SET_FARM_POLYGON", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                router.replace("/home?reload=true"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             console.log("submit!", params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             console.log("error submit!"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -231,56 +260,60 @@ const submitForm = (formEl) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const resetForm = (formEl) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (!formEl) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     formEl.resetFields(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    store.commit("home/SET_FARM_POLYGON", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     router.go(-1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const centerPoint = ref(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const centerPoint = ref(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function toSubPage() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    router.push(`/edit_map?mapCenter=${centerPoint.value}&pointName=${ruleForm.address}&pointAddress=${pointAddress.value}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    router.push( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        `/edit_map?mapCenter=${centerPoint.value}&pointName=${ruleForm.address}&pointAddress=${pointAddress.value}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const pointAddress = ref(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const pointAddress = ref(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function getLocationName(location) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const params = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            key: MAP_KEY, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            location, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        VE_API.old_mini_map.location(params).then(({ result }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // locationVal.value = result.formatted_addresses.recommend; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const add = result.formatted_addresses?.recommend 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ? result.formatted_addresses.recommend 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                : result.address + ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ruleForm.address = add 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pointAddress.value = result.address 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        key: MAP_KEY, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        location, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    VE_API.old_mini_map.location(params).then(({ result }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // locationVal.value = result.formatted_addresses.recommend; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const add = result.formatted_addresses?.recommend ? result.formatted_addresses.recommend : result.address + ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ruleForm.address = add; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        pointAddress.value = result.address; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-watch(() => mapLocation.data,(newValue, oldValue) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (newValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        centerPoint.value = `POINT (${newValue[0]} ${newValue[1]})` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        getLocationName(`${newValue[1]},${newValue[0]}`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+watch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    () => mapLocation.data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    (newValue, oldValue) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (newValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let { latitude, longitude } = transformFromWGSToGCJ(newValue[1], newValue[0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            centerPoint.value = `POINT (${newValue[0]} ${newValue[1]})`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            getLocationName(`${latitude},${longitude}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const specieList = ref([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const specieList = ref([]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function getSpecieList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    VE_API.farm.fetchSpecieList().then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        specieList.value = data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    VE_API.farm.fetchSpecieList().then(({ data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        specieList.value = data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function changeSpecie(v) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getPhenology(v.defaultContainerId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getPhenology(v.defaultContainerId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const phenologyList = ref([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const phenologyList = ref([]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function getPhenology(containerId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    VE_API.farm.fetchPhenologyList({containerId}).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log('getPhenology', data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        phenologyList.value = data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    VE_API.farm.fetchPhenologyList({ containerId }).then(({ data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        phenologyList.value = data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |