This commit is contained in:
duanxiaohai 2024-08-13 16:05:12 +08:00
parent 89f41d8b5d
commit b1022ecec8
3 changed files with 41 additions and 37 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="dialogPage"> <div class="dialogPage">
<el-dialog <el-dialog
v-model="dialogShow" v-model="cameraShow"
center center
width="80vw" width="80vw"
:show-close="false" :show-close="false"
@ -15,8 +15,7 @@
</el-icon> </el-icon>
</div> </div>
</template> </template>
<div class="tabelPart">
<!-- <div class="tabelPart">
<div class="bo"> <div class="bo">
<div class="title"> <div class="title">
<div class="title_top"> <div class="title_top">
@ -25,7 +24,7 @@
alt="" alt=""
style="margin-right: 10px" style="margin-right: 10px"
/> />
<div class="name">{{ title }}详情</div> <div class="name">{{ data.title }}</div>
<img <img
src="@/assets/images/table_r.png" src="@/assets/images/table_r.png"
alt="" alt=""
@ -42,7 +41,7 @@
<div style="width: 100%; height: calc(100% - 110px)"> <div style="width: 100%; height: calc(100% - 110px)">
</div> </div>
</div> --> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -58,7 +57,7 @@ import {
} from "vue"; } from "vue";
import { CircleCloseFilled } from "@element-plus/icons-vue"; import { CircleCloseFilled } from "@element-plus/icons-vue";
const props = defineProps({ const props = defineProps({
dialogShow: { cameraShow: {
type: Boolean, type: Boolean,
default: () => { default: () => {
return false; return false;
@ -86,22 +85,22 @@ const props = defineProps({
const emit = defineEmits(["close"]); const emit = defineEmits(["close"]);
// //
const dialogShow = ref(); const cameraShow = ref();
const data = reactive({ const data = reactive({
title: "", title: "摄像头",
columns: [], columns: [],
tableData: [], tableData: [],
}); });
const gridData = []; const gridData = [];
// //
// watch( watch(
// () => props.dialogShow, () => props.cameraShow,
// (newVal, oldVal) => { (newVal, oldVal) => {
// dialogShow.value = newVal; cameraShow.value = newVal;
// data.columns = props.columns; // data.columns = props.columns;
// } }
// ); );
// watch( // watch(
// () => props.tableData, // () => props.tableData,
// (newVal, oldVal) => { // (newVal, oldVal) => {
@ -110,8 +109,7 @@ const gridData = [];
// ); // );
// 使 // 使
onMounted(() => { onMounted(() => {
dialogShow.value = props.dialogShow; cameraShow.value = props.cameraShow;
console.log(111);
// data.columns = props.columns; // data.columns = props.columns;
// data.title = props.title; // data.title = props.title;
@ -119,10 +117,11 @@ onMounted(() => {
}); });
const closeDialog = () => { const closeDialog = () => {
dialogShow.value = false; cameraShow.value = false;
emit("close"); emit("close");
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.el-dialog) { :deep(.el-dialog) {
--el-dialog-bg-color: none; --el-dialog-bg-color: none;

View File

@ -327,7 +327,7 @@
> >
</Dialog> </Dialog>
<DialogCamera <DialogCamera
:dialogShow="cameraShow" :cameraShow="cameraShow"
@close="close1" @close="close1"
> >
</DialogCamera> </DialogCamera>
@ -774,7 +774,6 @@ const close = () => {
}; };
const close1 = () => { const close1 = () => {
cameraShow.value = false; cameraShow.value = false;
console.log('弹框关闭');
}; };
// //
const handlePagination = (currentPage) => { const handlePagination = (currentPage) => {
@ -824,7 +823,6 @@ const oneCardSolution = () => {
// //
const openCamera = () => { const openCamera = () => {
cameraShow.value = true; cameraShow.value = true;
console.log(cameraShow.value,"摄像头");
}; };
const back = () => { const back = () => {
if (jump.value == "detail") { if (jump.value == "detail") {

View File

@ -169,7 +169,10 @@
<div v-else>未居住</div> <div v-else>未居住</div>
</template> </template>
<template #sxt="{ currentCol, currentData }"> <template #sxt="{ currentCol, currentData }">
<div>摄像头</div> <el-icon size="24" color="#fff"
v-if="currentData.camera"
><VideoCamera
/></el-icon>
</template> </template>
</Dialog> </Dialog>
<personDetail <personDetail
@ -199,6 +202,7 @@ import tools from "@/utils/tools";
import initializeMap from "@/utils/mapInitializer.js"; import initializeMap from "@/utils/mapInitializer.js";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
import mapTown from "@/assets/json/ly.json"; import mapTown from "@/assets/json/ly.json";
import { VideoCamera } from "@element-plus/icons-vue";
// import xkz from "@/assets/json/xkz.json"; // import xkz from "@/assets/json/xkz.json";
import cssj from "@/assets/json/cssj.json"; import cssj from "@/assets/json/cssj.json";
import j0 from "@/assets/images/map/j0.png"; import j0 from "@/assets/images/map/j0.png";
@ -1652,17 +1656,17 @@ const changeys = (name) => {
} else { } else {
yaosuList.value.push(name); yaosuList.value.push(name);
let url; let url;
let img let img;
yaosuTotal.value.forEach((item, index) => { yaosuTotal.value.forEach((item, index) => {
if (item.name == name) { if (item.name == name) {
url = item.url; url = item.url;
img=item.img img = item.img;
} }
}); });
getZyys(url, name,img); getZyys(url, name, img);
} }
}; };
const getZyys = (url, name,img) => { const getZyys = (url, name, img) => {
http.get(url).then((res) => { http.get(url).then((res) => {
if (res.code == 200) { if (res.code == 200) {
yaosuIcon.value[name].sj = res.data; yaosuIcon.value[name].sj = res.data;
@ -1674,7 +1678,7 @@ const getZyys = (url, name,img) => {
item.center.push(Number(item.wd)); item.center.push(Number(item.wd));
}); });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => { yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm,indexx,name) createZyys(itemm, indexx, name);
}); });
} }
}); });
@ -1696,7 +1700,9 @@ const createZyys = (polygon, indexx, name) => {
content.appendChild(img2); content.appendChild(img2);
return content; return content;
} }
yaosuIcon.value[name].sj[indexx].overlay = new BMapGL.CustomOverlay(createLabelDOM, { yaosuIcon.value[name].sj[indexx].overlay = new BMapGL.CustomOverlay(
createLabelDOM,
{
point: new BMapGL.Point(...polygon.center), point: new BMapGL.Point(...polygon.center),
opacity: 0.5, opacity: 0.5,
offsetY: -10, offsetY: -10,
@ -1704,8 +1710,9 @@ const createZyys = (polygon, indexx, name) => {
imgSrc2: polygon.img, imgSrc2: polygon.img,
type: "customOverlay", type: "customOverlay",
}, },
}); }
map.addOverlay( yaosuIcon.value[name].sj[indexx].overlay); );
map.addOverlay(yaosuIcon.value[name].sj[indexx].overlay);
}; };
//---------------------- //----------------------
// //