yangyuxuan 1 month ago
parent
commit
fecacd3d54

+ 7 - 0
src/api/disasterRiskMonitor/rainfall.ts

@@ -52,6 +52,13 @@ export const getVideoInfo = params => {
     data: params
   });
 };
+export const getVideoInfo2 = params => {
+  return request({
+    url: "/api/videoResource/videoinfo/get_waterlogged_all_video_info",
+    method: "get",
+    data: params
+  });
+};
 
 // 雨窝点详情
 export const getRainbowDetails = (id: string) => {

+ 14 - 5
src/views/disasterRiskMonitor/easyToFloodPointView.vue

@@ -54,23 +54,32 @@
 <script setup lang="ts">
 import { ref } from "vue";
 import { ElTable, ElTableColumn } from "element-plus";
-import { getVideoInfo } from "@/api/disasterRiskMonitor/rainfall";
+import {getVideoInfo, getVideoInfo2} from "@/api/disasterRiskMonitor/rainfall";
 
 const route = useRoute();
 const latitude = ref(route.query.latitude);
 const longitude = ref(route.query.longitude);
 const name = ref(decodeURIComponent(route.query.name));
+// const queryParams = reactive({
+//   location: "",
+//   radius: "2000"
+// });
 const queryParams = reactive({
-  location: "",
-  radius: "2000"
+  radius: "2000",
+  page: 1,
+  pageSize: 10,
+  longitude: "",
+  latitude: ""
 });
 const videoList = ref();
 const getTableRowClass = ({ rowIndex }) => {
   return rowIndex % 2 === 0 ? "" : "common-table-tr";
 };
-queryParams.location = "POINT(" + longitude.value + " " + latitude.value + ")";
+// queryParams.location = "POINT(" + longitude.value + " " + latitude.value + ")";
+queryParams.longitude = longitude.value;
+queryParams.latitude = latitude.value;
 const getVideo = () => {
-  getVideoInfo(queryParams).then(res => {
+  getVideoInfo2(queryParams).then(res => {
     res.data.list.forEach(item => {
       item.video_code = item.indexcode;
       item.distance = (Math.ceil(item.distance * 100) / 100).toFixed(2);

+ 12 - 5
src/views/disasterRiskMonitor/windAndFloodPreventionView.vue

@@ -54,23 +54,30 @@
 <script setup lang="ts">
 import { ref } from "vue";
 import { ElTable, ElTableColumn } from "element-plus";
-import { getVideoInfo } from "@/api/disasterRiskMonitor/rainfall";
+import {getVideoInfo, getVideoInfo2} from "@/api/disasterRiskMonitor/rainfall";
 
 const route = useRoute();
 const latitude = ref(route.query.latitude);
 const longitude = ref(route.query.longitude);
 const name = ref(decodeURIComponent(route.query.name));
+// const queryParams = reactive({
+//   location: "",
+//   radius: "2000"
+// });
 const queryParams = reactive({
-  location: "",
-  radius: "2000"
+  radius: "2000",
+  page: 1,
+  pageSize: 10,
+  longitude: "",
+  latitude: ""
 });
 const videoList = ref();
 const getTableRowClass = ({ rowIndex }) => {
   return rowIndex % 2 === 0 ? "" : "common-table-tr";
 };
-queryParams.location = "POINT(" + longitude.value + " " + latitude.value + ")";
+// queryParams.location = "POINT(" + longitude.value + " " + latitude.value + ")";
 const getVideo = () => {
-  getVideoInfo(queryParams).then(res => {
+  getVideoInfo2(queryParams).then(res => {
     res.data.list.forEach(item => {
       item.video_code = item.indexcode;
       item.distance = (Math.ceil(item.distance * 100) / 100).toFixed(2);