无人机管理后台前端(已迁走)
张含笑
2025-10-30 c711e82c4b1685a4b00884d7aab70d9d3b0265ff
src/views/layerManagement/components/rightEdit.vue
@@ -58,7 +58,7 @@
</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 = [
@@ -100,7 +100,7 @@
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 = {}
@@ -122,16 +122,15 @@
};
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);
  
})