From bff10e7d9d9c81f03bf4452d99dc7ab99cf6106f Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Fri, 10 Oct 2025 16:45:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 11 +++++++++++ src/views/index.vue | 30 ++++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index 60d7b59..1ac2598 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -128,4 +128,15 @@ export function GetAllCData(data) { return request({ url: '/api/FodAirPort/GetAllCData', method: 'get', params: data }); +} + +export function InsertCListData(data) { + return request({ + url: '/api/FodAirPort/InsertCListData', method: 'post', data: data + }); +} +export function UpdateCData(data) { + return request({ + url: '/api/FodAirPort/UpdateCData', method: 'post', data: data + }); } \ No newline at end of file diff --git a/src/views/index.vue b/src/views/index.vue index 6f9044e..a4298e6 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -20,7 +20,16 @@ import { setParasSignalpro, getShildList, addShildData, - delShildData, StartWork, StopWork, RestartWork, ShutDownWork, getAllAirPort, getArea, GetAllCData + delShildData, + StartWork, + StopWork, + RestartWork, + ShutDownWork, + getAllAirPort, + getArea, + GetAllCData, + InsertCListData, + UpdateCData } from "@/api/api"; import {useRouter} from "vue-router"; @@ -350,27 +359,28 @@ const RIGHT = defineComponent({ - {points.value.map((i, k) => ( + {areaPoints.value.map((i, k) => (
(points.value[k].lon = val)} + onUpdate:modelValue={val => (areaPoints.value[k].lon = val)} /> (points.value[k].lat = val)} + onUpdate:modelValue={val => (areaPoints.value[k].lat = val)} /> getPoint(k)} style={{marginLeft: "20px"}}>获取
))} +
- 提交 + 提交
)} @@ -1070,8 +1080,16 @@ const select2Update = (val) => { const select3Update = (val) => { form6.value.region1 = val } +const areaPoints = ref([]) const getArea2 = () => { - GetAllCData({airId: form6.value.region}) + GetAllCData({areaId: form6.value.region1}).then((res) => { + areaPoints.value = res.data + }) +} +const saveAreaPoint = () => { + areaPoints.value.forEach((v, k) => { + UpdateCData(v) + }) }