| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { deitFenceApi } from '@/api/layer/index'; |
| | | import { deitFenceApi,addFenceApi } from '@/api/layer/index'; |
| | | const emit = defineEmits([ 'callParentMethod']); |
| | | const layerParams = inject('layerParams'); |
| | | const options = [ |
| | |
| | | detailData.value = layerParams.value.editDetailData |
| | | totalArea.value = layerParams.value.total_area |
| | | totalCount.value = layerParams.value.total_count |
| | | console.log('2222222',layerParams.value.decideWhetherToAddOrEdit); |
| | | |
| | | |
| | | const clearAllData = () => { |
| | | detailData.value = {} |
| | |
| | | }; |
| | | const submitHandle = () => { |
| | | const params={ |
| | | folder_id:detailData.value.folder_id, |
| | | id:detailData.value.id, |
| | | name:detailData.value.name, |
| | | description:detailData.value.description, |
| | | is_enabled: detailData.value.is_enabled, |
| | | area:detailData.value.area, |
| | | altitude:detailData.value.altitude, |
| | | folder_id:1, |
| | | name:'测试', |
| | | description:'333366663', |
| | | is_enabled: true, |
| | | area:1200, |
| | | altitude:120, |
| | | geo_data: layerParams.value.polygonPosition, |
| | | } |
| | | deitFenceApi(params).then(res=>{ |
| | | addFenceApi(params).then(res=>{ |
| | | console.log('保存',res); |
| | | |
| | | }) |