@ -181,9 +181,19 @@
< / e l - c a r d >
<!-- 目标表格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" > 批量处理 < / e l - b u t t o n >
< / 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 >
< / e l - p o p o v e r >
< / div >
< el -table
ref = "table1Ref"
highlight - current - row
: data = "tableData1.slice((currentPage1 - 1) * pageSize1, currentPage1 * pageSize1)"
style = "width: 100%"
@ -480,6 +490,24 @@
< / div >
< / e l - f o r m - i t e m >
< / e l - f o r m >
<!-- 屏蔽信息设置 -- >
< 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 " / >
< / e l - f o r m - i t e m >
< el -form -item style = "width: calc(33% - 32px)" label = "范围" >
< el -input v -model = " shieldInfoForm.shielding " / >
< / e l - f o r m - i t e m >
< el -form -item style = "width: 100%" >
< div style = "text-align: center; width: 100%" >
< el -button type = "primary" @click ="saveShieldInfoForm" > 保 存 < / el -button >
< / div >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< / div >
< div v-if ="itemsId === 4" class="tabsItem" >
<!-- 时间范围选择 -- >
@ -685,10 +713,10 @@ import {
GetAllCData ,
getArea ,
getParasPos ,
getParasSignalpro ,
getParasSignalpro , GetSetting ,
getShildList ,
InserDealObstacleModel ,
InsertCListData ,
InsertCListData , PosSetting ,
RestartWork ,
setParasPos ,
setParasSignalpro ,
@ -816,6 +844,11 @@ const parasPosForm = ref({
}
]
} )
/ / 屏 蔽 信 息 设 置
const shieldInfoForm = ref ( {
deviation : '' ,
shielding : '' ,
} )
/ / 获 取 配 置 文 件
const getOption = ( ) => {
getParasPos ( ) . then ( ( e ) => {
@ -830,6 +863,12 @@ const getOption = () => {
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 => {
} )
}
/ / 保 存 屏 蔽 信 息
const saveShieldInfoForm = ( ) => {
PosSetting ( shieldInfoForm . value ) . then ( ( e ) => {
} )
}
/ / 更 新 路 线 数 量
const updateRunwayNum = ( e ) => {
let arr = new Array ( e ) . fill ( 0 )
@ -904,9 +948,13 @@ const shildForm = ref({})
const openShildDialog = ( e ) => {
shildDialog . value = true
shildForm . value = {
$index : e . row . $index ,
lon : e . row . Lon ,
lat : e . row . Lat ,
strength : e . row . rate ,
name : Math . random ( ) . toString ( ) . split ( '.' ) [ 1 ] ,
deviation : shieldInfoForm . value . deviation ,
shielding : shieldInfoForm . value . shielding ,
}
}
const openShildDialog1 = ( e ) => {
@ -915,7 +963,6 @@ const openShildDialog1 = (e) => {
}
/ / 设 置 固 定 物
const addShildItem = ( ) => {
console . log ( shildForm . value )
if ( shildForm . value . id ) {
updateShildData ( shildForm . value ) . then ( e => {
shildDialog . value = false
@ -923,6 +970,7 @@ const addShildItem = () => {
getShildTableList ( )
} )
} else {
tableData1 . value . splice ( ( currentPage1 . value - 1 ) * pageSize1 . value + shildForm . value . $index , 1 ) ;
addShildData ( shildForm . value ) . then ( e => {
shildDialog . value = false
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 currentPosition = ref ( { } )
@ -1268,9 +1348,12 @@ const getDotsData = () => {
const point = {
lon : v . Lon ,
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 ) ]
}
watch ( ( ) => [ tableData1 . value , areaPoints . value ] , ( oldVal , newVal ) => {