修改障碍物保存逻辑

main
suixy 3 weeks ago
parent facd8af26d
commit ab27f01fe1

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

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

Loading…
Cancel
Save