修改障碍物保存逻辑

main
suixy 1 month ago
parent 039e59393b
commit 9a848cae39

@ -174,4 +174,16 @@ export function PostDealObstacleModel(data) {
return request({ return request({
url: '/api/Fod/PostDealObstacleModel', method: 'post', data: data url: '/api/Fod/PostDealObstacleModel', method: 'post', data: data
}); });
}
export function GetSetting(data) {
return request({
url: '/api/Fod/GetSetting', method: 'post', data: data
});
}
export function PosSetting(data) {
return request({
url: '/api/Fod/PosSetting', method: 'post', data: data
});
} }

@ -60,7 +60,8 @@
:style="{ :style="{
left: `${getDotX(dot.x)}%`, left: `${getDotX(dot.x)}%`,
bottom: `${getDotY(dot.y)}%`, bottom: `${getDotY(dot.y)}%`,
transform: `translate(-50%, 50%) ` transform: `translate(-50%, 50%) `,
background: dot.type == 0 ? 'radial-gradient(circle at center, #ea1212 0%, rgba(228, 116, 116, 0.2) 100%)':'radial-gradient(circle at center, #12ea12 0%, rgba(116, 228, 116, 0.2) 100%)'
}" }"
style="white-space: nowrap" style="white-space: nowrap"
> >
@ -401,8 +402,6 @@ const ticks = computed(() => {
width: 10px; width: 10px;
height: 10px; height: 10px;
position: absolute; position: absolute;
background: radial-gradient(circle at center,
#ea1212 0%, rgba(228, 116, 116, 0.2) 100%);
border-radius: 50%; border-radius: 50%;
} }
@ -414,7 +413,7 @@ const ticks = computed(() => {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
transform-origin: center; transform-origin: center;
transition: all 0.16s; //transition: all 0.16s;
.head { .head {
position: absolute; position: absolute;

@ -181,9 +181,19 @@
</el-card> </el-card>
<!-- 目标表格1 --> <!-- 目标表格1 -->
<el-card shadow="always" style="margin-top: 12px"> <el-card shadow="always" style="margin-top: 12px;position:relative;">
<div style="position: absolute;right: 30px;top: 20px;z-index: 100;">
<el-popover placement="bottom" :width="300" trigger="click">
<template #reference>
<el-button style="margin-right: 16px">批量处理</el-button>
</template>
<el-button style="margin-right: 16px" @click="batchDisposal"></el-button>
<el-button style="margin-right: 16px" @click="batchDel"></el-button>
<el-button style="margin-right: 16px" @click="batchShild"></el-button>
</el-popover>
</div>
<el-table <el-table
ref="table1Ref"
highlight-current-row highlight-current-row
:data="tableData1.slice((currentPage1 - 1) * pageSize1, currentPage1 * pageSize1)" :data="tableData1.slice((currentPage1 - 1) * pageSize1, currentPage1 * pageSize1)"
style="width: 100%" style="width: 100%"
@ -480,6 +490,24 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!--屏蔽信息设置-->
<div>屏蔽信息设置</div>
<el-form :model="shieldInfoForm" inline label-width="auto" label-position="top">
<el-form-item style="width: calc(33% - 32px)" label="偏差值">
<el-input v-model="shieldInfoForm.deviation"/>
</el-form-item>
<el-form-item style="width: calc(33% - 32px)" label="范围">
<el-input v-model="shieldInfoForm.shielding"/>
</el-form-item>
<el-form-item style="width: 100%">
<div style="text-align: center; width: 100%">
<el-button type="primary" @click="saveShieldInfoForm"></el-button>
</div>
</el-form-item>
</el-form>
</div> </div>
<div v-if="itemsId === 4" class="tabsItem"> <div v-if="itemsId === 4" class="tabsItem">
<!-- 时间范围选择 --> <!-- 时间范围选择 -->
@ -685,10 +713,10 @@ import {
GetAllCData, GetAllCData,
getArea, getArea,
getParasPos, getParasPos,
getParasSignalpro, getParasSignalpro, GetSetting,
getShildList, getShildList,
InserDealObstacleModel, InserDealObstacleModel,
InsertCListData, InsertCListData, PosSetting,
RestartWork, RestartWork,
setParasPos, setParasPos,
setParasSignalpro, setParasSignalpro,
@ -816,6 +844,11 @@ const parasPosForm = ref({
} }
] ]
}) })
//
const shieldInfoForm = ref({
deviation: '',
shielding: '',
})
// //
const getOption = () => { const getOption = () => {
getParasPos().then((e) => { getParasPos().then((e) => {
@ -830,6 +863,12 @@ const getOption = () => {
dectection: e.dectection, dectection: e.dectection,
} }
}) })
GetSetting().then((e) => {
shieldInfoForm.value = {
deviation: e.deviation,
shielding: e.shielding,
}
})
} }
// & // &
@ -842,6 +881,11 @@ const saveParasPosForm = () => {
setParasPos(parasPosForm.value).then(e => { setParasPos(parasPosForm.value).then(e => {
}) })
} }
//
const saveShieldInfoForm = () => {
PosSetting(shieldInfoForm.value).then((e) => {
})
}
// 线 // 线
const updateRunwayNum = (e) => { const updateRunwayNum = (e) => {
let arr = new Array(e).fill(0) let arr = new Array(e).fill(0)
@ -904,9 +948,13 @@ const shildForm = ref({})
const openShildDialog = (e) => { const openShildDialog = (e) => {
shildDialog.value = true shildDialog.value = true
shildForm.value = { shildForm.value = {
$index: e.row.$index,
lon: e.row.Lon, lon: e.row.Lon,
lat: e.row.Lat, lat: e.row.Lat,
strength: e.row.rate, strength: e.row.rate,
name: Math.random().toString().split('.')[1],
deviation: shieldInfoForm.value.deviation,
shielding: shieldInfoForm.value.shielding,
} }
} }
const openShildDialog1 = (e) => { const openShildDialog1 = (e) => {
@ -915,7 +963,6 @@ const openShildDialog1 = (e) => {
} }
// //
const addShildItem = () => { const addShildItem = () => {
console.log(shildForm.value)
if (shildForm.value.id) { if (shildForm.value.id) {
updateShildData(shildForm.value).then(e => { updateShildData(shildForm.value).then(e => {
shildDialog.value = false shildDialog.value = false
@ -923,6 +970,7 @@ const addShildItem = () => {
getShildTableList() getShildTableList()
}) })
} else { } else {
tableData1.value.splice((currentPage1.value - 1) * pageSize1.value + shildForm.value.$index, 1);
addShildData(shildForm.value).then(e => { addShildData(shildForm.value).then(e => {
shildDialog.value = false shildDialog.value = false
shildForm.value = {} shildForm.value = {}
@ -1028,6 +1076,38 @@ const handleObstacle = () => {
}) })
} }
//
const table1Ref = ref()
const batchDisposal = () => {
let datas = table1Ref.value.getSelectionRows()
datas.forEach((row) => {
InserDealObstacleModel({
longitude: row.Lon,
latitude: row.Lat,
strength: row.rate,
files: [],
findTime: '',
})
})
}
//
const batchDel = () => {
table1Ref.value.clearSelection()
}
//
const batchShild = () => {
let datas = table1Ref.value.getSelectionRows()
datas.forEach((row) => {
updateShildData({
lon: row.Lon,
lat: row.Lat,
strength: row.rate,
name: [],
deviation: shieldInfoForm.value.deviation,
shielding: shieldInfoForm.value.shielding,
})
})
}
const date1 = ref([]) const date1 = ref([])
const currentPosition = ref({}) const currentPosition = ref({})
@ -1268,9 +1348,12 @@ const getDotsData = () => {
const point = { const point = {
lon: v.Lon, lon: v.Lon,
lat: v.Lat, lat: v.Lat,
rotate: 0 rotate: 0,
}; };
return correctDeviation(getLocalPositionRelativeToP4(point, areaPoints.value, rectInfo)) return {
...correctDeviation(getLocalPositionRelativeToP4(point, areaPoints.value, rectInfo)),
type: v.Status
}
}).filter(v => v)] }).filter(v => v)]
} }
watch(() => [tableData1.value, areaPoints.value], (oldVal, newVal) => { watch(() => [tableData1.value, areaPoints.value], (oldVal, newVal) => {

Loading…
Cancel
Save