From 0a52cca78bf86a5348d7cd3474246764c70ed707 Mon Sep 17 00:00:00 2001
From: fangjiakai <450850793@qq.com>
Date: Sun, 4 Feb 2024 09:16:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=94=B5=E5=AD=90=E5=9B=B4?=
=?UTF-8?q?=E6=A0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/hidden_view/index.vue | 7 ++++--
src/views/BI/js/trajectory.js | 36 ++++++++++++++++++++++------
2 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/src/components/hidden_view/index.vue b/src/components/hidden_view/index.vue
index 95539ba..84fc8ea 100644
--- a/src/components/hidden_view/index.vue
+++ b/src/components/hidden_view/index.vue
@@ -37,6 +37,9 @@
已整改
已验收
已超期
+ 暂存
+ 待指派
+ 指派中
{{ data.info.HIDDENDESCR }}
@@ -97,7 +100,7 @@
/>
-
+
整改信息
@@ -196,7 +199,7 @@
-
+
验收信息
diff --git a/src/views/BI/js/trajectory.js b/src/views/BI/js/trajectory.js
index 59d3186..64f9ad9 100644
--- a/src/views/BI/js/trajectory.js
+++ b/src/views/BI/js/trajectory.js
@@ -2,13 +2,14 @@ import pako from "pako"; // 解密gzip插件
import { useWebSocket } from "@vueuse/core";
import { useUserStore } from "@/pinia/user";
import pinia from "@/pinia";
-import { getRealTimeList } from "@/request/map";
+import { getRealTimeList, getFenceList } from "@/request/map";
const userStore = useUserStore(pinia);
const pls_ip = userStore.getUserInfo.POST_URL;
// const pls_ip = "http://121.22.38.202:8084";
let entityArr = [];
let billboardArr = [];
+const fencesArr = [];
const { open, close } = useWebSocket(
encodeURI("ws://" + pls_ip.replace("http://", "") + "/netty/test.io?u=1"),
@@ -54,10 +55,10 @@ export const handleTrajectory = (b) => {
const getOnlineUser = async () => {
entityArr = new window.CustomCesium.GroupModel("人物模型");
billboardArr = new window.CustomCesium.GroupModel("人物姓名");
- await getRealTimeList();
- // const { data } = await getRealTimeList();
- // let userList = data.data;
- const userList = [
+ // await getRealTimeList();
+ const { data } = await getRealTimeList();
+ let userList = data.data;
+ userList = [
{
cardNo: "8379",
name: "大大",
@@ -217,6 +218,27 @@ function peoMovement(moveData) {
});
}
-export const handleFence = () => {
-
+export const handleFence = async (b) => {
+ if (b) {
+ const { data } = await getFenceList();
+ const fences = data.rows;
+ fences.forEach((fence) => {
+ if (fence.list.length > 0) {
+ const enclosure = new window.CustomCesium.Enclosure(window.$icy);
+ enclosure.showDataSource(
+ fence.list, // 数据
+ 30, // 高度
+ "yellow" // 颜色默认黄色
+ );
+ fencesArr.push(enclosure);
+ }
+ });
+ } else {
+ if (fencesArr) {
+ fencesArr.forEach((fence) => {
+ fence.clear();
+ fence.destroy();
+ });
+ }
+ }
};