修改障碍物保存逻辑

main
suixy 3 weeks ago
parent facd8af26d
commit ab27f01fe1

@ -86,7 +86,7 @@ const correctDeviation = (e) => {
} }
const parseTime = (time, pattern) => { const parseTime = (time, pattern) => {
if (arguments.length === 0 || !time) { if (!time) {
return null; return null;
} }
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'; const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}';

@ -1426,6 +1426,7 @@ const handleObstacle2 = () => {
strength: dialog3Form.value.strength, strength: dialog3Form.value.strength,
files: dialog3Form.value.fileList.map(e => e.url), files: dialog3Form.value.fileList.map(e => e.url),
findTime: dialog3Form.value.time, findTime: dialog3Form.value.time,
description: dialog3Form.value.description
}).then(e => { }).then(e => {
// delShildData(e.row).then(e => { // delShildData(e.row).then(e => {
// getShildTableList() // getShildTableList()
@ -1573,6 +1574,7 @@ const handleObstacle = () => {
strength: dialog1Form.value.strength, strength: dialog1Form.value.strength,
files: dialog1Form.value.fileList.map(e => e.url), files: dialog1Form.value.fileList.map(e => e.url),
findTime: dialog1Form.value.time, findTime: dialog1Form.value.time,
description: dialog1Form.value.description
}).then(e => { }).then(e => {
let data = null let data = null
if (dotIndex.value >= 0) { if (dotIndex.value >= 0) {
@ -1772,18 +1774,19 @@ const openHandleObstacleDialog1 = (e) => {
// //
const handleObstacle1 = () => { const handleObstacle1 = () => {
InserDealObstacleModel({ InserDealObstacleModel({
longitude: dialog1Form.value.longitude, longitude: dialog2Form.value.longitude,
latitude: dialog1Form.value.latitude, latitude: dialog2Form.value.latitude,
strength: dialog1Form.value.strength, strength: dialog2Form.value.strength,
files: dialog1Form.value.fileList.map(e => e.url), files: dialog2Form.value.fileList.map(e => e.url),
findTime: dialog1Form.value.time, findTime: dialog2Form.value.time,
description: dialog2Form.value.description
}).then(e => { }).then(e => {
let data = null let data = null
if (dotIndex1.value >= 0) { if (dotIndex1.value >= 0) {
data = table2Data.value[dotIndex1.value] data = table2Data.value[dotIndex1.value]
} }
dialog2.value = false dialog2.value = false
tableData1.value = tableData1.value.filter(v => !(v.Lon === dialog1Form.value.longitude && v.Lat === dialog1Form.value.latitude && v.Strength === dialog1Form.value.strength)) tableData1.value = tableData1.value.filter(v => !(v.Lon === dialog2Form.value.longitude && v.Lat === dialog2Form.value.latitude && v.Strength === dialog2Form.value.strength))
if (data) { if (data) {
dotIndex1.value = table2Data.value.findIndex(v => v.Lon === data.Lon && v.Lat === data.Lat && v.Strength === data.Strength) dotIndex1.value = table2Data.value.findIndex(v => v.Lon === data.Lon && v.Lat === data.Lat && v.Strength === data.Strength)
} }

Loading…
Cancel
Save