|
|
|
|
@ -228,21 +228,47 @@
|
|
|
|
|
|
|
|
|
|
<!-- 目标表格2 -->
|
|
|
|
|
<el-card shadow="always" style="margin-top: 12px">
|
|
|
|
|
<el-table :data="tableData2" style="width: 100%">
|
|
|
|
|
<el-table
|
|
|
|
|
highlight-current-row
|
|
|
|
|
:data="tableData2.slice((currentPage2 - 1) * pageSize2, currentPage2 * pageSize2)"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@row-click="table1Current"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55"/>
|
|
|
|
|
<el-table-column label="序号" type="index" width="60"/>
|
|
|
|
|
<el-table-column prop="name" label="目标名称" width="120"/>
|
|
|
|
|
<el-table-column prop="lon" label="目标经度" width="120"/>
|
|
|
|
|
<el-table-column prop="lat" label="目标纬度" width="120"/>
|
|
|
|
|
<el-table-column prop="deviation" label="deviation" width="120"/>
|
|
|
|
|
<el-table-column prop="shielding" label="shielding" width="120"/>
|
|
|
|
|
<el-table-column label="操作" show-overflow-tooltip>
|
|
|
|
|
<el-table-column prop="Lon" label="目标经度" width="100"/>
|
|
|
|
|
<el-table-column prop="Lat" label="目标纬度" width="100"/>
|
|
|
|
|
<el-table-column prop="rate" label="强度信息" width="100"/>
|
|
|
|
|
<el-table-column v-if="false" label="强度信息" width="160">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="primary" link @click="delShildItem(scope.row)">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-rate :model-value="scope.row.rate || 3" disabled/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="处理方式" show-overflow-tooltip>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="primary" @click.stop="openHandleObstacleDialog(scope)" link>处置</el-button>
|
|
|
|
|
<el-popconfirm
|
|
|
|
|
class="box-item"
|
|
|
|
|
title="确定删除这个点位吗?"
|
|
|
|
|
placement="top"
|
|
|
|
|
@confirm="delPoint(scope)"
|
|
|
|
|
>
|
|
|
|
|
<template #reference>
|
|
|
|
|
<el-button type="primary" @click.stop link>删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-popconfirm>
|
|
|
|
|
<el-button type="primary" link>固定物</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-pagination
|
|
|
|
|
v-model:current-page="currentPage2"
|
|
|
|
|
v-model:page-size="pageSize2"
|
|
|
|
|
:pager-count="4"
|
|
|
|
|
:page-sizes="[10,20,50,100, 200, 300, 400]"
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
:total="tableData2.length"
|
|
|
|
|
/>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="itemsId === 2" class="tabsItem">
|
|
|
|
|
@ -356,7 +382,15 @@
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
style="text-align: center"
|
|
|
|
|
@click="addNewPoint"
|
|
|
|
|
@click=" InsertCListData([{
|
|
|
|
|
name: `点位${regionLabeling.length + 1}`,
|
|
|
|
|
lon: '1',
|
|
|
|
|
lat: '1',
|
|
|
|
|
fodAreaId: form6.region1,
|
|
|
|
|
fodAirId: form6.region
|
|
|
|
|
}]).then(() => {
|
|
|
|
|
getArea2()
|
|
|
|
|
}) "
|
|
|
|
|
>
|
|
|
|
|
添加
|
|
|
|
|
</el-button>
|
|
|
|
|
@ -550,15 +584,20 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="处理照片" label-width="120px">
|
|
|
|
|
<el-upload action="#"
|
|
|
|
|
:file-list="dialog1Form.fileList"
|
|
|
|
|
list-type="picture-card" :auto-upload="false">
|
|
|
|
|
<el-icon>
|
|
|
|
|
<Plus/>
|
|
|
|
|
</el-icon>
|
|
|
|
|
<el-upload @click.stop="onSubmit"
|
|
|
|
|
ref="uploadRef"
|
|
|
|
|
:http-request="uploadFiles"
|
|
|
|
|
:file-list="dialog1Form.fileList.concat({type:'camera'})"
|
|
|
|
|
list-type="picture-card">
|
|
|
|
|
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<el-icon>
|
|
|
|
|
<Plus/>
|
|
|
|
|
</el-icon>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template #file="{ file }">
|
|
|
|
|
<div>
|
|
|
|
|
<div v-if="file.type !=='camera'">
|
|
|
|
|
<img class="el-upload-list__item-thumbnail" :src="file.url" alt=""/>
|
|
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
|
|
<span
|
|
|
|
|
@ -581,6 +620,11 @@
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="openCamera" v-if="file.type ==='camera'" style="border:none" class="el-upload--picture-card">
|
|
|
|
|
<el-icon>
|
|
|
|
|
<Plus/>
|
|
|
|
|
</el-icon>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -588,7 +632,7 @@
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="dialog1 = false">关闭</el-button>
|
|
|
|
|
<el-button type="primary" @click="dialog1 = false">
|
|
|
|
|
<el-button type="primary" @click="handleObstacle">
|
|
|
|
|
处理
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
@ -597,6 +641,14 @@
|
|
|
|
|
<el-dialog v-model="imgDialog">
|
|
|
|
|
<img width="100%" :src="dialogImageUrl" alt="Preview Image"/>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<input
|
|
|
|
|
ref="cameraInput"
|
|
|
|
|
type="file"
|
|
|
|
|
accept="image/*"
|
|
|
|
|
capture="camera"
|
|
|
|
|
style="display: none"
|
|
|
|
|
@change="handleCameraChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="jsx">
|
|
|
|
|
@ -619,7 +671,7 @@ import {
|
|
|
|
|
GetAllCData,
|
|
|
|
|
InsertCListData,
|
|
|
|
|
UpdateCData,
|
|
|
|
|
DeleteCData
|
|
|
|
|
DeleteCData, UpdateImage, GetFodScopeData, UpdateFodScopeData
|
|
|
|
|
} from "@/api/api";
|
|
|
|
|
import {useRouter} from "vue-router";
|
|
|
|
|
import {ElMessage} from "element-plus";
|
|
|
|
|
@ -709,22 +761,6 @@ const areaData = ref({
|
|
|
|
|
})
|
|
|
|
|
// 障碍物点位
|
|
|
|
|
const dots = ref([
|
|
|
|
|
// {
|
|
|
|
|
// x: 150,
|
|
|
|
|
// y: 98
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// x: 50,
|
|
|
|
|
// y: 102
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// x: 75,
|
|
|
|
|
// y: 75
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// x: 125,
|
|
|
|
|
// y: 125
|
|
|
|
|
// }
|
|
|
|
|
])
|
|
|
|
|
// 当前的目标障碍物
|
|
|
|
|
const dotIndex = ref(-1)
|
|
|
|
|
@ -865,6 +901,34 @@ const tableData1 = ref(Array(1000).fill(0).map((_, k) => {
|
|
|
|
|
}
|
|
|
|
|
}))
|
|
|
|
|
// 处置
|
|
|
|
|
const uploadFiles = async (e) => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
const res = await UpdateImage({files: [e.file]})
|
|
|
|
|
console.log(res)
|
|
|
|
|
}
|
|
|
|
|
const uploadRef = ref(null)
|
|
|
|
|
const cameraInput = ref(null)
|
|
|
|
|
const openCamera = () => {
|
|
|
|
|
cameraInput.value?.click()
|
|
|
|
|
}
|
|
|
|
|
const handleCameraChange = (e) => {
|
|
|
|
|
const file = e.target.files[0]
|
|
|
|
|
if (!file) return
|
|
|
|
|
const url = URL.createObjectURL(file)
|
|
|
|
|
|
|
|
|
|
dialog1Form.fileList.value.push({
|
|
|
|
|
name: file.name,
|
|
|
|
|
url,
|
|
|
|
|
raw: file
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 调用 el-upload 的上传逻辑
|
|
|
|
|
uploadRef.value?.uploadFiles.push(file)
|
|
|
|
|
uploadRef.value?.submit()
|
|
|
|
|
|
|
|
|
|
// 重置 input
|
|
|
|
|
e.target.value = ''
|
|
|
|
|
}
|
|
|
|
|
const dialog1 = ref(false)
|
|
|
|
|
const dialog1Form = ref({})
|
|
|
|
|
const dialogImageUrl = ref('')
|
|
|
|
|
@ -877,6 +941,10 @@ const openHandleObstacleDialog = (e) => {
|
|
|
|
|
fileList: [{url: 'https://dummyimage.com/640x360'}, {url: 'https://placehold.co/600x400/png'}]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const handleObstacle = () => {
|
|
|
|
|
dialog1.value = false
|
|
|
|
|
tableData1.value.splice((currentPage1.value - 1) * pageSize1.value + dialog1Form.value.index, 1);
|
|
|
|
|
}
|
|
|
|
|
const handlePictureCardPreview = (file) => {
|
|
|
|
|
dialogImageUrl.value = file.url
|
|
|
|
|
imgDialog.value = true
|
|
|
|
|
@ -892,8 +960,11 @@ const handleRemove = (file) => {
|
|
|
|
|
const delPoint = (e) => {
|
|
|
|
|
tableData1.value.splice((currentPage1.value - 1) * pageSize1.value + e.$index, 1);
|
|
|
|
|
}
|
|
|
|
|
// 当前页
|
|
|
|
|
const currentPage1 = ref(1)
|
|
|
|
|
// 每页数量
|
|
|
|
|
const pageSize1 = ref(10)
|
|
|
|
|
// 固定物列表
|
|
|
|
|
const tableData2 = ref([
|
|
|
|
|
{
|
|
|
|
|
"id": 2,
|
|
|
|
|
@ -912,6 +983,10 @@ const tableData2 = ref([
|
|
|
|
|
"shielding": 20
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
// 当前页
|
|
|
|
|
const currentPage2 = ref(1)
|
|
|
|
|
// 每页数量
|
|
|
|
|
const pageSize2 = ref(10)
|
|
|
|
|
const date1 = ref([])
|
|
|
|
|
const currentPosition = ref({})
|
|
|
|
|
|
|
|
|
|
@ -1113,6 +1188,20 @@ const getAreaData = () => {
|
|
|
|
|
let data = calcRectangleFromPoints(res.data)
|
|
|
|
|
areaData.value = data
|
|
|
|
|
getDeviationValue(res.data.find(e => e.name === '点位3'))
|
|
|
|
|
|
|
|
|
|
const sorted = res.data.sort((a, b) => {
|
|
|
|
|
const numA = parseInt(a.name.replace(/[^\d]/g, ''), 10);
|
|
|
|
|
const numB = parseInt(b.name.replace(/[^\d]/g, ''), 10);
|
|
|
|
|
return numA - numB;
|
|
|
|
|
});
|
|
|
|
|
const letters = ['a', 'b', 'c', 'd'];
|
|
|
|
|
const result = {};
|
|
|
|
|
sorted.forEach((item, index) => {
|
|
|
|
|
const key = letters[index];
|
|
|
|
|
result[`${key}Lon`] = item.lon;
|
|
|
|
|
result[`${key}Lat`] = item.lat;
|
|
|
|
|
});
|
|
|
|
|
UpdateFodScopeData(result)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|