+
+ 巡逻方块
+
+
+ 任务下发
+
下发指令
@@ -80,6 +86,7 @@ import { qcckGet } from "@/api/qcckApi.js";
import emitter from "@/utils/eventBus.js";
import router from "@/router/index.js";
import { getSelectVigilant } from "@/api/dpApi/home.js";
+import { getPatrolBlockList } from "@/api/basicsmanage/patrolBlock.js";
import GdMap from "@/components/Map/GdMap/index.vue";
import Header from "./layout/header.vue";
import CheckBox from "@/components/checkBox/index";
@@ -143,6 +150,8 @@ const timeList = ref({
hasChoose: [],
})
const isShowCount = ref(false) //是否展示统计
+const isShowPatrolBlock = ref(false) //是否展示巡逻方块
+const patrolBlockList = ref([]) //巡逻方块数据
watch(() => showClassR.value,
(val) => { emitter.emit("followUp", !val); }
);
@@ -228,6 +237,49 @@ function clickXfzl() {
emitter.emit("closeAllDialog");
emitter.emit("showZlxf");
}
+//点击巡逻方块
+function clickPatrolBlock() {
+ if (isShowPatrolBlock.value) {
+ // 隐藏方块
+ emitter.emit("deletePointArea", "patrolBlockLarge");
+ isShowPatrolBlock.value = false;
+ patrolBlockList.value = [];
+ } else {
+ // 显示方块
+ getPatrolBlockList({ pageCurrent: 1, pageSize: 1000 }).then((res) => {
+ if (res.records && res.records.length > 0) {
+ patrolBlockList.value = res.records;
+ let cc = [];
+ const coords = res.records.map((el, index) => {
+ let centerPoint = [el.zxX, el.zxY];
+ if (index == 0) cc = centerPoint;
+ let position = [
+ [Number(el.x1), Number(el.y1)],
+ [Number(el.x2), Number(el.y2)]
+ ];
+ let text = el.mc;
+ return { position, text, id: el.id, userData: el };
+ });
+ emitter.emit("echoPlane", {
+ fontColor: "#12fdb8",
+ coords: coords,
+ type: "rectangle",
+ flag: "patrolBlockLarge",
+ color: "rgba(2,20,51,0.5)",
+ linecolor: "#1C97FF"
+ });
+ emitter.emit("setMapCenter", { location: cc, zoomLevel: 12 });
+ isShowPatrolBlock.value = true;
+ } else {
+ proxy.$message.warning("暂无巡逻方块数据");
+ }
+ });
+ }
+}
+//点击任务下发
+function clickTaskIssue() {
+ window.open('#/taskPage/IssueTasks', '_blank');
+}
//点击犯罪预测
function clickAddEvent() {
showVisible.value = !showVisible.value
@@ -461,4 +513,13 @@ function handleFzyc() {
background: url('~@/assets/home/cj_total.png')no-repeat;
background-size: 100% 100%;
}
+
+.addBox {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ .imgBox {
+ position: relative;
+ }
+}
\ No newline at end of file
diff --git a/src/views/largeScreen/home/layout/streetInfo.vue b/src/views/largeScreen/home/layout/streetInfo.vue
index c3adf00..3390bdb 100644
--- a/src/views/largeScreen/home/layout/streetInfo.vue
+++ b/src/views/largeScreen/home/layout/streetInfo.vue
@@ -86,31 +86,7 @@
-
-
-
-
-
-
{{ dateRange[0] }}
-
-
-
{{ dateRange[1] }}
-
-
- 确定
- 回放
-
-
+
@@ -137,6 +113,7 @@ const props = defineProps({
}
});
const visible = ref(false);
+const isGjhfActive = ref(false);
const times = ref(null);
const router = useRouter();
@@ -206,6 +183,7 @@ function getZFJLY(item) {
function close() {
emitter.emit("deletePointArea", "largeIcon");
visible.value = false;
+ isGjhfActive.value = false;
emitter.emit("showJzInfo", false);
emitter.emit("deletePointArea", "xfq");
emitter.emit("deletePointArea", "route");
@@ -230,6 +208,33 @@ function playTimeChange(val) {
function _getTbWzXfwzSelectTrack() {
getTbWzXfwzSelectTrack().then((res) => {});
}
+// 切换轨迹回放
+function toggleGjhf() {
+ if (isGjhfActive.value) {
+ // 取消选中,清除轨迹
+ emitter.emit("deletePointArea", "route");
+ isGjhfActive.value = false;
+ } else {
+ // 选中,获取轨迹
+ let params = {
+ bbId: props.data.id,
+ kssj: dateRange.value.length > 0 ? dateRange.value[0] : "",
+ jssj: dateRange.value.length > 0 ? dateRange.value[1] : ""
+ };
+ emitter.emit("deletePointArea", "route");
+ qcckPost(params, "/mosty-wzzx/tbWzXfwz/selectLswz").then((res) => {
+ let arr = res || [];
+ let points = [];
+ arr.forEach((item) => { points.push([item.jd, item.wd]) });
+ if (points.length > 0) {
+ emitter.emit("drawLineAnimation", {coords:points,isClear:true,flag:'route'});
+ isGjhfActive.value = true;
+ } else {
+ proxy.$message({ type: "warning", message: `没有轨迹数据` });
+ }
+ });
+ }
+}
// 根据时间来画轨迹
function chooseTime() {
let params = {
@@ -448,4 +453,8 @@ const getDkqkData=()=>{
::v-deep .el-popper.is-light{
transform: translate(5px, 336px) !important;
}
+.btnBox .active {
+ background: #1c97ff !important;
+ border-color: #1c97ff !important;
+}