From f9aba751a8c6e248f6d756eae0c69b2d88822f78 Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Fri, 23 Aug 2024 18:03:59 +0800 Subject: [PATCH] gx --- src/view/dialog/dialogCameras.vue | 11 ++++++++++- src/view/person/index.vue | 8 ++++---- src/view/sy_map.vue | 31 +++++++++++++++++++++++++------ vite.config.js | 4 ++-- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/view/dialog/dialogCameras.vue b/src/view/dialog/dialogCameras.vue index ffd33f5..ecd7a6b 100644 --- a/src/view/dialog/dialogCameras.vue +++ b/src/view/dialog/dialogCameras.vue @@ -80,6 +80,12 @@ const props = defineProps({ return ""; }, }, + sxtname: { + type: String, + default: () => { + return ""; + }, + }, }); const emit = defineEmits(["close"]); @@ -106,6 +112,9 @@ watch( // if (hlsUriSslNow.value != "" && props.hlsUriSsl != hlsUriSslNow.value) cameraShow.value = newVal; hlsUriSslNow.value = props.hlsUriSsl; + data.title = props.sxtname; + console.log(hlsUriSslNow.value,props.sxtname,5555); + attachmentLink.value = hlsUriSslNow.value; dp.value = null; //当摄像头第二次打开时,要先创建dom @@ -244,7 +253,7 @@ const closeDialog = () => { .name { font-family: PangMenZhengDao, PangMenZhengDao; font-weight: 600; - font-size: 33px; + font-size: 23px; color: #ffffff; line-height: 38px; text-align: center; diff --git a/src/view/person/index.vue b/src/view/person/index.vue index 2441218..8d66b80 100644 --- a/src/view/person/index.vue +++ b/src/view/person/index.vue @@ -854,8 +854,8 @@ const openCamera = () => { }; //获取摄像头地址 const getCameraUrl = () => { - camera.deviceCode = dataMyTag.camera.sbbm; - // camera.deviceCode = "3KSCP274757F2JU"; + // camera.deviceCode = dataMyTag.camera.sbbm; + camera.deviceCode = "3KSCP274757F2JU"; http .get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${camera.deviceCode}`) .then((res) => { @@ -895,9 +895,9 @@ onMounted(() => { } onClickTag2("出生", "出生"); getshs(); - if (dataMyTag.camera) { + // if (dataMyTag.camera) { getCameraUrl(); - } + // } } else { jump.value = "map"; } diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 9f1472f..85a445c 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -213,6 +213,7 @@ @@ -794,6 +795,7 @@ const sxtShow = reactive({ show: false, deviceCode: "", hlsUriSsl: "", + name: "", }); const tableType = reactive({ url: "", @@ -2079,9 +2081,9 @@ const getZyys = (url, name, img, img_map) => { // item.center.push(Number(item.jd)); // item.center.push(Number(item.wd)); item.center = [Number(item.jd), Number(item.wd)]; - item.onClick = () => { - handleItemClick(item, index, name); - }; + // item.onClick = () => { + // handleItemClick(item, index, name); + // }; }); yaosuIcon.value[name].sj.forEach((itemm, indexx) => { createZyys(itemm, indexx, name); @@ -2089,9 +2091,9 @@ const getZyys = (url, name, img, img_map) => { } }); }; -const handleItemClick = (item, index, name) => { - console.log("Item clicked:", item, index, name); -}; +// const handleItemClick = (item, index, name) => { +// console.log("Item clicked:", item, index, name); +// }; // 添加资源要素的图标(overlay存放标记点) const createZyys = (polygon, indexx, name) => { @@ -2124,9 +2126,26 @@ const createZyys = (polygon, indexx, name) => { ); map.addOverlay(yaosuIcon.value[name].sj[indexx].overlay); yaosuIcon.value[name].sj[indexx].overlay.addEventListener("click", () => { + + sxtShow.deviceCode = polygon.sbbm; + sxtShow.name = polygon.sbmc; + getCameraUrl(); console.log(polygon); }); }; +//获取摄像头地址 +const getCameraUrl = () => { + // camera.deviceCode = dataMyTag.camera.sbbm; + // sxtShow.deviceCode = "3KSCP274757F2JU"; + http + .get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${sxtShow.deviceCode}`) + .then((res) => { + if (res.code == 200) { + sxtShow.hlsUriSsl = res.data.hlsUriSsl; + sxtShow.show = true; + } + }); +}; //----------资源要素------------ //点击街道,回到街道 const to_jd = async (item_name) => { diff --git a/vite.config.js b/vite.config.js index 7708875..99753df 100644 --- a/vite.config.js +++ b/vite.config.js @@ -15,8 +15,8 @@ export default defineConfig({ // 第一个代理 "/api": { // 匹配到啥来进行方向代理 - target: "http://10.0.0.65:8095/", //刘进 - // target: "http://220.191.238.50:996/", //线上 + // target: "http://10.0.0.65:8095/", //刘进 + target: "http://220.191.238.50:996/", //线上 changeOrigin: true, //是否支持跨域 //rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个 },