diff --git a/src/api/api.js b/src/api/api.js index 88c4896..c222056 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -174,4 +174,16 @@ export function PostDealObstacleModel(data) { return request({ 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 + }); } \ No newline at end of file diff --git a/src/components/ruler.vue b/src/components/ruler.vue index e68b1a7..8855c29 100644 --- a/src/components/ruler.vue +++ b/src/components/ruler.vue @@ -60,7 +60,8 @@ :style="{ left: `${getDotX(dot.x)}%`, 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" > @@ -401,8 +402,6 @@ const ticks = computed(() => { width: 10px; height: 10px; position: absolute; - background: radial-gradient(circle at center, - #ea1212 0%, rgba(228, 116, 116, 0.2) 100%); border-radius: 50%; } @@ -414,7 +413,7 @@ const ticks = computed(() => { background-repeat: no-repeat; background-size: 100% 100%; transform-origin: center; - transition: all 0.16s; + //transition: all 0.16s; .head { position: absolute; diff --git a/src/views/index.vue b/src/views/index.vue index d859cc8..cd1a621 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -181,9 +181,19 @@ - - + +
+ + + 处置 + 删除 + 固定物 + +
+ + +
屏蔽信息设置
+ + + + + + + + + + +
+ 保存 +
+
+
@@ -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) => {